BUGFIX: when load a new Page (or other type of form in DataAdmin or GenericAdmin), initTabstripe called additional time for every tabstrip on the page

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@75030 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Normann Lou 2009-04-23 04:56:58 +00:00 committed by Sam Minnee
parent 58da2f0b99
commit 6c1a789cac

View File

@ -120,12 +120,8 @@ CMSForm.prototype = {
_TAB_DIVS_ON_PAGE = [];
try {
var tabs = document.getElementsBySelector('#' + this.id + ' ul.tabstrip');
} catch(er) { /*alert('a: '+ er.message + '\n' + er.line);*/ }
try {
for(var i=0;i<tabs.length;i++) if(tabs[i].tagName) initTabstrip(tabs[i]);
} catch(er) { /*alert('b: '+ er.message + '\n' + er.line);*/ }
//initTabstripe() become livequery in tabstrip.js, so we don't need to call it for each tab strip here.
// We assume that an evaluated response is generated by FormResponse
// which takes care of calling these method it