diff --git a/lib/middleware/webpack.js b/lib/middleware/webpack.js index 5a23297e..30dda3bc 100644 --- a/lib/middleware/webpack.js +++ b/lib/middleware/webpack.js @@ -6,8 +6,7 @@ var webpackOptions = require('../../webpack.config.js') var overrideOptions = { debug: true, - devtool: 'source-map' - //devtool: 'eval' + devtool: 'eval' } var finalOptions = _.assign(webpackOptions, overrideOptions) diff --git a/res/app/settings/index.js b/res/app/settings/index.js index 5bad217e..70d8df8b 100644 --- a/res/app/settings/index.js +++ b/res/app/settings/index.js @@ -1,10 +1,10 @@ module.exports = angular.module('ui-settings', [ require('./local').name, - require('./language').name + require('./language').name, + require('./notifications').name ]) .config(['$routeProvider', function ($routeProvider) { $routeProvider.when('/settings', { template: require('./settings.jade') }) }]) - //.controller('SettingsCtrl', require('./settings-controller')) diff --git a/res/app/settings/language/language-controller.js b/res/app/settings/language/language-controller.js index 0f402dd9..966f7012 100644 --- a/res/app/settings/language/language-controller.js +++ b/res/app/settings/language/language-controller.js @@ -2,7 +2,6 @@ module.exports = function ($scope, LanguageService, SettingsService) { // SettingsService.sync($scope, 'Language', { // language: LanguageService.detectedLanguage // }) - // SettingsService.bind($scope, { // key: 'language', // defaultValue: LanguageService.selectedLanguage @@ -10,7 +9,6 @@ module.exports = function ($scope, LanguageService, SettingsService) { LanguageService.getSelectedLanguage().then(function (data) { $scope.language = data - console.log('real', data) }) $scope.$watch('language', function (newValue, oldValue) { diff --git a/res/app/settings/notifications/index.js b/res/app/settings/notifications/index.js new file mode 100644 index 00000000..6840b701 --- /dev/null +++ b/res/app/settings/notifications/index.js @@ -0,0 +1,8 @@ +module.exports = angular.module('settings-notifications', [ + require('stf/settings').name +]) + .run(["$templateCache", function($templateCache) { + $templateCache.put('settings/notifications/notifications.jade', require('./notifications.jade')) + }]) + .factory('NotificationsService', require('./notifications-service')) + .controller('NotificationsCtrl', require('./notifications-controller')) diff --git a/res/app/settings/notifications/notifications-controller.js b/res/app/settings/notifications/notifications-controller.js new file mode 100644 index 00000000..0365bd92 --- /dev/null +++ b/res/app/settings/notifications/notifications-controller.js @@ -0,0 +1,3 @@ +module.exports = function($scope) { + +} \ No newline at end of file diff --git a/res/app/settings/notifications/notifications-service.js b/res/app/settings/notifications/notifications-service.js new file mode 100644 index 00000000..0ebfdf27 --- /dev/null +++ b/res/app/settings/notifications/notifications-service.js @@ -0,0 +1,6 @@ +module.exports = function NotificationsServiceFactory() { + var NotificationsService = {} + + + return NotificationsService +} \ No newline at end of file diff --git a/res/app/settings/notifications/notifications.jade b/res/app/settings/notifications/notifications.jade new file mode 100644 index 00000000..f1e2c843 --- /dev/null +++ b/res/app/settings/notifications/notifications.jade @@ -0,0 +1,8 @@ +.widget-container.fluid-height + .heading + i.fa.fa-exclamation-circle + span(translate) Notifications + .widget-content.padded + label.checkbox + input(type='checkbox', ng-model='notificationsEnabled', ng-click='enableNotifications()', disabled) + span(translate) Enable notifications \ No newline at end of file diff --git a/res/app/settings/settings.jade b/res/app/settings/settings.jade index ecefa87c..4a5f2d0e 100644 --- a/res/app/settings/settings.jade +++ b/res/app/settings/settings.jade @@ -5,16 +5,9 @@ div(pane='center') .col-md-4 div(ng-include='"settings/language/language.jade"') .col-md-4 - .widget-container.fluid-height - .heading - i.fa.fa-exclamation-circle - span(translate) Notifications - .widget-content.padded - label.checkbox - input(type='checkbox', ng-model='notificationsEnabled', ng-click='enableNotifications()', disabled) - span(translate) Enable notifications + div(ng-include='"settings/notifications/notifications.jade"') - .row //(ng-controller='PortForwardingCtrl') + //.row //(ng-controller='PortForwardingCtrl') .col-md-12 .widget-container.fluid-height .heading