From 6ce41e012868f4ecaa95e330b3fc2d8bd22f8716 Mon Sep 17 00:00:00 2001 From: Gunther Brunner Date: Wed, 14 May 2014 19:30:30 +0900 Subject: [PATCH] Added default value for Device List active tabs. --- res/app/components/stf/settings/settings-service.js | 4 ++++ res/app/settings/local/local-settings-controller.js | 1 + 2 files changed, 5 insertions(+) diff --git a/res/app/components/stf/settings/settings-service.js b/res/app/components/stf/settings/settings-service.js index 02601455..e1a97504 100644 --- a/res/app/components/stf/settings/settings-service.js +++ b/res/app/components/stf/settings/settings-service.js @@ -47,6 +47,10 @@ module.exports = function SettingsServiceFactory($localForage) { return $localForage.bind.apply($localForage, arguments) } + SettingsService.driver = function () { + return $localForage.driver.apply($localForage, arguments) + ' with memory cache' + } + SettingsService.clear = function () { memoryData = Object.create(null) return $localForage.clear.apply($localForage, arguments) diff --git a/res/app/settings/local/local-settings-controller.js b/res/app/settings/local/local-settings-controller.js index a87c16f7..451295d6 100644 --- a/res/app/settings/local/local-settings-controller.js +++ b/res/app/settings/local/local-settings-controller.js @@ -2,6 +2,7 @@ module.exports = function ($scope, SettingsService) { $scope.resetSettings = function () { SettingsService.clear() + console.log('Settings cleared') } $scope.savedTo = SettingsService.driver()