Skip to content

Commit ec89c73

Browse files
committed
Switch all the walkthroughs to the new, non-promisified interface
The changes are fairly straightforward.
1 parent fd570e8 commit ec89c73

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

www/js/diary/detail.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
'use strict';
22
angular.module('emission.main.diary.detail',['ui-leaflet', 'ng-walkthrough',
3-
'nvd3', 'angularLocalStorage',
3+
'nvd3', 'emission.plugin.kvstore',
44
'emission.services', 'emission.plugin.logger',
55
'emission.incident.posttrip.manual'])
66

77
.controller("DiaryDetailCtrl", function($scope, $rootScope, $window, $stateParams, $ionicActionSheet,
8-
leafletData, leafletMapEvents, nzTour, storage,
8+
leafletData, leafletMapEvents, nzTour, KVStore,
99
Logger, Timeline, DiaryHelper, Config,
1010
CommHelper, PostTripManualMarker) {
1111
console.log("controller DiaryDetailCtrl called with params = "+
@@ -148,10 +148,10 @@ angular.module('emission.main.diary.detail',['ui-leaflet', 'ng-walkthrough',
148148

149149
var checkDetailTutorialDone = function () {
150150
var DETAIL_DONE_KEY = 'detail_tutorial_done';
151-
var detailTutorialDone = storage.get(DETAIL_DONE_KEY);
151+
var detailTutorialDone = KVStore.getDirect(DETAIL_DONE_KEY);
152152
if (!detailTutorialDone) {
153153
startWalkthrough();
154-
storage.set(DETAIL_DONE_KEY, true);
154+
KVStore.set(DETAIL_DONE_KEY, true);
155155
}
156156
};
157157

www/js/diary/list.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ angular.module('emission.main.diary.list',['ui-leaflet',
55
'emission.main.common.services',
66
'emission.incident.posttrip.manual',
77
'emission.services',
8-
'ng-walkthrough', 'nzTour', 'angularLocalStorage',
8+
'ng-walkthrough', 'nzTour', 'emission.plugin.kvstore',
99
'emission.plugin.logger'])
1010

1111
.controller("DiaryListCtrl", function($window, $scope, $rootScope, $ionicPlatform, $state,
@@ -14,7 +14,7 @@ angular.module('emission.main.diary.list',['ui-leaflet',
1414
$ionicActionSheet,
1515
ionicDatePicker,
1616
leafletData, Timeline, CommonGraph, DiaryHelper,
17-
Config, PostTripManualMarker, nzTour, storage, Logger) {
17+
Config, PostTripManualMarker, nzTour, KVStore, Logger) {
1818
console.log("controller DiaryListCtrl called");
1919
// Add option
2020

@@ -341,10 +341,10 @@ angular.module('emission.main.diary.list',['ui-leaflet',
341341
*/
342342
var checkDiaryTutorialDone = function () {
343343
var DIARY_DONE_KEY = 'diary_tutorial_done';
344-
var diaryTutorialDone = storage.get(DIARY_DONE_KEY);
344+
var diaryTutorialDone = KVStore.getDirect(DIARY_DONE_KEY);
345345
if (!diaryTutorialDone) {
346346
startWalkthrough();
347-
storage.set(DIARY_DONE_KEY, true);
347+
KVStore.set(DIARY_DONE_KEY, true);
348348
}
349349
};
350350

www/js/heatmap.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
angular.module('emission.main.heatmap',['ui-leaflet', 'emission.services',
44
'emission.plugin.logger', 'emission.incident.posttrip.manual',
5-
'ng-walkthrough', 'nzTour', 'angularLocalStorage'])
5+
'ng-walkthrough', 'nzTour', 'emission.plugin.kvstore'])
66

77
.controller('HeatmapCtrl', function($scope, $ionicLoading, $ionicActionSheet, $http,
88
leafletData, Logger, Config, PostTripManualMarker,
9-
$window, nzTour, storage) {
9+
$window, nzTour, KVStore) {
1010
$scope.mapCtrl = {};
1111

1212
angular.extend($scope.mapCtrl, {
@@ -371,10 +371,10 @@ angular.module('emission.main.heatmap',['ui-leaflet', 'emission.services',
371371
*/
372372
var checkHeatmapTutorialDone = function () {
373373
var HEATMAP_DONE_KEY = 'heatmap_tutorial_done';
374-
var heatmapTutorialDone = storage.get(HEATMAP_DONE_KEY);
374+
var heatmapTutorialDone = KVStore.getDirect(HEATMAP_DONE_KEY);
375375
if (!heatmapTutorialDone) {
376376
startWalkthrough();
377-
storage.set(HEATMAP_DONE_KEY, true);
377+
KVStore.set(HEATMAP_DONE_KEY, true);
378378
}
379379
};
380380

www/js/incident/post-trip-map-display.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
'use strict';
22
angular.module('emission.incident.posttrip.map',['ui-leaflet', 'ng-walkthrough',
3-
'angularLocalStorage',
3+
'emission.plugin.kvstore',
44
'emission.services', 'emission.plugin.logger',
55
'emission.main.diary.services',
66
'emission.incident.posttrip.manual'])
77

88
.controller("PostTripMapCtrl", function($scope, $window, $state,
99
$stateParams, $ionicLoading,
10-
leafletData, leafletMapEvents, nzTour, storage,
10+
leafletData, leafletMapEvents, nzTour, KVStore,
1111
Logger, Timeline, DiaryHelper, Config,
1212
UnifiedDataLoader, PostTripManualMarker) {
1313
Logger.log("controller PostTripMapDisplay called with params = "+
@@ -183,10 +183,10 @@ angular.module('emission.incident.posttrip.map',['ui-leaflet', 'ng-walkthrough',
183183

184184
var checkIncidentTutorialDone = function () {
185185
var INCIDENT_DONE_KEY = 'incident_tutorial_done';
186-
var incidentTutorialDone = storage.get(INCIDENT_DONE_KEY);
186+
var incidentTutorialDone = KVStore.getDirect(INCIDENT_DONE_KEY);
187187
if (!incidentTutorialDone) {
188188
startWalkthrough();
189-
storage.set(INCIDENT_DONE_KEY, true);
189+
KVStore.set(INCIDENT_DONE_KEY, true);
190190
}
191191
};
192192

0 commit comments

Comments
 (0)