Changeset 5485

Show
Ignore:
Timestamp:
02/04/08 19:07:34 (10 months ago)
Author:
kinoshita
Message:

2807

Files:

Legend:

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

    r5435 r5485  
    40914091Switcher.common=new Switcher(null,null,{build:false}); 
    40924092Object.extend(Switcher.common,{toggle:function(_8,sw,_a,_b){ 
     4093this._init(); 
     4094Switcher.prototype.toggle.call(this,_8); 
     4095},open:function(sw,_d,_e){ 
     4096this._init(); 
     4097Switcher.prototype.open.call(this); 
     4098},close:function(sw,_10,_11){ 
     4099this._init(); 
     4100Switcher.prototype.close.call(this); 
     4101},_init:function(sw,_13,_14){ 
    40934102this.sw=$(sw); 
    4094 this.content=$(_a); 
    4095 if(_b){ 
    4096 this.options=Object.extend(Object.clone(this.options),_b); 
    4097 
    4098 var _c=CssUtil.appendPrefix(this.options.cssPrefix,Switcher.classNames); 
    4099 this.classNames=new CssUtil([Switcher.classNames,_c]); 
    4100 Switcher.prototype.toggle.call(this,_8); 
     4103this.content=$(_13); 
     4104if(_14){ 
     4105this.options=Object.extend(Object.clone(this.options),_14); 
     4106
     4107var _15=CssUtil.appendPrefix(this.options.cssPrefix,Switcher.classNames); 
     4108this.classNames=new CssUtil([Switcher.classNames,_15]); 
    41014109}}); 
    41024110 
  • spinelz/trunk/compress/javascripts/spinelz/switcher.js

    r5332 r5485  
    5454Switcher.common=new Switcher(null,null,{build:false}); 
    5555Object.extend(Switcher.common,{toggle:function(_8,sw,_a,_b){ 
     56this._init(); 
     57Switcher.prototype.toggle.call(this,_8); 
     58},open:function(sw,_d,_e){ 
     59this._init(); 
     60Switcher.prototype.open.call(this); 
     61},close:function(sw,_10,_11){ 
     62this._init(); 
     63Switcher.prototype.close.call(this); 
     64},_init:function(sw,_13,_14){ 
    5665this.sw=$(sw); 
    57 this.content=$(_a); 
    58 if(_b){ 
    59 this.options=Object.extend(Object.clone(this.options),_b); 
     66this.content=$(_13); 
     67if(_14){ 
     68this.options=Object.extend(Object.clone(this.options),_14); 
    6069} 
    61 var _c=CssUtil.appendPrefix(this.options.cssPrefix,Switcher.classNames); 
    62 this.classNames=new CssUtil([Switcher.classNames,_c]); 
    63 Switcher.prototype.toggle.call(this,_8); 
     70var _15=CssUtil.appendPrefix(this.options.cssPrefix,Switcher.classNames); 
     71this.classNames=new CssUtil([Switcher.classNames,_15]); 
    6472}}); 
    6573 
  • spinelz/trunk/src/javascripts/spinelz/switcher.js

    r5332 r5485  
    8484Object.extend(Switcher.common, { 
    8585  toggle: function(event, sw, content, options) { 
     86    this._init(); 
     87    Switcher.prototype.toggle.call(this, event); 
     88  }, 
     89 
     90  open: function(sw, content, options) { 
     91    this._init(); 
     92    Switcher.prototype.open.call(this); 
     93  }, 
     94 
     95  close: function(sw, content, options) { 
     96    this._init(); 
     97    Switcher.prototype.close.call(this); 
     98  }, 
     99 
     100  _init: function(sw, content, options) { 
    86101    this.sw = $(sw); 
    87102    this.content = $(content); 
     
    89104    var customCss = CssUtil.appendPrefix(this.options.cssPrefix, Switcher.classNames); 
    90105    this.classNames = new CssUtil([Switcher.classNames, customCss]); 
    91     Switcher.prototype.toggle.call(this, event); 
    92106  } 
    93107});