2012-09-24 05:14:38 +02:00
|
|
|
function windowName(suffix) {
|
2011-03-22 22:21:05 +01:00
|
|
|
var base = document.getElementsByTagName('base')[0].href.replace('http://','').replace(/\//g,'_').replace(/\./g,'_');
|
|
|
|
return base + suffix;
|
|
|
|
}
|
|
|
|
|
|
|
|
(function($) {
|
2012-11-15 02:05:04 +01:00
|
|
|
$(document).ready(function() {
|
|
|
|
$('#switchView a.newWindow').on('click', function(e) {
|
2011-03-22 22:21:05 +01:00
|
|
|
var w = window.open(this.href, windowName(this.target));
|
|
|
|
w.focus();
|
|
|
|
return false;
|
2012-11-15 02:05:04 +01:00
|
|
|
});
|
2011-03-22 22:21:05 +01:00
|
|
|
|
2012-11-15 02:05:04 +01:00
|
|
|
$('#SilverStripeNavigatorLink').on('click', function(e) {
|
2011-03-22 22:21:05 +01:00
|
|
|
$('#SilverStripeNavigatorLinkPopup').toggle();
|
|
|
|
return false;
|
2012-11-15 02:05:04 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
$('#SilverStripeNavigatorLinkPopup a.close').on('click', function(e) {
|
2011-03-22 22:21:05 +01:00
|
|
|
$('#SilverStripeNavigatorLinkPopup').hide();
|
|
|
|
return false;
|
2012-11-15 02:05:04 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
$('#SilverStripeNavigatorLinkPopup input').on('focus',function(e) {
|
2011-03-22 22:21:05 +01:00
|
|
|
this.select();
|
2012-11-15 02:05:04 +01:00
|
|
|
});
|
|
|
|
});
|
2011-03-22 22:21:05 +01:00
|
|
|
|
|
|
|
})(jQuery);
|