mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
Merge pull request #526 from dunithd/release-3.0.x
Setting device id and type to page title
This commit is contained in:
commit
9e658799ba
@ -41,10 +41,24 @@ function initialLoad() {
|
||||
processAfterInitializationMap();
|
||||
//Access gps and make zoom to server location as map center
|
||||
//navigator.geolocation.getCurrentPosition(success, error);
|
||||
setPageTitle();
|
||||
$("#loading").hide();
|
||||
}
|
||||
}
|
||||
|
||||
function setPageTitle() {
|
||||
var hash = window.parent.location.hash;
|
||||
if(hash) {
|
||||
var startIdx = hash.indexOf("/") + 1;
|
||||
var lastIdx = hash.length;
|
||||
var deviceInfoString = hash.substring(startIdx,lastIdx);
|
||||
var deviceInfo = JSON.parse(deviceInfoString);
|
||||
if(deviceInfo) {
|
||||
var newTitle = "[ " + deviceInfo.device.id + "]" + " - Geo Dashboard [" + deviceInfo.device.type + "]";
|
||||
window.parent.document.title = newTitle;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//function success(position) {
|
||||
// var browserLatitude = position.coords.latitude;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user