Changeset 6004

Show
Ignore:
Timestamp:
06/05/09 17:23:39 (1 year ago)
Author:
kinoshita
Message:

8007

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • spinelz/trunk/compress/javascripts/spinelz/datepicker.js

    r6003 r6004  
    180180_3a.className=this.classNames["today"]+" "+_3a.className; 
    181181this.todayCell=id; 
    182 this.hovers[id].refresh(); 
     182this.hovers[id].resetClasses(); 
    183183} 
    184184day++; 
     
    192192return !_3b.include(_3d); 
    193193}).join(" "); 
    194 this.hovers[this.todayCell].refresh(); 
     194this.hovers[this.todayCell].resetClasses(); 
    195195} 
    196196this.todayCell=null; 
     
    309309}.bind(this)); 
    310310}.bind(this)); 
     311$H(this.hovers).each(function(_56){ 
     312_56.value.resetClasses(); 
     313}); 
    311314}}; 
    312315 
  • spinelz/trunk/compress/javascripts/spinelz/spinelz_for_rubricks.js

    r6003 r6004  
    32073207_3a.className=this.classNames["today"]+" "+_3a.className; 
    32083208this.todayCell=id; 
    3209 this.hovers[id].refresh(); 
     3209this.hovers[id].resetClasses(); 
    32103210} 
    32113211day++; 
     
    32193219return !_3b.include(_3d); 
    32203220}).join(" "); 
    3221 this.hovers[this.todayCell].refresh(); 
     3221this.hovers[this.todayCell].resetClasses(); 
    32223222} 
    32233223this.todayCell=null; 
     
    33363336}.bind(this)); 
    33373337}.bind(this)); 
     3338$H(this.hovers).each(function(_56){ 
     3339_56.value.resetClasses(); 
     3340}); 
    33383341}}; 
    33393342 
  • spinelz/trunk/compress/javascripts/spinelz_lib/spinelz_util.js

    r6002 r6004  
    497497this.element=_b8; 
    498498},build:function(_bb){ 
    499 this.normal=this.getNormalClass(_bb); 
    500 this.hover=this.getHoverClass(this.normal); 
    501 if(this.options.cssUtil){ 
    502 this.normal=this.options.cssUtil.joinClassNames(normal); 
    503 this.hover=this.options.cssUtil.joinClassNames(hover); 
    504 
     499this.setClasses(_bb); 
    505500this.setHoverEvent(_bb); 
    506501},setHoverEvent:function(_bc){ 
    507 this.mouseout=this.toggle.bindAsEventListener(this,_bc,this.normal); 
    508 this.mouseover=this.toggle.bindAsEventListener(this,_bc,this.hover); 
     502this.mouseout=this.setNormalClass.bindAsEventListener(this); 
     503this.mouseover=this.setHoverClass.bindAsEventListener(this); 
    509504Event.observe(_bc,"mouseout",this.mouseout); 
    510505Event.observe(_bc,"mouseover",this.mouseover); 
     
    514509_be.className=_bf; 
    515510} 
    516 },getNormalClass:function(_c0){ 
    517 var _c1=(this.options.defaultClass||_c0.className); 
    518 return (_c1||""); 
    519 },getHoverClass:function(_c2){ 
    520 var _c3=this.options.hoverClass; 
    521 if(!_c3){ 
    522 _c3=_c2.split(" ").collect(function(c){ 
     511},setClasses:function(_c0){ 
     512this.normal=this.getNormalClass(_c0); 
     513this.hover=this.getHoverClass(this.normal); 
     514if(this.options.cssUtil){ 
     515this.normal=this.options.cssUtil.joinClassNames(normal); 
     516this.hover=this.options.cssUtil.joinClassNames(hover); 
     517
     518},resetClasses:function(){ 
     519this.setClasses(this.element); 
     520},setNormalClass:function(_c1){ 
     521Event.stop(_c1); 
     522if(this.options.beforeToggle()){ 
     523this.element.className=this.normal; 
     524
     525},setHoverClass:function(_c2){ 
     526Event.stop(_c2); 
     527if(this.options.beforeToggle()){ 
     528this.element.className=this.hover; 
     529
     530},getNormalClass:function(_c3){ 
     531var _c4=(this.options.defaultClass||_c3.className); 
     532return (_c4||""); 
     533},getHoverClass:function(_c5){ 
     534var _c6=this.options.hoverClass; 
     535if(!_c6){ 
     536_c6=_c5.split(" ").collect(function(c){ 
    523537return c+"Hover"; 
    524538}).join(" "); 
    525539} 
    526 return _c3
     540return _c6
    527541},destroy:function(){ 
    528542Event.stopObserving(this.element,"mouseout",this.mouseout); 
     
    536550Object.extend(Date.prototype,{msPerDay:function(){ 
    537551return 24*60*60*1000; 
    538 },advance:function(_c5){ 
    539 return new Date(this.getTime()+this.msPerDay()*_c5.days); 
     552},advance:function(_c8){ 
     553return new Date(this.getTime()+this.msPerDay()*_c8.days); 
    540554},days:function(){ 
    541 var _c6=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0); 
    542 return Math.round(_c6.getTime()/this.msPerDay()); 
     555var _c9=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0); 
     556return Math.round(_c9.getTime()/this.msPerDay()); 
    543557},minutes:function(){ 
    544558return Math.round(this.getTime()/(60*1000)); 
    545559},toHash:function(){ 
    546560return {year:this.getFullYear(),month:this.getMonth(),day:this.getDate(),hour:this.getHours(),min:this.getMinutes(),sec:this.getSeconds()}; 
    547 },sameYear:function(_c7){ 
    548 return this.getFullYear()==_c7.getFullYear(); 
    549 },sameMonth:function(_c8){ 
    550 return this.sameYear(_c8)&&this.getMonth()==_c8.getMonth(); 
    551 },sameDate:function(_c9){ 
    552 return this.sameYear(_c9)&&this.sameMonth(_c9)&&this.getDate()==_c9.getDate(); 
    553 },betweenDate:function(_ca,_cb){ 
    554 var _cc=this.days(); 
    555 return (_ca.days()<=_cc&&_cc<=_cb.days()); 
    556 },betweenTime:function(_cd,_ce){ 
    557 var _cf=this.getTime(); 
    558 return (_cd.getTime()<=_cf&&_cf<=_ce.getTime()); 
    559 },strftime:function(_d0){ 
    560 return DateUtil.simpleFormat(_d0)(this); 
     561},sameYear:function(_ca){ 
     562return this.getFullYear()==_ca.getFullYear(); 
     563},sameMonth:function(_cb){ 
     564return this.sameYear(_cb)&&this.getMonth()==_cb.getMonth(); 
     565},sameDate:function(_cc){ 
     566return this.sameYear(_cc)&&this.sameMonth(_cc)&&this.getDate()==_cc.getDate(); 
     567},betweenDate:function(_cd,_ce){ 
     568var _cf=this.days(); 
     569return (_cd.days()<=_cf&&_cf<=_ce.days()); 
     570},betweenTime:function(_d0,_d1){ 
     571var _d2=this.getTime(); 
     572return (_d0.getTime()<=_d2&&_d2<=_d1.getTime()); 
     573},strftime:function(_d3){ 
     574return DateUtil.simpleFormat(_d3)(this); 
    561575}}); 
    562 var DateUtil={dayOfWeek:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],daysOfMonth:[31,28,31,30,31,30,31,31,30,31,30,31],numberOfDays:function(_d1,_d2){ 
    563 return _d2.days()-_d1.days(); 
    564 },isLeapYear:function(_d3){ 
    565 if(((_d3%4==0)&&(_d3%100!=0))||(_d3%400==0)){ 
     576var DateUtil={dayOfWeek:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],daysOfMonth:[31,28,31,30,31,30,31,31,30,31,30,31],numberOfDays:function(_d4,_d5){ 
     577return _d5.days()-_d4.days(); 
     578},isLeapYear:function(_d6){ 
     579if(((_d6%4==0)&&(_d6%100!=0))||(_d6%400==0)){ 
    566580return true; 
    567581} 
    568582return false; 
    569 },nextDate:function(_d4){ 
    570 return new Date(_d4.getFullYear(),_d4.getMonth(),_d4.getDate()+1); 
    571 },previousDate:function(_d5){ 
    572 return new Date(_d5.getFullYear(),_d5.getMonth(),_d5.getDate()-1); 
    573 },afterDays:function(_d6,_d7){ 
    574 return new Date(_d6.getFullYear(),_d6.getMonth(),_d6.getDate()+_d7); 
    575 },getLastDate:function(_d8,_d9){ 
    576 var _da=this.daysOfMonth[_d9]; 
    577 if((_d9==1)&&this.isLeapYear(_d8)){ 
    578 return new Date(_d8,_d9,_da+1); 
    579 } 
    580 return new Date(_d8,_d9,_da); 
    581 },getFirstDate:function(_db,_dc){ 
    582 if(_db.constructor==Date){ 
    583 return new Date(_db.getFullYear(),_db.getMonth(),1); 
    584 } 
    585 return new Date(_db,_dc,1); 
    586 },getWeekTurn:function(_dd,_de){ 
    587 var _df=6-_de+1; 
    588 var _e0=0; 
    589 while(_df<_dd){ 
    590 _dd-=7; 
    591 _e0++; 
    592 } 
    593 return _e0
    594 },toDateString:function(_e1){ 
    595 return _e1.toDateString(); 
    596 },toLocaleDateString:function(_e2){ 
    597 return _e2.toLocaleDateString(); 
    598 },simpleFormat:function(_e3){ 
    599 return function(_e4){ 
    600 var _e5=_e3.replace(/M+/g,DateUtil.zerofill((_e4.getMonth()+1).toString(),2)); 
    601 _e5=_e5.replace(/d+/g,DateUtil.zerofill(_e4.getDate().toString(),2)); 
    602 _e5=_e5.replace(/y{4}/g,_e4.getFullYear()); 
    603 _e5=_e5.replace(/y{1,3}/g,new String(_e4.getFullYear()).substr(2)); 
    604 _e5=_e5.replace(/E+/g,DateUtil.dayOfWeek[_e4.getDay()]); 
    605 return _e5
     583},nextDate:function(_d7){ 
     584return new Date(_d7.getFullYear(),_d7.getMonth(),_d7.getDate()+1); 
     585},previousDate:function(_d8){ 
     586return new Date(_d8.getFullYear(),_d8.getMonth(),_d8.getDate()-1); 
     587},afterDays:function(_d9,_da){ 
     588return new Date(_d9.getFullYear(),_d9.getMonth(),_d9.getDate()+_da); 
     589},getLastDate:function(_db,_dc){ 
     590var _dd=this.daysOfMonth[_dc]; 
     591if((_dc==1)&&this.isLeapYear(_db)){ 
     592return new Date(_db,_dc,_dd+1); 
     593} 
     594return new Date(_db,_dc,_dd); 
     595},getFirstDate:function(_de,_df){ 
     596if(_de.constructor==Date){ 
     597return new Date(_de.getFullYear(),_de.getMonth(),1); 
     598} 
     599return new Date(_de,_df,1); 
     600},getWeekTurn:function(_e0,_e1){ 
     601var _e2=6-_e1+1; 
     602var _e3=0; 
     603while(_e2<_e0){ 
     604_e0-=7; 
     605_e3++; 
     606} 
     607return _e3
     608},toDateString:function(_e4){ 
     609return _e4.toDateString(); 
     610},toLocaleDateString:function(_e5){ 
     611return _e5.toLocaleDateString(); 
     612},simpleFormat:function(_e6){ 
     613return function(_e7){ 
     614var _e8=_e6.replace(/M+/g,DateUtil.zerofill((_e7.getMonth()+1).toString(),2)); 
     615_e8=_e8.replace(/d+/g,DateUtil.zerofill(_e7.getDate().toString(),2)); 
     616_e8=_e8.replace(/y{4}/g,_e7.getFullYear()); 
     617_e8=_e8.replace(/y{1,3}/g,new String(_e7.getFullYear()).substr(2)); 
     618_e8=_e8.replace(/E+/g,DateUtil.dayOfWeek[_e7.getDay()]); 
     619return _e8
    606620}; 
    607 },zerofill:function(_e6,_e7){ 
    608 var _e8=_e6
    609 if(_e6.length<_e7){ 
    610 var tmp=_e7-_e6.length; 
     621},zerofill:function(_e9,_ea){ 
     622var _eb=_e9
     623if(_e9.length<_ea){ 
     624var tmp=_ea-_e9.length; 
    611625for(i=0;i<tmp;i++){ 
    612 _e8="0"+_e8
    613 } 
    614 } 
    615 return _e8
    616 },toDate:function(_ea){ 
    617 return new Date(_ea.year,_ea.month,_ea.day,_ea.hour||0,_ea.min||0,_ea.sec||0); 
     626_eb="0"+_eb
     627} 
     628} 
     629return _eb
     630},toDate:function(_ed){ 
     631return new Date(_ed.year,_ed.month,_ed.day,_ed.hour||0,_ed.min||0,_ed.sec||0); 
    618632}}; 
    619 var ZindexManager={zIndex:1000,getIndex:function(_eb){ 
    620 if(_eb){ 
    621 if(isNaN(_eb)){ 
    622 _eb=Element.getMaxZindex()+1; 
    623 }else{ 
    624 if(ZindexManager.zIndex>_eb){ 
    625 _eb=ZindexManager.zIndex; 
    626 } 
    627 } 
    628 }else{ 
    629 _eb=ZindexManager.zIndex; 
    630 } 
    631 ZindexManager.zIndex=_eb+1; 
    632 return _eb
     633var ZindexManager={zIndex:1000,getIndex:function(_ee){ 
     634if(_ee){ 
     635if(isNaN(_ee)){ 
     636_ee=Element.getMaxZindex()+1; 
     637}else{ 
     638if(ZindexManager.zIndex>_ee){ 
     639_ee=ZindexManager.zIndex; 
     640} 
     641} 
     642}else{ 
     643_ee=ZindexManager.zIndex; 
     644} 
     645ZindexManager.zIndex=_ee+1; 
     646return _ee
    633647}}; 
    634 var Modal={maskId:"modalMask",maskClass:"modal_mask",maskClassIE:"modal_mask_ie",element:null,snaps:null,listener:null,resizeListener:null,cover:null,excepteds:null,maskCallbacks:[],unmaskCallbacks:[],count:0,tabKey:9,timer:null,mask:function(_ec,_ed,_ee){ 
    635 this._mask.callAfterLoading(this,_ec,_ed,_ee); 
     648var Modal={maskId:"modalMask",maskClass:"modal_mask",maskClassIE:"modal_mask_ie",element:null,snaps:null,listener:null,resizeListener:null,cover:null,excepteds:null,maskCallbacks:[],unmaskCallbacks:[],count:0,tabKey:9,timer:null,mask:function(_ef,_f0,_f1){ 
     649this._mask.callAfterLoading(this,_ef,_f0,_f1); 
    636650this._control_tab_key(); 
    637 },unmask:function(_ef){ 
    638 this._unmask($(_ef)); 
     651},unmask:function(_f2){ 
     652this._unmask($(_f2)); 
    639653this._control_tab_key(); 
    640654},unmaskAll:function(){ 
    641655var max=10; 
    642 var _f1=0; 
    643 while(this._isMasked()&&(_f1<max)){ 
     656var _f4=0; 
     657while(this._isMasked()&&(_f4<max)){ 
    644658this._unmask(); 
    645 _f1++; 
     659_f4++; 
    646660} 
    647661this._control_tab_key(); 
    648 },addMaskCallback:function(_f2){ 
     662},addMaskCallback:function(_f5){ 
    649663if(!this.maskCallbacks.any(function(c){ 
    650 return c==_f2
     664return c==_f5
    651665})){ 
    652 this.maskCallbacks.push(_f2); 
    653 } 
    654 },removeMaskCallback:function(_f4){ 
     666this.maskCallbacks.push(_f5); 
     667} 
     668},removeMaskCallback:function(_f7){ 
    655669this.maskCallbacks=this.maskCallbacks.reject(function(c){ 
    656 return c==_f4
     670return c==_f7
    657671}); 
    658672},clearMaskCallback:function(){ 
    659673this.maskCallbacks=[]; 
    660 },addUnmaskCallback:function(_f6){ 
     674},addUnmaskCallback:function(_f9){ 
    661675if(!this.unmaskCallbacks.any(function(c){ 
    662 return c==_f6
     676return c==_f9
    663677})){ 
    664 this.unmaskCallbacks.push(_f6); 
    665 } 
    666 },removeUnmaskCallback:function(_f8){ 
     678this.unmaskCallbacks.push(_f9); 
     679} 
     680},removeUnmaskCallback:function(_fb){ 
    667681this.unmaskCallbacks=this.unmaskCallbacks.reject(function(c){ 
    668 return c==_f8
     682return c==_fb
    669683}); 
    670684},clearUnmaskCallback:function(){ 
     
    672686},existTarget:function(){ 
    673687if(this.target){ 
    674 var _fa=(this.target.id)?$(this.target.id):$(this.target); 
    675 return (_fa)?Element.visible(_fa):false; 
     688var _fd=(this.target.id)?$(this.target.id):$(this.target); 
     689return (_fd)?Element.visible(_fd):false; 
    676690} 
    677691return false; 
    678692},isMasked:function(){ 
    679693return Modal.element&&Element.visible(Modal.element); 
    680 },_mask:function(_fb){ 
    681 var _fc=Object.extend({cssPrefix:"custom_",zIndex:null},arguments[1]||{}); 
    682 var _fd=arguments[2]; 
     694},_mask:function(_fe){ 
     695var _ff=Object.extend({cssPrefix:"custom_",zIndex:null},arguments[1]||{}); 
     696var _100=arguments[2]; 
    683697if(Modal.element){ 
    684 Modal._snap(_fb); 
     698Modal._snap(_fe); 
    685699Modal._rebuildMask(); 
    686700}else{ 
    687701Modal.snaps=[]; 
    688702Modal.excepteds=[]; 
    689 Modal._buildMask(_fc.cssPrefix); 
     703Modal._buildMask(_ff.cssPrefix); 
    690704Modal.cover=new IECover(Modal.element,{transparent:true}); 
    691705} 
    692 if(_fd){ 
     706if(_100){ 
    693707Element.setStyle(Modal.element,{position:"absolute"}); 
    694708this._setModalPosition(); 
     
    697711} 
    698712} 
    699 Modal._setZindex(_fb,_fc.zIndex); 
     713Modal._setZindex(_fe,_ff.zIndex); 
    700714Modal._setFullSize(); 
    701 if(!Modal.hasExcepted(_fb)){ 
    702 Modal.excepteds.push(_fb); 
     715if(!Modal.hasExcepted(_fe)){ 
     716Modal.excepteds.push(_fe); 
    703717} 
    704718this.count++; 
    705 this.maskCallbacks.each(function(_fe){ 
    706 _fe(_fb); 
    707 }); 
    708 this.target=_fb
    709 if(!_fb.id){ 
    710 _fb.id="modal_tmp_id_"+new Date().getTime(); 
    711 } 
    712 },_unmask:function(_ff){ 
    713 var _100=null; 
     719this.maskCallbacks.each(function(_101){ 
     720_101(_fe); 
     721}); 
     722this.target=_fe
     723if(!_fe.id){ 
     724_fe.id="modal_tmp_id_"+new Date().getTime(); 
     725} 
     726},_unmask:function(_102){ 
     727var _103=null; 
    714728if(Modal.element){ 
    715729if(Modal.snaps.length==0){ 
     
    721735}else{ 
    722736Element.setStyle(Modal.element,{zIndex:Modal.snaps.pop()}); 
    723 if(_ff){ 
     737if(_102){ 
    724738Modal.excepteds=(Modal.excepteds||[]).reject(function(e){ 
    725 return e==_ff
     739return e==_102
    726740}); 
    727741}else{ 
     
    731745} 
    732746this.count++; 
    733 this.unmaskCallbacks.each(function(_102){ 
    734 _102(); 
     747this.unmaskCallbacks.each(function(_105){ 
     748_105(); 
    735749}); 
    736750this.target=Modal.excepteds?Modal.excepteds.last():false; 
     
    763777},_isMasked:function(){ 
    764778return Modal.element&&Element.visible(Modal.element); 
    765 },_snap:function(_103){ 
    766 var _104=Element.getStyle(Modal.element,"zIndex"); 
    767 if(_104&&Modal._isMasked()&&!Modal.hasExcepted(_103)){ 
    768 Modal.snaps.push(_104); 
    769 } 
    770 },_setZindex:function(_105,_106){ 
    771 Element.setStyle(Modal.element,{zIndex:ZindexManager.getIndex(_106)}); 
    772 _105=Element.makePositioned($(_105)); 
    773 Element.setStyle(_105,{zIndex:ZindexManager.getIndex(_106)}); 
     779},_snap:function(_106){ 
     780var _107=Element.getStyle(Modal.element,"zIndex"); 
     781if(_107&&Modal._isMasked()&&!Modal.hasExcepted(_106)){ 
     782Modal.snaps.push(_107); 
     783} 
     784},_setZindex:function(_108,_109){ 
     785Element.setStyle(Modal.element,{zIndex:ZindexManager.getIndex(_109)}); 
     786_108=Element.makePositioned($(_108)); 
     787Element.setStyle(_108,{zIndex:ZindexManager.getIndex(_109)}); 
    774788},_setFullSize:function(){ 
    775789Modal.element.setStyle({width:Element.getWindowWidth()+"px",height:Element.getWindowHeight()+"px"}); 
     
    777791Modal.cover.resetSize(); 
    778792} 
    779 },_buildMask:function(_107){ 
     793},_buildMask:function(_10a){ 
    780794var mask=Builder.node("div",{id:Modal.maskId}); 
    781 Modal._setClassNames(mask,_107); 
     795Modal._setClassNames(mask,_10a); 
    782796document.body.appendChild(mask); 
    783797Modal.element=mask; 
    784798Modal._addEvent(); 
    785 },_setClassNames:function(_109,_10a){ 
    786 var _10b=(UserAgent.isIE())?Modal.maskClassIE:Modal.maskClass; 
    787 Element.addClassName(_109,_10b); 
    788 Element.addClassName(_109,_10a+_10b); 
     799},_setClassNames:function(_10c,_10d){ 
     800var _10e=(UserAgent.isIE())?Modal.maskClassIE:Modal.maskClass; 
     801Element.addClassName(_10c,_10e); 
     802Element.addClassName(_10c,_10d+_10e); 
    789803},_rebuildMask:function(){ 
    790804document.body.appendChild(Modal.element); 
     
    797811return src.spinelzMaskResult; 
    798812} 
    799 var _10d=false; 
    800 var _10e=this.excepteds.last(); 
    801 var _10f=src; 
    802 if(_10e&&Element.descendantOf(src,_10e)){ 
    803 _10d=true; 
    804 }else{ 
    805 var _110=Element.getStyle(Modal.element,"zIndex"); 
    806 var _111=null; 
     813var _110=false; 
     814var _111=this.excepteds.last(); 
     815var _112=src; 
     816if(_111&&Element.descendantOf(src,_111)){ 
     817_110=true; 
     818}else{ 
     819var _113=Element.getStyle(Modal.element,"zIndex"); 
     820var _114=null; 
    807821while((src=src.parentNode)&&src!=document.body){ 
    808 if(src.style&&(_111=Element.getStyle(src,"zIndex"))){ 
    809 _10d=(_111>_110); 
     822if(src.style&&(_114=Element.getStyle(src,"zIndex"))){ 
     823_110=(_114>_113); 
    810824break; 
    811825} 
    812826} 
    813827} 
    814 _10f.spinelzMaskCount=this.count; 
    815 _10f.spinelzMaskResult=_10d
    816 return _10d
    817 },_handleEvent:function(_112){ 
    818 var src=Event.element(_112); 
    819 if(!(Modal._isOutOfModal(src)||(_112.keyCode&&(_112.keyCode==this.tabKey)))){ 
    820 Event.stop(_112); 
    821 } 
    822 },_onResize:function(_114){ 
     828_112.spinelzMaskCount=this.count; 
     829_112.spinelzMaskResult=_110
     830return _110
     831},_handleEvent:function(_115){ 
     832var src=Event.element(_115); 
     833if(!(Modal._isOutOfModal(src)||(_115.keyCode&&(_115.keyCode==this.tabKey)))){ 
     834Event.stop(_115); 
     835} 
     836},_onResize:function(_117){ 
    823837Modal._setFullSize(); 
    824 },hasExcepted:function(_115){ 
    825 return (Modal.excepteds||[]).any(function(_116){ 
    826 return _116.id==_115.id; 
    827 }); 
    828 },_control_tab_key:function(_117){ 
    829 if(!_117){ 
    830 _117=$A(document.body.getElementsByTagName("form")); 
    831 } 
    832 _117.each(function(form){ 
     838},hasExcepted:function(_118){ 
     839return (Modal.excepteds||[]).any(function(_119){ 
     840return _119.id==_118.id; 
     841}); 
     842},_control_tab_key:function(_11a){ 
     843if(!_11a){ 
     844_11a=$A(document.body.getElementsByTagName("form")); 
     845} 
     846_11a.each(function(form){ 
    833847if(!Modal._isOutOfModal(form)){ 
    834848Form.getElements(form).each(function(el){ 
     
    844858var IECover=Class.create(); 
    845859IECover.src="javascript:false;"; 
    846 IECover.prototype={idSuffix:"iecover",initialize:function(_11b){ 
     860IECover.prototype={idSuffix:"iecover",initialize:function(_11e){ 
    847861this.options=Object.extend({transparent:false,padding:0},arguments[1]||{}); 
    848862if(document.all){ 
    849 _11b=$(_11b); 
    850 this.id=_11b.id.appendSuffix(this.idSuffix); 
    851 this._build(_11b); 
     863_11e=$(_11e); 
     864this.id=_11e.id.appendSuffix(this.idSuffix); 
     865this._build(_11e); 
    852866this.resetSize(); 
    853867} 
    854868},resetSize:function(){ 
    855869if(this.element){ 
    856 var _11c=this.element.parentNode; 
    857 var _11d=this.options.padding; 
    858 this.element.width=_11c.offsetWidth-_11d+"px"; 
    859 this.element.height=Element.getHeight(_11c)-_11d+"px"; 
    860 } 
    861 },_build:function(_11e){ 
    862 var _11f=this.options.padding/2; 
    863 var _120={position:"absolute",top:_11f+"px",left:_11f+"px"}; 
     870var _11f=this.element.parentNode; 
     871var _120=this.options.padding; 
     872this.element.width=_11f.offsetWidth-_120+"px"; 
     873this.element.height=Element.getHeight(_11f)-_120+"px"; 
     874} 
     875},_build:function(_121){ 
     876var _122=this.options.padding/2; 
     877var _123={position:"absolute",top:_122+"px",left:_122+"px"}; 
    864878if(this.options.transparent){ 
    865 _120.filter="alpha(opacity=0)"; 
    866 } 
    867 if(_11e.buildedIECover&&$(this.id)){ 
     879_123.filter="alpha(opacity=0)"; 
     880} 
     881if(_121.buildedIECover&&$(this.id)){ 
    868882this.element=$(this.id); 
    869883}else{ 
    870884this.element=Builder.node("iframe",{src:IECover.src,id:this.id,frameborder:0}); 
    871885} 
    872 Element.setStyle(this.element,_120); 
    873 var _121=Element.down(_11e,0); 
    874 if(_121){ 
    875 Element.makePositioned(_121); 
    876 } 
    877 _11e.insertBefore(this.element,_11e.firstChild); 
    878 _11e.buildedIECover=true; 
     886Element.setStyle(this.element,_123); 
     887var _124=Element.down(_121,0); 
     888if(_124){ 
     889Element.makePositioned(_124); 
     890} 
     891_121.insertBefore(this.element,_121.firstChild); 
     892_121.buildedIECover=true; 
    879893}}; 
    880894var UserAgent={getUserAgent:function(){ 
     
    895909var ShortcutManager=Class.create(); 
    896910ShortcutManager.prototype={initialize:function(){ 
    897 var _122={detectKeyup:false,initialStarted:true,preventDefault:true}; 
    898 this.options=Object.extend(_122,arguments[0]||{}); 
     911var _125={detectKeyup:false,initialStarted:true,preventDefault:true}; 
     912this.options=Object.extend(_125,arguments[0]||{}); 
    899913this.keydownListener=this.eventKeydown.bindAsEventListener(this); 
    900914if(this.options.detectKeyup){ 
     
    922936Event.observe(document,"keyup",this.keyupListener); 
    923937} 
    924 },add:function(c1,c2,_125){ 
     938},add:function(c1,c2,_128){ 
    925939if(c1.constructor==Array){ 
    926940var self=this; 
    927941c1.each(function(pair){ 
    928 self._add_or_remove_function(pair[0],pair[1],_125); 
    929 }); 
    930 }else{ 
    931 this._add_or_remove_function(c1,c2,_125); 
     942self._add_or_remove_function(pair[0],pair[1],_128); 
     943}); 
     944}else{ 
     945this._add_or_remove_function(c1,c2,_128); 
    932946} 
    933947},destroy:function(){ 
     
    936950Event.stopObserving(document,"keyup",this.keyupListener); 
    937951} 
    938 },eventKeydown:function(_128){ 
     952},eventKeydown:function(_12b){ 
    939953if(this.executable){ 
    940954var code; 
    941955var key=""; 
    942 _128=_128||window.event; 
    943 if(_128.keyCode){ 
    944 if(_128.altKey){ 
     956_12b=_12b||window.event; 
     957if(_12b.keyCode){ 
     958if(_12b.altKey){ 
    945959key+="a"; 
    946960} 
    947 if(_128.ctrlKey){ 
     961if(_12b.ctrlKey){ 
    948962key+="c"; 
    949963} 
    950 if(_128.shiftKey){ 
     964if(_12b.shiftKey){ 
    951965key+="s"; 
    952966} 
     
    954968key="n"; 
    955969} 
    956 code=this._mergeNumKey(_128.keyCode); 
     970code=this._mergeNumKey(_12b.keyCode); 
    957971if(this.keydownFunc[key][code]){ 
    958972this.keydownFunc[key][code](); 
    959973if(this.options.preventDefault){ 
    960 Event.stop(_128); 
    961 } 
    962 } 
    963 } 
    964 } 
    965 },eventKeyup:function(_12b){ 
     974Event.stop(_12b); 
     975} 
     976} 
     977} 
     978} 
     979},eventKeyup:function(_12e){ 
    966980if(this.executable){ 
    967981var code; 
    968 _12b=_12b||window.event; 
    969 if(_12b.keyCode){ 
    970 code=this._mergeNumKey(_12b.keyCode); 
     982_12e=_12e||window.event; 
     983if(_12e.keyCode){ 
     984code=this._mergeNumKey(_12e.keyCode); 
    971985if(this.keyupFunc[code]){ 
    972986this.keyupFunc[code](); 
    973987if(this.options.preventDefault){ 
    974 Event.stop(_12b); 
    975 } 
    976 } 
    977 } 
    978 } 
    979 },remove:function(_12d){ 
    980 this._add_or_remove_function(_12d); 
     988Event.stop(_12e); 
     989} 
     990} 
     991} 
     992} 
     993},remove:function(_130){ 
     994this._add_or_remove_function(_130); 
    981995},start:function(){ 
    982996this.executable=true; 
    983997},stop:function(){ 
    984998this.executable=false; 
    985 },_add_or_remove_function:function(_12e,_12f,_130){ 
    986 var _131
    987 var _132=new Array(); 
     999},_add_or_remove_function:function(_131,_132,_133){ 
     1000var _134
     1001var _135=new Array(); 
    9881002var self=this; 
    989 $A(_12e.toLowerCase().split("+")).each(function(key){ 
     1003$A(_131.toLowerCase().split("+")).each(function(key){ 
    9901004if(key=="alt"){ 
    991 _132.push("a"); 
     1005_135.push("a"); 
    9921006}else{ 
    9931007if(key=="ctrl"){ 
    994 _132.push("c"); 
     1008_135.push("c"); 
    9951009}else{ 
    9961010if(key=="shift"){ 
    997 _132.push("s"); 
    998 }else{ 
    999 _131=self.keyCode[key]; 
    1000 } 
    1001 } 
    1002 } 
    1003 }); 
    1004 var key=_132.sortBy(function(_136,_137){ 
    1005 return _136
     1011_135.push("s"); 
     1012}else{ 
     1013_134=self.keyCode[key]; 
     1014} 
     1015} 
     1016} 
     1017}); 
     1018var key=_135.sortBy(function(_139,_13a){ 
     1019return _139
    10061020}).join(""); 
    10071021if(key==""){ 
    10081022key="n"; 
    10091023} 
    1010 if(_12f){ 
    1011 if(_130){ 
    1012 this.keyupFunc[_131]=_12f
    1013 }else{ 
    1014 this.keydownFunc[key][_131]=_12f
    1015 } 
    1016 }else{ 
    1017 if(_130){ 
    1018 this.keyupFunc[_131]=null; 
    1019 }else{ 
    1020 this.keydownFunc[key][_131]=null; 
     1024if(_132){ 
     1025if(_133){ 
     1026this.keyupFunc[_134]=_132
     1027}else{ 
     1028this.keydownFunc[key][_134]=_132
     1029} 
     1030}else{ 
     1031if(_133){ 
     1032this.keyupFunc[_134]=null; 
     1033}else{ 
     1034this.keydownFunc[key][_134]=null; 
    10211035} 
    10221036} 
     
    10271041var args=$A(arguments); 
    10281042var self=this; 
    1029 var _13b=args.shift()||this; 
     1043var _13e=args.shift()||this; 
    10301044if(UserAgent.isIE()&&(document.readyState!="complete")){ 
    10311045Event.observe(window,"load",function(){ 
    1032 self.apply(_13b,args); 
    1033 }); 
    1034 }else{ 
    1035 this.apply(_13b,args); 
     1046self.apply(_13e,args); 
     1047}); 
     1048}else{ 
     1049this.apply(_13e,args); 
    10361050} 
    10371051}; 
     
    10531067document.body.focus(); 
    10541068} 
    1055 },concat:function(base,_13d){ 
     1069},concat:function(base,_140){ 
    10561070var hash={}; 
    1057 _13d.each(function(_13f){ 
    1058 hash[_13f]=base.appendSuffix(_13f); 
     1071_140.each(function(_142){ 
     1072hash[_142]=base.appendSuffix(_142); 
    10591073}); 
    10601074return hash; 
    1061 },getId:function(_140){ 
    1062 _140=_140||""; 
    1063 return _140.appendSuffix(++SpinelzUtil.idCount); 
    1064 },toAttriteString:function(_141,_142){ 
    1065 var html=_141.map(function(pair){ 
     1075},getId:function(_143){ 
     1076_143=_143||""; 
     1077return _143.appendSuffix(++SpinelzUtil.idCount); 
     1078},toAttriteString:function(_144,_145){ 
     1079var html=_144.map(function(pair){ 
    10661080return pair.key+"='"+pair.value+"'"; 
    10671081}).join(" "); 
    1068 if(_142&&(html.length>0)){ 
     1082if(_145&&(html.length>0)){ 
    10691083html=" "+html; 
    10701084} 
    10711085return html; 
    1072 },_redrawForIE:function(_145){ 
     1086},_redrawForIE:function(_148){ 
    10731087if(UserAgent.isIE()){ 
    1074 _145=$(_145); 
    1075 if(_145){ 
     1088_148=$(_148); 
     1089if(_148){ 
    10761090setTimeout(function(){ 
    1077 Element.classNames(_145).set("dummy"); 
     1091Element.classNames(_148).set("dummy"); 
    10781092},200); 
    10791093} 
     
    10921106}); 
    10931107} 
    1094 var $A=Array.from=function(_146){ 
    1095 if(!_146){ 
     1108var $A=Array.from=function(_149){ 
     1109if(!_149){ 
    10961110return []; 
    10971111} 
    1098 if(_146.toArray){ 
    1099 return _146.toArray(); 
    1100 }else{ 
    1101 var _147=[]; 
    1102 for(var i=0,len=_146.length;i<len;i++){ 
    1103 _147.push(_146[i]); 
    1104 } 
    1105 return _147
     1112if(_149.toArray){ 
     1113return _149.toArray(); 
     1114}else{ 
     1115var _14a=[]; 
     1116for(var i=0,len=_149.length;i<len;i++){ 
     1117_14a.push(_149[i]); 
     1118} 
     1119return _14a
    11061120} 
    11071121}; 
    11081122var Color=Class.create(); 
    1109 Color.prototype={initialize:function(_14a){ 
    1110 this.color=this.parse(_14a); 
    1111 },toHex:function(_14b){ 
    1112 _14b=_14b||this.color; 
    1113 return _14b.invoke("toColorPart"); 
     1123Color.prototype={initialize:function(_14d){ 
     1124this.color=this.parse(_14d); 
     1125},toHex:function(_14e){ 
     1126_14e=_14e||this.color; 
     1127return _14e.invoke("toColorPart"); 
    11141128},invert:function(){ 
    11151129return this.toCssStyle(this.color.map(function(c){ 
    11161130return 255-c; 
    11171131})); 
    1118 },toCssStyle:function(_14d){ 
    1119 _14d=_14d||this.color; 
    1120 return "#"+this.toHex(_14d).join(""); 
    1121 },parse:function(_14e){ 
    1122 _14e=_14e||this.color; 
    1123 if(_14e.match(/rgb\(\d+,\s*\d+,\s*\d+\)/)){ 
    1124 return _14e.match(/\d+/g).map(function(c){ 
     1132},toCssStyle:function(_150){ 
     1133_150=_150||this.color; 
     1134return "#"+this.toHex(_150).join(""); 
     1135},parse:function(_151){ 
     1136_151=_151||this.color; 
     1137if(_151.match(/rgb\(\d+,\s*\d+,\s*\d+\)/)){ 
     1138return _151.match(/\d+/g).map(function(c){ 
    11251139return parseInt(c,10); 
    11261140}); 
    11271141}else{ 
    1128 if(_14e.match(/#[a-fA-F0-9]{6}/)){ 
    1129 return _14e.match(/([a-fA-F0-9]){2}/g).map(function(c){ 
     1142if(_151.match(/#[a-fA-F0-9]{6}/)){ 
     1143return _151.match(/([a-fA-F0-9]){2}/g).map(function(c){ 
    11301144return parseInt(c,16); 
    11311145}); 
    11321146} 
    11331147} 
    1134 throw "parse error: "+_14e
     1148throw "parse error: "+_151
    11351149}}; 
    11361150var FunctionQueue={_active:false,_queue:[],_timer:null,exec:function(){ 
     
    11671181var DebugConsole={_active:false,_basetime:null,_messages:null,activate:function(){ 
    11681182this._active=true; 
    1169 },dump:function(_154){ 
    1170 _154=_154||{}; 
    1171 switch(_154.type){ 
     1183},dump:function(_157){ 
     1184_157=_157||{}; 
     1185switch(_157.type){ 
    11721186case "alert": 
    11731187this._dump_alert(); 
     
    11801194break; 
    11811195case "update": 
    1182 this._dump_update(_154.target); 
     1196this._dump_update(_157.target); 
    11831197break; 
    11841198default: 
     
    11951209this._messages=[]; 
    11961210} 
    1197 },log:function(_155){ 
     1211},log:function(_158){ 
    11981212if(this._active){ 
    1199 var _156=("00000000"+(new Date()-this._basetime)).slice(-8); 
    1200 this._messages.push(_156+" : "+_155); 
     1213var _159=("00000000"+(new Date()-this._basetime)).slice(-8); 
     1214this._messages.push(_159+" : "+_158); 
    12011215} 
    12021216},_dump_alert:function(){ 
    1203 this._messages.each(function(_157){ 
    1204 alert(_157); 
     1217this._messages.each(function(_15a){ 
     1218alert(_15a); 
    12051219}); 
    12061220},_dump_clipboard:function(){ 
    12071221var dump=""; 
    1208 this._messages.each(function(_159){ 
    1209 dump+=_159+"\n"; 
     1222this._messages.each(function(_15c){ 
     1223dump+=_15c+"\n"; 
    12101224}); 
    12111225clipboardData.setData("Text",dump); 
    12121226},_dump_console:function(){ 
    1213 this._messages.each(function(_15a){ 
    1214 console.log(_15a); 
    1215 }); 
    1216 },_dump_update:function(_15b){ 
     1227this._messages.each(function(_15d){ 
     1228console.log(_15d); 
     1229}); 
     1230},_dump_update:function(_15e){ 
    12171231var html=""; 
    1218 this._messages.each(function(_15d){ 
    1219 html+="<p>"+_15d+"</p>"; 
    1220 }); 
    1221 Element.update(_15b,html); 
     1232this._messages.each(function(_160){ 
     1233html+="<p>"+_160+"</p>"; 
     1234}); 
     1235Element.update(_15e,html); 
    12221236}}; 
    12231237if(UserAgent.isFF3()){ 
    1224 function __$(_15e){ 
     1238function __$(_161){ 
    12251239if(arguments.length>1){ 
    1226 for(var i=0,_160=[],_161=arguments.length;i<_161;i++){ 
    1227 _160.push($(arguments[i])); 
    1228 } 
    1229 return _160
    1230 } 
    1231 if(typeof _15e=="string"){ 
    1232 _15e=document.getElementById(_15e); 
    1233 } 
    1234 if(_15e&&_15e.nodeType==1&&!_15e._extendedBySpinelz&&_15e.tagName&&_15e!=window){ 
    1235 _15e.__getElementsByClassName=_15e.getElementsByClassName; 
    1236 _15e.getElementsByClassName=function(_162){ 
    1237 return $A(_15e.__getElementsByClassName(_162)); 
     1240for(var i=0,_163=[],_164=arguments.length;i<_164;i++){ 
     1241_163.push($(arguments[i])); 
     1242} 
     1243return _163
     1244} 
     1245if(typeof _161=="string"){ 
     1246_161=document.getElementById(_161); 
     1247} 
     1248if(_161&&_161.nodeType==1&&!_161._extendedBySpinelz&&_161.tagName&&_161!=window){ 
     1249_161.__getElementsByClassName=_161.getElementsByClassName; 
     1250_161.getElementsByClassName=function(_165){ 
     1251return $A(_161.__getElementsByClassName(_165)); 
    12381252}; 
    1239 _15e._extendedBySpinelz=true; 
    1240 } 
    1241 return Element.extend(_15e); 
     1253_161._extendedBySpinelz=true; 
     1254} 
     1255return Element.extend(_161); 
    12421256} 
    12431257$=__$; 
    12441258} 
    12451259(function(){ 
    1246 var copy=function(_164,_165,_166){ 
    1247 _166=_166||false; 
    1248 var _167=Element.extend.cache; 
    1249 for(var _168 in _164){ 
    1250 var _169=_164[_168]; 
    1251 if(!_166||!(_168 in _165)){ 
    1252 _165[_168]=_167.findOrStore(_169); 
     1260var copy=function(_167,_168,_169){ 
     1261_169=_169||false; 
     1262var _16a=Element.extend.cache; 
     1263for(var _16b in _167){ 
     1264var _16c=_167[_16b]; 
     1265if(!_169||!(_16b in _168)){ 
     1266_168[_16b]=_16a.findOrStore(_16c); 
    12531267} 
    12541268} 
    12551269}; 
    12561270if(typeof HTMLElement!="undefined"){ 
    1257 [HTMLSelectElement].each(function(_16a){ 
    1258 copy(SelectElement,_16a.prototype); 
     1271[HTMLSelectElement].each(function(_16d){ 
     1272copy(SelectElement,_16d.prototype); 
    12591273}); 
    12601274} 
    12611275})(); 
    1262 Element.extend=function(_16b){ 
    1263 if(!_16b||_nativeExtensions||_16b.nodeType==3){ 
    1264 return _16b
    1265 } 
    1266 if(!_16b._extended&&_16b.tagName&&_16b!=window){ 
    1267 var _16c=Object.clone(Element.Methods),_16d=Element.extend.cache; 
    1268 if(_16b.tagName=="FORM"){ 
    1269 Object.extend(_16c,Form.Methods); 
    1270 } 
    1271 if(["INPUT","TEXTAREA","SELECT"].include(_16b.tagName)){ 
    1272 Object.extend(_16c,Form.Element.Methods); 
    1273 } 
    1274 if(["SELECT"].include(_16b.tagName)){ 
    1275 Object.extend(_16c,SelectElement); 
    1276 } 
    1277 Object.extend(_16c,Element.Methods.Simulated); 
    1278 for(var _16e in _16c){ 
    1279 var _16f=_16c[_16e]; 
    1280 if(typeof _16f=="function"&&!(_16e in _16b)){ 
    1281 _16b[_16e]=_16d.findOrStore(_16f); 
    1282 } 
    1283 } 
    1284 } 
    1285 _16b._extended=true; 
    1286 return _16b
     1276Element.extend=function(_16e){ 
     1277if(!_16e||_nativeExtensions||_16e.nodeType==3){ 
     1278return _16e
     1279} 
     1280if(!_16e._extended&&_16e.tagName&&_16e!=window){ 
     1281var _16f=Object.clone(Element.Methods),_170=Element.extend.cache; 
     1282if(_16e.tagName=="FORM"){ 
     1283Object.extend(_16f,Form.Methods); 
     1284} 
     1285if(["INPUT","TEXTAREA","SELECT"].include(_16e.tagName)){ 
     1286Object.extend(_16f,Form.Element.Methods); 
     1287} 
     1288if(["SELECT"].include(_16e.tagName)){ 
     1289Object.extend(_16f,SelectElement); 
     1290} 
     1291Object.extend(_16f,Element.Methods.Simulated); 
     1292for(var _171 in _16f){ 
     1293var _172=_16f[_171]; 
     1294if(typeof _172=="function"&&!(_171 in _16e)){ 
     1295_16e[_171]=_170.findOrStore(_172); 
     1296} 
     1297} 
     1298} 
     1299_16e._extended=true; 
     1300return _16e
    12871301}; 
    1288 Element.extend.cache={findOrStore:function(_170){ 
    1289 return this[_170]=this[_170]||function(){ 
    1290 return _170.apply(null,[this].concat($A(arguments))); 
     1302Element.extend.cache={findOrStore:function(_173){ 
     1303return this[_173]=this[_173]||function(){ 
     1304return _173.apply(null,[this].concat($A(arguments))); 
    12911305}; 
    12921306}}; 
  • spinelz/trunk/compress/javascripts/spinelz_lib/spinelz_util_for_rubricks.js

    r6002 r6004  
    51635163this.element=_b8; 
    51645164},build:function(_bb){ 
    5165 this.normal=this.getNormalClass(_bb); 
    5166 this.hover=this.getHoverClass(this.normal); 
    5167 if(this.options.cssUtil){ 
    5168 this.normal=this.options.cssUtil.joinClassNames(normal); 
    5169 this.hover=this.options.cssUtil.joinClassNames(hover); 
    5170 
     5165this.setClasses(_bb); 
    51715166this.setHoverEvent(_bb); 
    51725167},setHoverEvent:function(_bc){ 
    5173 this.mouseout=this.toggle.bindAsEventListener(this,_bc,this.normal); 
    5174 this.mouseover=this.toggle.bindAsEventListener(this,_bc,this.hover); 
     5168this.mouseout=this.setNormalClass.bindAsEventListener(this); 
     5169this.mouseover=this.setHoverClass.bindAsEventListener(this); 
    51755170Event.observe(_bc,"mouseout",this.mouseout); 
    51765171Event.observe(_bc,"mouseover",this.mouseover); 
     
    51805175_be.className=_bf; 
    51815176} 
    5182 },getNormalClass:function(_c0){ 
    5183 var _c1=(this.options.defaultClass||_c0.className); 
    5184 return (_c1||""); 
    5185 },getHoverClass:function(_c2){ 
    5186 var _c3=this.options.hoverClass; 
    5187 if(!_c3){ 
    5188 _c3=_c2.split(" ").collect(function(c){ 
     5177},setClasses:function(_c0){ 
     5178this.normal=this.getNormalClass(_c0); 
     5179this.hover=this.getHoverClass(this.normal); 
     5180if(this.options.cssUtil){ 
     5181this.normal=this.options.cssUtil.joinClassNames(normal); 
     5182this.hover=this.options.cssUtil.joinClassNames(hover); 
     5183
     5184},resetClasses:function(){ 
     5185this.setClasses(this.element); 
     5186},setNormalClass:function(_c1){ 
     5187Event.stop(_c1); 
     5188if(this.options.beforeToggle()){ 
     5189this.element.className=this.normal; 
     5190
     5191},setHoverClass:function(_c2){ 
     5192Event.stop(_c2); 
     5193if(this.options.beforeToggle()){ 
     5194this.element.className=this.hover; 
     5195
     5196},getNormalClass:function(_c3){ 
     5197var _c4=(this.options.defaultClass||_c3.className); 
     5198return (_c4||""); 
     5199},getHoverClass:function(_c5){ 
     5200var _c6=this.options.hoverClass; 
     5201if(!_c6){ 
     5202_c6=_c5.split(" ").collect(function(c){ 
    51895203return c+"Hover"; 
    51905204}).join(" "); 
    51915205} 
    5192 return _c3
     5206return _c6
    51935207},destroy:function(){ 
    51945208Event.stopObserving(this.element,"mouseout",this.mouseout); 
     
    52025216Object.extend(Date.prototype,{msPerDay:function(){ 
    52035217return 24*60*60*1000; 
    5204 },advance:function(_c5){ 
    5205 return new Date(this.getTime()+this.msPerDay()*_c5.days); 
     5218},advance:function(_c8){ 
     5219return new Date(this.getTime()+this.msPerDay()*_c8.days); 
    52065220},days:function(){ 
    5207 var _c6=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0); 
    5208 return Math.round(_c6.getTime()/this.msPerDay()); 
     5221var _c9=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0); 
     5222return Math.round(_c9.getTime()/this.msPerDay()); 
    52095223},minutes:function(){ 
    52105224return Math.round(this.getTime()/(60*1000)); 
    52115225},toHash:function(){ 
    52125226return {year:this.getFullYear(),month:this.getMonth(),day:this.getDate(),hour:this.getHours(),min:this.getMinutes(),sec:this.getSeconds()}; 
    5213 },sameYear:function(_c7){ 
    5214 return this.getFullYear()==_c7.getFullYear(); 
    5215 },sameMonth:function(_c8){ 
    5216 return this.sameYear(_c8)&&this.getMonth()==_c8.getMonth(); 
    5217 },sameDate:function(_c9){ 
    5218 return this.sameYear(_c9)&&this.sameMonth(_c9)&&this.getDate()==_c9.getDate(); 
    5219 },betweenDate:function(_ca,_cb){ 
    5220 var _cc=this.days(); 
    5221 return (_ca.days()<=_cc&&_cc<=_cb.days()); 
    5222 },betweenTime:function(_cd,_ce){ 
    5223 var _cf=this.getTime(); 
    5224 return (_cd.getTime()<=_cf&&_cf<=_ce.getTime()); 
    5225 },strftime:function(_d0){ 
    5226 return DateUtil.simpleFormat(_d0)(this); 
     5227},sameYear:function(_ca){ 
     5228return this.getFullYear()==_ca.getFullYear(); 
     5229},sameMonth:function(_cb){ 
     5230return this.sameYear(_cb)&&this.getMonth()==_cb.getMonth(); 
     5231},sameDate:function(_cc){ 
     5232return this.sameYear(_cc)&&this.sameMonth(_cc)&&this.getDate()==_cc.getDate(); 
     5233},betweenDate:function(_cd,_ce){ 
     5234var _cf=this.days(); 
     5235return (_cd.days()<=_cf&&_cf<=_ce.days()); 
     5236},betweenTime:function(_d0,_d1){ 
     5237var _d2=this.getTime(); 
     5238return (_d0.getTime()<=_d2&&_d2<=_d1.getTime()); 
     5239},strftime:function(_d3){ 
     5240return DateUtil.simpleFormat(_d3)(this); 
    52275241}}); 
    5228 var DateUtil={dayOfWeek:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],daysOfMonth:[31,28,31,30,31,30,31,31,30,31,30,31],numberOfDays:function(_d1,_d2){ 
    5229 return _d2.days()-_d1.days(); 
    5230 },isLeapYear:function(_d3){ 
    5231 if(((_d3%4==0)&&(_d3%100!=0))||(_d3%400==0)){ 
     5242var DateUtil={dayOfWeek:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],daysOfMonth:[31,28,31,30,31,30,31,31,30,31,30,31],numberOfDays:function(_d4,_d5){ 
     5243return _d5.days()-_d4.days(); 
     5244},isLeapYear:function(_d6){ 
     5245if(((_d6%4==0)&&(_d6%100!=0))||(_d6%400==0)){ 
    52325246return true; 
    52335247} 
    52345248return false; 
    5235 },nextDate:function(_d4){ 
    5236 return new Date(_d4.getFullYear(),_d4.getMonth(),_d4.getDate()+1); 
    5237 },previousDate:function(_d5){ 
    5238 return new Date(_d5.getFullYear(),_d5.getMonth(),_d5.getDate()-1); 
    5239 },afterDays:function(_d6,_d7){ 
    5240 return new Date(_d6.getFullYear(),_d6.getMonth(),_d6.getDate()+_d7); 
    5241 },getLastDate:function(_d8,_d9){ 
    5242 var _da=this.daysOfMonth[_d9]; 
    5243 if((_d9==1)&&this.isLeapYear(_d8)){ 
    5244 return new Date(_d8,_d9,_da+1); 
    5245 } 
    5246 return new Date(_d8,_d9,_da); 
    5247 },getFirstDate:function(_db,_dc){ 
    5248 if(_db.constructor==Date){ 
    5249 return new Date(_db.getFullYear(),_db.getMonth(),1); 
    5250 } 
    5251 return new Date(_db,_dc,1); 
    5252 },getWeekTurn:function(_dd,_de){ 
    5253 var _df=6-_de+1; 
    5254 var _e0=0; 
    5255 while(_df<_dd){ 
    5256 _dd-=7; 
    5257 _e0++; 
    5258 } 
    5259 return _e0
    5260 },toDateString:function(_e1){ 
    5261 return _e1.toDateString(); 
    5262 },toLocaleDateString:function(_e2){ 
    5263 return _e2.toLocaleDateString(); 
    5264 },simpleFormat:function(_e3){ 
    5265 return function(_e4){ 
    5266 var _e5=_e3.replace(/M+/g,DateUtil.zerofill((_e4.getMonth()+1).toString(),2)); 
    5267 _e5=_e5.replace(/d+/g,DateUtil.zerofill(_e4.getDate().toString(),2)); 
    5268 _e5=_e5.replace(/y{4}/g,_e4.getFullYear()); 
    5269 _e5=_e5.replace(/y{1,3}/g,new String(_e4.getFullYear()).substr(2)); 
    5270 _e5=_e5.replace(/E+/g,DateUtil.dayOfWeek[_e4.getDay()]); 
    5271 return _e5
    5272 }; 
    5273 },zerofill:function(_e6,_e7){ 
    5274 var _e8=_e6
    5275 if(_e6.length<_e7){ 
    5276 var tmp=_e7-_e6.length; 
     5249},nextDate:function(_d7){ 
     5250return new Date(_d7.getFullYear(),_d7.getMonth(),_d7.getDate()+1); 
     5251},previousDate:function(_d8){ 
     5252return new Date(_d8.getFullYear(),_d8.getMonth(),_d8.getDate()-1); 
     5253},afterDays:function(_d9,_da){ 
     5254return new Date(_d9.getFullYear(),_d9.getMonth(),_d9.getDate()+_da); 
     5255},getLastDate:function(_db,_dc){ 
     5256var _dd=this.daysOfMonth[_dc]; 
     5257if((_dc==1)&&this.isLeapYear(_db)){ 
     5258return new Date(_db,_dc,_dd+1); 
     5259} 
     5260return new Date(_db,_dc,_dd); 
     5261},getFirstDate:function(_de,_df){ 
     5262if(_de.constructor==Date){ 
     5263return new Date(_de.getFullYear(),_de.getMonth(),1); 
     5264} 
     5265return new Date(_de,_df,1); 
     5266},getWeekTurn:function(_e0,_e1){ 
     5267var _e2=6-_e1+1; 
     5268var _e3=0; 
     5269while(_e2<_e0){ 
     5270_e0-=7; 
     5271_e3++; 
     5272} 
     5273return _e3
     5274},toDateString:function(_e4){ 
     5275return _e4.toDateString(); 
     5276},toLocaleDateString:function(_e5){ 
     5277return _e5.toLocaleDateString(); 
     5278},simpleFormat:function(_e6){ 
     5279return function(_e7){ 
     5280var _e8=_e6.replace(/M+/g,DateUtil.zerofill((_e7.getMonth()+1).toString(),2)); 
     5281_e8=_e8.replace(/d+/g,DateUtil.zerofill(_e7.getDate().toString(),2)); 
     5282_e8=_e8.replace(/y{4}/g,_e7.getFullYear()); 
     5283_e8=_e8.replace(/y{1,3}/g,new String(_e7.getFullYear()).substr(2)); 
     5284_e8=_e8.replace(/E+/g,DateUtil.dayOfWeek[_e7.getDay()]); 
     5285return _e8
     5286}; 
     5287},zerofill:function(_e9,_ea){ 
     5288var _eb=_e9
     5289if(_e9.length<_ea){ 
     5290var tmp=_ea-_e9.length; 
    52775291for(i=0;i<tmp;i++){ 
    5278 _e8="0"+_e8
    5279 } 
    5280 } 
    5281 return _e8
    5282 },toDate:function(_ea){ 
    5283 return new Date(_ea.year,_ea.month,_ea.day,_ea.hour||0,_ea.min||0,_ea.sec||0); 
     5292_eb="0"+_eb
     5293} 
     5294} 
     5295return _eb
     5296},toDate:function(_ed){ 
     5297return new Date(_ed.year,_ed.month,_ed.day,_ed.hour||0,_ed.min||0,_ed.sec||0); 
    52845298}}; 
    5285 var ZindexManager={zIndex:1000,getIndex:function(_eb){ 
    5286 if(_eb){ 
    5287 if(isNaN(_eb)){ 
    5288 _eb=Element.getMaxZindex()+1; 
    5289 }else{ 
    5290 if(ZindexManager.zIndex>_eb){ 
    5291 _eb=ZindexManager.zIndex; 
    5292 } 
    5293 } 
    5294 }else{ 
    5295 _eb=ZindexManager.zIndex; 
    5296 } 
    5297 ZindexManager.zIndex=_eb+1; 
    5298 return _eb
     5299var ZindexManager={zIndex:1000,getIndex:function(_ee){ 
     5300if(_ee){ 
     5301if(isNaN(_ee)){ 
     5302_ee=Element.getMaxZindex()+1; 
     5303}else{ 
     5304if(ZindexManager.zIndex>_ee){ 
     5305_ee=ZindexManager.zIndex; 
     5306} 
     5307} 
     5308}else{ 
     5309_ee=ZindexManager.zIndex; 
     5310} 
     5311ZindexManager.zIndex=_ee+1; 
     5312return _ee
    52995313}}; 
    5300 var Modal={maskId:"modalMask",maskClass:"modal_mask",maskClassIE:"modal_mask_ie",element:null,snaps:null,listener:null,resizeListener:null,cover:null,excepteds:null,maskCallbacks:[],unmaskCallbacks:[],count:0,tabKey:9,timer:null,mask:function(_ec,_ed,_ee){ 
    5301 this._mask.callAfterLoading(this,_ec,_ed,_ee); 
     5314var Modal={maskId:"modalMask",maskClass:"modal_mask",maskClassIE:"modal_mask_ie",element:null,snaps:null,listener:null,resizeListener:null,cover:null,excepteds:null,maskCallbacks:[],unmaskCallbacks:[],count:0,tabKey:9,timer:null,mask:function(_ef,_f0,_f1){ 
     5315this._mask.callAfterLoading(this,_ef,_f0,_f1); 
    53025316this._control_tab_key(); 
    5303 },unmask:function(_ef){ 
    5304 this._unmask($(_ef)); 
     5317},unmask:function(_f2){ 
     5318this._unmask($(_f2)); 
    53055319this._control_tab_key(); 
    53065320},unmaskAll:function(){ 
    53075321var max=10; 
    5308 var _f1=0; 
    5309 while(this._isMasked()&&(_f1<max)){ 
     5322var _f4=0; 
     5323while(this._isMasked()&&(_f4<max)){ 
    53105324this._unmask(); 
    5311 _f1++; 
     5325_f4++; 
    53125326} 
    53135327this._control_tab_key(); 
    5314 },addMaskCallback:function(_f2){ 
     5328},addMaskCallback:function(_f5){ 
    53155329if(!this.maskCallbacks.any(function(c){ 
    5316 return c==_f2
     5330return c==_f5
    53175331})){ 
    5318 this.maskCallbacks.push(_f2); 
    5319 } 
    5320 },removeMaskCallback:function(_f4){ 
     5332this.maskCallbacks.push(_f5); 
     5333} 
     5334},removeMaskCallback:function(_f7){ 
    53215335this.maskCallbacks=this.maskCallbacks.reject(function(c){ 
    5322 return c==_f4
     5336return c==_f7
    53235337}); 
    53245338},clearMaskCallback:function(){ 
    53255339this.maskCallbacks=[]; 
    5326 },addUnmaskCallback:function(_f6){ 
     5340},addUnmaskCallback:function(_f9){ 
    53275341if(!this.unmaskCallbacks.any(function(c){ 
    5328 return c==_f6
     5342return c==_f9
    53295343})){ 
    5330 this.unmaskCallbacks.push(_f6); 
    5331 } 
    5332 },removeUnmaskCallback:function(_f8){ 
     5344this.unmaskCallbacks.push(_f9); 
     5345} 
     5346},removeUnmaskCallback:function(_fb){ 
    53335347this.unmaskCallbacks=this.unmaskCallbacks.reject(function(c){ 
    5334 return c==_f8
     5348return c==_fb
    53355349}); 
    53365350},clearUnmaskCallback:function(){ 
     
    53385352},existTarget:function(){ 
    53395353if(this.target){ 
    5340 var _fa=(this.target.id)?$(this.target.id):$(this.target); 
    5341 return (_fa)?Element.visible(_fa):false; 
     5354var _fd=(this.target.id)?$(this.target.id):$(this.target); 
     5355return (_fd)?Element.visible(_fd):false; 
    53425356} 
    53435357return false; 
    53445358},isMasked:function(){ 
    53455359return Modal.element&&Element.visible(Modal.element); 
    5346 },_mask:function(_fb){ 
    5347 var _fc=Object.extend({cssPrefix:"custom_",zIndex:null},arguments[1]||{}); 
    5348 var _fd=arguments[2]; 
     5360},_mask:function(_fe){ 
     5361var _ff=Object.extend({cssPrefix:"custom_",zIndex:null},arguments[1]||{}); 
     5362var _100=arguments[2]; 
    53495363if(Modal.element){ 
    5350 Modal._snap(_fb); 
     5364Modal._snap(_fe); 
    53515365Modal._rebuildMask(); 
    53525366}else{ 
    53535367Modal.snaps=[]; 
    53545368Modal.excepteds=[]; 
    5355 Modal._buildMask(_fc.cssPrefix); 
     5369Modal._buildMask(_ff.cssPrefix); 
    53565370Modal.cover=new IECover(Modal.element,{transparent:true}); 
    53575371} 
    5358 if(_fd){ 
     5372if(_100){ 
    53595373Element.setStyle(Modal.element,{position:"absolute"}); 
    53605374this._setModalPosition(); 
     
    53635377} 
    53645378} 
    5365 Modal._setZindex(_fb,_fc.zIndex); 
     5379Modal._setZindex(_fe,_ff.zIndex); 
    53665380Modal._setFullSize(); 
    5367 if(!Modal.hasExcepted(_fb)){ 
    5368 Modal.excepteds.push(_fb); 
     5381if(!Modal.hasExcepted(_fe)){ 
     5382Modal.excepteds.push(_fe); 
    53695383} 
    53705384this.count++; 
    5371 this.maskCallbacks.each(function(_fe){ 
    5372 _fe(_fb); 
    5373 }); 
    5374 this.target=_fb
    5375 if(!_fb.id){ 
    5376 _fb.id="modal_tmp_id_"+new Date().getTime(); 
    5377 } 
    5378 },_unmask:function(_ff){ 
    5379 var _100=null; 
     5385this.maskCallbacks.each(function(_101){ 
     5386_101(_fe); 
     5387}); 
     5388this.target=_fe
     5389if(!_fe.id){ 
     5390_fe.id="modal_tmp_id_"+new Date().getTime(); 
     5391} 
     5392},_unmask:function(_102){ 
     5393var _103=null; 
    53805394if(Modal.element){ 
    53815395if(Modal.snaps.length==0){ 
     
    53875401}else{ 
    53885402Element.setStyle(Modal.element,{zIndex:Modal.snaps.pop()}); 
    5389 if(_ff){ 
     5403if(_102){ 
    53905404Modal.excepteds=(Modal.excepteds||[]).reject(function(e){ 
    5391 return e==_ff
     5405return e==_102
    53925406}); 
    53935407}else{ 
     
    53975411} 
    53985412this.count++; 
    5399 this.unmaskCallbacks.each(function(_102){ 
    5400 _102(); 
     5413this.unmaskCallbacks.each(function(_105){ 
     5414_105(); 
    54015415}); 
    54025416this.target=Modal.excepteds?Modal.excepteds.last():false; 
     
    54295443},_isMasked:function(){ 
    54305444return Modal.element&&Element.visible(Modal.element); 
    5431 },_snap:function(_103){ 
    5432 var _104=Element.getStyle(Modal.element,"zIndex"); 
    5433 if(_104&&Modal._isMasked()&&!Modal.hasExcepted(_103)){ 
    5434 Modal.snaps.push(_104); 
    5435 } 
    5436 },_setZindex:function(_105,_106){ 
    5437 Element.setStyle(Modal.element,{zIndex:ZindexManager.getIndex(_106)}); 
    5438 _105=Element.makePositioned($(_105)); 
    5439 Element.setStyle(_105,{zIndex:ZindexManager.getIndex(_106)}); 
     5445},_snap:function(_106){ 
     5446var _107=Element.getStyle(Modal.element,"zIndex"); 
     5447if(_107&&Modal._isMasked()&&!Modal.hasExcepted(_106)){ 
     5448Modal.snaps.push(_107); 
     5449} 
     5450},_setZindex:function(_108,_109){ 
     5451Element.setStyle(Modal.element,{zIndex:ZindexManager.getIndex(_109)}); 
     5452_108=Element.makePositioned($(_108)); 
     5453Element.setStyle(_108,{zIndex:ZindexManager.getIndex(_109)}); 
    54405454},_setFullSize:function(){ 
    54415455Modal.element.setStyle({width:Element.getWindowWidth()+"px",height:Element.getWindowHeight()+"px"}); 
     
    54435457Modal.cover.resetSize(); 
    54445458} 
    5445 },_buildMask:function(_107){ 
     5459},_buildMask:function(_10a){ 
    54465460var mask=Builder.node("div",{id:Modal.maskId}); 
    5447 Modal._setClassNames(mask,_107); 
     5461Modal._setClassNames(mask,_10a); 
    54485462document.body.appendChild(mask); 
    54495463Modal.element=mask; 
    54505464Modal._addEvent(); 
    5451 },_setClassNames:function(_109,_10a){ 
    5452 var _10b=(UserAgent.isIE())?Modal.maskClassIE:Modal.maskClass; 
    5453 Element.addClassName(_109,_10b); 
    5454 Element.addClassName(_109,_10a+_10b); 
     5465},_setClassNames:function(_10c,_10d){ 
     5466var _10e=(UserAgent.isIE())?Modal.maskClassIE:Modal.maskClass; 
     5467Element.addClassName(_10c,_10e); 
     5468Element.addClassName(_10c,_10d+_10e); 
    54555469},_rebuildMask:function(){ 
    54565470document.body.appendChild(Modal.element); 
     
    54635477return src.spinelzMaskResult; 
    54645478} 
    5465 var _10d=false; 
    5466 var _10e=this.excepteds.last(); 
    5467 var _10f=src; 
    5468 if(_10e&&Element.descendantOf(src,_10e)){ 
    5469 _10d=true; 
    5470 }else{ 
    5471 var _110=Element.getStyle(Modal.element,"zIndex"); 
    5472 var _111=null; 
     5479var _110=false; 
     5480var _111=this.excepteds.last(); 
     5481var _112=src; 
     5482if(_111&&Element.descendantOf(src,_111)){ 
     5483_110=true; 
     5484}else{ 
     5485var _113=Element.getStyle(Modal.element,"zIndex"); 
     5486var _114=null; 
    54735487while((src=src.parentNode)&&src!=document.body){ 
    5474 if(src.style&&(_111=Element.getStyle(src,"zIndex"))){ 
    5475 _10d=(_111>_110); 
     5488if(src.style&&(_114=Element.getStyle(src,"zIndex"))){ 
     5489_110=(_114>_113); 
    54765490break; 
    54775491} 
    54785492} 
    54795493} 
    5480 _10f.spinelzMaskCount=this.count; 
    5481 _10f.spinelzMaskResult=_10d
    5482 return _10d
    5483 },_handleEvent:function(_112){ 
    5484 var src=Event.element(_112); 
    5485 if(!(Modal._isOutOfModal(src)||(_112.keyCode&&(_112.keyCode==this.tabKey)))){ 
    5486 Event.stop(_112); 
    5487 } 
    5488 },_onResize:function(_114){ 
     5494_112.spinelzMaskCount=this.count; 
     5495_112.spinelzMaskResult=_110
     5496return _110
     5497},_handleEvent:function(_115){ 
     5498var src=Event.element(_115); 
     5499if(!(Modal._isOutOfModal(src)||(_115.keyCode&&(_115.keyCode==this.tabKey)))){ 
     5500Event.stop(_115); 
     5501} 
     5502},_onResize:function(_117){ 
    54895503Modal._setFullSize(); 
    5490 },hasExcepted:function(_115){ 
    5491 return (Modal.excepteds||[]).any(function(_116){ 
    5492 return _116.id==_115.id; 
    5493 }); 
    5494 },_control_tab_key:function(_117){ 
    5495 if(!_117){ 
    5496 _117=$A(document.body.getElementsByTagName("form")); 
    5497 } 
    5498 _117.each(function(form){ 
     5504},hasExcepted:function(_118){ 
     5505return (Modal.excepteds||[]).any(function(_119){ 
     5506return _119.id==_118.id; 
     5507}); 
     5508},_control_tab_key:function(_11a){ 
     5509if(!_11a){ 
     5510_11a=$A(document.body.getElementsByTagName("form")); 
     5511} 
     5512_11a.each(function(form){ 
    54995513if(!Modal._isOutOfModal(form)){ 
    55005514Form.getElements(form).each(function(el){ 
     
    55105524var IECover=Class.create(); 
    55115525IECover.src="javascript:false;"; 
    5512 IECover.prototype={idSuffix:"iecover",initialize:function(_11b){ 
     5526IECover.prototype={idSuffix:"iecover",initialize:function(_11e){ 
    55135527this.options=Object.extend({transparent:false,padding:0},arguments[1]||{}); 
    55145528if(document.all){ 
    5515 _11b=$(_11b); 
    5516 this.id=_11b.id.appendSuffix(this.idSuffix); 
    5517 this._build(_11b); 
     5529_11e=$(_11e); 
     5530this.id=_11e.id.appendSuffix(this.idSuffix); 
     5531this._build(_11e); 
    55185532this.resetSize(); 
    55195533} 
    55205534},resetSize:function(){ 
    55215535if(this.element){ 
    5522 var _11c=this.element.parentNode; 
    5523 var _11d=this.options.padding; 
    5524 this.element.width=_11c.offsetWidth-_11d+"px"; 
    5525 this.element.height=Element.getHeight(_11c)-_11d+"px"; 
    5526 } 
    5527 },_build:function(_11e){ 
    5528 var _11f=this.options.padding/2; 
    5529 var _120={position:"absolute",top:_11f+"px",left:_11f+"px"}; 
     5536var _11f=this.element.parentNode; 
     5537var _120=this.options.padding; 
     5538this.element.width=_11f.offsetWidth-_120+"px"; 
     5539this.element.height=Element.getHeight(_11f)-_120+"px"; 
     5540} 
     5541},_build:function(_121){ 
     5542var _122=this.options.padding/2; 
     5543var _123={position:"absolute",top:_122+"px",left:_122+"px"}; 
    55305544if(this.options.transparent){ 
    5531 _120.filter="alpha(opacity=0)"; 
    5532 } 
    5533 if(_11e.buildedIECover&&$(this.id)){ 
     5545_123.filter="alpha(opacity=0)"; 
     5546} 
     5547if(_121.buildedIECover&&$(this.id)){ 
    55345548this.element=$(this.id); 
    55355549}else{ 
    55365550this.element=Builder.node("iframe",{src:IECover.src,id:this.id,frameborder:0}); 
    55375551} 
    5538 Element.setStyle(this.element,_120); 
    5539 var _121=Element.down(_11e,0); 
    5540 if(_121){ 
    5541 Element.makePositioned(_121); 
    5542 } 
    5543 _11e.insertBefore(this.element,_11e.firstChild); 
    5544 _11e.buildedIECover=true; 
     5552Element.setStyle(this.element,_123); 
     5553var _124=Element.down(_121,0); 
     5554if(_124){ 
     5555Element.makePositioned(_124); 
     5556} 
     5557_121.insertBefore(this.element,_121.firstChild); 
     5558_121.buildedIECover=true; 
    55455559}}; 
    55465560var UserAgent={getUserAgent:function(){ 
     
    55615575var ShortcutManager=Class.create(); 
    55625576ShortcutManager.prototype={initialize:function(){ 
    5563 var _122={detectKeyup:false,initialStarted:true,preventDefault:true}; 
    5564 this.options=Object.extend(_122,arguments[0]||{}); 
     5577var _125={detectKeyup:false,initialStarted:true,preventDefault:true}; 
     5578this.options=Object.extend(_125,arguments[0]||{}); 
    55655579this.keydownListener=this.eventKeydown.bindAsEventListener(this); 
    55665580if(this.options.detectKeyup){ 
     
    55885602Event.observe(document,"keyup",this.keyupListener); 
    55895603} 
    5590 },add:function(c1,c2,_125){ 
     5604},add:function(c1,c2,_128){ 
    55915605if(c1.constructor==Array){ 
    55925606var self=this; 
    55935607c1.each(function(pair){ 
    5594 self._add_or_remove_function(pair[0],pair[1],_125); 
    5595 }); 
    5596 }else{ 
    5597 this._add_or_remove_function(c1,c2,_125); 
     5608self._add_or_remove_function(pair[0],pair[1],_128); 
     5609}); 
     5610}else{ 
     5611this._add_or_remove_function(c1,c2,_128); 
    55985612} 
    55995613},destroy:function(){ 
     
    56025616Event.stopObserving(document,"keyup",this.keyupListener); 
    56035617} 
    5604 },eventKeydown:function(_128){ 
     5618},eventKeydown:function(_12b){ 
    56055619if(this.executable){ 
    56065620var code; 
    56075621var key=""; 
    5608 _128=_128||window.event; 
    5609 if(_128.keyCode){ 
    5610 if(_128.altKey){ 
     5622_12b=_12b||window.event; 
     5623if(_12b.keyCode){ 
     5624if(_12b.altKey){ 
    56115625key+="a"; 
    56125626} 
    5613 if(_128.ctrlKey){ 
     5627if(_12b.ctrlKey){ 
    56145628key+="c"; 
    56155629} 
    5616 if(_128.shiftKey){ 
     5630if(_12b.shiftKey){ 
    56175631key+="s"; 
    56185632} 
     
    56205634key="n"; 
    56215635} 
    5622 code=this._mergeNumKey(_128.keyCode); 
     5636code=this._mergeNumKey(_12b.keyCode); 
    56235637if(this.keydownFunc[key][code]){ 
    56245638this.keydownFunc[key][code](); 
    56255639if(this.options.preventDefault){ 
    5626 Event.stop(_128); 
    5627 } 
    5628 } 
    5629 } 
    5630 } 
    5631 },eventKeyup:function(_12b){ 
     5640Event.stop(_12b); 
     5641} 
     5642} 
     5643} 
     5644} 
     5645},eventKeyup:function(_12e){ 
    56325646if(this.executable){ 
    56335647var code; 
    5634 _12b=_12b||window.event; 
    5635 if(_12b.keyCode){ 
    5636 code=this._mergeNumKey(_12b.keyCode); 
     5648_12e=_12e||window.event; 
     5649if(_12e.keyCode){ 
     5650code=this._mergeNumKey(_12e.keyCode); 
    56375651if(this.keyupFunc[code]){ 
    56385652this.keyupFunc[code](); 
    56395653if(this.options.preventDefault){ 
    5640 Event.stop(_12b); 
    5641 } 
    5642 } 
    5643 } 
    5644 } 
    5645 },remove:function(_12d){ 
    5646 this._add_or_remove_function(_12d); 
     5654Event.stop(_12e); 
     5655} 
     5656} 
     5657} 
     5658} 
     5659},remove:function(_130){ 
     5660this._add_or_remove_function(_130); 
    56475661},start:function(){ 
    56485662this.executable=true; 
    56495663},stop:function(){ 
    56505664this.executable=false; 
    5651 },_add_or_remove_function:function(_12e,_12f,_130){ 
    5652 var _131
    5653 var _132=new Array(); 
     5665},_add_or_remove_function:function(_131,_132,_133){ 
     5666var _134
     5667var _135=new Array(); 
    56545668var self=this; 
    5655 $A(_12e.toLowerCase().split("+")).each(function(key){ 
     5669$A(_131.toLowerCase().split("+")).each(function(key){ 
    56565670if(key=="alt"){ 
    5657 _132.push("a"); 
     5671_135.push("a"); 
    56585672}else{ 
    56595673if(key=="ctrl"){ 
    5660 _132.push("c"); 
     5674_135.push("c"); 
    56615675}else{ 
    56625676if(key=="shift"){ 
    5663 _132.push("s"); 
    5664 }else{ 
    5665 _131=self.keyCode[key]; 
    5666 } 
    5667 } 
    5668 } 
    5669 }); 
    5670 var key=_132.sortBy(function(_136,_137){ 
    5671 return _136
     5677_135.push("s"); 
     5678}else{ 
     5679_134=self.keyCode[key]; 
     5680} 
     5681} 
     5682} 
     5683}); 
     5684var key=_135.sortBy(function(_139,_13a){ 
     5685return _139
    56725686}).join(""); 
    56735687if(key==""){ 
    56745688key="n"; 
    56755689} 
    5676 if(_12f){ 
    5677 if(_130){ 
    5678 this.keyupFunc[_131]=_12f
    5679 }else{ 
    5680 this.keydownFunc[key][_131]=_12f
    5681 } 
    5682 }else{ 
    5683 if(_130){ 
    5684 this.keyupFunc[_131]=null; 
    5685 }else{ 
    5686 this.keydownFunc[key][_131]=null; 
     5690if(_132){ 
     5691if(_133){ 
     5692this.keyupFunc[_134]=_132
     5693}else{ 
     5694this.keydownFunc[key][_134]=_132
     5695} 
     5696}else{ 
     5697if(_133){ 
     5698this.keyupFunc[_134]=null; 
     5699}else{ 
     5700this.keydownFunc[key][_134]=null; 
    56875701} 
    56885702} 
     
    56935707var args=$A(arguments); 
    56945708var self=this; 
    5695 var _13b=args.shift()||this; 
     5709var _13e=args.shift()||this; 
    56965710if(UserAgent.isIE()&&(document.readyState!="complete")){ 
    56975711Event.observe(window,"load",function(){ 
    5698 self.apply(_13b,args); 
    5699 }); 
    5700 }else{ 
    5701 this.apply(_13b,args); 
     5712self.apply(_13e,args); 
     5713}); 
     5714}else{ 
     5715this.apply(_13e,args); 
    57025716} 
    57035717}; 
     
    57195733document.body.focus(); 
    57205734} 
    5721 },concat:function(base,_13d){ 
     5735},concat:function(base,_140){ 
    57225736var hash={}; 
    5723 _13d.each(function(_13f){ 
    5724 hash[_13f]=base.appendSuffix(_13f); 
     5737_140.each(function(_142){ 
     5738hash[_142]=base.appendSuffix(_142); 
    57255739}); 
    57265740return hash; 
    5727 },getId:function(_140){ 
    5728 _140=_140||""; 
    5729 return _140.appendSuffix(++SpinelzUtil.idCount); 
    5730 },toAttriteString:function(_141,_142){ 
    5731 var html=_141.map(function(pair){ 
     5741},getId:function(_143){ 
     5742_143=_143||""; 
     5743return _143.appendSuffix(++SpinelzUtil.idCount); 
     5744},toAttriteString:function(_144,_145){ 
     5745var html=_144.map(function(pair){ 
    57325746return pair.key+"='"+pair.value+"'"; 
    57335747}).join(" "); 
    5734 if(_142&&(html.length>0)){ 
     5748if(_145&&(html.length>0)){ 
    57355749html=" "+html; 
    57365750} 
    57375751return html; 
    5738 },_redrawForIE:function(_145){ 
     5752},_redrawForIE:function(_148){ 
    57395753if(UserAgent.isIE()){ 
    5740 _145=$(_145); 
    5741 if(_145){ 
     5754_148=$(_148); 
     5755if(_148){ 
    57425756setTimeout(function(){ 
    5743 Element.classNames(_145).set("dummy"); 
     5757Element.classNames(_148).set("dummy"); 
    57445758},200); 
    57455759} 
     
    57585772}); 
    57595773} 
    5760 var $A=Array.from=function(_146){ 
    5761 if(!_146){ 
     5774var $A=Array.from=function(_149){ 
     5775if(!_149){ 
    57625776return []; 
    57635777} 
    5764 if(_146.toArray){ 
    5765 return _146.toArray(); 
    5766 }else{ 
    5767 var _147=[]; 
    5768 for(var i=0,len=_146.length;i<len;i++){ 
    5769 _147.push(_146[i]); 
    5770 } 
    5771 return _147
     5778if(_149.toArray){ 
     5779return _149.toArray(); 
     5780}else{ 
     5781var _14a=[]; 
     5782for(var i=0,len=_149.length;i<len;i++){ 
     5783_14a.push(_149[i]); 
     5784} 
     5785return _14a
    57725786} 
    57735787}; 
    57745788var Color=Class.create(); 
    5775 Color.prototype={initialize:function(_14a){ 
    5776 this.color=this.parse(_14a); 
    5777 },toHex:function(_14b){ 
    5778 _14b=_14b||this.color; 
    5779 return _14b.invoke("toColorPart"); 
     5789Color.prototype={initialize:function(_14d){ 
     5790this.color=this.parse(_14d); 
     5791},toHex:function(_14e){ 
     5792_14e=_14e||this.color; 
     5793return _14e.invoke("toColorPart"); 
    57805794},invert:function(){ 
    57815795return this.toCssStyle(this.color.map(function(c){ 
    57825796return 255-c; 
    57835797})); 
    5784 },toCssStyle:function(_14d){ 
    5785 _14d=_14d||this.color; 
    5786 return "#"+this.toHex(_14d).join(""); 
    5787 },parse:function(_14e){ 
    5788 _14e=_14e||this.color; 
    5789 if(_14e.match(/rgb\(\d+,\s*\d+,\s*\d+\)/)){ 
    5790 return _14e.match(/\d+/g).map(function(c){ 
     5798},toCssStyle:function(_150){ 
     5799_150=_150||this.color; 
     5800return "#"+this.toHex(_150).join(""); 
     5801},parse:function(_151){ 
     5802_151=_151||this.color; 
     5803if(_151.match(/rgb\(\d+,\s*\d+,\s*\d+\)/)){ 
     5804return _151.match(/\d+/g).map(function(c){ 
    57915805return parseInt(c,10); 
    57925806}); 
    57935807}else{ 
    5794 if(_14e.match(/#[a-fA-F0-9]{6}/)){ 
    5795 return _14e.match(/([a-fA-F0-9]){2}/g).map(function(c){ 
     5808if(_151.match(/#[a-fA-F0-9]{6}/)){ 
     5809return _151.match(/([a-fA-F0-9]){2}/g).map(function(c){ 
    57965810return parseInt(c,16); 
    57975811}); 
    57985812} 
    57995813} 
    5800 throw "parse error: "+_14e
     5814throw "parse error: "+_151
    58015815}}; 
    58025816var FunctionQueue={_active:false,_queue:[],_timer:null,exec:function(){ 
     
    58335847var DebugConsole={_active:false,_basetime:null,_messages:null,activate:function(){ 
    58345848this._active=true; 
    5835 },dump:function(_154){ 
    5836 _154=_154||{}; 
    5837 switch(_154.type){ 
     5849},dump:function(_157){ 
     5850_157=_157||{}; 
     5851switch(_157.type){ 
    58385852case "alert": 
    58395853this._dump_alert(); 
     
    58465860break; 
    58475861case "update": 
    5848 this._dump_update(_154.target); 
     5862this._dump_update(_157.target); 
    58495863break; 
    58505864default: 
     
    58615875this._messages=[]; 
    58625876} 
    5863 },log:function(_155){ 
     5877},log:function(_158){ 
    58645878if(this._active){ 
    5865 var _156=("00000000"+(new Date()-this._basetime)).slice(-8); 
    5866 this._messages.push(_156+" : "+_155); 
     5879var _159=("00000000"+(new Date()-this._basetime)).slice(-8); 
     5880this._messages.push(_159+" : "+_158); 
    58675881} 
    58685882},_dump_alert:function(){ 
    5869 this._messages.each(function(_157){ 
    5870 alert(_157); 
     5883this._messages.each(function(_15a){ 
     5884alert(_15a); 
    58715885}); 
    58725886},_dump_clipboard:function(){ 
    58735887var dump=""; 
    5874 this._messages.each(function(_159){ 
    5875 dump+=_159+"\n"; 
     5888this._messages.each(function(_15c){ 
     5889dump+=_15c+"\n"; 
    58765890}); 
    58775891clipboardData.setData("Text",dump); 
    58785892},_dump_console:function(){ 
    5879 this._messages.each(function(_15a){ 
    5880 console.log(_15a); 
    5881 }); 
    5882 },_dump_update:function(_15b){ 
     5893this._messages.each(function(_15d){ 
     5894console.log(_15d); 
     5895}); 
     5896},_dump_update:function(_15e){ 
    58835897var html=""; 
    5884 this._messages.each(function(_15d){ 
    5885 html+="<p>"+_15d+"</p>"; 
    5886 }); 
    5887 Element.update(_15b,html); 
     5898this._messages.each(function(_160){ 
     5899html+="<p>"+_160+"</p>"; 
     5900}); 
     5901Element.update(_15e,html); 
    58885902}}; 
    58895903if(UserAgent.isFF3()){ 
    5890 function __$(_15e){ 
     5904function __$(_161){ 
    58915905if(arguments.length>1){ 
    5892 for(var i=0,_160=[],_161=arguments.length;i<_161;i++){ 
    5893 _160.push($(arguments[i])); 
    5894 } 
    5895 return _160
    5896 } 
    5897 if(typeof _15e=="string"){ 
    5898 _15e=document.getElementById(_15e); 
    5899 } 
    5900 if(_15e&&_15e.nodeType==1&&!_15e._extendedBySpinelz&&_15e.tagName&&_15e!=window){ 
    5901 _15e.__getElementsByClassName=_15e.getElementsByClassName; 
    5902 _15e.getElementsByClassName=function(_162){ 
    5903 return $A(_15e.__getElementsByClassName(_162)); 
    5904 }; 
    5905 _15e._extendedBySpinelz=true; 
    5906 } 
    5907 return Element.extend(_15e); 
     5906for(var i=0,_163=[],_164=arguments.length;i<_164;i++){ 
     5907_163.push($(arguments[i])); 
     5908} 
     5909return _163
     5910} 
     5911if(typeof _161=="string"){ 
     5912_161=document.getElementById(_161); 
     5913} 
     5914if(_161&&_161.nodeType==1&&!_161._extendedBySpinelz&&_161.tagName&&_161!=window){ 
     5915_161.__getElementsByClassName=_161.getElementsByClassName; 
     5916_161.getElementsByClassName=function(_165){ 
     5917return $A(_161.__getElementsByClassName(_165)); 
     5918}; 
     5919_161._extendedBySpinelz=true; 
     5920} 
     5921return Element.extend(_161); 
    59085922} 
    59095923$=__$; 
    59105924} 
    59115925(function(){ 
    5912 var copy=function(_164,_165,_166){ 
    5913 _166=_166||false; 
    5914 var _167=Element.extend.cache; 
    5915 for(var _168 in _164){ 
    5916 var _169=_164[_168]; 
    5917 if(!_166||!(_168 in _165)){ 
    5918 _165[_168]=_167.findOrStore(_169); 
     5926var copy=function(_167,_168,_169){ 
     5927_169=_169||false; 
     5928var _16a=Element.extend.cache; 
     5929for(var _16b in _167){ 
     5930var _16c=_167[_16b]; 
     5931if(!_169||!(_16b in _168)){ 
     5932_168[_16b]=_16a.findOrStore(_16c); 
    59195933} 
    59205934} 
    59215935}; 
    59225936if(typeof HTMLElement!="undefined"){ 
    5923 [HTMLSelectElement].each(function(_16a){ 
    5924 copy(SelectElement,_16a.prototype); 
     5937[HTMLSelectElement].each(function(_16d){ 
     5938copy(SelectElement,_16d.prototype); 
    59255939}); 
    59265940} 
    59275941})(); 
    5928 Element.extend=function(_16b){ 
    5929 if(!_16b||_nativeExtensions||_16b.nodeType==3){ 
    5930 return _16b
    5931 } 
    5932 if(!_16b._extended&&_16b.tagName&&_16b!=window){ 
    5933 var _16c=Object.clone(Element.Methods),_16d=Element.extend.cache; 
    5934 if(_16b.tagName=="FORM"){ 
    5935 Object.extend(_16c,Form.Methods); 
    5936 } 
    5937 if(["INPUT","TEXTAREA","SELECT"].include(_16b.tagName)){ 
    5938 Object.extend(_16c,Form.Element.Methods); 
    5939 } 
    5940 if(["SELECT"].include(_16b.tagName)){ 
    5941 Object.extend(_16c,SelectElement); 
    5942 } 
    5943 Object.extend(_16c,Element.Methods.Simulated); 
    5944 for(var _16e in _16c){ 
    5945 var _16f=_16c[_16e]; 
    5946 if(typeof _16f=="function"&&!(_16e in _16b)){ 
    5947 _16b[_16e]=_16d.findOrStore(_16f); 
    5948 } 
    5949 } 
    5950 } 
    5951 _16b._extended=true; 
    5952 return _16b
    5953 }; 
    5954 Element.extend.cache={findOrStore:function(_170){ 
    5955 return this[_170]=this[_170]||function(){ 
    5956 return _170.apply(null,[this].concat($A(arguments))); 
     5942Element.extend=function(_16e){ 
     5943if(!_16e||_nativeExtensions||_16e.nodeType==3){ 
     5944return _16e
     5945} 
     5946if(!_16e._extended&&_16e.tagName&&_16e!=window){ 
     5947var _16f=Object.clone(Element.Methods),_170=Element.extend.cache; 
     5948if(_16e.tagName=="FORM"){ 
     5949Object.extend(_16f,Form.Methods); 
     5950} 
     5951if(["INPUT","TEXTAREA","SELECT"].include(_16e.tagName)){ 
     5952Object.extend(_16f,Form.Element.Methods); 
     5953} 
     5954if(["SELECT"].include(_16e.tagName)){ 
     5955Object.extend(_16f,SelectElement); 
     5956} 
     5957Object.extend(_16f,Element.Methods.Simulated); 
     5958for(var _171 in _16f){ 
     5959var _172=_16f[_171]; 
     5960if(typeof _172=="function"&&!(_171 in _16e)){ 
     5961_16e[_171]=_170.findOrStore(_172); 
     5962} 
     5963} 
     5964} 
     5965_16e._extended=true; 
     5966return _16e
     5967}; 
     5968Element.extend.cache={findOrStore:function(_173){ 
     5969return this[_173]=this[_173]||function(){ 
     5970return _173.apply(null,[this].concat($A(arguments))); 
    59575971}; 
    59585972}}; 
  • spinelz/trunk/src/javascripts/spinelz/datepicker.js

    r6003 r6004  
    299299          element.className = this.classNames['today'] + ' ' + element.className; 
    300300          this.todayCell = id; 
    301           this.hovers[id].refresh(); 
     301          this.hovers[id].resetClasses(); 
    302302        } 
    303303        day++; 
     
    313313        return !todayClassName.include(className); 
    314314      }).join(' '); 
    315       this.hovers[this.todayCell].refresh(); 
     315      this.hovers[this.todayCell].resetClasses(); 
    316316    } 
    317317    this.todayCell = null; 
     
    452452      }.bind(this)); 
    453453    }.bind(this)); 
     454    $H(this.hovers).each(function(pair) { pair.value.resetClasses(); }); 
    454455  } 
    455456} 
  • spinelz/trunk/src/javascripts/spinelz_lib/spinelz_util.js

    r6002 r6004  
    674674   
    675675  build: function(element) { 
     676    this.setClasses(element); 
     677    this.setHoverEvent(element); 
     678  }, 
     679 
     680  setHoverEvent: function(element) { 
     681    this.mouseout = this.setNormalClass.bindAsEventListener(this); 
     682    this.mouseover = this.setHoverClass.bindAsEventListener(this); 
     683    Event.observe(element, "mouseout", this.mouseout); 
     684    Event.observe(element, "mouseover", this.mouseover); 
     685  }, 
     686 
     687  toggle: function(event, element, className) { 
     688    Event.stop(event); 
     689    if (this.options.beforeToggle()) element.className = className; 
     690  }, 
     691 
     692  setClasses: function(element) { 
    676693    this.normal = this.getNormalClass(element); 
    677694    this.hover = this.getHoverClass(this.normal); 
     
    681698      this.hover = this.options.cssUtil.joinClassNames(hover);     
    682699    } 
    683     this.setHoverEvent(element); 
    684   }, 
    685  
    686   setHoverEvent: function(element) { 
    687     this.mouseout = this.toggle.bindAsEventListener(this, element, this.normal); 
    688     this.mouseover = this.toggle.bindAsEventListener(this, element, this.hover); 
    689     Event.observe(element, "mouseout", this.mouseout); 
    690     Event.observe(element, "mouseover", this.mouseover); 
    691   }, 
    692  
    693   toggle: function(event, element, className) { 
     700  }, 
     701 
     702  resetClasses: function() { 
     703    this.setClasses(this.element); 
     704  }, 
     705 
     706  setNormalClass: function(event) { 
    694707    Event.stop(event); 
    695     if (this.options.beforeToggle()) element.className = className; 
     708    if (this.options.beforeToggle()) this.element.className = this.normal; 
     709  }, 
     710 
     711  setHoverClass: function(event) { 
     712    Event.stop(event); 
     713    if (this.options.beforeToggle()) this.element.className = this.hover; 
    696714  }, 
    697715