15 for ( var i = 0; i < blocks.length; i++ ) |
15 for ( var i = 0; i < blocks.length; i++ ) |
16 { |
16 { |
17 var block = blocks[i]; |
17 var block = blocks[i]; |
18 if ( /^tab:/.test(block.id) ) |
18 if ( /^tab:/.test(block.id) ) |
19 { |
19 { |
20 $(block).addClass('userpage_block'); |
20 $dynano(block).addClass('userpage_block'); |
21 var block_id = block.id.substr(4); |
21 var block_id = block.id.substr(4); |
22 userpage_blocks.push(block_id); |
22 userpage_blocks.push(block_id); |
23 if ( !first_block ) |
23 if ( !first_block ) |
24 { |
24 { |
25 // this is the first block on the page, memorize it |
25 // this is the first block on the page, memorize it |
86 } |
86 } |
87 } |
87 } |
88 var a = document.getElementById('userpage_blocklink_' + userpage_blocks[i]); |
88 var a = document.getElementById('userpage_blocklink_' + userpage_blocks[i]); |
89 if ( a ) |
89 if ( a ) |
90 { |
90 { |
91 if ( $(a.parentNode).hasClass('userpage_tab_active') ) |
91 if ( $dynano(a.parentNode).hasClass('userpage_tab_active') ) |
92 { |
92 { |
93 $(a.parentNode).rmClass('userpage_tab_active'); |
93 $dynano(a.parentNode).rmClass('userpage_tab_active'); |
94 } |
94 } |
95 } |
95 } |
96 } |
96 } |
97 if ( nofade || !current_block || aclDisableTransitionFX ) |
97 if ( nofade || !current_block || aclDisableTransitionFX ) |
98 { |
98 { |
99 var div = document.getElementById('tab:' + block); |
99 var div = document.getElementById('tab:' + block); |
100 div.style.display = 'block'; |
100 div.style.display = 'block'; |
101 } |
101 } |
102 /* |
|
103 else |
102 else |
104 { |
103 { |
|
104 // DISABLED: see "nofade = true;" above. |
105 // do this in a slightly fancier fashion |
105 // do this in a slightly fancier fashion |
106 load_component('SpryEffects'); |
106 load_component('jquery'); |
107 (new Spry.Effect.Blind('tab:' + current_block, { from: '100%', to: '0%', finish: function() |
107 load_component('jquery-ui'); |
108 { |
108 $('#tab:' + current_block).hide("blind", {}, 500, function() |
109 (new Spry.Effect.Blind('tab:' + block, { from: '0%', to: '100%' })).start(); |
109 { |
110 } |
110 $('#tab:' + block).show("blind", {}, 500); |
111 })).start(); |
111 }); |
112 } |
112 } |
113 */ |
|
114 var a = document.getElementById('userpage_blocklink_' + block); |
113 var a = document.getElementById('userpage_blocklink_' + block); |
115 $(a.parentNode).addClass('userpage_tab_active'); |
114 $dynano(a.parentNode).addClass('userpage_tab_active'); |
116 |
115 |
117 window.location.hash = 'tab:' + block; |
116 window.location.hash = 'tab:' + block; |
118 setScrollOffset(currentScroll); |
117 setScrollOffset(currentScroll); |
119 } |
118 } |