mirror of
https://github.com/silverstripe/doc.silverstripe.org
synced 2024-10-22 17:05:50 +02:00
7ecbf49ac9
git-svn-id: http://svn.silverstripe.com/projects/ss2doc/branches/v2@117896 467b73ca-7a2a-4603-9d3b-597d59a354a9
36 lines
750 B
JavaScript
36 lines
750 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').live('click',
|
|
function() {
|
|
var w = window.open(this.href, windowName(this.target));
|
|
w.focus();
|
|
return false;
|
|
}
|
|
);
|
|
|
|
$('#SilverStripeNavigatorLink').live('click',
|
|
function() {
|
|
$('#SilverStripeNavigatorLinkPopup').toggle();
|
|
return false;
|
|
}
|
|
);
|
|
|
|
$('#SilverStripeNavigatorLinkPopup a.close').live('click',
|
|
function() {
|
|
$('#SilverStripeNavigatorLinkPopup').hide();
|
|
return false;
|
|
}
|
|
);
|
|
|
|
$('#SilverStripeNavigatorLinkPopup input').live('focus',
|
|
function() {
|
|
this.select();
|
|
}
|
|
);
|
|
|
|
})(jQuery);
|