diff --git a/core/control/ContentController.php b/core/control/ContentController.php index 4f7a86734..115781042 100755 --- a/core/control/ContentController.php +++ b/core/control/ContentController.php @@ -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); diff --git a/javascript/SilverStripeNavigator.js b/javascript/SilverStripeNavigator.js index a5e303209..f57a78b07 100644 --- a/javascript/SilverStripeNavigator.js +++ b/javascript/SilverStripeNavigator.js @@ -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(); }