summaryrefslogtreecommitdiff
path: root/www/js/LogCtrl.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js/LogCtrl.js')
-rw-r--r--www/js/LogCtrl.js29
1 files changed, 28 insertions, 1 deletions
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