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:
Ingo Schommer 2010-03-11 04:37:18 +00:00 committed by Sam Minnee
parent a887aa3042
commit 2cbbcfe3ab
2 changed files with 6 additions and 6 deletions

View File

@ -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);

View File

@ -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();
}