summaryrefslogtreecommitdiff
path: root/www/js/DataModel.js
diff options
context:
space:
mode:
authorpliablepixels <pliablepixels@gmail.com>2016-06-03 14:55:30 -0400
committerpliablepixels <pliablepixels@gmail.com>2016-06-03 14:55:30 -0400
commita4fe7a944de098f30cd79251414769858669d6ad (patch)
tree9e9d0342ead9b3fc03a2842eee6e43f0c3cae30b /www/js/DataModel.js
parent459918f354eacb00ce4c2cf096dfe51863b51916 (diff)
messing around with some layouts
Former-commit-id: 128a20b077eb519d01a7bcdacd507e7efe447a5d
Diffstat (limited to 'www/js/DataModel.js')
-rw-r--r--www/js/DataModel.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/www/js/DataModel.js b/www/js/DataModel.js
index 512ae20c..fb28e729 100644
--- a/www/js/DataModel.js
+++ b/www/js/DataModel.js
@@ -509,7 +509,8 @@ angular.module('zmApp.controllers')
if (typeof timelineModalGraphType == 'undefined')
{
zmDebug ("timeline graph type not set. Setting to all");
- loginData.timelineModalGraphType = $translate.instant('kAll');
+ loginData.timelineModalGraphType = $translate.instant('kGraphAll');
+ console.log (">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"+loginData.timelineModalGraphType);
}
if (typeof loginData.resumeDelay == 'undefined')
@@ -592,18 +593,24 @@ angular.module('zmApp.controllers')
setDefaultLanguage: function(l, permanent) {
+ var d = $q.defer();
if (permanent)
window.localStorage.setItem("defaultLang", l);
$translate.use(l).then(function(data) {
zmLog("Device Language is:" + data);
moment.locale(data);
- $translate.fallbackLanguage('en');
+ $translate.fallbackLanguage('en');
+ d.resolve(data);
+ return d.promise;
}, function(error) {
zmLog("Device Language error: " + error);
$translate.use('en');
moment.locale('en');
+ d.resolve('en');
+ return d.promise;
});
+ return d.promise;
},
getDefaultLanguage: function() {