MINOR Using Behaviour.register instead of jquery.livequery in TabSet.php/tabstrip.js (already replaced with jQuery.entwine in next release, we try to reduce the dependencies to jquery plugins)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100885 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-03-11 04:37:22 +00:00 committed by Sam Minnee
parent 1b99c6937a
commit 2dffb95e83
3 changed files with 7 additions and 7 deletions

View File

@ -55,7 +55,6 @@ class TabSet extends CompositeField {
Requirements::javascript(SAPPHIRE_DIR . "/javascript/prototype_improvements.js");
Requirements::javascript(THIRDPARTY_DIR . "/jquery/jquery.js");
Requirements::javascript(SAPPHIRE_DIR . "/javascript/jquery_improvements.js");
Requirements::javascript(THIRDPARTY_DIR . '/jquery-livequery/jquery.livequery.js');
Requirements::javascript(THIRDPARTY_DIR . "/tabstrip/tabstrip.js");
Requirements::css(THIRDPARTY_DIR . "/tabstrip/tabstrip.css");

View File

@ -348,7 +348,6 @@ class Security extends Controller {
Requirements::javascript(THIRDPARTY_DIR . "/jquery/jquery.js");
Requirements::javascript(SAPPHIRE_DIR . "/javascript/jquery_improvements.js");
Requirements::javascript(THIRDPARTY_DIR . '/jquery-livequery/jquery.livequery.js');
Requirements::javascript(THIRDPARTY_DIR . "/tabstrip/tabstrip.js");
Requirements::css(THIRDPARTY_DIR . "/tabstrip/tabstrip.css");

View File

@ -2,14 +2,16 @@ var _CUR_TABS = [];
var _TABS_ON_PAGE = [];
var _TAB_DIVS_ON_PAGE = [];
// jQuery loader
jQuery('ul.tabstrip').livequery(function() {
Behaviour.register({
'ul.tabstrip': {
initialize: function() {
initTabstrip(this);
if(window.ontabschanged) window.ontabschanged();
}
}
});
function initTabstrip(tabstrip, namedAnchors) {
var i, anchor, container, anchorName, li;
var childAnchors = tabstrip.getElementsByTagName('a');
var base, curTab = null, curURL = window.location.href;