Index: trunk/extensions/UsabilityInitiative/CollapsibleTabs/CollapsibleTabs.php |
— | — | @@ -13,7 +13,7 @@ |
14 | 14 | * |
15 | 15 | * @author Adam Miller <amiller@wikimedia.org> |
16 | 16 | * @license GPL v2 or later |
17 | | - * @version 0.0.2 |
| 17 | + * @version 0.0.6 |
18 | 18 | */ |
19 | 19 | |
20 | 20 | /* Configuration */ |
— | — | @@ -27,7 +27,7 @@ |
28 | 28 | 'path' => __FILE__, |
29 | 29 | 'name' => 'CollapsibleTabs', |
30 | 30 | 'author' => 'Adam Miller', |
31 | | - 'version' => '0.0.5', |
| 31 | + 'version' => '0.0.6', |
32 | 32 | 'url' => 'http://www.mediawiki.org/wiki/Extension:CollapsibleTabs', |
33 | 33 | 'descriptionmsg' => 'collapsibletabs-desc', |
34 | 34 | ); |
Index: trunk/extensions/UsabilityInitiative/CollapsibleTabs/CollapsibleTabs.js |
— | — | @@ -2,11 +2,11 @@ |
3 | 3 | |
4 | 4 | //Overloading the moveToCollapsed function to animate the transition |
5 | 5 | $j.collapsibleTabs.moveToCollapsed = function( ele ) { |
6 | | - $moving = $j(ele); |
| 6 | + var $moving = $j(ele); |
7 | 7 | $j($moving.data('collapsibleTabsSettings').expandedContainer).data('collapsibleTabsSettings').shifting = true; |
8 | | - data = $moving.data('collapsibleTabsSettings'); |
| 8 | + var data = $moving.data('collapsibleTabsSettings'); |
9 | 9 | // Remove the element from where it's at and put it in the dropdown menu |
10 | | - target = $moving.data('collapsibleTabsSettings').collapsedContainer; |
| 10 | + var target = $moving.data('collapsibleTabsSettings').collapsedContainer; |
11 | 11 | // $moving.hide(500); |
12 | 12 | $moving.css("position", "relative").css('right',0); |
13 | 13 | $moving.animate({width: '1px'},"normal",function(){ |
— | — | @@ -15,23 +15,24 @@ |
16 | 16 | $j(this).remove().prependTo(target).data('collapsibleTabsSettings', data); |
17 | 17 | $j(this).attr('style', ''); |
18 | 18 | $j($j(ele).data('collapsibleTabsSettings').expandedContainer).data('collapsibleTabsSettings').shifting = false; |
| 19 | + $j.collapsibleTabs.handleResize(); |
19 | 20 | }); |
20 | 21 | }; |
21 | 22 | |
22 | 23 | // Overloading the moveToExpanded function to animate the transition |
23 | 24 | $j.collapsibleTabs.moveToExpanded = function( ele ) { |
24 | | - $moving = $j(ele); |
| 25 | + var $moving = $j(ele); |
25 | 26 | $j($moving.data('collapsibleTabsSettings').expandedContainer).data('collapsibleTabsSettings').shifting = true; |
26 | | - data = $moving.data('collapsibleTabsSettings'); |
| 27 | + var data = $moving.data('collapsibleTabsSettings'); |
27 | 28 | // remove this element from where it's at and put it in the dropdown menu |
28 | | - target = $moving.data('collapsibleTabsSettings').prevElement; |
29 | | - expandedWidth = $moving.data('collapsibleTabsSettings').expandedWidth; |
| 29 | + var target = $moving.data('collapsibleTabsSettings').prevElement; |
| 30 | + var expandedWidth = $moving.data('collapsibleTabsSettings').expandedWidth; |
30 | 31 | $moving.css("position", "relative").css('left',0).css('width','1px'); |
31 | 32 | $moving.remove().css('width','1px').insertAfter(target).data('collapsibleTabsSettings', data) |
32 | 33 | .animate({width: expandedWidth+"px"}, "normal", function(){ |
33 | 34 | $j(this).attr('style', ''); |
34 | 35 | $j($moving.data('collapsibleTabsSettings').expandedContainer).data('collapsibleTabsSettings').shifting = false; |
35 | | - |
| 36 | + $j.collapsibleTabs.handleResize(); |
36 | 37 | }); |
37 | 38 | }; |
38 | 39 | |