MINOR: Use jquery instead of prototype for silverstripenavigator

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@93966 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Andrew O'Neil 2009-11-30 01:31:02 +00:00 committed by Sam Minnee
parent 433af2515c
commit 4bbf2bc040

View File

@ -289,17 +289,13 @@ class ContentController extends Controller {
if(Director::isDev() || Permission::check('CMS_ACCESS_CMSMain')) {
Requirements::css(SAPPHIRE_DIR . '/css/SilverStripeNavigator.css');
Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/prototype/behaviour.js');
// Requirements::javascript(THIRDPARTY_DIR . '/prototype/prototype.js');
Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery/jquery.js');
Requirements::customScript(<<<JS
Behaviour.register({
'#switchView a' : {
onclick : function() {
(function($) {
$('#switchView a').click(function() {
var w = window.open(this.href,windowName(this.target));
w.focus();
return false;
}
}
});
function windowName(suffix) {
@ -307,6 +303,7 @@ class ContentController extends Controller {
return base + suffix;
}
window.name = windowName('site');
})(jQuery);
JS
);