Changeset 6025
- Timestamp:
- 01/15/10 15:37:09 (7 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
spinelz/trunk/compress/javascripts/spinelz/spinelz_for_rubricks.js
r6024 r6025 4882 4882 if(_3f==this.selected){ 4883 4883 if(_40){ 4884 this.selected=null; 4884 4885 this.selectTab(_40); 4885 4886 } … … 4969 4970 },hasPreviousTab:function(){ 4970 4971 return 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){ 4973 var e=Element.next(tab||this.getCurrentTab()); 4974 return (e&&e.tagName.toLowerCase()=="br")?this.getNextTab(e):e; 4975 },getPreviousTab:function(tab){ 4976 var e=Element.previous(tab||this.getCurrentTab()); 4977 return (e&&e.tagName.toLowerCase()=="br")?this.getPreviousTab(e):e; 4975 4978 },selectNextTab:function(){ 4976 4979 this.selectTab(this.getNextTab()); … … 4987 4990 },getLastTab:function(){ 4988 4991 return 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 _6 1=this._findCallback(this.options.afterSelect,_5f);4994 if(_6 1){4995 _6 1(_5f,_60);4996 } 4997 },_callAfterSelectOnce:function(_6 2){4998 var _6 3=this._findCallback(this.options.afterSelectOnce,_62);4999 if(_6 3){5000 _6 3(_62);5001 } 5002 },_findCallback:function(_6 4,_65){5003 if(!_6 4){5004 return; 5005 } 5006 if(_6 4.constructor!=Function){5007 if(_6 4.constructor==Array){5008 _6 4=_64[this.panelList.indexOf(_65)];5009 }else{ 5010 _6 4=_64[this.panelList.indexOf(_65).succ()];5011 } 5012 } 5013 return _6 4;4992 },_callBeforeSelect:function(_61){ 4993 var _62=this._findCallback(this.options.beforeSelect,_61); 4994 return (_62)?_62():true; 4995 },_callAfterSelect:function(_63,_64){ 4996 var _65=this._findCallback(this.options.afterSelect,_63); 4997 if(_65){ 4998 _65(_63,_64); 4999 } 5000 },_callAfterSelectOnce:function(_66){ 5001 var _67=this._findCallback(this.options.afterSelectOnce,_66); 5002 if(_67){ 5003 _67(_66); 5004 } 5005 },_findCallback:function(_68,_69){ 5006 if(!_68){ 5007 return; 5008 } 5009 if(_68.constructor!=Function){ 5010 if(_68.constructor==Array){ 5011 _68=_68[this.panelList.indexOf(_69)]; 5012 }else{ 5013 _68=_68[this.panelList.indexOf(_69).succ()]; 5014 } 5015 } 5016 return _68; 5014 5017 },_setBrTag:function(){ 5015 5018 if(this.options.tabRow){ 5016 var _6 6=this.tabContainer;5017 var _6 7=[];5019 var _6a=this.tabContainer; 5020 var _6b=[]; 5018 5021 var brs=[]; 5019 Element.getTagNodes(_6 6).each(function(n){5020 ((n.tagName.toLowerCase()=="div")?_6 7:brs).push(n);5021 }); 5022 _6 7.each(function(t,i){5022 Element.getTagNodes(_6a).each(function(n){ 5023 ((n.tagName.toLowerCase()=="div")?_6b:brs).push(n); 5024 }); 5025 _6b.each(function(t,i){ 5023 5026 if((i.succ()%this.options.tabRow)==0){ 5024 5027 if(brs[0]){ 5025 _6 6.insertBefore(brs[0],t.nextSibling);5028 _6a.insertBefore(brs[0],t.nextSibling); 5026 5029 brs.shift(); 5027 5030 }else{ 5028 _6 6.insertBefore(Builder.node("br",{style:"clear: both"}),t.nextSibling);5031 _6a.insertBefore(Builder.node("br",{style:"clear: both"}),t.nextSibling); 5029 5032 } 5030 5033 } spinelz/trunk/compress/javascripts/spinelz/tabBox.js
r5939 r6025 248 248 if(_3f==this.selected){ 249 249 if(_40){ 250 this.selected=null; 250 251 this.selectTab(_40); 251 252 } … … 335 336 },hasPreviousTab:function(){ 336 337 return 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){ 339 var e=Element.next(tab||this.getCurrentTab()); 340 return (e&&e.tagName.toLowerCase()=="br")?this.getNextTab(e):e; 341 },getPreviousTab:function(tab){ 342 var e=Element.previous(tab||this.getCurrentTab()); 343 return (e&&e.tagName.toLowerCase()=="br")?this.getPreviousTab(e):e; 341 344 },selectNextTab:function(){ 342 345 this.selectTab(this.getNextTab()); … … 353 356 },getLastTab:function(){ 354 357 return 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 _6 1=this._findCallback(this.options.afterSelect,_5f);360 if(_6 1){361 _6 1(_5f,_60);362 } 363 },_callAfterSelectOnce:function(_6 2){364 var _6 3=this._findCallback(this.options.afterSelectOnce,_62);365 if(_6 3){366 _6 3(_62);367 } 368 },_findCallback:function(_6 4,_65){369 if(!_6 4){370 return; 371 } 372 if(_6 4.constructor!=Function){373 if(_6 4.constructor==Array){374 _6 4=_64[this.panelList.indexOf(_65)];375 }else{ 376 _6 4=_64[this.panelList.indexOf(_65).succ()];377 } 378 } 379 return _6 4;358 },_callBeforeSelect:function(_61){ 359 var _62=this._findCallback(this.options.beforeSelect,_61); 360 return (_62)?_62():true; 361 },_callAfterSelect:function(_63,_64){ 362 var _65=this._findCallback(this.options.afterSelect,_63); 363 if(_65){ 364 _65(_63,_64); 365 } 366 },_callAfterSelectOnce:function(_66){ 367 var _67=this._findCallback(this.options.afterSelectOnce,_66); 368 if(_67){ 369 _67(_66); 370 } 371 },_findCallback:function(_68,_69){ 372 if(!_68){ 373 return; 374 } 375 if(_68.constructor!=Function){ 376 if(_68.constructor==Array){ 377 _68=_68[this.panelList.indexOf(_69)]; 378 }else{ 379 _68=_68[this.panelList.indexOf(_69).succ()]; 380 } 381 } 382 return _68; 380 383 },_setBrTag:function(){ 381 384 if(this.options.tabRow){ 382 var _6 6=this.tabContainer;383 var _6 7=[];385 var _6a=this.tabContainer; 386 var _6b=[]; 384 387 var brs=[]; 385 Element.getTagNodes(_6 6).each(function(n){386 ((n.tagName.toLowerCase()=="div")?_6 7:brs).push(n);387 }); 388 _6 7.each(function(t,i){388 Element.getTagNodes(_6a).each(function(n){ 389 ((n.tagName.toLowerCase()=="div")?_6b:brs).push(n); 390 }); 391 _6b.each(function(t,i){ 389 392 if((i.succ()%this.options.tabRow)==0){ 390 393 if(brs[0]){ 391 _6 6.insertBefore(brs[0],t.nextSibling);394 _6a.insertBefore(brs[0],t.nextSibling); 392 395 brs.shift(); 393 396 }else{ 394 _6 6.insertBefore(Builder.node("br",{style:"clear: both"}),t.nextSibling);397 _6a.insertBefore(Builder.node("br",{style:"clear: both"}),t.nextSibling); 395 398 } 396 399 } spinelz/trunk/src/javascripts/spinelz/tabBox.js
r5939 r6025 350 350 if (index == this.selected) { 351 351 if (nextActiveTab) { 352 this.selected = null; 352 353 this.selectTab(nextActiveTab); 353 354 } … … 460 461 }, 461 462 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; 468 471 }, 469 472
