diff --git a/www/js/app.js b/www/js/app.js index 17ae6ae4766d6792a1bd3d08b120198871c926f9..4110324c3463e3be98deea19452f714a51325794 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -246,8 +246,16 @@ angular.module('cesium', ['ionic', 'ionic-material', 'ngMessages', 'ngAnimate', // Workaround to add startsWith() if not present if (typeof String.prototype.startsWith !== 'function') { - console.log("Adding String.prototype.startsWith() -> was missing on this platform"); + console.debug("Adding String.prototype.startsWith() -> was missing on this platform"); String.prototype.startsWith = function(prefix) { return this.indexOf(prefix) === 0; }; } + +// Workaround to add Math.trunc() if not present - fix #144 +if (Math && typeof Math.trunc !== 'function') { + console.debug("Adding Math.trunc() -> was missing on this platform"); + Math.trunc = function(number) { + return (number - 0.5).toFixed(); + }; +} diff --git a/www/plugins/es/templates/menu_extend.html b/www/plugins/es/templates/menu_extend.html index 2df8c5a6d95b54c875006e19557ac94130e3c576..bfe59043413c1579c3ad4074bfcff8985cfe97bd 100644 --- a/www/plugins/es/templates/menu_extend.html +++ b/www/plugins/es/templates/menu_extend.html @@ -7,7 +7,7 @@ href="#/app/registry" active-link="active" active-link-path-prefix="#/app/registry" - ng-click="showRegistryLookupView(); return false;"> + ng-click="showRegistryLookupView();"> <i class="icon ion-ios-book"></i> <span translate>MENU.REGISTRY</span> </ion-item> @@ -17,7 +17,7 @@ href="#/app/market" active-link="active" active-link-path-prefix="#/app/market" - ng-click="showMarketLookupView(); return false;"> + ng-click="showMarketLookupView();"> <i class="icon ion-speakerphone"></i> <span translate>MENU.MARKET</span> </ion-item>