diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2017-11-02 14:56:45 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2017-11-02 14:56:45 -0400 |
| commit | 479b09f62d150cd56990be3d638c6b5f9dc5587c (patch) | |
| tree | ba3361ab9418ebb755289f70450d25d51168e700 /www/js/LogCtrl.js | |
| parent | 22c27c6b6e53c17604f03466f573241c6e801a15 (diff) | |
bazillion changes/cleanup - I think I got the big offender it was unload handler in app.js #550
Diffstat (limited to 'www/js/LogCtrl.js')
| -rw-r--r-- | www/js/LogCtrl.js | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/www/js/LogCtrl.js b/www/js/LogCtrl.js index af7b037e..e3f4da35 100644 --- a/www/js/LogCtrl.js +++ b/www/js/LogCtrl.js @@ -79,7 +79,7 @@ angular.module('zmApp.controllers').controller('zmApp.LogCtrl', ['$scope', '$roo { disableBack: true }); - $state.go("events", + $state.go("app.events", { "id": 0, "playEvent": false @@ -97,6 +97,7 @@ angular.module('zmApp.controllers').controller('zmApp.LogCtrl', ['$scope', '$roo $scope.sendEmail = function(logstring) { + logstring = logstring.substring (0,20000); $ionicPopup.confirm( { title: $translate.instant('kSensitiveTitle'), @@ -155,7 +156,32 @@ 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]); + /* 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'), + }); + } + + }); + } else |
