summaryrefslogtreecommitdiff
path: root/www/js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js')
-rwxr-xr-xwww/js/DataModel.js4
-rw-r--r--www/js/LogCtrl.js29
-rwxr-xr-xwww/js/app.js16
3 files changed, 43 insertions, 6 deletions
diff --git a/www/js/DataModel.js b/www/js/DataModel.js
index e138fd72..8f702c66 100755
--- a/www/js/DataModel.js
+++ b/www/js/DataModel.js
@@ -1505,8 +1505,8 @@ angular.module('zmApp.controllers')
})
.error(function(error)
{
- log("Error retrieving ZM_PATH_ZMS: " + JSON.stringify(error));
- d.reject("");
+ log("Can't retrieving ZM_PATH_ZMS: " + JSON.stringify(error));
+ d.resolve("");
return (d.promise);
});
return (d.promise);
diff --git a/www/js/LogCtrl.js b/www/js/LogCtrl.js
index af7b037e..b7be82ba 100644
--- a/www/js/LogCtrl.js
+++ b/www/js/LogCtrl.js
@@ -155,7 +155,34 @@ angular.module('zmApp.controllers').controller('zmApp.LogCtrl', ['$scope', '$roo
logstring = logstring.replace(re4, "<server>");
}
- window.plugins.emailComposer.showEmailComposerWithCallback(callback, $rootScope.appName + ' logs', logstring, [zm.authoremail]);
+ cordova.plugins.email.isAvailable(
+ function (isAvailable) {
+
+ if (isAvailable) {
+ cordova.plugins.email.open({
+ to: zm.authoremail,
+ subject: $rootScope.appName + ' logs',
+ body: logstring
+ });
+ }
+ else {
+ // kEmailNotConfigured
+ $rootScope.zmPopup = SecuredPopups.show('alert',
+ {
+ title: $translate.instant('kError'),
+ template: $translate.instant('kEmailNotConfigured'),
+ okText: $translate.instant('kButtonOk'),
+ cancelText: $translate.instant('kButtonCancel'),
+ });
+
+ }
+
+ });
+
+
+
+
+ // window.plugins.emailComposer.showEmailComposerWithCallback(callback, $rootScope.appName + ' logs', logstring, [zm.authoremail]);
}
else
diff --git a/www/js/app.js b/www/js/app.js
index 34e9343e..c859efc3 100755
--- a/www/js/app.js
+++ b/www/js/app.js
@@ -1430,12 +1430,14 @@ angular.module('zmApp', [
NVRDataModel.log("You are running on " + $rootScope.platformOS);
- if (window.cordova)
- MobileAccessibility.getTextZoom(getTextZoomCallback);
+ console.log ("Mobile acc");
+ if (window.cordova)
+ MobileAccessibility.getTextZoom(getTextZoomCallback);
// $rootScope.lastState = "events";
//$rootScope.lastStateParam = "0";
+console.log ("localforage config");
localforage.config({
name: zm.dbName
@@ -1462,6 +1464,7 @@ angular.module('zmApp', [
}
+console.log ("forage driver");
localforage.defineDriver(window.cordovaSQLiteDriver).then(function () {
return localforage.setDriver(
// Try setting cordovaSQLiteDriver if available,
@@ -1555,6 +1558,7 @@ angular.module('zmApp', [
});
function continueInitialInit() {
+ console.log ("continueinit");
var pixelRatio = window.devicePixelRatio || 1;
$rootScope.devWidth = ((window.innerWidth > 0) ? window.innerWidth : screen.width);
$rootScope.devHeight = ((window.innerHeight > 0) ? window.innerHeight : screen.height);
@@ -1564,10 +1568,12 @@ angular.module('zmApp', [
$rootScope.$stateParams = $stateParams;
if (window.cordova && window.cordova.plugins.Keyboard) {
- cordova.plugins.Keyboard.disableScroll(true);
+ console.log ("no keyboard");
+ // cordova.plugins.Keyboard.disableScroll(true);
}
if (window.StatusBar) {
// org.apache.cordova.statusbar required
+ console.log ("statusbar");
NVRDataModel.log("Updating statusbar");
StatusBar.styleDefault();
//StatusBar.overlaysWebView(false);
@@ -1575,10 +1581,12 @@ angular.module('zmApp', [
}
if (window.cordova) {
+ console.log ("Hiding splash");
$cordovaSplashscreen.hide();
+ console.log ("app version");
cordova.getAppVersion.getVersionNumber().then(function (version) {
appVersion = version;
NVRDataModel.log("App Version: " + appVersion);
@@ -1586,8 +1594,10 @@ angular.module('zmApp', [
});
}
+ console.log ("file logger");
$fileLogger.checkFile().then(function (resp) {
if (parseInt(resp.size) > zm.logFileMaxSize) {
+ console.log ("inside file logger");
$fileLogger.deleteLogfile().then(function () {
NVRDataModel.log("Deleting old log file as it exceeds " + zm.logFileMaxSize + " bytes");