Changeset 2162:ff2e89cb94bb
- Timestamp:
- 09/30/13 10:59:51 (12 years ago)
- Branch:
- default
- Children:
- 2164:ea097afa23e4, 2166:6f409aa25386
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/js/jquery/jquery.pageTabs.js
r2113 r2162 72 72 73 73 $.pageTabs.clickTab = function(tab) { 74 if (tab=='') { 75 tab = getHash($('ul li a', '.'+$.pageTabs.options.containerClass+':eq(0)').attr('href')); 76 } 77 74 78 $('ul li a', '.'+$.pageTabs.options.containerClass).filter(function() { 75 79 return getHash($(this).attr('href'))==tab; -
tests/functional/spec/page_tabs.js
r2113 r2162 131 131 expect($('#part-user-favorites')).not.toBeVisible(); 132 132 }); 133 134 it("Must open first tab when clicking back until hash is empty", function() { 135 loadFixtures('tabs.html'); 136 loadStyleFixtures('default.css'); 137 138 var navigation = ['', 'user-profile', 'user-favorites']; 139 var current_index = 0; 140 141 $.pageTabs(); 142 current_index++; 143 $.pageTabs.clickTab(navigation[current_index]); 144 // tab is now user-profile 145 146 // simulate back : window.history.back(); 147 current_index--; 148 spyOn(jQuery.pageTabs, 'getLocationHash').andReturn(navigation[current_index]); 149 jQuery.event.trigger('hashchange'); 150 151 expect($('#part-user-options')).toBeVisible(); 152 expect($('#part-user-profile')).not.toBeVisible(); 153 expect($('#part-user-favorites')).not.toBeVisible(); 154 }); 133 155 }); 134 156
Note: See TracChangeset
for help on using the changeset viewer.