Dotclear

Changeset 2348:9ff9e6b9c34f


Ignore:
Timestamp:
10/13/13 15:07:58 (10 years ago)
Author:
Nicolas <nikrou77@…>
Branch:
default
Children:
2349:0f6922a92ce2, 2363:d78c959adc58
Message:

Fix : on page with anchor and hash for tabs (on aboutConfig for example); after selecting an anchor and reload page, must open first tab.
Closes #1723

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • admin/js/jquery/jquery.pageTabs.js

    r2186 r2348  
    7272      
    7373     $.pageTabs.clickTab = function(tab) { 
    74           if (tab=='') { 
     74          if (tab=='' || $('#'+$.pageTabs.options.idTabPrefix+tab, '.'+$.pageTabs.options.containerClass).length==0) { 
    7575               tab = getHash($('ul li a', '.'+$.pageTabs.options.containerClass+':eq(0)').attr('href')); 
    7676          } 
  • tests/functional/spec/page_tabs.js

    r2162 r2348  
    153153          expect($('#part-user-favorites')).not.toBeVisible(); 
    154154     }); 
     155 
     156     /* ticket 1723 */ 
     157     it("Must open first tab when hash does not refer to an existing div content", function() { 
     158          loadFixtures('tabs.html'); 
     159          loadStyleFixtures('default.css'); 
     160 
     161          spyOn(jQuery.pageTabs, 'getLocationHash').andReturn('dummy'); 
     162          $.pageTabs(); 
     163          expect($('#part-user-options')).toBeVisible(); 
     164          expect($('#part-user-profile')).not.toBeVisible(); 
     165          expect($('#part-user-favorites')).not.toBeVisible(); 
     166     }); 
    155167}); 
    156168 
Note: See TracChangeset for help on using the changeset viewer.

Sites map