summaryrefslogtreecommitdiff
path: root/www/js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js')
-rw-r--r--www/js/LogCtrl.js15
1 files changed, 13 insertions, 2 deletions
diff --git a/www/js/LogCtrl.js b/www/js/LogCtrl.js
index 46c1084e..fe18fe22 100644
--- a/www/js/LogCtrl.js
+++ b/www/js/LogCtrl.js
@@ -109,7 +109,11 @@ angular.module('zmApp.controllers').controller('zmApp.LogCtrl', ['$scope', '$roo
{
if (res)
{
- logstring = "Logs for version:" + $scope.zmAppVersion + " ("+$rootScope.platformOS+")\n" + logstring;
+
+ logstring = "zmNinja version:" + $scope.zmAppVersion +
+ " ("+$rootScope.platformOS+")\n" +
+ "ZoneMinder version:" + NVRDataModel.getCurrentServerVersion()+"\n" +
+ logstring;
sendEmailReally(logstring);
}
@@ -121,6 +125,8 @@ angular.module('zmApp.controllers').controller('zmApp.LogCtrl', ['$scope', '$roo
//--------------------------------------------------------------------------
function sendEmailReally(logstring)
{
+
+ //console.log ("LOGSTRING:"+logstring);
if (window.cordova)
{
@@ -156,6 +162,7 @@ angular.module('zmApp.controllers').controller('zmApp.LogCtrl', ['$scope', '$roo
logstring = logstring.replace(re4, "<server>");
}
+ //console.log ("NEW LOGSTRING:"+logstring);
/* window.plugins.emailComposer.showEmailComposerWithCallback(callback, $rootScope.appName + ' logs', logstring, [zm.authoremail]);*/
@@ -163,6 +170,9 @@ angular.module('zmApp.controllers').controller('zmApp.LogCtrl', ['$scope', '$roo
function (isAvailable) {
if (isAvailable) {
+ // body encapsulation requires br :^
+ // see https://github.com/katzer/cordova-plugin-email-composer/issues/150
+ logstring = logstring.split('\n').join('<br/>');
cordova.plugins.email.open({
to: zm.authoremail,
subject: $rootScope.appName + ' logs',
@@ -259,7 +269,8 @@ angular.module('zmApp.controllers').controller('zmApp.LogCtrl', ['$scope', '$roo
$fileLogger.getLogfile().then(function(l)
{
- $scope.log.logString = l.split('\n').reverse().join('\n');
+ $scope.log.logString = l.split('\n').reverse().join('\n');
+ //$scope.log.logString = l;
$ionicLoading.hide();
},