Fix back if window is opened in new tab.

pull/2077/head
digital-gnome 2017-12-13 10:20:02 -05:00
parent 3b5e70c51a
commit e0c2061954
3 changed files with 14 additions and 0 deletions

View File

@ -978,6 +978,9 @@ function initPage() {
nearEventsQuery(eventData.Id); nearEventsQuery(eventData.Id);
initialAlarmCues(eventData.Id); //call ajax+renderAlarmCues initialAlarmCues(eventData.Id); //call ajax+renderAlarmCues
if (scale == "auto") changeScale(); if (scale == "auto") changeScale();
if (window.history.length == 1) {
$j('#closeWindow').html('<a href="#" onclick="window.close()">Close</a>');
}
} }
// Kick everything off // Kick everything off

View File

@ -135,3 +135,11 @@ if ( openFilterWindow ) {
createPopup( '?view=filter&page='+thisPage+filterQuery, 'zmFilter', 'filter' ); createPopup( '?view=filter&page='+thisPage+filterQuery, 'zmFilter', 'filter' );
location.replace( '?view='+currentView+'&page='+thisPage+filterQuery ); location.replace( '?view='+currentView+'&page='+thisPage+filterQuery );
} }
function initPage () {
if (window.history.length == 1) {
$j('#controls').children().eq(0).html('<a href="#" onclick="window.close()">Close</a>');
}
}
$j(document).ready(initPage);

View File

@ -667,6 +667,9 @@ function initPage() {
if ( refreshApplet && appletRefreshTime ) if ( refreshApplet && appletRefreshTime )
appletRefresh.delay( appletRefreshTime*1000 ); appletRefresh.delay( appletRefreshTime*1000 );
if (scale == "auto") changeScale(); if (scale == "auto") changeScale();
if (window.history.length == 1) {
$j('#closeControl').html('<a href="#" onclick="window.close()">Close</a>');
}
} }
// Kick everything off // Kick everything off