Changeset 3490

Show
Ignore:
Timestamp:
04/08/08 15:56:51 (8 months ago)
Author:
coling
Message:

Update ui.datepicker and jquery.timeentry to latest versions.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • worklogplugin/0.11/worklog/htdocs/jquery.timeentry.pack.js

    r2741 r3490  
    11/* http://keith-wood.name/timeEntry.html 
    2    Time entry for jQuery v1.2.5
    3    Written by Keith Wood (kbwood@iprimus.com.au) June 2007. 
    4    Dual licensed under the GPL (http://www.gnu.org/licenses/gpl-3.0.txt) and  
    5    CC (http://creativecommons.org/licenses/by/3.0/) licenses.  
    6    "Share or Remix it but please Attribute the authors." */ 
    7 eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(n($){n 1L(){7.2A=0;7.1D=[];7.S=[];7.1Z=[];7.1Z[\'\']={1b:B,V:\':\',16:\'\',U:[\'32\',\'4q\'],2M:[\'3Z\',\'3R 2C\',\'3E 2C\',\'3w\',\'3r\']};7.13={2j:\'\',1i:B,1E:[1,1,1],27:N,23:t,2R:t,2U:\'p.3Y\',1n:[20,20,8],2B:B,1T:[3D,3B],2r:t};$.14(7.13,7.1Z[\'\'])}$.14(1L.2n,{1P:\'3p\',2k:n(a){m b=7.2A++;7.1D[b]=a;r b},A:n(a){r 7.1D[a]||a},3b:n(a){1f(7.13,a||{})},1C:n(a){m b=(a.1o&&a.1o.19()==\'1V\'?a:7);o($.p.H==b){r}o($.p.1q(b)){r}m c=$.p.A(b.y);c.v=$(b);$.p.H=b;$.p.Y=t;m d=c.q(\'2r\');1f(c.1d,(d?d(b):{}));c.1s()},2K:n(a){$.p.Y=$.p.H;$.p.H=t},2I:n(a){m b=a.1Y;m c=$.p.A(b.y);m d=c.q(\'V\').x+2;c.s=0;o($.D.1U){m e=a.3J;c.s=(e>C.M(1,c.I)*d+2?c.u:C.3A(e/d))}F o($.D.1w){m f=b.1g;T(m g=0;g<=C.M(1,c.I,c.u);g++){m h=(g!=c.u?(g*d)+2:(c.u*d)+c.q(\'16\').x+c.q(\'U\')[0].x);b.1g=f.X(0,h);m i=b.1M();o(a.3n<i.3m){c.s=g;w}}b.1g=f}F o($.D.1K||$.D.3i){m f=b.1g;T(m g=0;g<=C.M(1,c.I,c.u);g++){m j=(g!=c.u?(g*d):(c.u*d)+c.q(\'16\').x);o(j>=b.3h){c.s=g;w}}}c.Q()},2g:n(a){o(a.1W>=48){r N}m b=$.p.A(7.y);2e(a.1W){z 9:r(a.34?b.1l(N):b.17(N));z 35:o(a.29){b.1r(\'\')}F{b.s=C.M(1,b.I,b.u);b.G(0)}w;z 36:o(a.29){b.O()}F{b.s=0;b.G(0)}w;z 37:b.1l(B);w;z 38:b.G(+1);w;z 39:b.17(B);w;z 40:b.G(-1);w;z 46:b.1r(\'\');w}r B},2L:n(a){m b=2Z.2Y(a.2W==4m?a.1W:a.2W);o(b<\' \'){r N}m c=$.p.A(7.y);c.2V(b);r B},2T:n(a,b){b=($.D.1K?-b/C.22(b):b);m c=$.p.A(7.y);c.G(b);a.4f()},2P:n(b,c){m d=$(b);o(7.2Q(d,7.1P)){r}m e=c.q(\'2U\');m f=c.q(\'4c\');m g=c.q(\'1n\');m h=c.q(\'2j\');m i=(!e?t:$(\'<R 1u="45" 44="\'+c.1t+\'" 42="41: 3X-3W; 2J: 3V(\\\'\'+e+\'\\\') 0 0 3U-3T; \'+\'3S: \'+g[0]+\'1c; 3Q: \'+g[1]+\'1c;\'+($.D.1U?\' 2F-3P: \'+g[0]+\'1c; 2F-3O: \'+(g[1]-18)+\'1c;\':\'\')+\'"></R>\'));d.3N(\'<R 1u="3M"></R>\').2E(h?\'<R 1u="3L">\'+h+\'</R>\':\'\').2E(i||\'\');d.3K(7.1P).2z(7.1C).3I(7.2K).3H(7.2I).3G(7.2g).3F(7.2L);o($.D.1U){d.2x(\'1V\',n(a){c.1s()})}o($.D.1w){d.2x(\'3C\',n(a){1S(n(){c.1s()},1)})}o(c.q(\'27\')&&$.2w.2v){d.2v(7.2T)}d[0].y=c.1t;o(i){i.3x(7.2u).2t(7.21).2q(7.21).3v(7.2p);i[0].y=c.1t}},2Q:n(a,b){m c=a.3u(\'1u\');r(c&&c.1R(b)>-1)},3t:n(a){7.1Q(a,B)},3s:n(a){7.1Q(a,N)},1Q:n(d,e){d=(d.Z?d:$(d));d.2m(n(){7.2l=e;m b=$.p.A(7.y);o(7.1A&&7.1A.1o.19()==\'R\'){$.p.1k(b,7.1A,(e?5:-1))}m c=7;$.p.S=$.3q($.p.S,n(a){r(a==c?t:a)});o(e){$.p.S[$.p.S.x]=7}})},1q:n(a){a=(a.Z?a[0]:(1O a==\'1N\'?$(a)[0]:a));T(m i=0;i<7.S.x;i++){o(7.S[i]==a){r N}}r B},3o:n(a,b){a=(a.Z?a:$(a))[0];m c=7.A(a.y);o(c){m d=c.1j();1f(c.1d,b||{});o(d){c.O(J W(0,0,0,d[0],d[1],d[2]))}}},3l:n(a,b){a=(a.Z?a[0]:(1O a==\'1N\'?$(a)[0]:a));m c=7.A(a.y);o(c){c.v=$(a);c.O(b)}},3k:n(a){a=(a.Z?a[0]:(1O a==\'1N\'?$(a)[0]:a));m b=7.A(a.y);m c=(b?b.1j():t);r(!c?t:J W(0,0,0,c[0],c[1],c[2]))},2p:n(a){m b=$.p.15(a);m c=$.p.A(b.y);b.3j=c.q(\'2M\')[$.p.1G(c,a)]},2u:n(a){m b=$.p.15(a);m c=b.2i;o($.p.1q(c)){r}o(c==$.p.Y){$.p.H=c;$.p.Y=t}m d=$.p.A(c.y);$.p.1C(c);m e=$.p.1G(d,a);$.p.1k(d,b,e);$.p.1J(d,e);m f=d.q(\'1T\');o(e>=3&&f[0]){$.p.1I=1S(n(){$.p.1H(d,e)},f[0]);$(b).2h(\'2q\',$.p.1F).2h(\'2t\',$.p.1F)}},1J:n(a,b){2e(b){z 0:a.O();w;z 1:a.1l(B);w;z 2:a.17(B);w;z 3:a.G(+1);w;z 4:a.G(-1);w}},1H:n(a,b){$.p.H=$.p.Y;7.1J(a,b);7.1I=1S(n(){$.p.1H(a,b)},a.q(\'1T\')[1])},1F:n(a){3g($.p.1I)},21:n(a){m b=$.p.15(a);m c=$.p.A(b.y);o(!$.p.1q(b.2i)){$.p.1k(c,b,-1)}o(!$.D.1K){$.p.H=$.p.Y}o($.p.H){c.Q()}},15:n(a){r(a.1Y?a.1Y:a.3f)},1G:n(a,b){m c=7.15(b);m d=7.2f(c);m e=7.2s(c);m f=a.q(\'2B\');m g=(f?2o:b.3e+e[0]-d[0]-($.D.1w?1:0));m h=b.3d+e[1]-d[1]-($.D.1w?1:0);m i=a.q(\'1n\');m j=(f?2o:i[0]-g);m k=i[1]-h;o(i[2]>0&&C.22(g-j)<=i[2]&&C.22(h-k)<=i[2]){r 0}m l=C.3c(g,h,j,k);r(l==g?1:(l==j?2:(l==h?3:4)))},1k:n(a,b,c){$(b).3a(\'2J-3y\',\'-\'+((c+1)*a.q(\'1n\')[0])+\'1c 3z\')},2f:n(a){m b=1m=0;o(a.2d){b=a.2c;1m=a.2b;33(a=a.2d){m c=b;b+=a.2c;o(b<0){b=c}1m+=a.2b}}r[b,1m]},2s:n(a){r[C.M(1e.2a.2D,1e.2y.2D),C.M(1e.2a.28,1e.2y.28)]}});n 1B(a){7.1t=$.p.2k(7);7.E=0;7.L=0;7.P=0;7.v=t;7.1d=1f({},a||{})}$.14(1B.2n,{q:n(a){r(7.1d[a]!=t?7.1d[a]:$.p.13[a])},1s:n(){m a=7.1j();m b=7.q(\'1i\');o(a){7.E=a[0];7.L=a[1];7.P=a[2]}F{m c=7.1h();7.E=c[0];7.L=c[1];7.P=(b?c[2]:0)}7.I=(b?2:-1);7.u=(7.q(\'1b\')?-1:(b?3:2));7.1a=\'\';7.s=0;o(7.v.K()!=\'\'){7.1z()}},1j:n(){m a=(7.v?7.v.K():\'\');m b=7.q(\'V\');m c=a.31(b);o(b==\'\'&&a!=\'\'){c[0]=a.X(0,2);c[1]=a.X(2,4);c[2]=a.X(4,6)}m d=7.q(\'U\');o(c.x>=2){m e=(a.1R(d[0])>-1);m f=(a.1R(d[1])>-1);m g=1X(c[0],10);g=(1y(g)?0:g);g=((e||f)&&g==12?0:g)+(f?12:0);m h=1X(c[1],10);h=(1y(h)?0:h);m i=(c.x>=3?1X(c[2],10):0);i=(1y(i)||!7.q(\'1i\')?0:i);r[g,h,i]}r t},1h:n(a){m b=(a!=t);o(!b){m c=J W();a=[c.2H(),c.25(),c.2G()]}m d=B;m e=7.q(\'1E\');T(m i=0;i<e.x;i++){o(d){a[i]=0}F o(e[i]>1){a[i]=C.30(a[i]/e[i])*e[i];d=!b}}r a},1z:n(){m a=7.q(\'1b\');m b=7.q(\'V\');m c=(7.1p(a?7.E:((7.E+11)%12)+1)+b+7.1p(7.L)+(7.q(\'1i\')?b+7.1p(7.P):\'\')+(a?\'\':7.q(\'16\')+7.q(\'U\')[(7.E<12?0:1)]));7.1r(c);7.Q()},Q:n(){o(!7.v){r}m a=7.v[0];m b=7.q(\'V\');m c=b.x+2;m d=(7.s!=7.u?(7.s*c):(7.u*c)-b.x+7.q(\'16\').x);m e=d+(7.s!=7.u?2:7.q(\'U\')[0].x);o(a.2X){a.2X(d,e)}F o(a.1M){m f=a.1M();f.43(\'2N\',d);f.4p(\'2N\',e-7.v.K().x);f.4n()}o(!a.2l){a.2z()}},1p:n(a){r(a<10?\'0\':\'\')+a},1r:n(a){7.v.K(a);7.v.4l(\'4k\')},1l:n(a){m b=(7.v.K()==\'\'||7.s==0);o(!b){7.s--}7.Q();7.1a=\'\';r(b&&a)},17:n(a){m b=(7.v.K()==\'\'||7.s==C.M(1,7.I,7.u));o(!b){7.s++}7.Q();7.1a=\'\';r(b&&a)},G:n(a){o(7.v.K()==\'\'){a=0}m b=7.q(\'1E\');7.O(J W(0,0,0,7.E+(7.s==0?a*b[0]:0)+(7.s==7.u?a*12:0),7.L+(7.s==1?a*b[1]:0),7.P+(7.s==7.I?a*b[2]:0)))},O:n(a){o(!a){m b=7.1h();a=J W(0,0,0,b[0],b[1],b[2])}m a=7.1x(a);m c=7.1x(7.q(\'23\'));m d=7.1x(7.q(\'2R\'));a=(c&&a<c?c:(d&&a>d?d:a));7.E=a.2H();7.L=a.25();7.P=a.2G();7.1z()},1x:n(a){o(!a){r t}a.4j(4i);a.4h(1-1);a.4g(26);r a},2V:n(a){o(a==7.q(\'V\')){7.17(B)}F o(a>=\'0\'&&a<=\'9\'){m b=(7.1a+a)*1;m c=(7.s==0&&((7.q(\'1b\')&&b<24)||(b>=1&&b<=12))?b:7.E);m d=(7.s==1&&b<2O?b:7.L);m e=(7.s==7.I&&b<2O?b:7.P);m f=7.1h([c,d,e]);7.O(J W(0,0,0,f[0],f[1],f[2]));7.1a=a}F o(!7.q(\'1b\')){m g=7.q(\'U\');o((a==g[0].X(0,1).19()&&7.E>=12)||(a==g[1].X(0,1).19()&&7.E<12)){m h=7.s;7.s=7.u;7.G(+1);7.s=h;7.Q()}}}});n 1f(a,b){$.14(a,b);T(m c 2S b){o(b[c]==t){a[c]=t}}r a}$.2w.p=n(e){r 7.2m(n(){m a=7.1o.19();o(a==\'1V\'){m b=t;T(1v 2S $.p.13){m c=7.4e(\'4d:\'+1v);o(c){b=b||{};4b{b[1v]=4a(c)}49(4o){b[1v]=c}}}m d=(d&&!b?d:J 1B(!b?e:$.14(b,e)));$.p.2P(7,d)}})};$(1e).47(n(){$.p=J 1L()})})(4r);',62,276,'|||||||this|||||||||||||||var|function|if|timeEntry|_get|return|_field|null|_ampmField|_input|break|length|_timeId|case|_getInst|false|Math|browser|_selectedHour|else|_adjustField|_lastInput|_secondField|new|val|_selectedMinute|max|true|_setTime|_selectedSecond|_showField|span|_disabledInputs|for|ampmNames|separator|Date|substring|_blurredInput|jquery||||_defaults|extend|_getSpinnerTarget|ampmPrefix|_nextField||toLowerCase|_lastChr|show24Hours|px|_settings|document|extendRemove|value|_constrainTime|showSeconds|_extractTime|_changeSpinner|_previousField|curTop|spinnerSize|nodeName|_formatNumber|isDisabled|_setValue|_parseTime|_id|class|attrName|msie|_normaliseTime|isNaN|_showTime|nextSibling|TimeEntryInstance|_doFocus|_inst|timeSteps|_releaseSpinner|_getSpinnerRegion|_repeatSpinner|_timer|_actionSpinner|opera|TimeEntry|createTextRange|string|typeof|markerClassName|_disableFor|indexOf|setTimeout|spinnerRepeat|mozilla|input|keyCode|parseInt|target|regional||_endSpinner|abs|minTime||getMinutes||useMouseWheel|scrollTop|ctrlKey|documentElement|offsetTop|offsetLeft|offsetParent|switch|_findPos|_doKeyDown|one|previousSibling|appendText|_register|disabled|each|prototype|99|_describeSpinner|mouseout|beforeShow|_findScroll|mouseup|_handleSpinner|mousewheel|fn|bind|body|focus|_nextId|spinnerIncDecOnly|field|scrollLeft|after|padding|getSeconds|getHours|_doDblClick|background|_doBlur|_doKeyPress|spinnerTexts|character|60|_connectTimeEntry|_hasClass|maxTime|in|_doMouseWheel|spinnerImage|_handleKeyPress|charCode|setSelectionRange|fromCharCode|String|round|split|AM|while|shiftKey||||||css|setDefaults|min|clientY|clientX|srcElement|clearTimeout|selectionStart|safari|title|getTimeFor|setTimeFor|boundingWidth|offsetX|reconfigureFor|hasTimeEntry|map|Decrement|disableFor|enableFor|attr|mousemove|Increment|mousedown|position|0px|floor|250|paste|500|Next|keypress|keydown|dblclick|blur|rangeOffset|addClass|timeEntry_append|timeEntry_wrap|wrap|top|left|height|Previous|width|repeat|no|url|block|inline|png|Now||display|style|moveStart|_timeid|timeEntry_control||ready||catch|eval|try|spinnerText|time|getAttribute|preventDefault|setDate|setMonth|2001|setFullYear|change|trigger|undefined|select|err|moveEnd|PM|jQuery'.split('|'),0,{})) 
     2   Time entry for jQuery v1.3.0
     3   Written by Keith Wood (kbwood@virginbroadband.com.au) June 2007. 
     4   Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and  
     5   MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses.  
     6   Please attribute the author if you use it. */ 
     7eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(o($){o 15(){7.2O=0;7.1r=[];7.H=[];7.28=[];7.28[\'\']={1b:x,W:\':\',16:\'\',X:[\'3l\',\'4F\'],2W:[\'4e\',\'41 2N\',\'3R 2N\',\'3N\',\'3I\']};7.19={2v:\'\',1o:x,1M:[1,1,1],2g:0,2f:S,3g:t,2Y:t,2T:\'p.47\',1u:[20,20,8],2K:x,1Y:[3Q,3M],2A:t};$.1i(7.19,7.28[\'\'])}$.1i(15.1R,{1j:\'3D\',2u:o(a){m b=7.2O++;7.1r[b]=a;r b},D:o(a){r 7.1r[a]||a},3p:o(a){1e(7.19,a||{})},1s:o(a){m b=(a.1m&&a.1m.1d()==\'F\'?a:7);n($.p.L==b){r}n($.p.1D(b)){r}m c=$.p.D(b.w);c.A=$(b);$.p.L=b;$.p.13=t;m d=c.q(\'2A\');1e(c.17,(d?d(b):{}));c.1w()},27:o(a){$.p.13=$.p.L;$.p.L=t},25:o(a){m b=a.23;m c=$.p.D(b.w);m d=c.q(\'W\').y+2;c.s=0;n($.u.1t){m e=a.3S;c.s=(e>z.R(1,c.J)*d+2?c.v:z.3O(e/d))}G n($.u.1h){m f=b.1z;Z(m g=0;g<=z.R(1,c.J,c.v);g++){m h=(g!=c.v?(g*d)+2:(c.v*d)+c.q(\'16\').y+c.q(\'X\')[0].y);b.1z=f.Y(0,h);m i=b.1Q();n(a.3C<i.3A){c.s=g;B}}b.1z=f}G n($.u.T||$.u.3w){m f=b.1z;Z(m g=0;g<=z.R(1,c.J,c.v);g++){m j=(g!=c.v?(g*d):(c.v*d)+c.q(\'16\').y);n(j>=b.3v){c.s=g;B}}}c.M()},1K:o(a){n(a.1L>=48){r S}m b=$.p.D(7.w);2o(a.1L){C 9:r(a.3o?b.1p(S):b.1a(S));C 35:n(a.2i){b.1y(\'\')}G{b.s=z.R(1,b.J,b.v);b.I(0)}B;C 36:n(a.2i){b.N()}G{b.s=0;b.I(0)}B;C 37:b.1p(x);B;C 38:b.I(+1);B;C 39:b.1a(x);B;C 40:b.I(-1);B;C 46:b.1y(\'\');B}r x},21:o(a){m b=3j.4C(a.3e==3c?a.1L:a.3e);n(b<\' \'){r S}m c=$.p.D(7.w);c.3b(b);r x},34:o(a,b){b=($.u.T?-b/z.2b(b):b);m c=$.p.D(7.w);c.I(b);a.4r()},30:o(b,c){m d=$(b);n(d.2U(\'.\'+7.1j)){r}m e=c.q(\'2T\');m f=c.q(\'4o\');m g=c.q(\'1u\');m h=c.q(\'2v\');m i=(!e?t:$(\'<V 2a="4j" 4h="\'+c.1C+\'" 4f="4d: 4a-49; 2R: 45(\\\'\'+e+\'\\\') 0 0 44-43; \'+\'42: \'+g[0]+\'1c; 3Z: \'+g[1]+\'1c;\'+($.u.1t?\' 2P-3Y: \'+g[0]+\'1c; 2P-3X: \'+(g[1]-18)+\'1c;\':\'\')+\'"></V>\'));d.3W(\'<V 2a="3V"></V>\').2L(h?\'<V 2a="3U">\'+h+\'</V>\':\'\').2L(i||\'\');d.3T(7.1j).1Z(7.1s).2J(7.27).2I(7.25).2H(7.1K).2M(7.21);n($.u.1t){d.2G(\'F\',o(a){c.1w()})}n($.u.1h){d.2G(\'2F\',o(a){1X(o(){c.1w()},1)})}n(c.q(\'2f\')&&$.29.1W){d.1W(7.34)}d[0].w=c.1C;n(i){i.3P(7.2E).2D(7.1V).2C(7.1V).3L(7.2B);i[0].w=c.1C}},3K:o(a){7.1U(a,x)},3J:o(a){7.1U(a,S)},1U:o(b,c){m d=$.p.D(b.w);n(!d){r}b.2z=c;n(b.1T&&b.1T.1m.1d()==\'V\'){$.p.1B(d,b.1T,(c?5:-1))}$.p.H=$.2x($.p.H,o(a){r(a==b?t:a)});n(c){$.p.H[$.p.H.y]=b}},1D:o(a){Z(m i=0;i<7.H.y;i++){n(7.H[i]==a){r S}}r x},3H:o(a,b){m c=7.D(a.w);n(c){m d=c.1A();1e(c.17,b||{});n(d){c.N(K 14(0,0,0,d[0],d[1],d[2]))}}},3G:o(b){$F=$(b);n(!$F.2U(\'.\'+7.1j)){r}b.1q.1q.3F(b,b.1q);$F.3E(7.1j).P(\'1Z\',7.1s).P(\'2J\',7.27).P(\'2I\',7.25).P(\'2H\',7.1K).P(\'2M\',7.21);n($.u.1t){$F.P(\'F\')}n($.u.1h){$F.P(\'2F\')}n($.29.1W){$F.3B()}7.1r[b.w]=t;b.w=3c;7.H=$.2x(7.H,o(a){r(a==b?t:a)})},3z:o(a,b){m c=7.D(a.w);n(c){c.A=$(a);c.N(b)}},3y:o(a){m b=7.D(a.w);m c=(b?b.1A():t);r(!c?t:K 14(0,0,0,c[0],c[1],c[2]))},2B:o(a){m b=$.p.1g(a);m c=$.p.D(b.w);b.3x=c.q(\'2W\')[$.p.1F(c,a)]},2E:o(a){m b=$.p.1g(a);m c=b.2t;n($.p.1D(c)){r}n(c==$.p.13){$.p.L=c;$.p.13=t}m d=$.p.D(c.w);$.p.1s(c);m e=$.p.1F(d,a);$.p.1B(d,b,e);$.p.1P(d,e);m f=d.q(\'1Y\');n(e>=3&&f[0]){$.p.1O=1X(o(){$.p.1J(d,e)},f[0]);$(b).2s(\'2C\',$.p.1N).2s(\'2D\',$.p.1N)}},1P:o(a,b){2o(b){C 0:a.N();B;C 1:a.1p(x);B;C 2:a.1a(x);B;C 3:a.I(+1);B;C 4:a.I(-1);B}},1J:o(a,b){$.p.L=$.p.13;7.1P(a,b);7.1O=1X(o(){$.p.1J(a,b)},a.q(\'1Y\')[1])},1N:o(a){3u($.p.1O)},1V:o(a){m b=$.p.1g(a);m c=$.p.D(b.w);n(!$.p.1D(b.2t)){$.p.1B(c,b,-1)}n(!$.u.T){$.p.L=$.p.13}n($.p.L){c.M()}},1g:o(a){r(a.23?a.23:a.3t)},1F:o(a,b){m c=7.1g(b);m d=7.2r(c);m e=7.2q(c);m f=a.q(\'2K\');m g=(f?2p:b.3s+e[0]-d[0]-($.u.1h?1:0));m h=b.3r+e[1]-d[1]-($.u.1h?1:0);m i=a.q(\'1u\');m j=(f?2p:i[0]-g);m k=i[1]-h;n(i[2]>0&&z.2b(g-j)<=i[2]&&z.2b(h-k)<=i[2]){r 0}m l=z.2n(g,h,j,k);r(l==g?1:(l==j?2:(l==h?3:4)))},1B:o(a,b,c){$(b).2w(\'2R-2m\',\'-\'+((c+1)*a.q(\'1u\')[0])+\'1c 3q\')},2r:o(a){m b=1n=0;n(a.2l){b=a.2k;1n=a.3h;2j(a=a.2l){m c=b;b+=a.2k;n(b<0){b=c}1n+=a.3h}}r[b,1n]},2q:o(a){m b=x;$(a).3n().2y(o(){b|=$(7).2w(\'2m\')==\'3m\'});n(b&&!$.u.T){r[0,0]}m c=($.u.T?1S.2h.1I:a.1I);m d=($.u.T?1S.2h.2c:a.2c);n(!$.u.T){2j(a=a.1q){c+=a.1I||0;d+=a.2c||0}}r[c,d]}});o 1H(a){7.1C=$.p.2u(7);7.E=0;7.Q=0;7.U=0;7.A=t;7.17=1e({},a||{})}$.1i(1H.1R,{q:o(a){r(7.17[a]!=t?7.17[a]:$.p.19[a])},1w:o(){m a=7.1A();m b=7.q(\'1o\');n(a){7.E=a[0];7.Q=a[1];7.U=a[2]}G{m c=7.1l();7.E=c[0];7.Q=c[1];7.U=(b?c[2]:0)}7.J=(b?2:-1);7.v=(7.q(\'1b\')?-1:(b?3:2));7.1f=\'\';7.s=z.R(0,z.2n(z.R(1,7.J,7.v),7.q(\'2g\')));n(7.A.O()!=\'\'){7.1G()}},1A:o(){m a=(7.A?7.A.O():\'\');m b=7.q(\'W\');m c=a.3k(b);n(b==\'\'&&a!=\'\'){c[0]=a.Y(0,2);c[1]=a.Y(2,4);c[2]=a.Y(4,6)}m d=7.q(\'X\');n(c.y>=2){m e=(a.2S(d[0])>-1);m f=(a.2S(d[1])>-1);m g=22(c[0],10);g=(1E(g)?0:g);g=((e||f)&&g==12?0:g)+(f?12:0);m h=22(c[1],10);h=(1E(h)?0:h);m i=(c.y>=3?22(c[2],10):0);i=(1E(i)||!7.q(\'1o\')?0:i);r[g,h,i]}r t},1l:o(a){m b=(a!=t);n(!b){m c=K 14();a=[c.2e(),c.2d(),c.2Q()]}m d=x;m e=7.q(\'1M\');Z(m i=0;i<e.y;i++){n(d){a[i]=0}G n(e[i]>1){a[i]=z.3i(a[i]/e[i])*e[i];d=!b}}r a},1G:o(){m a=7.q(\'1b\');m b=7.q(\'W\');m c=(7.1v(a?7.E:((7.E+11)%12)+1)+b+7.1v(7.Q)+(7.q(\'1o\')?b+7.1v(7.U):\'\')+(a?\'\':7.q(\'16\')+7.q(\'X\')[(7.E<12?0:1)]));7.1y(c);7.M()},M:o(){n(!7.A){r}m a=7.A[0];m b=7.q(\'W\');m c=b.y+2;m d=(7.s!=7.v?(7.s*c):(7.v*c)-b.y+7.q(\'16\').y);m e=d+(7.s!=7.v?2:7.q(\'X\')[0].y);n(a.3f){a.3f(d,e)}G n(a.1Q){m f=a.1Q();f.4z(\'3d\',d);f.4y(\'3d\',e-7.A.O().y);f.4x()}n(!a.2z){a.1Z()}},1v:o(a){r(a<10?\'0\':\'\')+a},1y:o(a){7.A.O(a);7.A.4w(\'4v\')},1p:o(a){m b=(7.A.O()==\'\'||7.s==0);n(!b){7.s--}7.M();7.1f=\'\';r(b&&a)},1a:o(a){m b=(7.A.O()==\'\'||7.s==z.R(1,7.J,7.v));n(!b){7.s++}7.M();7.1f=\'\';r(b&&a)},I:o(a){n(7.A.O()==\'\'){a=0}m b=7.q(\'1M\');7.N(K 14(0,0,0,7.E+(7.s==0?a*b[0]:0)+(7.s==7.v?a*12:0),7.Q+(7.s==1?a*b[1]:0),7.U+(7.s==7.J?a*b[2]:0)))},N:o(a){n(!a){m b=7.1l();a=K 14(0,0,0,b[0],b[1],b[2])}m a=7.1k(a);m c=7.1k(7.q(\'3g\'));m d=7.1k(7.q(\'2Y\'));a=(c&&a<c?c:(d&&a>d?d:a));7.E=a.2e();7.Q=a.2d();7.U=a.2Q();7.1G()},1k:o(a){n(!a){r t}a.4u(4t);a.4s(1-1);a.4q(26);r a},3b:o(a){n(a==7.q(\'W\')){7.1a(x)}G n(a>=\'0\'&&a<=\'9\'){m b=(7.1f+a)*1;m c=(7.s==0&&((7.q(\'1b\')&&b<24)||(b>=1&&b<=12))?b:7.E);m d=(7.s==1&&b<2Z?b:7.Q);m e=(7.s==7.J&&b<2Z?b:7.U);m f=7.1l([c,d,e]);7.N(K 14(0,0,0,f[0],f[1],f[2]));7.1f=a}G n(!7.q(\'1b\')){m g=7.q(\'X\');n((a==g[0].Y(0,1).1d()&&7.E>=12)||(a==g[1].Y(0,1).1d()&&7.E<12)){m h=7.s;7.s=7.v;7.I(+1);7.s=h;7.M()}}}});o 1e(a,b){$.1i(a,b);Z(m c 2X b){n(b[c]==t){a[c]=t}}r a}$.29.p=o(e){m f=4p.1R.4n.4m(4l,1);n(2V e==\'32\'&&(e==\'4k\'||e==\'4i\')){r $.p[\'31\'+e+\'15\'].3a($.p,[7[0]].33(f))}r 7.2y(o(){m a=7.1m.1d();n(a==\'F\'){n(2V e==\'32\'){$.p[\'31\'+e+\'15\'].3a($.p,[7].33(f))}G{m b=t;Z(1x 2X $.p.19){m c=7.4g(\'4A:\'+1x);n(c){b=b||{};4B{b[1x]=4c(c)}4b(4D){b[1x]=c}}}m d=(d&&!b?d:K 1H(!b?e:$.1i(b,e)));$.p.30(7,d)}}})};$(1S).4E(o(){$.p=K 15()})})(4G);',62,291,'|||||||this|||||||||||||||var|if|function|timeEntry|_get|return|_field|null|browser|_ampmField|_timeId|false|length|Math|_input|break|case|_getInst|_selectedHour|input|else|_disabledInputs|_adjustField|_secondField|new|_lastInput|_showField|_setTime|val|unbind|_selectedMinute|max|true|opera|_selectedSecond|span|separator|ampmNames|substring|for||||_blurredInput|Date|TimeEntry|ampmPrefix|_settings||_defaults|_nextField|show24Hours|px|toLowerCase|extendRemove|_lastChr|_getSpinnerTarget|msie|extend|markerClassName|_normaliseTime|_constrainTime|nodeName|curTop|showSeconds|_previousField|parentNode|_inst|_doFocus|mozilla|spinnerSize|_formatNumber|_parseTime|attrName|_setValue|value|_extractTime|_changeSpinner|_id|_isDisabledTimeEntry|isNaN|_getSpinnerRegion|_showTime|TimeEntryInstance|scrollLeft|_repeatSpinner|_doKeyDown|keyCode|timeSteps|_releaseSpinner|_timer|_actionSpinner|createTextRange|prototype|document|nextSibling|_enableDisable|_endSpinner|mousewheel|setTimeout|spinnerRepeat|focus||_doKeyPress|parseInt|target||_doDblClick||_doBlur|regional|fn|class|abs|scrollTop|getMinutes|getHours|useMouseWheel|initialField|body|ctrlKey|while|offsetLeft|offsetParent|position|min|switch|99|_findScroll|_findPos|one|previousSibling|_register|appendText|css|map|each|disabled|beforeShow|_describeSpinner|mouseout|mouseup|_handleSpinner|paste|bind|keydown|dblclick|blur|spinnerIncDecOnly|after|keypress|field|_nextId|padding|getSeconds|background|indexOf|spinnerImage|is|typeof|spinnerTexts|in|maxTime|60|_connectTimeEntry|_|string|concat|_doMouseWheel||||||apply|_handleKeyPress|undefined|character|charCode|setSelectionRange|minTime|offsetTop|round|String|split|AM|fixed|parents|shiftKey|setDefaults|0px|clientY|clientX|srcElement|clearTimeout|selectionStart|safari|title|_getTimeTimeEntry|_setTimeTimeEntry|boundingWidth|unmousewheel|offsetX|hasTimeEntry|removeClass|replaceChild|_destroyTimeEntry|_changeTimeEntry|Decrement|_disableTimeEntry|_enableTimeEntry|mousemove|250|Increment|floor|mousedown|500|Next|rangeOffset|addClass|timeEntry_append|timeEntry_wrap|wrap|top|left|height||Previous|width|repeat|no|url||png||block|inline|catch|eval|display|Now|style|getAttribute|_timeid|getTime|timeEntry_control|isDisabled|arguments|call|slice|spinnerText|Array|setDate|preventDefault|setMonth|2001|setFullYear|change|trigger|select|moveEnd|moveStart|time|try|fromCharCode|err|ready|PM|jQuery'.split('|'),0,{})) 
  • worklogplugin/0.11/worklog/htdocs/tracWorklog.js

    r2741 r3490  
    1010  stop: function() { 
    1111    var mynow = new Date(); 
    12     change_handler = function() { 
    13       var chosen_date = $.datepicker.getDateFor('#worklogStopDate'); 
    14       var chosen_time = $.timeEntry.getTimeFor('#worklogStopTime'); 
     12    var change_handler = function() 
     13    { 
     14      var chosen_date = $('#worklogStopDate').datepicker('getDate'); 
     15      var chosen_time = $('#worklogStopTime').timeEntry('getTime'); 
    1516       
    1617      var chosen = new Date(); 
    1718      chosen.setTime(chosen_date.getTime() + (((chosen_time.getHours() * 60) + chosen_time.getMinutes()) * 60) * 1000); 
    1819       
    19       var now = new Date(); 
    20       if (chosen > now) 
    21         $('#worklogSubmit')[0].disabled = true; 
    22       else 
    23         $('#worklogSubmit')[0].disabled = false; 
    24        
     20      $('#worklogSubmit')[0].disabled = (chosen > (new Date())); 
    2521      $('#worklogStoptime')[0].value = (chosen.getTime() / 1000); 
    2622    }; 
     
    3026    $('#worklogPopup').jqm({modal: true}).jqmShow(); 
    3127     
    32     try { 
    33     $('#worklogStopTime').timeEntry({show24Hours: true, spinnerImage: ''}); 
    34     $.timeEntry.setTimeFor('#worklogStopTime', mynow); 
    35     $('#worklogStopTime').bind('change', change_handler); 
     28    try 
     29    { 
     30      $('#worklogStopTime').timeEntry({show24Hours: true, spinnerImage: ''}); 
     31      $('#worklogStopTime').timeEntry('setTime', mynow); 
     32      $('#worklogStopTime').bind('change', change_handler); 
    3633    } 
    37     catch (er) { 
     34    catch (er)  
     35    { 
    3836      alert(er); 
    3937    } 
  • worklogplugin/0.11/worklog/htdocs/ui.datepicker.css

    r2741 r3490  
    1111        display: none; 
    1212        border: 1px solid #777; 
    13         z-index: 10; /*must have*/ 
     13        z-index: 9999; /*must have*/ 
    1414} 
    1515.datepicker_inline { 
     
    1717        display: block; 
    1818        border: 0; 
     19} 
     20.datepicker_rtl { 
     21        direction: rtl; 
    1922} 
    2023.datepicker_dialog { 
     
    6568        width: 34%; 
    6669} 
     70.datepicker_rtl .datepicker_clear, .datepicker_rtl .datepicker_prev { 
     71        float: right; 
     72        text-align: right; 
     73} 
    6774.datepicker_current { 
    6875        float: left; 
     
    7481        width: 34%; 
    7582        text-align: right; 
     83} 
     84.datepicker_rtl .datepicker_close, .datepicker_rtl .datepicker_next { 
     85        float: left; 
     86        text-align: left; 
    7687} 
    7788.datepicker_header { 
     
    104115        color: #666; 
    105116} 
     117.datepicker_weekCol { 
     118        background: #777; 
     119        color: #fff; 
     120} 
    106121.datepicker_daysCell { 
    107122        color: #000; 
     
    114129        background: #ddd; 
    115130} 
     131.datepicker_titleRow .datepicker_weekEndCell { 
     132        background: #777; 
     133} 
    116134.datepicker_daysCellOver { 
    117135        background: #fff; 
     
    126144.datepicker_currentDay { 
    127145        background: #999 !important; 
     146} 
     147.datepicker_status { 
     148        background: #ddd; 
     149        width: 100%; 
     150        font-size: 80%; 
     151        text-align: center; 
    128152} 
    129153 
  • worklogplugin/0.11/worklog/htdocs/ui.datepicker.js

    r2741 r3490  
    1 /* jQuery UI Date Picker v3.0 - previously jQuery Calendar 
    2    Written by Marc Grabanski (m@marcgrabanski.com) and Keith Wood (kbwood@iprimus.com.au). 
     1/* jQuery UI Date Picker v3.4.3 (previously jQuery Calendar) 
     2   Written by Marc Grabanski (m@marcgrabanski.com) and Keith Wood (kbwood@virginbroadband.com.au). 
    33 
    44   Copyright (c) 2007 Marc Grabanski (http://marcgrabanski.com/code/ui-datepicker) 
     
    66   and GPL (GPL-LICENSE.txt) licenses. 
    77   Date: 09-03-2007  */ 
     8    
     9;(function($) { // hide the namespace 
    810 
    911/* Date picker manager. 
     
    1113   Settings for (groups of) date pickers are maintained in an instance object 
    1214   (DatepickerInstance), allowing multiple different settings on the same page. */ 
    13     
    14 (function($) { // hide the namespace 
    1515 
    1616function Datepicker() { 
     
    2525        this.regional[''] = { // Default regional settings 
    2626                clearText: 'Clear', // Display text for clear link 
     27                clearStatus: 'Erase the current date', // Status text for clear link 
    2728                closeText: 'Close', // Display text for close link 
    28                 prevText: '&lt;Prev', // Display text for previous month link 
    29                 nextText: 'Next&gt;', // Display text for next month link 
     29                closeStatus: 'Close without change', // Status text for close link 
     30                prevText: '&#x3c;Prev', // Display text for previous month link 
     31                prevStatus: 'Show the previous month', // Status text for previous month link 
     32                nextText: 'Next&#x3e;', // Display text for next month link 
     33                nextStatus: 'Show the next month', // Status text for next month link 
    3034                currentText: 'Today', // Display text for current month link 
    31                 dayNames: ['Su','Mo','Tu','We','Th','Fr','Sa'], // Names of days starting at Sunday 
     35                currentStatus: 'Show the current month', // Status text for current month link 
    3236                monthNames: ['January','February','March','April','May','June', 
    33                         'July','August','September','October','November','December'], // Names of months 
    34                 dateFormat: 'MDY/', // First three are day, month, year in the required order, 
    35                         // fourth (optional) is the separator, e.g. US would be 'MDY/', ISO would be 'YMD-' 
    36                 firstDay: 0 // The first day of the week, Sun = 0, Mon = 1, ... 
     37                        'July','August','September','October','November','December'], // Names of months for drop-down and formatting 
     38                monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], // For formatting 
     39                monthStatus: 'Show a different month', // Status text for selecting a month 
     40                yearStatus: 'Show a different year', // Status text for selecting a year 
     41                weekHeader: 'Wk', // Header for the week of the year column 
     42                weekStatus: 'Week of the year', // Status text for the week of the year column 
     43                dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], // For formatting 
     44                dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], // For formatting 
     45                dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], // Column headings for days starting at Sunday 
     46                dayStatus: 'Set DD as first week day', // Status text for the day of the week selection 
     47                dateStatus: 'Select DD, M d', // Status text for the date selection 
     48                dateFormat: 'mm/dd/yy', // See format options on parseDate 
     49                firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ... 
     50                initStatus: 'Select a date', // Initial Status text on opening 
     51                isRTL: false // True if right-to-left language, false if left-to-right 
    3752        }; 
    3853        this._defaults = { // Global defaults for all the date picker instances 
    3954                showOn: 'focus', // 'focus' for popup on focus, 
    4055                        // 'button' for trigger button, or 'both' for either 
     56                showAnim: 'show', // Name of jQuery animation for popup 
    4157                defaultDate: null, // Used when field is blank: actual date, 
    4258                        // +/-number for offset from today, null for today 
     
    4763                closeAtTop: true, // True to have the clear/close at the top, 
    4864                        // false to have them at the bottom 
     65                mandatory: false, // True to hide the Clear link, false to include it 
    4966                hideIfNoPrevNext: false, // True to hide next/previous month links 
    5067                        // if not applicable, false to just disable them 
     
    5572                changeFirstDay: true, // True to click on day name to change, false to remain as set 
    5673                showOtherMonths: false, // True to show dates in other months, false to leave blank 
    57                 useShortYear: false, // True to show years as YY, false to show them as YYYY 
     74                showWeeks: false, // True to show week of the year, false to omit 
     75                calculateWeek: this.iso8601Week, // How to calculate the week of the year, 
     76                        // takes a Date and returns the number of the week for it 
    5877                shortYearCutoff: '+10', // Short year values < this are in the current century, 
    5978                        // > this are in the previous century,  
    6079                        // string value starting with '+' for current year + value 
     80                showStatus: false, // True to show status bar at bottom, false to not show it 
     81                statusForDate: this.dateStatus, // Function to provide status text for a date - 
     82                        // takes date and instance as parameters, returns display text 
    6183                minDate: null, // The earliest selectable date, or null for no limit 
    6284                maxDate: null, // The latest selectable date, or null for no limit 
    63                 speed: 'medium', // Speed of display/closure 
     85                speed: 'normal', // Speed of display/closure 
    6486                beforeShowDay: null, // Function that takes a date and returns an array with 
    6587                        // [0] = true if selectable, false if not, 
     
    6890                        // returns a set of custom settings for the date picker 
    6991                onSelect: null, // Define a callback function when a date is selected 
     92                onClose: null, // Define a callback function when the datepicker is closed 
    7093                numberOfMonths: 1, // Number of months to show at a time 
    7194                stepMonths: 1, // Number of months to step back/forward 
     
    7497        }; 
    7598        $.extend(this._defaults, this.regional['']); 
    76         this._datepickerDiv = $('<div id="datepicker_div"></div>'); 
     99        this._datepickerDiv = $('<div id="datepicker_div">'); 
    77100} 
    78101 
     
    83106        /* Debug logging (if enabled). */ 
    84107        log: function () { 
    85                 if (this.debug) { 
     108                if (this.debug) 
    86109                        console.log.apply('', arguments); 
    87                 } 
    88110        }, 
    89111         
     
    108130        }, 
    109131 
     132        /* Attach the date picker to a jQuery selection. 
     133           @param  target    element - the target input field or division or span 
     134           @param  settings  object - the new settings to use for this date picker instance (anonymous) */ 
     135        _attachDatepicker: function(target, settings) { 
     136                // check for settings on the control itself - in namespace 'date:' 
     137                var inlineSettings = null; 
     138                for (attrName in this._defaults) { 
     139                        var attrValue = target.getAttribute('date:' + attrName); 
     140                        if (attrValue) { 
     141                                inlineSettings = inlineSettings || {}; 
     142                                try { 
     143                                        inlineSettings[attrName] = eval(attrValue); 
     144                                } catch (err) { 
     145                                        inlineSettings[attrName] = attrValue; 
     146                                } 
     147                        } 
     148                } 
     149                var nodeName = target.nodeName.toLowerCase(); 
     150                var instSettings = (inlineSettings ?  
     151                        $.extend(settings || {}, inlineSettings || {}) : settings); 
     152                if (nodeName == 'input') { 
     153                        var inst = (inst && !inlineSettings ? inst : 
     154                                new DatepickerInstance(instSettings, false)); 
     155                        this._connectDatepicker(target, inst); 
     156                } else if (nodeName == 'div' || nodeName == 'span') { 
     157                        var inst = new DatepickerInstance(instSettings, true); 
     158                        this._inlineDatepicker(target, inst); 
     159                } 
     160        }, 
     161 
     162        /* Detach a datepicker from its control. 
     163           @param  target    element - the target input field or division or span */ 
     164        _destroyDatepicker: function(target) { 
     165                var nodeName = target.nodeName.toLowerCase(); 
     166                var calId = target._calId; 
     167                target._calId = null; 
     168                var $target = $(target); 
     169                if (nodeName == 'input') { 
     170                        $target.siblings('.datepicker_append').replaceWith('').end() 
     171                                .siblings('.datepicker_trigger').replaceWith('').end() 
     172                                .removeClass(this.markerClassName) 
     173                                .unbind('focus', this._showDatepicker) 
     174                                .unbind('keydown', this._doKeyDown) 
     175                                .unbind('keypress', this._doKeyPress); 
     176                        var wrapper = $target.parents('.datepicker_wrap'); 
     177                        if (wrapper) 
     178                                wrapper.replaceWith(wrapper.html()); 
     179                } else if (nodeName == 'div' || nodeName == 'span') 
     180                        $target.removeClass(this.markerClassName).empty(); 
     181                if ($('input[_calId=' + calId + ']').length == 0) 
     182                        // clean up if last for this ID 
     183                        this._inst[calId] = null; 
     184        }, 
     185 
     186        /* Enable the date picker to a jQuery selection. 
     187           @param  target    element - the target input field or division or span */ 
     188        _enableDatepicker: function(target) { 
     189                target.disabled = false; 
     190                $(target).siblings('button.datepicker_trigger').each(function() { this.disabled = false; }).end() 
     191                        .siblings('img.datepicker_trigger').css({opacity: '1.0', cursor: ''}); 
     192                this._disabledInputs = $.map(this._disabledInputs, 
     193                        function(value) { return (value == target ? null : value); }); // delete entry 
     194        }, 
     195 
     196        /* Disable the date picker to a jQuery selection. 
     197           @param  target    element - the target input field or division or span */ 
     198        _disableDatepicker: function(target) { 
     199                target.disabled = true; 
     200                $(target).siblings('button.datepicker_trigger').each(function() { this.disabled = true; }).end() 
     201                        .siblings('img.datepicker_trigger').css({opacity: '0.5', cursor: 'default'}); 
     202                this._disabledInputs = $.map($.datepicker._disabledInputs, 
     203                        function(value) { return (value == target ? null : value); }); // delete entry 
     204                this._disabledInputs[$.datepicker._disabledInputs.length] = target; 
     205        }, 
     206 
     207        /* Is the first field in a jQuery collection disabled as a datepicker? 
     208           @param  target    element - the target input field or division or span 
     209           @return boolean - true if disabled, false if enabled */ 
     210        _isDisabledDatepicker: function(target) { 
     211                if (!target) 
     212                        return false; 
     213                for (var i = 0; i < this._disabledInputs.length; i++) { 
     214                        if (this._disabledInputs[i] == target) 
     215                                return true; 
     216                } 
     217                return false; 
     218        }, 
     219 
     220        /* Update the settings for a date picker attached to an input field or division. 
     221           @param  target  element - the target input field or division or span 
     222           @param  name    string - the name of the setting to change or 
     223                           object - the new settings to update 
     224           @param  value   any - the new value for the setting (omit if above is an object) */ 
     225        _changeDatepicker: function(target, name, value) { 
     226                var settings = name || {}; 
     227                if (typeof name == 'string') { 
     228                        settings = {}; 
     229                        settings[name] = value; 
     230                } 
     231                if (inst = this._getInst(target._calId)) { 
     232                        extendRemove(inst._settings, settings); 
     233                        this._updateDatepicker(inst); 
     234                } 
     235        }, 
     236 
     237        /* Set the dates for a jQuery selection. 
     238           @param  target   element - the target input field or division or span 
     239           @param  date     Date - the new date 
     240           @param  endDate  Date - the new end date for a range (optional) */ 
     241        _setDateDatepicker: function(target, date, endDate) { 
     242                if (inst = this._getInst(target._calId)) { 
     243                        inst._setDate(date, endDate); 
     244                        this._updateDatepicker(inst); 
     245                } 
     246        }, 
     247 
     248        /* Get the date(s) for the first entry in a jQuery selection. 
     249           @param  target  element - the target input field or division or span 
     250           @return Date - the current date or 
     251                   Date[2] - the current dates for a range */ 
     252        _getDateDatepicker: function(target) { 
     253                var inst = this._getInst(target._calId); 
     254                return (inst ? inst._getDate() : null); 
     255        }, 
     256 
    110257        /* Handle keystrokes. */ 
    111258        _doKeyDown: function(e) { 
    112259                var inst = $.datepicker._getInst(this._calId); 
    113                 if ($.datepicker._datepickerShowing) { 
     260                if ($.datepicker._datepickerShowing) 
    114261                        switch (e.keyCode) { 
    115                                 case 9:  $.datepicker.hideDatepicker(''); 
     262                                case 9:  $.datepicker._hideDatepicker(null, ''); 
    116263                                                break; // hide on tab out 
    117264                                case 13: $.datepicker._selectDay(inst, inst._selectedMonth, inst._selectedYear, 
    118265                                                        $('td.datepicker_daysCellOver', inst._datepickerDiv)[0]); 
     266                                                return false; // don't submit the form 
    119267                                                break; // select the value on enter 
    120                                 case 27: $.datepicker.hideDatepicker(inst._get('speed')); 
     268                                case 27: $.datepicker._hideDatepicker(null, inst._get('speed')); 
    121269                                                break; // hide on escape 
    122270                                case 33: $.datepicker._adjustDate(inst, 
     
    139287                                                break; // +1 week on ctrl+down 
    140288                        } 
    141                 } 
    142                 else if (e.keyCode == 36 && e.ctrlKey) { // display the date picker on ctrl+home 
    143                         $.datepicker.showFor(this); 
    144                 } 
    145         }, 
    146  
    147         /* Filter entered characters. */ 
     289                else if (e.keyCode == 36 && e.ctrlKey) // display the date picker on ctrl+home 
     290                        $.datepicker._showDatepicker(this); 
     291        }, 
     292 
     293        /* Filter entered characters - based on date format. */ 
    148294        _doKeyPress: function(e) { 
    149295                var inst = $.datepicker._getInst(this._calId); 
     296                var chars = $.datepicker._possibleChars(inst._get('dateFormat')); 
    150297                var chr = String.fromCharCode(e.charCode == undefined ? e.keyCode : e.charCode); 
    151                 return (chr < ' ' || chr == inst._get('dateFormat').charAt(3) || 
    152                         (chr >= '0' && chr <= '9')); // only allow numbers and separator 
     298                return e.ctrlKey || (chr < ' ' || !chars || chars.indexOf(chr) > -1); 
    153299        }, 
    154300 
     
    156302        _connectDatepicker: function(target, inst) { 
    157303                var input = $(target); 
    158                 if (this._hasClass(input, this.markerClassName)) { 
     304                if (input.is('.' + this.markerClassName)) 
    159305                        return; 
    160                 } 
    161306                var appendText = inst._get('appendText'); 
     307                var isRTL = inst._get('isRTL'); 
    162308                if (appendText) { 
    163                         input.after('<span class="datepicker_append">' + appendText + '</span>'); 
     309                        if (isRTL) 
     310                                input.before('<span class="datepicker_append">' + appendText); 
     311                        else 
     312                                input.after('<span class="datepicker_append">' + appendText); 
    164313                } 
    165314                var showOn = inst._get('showOn'); 
    166                 if (showOn == 'focus' || showOn == 'both') { // pop-up date picker when in the marked field 
    167                         input.focus(this.showFor); 
    168                 } 
     315                if (showOn == 'focus' || showOn == 'both') // pop-up date picker when in the marked field 
     316                        input.focus(this._showDatepicker); 
    169317                if (showOn == 'button' || showOn == 'both') { // pop-up date picker when button clicked 
     318                        input.wrap('<span class="datepicker_wrap">'); 
    170319                        var buttonText = inst._get('buttonText'); 
    171320                        var buttonImage = inst._get('buttonImage'); 
    172                         var buttonImageOnly = inst._get('buttonImageOnly'); 
    173                         var trigger = $(buttonImageOnly ? '<img class="datepicker_trigger" src="' + 
    174                                 buttonImage + '" alt="' + buttonText + '" title="' + buttonText + '"/>' : 
    175                                 '<button type="button" class="datepicker_trigger">' + (buttonImage != '' ? 
    176                                 '<img src="' + buttonImage + '" alt="' + buttonText + '" title="' + buttonText + '"/>' : 
    177                                 buttonText) + '</button>'); 
    178                         input.wrap('<span class="datepicker_wrap"></span>').after(trigger); 
    179                         trigger.click(this.showFor); 
    180                 } 
    181                 input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress); 
     321                        var trigger = $(inst._get('buttonImageOnly') ?  
     322                                $('<img>').addClass('datepicker_trigger').attr({ src: buttonImage, alt: buttonText, title: buttonText }) : 
     323                                $('<button>').addClass('datepicker_trigger').attr({ type: 'button' }).html(buttonImage != '' ?  
     324                                                $('<img>').attr({ src:buttonImage, alt:buttonText, title:buttonText }) : buttonText)); 
     325                        if (isRTL) 
     326                                input.before(trigger); 
     327                        else 
     328                                input.after(trigger); 
     329                        trigger.click(function() { 
     330                                if ($.datepicker._datepickerShowing && $.datepicker._lastInput == target) 
     331                                        $.datepicker._hideDatepicker(); 
     332                                else 
     333                                        $.datepicker._showDatepicker(target); 
     334                        }); 
     335        } 
     336                input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress) 
     337                        .bind("setData.datepicker", function(event, key, value) { 
     338                                inst._settings[key] = value; 
     339                        }).bind("getData.datepicker", function(event, key) { 
     340                                return inst._get(key); 
     341                        }); 
    182342                input[0]._calId = inst._id; 
    183343        }, 
     
    186346        _inlineDatepicker: function(target, inst) { 
    187347                var input = $(target); 
    188                 if (this._hasClass(input, this.markerClassName)) { 
     348                if (input.is('.' + this.markerClassName)) 
    189349                        return; 
    190                 } 
    191                 input.addClass(this.markerClassName).append(inst._datepickerDiv); 
     350                input.addClass(this.markerClassName).append(inst._datepickerDiv) 
     351                        .bind("setData.datepicker", function(event, key, value){ 
     352                                inst._settings[key] = value; 
     353                        }).bind("getData.datepicker", function(event, key){ 
     354                                return inst._get(key); 
     355                        }); 
    192356                input[0]._calId = inst._id; 
    193357                this._updateDatepicker(inst); 
    194                 inst._datepickerDiv.resize(function() { $.datepicker._inlineShow(inst); }); 
    195358        }, 
    196359 
    197360        /* Tidy up after displaying the date picker. */ 
    198361        _inlineShow: function(inst) { 
    199                 var numMonths = inst._get('numberOfMonths'); // fix width for dynamic number of date pickers 
    200                 numMonths = (numMonths == null ? 1 : (typeof numMonths == 'number' ? numMonths : numMonths[1])); 
    201                 inst._datepickerDiv.width(numMonths * $('.datepicker', inst._datepickerDiv[0]).width()); 
    202         }, 
    203  
    204         /* Does this element have a particular class? */ 
    205         _hasClass: function(element, className) { 
    206                 var classes = element.attr('class'); 
    207                 return (classes && classes.indexOf(className) > -1); 
    208         }, 
     362                var numMonths = inst._getNumberOfMonths(); // fix width for dynamic number of date pickers 
     363                inst._datepickerDiv.width(numMonths[1] * $('.datepicker', inst._datepickerDiv[0]).width()); 
     364        },  
    209365 
    210366        /* Pop-up the date picker in a "dialog" box. 
     367           @param  input     element - ignored 
    211368           @param  dateText  string - the initial date to display (in the current format) 
    212369           @param  onSelect  function - the function(dateText) to call when a date is selected 
    213370           @param  settings  object - update the dialog date picker instance's settings (anonymous object) 
    214            @param  pos       int[2] - coordinates for the dialog's position within the screen 
     371           @param  pos       int[2] - coordinates for the dialog's position within the screen or 
     372                             event - with x/y coordinates or 
    215373                             leave empty for default (screen centre) 
    216374           @return the manager object */ 
    217         dialogDatepicker: function(dateText, onSelect, settings, pos) { 
     375        _dialogDatepicker: function(input, dateText, onSelect, settings, pos) { 
    218376                var inst = this._dialogInst; // internal instance 
    219377                if (!inst) { 
     
    227385                this._dialogInput.val(dateText); 
    228386 
    229                 var viewportWidth; 
    230                 var viewportHeight; 
    231                 if (window.innerWidth) { // Mozilla/Netscape/Opera/IE7 
    232                         viewportWidth = window.innerWidth, 
    233                         viewportHeight = window.innerHeight 
    234                 } 
    235                 else if (document.documentElement && document.documentElement.clientWidth && 
    236                                 document.documentElement.clientWidth != 0) { // IE6 standards compliant 
    237                         viewportWidth = document.documentElement.clientWidth, 
    238                         viewportHeight = document.documentElement.clientHeight 
    239                 } 
    240                 else { // older IE 
    241                         viewportWidth = document.getElementsByTagName('body')[0].clientWidth, 
    242                         viewportHeight = document.getElementsByTagName('body')[0].clientHeight 
    243                 } 
    244                  
    245                 this._pos = pos || // should use actual width/height below 
    246                         [(viewportWidth / 2) - 100, (viewportHeight / 2) - 150]; 
    247                 this._pos[1] = this._pos[1] + // add the browser scroll position to the height 
    248                         (document.documentElement && document.documentElement.scrollTop ? 
    249                         document.documentElement.scrollTop : document.body.scrollTop); 
     387                this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null); 
     388                if (!this._pos) { 
     389                        var browserWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; 
     390                        var browserHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight; 
     391                        var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft; 
     392                        var scrollY = document.documentElement.scrollTop || document.body.scrollTop; 
     393                        this._pos = // should use actual width/height below 
     394                                [(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY]; 
     395                } 
    250396 
    251397                // move input on screen for focus, but hidden behind dialog 
     
    254400                this._inDialog = true; 
    255401                this._datepickerDiv.addClass('datepicker_dialog'); 
    256                 this.showFor(this._dialogInput[0]); 
    257                 if ($.blockUI) { 
     402                this._showDatepicker(this._dialogInput[0]); 
     403                if ($.blockUI) 
    258404                        $.blockUI(this._datepickerDiv); 
    259                 } 
    260405                return this; 
    261406        }, 
    262407 
    263         /* Enable the input field(s) for entry. 
    264            @param  inputs  element - single input field or 
    265                            string - the ID or other jQuery selector of the input field(s) or 
    266                            object - jQuery collection of input fields 
    267            @return the manager object */ 
    268         enableFor: function(inputs) { 
    269                 inputs = (inputs.jquery ? inputs : $(inputs)); 
    270                 inputs.each(function() { 
    271                         this.disabled = false; 
    272                         $(this).siblings('button.datepicker_trigger').each(function() { this.disabled = false; }); 
    273                         $(this).siblings('img.datepicker_trigger').css({opacity: '1.0', cursor: ''}); 
    274                         var $this = this; 
    275                         $.datepicker._disabledInputs = $.map($.datepicker._disabledInputs, 
    276                                 function(value) { return (value == $this ? null : value); }); // delete entry 
    277                 }); 
    278                 return this; 
    279         }, 
    280  
    281         /* Disable the input field(s) from entry. 
    282            @param  inputs  element - single input field or 
    283                            string - the ID or other jQuery selector of the input field(s) or 
    284                            object - jQuery collection of input fields 
    285            @return the manager object */ 
    286         disableFor: function(inputs) { 
    287                 inputs = (inputs.jquery ? inputs : $(inputs)); 
    288                 inputs.each(function() { 
    289                         this.disabled = true; 
    290                         $(this).siblings('button.datepicker_trigger').each(function() { this.disabled = true; }); 
    291                         $(this).siblings('img.datepicker_trigger').css({opacity: '0.5', cursor: 'default'}); 
    292                         var $this = this; 
    293                         $.datepicker._disabledInputs = $.map($.datepicker._disabledInputs, 
    294                                 function(value) { return (value == $this ? null : value); }); // delete entry 
    295                         $.datepicker._disabledInputs[$.datepicker._disabledInputs.length] = this; 
    296                 }); 
    297                 return this; 
    298         }, 
    299  
    300         /* Is the input field disabled? 
    301            @param  input  element - single input field or 
    302                           string - the ID or other jQuery selector of the input field or 
    303                           object - jQuery collection of input field 
    304            @return boolean - true if disabled, false if enabled */ 
    305         isDisabled: function(input) { 
    306                 input = (input.jquery ? input[0] : (typeof input == 'string' ? $(input)[0] : input)); 
    307                 for (var i = 0; i < $.datepicker._disabledInputs.length; i++) { 
    308                         if ($.datepicker._disabledInputs[i] == input) { 
    309                                 return true; 
    310                         } 
    311                 } 
    312                 return false; 
    313         }, 
    314  
    315         /* Update the settings for a date picker attached to an input field or division. 
    316            @param  control   element - the input field or div/span attached to the date picker or 
    317                              string - the ID or other jQuery selector of the input field or 
    318                              object - jQuery object for input field or div/span 
    319            @param  settings  object - the new settings to update 
    320            @return the manager object */ 
    321         reconfigureFor: function(control, settings) { 
    322                 control = (control.jquery ? control[0] : 
    323                         (typeof control == 'string' ? $(control)[0] : control)); 
    324                 var inst = this._getInst(control._calId); 
    325             &n