diff options
author | vipsoft <vipsoft@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2009-11-16 04:11:41 +0300 |
---|---|---|
committer | vipsoft <vipsoft@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2009-11-16 04:11:41 +0300 |
commit | 16a38aa49021969ef6539480e308aa9dadc1b7f3 (patch) | |
tree | 995c0a8f761db331a01ea5201e9180fb5f5ed499 /libs | |
parent | ba2564951867f1f48f29c2b1db08181b4942d637 (diff) |
refs #680 - improve usability of datepicker
* updated from jquery calendar 2.7 to jquery-ui datepicker 1.7.2
* contains a DST-related fix that might solve an issue of duplicate days reported by some users
* fixes regression in UI where clicking on calendar icon would not collapse the calendar
* implements some of the style changes shown in the mockup
* updated the calendar text translations from the jquery-ui i18n
Diffstat (limited to 'libs')
17 files changed, 404 insertions, 1076 deletions
diff --git a/libs/jquery/jquery-calendar.css b/libs/jquery/jquery-calendar.css deleted file mode 100644 index fc40fd1d3e..0000000000 --- a/libs/jquery/jquery-calendar.css +++ /dev/null @@ -1,190 +0,0 @@ -/* Main Style Sheet for jQuery Calendar */ -#calendar_div,.calendar_inline { - font-size: 14px; - padding: 0; - margin: 0; -} - -#calendar_div { - display: none; - border: 1px solid #777; - z-index: 10; /*must have*/ -} - -#calendar_div,.calendar_control,.calendar_links,.calendar_header,.calendar - { - width: 185px; -} - -.calendar_inline { - float: left; - display: block; - border: 0; -} - -.calendar_dialog { - padding: 5px !important; - border: 4px ridge #ddd !important; -} - -button.calendar_trigger { - width: 25px; -} - -img.calendar_trigger { - margin: 2px; - vertical-align: middle; -} - -.calendar_prompt { - float: left; - width: 181px; - padding: 2px; - background: #ddd; - color: #000; -} - -* html .calendar_prompt { - width: 185px; -} - -.calendar_control,.calendar_links,.calendar_header,.calendar { - clear: both; - float: left; - color: #fff; -} - -.calendar_control { - background: #400; -} - -.calendar_links { - background: #000; -} - -.calendar_control,.calendar_links { - font-weight: bold; - font-size: 80%; - letter-spacing: 1px; -} - -.calendar_links label { /* disabled links */ - padding: 2px 5px; - color: #888; -} - -.calendar_clear,.calendar_prev { - float: left; -} - -.calendar_current { - float: left; - width: 35%; - text-align: center; -} - -.calendar_close,.calendar_next { - float: right; -} - -.calendar_header { - background: #333; - text-align: center; - font-weight: bold; -} - -.calendar_header select { - background: #333; - color: #fff; - border: 0px; - font-weight: bold; -} - -.calendar { - background: #ccc; - text-align: center; - font-size: 100%; -} - -.calendar a { - display: block; - width: 100%; -} - -.calendar .calendar_titleRow { - background: #777; -} - -.calendar .calendar_daysRow { - background: #eee; - color: #666; -} - -.calendar .calendar_daysCell { - color: #000; - border: 1px solid #ddd; -} - -#calendar .calendar_daysCell a { - display: block; -} - -.calendar .calendar_weekEndCell { - background: #ddd; -} - -.calendar .calendar_daysCellOver { - background: #fff; - border: 1px solid #777; -} - -.calendar .calendar_unselectable { - color: #888; -} - -/* ________ CALENDAR LINKS _______ - -** Reset link properties and then override them with !important */ -#calendar_div a,.calendar_inline a { - cursor: pointer; - margin: 0; - padding: 0; - background: none; - color: #000; -} - -.calendar_inline .calendar_links a { - padding: 0 5px !important; -} - -.calendar_control a,.calendar_links a { - padding: 2px 5px !important; - color: #eee !important; -} - -.calendar_titleRow a { - color: #eee !important; -} - -.calendar_control a:hover { - background: #fdd !important; - color: #333 !important; -} - -.calendar_links a:hover,.calendar_titleRow a:hover { - background: #ddd !important; - color: #333 !important; -} - -/* ___________ IE6 IFRAME FIX ________ */ -.calendar_cover { - display: none; /*sorry for IE5*/ - display /**/: block; /*sorry for IE5*/ - position: absolute; /*must have*/ - z-index: -1; /*must have*/ - filter: mask(); /*must have*/ - top: -4px; /*must have*/ - left: -4px; /*must have*/ - width: 193px; /*must have to match width and borders*/ - height: 200px; /*must have to match maximum height*/ -} diff --git a/libs/jquery/jquery-calendar.js b/libs/jquery/jquery-calendar.js deleted file mode 100644 index 6b80456d29..0000000000 --- a/libs/jquery/jquery-calendar.js +++ /dev/null @@ -1,72 +0,0 @@ - -function PopUpCal(){this._nextId=0;this._inst=[];this._curInst=null;this._disabledInputs=[];this._popUpShowing=false;this._inDialog=false;this.regional=[];this.regional['']={clearText:'Clear',closeText:'Close',prevText:'<Prev',nextText:'Next>',currentText:'Today',dayNames:['Su','Mo','Tu','We','Th','Fr','Sa'],monthNames:['January','February','March','April','May','June','July','August','September','October','November','December'],dateFormat:'DMY/'};this._defaults={autoPopUp:'focus',appendText:'',buttonText:'...',buttonImage:'',buttonImageOnly:false,closeAtTop:true,hideIfNoPrevNext:false,changeMonth:true,changeYear:true,yearRange:'-10:+10',firstDay:0,changeFirstDay:true,showOtherMonths:false,minDate:null,maxDate:null,speed:'medium',customDate:null,fieldSettings:null,onSelect:null};$.extend(this._defaults,this.regional['']);this._calendarDiv=$('<div id="calendar_div"></div>');$(document.body).append(this._calendarDiv);$(document.body).mousedown(this._checkExternalClick);} -$.extend(PopUpCal.prototype,{_register:function(inst){var id=this._nextId++;this._inst[id]=inst;return id;},_getInst:function(id){return this._inst[id]||id;},setDefaults:function(settings){$.extend(this._defaults,settings||{});},_doKeyDown:function(e){var inst=popUpCal._getInst(this._calId);if(popUpCal._popUpShowing){switch(e.keyCode){case 9:popUpCal.hideCalendar(inst,'');break;case 13:popUpCal._selectDate(inst);break;case 27:popUpCal.hideCalendar(inst,inst._get('speed'));break;case 33:popUpCal._adjustDate(inst,-1,(e.ctrlKey?'Y':'M'));break;case 34:popUpCal._adjustDate(inst,+1,(e.ctrlKey?'Y':'M'));break;case 35:if(e.ctrlKey)popUpCal._clearDate(inst);break;case 36:if(e.ctrlKey)popUpCal._gotoToday(inst);break;case 37:if(e.ctrlKey)popUpCal._adjustDate(inst,-1,'D');break;case 38:if(e.ctrlKey)popUpCal._adjustDate(inst,-7,'D');break;case 39:if(e.ctrlKey)popUpCal._adjustDate(inst,+1,'D');break;case 40:if(e.ctrlKey)popUpCal._adjustDate(inst,+7,'D');break;}} -else if(e.keyCode==36&&e.ctrlKey){popUpCal.showFor(this);}},_doKeyPress:function(e){var inst=popUpCal._getInst(this._calId);var chr=String.fromCharCode(e.charCode==undefined?e.keyCode:e.charCode);return(chr<' '||chr==inst._get('dateFormat').charAt(3)||(chr>='0'&&chr<='9'));},_connectCalendar:function(target,inst){var $input=$(target);var appendText=inst._get('appendText');if(appendText){$input.after('<span class="calendar_append">'+appendText+'</span>');} -var autoPopUp=inst._get('autoPopUp');if(autoPopUp=='focus'||autoPopUp=='both'){$input.focus(this.showFor);} -if(autoPopUp=='button'||autoPopUp=='both'){var buttonText=inst._get('buttonText');var buttonImage=inst._get('buttonImage');var buttonImageOnly=inst._get('buttonImageOnly');var trigger=$(buttonImageOnly?'<img class="calendar_trigger" src="'+ -buttonImage+'" alt="'+buttonText+'" title="'+buttonText+'"/>':'<button type="button" class="calendar_trigger">'+(buttonImage!=''?'<img src="'+buttonImage+'" alt="'+buttonText+'" title="'+buttonText+'"/>':buttonText)+'</button>');$input.wrap('<span class="calendar_wrap"></span>').after(trigger);trigger.click(this.showFor);} -$input.keydown(this._doKeyDown).keypress(this._doKeyPress);$input[0]._calId=inst._id;},_inlineCalendar:function(target,inst,defaultDate){$(target).append(inst._calendarDiv);target._calId=inst._id;var date=defaultDate;inst._selectedDay=date.getDate();inst._selectedMonth=date.getMonth();inst._selectedYear=date.getFullYear();popUpCal._adjustDate(inst);},dialogCalendar:function(dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){inst=this._dialogInst=new PopUpCalInstance({},false);this._dialogInput=$('<input type="text" size="1" style="position: absolute; top: -100px;"/>');this._dialogInput.keydown(this._doKeyDown);$('body').append(this._dialogInput);this._dialogInput[0]._calId=inst._id;} -$.extend(inst._settings,settings||{});this._dialogInput.val(dateText);if(self.innerHeight){windowWidth=self.innerWidth;windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight;}else if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight;} -this._pos=pos||[(windowWidth/2)-100,(windowHeight/2)-100];this._dialogInput.css('left',this._pos[0]+'px').css('top',this._pos[1]+'px');inst._settings.onSelect=onSelect;this._inDialog=true;this._calendarDiv.addClass('calendar_dialog');this.showFor(this._dialogInput[0]);if($.blockUI){$.blockUI(this._calendarDiv);}},enableFor:function(inputs){inputs=(inputs.jquery?inputs:$(inputs));inputs.each(function(){this.disabled=false;$('../button.calendar_trigger',this).each(function(){this.disabled=false;});$('../img.calendar_trigger',this).css({opacity:'1.0',cursor:''});var $this=this;popUpCal._disabledInputs=$.map(popUpCal._disabledInputs,function(value){return(value==$this?null:value);});});},disableFor:function(inputs){inputs=(inputs.jquery?inputs:$(inputs));inputs.each(function(){this.disabled=true;$('../button.calendar_trigger',this).each(function(){this.disabled=true;});$('../img.calendar_trigger',this).css({opacity:'0.5',cursor:'default'});var $this=this;popUpCal._disabledInputs=$.map(popUpCal._disabledInputs,function(value){return(value==$this?null:value);});popUpCal._disabledInputs[popUpCal._disabledInputs.length]=this;});},reconfigureFor:function(control,settings){var inst=this._getInst(control._calId);if(inst){$.extend(inst._settings,settings||{});this._updateCalendar(inst);}},setDateFor:function(control,date){var inst=this._getInst(control._calId);if(inst){inst._setDate(date);}},getDateFor:function(control){var inst=this._getInst(control._calId);return(inst?inst._getDate():null);},showFor:function(target){var input=(target.nodeName&&target.nodeName.toLowerCase()=='input'?target:this);if(input.nodeName.toLowerCase()!='input'){input=$('input',input.parentNode)[0];} -if(popUpCal._lastInput==input){return;} -for(var i=0;i<popUpCal._disabledInputs.length;i++){if(popUpCal._disabledInputs[i]==input){return;}} -var inst=popUpCal._getInst(input._calId);popUpCal.hideCalendar(inst,'');popUpCal._lastInput=input;inst._setDateFromField(input);if(popUpCal._inDialog){input.value='';} -if(!popUpCal._pos){popUpCal._pos=popUpCal._findPos(input);popUpCal._pos[1]+=input.offsetHeight;} -inst._calendarDiv.css('position',(popUpCal._inDialog&&$.blockUI?'static':'absolute')).css('left',popUpCal._pos[0]+'px').css('top',popUpCal._pos[1]+'px');popUpCal._pos=null;var fieldSettings=inst._get('fieldSettings');$.extend(inst._settings,(fieldSettings?fieldSettings(input):{}));popUpCal._showCalendar(inst);},_showCalendar:function(id){var inst=this._getInst(id);popUpCal._updateCalendar(inst);if(!inst._inline){var speed=inst._get('speed');inst._calendarDiv.show(speed,function(){popUpCal._popUpShowing=true;popUpCal._afterShow(inst);});if(speed==''){popUpCal._popUpShowing=true;popUpCal._afterShow(inst);} -if(inst._input[0].type!='hidden'){inst._input[0].focus();} -this._curInst=inst;}},_updateCalendar:function(inst){inst._calendarDiv.empty().append(inst._generateCalendar());if(inst._input&&inst._input!='hidden'){inst._input[0].focus();}},_afterShow:function(inst){if($.browser.msie){$('#calendar_cover').css({width:inst._calendarDiv[0].offsetWidth+4,height:inst._calendarDiv[0].offsetHeight+4});}},hideCalendar:function(id,speed){var inst=this._getInst(id);if(popUpCal._popUpShowing){speed=(speed!=null?speed:inst._get('speed'));inst._calendarDiv.hide(speed,function(){popUpCal._tidyDialog(inst);});if(speed==''){popUpCal._tidyDialog(inst);} -popUpCal._popUpShowing=false;popUpCal._lastInput=null;inst._settings.prompt=null;if(popUpCal._inDialog){popUpCal._dialogInput.css('position','absolute').css('left','0px').css('top','-100px');if($.blockUI){$.unblockUI();$('body').append(this._calendarDiv);}} -popUpCal._inDialog=false;} -popUpCal._curInst=null;},_tidyDialog:function(inst){inst._calendarDiv.removeClass('calendar_dialog');$('.calendar_prompt',inst._calendarDiv).remove();},_checkExternalClick:function(event){if(!popUpCal._curInst){return;} -var target=$(event.target);if((target.parents("#calendar_div").length==0)&&(target.attr('class')!='calendar_trigger')&&popUpCal._popUpShowing&&!(popUpCal._inDialog&&$.blockUI)) -{popUpCal.hideCalendar(popUpCal._curInst,'');}},_adjustDate:function(id,offset,period){var inst=this._getInst(id);inst._adjustDate(offset,period);this._updateCalendar(inst);},_gotoToday:function(id){var date=new Date();var inst=this._getInst(id);inst._selectedDay=date.getDate();inst._selectedMonth=date.getMonth();inst._selectedYear=date.getFullYear();this._adjustDate(inst);},_selectMonthYear:function(id,select,period){var inst=this._getInst(id);inst._selectingMonthYear=false;inst[period=='M'?'_selectedMonth':'_selectedYear']=select.options[select.selectedIndex].value-0;this._adjustDate(inst);},_clickMonthYear:function(id){var inst=this._getInst(id);if(inst._input&&inst._selectingMonthYear&&!$.browser.msie){inst._input[0].focus();} -inst._selectingMonthYear=!inst._selectingMonthYear;},_changeFirstDay:function(id,a){var inst=this._getInst(id);var dayNames=inst._get('dayNames');var value=a.firstChild.nodeValue;for(var i=0;i<7;i++){if(dayNames[i]==value){inst._settings.firstDay=i;break;}} -this._updateCalendar(inst);},_selectDay:function(id,td){var inst=this._getInst(id);inst._selectedDay=$("a",td).html();this._selectDate(id);},_clearDate:function(id){this._selectDate(id,'');},_selectDate:function(id,dateStr){var inst=this._getInst(id);dateStr=(dateStr!=null?dateStr:inst._formatDate());if(inst._input){inst._input.val(dateStr);} -var onSelect=inst._get('onSelect');if(onSelect){onSelect(dateStr);} -else{inst._input.trigger('change');} -if(inst._inline){this._updateCalendar(inst);} -else{this.hideCalendar(inst,inst._get('speed'));}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),''];},_findPos:function(obj){if(obj.type=='hidden'){obj=obj.nextSibling;} -var curleft=curtop=0;if(obj.offsetParent){curleft=obj.offsetLeft;curtop=obj.offsetTop;while(obj=obj.offsetParent){var origcurleft=curleft;curleft+=obj.offsetLeft;if(curleft<0){curleft=origcurleft;} -curtop+=obj.offsetTop;}} -return[curleft,curtop];}});function PopUpCalInstance(settings,inline,defaultDate){this._id=popUpCal._register(this);this._selectedDay=0;this._selectedMonth=0;this._selectedYear=0;this._input=null;this._inline=inline;this._calendarDiv=(!inline?popUpCal._calendarDiv:$('<div id="calendar_div_'+this._id+'" class="calendar_inline"></div>'));if(inline){var date=defaultDate;this._currentDate=defaultDate;this._currentDay=date.getDate();this._currentMonth=date.getMonth();this._currentYear=date.getFullYear();} -this._settings=$.extend({},settings||{});} -$.extend(PopUpCalInstance.prototype,{_get:function(name){return(this._settings[name]!=null?this._settings[name]:popUpCal._defaults[name]);},_setDateFromField:function(input){this._input=$(input);var dateFormat=this._get('dateFormat');var currentDate=this._input.val().split(dateFormat.charAt(3));if(currentDate.length==3){this._currentDay=parseInt(currentDate[dateFormat.indexOf('D')],10);this._currentMonth=parseInt(currentDate[dateFormat.indexOf('M')],10)-1;this._currentYear=parseInt(currentDate[dateFormat.indexOf('Y')],10);} -else{var date=new Date();this._currentDay=date.getDate();this._currentMonth=date.getMonth();this._currentYear=date.getFullYear();} -this._selectedDay=this._currentDay;this._selectedMonth=this._currentMonth;this._selectedYear=this._currentYear;this._adjustDate();},_setDate:function(date){this._selectedDay=this._currentDay=date.getDate();this._selectedMonth=this._currentMonth=date.getMonth();this._selectedYear=this._currentYear=date.getFullYear();this._adjustDate();},_getDate:function(){return new Date(this._currentYear,this._currentMonth,this._currentDay);},_generateCalendar:function(){var today=this._currentDate;today=new Date(today.getFullYear(),today.getMonth(),today.getDate());var controls='<div class="calendar_control">'+'<a class="calendar_clear" onclick="popUpCal._clearDate('+this._id+');">'+ -this._get('clearText')+'</a>'+'<a class="calendar_close" onclick="popUpCal.hideCalendar('+this._id+');">'+ -this._get('closeText')+'</a></div>';var prompt=this._get('prompt');var closeAtTop=this._get('closeAtTop');var hideIfNoPrevNext=this._get('hideIfNoPrevNext');var html=(prompt?'<div class="calendar_prompt">'+prompt+'</div>':'')+ -(closeAtTop&&!this._inline?controls:'')+'<div class="calendar_links">'+ -(this._canAdjustMonth(-1)?'<a class="calendar_prev" '+'onclick="popUpCal._adjustDate('+this._id+', -1, \'M\');">'+this._get('prevText')+'</a>':(hideIfNoPrevNext?'':'<label class="calendar_prev">'+this._get('prevText')+'</label>'))+ -(this._isInRange(today)?'<a class="calendar_current" '+'onclick="popUpCal._gotoToday('+this._id+');">'+this._get('currentText')+'</a>':'')+ -(this._canAdjustMonth(+1)?'<a class="calendar_next" '+'onclick="popUpCal._adjustDate('+this._id+', +1, \'M\');">'+this._get('nextText')+'</a>':(hideIfNoPrevNext?'':'<label class="calendar_next">'+this._get('nextText')+'</label>'))+'</div><div class="calendar_header">';var minDate=this._get('minDate');var maxDate=this._get('maxDate');var monthNames=this._get('monthNames');if(!this._get('changeMonth')){html+=monthNames[this._selectedMonth]+' ';} -else{var inMinYear=(minDate&&minDate.getFullYear()==this._selectedYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==this._selectedYear);html+='<select class="calendar_newMonth" '+'onchange="popUpCal._selectMonthYear('+this._id+', this, \'M\');" '+'onclick="popUpCal._clickMonthYear('+this._id+');">';for(var month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){html+='<option value="'+month+'"'+ -(month==this._selectedMonth?' selected="selected"':'')+'>'+monthNames[month]+'</option>';}} -html+='</select>';} -if(!this._get('changeYear')){html+=this._selectedYear;} -else{var years=this._get('yearRange').split(':');var year=0;var endYear=0;if(years.length!=2){year=this._selectedYear-10;endYear=this._selectedYear+10;} -else if(years[0].charAt(0)=='+'||years[0].charAt(0)=='-'){year=this._selectedYear+parseInt(years[0],10);endYear=this._selectedYear+parseInt(years[1],10);} -else{year=parseInt(years[0],10);endYear=parseInt(years[1],10);} -year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='<select class="calendar_newYear" onchange="popUpCal._selectMonthYear('+ -this._id+', this, \'Y\');" '+'onclick="popUpCal._clickMonthYear('+ -this._id+');">';for(;year<=endYear;year++){html+='<option value="'+year+'"'+ -(year==this._selectedYear?' selected="selected"':'')+'>'+year+'</option>';} -html+='</select>';} -html+='</div><table class="calendar" cellpadding="0" cellspacing="0"><thead>'+'<tr class="calendar_titleRow">';var firstDay=this._get('firstDay');var changeFirstDay=this._get('changeFirstDay');var dayNames=this._get('dayNames');for(var dow=0;dow<7;dow++){html+='<td>'+(!changeFirstDay?'':'<a onclick="popUpCal._changeFirstDay('+ -this._id+', this);">')+dayNames[(dow+firstDay)%7]+ -(changeFirstDay?'</a>':'')+'</td>';} -html+='</tr></thead><tbody>';var daysInMonth=this._getDaysInMonth(this._selectedYear,this._selectedMonth);this._selectedDay=Math.min(this._selectedDay,daysInMonth);var leadDays=(this._getFirstDayOfMonth(this._selectedYear,this._selectedMonth)-firstDay+7)%7;var currentDate=new Date(this._currentYear,this._currentMonth,this._currentDay);var selectedDate=new Date(this._selectedYear,this._selectedMonth,this._selectedDay);var printDate=new Date(this._selectedYear,this._selectedMonth,1-leadDays);var numRows=Math.ceil((leadDays+daysInMonth)/7);var customDate=this._get('customDate');var showOtherMonths=this._get('showOtherMonths');for(var row=0;row<numRows;row++){html+='<tr class="calendar_daysRow">';for(var dow=0;dow<7;dow++){var customSettings=(customDate?customDate(printDate):[true,'']);var otherMonth=(printDate.getMonth()!=this._selectedMonth);var unselectable=otherMonth||!customSettings[0]||(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);html+='<td class="calendar_daysCell'+ -((dow+firstDay+6)%7>=5?' calendar_weekEndCell':'')+ -(otherMonth?' calendar_otherMonth':'')+ -(unselectable?' calendar_unselectable':'')+ -(!otherMonth||showOtherMonths?' '+customSettings[1]:'')+ -(printDate.getTime()==currentDate.getTime()?' calendar_currentDay':(printDate.getTime()==today.getTime()?' calendar_today':''))+'"'+ -(unselectable?'':' onmouseover="$(this).addClass(\'calendar_daysCellOver\');"'+' onmouseout="$(this).removeClass(\'calendar_daysCellOver\');"'+' onclick="popUpCal._selectDay('+this._id+', this);"')+'>'+ -(otherMonth?(showOtherMonths?printDate.getDate():' '):(unselectable?printDate.getDate():'<a>'+printDate.getDate()+'</a>'))+'</td>';printDate.setDate(printDate.getDate()+1);} -html+='</tr>';} -html+='</tbody></table>'+(!closeAtTop&&!this._inline?controls:'')+'<div style="clear: both;"></div>'+(!$.browser.msie?'':'<!--[if lte IE 6.5]><iframe src="javascript:false;" class="calendar_cover"></iframe><![endif]-->');return html;},_adjustDate:function(offset,period){var date=new Date(this._selectedYear+(period=='Y'?offset:0),this._selectedMonth+(period=='M'?offset:0),this._selectedDay+(period=='D'?offset:0));var minDate=this._get('minDate');var maxDate=this._get('maxDate');date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);this._selectedDay=date.getDate();this._selectedMonth=date.getMonth();this._selectedYear=date.getFullYear();},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate();},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay();},_canAdjustMonth:function(offset){var date=new Date(this._selectedYear,this._selectedMonth+offset,1);if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()));} -return this._isInRange(date);},_isInRange:function(date){var minDate=this._get('minDate');var maxDate=this._get('maxDate');return((!minDate||date>=minDate)&&(!maxDate||date<=maxDate));},_formatDate:function(){var day=this._currentDay=this._selectedDay;var month=this._currentMonth=this._selectedMonth;var year=this._currentYear=this._selectedYear;month++;var dateFormat=this._get('dateFormat');var dateString='';for(var i=0;i<3;i++){dateString+=dateFormat.charAt(3)+ -(dateFormat.charAt(i)=='D'?(day<10?'0':'')+day:(dateFormat.charAt(i)=='M'?(month<10?'0':'')+month:(dateFormat.charAt(i)=='Y'?year:'?')));} -return dateString.substring(dateFormat.charAt(3)?1:0);}});$.fn.calendar=function(settings,defaultDate){return this.each(function(){var inlineSettings=null;for(attrName in popUpCal._defaults){var attrValue=this.getAttribute('cal:'+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue);} -catch(err){inlineSettings[attrName]=attrValue;}}} -var nodeName=this.nodeName.toLowerCase();if(nodeName=='input'){var instSettings=(inlineSettings?$.extend($.extend({},settings||{}),inlineSettings||{}):settings);var inst=(inst&&!inlineSettings?inst:new PopUpCalInstance(instSettings,false,defaultDate));popUpCal._connectCalendar(this,inst);} -else if(nodeName=='div'||nodeName=='span'){var instSettings=$.extend($.extend({},settings||{}),inlineSettings||{});var inst=new PopUpCalInstance(instSettings,true,defaultDate);popUpCal._inlineCalendar(this,inst,defaultDate);}});};$(document).ready(function(){popUpCal=new PopUpCal();}); diff --git a/libs/jquery/original lib/jquery-calendar.js b/libs/jquery/original lib/jquery-calendar.js deleted file mode 100644 index e7100e2d93..0000000000 --- a/libs/jquery/original lib/jquery-calendar.js +++ /dev/null @@ -1,814 +0,0 @@ -/* jQuery Calendar v2.7 - Written by Marc Grabanski (m@marcgrabanski.com) and enhanced by Keith Wood (kbwood@iprimus.com.au). - - Copyright (c) 2007 Marc Grabanski (http://marcgrabanski.com/code/jquery-calendar) - Dual licensed under the GPL (http://www.gnu.org/licenses/gpl-3.0.txt) and - CC (http://creativecommons.org/licenses/by/3.0/) licenses. "Share or Remix it but please Attribute the authors." - Date: 09-03-2007 */ - -/* PopUp Calendar manager. - Use the singleton instance of this class, popUpCal, to interact with the calendar. - Settings for (groups of) calendars are maintained in an instance object - (PopUpCalInstance), allowing multiple different settings on the same page. */ -function PopUpCal() { - this._nextId = 0; // Next ID for a calendar instance - this._inst = []; // List of instances indexed by ID - this._curInst = null; // The current instance in use - this._disabledInputs = []; // List of calendar inputs that have been disabled - this._popUpShowing = false; // True if the popup calendar is showing , false if not - this._inDialog = false; // True if showing within a "dialog", false if not - this.regional = []; // Available regional settings, indexed by language code - this.regional[''] = { // Default regional settings - clearText: 'Clear', // Display text for clear link - closeText: 'Close', // Display text for close link - prevText: '<Prev', // Display text for previous month link - nextText: 'Next>', // Display text for next month link - currentText: 'Today', // Display text for current month link - dayNames: ['Su','Mo','Tu','We','Th','Fr','Sa'], // Names of days starting at Sunday - monthNames: ['January','February','March','April','May','June', - 'July','August','September','October','November','December'], // Names of months - dateFormat: 'DMY/' // First three are day, month, year in the required order, - // fourth (optional) is the separator, e.g. US would be 'MDY/', ISO would be 'YMD-' - }; - this._defaults = { // Global defaults for all the calendar instances - autoPopUp: 'focus', // 'focus' for popup on focus, - // 'button' for trigger button, or 'both' for either - appendText: '', // Display text following the input box, e.g. showing the format - buttonText: '...', // Text for trigger button - buttonImage: '', // URL for trigger button image - buttonImageOnly: false, // True if the image appears alone, false if it appears on a button - closeAtTop: true, // True to have the clear/close at the top, - // false to have them at the bottom - hideIfNoPrevNext: false, // True to hide next/previous month links - // if not applicable, false to just disable them - changeMonth: true, // True if month can be selected directly, false if only prev/next - changeYear: true, // True if year can be selected directly, false if only prev/next - yearRange: '-10:+10', // Range of years to display in drop-down, - // either relative to current year (-nn:+nn) or absolute (nnnn:nnnn) - firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ... - changeFirstDay: true, // True to click on day name to change, false to remain as set - showOtherMonths: false, // True to show dates in other months, false to leave blank - minDate: null, // The earliest selectable date, or null for no limit - maxDate: null, // The latest selectable date, or null for no limit - speed: 'medium', // Speed of display/closure - customDate: null, // Function that takes a date and returns an array with - // [0] = true if selectable, false if not, - // [1] = custom CSS class name(s) or '', e.g. popUpCal.noWeekends - fieldSettings: null, // Function that takes an input field and - // returns a set of custom settings for the calendar - onSelect: null // Define a callback function when a date is selected - }; - $.extend(this._defaults, this.regional['']); - this._calendarDiv = $('<div id="calendar_div"></div>'); - $(document.body).append(this._calendarDiv); - $(document.body).mousedown(this._checkExternalClick); -} - -$.extend(PopUpCal.prototype, { - /* Register a new calendar instance - with custom settings. */ - _register: function(inst) { - var id = this._nextId++; - this._inst[id] = inst; - return id; - }, - - /* Retrieve a particular calendar instance based on its ID. */ - _getInst: function(id) { - return this._inst[id] || id; - }, - - /* Override the default settings for all instances of the calendar. - @param settings object - the new settings to use as defaults (anonymous object) - @return void */ - setDefaults: function(settings) { - $.extend(this._defaults, settings || {}); - }, - - /* Handle keystrokes. */ - _doKeyDown: function(e) { - var inst = popUpCal._getInst(this._calId); - if (popUpCal._popUpShowing) { - switch (e.keyCode) { - case 9: popUpCal.hideCalendar(inst, ''); - break; // hide on tab out - case 13: popUpCal._selectDate(inst); - break; // select the value on enter - case 27: popUpCal.hideCalendar(inst, inst._get('speed')); - break; // hide on escape - case 33: popUpCal._adjustDate(inst, -1, (e.ctrlKey ? 'Y' : 'M')); - break; // previous month/year on page up/+ ctrl - case 34: popUpCal._adjustDate(inst, +1, (e.ctrlKey ? 'Y' : 'M')); - break; // next month/year on page down/+ ctrl - case 35: if (e.ctrlKey) popUpCal._clearDate(inst); - break; // clear on ctrl+end - case 36: if (e.ctrlKey) popUpCal._gotoToday(inst); - break; // current on ctrl+home - case 37: if (e.ctrlKey) popUpCal._adjustDate(inst, -1, 'D'); - break; // -1 day on ctrl+left - case 38: if (e.ctrlKey) popUpCal._adjustDate(inst, -7, 'D'); - break; // -1 week on ctrl+up - case 39: if (e.ctrlKey) popUpCal._adjustDate(inst, +1, 'D'); - break; // +1 day on ctrl+right - case 40: if (e.ctrlKey) popUpCal._adjustDate(inst, +7, 'D'); - break; // +1 week on ctrl+down - } - } - else if (e.keyCode == 36 && e.ctrlKey) { // display the calendar on ctrl+home - popUpCal.showFor(this); - } - }, - - /* Filter entered characters. */ - _doKeyPress: function(e) { - var inst = popUpCal._getInst(this._calId); - var chr = String.fromCharCode(e.charCode == undefined ? e.keyCode : e.charCode); - return (chr < ' ' || chr == inst._get('dateFormat').charAt(3) || - (chr >= '0' && chr <= '9')); // only allow numbers and separator - }, - - /* Attach the calendar to an input field. */ - _connectCalendar: function(target, inst) { - var $input = $(target); - var appendText = inst._get('appendText'); - if (appendText) { - $input.after('<span class="calendar_append">' + appendText + '</span>'); - } - var autoPopUp = inst._get('autoPopUp'); - if (autoPopUp == 'focus' || autoPopUp == 'both') { // pop-up calendar when in the marked field - $input.focus(this.showFor); - } - if (autoPopUp == 'button' || autoPopUp == 'both') { // pop-up calendar when button clicked - var buttonText = inst._get('buttonText'); - var buttonImage = inst._get('buttonImage'); - var buttonImageOnly = inst._get('buttonImageOnly'); - var trigger = $(buttonImageOnly ? '<img class="calendar_trigger" src="' + - buttonImage + '" alt="' + buttonText + '" title="' + buttonText + '"/>' : - '<button type="button" class="calendar_trigger">' + (buttonImage != '' ? - '<img src="' + buttonImage + '" alt="' + buttonText + '" title="' + buttonText + '"/>' : - buttonText) + '</button>'); - $input.wrap('<span class="calendar_wrap"></span>').after(trigger); - trigger.click(this.showFor); - } - $input.keydown(this._doKeyDown).keypress(this._doKeyPress); - $input[0]._calId = inst._id; - }, - - /* Attach an inline calendar to a div. */ - _inlineCalendar: function(target, inst, defaultDate) { - $(target).append(inst._calendarDiv); - target._calId = inst._id; - var date = defaultDate; - inst._selectedDay = date.getDate(); - inst._selectedMonth = date.getMonth(); - inst._selectedYear = date.getFullYear(); - popUpCal._adjustDate(inst); - }, - - /* Pop-up the calendar in a "dialog" box. - @param dateText string - the initial date to display (in the current format) - @param onSelect function - the function(dateText) to call when a date is selected - @param settings object - update the dialog calendar instance's settings (anonymous object) - @param pos int[2] - coordinates for the dialog's position within the screen - leave empty for default (screen centre) - @return void */ - dialogCalendar: function(dateText, onSelect, settings, pos) { - var inst = this._dialogInst; // internal instance - if (!inst) { - inst = this._dialogInst = new PopUpCalInstance({}, false); - this._dialogInput = $('<input type="text" size="1" style="position: absolute; top: -100px;"/>'); - this._dialogInput.keydown(this._doKeyDown); - $('body').append(this._dialogInput); - this._dialogInput[0]._calId = inst._id; - } - $.extend(inst._settings, settings || {}); - this._dialogInput.val(dateText); - - /* Cross Browser Positioning */ - if (self.innerHeight) { // all except Explorer - windowWidth = self.innerWidth; - windowHeight = self.innerHeight; - } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode - windowWidth = document.documentElement.clientWidth; - windowHeight = document.documentElement.clientHeight; - } else if (document.body) { // other Explorers - windowWidth = document.body.clientWidth; - windowHeight = document.body.clientHeight; - } - this._pos = pos || // should use actual width/height below - [(windowWidth / 2) - 100, (windowHeight / 2) - 100]; - - // move input on screen for focus, but hidden behind dialog - this._dialogInput.css('left', this._pos[0] + 'px').css('top', this._pos[1] + 'px'); - inst._settings.onSelect = onSelect; - this._inDialog = true; - this._calendarDiv.addClass('calendar_dialog'); - this.showFor(this._dialogInput[0]); - if ($.blockUI) { - $.blockUI(this._calendarDiv); - } - }, - - /* Enable the input field(s) for entry. - @param inputs element/object - single input field or jQuery collection of input fields - @return void */ - enableFor: function(inputs) { - inputs = (inputs.jquery ? inputs : $(inputs)); - inputs.each(function() { - this.disabled = false; - $('../button.calendar_trigger', this).each(function() { this.disabled = false; }); - $('../img.calendar_trigger', -this).css({opacity:'1.0',cursor:''}); - var $this = this; - popUpCal._disabledInputs = $.map(popUpCal._disabledInputs, - function(value) { return (value == $this ? null : value); }); // delete entry - }); - }, - - /* Disable the input field(s) from entry. - @param inputs element/object - single input field or jQuery collection of input fields - @return void */ - disableFor: function(inputs) { - inputs = (inputs.jquery ? inputs : $(inputs)); - inputs.each(function() { - this.disabled = true; - $('../button.calendar_trigger', this).each(function() { this.disabled = true; }); - $('../img.calendar_trigger', this).css({opacity:'0.5',cursor:'default'}); - var $this = this; - popUpCal._disabledInputs = $.map(popUpCal._disabledInputs, - function(value) { return (value == $this ? null : value); }); // delete entry - popUpCal._disabledInputs[popUpCal._disabledInputs.length] = this; - }); - }, - - /* Update the settings for a calendar attached to an input field or division. - @param control element - the input field or div/span attached to the calendar - @param settings object - the new settings to update - @return void */ - reconfigureFor: function(control, settings) { - var inst = this._getInst(control._calId); - if (inst) { - $.extend(inst._settings, settings || {}); - this._updateCalendar(inst); - } - }, - - /* Set the date for a calendar attached to an input field or division. - @param control element - the input field or div/span attached to the calendar - @param date Date - the new date - @return void */ - setDateFor: function(control, date) { - var inst = this._getInst(control._calId); - if (inst) { - inst._setDate(date); - } - }, - - /* Retrieve the date for a calendar attached to an input field or division. - @param control element - the input field or div/span attached to the calendar - @return Date - the current date */ - getDateFor: function(control) { - var inst = this._getInst(control._calId); - return (inst ? inst._getDate() : null); - }, - - /* Pop-up the calendar for a given input field. - @param target element - the input field attached to the calendar - @return void */ - showFor: function(target) { - var input = (target.nodeName && target.nodeName.toLowerCase() == 'input' ? target : this); - if (input.nodeName.toLowerCase() != 'input') { // find from button/image trigger - input = $('input', input.parentNode)[0]; - } - if (popUpCal._lastInput == input) { // already here - return; - } - for (var i = 0; i < popUpCal._disabledInputs.length; i++) { // check not disabled - if (popUpCal._disabledInputs[i] == input) { - return; - } - } - var inst = popUpCal._getInst(input._calId); - popUpCal.hideCalendar(inst, ''); - popUpCal._lastInput = input; - inst._setDateFromField(input); - if (popUpCal._inDialog) { // hide cursor - input.value = ''; - } - if (!popUpCal._pos) { // position below input - popUpCal._pos = popUpCal._findPos(input); - popUpCal._pos[1] += input.offsetHeight; - } - inst._calendarDiv.css('position', (popUpCal._inDialog && $.blockUI ? 'static' : 'absolute')). - css('left', popUpCal._pos[0] + 'px').css('top', popUpCal._pos[1] + 'px'); - popUpCal._pos = null; - var fieldSettings = inst._get('fieldSettings'); - $.extend(inst._settings, (fieldSettings ? fieldSettings(input) : {})); - popUpCal._showCalendar(inst); - }, - - /* Construct and display the calendar. */ - _showCalendar: function(id) { - var inst = this._getInst(id); - popUpCal._updateCalendar(inst); - if (!inst._inline) { - var speed = inst._get('speed'); - inst._calendarDiv.show(speed, function() { - popUpCal._popUpShowing = true; - popUpCal._afterShow(inst); - }); - if (speed == '') { - popUpCal._popUpShowing = true; - popUpCal._afterShow(inst); - } - if (inst._input[0].type != 'hidden') { - inst._input[0].focus(); - } - this._curInst = inst; - } - }, - - /* Generate the calendar content. */ - _updateCalendar: function(inst) { - inst._calendarDiv.empty().append(inst._generateCalendar()); - if (inst._input && inst._input != 'hidden') { - inst._input[0].focus(); - } - }, - - /* Tidy up after displaying the calendar. */ - _afterShow: function(inst) { - if ($.browser.msie) { // fix IE < 7 select problems - $('#calendar_cover').css({width: inst._calendarDiv[0].offsetWidth + 4, - height: inst._calendarDiv[0].offsetHeight + 4}); - } - /*// re-position on screen if necessary - var calDiv = inst._calendarDiv[0]; - var pos = popUpCal._findPos(inst._input[0]); - if ((calDiv.offsetLeft + calDiv.offsetWidth) > - (document.body.clientWidth + document.body.scrollLeft)) { - inst._calendarDiv.css('left', (pos[0] + inst._input[0].offsetWidth - calDiv.offsetWidth) + 'px'); - } - if ((calDiv.offsetTop + calDiv.offsetHeight) > - (document.body.clientHeight + document.body.scrollTop)) { - inst._calendarDiv.css('top', (pos[1] - calDiv.offsetHeight) + 'px'); - }*/ - }, - - /* Hide the calendar from view. - @param id string/object - the ID of the current calendar instance, - or the instance itself - @param speed string - the speed at which to close the calendar - @return void */ - hideCalendar: function(id, speed) { - var inst = this._getInst(id); - if (popUpCal._popUpShowing) { - speed = (speed != null ? speed : inst._get('speed')); - inst._calendarDiv.hide(speed, function() { - popUpCal._tidyDialog(inst); - }); - if (speed == '') { - popUpCal._tidyDialog(inst); - } - popUpCal._popUpShowing = false; - popUpCal._lastInput = null; - inst._settings.prompt = null; - if (popUpCal._inDialog) { - popUpCal._dialogInput.css('position', 'absolute'). - css('left', '0px').css('top', '-100px'); - if ($.blockUI) { - $.unblockUI(); - $('body').append(this._calendarDiv); - } - } - popUpCal._inDialog = false; - } - popUpCal._curInst = null; - }, - - /* Tidy up after a dialog display. */ - _tidyDialog: function(inst) { - inst._calendarDiv.removeClass('calendar_dialog'); - $('.calendar_prompt', inst._calendarDiv).remove(); - }, - - /* Close calendar if clicked elsewhere. */ - _checkExternalClick: function(event) { - if (!popUpCal._curInst) { - return; - } - var target = $(event.target); - if( (target.parents("#calendar_div").length == 0) - && (target.attr('class') != 'calendar_trigger') - && popUpCal._popUpShowing - && !(popUpCal._inDialog && $.blockUI) ) - { - popUpCal.hideCalendar(popUpCal._curInst, ''); - } - }, - - /* Adjust one of the date sub-fields. */ - _adjustDate: function(id, offset, period) { - var inst = this._getInst(id); - inst._adjustDate(offset, period); - this._updateCalendar(inst); - }, - - /* Action for current link. */ - _gotoToday: function(id) { - var date = new Date(); - var inst = this._getInst(id); - inst._selectedDay = date.getDate(); - inst._selectedMonth = date.getMonth(); - inst._selectedYear = date.getFullYear(); - this._adjustDate(inst); - }, - - /* Action for selecting a new month/year. */ - _selectMonthYear: function(id, select, period) { - var inst = this._getInst(id); - inst._selectingMonthYear = false; - inst[period == 'M' ? '_selectedMonth' : '_selectedYear'] = - select.options[select.selectedIndex].value - 0; - this._adjustDate(inst); - }, - - /* Restore input focus after not changing month/year. */ - _clickMonthYear: function(id) { - var inst = this._getInst(id); - if (inst._input && inst._selectingMonthYear && !$.browser.msie) { - inst._input[0].focus(); - } - inst._selectingMonthYear = !inst._selectingMonthYear; - }, - - /* Action for changing the first week day. */ - _changeFirstDay: function(id, a) { - var inst = this._getInst(id); - var dayNames = inst._get('dayNames'); - var value = a.firstChild.nodeValue; - for (var i = 0; i < 7; i++) { - if (dayNames[i] == value) { - inst._settings.firstDay = i; - break; - } - } - this._updateCalendar(inst); - }, - - /* Action for selecting a day. */ - _selectDay: function(id, td) { - var inst = this._getInst(id); - inst._selectedDay = $("a", td).html(); - this._selectDate(id); - }, - - /* Erase the input field and hide the calendar. */ - _clearDate: function(id) { - this._selectDate(id, ''); - }, - - /* Update the input field with the selected date. */ - _selectDate: function(id, dateStr) { - var inst = this._getInst(id); - dateStr = (dateStr != null ? dateStr : inst._formatDate()); - if (inst._input) { - inst._input.val(dateStr); - } - var onSelect = inst._get('onSelect'); - if (onSelect) { - onSelect(dateStr); // trigger custom callback - } - else { - inst._input.trigger('change'); // fire the change event - } - if (inst._inline) { - this._updateCalendar(inst); - } - else { - this.hideCalendar(inst, inst._get('speed')); - } - }, - - /* Set as customDate function to prevent selection of weekends. - @param date Date - the date to customise - @return [boolean, string] - is this date selectable?, what is its CSS class? */ - noWeekends: function(date) { - var day = date.getDay(); - return [(day > 0 && day < 6), '']; - }, - - /* Find an object's position on the screen. */ - _findPos: function(obj) { - if (obj.type == 'hidden') { - obj = obj.nextSibling; - } - var curleft = curtop = 0; - if (obj.offsetParent) { - curleft = obj.offsetLeft; - curtop = obj.offsetTop; - while (obj = obj.offsetParent) { - var origcurleft = curleft; - curleft += obj.offsetLeft; - if (curleft < 0) { - curleft = origcurleft; - } - curtop += obj.offsetTop; - } - } - return [curleft,curtop]; - } -}); - -/* Individualised settings for calendars applied to one or more related inputs. - Instances are managed and manipulated through the PopUpCal manager. */ -function PopUpCalInstance(settings, inline, defaultDate) { - this._id = popUpCal._register(this); - this._selectedDay = 0; - this._selectedMonth = 0; // 0-11 - this._selectedYear = 0; // 4-digit year - this._input = null; // The attached input field - this._inline = inline; // True if showing inline, false if used in a popup - this._calendarDiv = (!inline ? popUpCal._calendarDiv : - $('<div id="calendar_div_' + this._id + '" class="calendar_inline"></div>')); - if (inline) { - var date = defaultDate; - this._currentDate = defaultDate; - this._currentDay = date.getDate(); - this._currentMonth = date.getMonth(); - this._currentYear = date.getFullYear(); - } - // customise the calendar object - uses manager defaults if not overridden - this._settings = $.extend({}, settings || {}); // clone -} - -$.extend(PopUpCalInstance.prototype, { - /* Get a setting value, defaulting if necessary. */ - _get: function(name) { - return (this._settings[name] != null ? this._settings[name] : popUpCal._defaults[name]); - }, - - /* Parse existing date and initialise calendar. */ - _setDateFromField: function(input) { - this._input = $(input); - var dateFormat = this._get('dateFormat'); - var currentDate = this._input.val().split(dateFormat.charAt(3)); - if (currentDate.length == 3) { - this._currentDay = parseInt(currentDate[dateFormat.indexOf('D')], 10); - this._currentMonth = parseInt(currentDate[dateFormat.indexOf('M')], 10) - 1; - this._currentYear = parseInt(currentDate[dateFormat.indexOf('Y')], 10); - } - else { - var date = new Date(); - this._currentDay = date.getDate(); - this._currentMonth = date.getMonth(); - this._currentYear = date.getFullYear(); - } - this._selectedDay = this._currentDay; - this._selectedMonth = this._currentMonth; - this._selectedYear = this._currentYear; - this._adjustDate(); - }, - - /* Set the date directly. */ - _setDate: function(date) { - this._selectedDay = this._currentDay = date.getDate(); - this._selectedMonth = this._currentMonth = date.getMonth(); - this._selectedYear = this._currentYear = date.getFullYear(); - this._adjustDate(); - }, - - /* Retrieve the date directly. */ - _getDate: function() { - return new Date(this._currentYear, this._currentMonth, this._currentDay); - }, - - /* Generate the HTML for the current state of the calendar. */ - _generateCalendar: function() { - var today = this._currentDate; - today = new Date(today.getFullYear(), today.getMonth(), today.getDate()); // clear time - // build the calendar HTML - var controls = '<div class="calendar_control">' + - '<a class="calendar_clear" onclick="popUpCal._clearDate(' + this._id + ');">' + - this._get('clearText') + '</a>' + - '<a class="calendar_close" onclick="popUpCal.hideCalendar(' + this._id + ');">' + - this._get('closeText') + '</a></div>'; - var prompt = this._get('prompt'); - var closeAtTop = this._get('closeAtTop'); - var hideIfNoPrevNext = this._get('hideIfNoPrevNext'); - // controls and links - var html = (prompt ? '<div class="calendar_prompt">' + prompt + '</div>' : '') + - (closeAtTop && !this._inline ? controls : '') + '<div class="calendar_links">' + - (this._canAdjustMonth(-1) ? '<a class="calendar_prev" ' + - 'onclick="popUpCal._adjustDate(' + this._id + ', -1, \'M\');">' + this._get('prevText') + '</a>' : - (hideIfNoPrevNext ? '' : '<label class="calendar_prev">' + this._get('prevText') + '</label>')) + - (this._isInRange(today) ? '<a class="calendar_current" ' + - 'onclick="popUpCal._gotoToday(' + this._id + ');">' + this._get('currentText') + '</a>' : '') + - (this._canAdjustMonth(+1) ? '<a class="calendar_next" ' + - 'onclick="popUpCal._adjustDate(' + this._id + ', +1, \'M\');">' + this._get('nextText') + '</a>' : - (hideIfNoPrevNext ? '' : '<label class="calendar_next">' + this._get('nextText') + '</label>')) + - '</div><div class="calendar_header">'; - var minDate = this._get('minDate'); - var maxDate = this._get('maxDate'); - // month selection - var monthNames = this._get('monthNames'); - if (!this._get('changeMonth')) { - html += monthNames[this._selectedMonth] + ' '; - } - else { - var inMinYear = (minDate && minDate.getFullYear() == this._selectedYear); - var inMaxYear = (maxDate && maxDate.getFullYear() == this._selectedYear); - html += '<select class="calendar_newMonth" ' + - 'onchange="popUpCal._selectMonthYear(' + this._id + ', this, \'M\');" ' + - 'onclick="popUpCal._clickMonthYear(' + this._id + ');">'; - for (var month = 0; month < 12; month++) { - if ((!inMinYear || month >= minDate.getMonth()) && - (!inMaxYear || month <= maxDate.getMonth())) { - html += '<option value="' + month + '"' + - (month == this._selectedMonth ? ' selected="selected"' : '') + - '>' + monthNames[month] + '</option>'; - } - } - html += '</select>'; - } - // year selection - if (!this._get('changeYear')) { - html += this._selectedYear; - } - else { - // determine range of years to display - var years = this._get('yearRange').split(':'); - var year = 0; - var endYear = 0; - if (years.length != 2) { - year = this._selectedYear - 10; - endYear = this._selectedYear + 10; - } - else if (years[0].charAt(0) == '+' || years[0].charAt(0) == '-') { - year = this._selectedYear + parseInt(years[0], 10); - endYear = this._selectedYear + parseInt(years[1], 10); - } - else { - year = parseInt(years[0], 10); - endYear = parseInt(years[1], 10); - } - year = (minDate ? Math.max(year, minDate.getFullYear()) : year); - endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear); - html += '<select class="calendar_newYear" onchange="popUpCal._selectMonthYear(' + - this._id + ', this, \'Y\');" ' + 'onclick="popUpCal._clickMonthYear(' + - this._id + ');">'; - for (; year <= endYear; year++) { - html += '<option value="' + year + '"' + - (year == this._selectedYear ? ' selected="selected"' : '') + - '>' + year + '</option>'; - } - html += '</select>'; - } - html += '</div><table class="calendar" cellpadding="0" cellspacing="0"><thead>' + - '<tr class="calendar_titleRow">'; - var firstDay = this._get('firstDay'); - var changeFirstDay = this._get('changeFirstDay'); - var dayNames = this._get('dayNames'); - for (var dow = 0; dow < 7; dow++) { // days of the week - html += '<td>' + (!changeFirstDay ? '' : '<a onclick="popUpCal._changeFirstDay(' + - this._id + ', this);">') + dayNames[(dow + firstDay) % 7] + - (changeFirstDay ? '</a>' : '') + '</td>'; - } - html += '</tr></thead><tbody>'; - var daysInMonth = this._getDaysInMonth(this._selectedYear, this._selectedMonth); - this._selectedDay = Math.min(this._selectedDay, daysInMonth); - var leadDays = (this._getFirstDayOfMonth(this._selectedYear, this._selectedMonth) - firstDay + 7) % 7; - var currentDate = new Date(this._currentYear, this._currentMonth, this._currentDay); - var selectedDate = new Date(this._selectedYear, this._selectedMonth, this._selectedDay); - var printDate = new Date(this._selectedYear, this._selectedMonth, 1 - leadDays); - var numRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate - var customDate = this._get('customDate'); - var showOtherMonths = this._get('showOtherMonths'); - for (var row = 0; row < numRows; row++) { // create calendar rows - html += '<tr class="calendar_daysRow">'; - for (var dow = 0; dow < 7; dow++) { // create calendar days - var customSettings = (customDate ? customDate(printDate) : [true, '']); - var otherMonth = (printDate.getMonth() != this._selectedMonth); - var unselectable = otherMonth || !customSettings[0] || - (minDate && printDate < minDate) || (maxDate && printDate > maxDate); - html += '<td class="calendar_daysCell' + - ((dow + firstDay + 6) % 7 >= 5 ? ' calendar_weekEndCell' : '') + // highlight weekends - (otherMonth ? ' calendar_otherMonth' : '') + // highlight days from other months - //(printDate.getTime() == selectedDate.getTime() ? ' calendar_daysCellOver' : '') + // highlight selected day - (unselectable ? ' calendar_unselectable' : '') + // highlight unselectable days - (!otherMonth || showOtherMonths ? ' ' + customSettings[1] : '') + // highlight custom dates - (printDate.getTime() == currentDate.getTime() ? ' calendar_currentDay' : // highlight current day - (printDate.getTime() == today.getTime() ? ' calendar_today' : '')) + '"' + // highlight today (if different) - (unselectable ? '' : ' onmouseover="$(this).addClass(\'calendar_daysCellOver\');"' + - ' onmouseout="$(this).removeClass(\'calendar_daysCellOver\');"' + - ' onclick="popUpCal._selectDay(' + this._id + ', this);"') + '>' + // actions - (otherMonth ? (showOtherMonths ? printDate.getDate() : ' ') : // display for other months - (unselectable ? printDate.getDate() : '<a>' + printDate.getDate() + '</a>')) + '</td>'; // display for this month - printDate.setDate(printDate.getDate() + 1); - } - html += '</tr>'; - } - html += '</tbody></table>' + (!closeAtTop && !this._inline ? controls : '') + - '<div style="clear: both;"></div>' + (!$.browser.msie ? '' : - '<!--[if lte IE 6.5]><iframe src="javascript:false;" class="calendar_cover"></iframe><![endif]-->'); - return html; - }, - - /* Adjust one of the date sub-fields. */ - _adjustDate: function(offset, period) { - var date = new Date(this._selectedYear + (period == 'Y' ? offset : 0), - this._selectedMonth + (period == 'M' ? offset : 0), - this._selectedDay + (period == 'D' ? offset : 0)); - // ensure it is within the bounds set - var minDate = this._get('minDate'); - var maxDate = this._get('maxDate'); - date = (minDate && date < minDate ? minDate : date); - date = (maxDate && date > maxDate ? maxDate : date); - this._selectedDay = date.getDate(); - this._selectedMonth = date.getMonth(); - this._selectedYear = date.getFullYear(); - }, - - /* Find the number of days in a given month. */ - _getDaysInMonth: function(year, month) { - return 32 - new Date(year, month, 32).getDate(); - }, - - /* Find the day of the week of the first of a month. */ - _getFirstDayOfMonth: function(year, month) { - return new Date(year, month, 1).getDay(); - }, - - /* Determines if we should allow a "next/prev" month display change. */ - _canAdjustMonth: function(offset) { - var date = new Date(this._selectedYear, this._selectedMonth + offset, 1); - if (offset < 0) { - date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth())); - } - return this._isInRange(date); - }, - - /* Is the given date in the accepted range? */ - _isInRange: function(date) { - var minDate = this._get('minDate'); - var maxDate = this._get('maxDate'); - return ((!minDate || date >= minDate) && (!maxDate || date <= maxDate)); - }, - - /* Format the given date for display. */ - _formatDate: function() { - var day = this._currentDay = this._selectedDay; - var month = this._currentMonth = this._selectedMonth; - var year = this._currentYear = this._selectedYear; - month++; // adjust javascript month - var dateFormat = this._get('dateFormat'); - var dateString = ''; - for (var i = 0; i < 3; i++) { - dateString += dateFormat.charAt(3) + - (dateFormat.charAt(i) == 'D' ? (day < 10 ? '0' : '') + day : - (dateFormat.charAt(i) == 'M' ? (month < 10 ? '0' : '') + month : - (dateFormat.charAt(i) == 'Y' ? year : '?'))); - } - return dateString.substring(dateFormat.charAt(3) ? 1 : 0); - } -}); - -/* Attach the calendar to a jQuery selection. - @param settings object - the new settings to use for this calendar instance (anonymous) - @return jQuery object - for chaining further calls */ -$.fn.calendar = function(settings, defaultDate) { - return this.each(function() { - // check for settings on the control itself - in namespace 'cal:' - var inlineSettings = null; - for (attrName in popUpCal._defaults) { - var attrValue = this.getAttribute('cal:' + attrName); - if (attrValue) { - inlineSettings = inlineSettings || {}; - try { - inlineSettings[attrName] = eval(attrValue); - } - catch (err) { - inlineSettings[attrName] = attrValue; - } - } - } - var nodeName = this.nodeName.toLowerCase(); - if (nodeName == 'input') { - var instSettings = (inlineSettings ? $.extend($.extend({}, settings || {}), - inlineSettings || {}) : settings); // clone and customise - var inst = (inst && !inlineSettings ? inst : - new PopUpCalInstance(instSettings, false, defaultDate)); - popUpCal._connectCalendar(this, inst); - } - else if (nodeName == 'div' || nodeName == 'span') { - var instSettings = $.extend($.extend({}, settings || {}), - inlineSettings || {}); // clone and customise - var inst = new PopUpCalInstance(instSettings, true, defaultDate); - popUpCal._inlineCalendar(this, inst, defaultDate); - } - }); -}; - -/* Initialise the calendar. */ -$(document).ready(function() { - popUpCal = new PopUpCal(); // singleton instance -}); diff --git a/libs/jquery/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png b/libs/jquery/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png Binary files differnew file mode 100644 index 0000000000..5b5dab2ab7 --- /dev/null +++ b/libs/jquery/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png diff --git a/libs/jquery/themes/base/images/ui-bg_flat_75_ffffff_40x100.png b/libs/jquery/themes/base/images/ui-bg_flat_75_ffffff_40x100.png Binary files differnew file mode 100644 index 0000000000..ac8b229af9 --- /dev/null +++ b/libs/jquery/themes/base/images/ui-bg_flat_75_ffffff_40x100.png diff --git a/libs/jquery/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png b/libs/jquery/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png Binary files differnew file mode 100644 index 0000000000..ad3d6346e0 --- /dev/null +++ b/libs/jquery/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png diff --git a/libs/jquery/themes/base/images/ui-bg_glass_65_ffffff_1x400.png b/libs/jquery/themes/base/images/ui-bg_glass_65_ffffff_1x400.png Binary files differnew file mode 100644 index 0000000000..42ccba269b --- /dev/null +++ b/libs/jquery/themes/base/images/ui-bg_glass_65_ffffff_1x400.png diff --git a/libs/jquery/themes/base/images/ui-bg_glass_75_dadada_1x400.png b/libs/jquery/themes/base/images/ui-bg_glass_75_dadada_1x400.png Binary files differnew file mode 100644 index 0000000000..5a46b47cb1 --- /dev/null +++ b/libs/jquery/themes/base/images/ui-bg_glass_75_dadada_1x400.png diff --git a/libs/jquery/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png b/libs/jquery/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png Binary files differnew file mode 100644 index 0000000000..86c2baa655 --- /dev/null +++ b/libs/jquery/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png diff --git a/libs/jquery/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png b/libs/jquery/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png Binary files differnew file mode 100644 index 0000000000..4443fdc1a1 --- /dev/null +++ b/libs/jquery/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png diff --git a/libs/jquery/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/libs/jquery/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png Binary files differnew file mode 100644 index 0000000000..7c9fa6c6ed --- /dev/null +++ b/libs/jquery/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png diff --git a/libs/jquery/themes/base/images/ui-icons_222222_256x240.png b/libs/jquery/themes/base/images/ui-icons_222222_256x240.png Binary files differnew file mode 100644 index 0000000000..ee039dc096 --- /dev/null +++ b/libs/jquery/themes/base/images/ui-icons_222222_256x240.png diff --git a/libs/jquery/themes/base/images/ui-icons_2e83ff_256x240.png b/libs/jquery/themes/base/images/ui-icons_2e83ff_256x240.png Binary files differnew file mode 100644 index 0000000000..45e8928e52 --- /dev/null +++ b/libs/jquery/themes/base/images/ui-icons_2e83ff_256x240.png diff --git a/libs/jquery/themes/base/images/ui-icons_454545_256x240.png b/libs/jquery/themes/base/images/ui-icons_454545_256x240.png Binary files differnew file mode 100644 index 0000000000..7ec70d11bf --- /dev/null +++ b/libs/jquery/themes/base/images/ui-icons_454545_256x240.png diff --git a/libs/jquery/themes/base/images/ui-icons_888888_256x240.png b/libs/jquery/themes/base/images/ui-icons_888888_256x240.png Binary files differnew file mode 100644 index 0000000000..5ba708c391 --- /dev/null +++ b/libs/jquery/themes/base/images/ui-icons_888888_256x240.png diff --git a/libs/jquery/themes/base/images/ui-icons_cd0a0a_256x240.png b/libs/jquery/themes/base/images/ui-icons_cd0a0a_256x240.png Binary files differnew file mode 100644 index 0000000000..7930a55809 --- /dev/null +++ b/libs/jquery/themes/base/images/ui-icons_cd0a0a_256x240.png diff --git a/libs/jquery/themes/base/jquery-ui.css b/libs/jquery/themes/base/jquery-ui.css new file mode 100644 index 0000000000..9e3c6129f8 --- /dev/null +++ b/libs/jquery/themes/base/jquery-ui.css @@ -0,0 +1,404 @@ +/* +* jQuery UI CSS Framework +* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) +* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. +*/ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { display: none; } +.ui-helper-hidden-accessible { position: absolute; left: -99999999px; } +.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } +.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } +.ui-helper-clearfix { display: inline-block; } +/* required comment for clearfix to work in Opera \*/ +* html .ui-helper-clearfix { height:1%; } +.ui-helper-clearfix { display:block; } +/* end clearfix */ +.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { cursor: default !important; } + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } + +/* +* jQuery UI CSS Framework +* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) +* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. +* To view and modify this theme, visit http://jqueryui.com/themeroller/ +*/ + + +/* Component containers +----------------------------------*/ +.ui-widget { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1.1em/*{fsDefault}*/; } +.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1em; } +.ui-widget-content { border: 1px solid #aaaaaa/*{borderColorContent}*/; background: #ffffff/*{bgColorContent}*/ url(images/ui-bg_flat_75_ffffff_40x100.png)/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/; color: #222222/*{fcContent}*/; } +.ui-widget-content a { color: #222222/*{fcContent}*/; } +.ui-widget-header { border: 1px solid #aaaaaa/*{borderColorHeader}*/; background: #cccccc/*{bgColorHeader}*/ url(images/ui-bg_highlight-soft_75_cccccc_1x100.png)/*{bgImgUrlHeader}*/ 50%/*{bgHeaderXPos}*/ 50%/*{bgHeaderYPos}*/ repeat-x/*{bgHeaderRepeat}*/; color: #222222/*{fcHeader}*/; font-weight: bold; } +.ui-widget-header a { color: #222222/*{fcHeader}*/; } + +/* Interaction states +----------------------------------*/ +.ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #d3d3d3/*{borderColorDefault}*/; background: #e6e6e6/*{bgColorDefault}*/ url(images/ui-bg_glass_75_e6e6e6_1x400.png)/*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #555555/*{fcDefault}*/; outline: none; } +.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555/*{fcDefault}*/; text-decoration: none; outline: none; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus { border: 1px solid #999999/*{borderColorHover}*/; background: #dadada/*{bgColorHover}*/ url(images/ui-bg_glass_75_dadada_1x400.png)/*{bgImgUrlHover}*/ 50%/*{bgHoverXPos}*/ 50%/*{bgHoverYPos}*/ repeat-x/*{bgHoverRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcHover}*/; outline: none; } +.ui-state-hover a, .ui-state-hover a:hover { color: #212121/*{fcHover}*/; text-decoration: none; outline: none; } +.ui-state-active, .ui-widget-content .ui-state-active { border: 1px solid #aaaaaa/*{borderColorActive}*/; background: #ffffff/*{bgColorActive}*/ url(images/ui-bg_glass_65_ffffff_1x400.png)/*{bgImgUrlActive}*/ 50%/*{bgActiveXPos}*/ 50%/*{bgActiveYPos}*/ repeat-x/*{bgActiveRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcActive}*/; outline: none; } +.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121/*{fcActive}*/; outline: none; text-decoration: none; } + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, .ui-widget-content .ui-state-highlight {border: 1px solid #fcefa1/*{borderColorHighlight}*/; background: #fbf9ee/*{bgColorHighlight}*/ url(images/ui-bg_glass_55_fbf9ee_1x400.png)/*{bgImgUrlHighlight}*/ 50%/*{bgHighlightXPos}*/ 50%/*{bgHighlightYPos}*/ repeat-x/*{bgHighlightRepeat}*/; color: #363636/*{fcHighlight}*/; } +.ui-state-highlight a, .ui-widget-content .ui-state-highlight a { color: #363636/*{fcHighlight}*/; } +.ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #cd0a0a/*{borderColorError}*/; background: #fef1ec/*{bgColorError}*/ url(images/ui-bg_glass_95_fef1ec_1x400.png)/*{bgImgUrlError}*/ 50%/*{bgErrorXPos}*/ 50%/*{bgErrorYPos}*/ repeat-x/*{bgErrorRepeat}*/; color: #cd0a0a/*{fcError}*/; } +.ui-state-error a, .ui-widget-content .ui-state-error a { color: #cd0a0a/*{fcError}*/; } +.ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #cd0a0a/*{fcError}*/; } +.ui-state-disabled, .ui-widget-content .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } +.ui-priority-primary, .ui-widget-content .ui-priority-primary { font-weight: bold; } +.ui-priority-secondary, .ui-widget-content .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; } +.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; } +.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsHeader}*/; } +.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png)/*{iconsDefault}*/; } +.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsHover}*/; } +.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsActive}*/; } +.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png)/*{iconsHighlight}*/; } +.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png)/*{iconsError}*/; } + +/* positioning */ +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-off { background-position: -96px -144px; } +.ui-icon-radio-on { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-tl { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; } +.ui-corner-tr { -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; } +.ui-corner-bl { -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; } +.ui-corner-br { -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; } +.ui-corner-top { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; } +.ui-corner-bottom { -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; } +.ui-corner-right { -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; } +.ui-corner-left { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; } +.ui-corner-all { -moz-border-radius: 4px/*{cornerRadius}*/; -webkit-border-radius: 4px/*{cornerRadius}*/; } + +/* Overlays */ +.ui-widget-overlay { background: #aaaaaa/*{bgColorOverlay}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlOverlay}*/ 50%/*{bgOverlayXPos}*/ 50%/*{bgOverlayYPos}*/ repeat-x/*{bgOverlayRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityOverlay}*/; } +.ui-widget-shadow { margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/; padding: 8px/*{thicknessShadow}*/; background: #aaaaaa/*{bgColorShadow}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlShadow}*/ 50%/*{bgShadowXPos}*/ 50%/*{bgShadowYPos}*/ repeat-x/*{bgShadowRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityShadow}*/; -moz-border-radius: 8px/*{cornerRadiusShadow}*/; -webkit-border-radius: 8px/*{cornerRadiusShadow}*/; }/* Accordion +----------------------------------*/ +.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } +.ui-accordion .ui-accordion-li-fix { display: inline; } +.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } +.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em 2.2em; } +.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } +.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; } +.ui-accordion .ui-accordion-content-active { display: block; }/* Datepicker +----------------------------------*/ +.ui-datepicker { width: 17em; padding: .2em .2em 0; } +.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } +.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } +.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } +.ui-datepicker .ui-datepicker-prev { left:2px; } +.ui-datepicker .ui-datepicker-next { right:2px; } +.ui-datepicker .ui-datepicker-prev-hover { left:1px; } +.ui-datepicker .ui-datepicker-next-hover { right:1px; } +.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } +.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } +.ui-datepicker .ui-datepicker-title select { float:left; font-size:1em; margin:1px 0; } +.ui-datepicker select.ui-datepicker-month-year {width: 100%;} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { width: 49%;} +.ui-datepicker .ui-datepicker-title select.ui-datepicker-year { float: right; } +.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } +.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } +.ui-datepicker td { border: 0; padding: 1px; } +.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } +.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } +.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { width:auto; } +.ui-datepicker-multi .ui-datepicker-group { float:left; } +.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } +.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } +.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } +.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } +.ui-datepicker-row-break { clear:both; width:100%; } + +/* RTL support */ +.ui-datepicker-rtl { direction: rtl; } +.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } +.ui-datepicker-rtl .ui-datepicker-group { float:right; } +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } + +/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ +.ui-datepicker-cover { + display: none; /*sorry for IE5*/ + display/**/: block; /*sorry for IE5*/ + position: absolute; /*must have*/ + z-index: -1; /*must have*/ + filter: mask(); /*must have*/ + top: -4px; /*must have*/ + left: -4px; /*must have*/ + width: 200px; /*must have*/ + height: 200px; /*must have*/ +}/* Dialog +----------------------------------*/ +.ui-dialog { position: relative; padding: .2em; width: 300px; } +.ui-dialog .ui-dialog-titlebar { padding: .5em .3em .3em 1em; position: relative; } +.ui-dialog .ui-dialog-title { float: left; margin: .1em 0 .2em; } +.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } +.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } +.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } +.ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } +.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } +.ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; } +.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } +.ui-draggable .ui-dialog-titlebar { cursor: move; } +/* Progressbar +----------------------------------*/ +.ui-progressbar { height:2em; text-align: left; } +.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }/* Resizable +----------------------------------*/ +.ui-resizable { position: relative;} +.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;} +.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } +.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0px; } +.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0px; } +.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0px; height: 100%; } +.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0px; height: 100%; } +.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } +.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } +.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } +.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* Slider +----------------------------------*/ +.ui-slider { position: relative; text-align: left; } +.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } +.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; } + +.ui-slider-horizontal { height: .8em; } +.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } +.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } +.ui-slider-horizontal .ui-slider-range-min { left: 0; } +.ui-slider-horizontal .ui-slider-range-max { right: 0; } + +.ui-slider-vertical { width: .8em; height: 100px; } +.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } +.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } +.ui-slider-vertical .ui-slider-range-min { bottom: 0; } +.ui-slider-vertical .ui-slider-range-max { top: 0; }/* Tabs +----------------------------------*/ +.ui-tabs { padding: .2em; zoom: 1; } +.ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: .2em .2em 0; } +.ui-tabs .ui-tabs-nav li { position: relative; float: left; border-bottom-width: 0 !important; margin: 0 .2em -1px 0; padding: 0; } +.ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected { padding-bottom: 1px; border-bottom-width: 0; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } +.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ +.ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border-width: 0; background: none; } +.ui-tabs .ui-tabs-hide { display: none !important; } |