mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
bb58914bb0
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99088 467b73ca-7a2a-4603-9d3b-597d59a354a9
36 lines
770 B
JavaScript
36 lines
770 B
JavaScript
function windowName(suffix) {
|
|
var base = document.getElementsByTagName('base')[0].href.replace('http://','').replace(/\//g,'_').replace(/\./g,'_');
|
|
return base + suffix;
|
|
}
|
|
|
|
(function($) {
|
|
$('#switchView a.newWindow').livequery('click',
|
|
function() {
|
|
var w = window.open(this.href, windowName(this.target));
|
|
w.focus();
|
|
return false;
|
|
}
|
|
);
|
|
|
|
$('#SilverStripeNavigatorLink').livequery('click',
|
|
function() {
|
|
$('#SilverStripeNavigatorLinkPopup').toggle();
|
|
return false;
|
|
}
|
|
);
|
|
|
|
$('#SilverStripeNavigatorLinkPopup a.close').livequery('click',
|
|
function() {
|
|
$('#SilverStripeNavigatorLinkPopup').hide();
|
|
return false;
|
|
}
|
|
);
|
|
|
|
$('#SilverStripeNavigatorLinkPopup input').livequery('focus',
|
|
function() {
|
|
this.select();
|
|
}
|
|
);
|
|
|
|
})(jQuery);
|