Ticket #9388: 9833-r12089.diff

File 9833-r12089.diff, 3.0 KB (added by Ramiro Morales, 15 years ago)

patch updated to apply cleanly to trunk as of r12089.

  • django/contrib/admin/media/css/widgets.css

    diff -r 7ab8669905c3 django/contrib/admin/media/css/widgets.css
    a b  
    301301    color: #ccc;
    302302}
    303303
    304 .calendarbox .calendarnav-previous, .calendarbox .calendarnav-next {
     304.calendarbox .calendarnav-previous, .calendarbox .calendarnav-next, .calendarbox .calendarnav-previous-year, .calendarbox .calendarnav-next-year {
    305305    display: block;
    306306    position: absolute;
    307307    font-weight: bold;
     
    311311    color: white;
    312312}
    313313
    314 .calendarnav-previous:hover, .calendarnav-next:hover {
     314.calendarnav-previous:hover, .calendarnav-next:hover, .calendarnav-previous-year:hover, .calendarnav-next-year:hover {
    315315    background: #036;
    316316}
    317317
    318318.calendarnav-previous {
     319    top:0;
     320    left:15px;
     321}
     322
     323.calendarnav-next {
     324    top:0;
     325    right:15px;
     326}
     327
     328.calendarnav-previous-year {
    319329    top: 0;
    320330    left: 0;
    321331}
    322332
    323 .calendarnav-next {
     333.calendarnav-next-year {
    324334    top: 0;
    325335    right: 0;
    326336}
  • django/contrib/admin/media/js/admin/DateTimeShortcuts.js

    diff -r 7ab8669905c3 django/contrib/admin/media/js/admin/DateTimeShortcuts.js
    a b  
    168168
    169169        // next-prev links
    170170        var cal_nav = quickElement('div', cal_box, '');
    171         var cal_nav_prev = quickElement('a', cal_nav, '<', 'href', 'javascript:DateTimeShortcuts.drawPrev('+num+');');
     171        var cal_nav_prev = quickElement('a', cal_nav, '', 'href', 'javascript:DateTimeShortcuts.drawPrev('+num+');');
    172172        cal_nav_prev.className = 'calendarnav-previous';
    173         var cal_nav_next = quickElement('a', cal_nav, '>', 'href', 'javascript:DateTimeShortcuts.drawNext('+num+');');
     173        var cal_nav_next = quickElement('a', cal_nav, '', 'href', 'javascript:DateTimeShortcuts.drawNext('+num+');');
    174174        cal_nav_next.className = 'calendarnav-next';
    175175
     176        var cal_nav_prev_year = quickElement('a', cal_nav, '«', 'href', 'javascript:DateTimeShortcuts.drawPrevYear('+num+');');
     177        cal_nav_prev_year.className = 'calendarnav-previous-year';
     178        var cal_nav_next_year = quickElement('a', cal_nav, '»', 'href', 'javascript:DateTimeShortcuts.drawNextYear('+num+');');
     179        cal_nav_next_year.className = 'calendarnav-next-year';
     180
     181
    176182        // main box
    177183        var cal_main = quickElement('div', cal_box, '', 'id', DateTimeShortcuts.calendarDivName2 + num);
    178184        cal_main.className = 'calendar';
     
    230236        document.getElementById(DateTimeShortcuts.calendarDivName1+num).style.display = 'none';
    231237        window.document.onclick = null;
    232238    },
     239    drawPrevYear: function(num) {
     240        DateTimeShortcuts.calendars[num].drawPreviousYear();
     241    },
     242    drawNextYear: function(num) {
     243        DateTimeShortcuts.calendars[num].drawNextYear();
     244    },
    233245    drawPrev: function(num) {
    234246        DateTimeShortcuts.calendars[num].drawPreviousMonth();
    235247    },
Back to Top