mirror of
https://github.com/openstf/stf
synced 2025-10-04 18:29:17 +02:00
- Adding notifications.
This commit is contained in:
parent
eaaf6a36bd
commit
a9a645da23
8 changed files with 30 additions and 15 deletions
|
@ -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)
|
||||
|
|
|
@ -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'))
|
||||
|
|
|
@ -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) {
|
||||
|
|
8
res/app/settings/notifications/index.js
Normal file
8
res/app/settings/notifications/index.js
Normal file
|
@ -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'))
|
|
@ -0,0 +1,3 @@
|
|||
module.exports = function($scope) {
|
||||
|
||||
}
|
6
res/app/settings/notifications/notifications-service.js
Normal file
6
res/app/settings/notifications/notifications-service.js
Normal file
|
@ -0,0 +1,6 @@
|
|||
module.exports = function NotificationsServiceFactory() {
|
||||
var NotificationsService = {}
|
||||
|
||||
|
||||
return NotificationsService
|
||||
}
|
8
res/app/settings/notifications/notifications.jade
Normal file
8
res/app/settings/notifications/notifications.jade
Normal file
|
@ -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
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue