Ticket #658: calendar_fix.patch
File calendar_fix.patch, 4.4 KB (added by , 19 years ago) |
---|
-
contrib/admin/media/js/calendar.js
65 65 // Draw blanks before first of month 66 66 tableRow = quickElement('tr', tableBody); 67 67 for (var i = 0; i < startingPos; i++) { 68 quickElement('td', tableRow, ' ', 'bgcolor','#f3f3f3'); 68 var _cell = quickElement('td', tableRow, ' '); 69 _cell.style.backgroundColor = '#f3f3f3'; 69 70 } 70 71 71 72 // Draw days of month … … 81 82 82 83 // Draw blanks after end of month (optional, but makes for valid code) 83 84 while (tableRow.childNodes.length < 7) { 84 quickElement('td', tableRow, ' ', 'bgcolor','#f3f3f3'); 85 var _cell = quickElement('td', tableRow, ' '); 86 _cell.style.backgroundColor = '#f3f3f3'; 85 87 } 86 88 87 89 calDiv.appendChild(calTable); -
contrib/admin/media/js/admin/DateTimeShortcuts.js
77 77 addEvent(clock_box, 'click', DateTimeShortcuts.cancelEventPropagation); 78 78 79 79 quickElement('h2', clock_box, 'Choose a time'); 80 time_list = quickElement('ul', clock_box, '', 'class', 'timelist'); 80 time_list = quickElement('ul', clock_box, ''); 81 time_list.className = 'timelist'; 81 82 quickElement("a", quickElement("li", time_list, ""), "Now", "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", new Date().getHourMinute());") 82 83 quickElement("a", quickElement("li", time_list, ""), "Midnight", "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", '00:00');") 83 84 quickElement("a", quickElement("li", time_list, ""), "6 a.m.", "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", '06:00');") 84 85 quickElement("a", quickElement("li", time_list, ""), "Noon", "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", '12:00');") 85 86 86 cancel_p = quickElement('p', clock_box, '', 'class', 'calendar-cancel'); 87 cancel_p = quickElement('p', clock_box, ''); 88 cancel_p.className = 'calendar-cancel'; 87 89 quickElement('a', cancel_p, 'Cancel', 'href', 'javascript:DateTimeShortcuts.dismissClock(' + num + ');'); 88 90 }, 89 91 openClock: function(num) { … … 147 149 148 150 // next-prev links 149 151 var cal_nav = quickElement('div', cal_box, ''); 150 quickElement('a', cal_nav, '<', 'class', 'calendarnav-previous', 'href', 'javascript:DateTimeShortcuts.drawPrev('+num+');'); 151 quickElement('a', cal_nav, '>', 'class', 'calendarnav-next', 'href', 'javascript:DateTimeShortcuts.drawNext('+num+');'); 152 var cal_nav_prev = quickElement('a', cal_nav, '<', 'href', 'javascript:DateTimeShortcuts.drawPrev('+num+');'); 153 cal_nav_prev.className = 'calendarnav-previous'; 154 var cal_nav_next = quickElement('a', cal_nav, '>', 'href', 'javascript:DateTimeShortcuts.drawNext('+num+');'); 155 cal_nav_next.className = 'calendarnav-next'; 152 156 cal_box.appendChild(cal_nav); 153 157 154 158 // main box … … 158 162 DateTimeShortcuts.calendars[num].drawCurrent(); 159 163 160 164 // calendar shortcuts 161 var shortcuts = quickElement('div', cal_box, '', 'class', 'calendar-shortcuts'); 165 var shortcuts = quickElement('div', cal_box, ''); 166 shortcuts.className = 'calendar-shortcuts'; 162 167 quickElement('a', shortcuts, 'Yesterday', 'href', 'javascript:DateTimeShortcuts.handleCalendarQuickLink(' + num + ', -1);'); 163 168 shortcuts.appendChild(document.createTextNode('\240|\240')); 164 169 quickElement('a', shortcuts, 'Today', 'href', 'javascript:DateTimeShortcuts.handleCalendarQuickLink(' + num + ', 0);'); … … 166 171 quickElement('a', shortcuts, 'Tomorrow', 'href', 'javascript:DateTimeShortcuts.handleCalendarQuickLink(' + num + ', +1);'); 167 172 168 173 // cancel bar 169 var cancel_p = quickElement('p', cal_box, '', 'class', 'calendar-cancel'); 174 var cancel_p = quickElement('p', cal_box, ''); 175 cancel_p.className = 'calendar-cancel'; 170 176 quickElement('a', cancel_p, 'Cancel', 'href', 'javascript:DateTimeShortcuts.dismissCalendar(' + num + ');'); 171 177 }, 172 178 openCalendar: function(num) {