Changeset 6025

Show
Ignore:
Timestamp:
01/15/10 15:37:09 (7 months ago)
Author:
kinoshita
Message:

9260

Files:

Legend:

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

    r6024 r6025  
    48824882if(_3f==this.selected){ 
    48834883if(_40){ 
     4884this.selected=null; 
    48844885this.selectTab(_40); 
    48854886} 
     
    49694970},hasPreviousTab:function(){ 
    49704971return this.getPreviousTab()?true:false; 
    4971 },getNextTab:function(){ 
    4972 return Element.next(this.getCurrentTab()); 
    4973 },getPreviousTab:function(){ 
    4974 return Element.previous(this.getCurrentTab()); 
     4972},getNextTab:function(tab){ 
     4973var e=Element.next(tab||this.getCurrentTab()); 
     4974return (e&&e.tagName.toLowerCase()=="br")?this.getNextTab(e):e; 
     4975},getPreviousTab:function(tab){ 
     4976var e=Element.previous(tab||this.getCurrentTab()); 
     4977return (e&&e.tagName.toLowerCase()=="br")?this.getPreviousTab(e):e; 
    49754978},selectNextTab:function(){ 
    49764979this.selectTab(this.getNextTab()); 
     
    49874990},getLastTab:function(){ 
    49884991return this.tabs.last(); 
    4989 },_callBeforeSelect:function(_5d){ 
    4990 var _5e=this._findCallback(this.options.beforeSelect,_5d); 
    4991 return (_5e)?_5e():true; 
    4992 },_callAfterSelect:function(_5f,_60){ 
    4993 var _61=this._findCallback(this.options.afterSelect,_5f); 
    4994 if(_61){ 
    4995 _61(_5f,_60); 
    4996 } 
    4997 },_callAfterSelectOnce:function(_62){ 
    4998 var _63=this._findCallback(this.options.afterSelectOnce,_62); 
    4999 if(_63){ 
    5000 _63(_62); 
    5001 } 
    5002 },_findCallback:function(_64,_65){ 
    5003 if(!_64){ 
    5004 return; 
    5005 } 
    5006 if(_64.constructor!=Function){ 
    5007 if(_64.constructor==Array){ 
    5008 _64=_64[this.panelList.indexOf(_65)]; 
    5009 }else{ 
    5010 _64=_64[this.panelList.indexOf(_65).succ()]; 
    5011 } 
    5012 } 
    5013 return _64
     4992},_callBeforeSelect:function(_61){ 
     4993var _62=this._findCallback(this.options.beforeSelect,_61); 
     4994return (_62)?_62():true; 
     4995},_callAfterSelect:function(_63,_64){ 
     4996var _65=this._findCallback(this.options.afterSelect,_63); 
     4997if(_65){ 
     4998_65(_63,_64); 
     4999} 
     5000},_callAfterSelectOnce:function(_66){ 
     5001var _67=this._findCallback(this.options.afterSelectOnce,_66); 
     5002if(_67){ 
     5003_67(_66); 
     5004} 
     5005},_findCallback:function(_68,_69){ 
     5006if(!_68){ 
     5007return; 
     5008} 
     5009if(_68.constructor!=Function){ 
     5010if(_68.constructor==Array){ 
     5011_68=_68[this.panelList.indexOf(_69)]; 
     5012}else{ 
     5013_68=_68[this.panelList.indexOf(_69).succ()]; 
     5014} 
     5015} 
     5016return _68
    50145017},_setBrTag:function(){ 
    50155018if(this.options.tabRow){ 
    5016 var _66=this.tabContainer; 
    5017 var _67=[]; 
     5019var _6a=this.tabContainer; 
     5020var _6b=[]; 
    50185021var brs=[]; 
    5019 Element.getTagNodes(_66).each(function(n){ 
    5020 ((n.tagName.toLowerCase()=="div")?_67:brs).push(n); 
    5021 }); 
    5022 _67.each(function(t,i){ 
     5022Element.getTagNodes(_6a).each(function(n){ 
     5023((n.tagName.toLowerCase()=="div")?_6b:brs).push(n); 
     5024}); 
     5025_6b.each(function(t,i){ 
    50235026if((i.succ()%this.options.tabRow)==0){ 
    50245027if(brs[0]){ 
    5025 _66.insertBefore(brs[0],t.nextSibling); 
     5028_6a.insertBefore(brs[0],t.nextSibling); 
    50265029brs.shift(); 
    50275030}else{ 
    5028 _66.insertBefore(Builder.node("br",{style:"clear: both"}),t.nextSibling); 
     5031_6a.insertBefore(Builder.node("br",{style:"clear: both"}),t.nextSibling); 
    50295032} 
    50305033} 
  • spinelz/trunk/compress/javascripts/spinelz/tabBox.js

    r5939 r6025  
    248248if(_3f==this.selected){ 
    249249if(_40){ 
     250this.selected=null; 
    250251this.selectTab(_40); 
    251252} 
     
    335336},hasPreviousTab:function(){ 
    336337return this.getPreviousTab()?true:false; 
    337 },getNextTab:function(){ 
    338 return Element.next(this.getCurrentTab()); 
    339 },getPreviousTab:function(){ 
    340 return Element.previous(this.getCurrentTab()); 
     338},getNextTab:function(tab){ 
     339var e=Element.next(tab||this.getCurrentTab()); 
     340return (e&&e.tagName.toLowerCase()=="br")?this.getNextTab(e):e; 
     341},getPreviousTab:function(tab){ 
     342var e=Element.previous(tab||this.getCurrentTab()); 
     343return (e&&e.tagName.toLowerCase()=="br")?this.getPreviousTab(e):e; 
    341344},selectNextTab:function(){ 
    342345this.selectTab(this.getNextTab()); 
     
    353356},getLastTab:function(){ 
    354357return this.tabs.last(); 
    355 },_callBeforeSelect:function(_5d){ 
    356 var _5e=this._findCallback(this.options.beforeSelect,_5d); 
    357 return (_5e)?_5e():true; 
    358 },_callAfterSelect:function(_5f,_60){ 
    359 var _61=this._findCallback(this.options.afterSelect,_5f); 
    360 if(_61){ 
    361 _61(_5f,_60); 
    362 } 
    363 },_callAfterSelectOnce:function(_62){ 
    364 var _63=this._findCallback(this.options.afterSelectOnce,_62); 
    365 if(_63){ 
    366 _63(_62); 
    367 } 
    368 },_findCallback:function(_64,_65){ 
    369 if(!_64){ 
    370 return; 
    371 } 
    372 if(_64.constructor!=Function){ 
    373 if(_64.constructor==Array){ 
    374 _64=_64[this.panelList.indexOf(_65)]; 
    375 }else{ 
    376 _64=_64[this.panelList.indexOf(_65).succ()]; 
    377 } 
    378 } 
    379 return _64
     358},_callBeforeSelect:function(_61){ 
     359var _62=this._findCallback(this.options.beforeSelect,_61); 
     360return (_62)?_62():true; 
     361},_callAfterSelect:function(_63,_64){ 
     362var _65=this._findCallback(this.options.afterSelect,_63); 
     363if(_65){ 
     364_65(_63,_64); 
     365} 
     366},_callAfterSelectOnce:function(_66){ 
     367var _67=this._findCallback(this.options.afterSelectOnce,_66); 
     368if(_67){ 
     369_67(_66); 
     370} 
     371},_findCallback:function(_68,_69){ 
     372if(!_68){ 
     373return; 
     374} 
     375if(_68.constructor!=Function){ 
     376if(_68.constructor==Array){ 
     377_68=_68[this.panelList.indexOf(_69)]; 
     378}else{ 
     379_68=_68[this.panelList.indexOf(_69).succ()]; 
     380} 
     381} 
     382return _68
    380383},_setBrTag:function(){ 
    381384if(this.options.tabRow){ 
    382 var _66=this.tabContainer; 
    383 var _67=[]; 
     385var _6a=this.tabContainer; 
     386var _6b=[]; 
    384387var brs=[]; 
    385 Element.getTagNodes(_66).each(function(n){ 
    386 ((n.tagName.toLowerCase()=="div")?_67:brs).push(n); 
    387 }); 
    388 _67.each(function(t,i){ 
     388Element.getTagNodes(_6a).each(function(n){ 
     389((n.tagName.toLowerCase()=="div")?_6b:brs).push(n); 
     390}); 
     391_6b.each(function(t,i){ 
    389392if((i.succ()%this.options.tabRow)==0){ 
    390393if(brs[0]){ 
    391 _66.insertBefore(brs[0],t.nextSibling); 
     394_6a.insertBefore(brs[0],t.nextSibling); 
    392395brs.shift(); 
    393396}else{ 
    394 _66.insertBefore(Builder.node("br",{style:"clear: both"}),t.nextSibling); 
     397_6a.insertBefore(Builder.node("br",{style:"clear: both"}),t.nextSibling); 
    395398} 
    396399} 
  • spinelz/trunk/src/javascripts/spinelz/tabBox.js

    r5939 r6025  
    350350      if (index == this.selected) { 
    351351        if (nextActiveTab) { 
     352          this.selected = null; 
    352353          this.selectTab(nextActiveTab); 
    353354        } 
     
    460461  }, 
    461462 
    462   getNextTab: function() { 
    463     return Element.next(this.getCurrentTab()); 
    464   }, 
    465  
    466   getPreviousTab: function() { 
    467     return Element.previous(this.getCurrentTab()); 
     463  getNextTab: function(tab) { 
     464    var e = Element.next(tab || this.getCurrentTab()); 
     465    return (e && e.tagName.toLowerCase() == 'br') ? this.getNextTab(e) : e; 
     466  }, 
     467 
     468  getPreviousTab: function(tab) { 
     469    var e = Element.previous(tab || this.getCurrentTab()); 
     470    return (e && e.tagName.toLowerCase() == 'br') ? this.getPreviousTab(e) : e; 
    468471  }, 
    469472