From d0ed49490522f8d30a97b6ada35d1a91d880f2ad Mon Sep 17 00:00:00 2001 From: taggon Date: Mon, 21 Sep 2009 09:49:35 +0000 Subject: [PATCH] =?UTF-8?q?=EC=9B=94=EB=B3=84=20=EB=8B=AC=EB=A0=A5?= =?UTF-8?q?=EC=97=90=20=EB=85=84=20=EC=9D=B4=EB=8F=99=20=EA=B8=B0=EB=8A=A5?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6802 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- common/js/plugins/ui.calendar/ui.calendar.css | 6 ++++-- common/js/plugins/ui.calendar/ui.calendar.js | 12 +++++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/common/js/plugins/ui.calendar/ui.calendar.css b/common/js/plugins/ui.calendar/ui.calendar.css index d810562aa..08dca2954 100644 --- a/common/js/plugins/ui.calendar/ui.calendar.css +++ b/common/js/plugins/ui.calendar/ui.calendar.css @@ -10,8 +10,10 @@ .ui-calendar caption .today span{text-decoration:underline;} .ui-calendar caption .navi{ position:absolute; top:10px; border:0; padding:0; width:17px; height:18px; background-color:transparent; background-image:url(./img/buttonPaginate.gif); background-repeat:no-repeat; cursor:pointer;} .ui-calendar caption .navi span{ position:absolute; width:0; height:0; overflow:hidden; font-size:0; line-height:0; z-index:-1; visibility:hidden;} -.ui-calendar caption .navi.prev{ left:0; background-position:left top;} -.ui-calendar caption .navi.next{ right:0; background-position:right top;} +.ui-calendar caption .navi.prev{ left:20px; background-position:left top;} +.ui-calendar caption .navi.next{ right:20px; background-position:right top;} +.ui-calendar caption .navi.prev_year{ left:0; background-position:left top;} +.ui-calendar caption .navi.next_year{ right:0; background-position:right top;} .ui-calendar th, .ui-calendar td{ border:0; text-align:center;} .ui-calendar th{ color:#666; background:#f2f2f2; padding:3px 8px;} diff --git a/common/js/plugins/ui.calendar/ui.calendar.js b/common/js/plugins/ui.calendar/ui.calendar.js index c25f95f70..e5b6316d8 100644 --- a/common/js/plugins/ui.calendar/ui.calendar.js +++ b/common/js/plugins/ui.calendar/ui.calendar.js @@ -61,6 +61,8 @@ $.extend(Calendar.prototype, { today : 'Today', prevmonth : 'Prev Month', nextmonth : 'Next Month', + prevyear : 'Prev Year', + nextyear : 'Next Year', close : 'Close' }, options.lang||{}); @@ -173,6 +175,8 @@ $.extend(Calendar.prototype, { } else { obj.find('button.prev').click(function(){ $.calendar._prevMonth(obj) }); obj.find('button.next').click(function(){ $.calendar._nextMonth(obj) }); + obj.find('button.prev_year').click(function(){ $.calendar._prevYear(obj) }); + obj.find('button.next_year').click(function(){ $.calendar._nextYear(obj) }); } obj.find('td>button').click(function(){ $.calendar._selectDate(obj, $(this)) }); }, @@ -244,10 +248,14 @@ $.extend(Calendar.prototype, { this._draw(obj); }, _prevYear : function(obj) { - this._draw(obj); + var cal = calendars[this._getuid(obj)]; + cal.date.setFullYear(cal.date.getFullYear()-1); + this._draw(obj); }, _nextYear : function(obj) { + var cal = calendars[this._getuid(obj)]; + cal.date.setFullYear(cal.date.getFullYear()+1); this._draw(obj); } @@ -294,6 +302,8 @@ template.calendar = '\ \ \ + \ + \ \ \ \