1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-04 18:29:17 +02:00

- Adding notifications.

This commit is contained in:
Gunther Brunner 2014-03-14 15:44:27 +09:00
parent eaaf6a36bd
commit a9a645da23
8 changed files with 30 additions and 15 deletions

View file

@ -6,8 +6,7 @@ var webpackOptions = require('../../webpack.config.js')
var overrideOptions = { var overrideOptions = {
debug: true, debug: true,
devtool: 'source-map' devtool: 'eval'
//devtool: 'eval'
} }
var finalOptions = _.assign(webpackOptions, overrideOptions) var finalOptions = _.assign(webpackOptions, overrideOptions)

View file

@ -1,10 +1,10 @@
module.exports = angular.module('ui-settings', [ module.exports = angular.module('ui-settings', [
require('./local').name, require('./local').name,
require('./language').name require('./language').name,
require('./notifications').name
]) ])
.config(['$routeProvider', function ($routeProvider) { .config(['$routeProvider', function ($routeProvider) {
$routeProvider.when('/settings', { $routeProvider.when('/settings', {
template: require('./settings.jade') template: require('./settings.jade')
}) })
}]) }])
//.controller('SettingsCtrl', require('./settings-controller'))

View file

@ -2,7 +2,6 @@ module.exports = function ($scope, LanguageService, SettingsService) {
// SettingsService.sync($scope, 'Language', { // SettingsService.sync($scope, 'Language', {
// language: LanguageService.detectedLanguage // language: LanguageService.detectedLanguage
// }) // })
// SettingsService.bind($scope, { // SettingsService.bind($scope, {
// key: 'language', // key: 'language',
// defaultValue: LanguageService.selectedLanguage // defaultValue: LanguageService.selectedLanguage
@ -10,7 +9,6 @@ module.exports = function ($scope, LanguageService, SettingsService) {
LanguageService.getSelectedLanguage().then(function (data) { LanguageService.getSelectedLanguage().then(function (data) {
$scope.language = data $scope.language = data
console.log('real', data)
}) })
$scope.$watch('language', function (newValue, oldValue) { $scope.$watch('language', function (newValue, oldValue) {

View 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'))

View file

@ -0,0 +1,3 @@
module.exports = function($scope) {
}

View file

@ -0,0 +1,6 @@
module.exports = function NotificationsServiceFactory() {
var NotificationsService = {}
return NotificationsService
}

View 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

View file

@ -5,16 +5,9 @@ div(pane='center')
.col-md-4 .col-md-4
div(ng-include='"settings/language/language.jade"') div(ng-include='"settings/language/language.jade"')
.col-md-4 .col-md-4
.widget-container.fluid-height div(ng-include='"settings/notifications/notifications.jade"')
.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
.row //(ng-controller='PortForwardingCtrl') //.row //(ng-controller='PortForwardingCtrl')
.col-md-12 .col-md-12
.widget-container.fluid-height .widget-container.fluid-height
.heading .heading