Changeset 2471:c1ec37564ab9
- Timestamp:
- 10/21/13 16:45:01 (12 years ago)
- Branch:
- 2.6
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/js/jquery/jquery.pageTabs.js
r2457 r2471 74 74 75 75 $.pageTabs.clickTab = function(tab) { 76 if (tab=='' || $('#'+$.pageTabs.options.idTabPrefix+tab, '.'+$.pageTabs.options.containerClass).length==0) { 76 if (tab=='') { 77 tab = getHash($('ul li a', '.'+$.pageTabs.options.containerClass+':eq(0)').attr('href')); 78 } else if (($('#'+$.pageTabs.options.idTabPrefix+tab, '.'+$.pageTabs.options.containerClass).length==0) 79 && ($('ul li.'+$.pageTabs.options.activeClass, '.'+$.pageTabs.options.containerClass).length==0)){ 77 80 tab = getHash($('ul li a', '.'+$.pageTabs.options.containerClass+':eq(0)').attr('href')); 78 81 } -
tests/functional/spec/page_tabs.js
r2348 r2471 154 154 }); 155 155 156 /* ticket 1794 */ 157 /* 158 * The problem occurs when cliking an anchor in the page 159 */ 160 it("Must not change opened tab when hash does not refer to an existing div content", function() { 161 loadFixtures('tabs.html'); 162 loadStyleFixtures('default.css'); 163 164 $.pageTabs('user-profile'); 165 expect($('#part-user-options')).not.toBeVisible(); 166 expect($('#part-user-profile')).toBeVisible(); 167 expect($('#part-user-favorites')).not.toBeVisible(); 168 169 spyOn(jQuery.pageTabs, 'getLocationHash').andReturn('dummy'); 170 jQuery.event.trigger('hashchange'); 171 expect($('#part-user-options')).not.toBeVisible(); 172 expect($('#part-user-profile')).toBeVisible(); 173 expect($('#part-user-favorites')).not.toBeVisible(); 174 }); 175 156 176 /* ticket 1723 */ 157 it("Must open first tab when hash does not refer to an existing div content ", function() {177 it("Must open first tab when hash does not refer to an existing div content and no tab is opened", function() { 158 178 loadFixtures('tabs.html'); 159 179 loadStyleFixtures('default.css'); … … 164 184 expect($('#part-user-profile')).not.toBeVisible(); 165 185 expect($('#part-user-favorites')).not.toBeVisible(); 166 }); 186 }); 167 187 }); 168 188
Note: See TracChangeset
for help on using the changeset viewer.