mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
1b99c6937a
commit
2dffb95e83
@ -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");
|
||||
|
||||
|
@ -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");
|
||||
|
||||
|
8
thirdparty/tabstrip/tabstrip.js
vendored
8
thirdparty/tabstrip/tabstrip.js
vendored
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user