mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR SilverStripeNavigator.js used jquery.live instead of livequery, and doesn't include unnecessary behaviour.js
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100883 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
a887aa3042
commit
2cbbcfe3ab
@ -299,9 +299,9 @@ class ContentController extends Controller {
|
||||
if(Director::isDev() || Permission::check('CMS_ACCESS_CMSMain') || Permission::check('VIEW_DRAFT_CONTENT')) {
|
||||
if($this->dataRecord) {
|
||||
Requirements::css(SAPPHIRE_DIR . '/css/SilverStripeNavigator.css');
|
||||
Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/behaviour/behaviour.js');
|
||||
// TODO Using jQuery for this is absolute overkill, and might cause conflicts
|
||||
// with other libraries.
|
||||
Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery/jquery.js');
|
||||
Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-livequery/jquery.livequery.js');
|
||||
Requirements::javascript(SAPPHIRE_DIR . '/javascript/SilverStripeNavigator.js');
|
||||
|
||||
$return = $nav = SilverStripeNavigator::get_for_record($this->dataRecord);
|
||||
|
@ -4,7 +4,7 @@ function windowName(suffix) {
|
||||
}
|
||||
|
||||
(function($) {
|
||||
$('#switchView a.newWindow').livequery('click',
|
||||
$('#switchView a.newWindow').live('click',
|
||||
function() {
|
||||
var w = window.open(this.href, windowName(this.target));
|
||||
w.focus();
|
||||
@ -12,21 +12,21 @@ function windowName(suffix) {
|
||||
}
|
||||
);
|
||||
|
||||
$('#SilverStripeNavigatorLink').livequery('click',
|
||||
$('#SilverStripeNavigatorLink').live('click',
|
||||
function() {
|
||||
$('#SilverStripeNavigatorLinkPopup').toggle();
|
||||
return false;
|
||||
}
|
||||
);
|
||||
|
||||
$('#SilverStripeNavigatorLinkPopup a.close').livequery('click',
|
||||
$('#SilverStripeNavigatorLinkPopup a.close').live('click',
|
||||
function() {
|
||||
$('#SilverStripeNavigatorLinkPopup').hide();
|
||||
return false;
|
||||
}
|
||||
);
|
||||
|
||||
$('#SilverStripeNavigatorLinkPopup input').livequery('focus',
|
||||
$('#SilverStripeNavigatorLinkPopup input').live('focus',
|
||||
function() {
|
||||
this.select();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user