Merge pull request #806 from rasika/master

Fixing android geo fencing ui
4.x.x
Ayyoob Hamza 7 years ago committed by GitHub
commit bd65b1d73b

@ -259,6 +259,10 @@ deviceModule = function () {
} }
return serviceInvokers.XMLHttp.get( return serviceInvokers.XMLHttp.get(
url, function (responsePayload) { url, function (responsePayload) {
if(!responsePayload["responseText"]){
log.error("Error while fetching device count. API `" + url + "` returns HTTP: " + responsePayload["status"]);
throw constants["ERRORS"]["UNKNOWN_ERROR"];
}
return parse(responsePayload["responseText"])["count"]; return parse(responsePayload["responseText"])["count"];
}, },
function (responsePayload) { function (responsePayload) {

@ -47,7 +47,8 @@ var LANGUAGE_US = "en_US";
var VENDOR_APPLE = "Apple"; var VENDOR_APPLE = "Apple";
var ERRORS = { var ERRORS = {
"USER_NOT_FOUND": "USER_NOT_FOUND" "USER_NOT_FOUND": "USER_NOT_FOUND",
"UNKNOWN_ERROR": "Unknown Error"
}; };
var USER_STORES_NOISY_CHAR = "\""; var USER_STORES_NOISY_CHAR = "\"";

@ -40,6 +40,7 @@
.app-info h4{ .app-info h4{
margin-bottom: 0px; margin-bottom: 0px;
overflow-wrap: break-word;
} }
.application i{ .application i{

@ -61,7 +61,7 @@
</div> </div>
{{/unless}} {{/unless}}
<div id="" style="height: 93vh;"> <div id="" style="height: 63vh;">
<!-- Sidebar --> <!-- Sidebar -->
<div id="map"></div> <div id="map"></div>
</div> </div>
@ -691,8 +691,7 @@
initializeGeoLocation() initializeGeoLocation()
}); });
{{#if showGeoFencingTools}} {{#if showGeoFencingTools}}
var locationItems = geoLocationLink.closest('li'); var geoToolsMenu = $('#location-action-bar');
var geoToolsMenu = $("<ul/>", {class: 'collapse list-group geo-tools active'}).appendTo(locationItems);
geoPublicUri = $("#geo-charts").data("geo-public-uri"); geoPublicUri = $("#geo-charts").data("geo-public-uri");
var realtTime = createGeoToolListItem('javascript:enableRealTime()', var realtTime = createGeoToolListItem('javascript:enableRealTime()',
'Return to Real Time View', 'fw fw-undo', geoToolsMenu); 'Return to Real Time View', 'fw fw-undo', geoToolsMenu);

@ -548,7 +548,7 @@ function clearFocus() {
} }
function createGeoToolListItem(link, text, icon, menuRoot) { function createGeoToolListItem(link, text, icon, menuRoot) {
var listItem = $("<li/>", { class: 'list-group-item'}).appendTo(menuRoot); var listItem = $("<div/>", { class: 'action-btn filter'}).appendTo(menuRoot);
var anchor = $("<a/>", {href: link, text: ' ' + text}).appendTo(listItem); var anchor = $("<a/>", {href: link, text: ' ' + text}).appendTo(listItem);
anchor.attr('data-toggle', 'modal'); anchor.attr('data-toggle', 'modal');
anchor.attr('data-target', '#commonModal'); anchor.attr('data-target', '#commonModal');

Loading…
Cancel
Save