Ticket #9388: year_navigation_in_calendar_r9232.diff

File year_navigation_in_calendar_r9232.diff, 4.6 KB (added by Javier de la Rosa, 16 years ago)

Patch for django trunk r9232

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

     
    5757.calendarnav { font-size:10px; text-align: center; color:#ccc; margin:0; padding:1px 3px; }
    5858.calendarnav a:link, #calendarnav a:visited, #calendarnav a:hover { color: #999; }
    5959.calendar-shortcuts { background:white; font-size:10px; line-height:11px; border-top:1px solid #eee; padding:3px 0 4px; color:#ccc; }
    60 .calendarbox .calendarnav-previous, .calendarbox .calendarnav-next { display:block; position:absolute; font-weight:bold; font-size:12px; background:#C9DBED url(../img/admin/default-bg.gif) bottom left repeat-x; padding:1px 4px 2px 4px; color:white; }
    61 .calendarnav-previous:hover, .calendarnav-next:hover { background:#036; }
     60.calendarbox .calendarnav-previous, .calendarbox .calendarnav-previous-month, .calendarbox .calendarnav-next, .calendarbox .calendarnav-next-month { display:block; position:absolute; font-weight:bold; font-size:12px; background:#C9DBED url(../img/admin/default-bg.gif) bottom left repeat-x; padding:1px 4px 2px 4px; color:white; }
     61.calendarnav-previous:hover, .calendarnav-previous-month:hover, .calendarnav-next:hover, .calendarnav-next-month:hover { background:#036; }
    6262.calendarnav-previous { top:0; left:0; }
    6363.calendarnav-next { top:0; right:0; }
     64.calendarnav-previous-month { top:0; left:15px;}
     65.calendarnav-next-month { top:0; right:15px;}
    6466.calendar-cancel { margin:0 !important; padding:0; font-size:10px; background:#e1e1e1 url(../img/admin/nav-bg.gif) 0 50% repeat-x;  border-top:1px solid #ddd; }
    6567.calendar-cancel a { padding:2px; color:#999; }
    6668ul.timelist, .timelist li { list-style-type:none; margin:0; padding:0; }
     
    9799.editinline-stacked .inline-object { margin-left:210px; background:white; }
    98100.editinline-stacked .inline-source { float:left; width:200px; background:#f8f8f8;  }
    99101.editinline-stacked .inline-splitter { float:left; width:9px; background:#f8f8f8 url(../img/admin/inline-splitter-bg.gif) 50% 50% no-repeat; border-right:1px solid #ccc; }
    100 .editinline-stacked .controls { clear:both; background:#e1e1e1 url(../img/admin/nav-bg.gif) top left repeat-x; padding:3px 4px; font-size:11px; border-top:1px solid #ddd; }
    101  No newline at end of file
     102.editinline-stacked .controls { clear:both; background:#e1e1e1 url(../img/admin/nav-bg.gif) top left repeat-x; padding:3px 4px; font-size:11px; border-top:1px solid #ddd; }
  • django/contrib/admin/media/js/admin/DateTimeShortcuts.js

     
    167167
    168168        // next-prev links
    169169        var cal_nav = quickElement('div', cal_box, '');
    170         var cal_nav_prev = quickElement('a', cal_nav, '<', 'href', 'javascript:DateTimeShortcuts.drawPrev('+num+');');
    171         cal_nav_prev.className = 'calendarnav-previous';
    172         var cal_nav_next = quickElement('a', cal_nav, '>', 'href', 'javascript:DateTimeShortcuts.drawNext('+num+');');
    173         cal_nav_next.className = 'calendarnav-next';
     170        var cal_nav_prev = quickElement('a', cal_nav, '', 'href', 'javascript:DateTimeShortcuts.drawPrev('+num+');');
     171        cal_nav_prev.className = 'calendarnav-previous-month';
     172        var cal_nav_next = quickElement('a', cal_nav, '', 'href', 'javascript:DateTimeShortcuts.drawNext('+num+');');
     173        cal_nav_next.className = 'calendarnav-next-month';
    174174
     175        var cal_nav_prev_year = quickElement('a', cal_nav, '«', 'href', 'javascript:DateTimeShortcuts.drawPrevYear('+num+');');
     176        cal_nav_prev_year.className = 'calendarnav-previous';
     177        var cal_nav_next_year = quickElement('a', cal_nav, '»', 'href', 'javascript:DateTimeShortcuts.drawNextYear('+num+');');
     178        cal_nav_next_year.className = 'calendarnav-next';
     179
     180
    175181        // main box
    176182        var cal_main = quickElement('div', cal_box, '', 'id', DateTimeShortcuts.calendarDivName2 + num);
    177183        cal_main.className = 'calendar';
     
    229235    dismissCalendar: function(num) {
    230236        document.getElementById(DateTimeShortcuts.calendarDivName1+num).style.display = 'none';
    231237    },
     238    drawPrevYear: function(num) {
     239        DateTimeShortcuts.calendars[num].drawPreviousYear();
     240    },
     241    drawNextYear: function(num) {
     242        DateTimeShortcuts.calendars[num].drawNextYear();
     243    },
    232244    drawPrev: function(num) {
    233245        DateTimeShortcuts.calendars[num].drawPreviousMonth();
    234246    },
Back to Top