2010-02-16 03:35:59 +01:00
|
|
|
function windowName(suffix) {
|
|
|
|
var base = document.getElementsByTagName('base')[0].href.replace('http://','').replace(/\//g,'_').replace(/\./g,'_');
|
|
|
|
return base + suffix;
|
|
|
|
}
|
|
|
|
|
|
|
|
(function($) {
|
2010-02-16 03:38:46 +01:00
|
|
|
$('#switchView a.newWindow').livequery('click',
|
|
|
|
function() {
|
|
|
|
var w = window.open(this.href, windowName(this.target));
|
|
|
|
w.focus();
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2010-02-16 03:35:59 +01:00
|
|
|
$('#SilverStripeNavigatorLink').livequery('click',
|
|
|
|
function() {
|
|
|
|
$('#SilverStripeNavigatorLinkPopup').toggle();
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2010-02-16 03:40:19 +01:00
|
|
|
$('#SilverStripeNavigatorLinkPopup a.close').livequery('click',
|
|
|
|
function() {
|
|
|
|
$('#SilverStripeNavigatorLinkPopup').hide();
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2010-02-16 03:35:59 +01:00
|
|
|
$('#SilverStripeNavigatorLinkPopup input').livequery('focus',
|
|
|
|
function() {
|
|
|
|
this.select();
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
})(jQuery);
|