mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-20 00:53:26 +02:00
add groups feature
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* Copyright © 2019 code initially contributed by Orange SA, authors: Denis Barbaron - Licensed under the Apache license 2.0
|
||||
**/
|
||||
|
||||
module.exports = function DateFormatCtrl(
|
||||
$scope
|
||||
, SettingsService
|
||||
) {
|
||||
|
||||
$scope.defaultDateFormat = 'M/d/yy h:mm:ss a'
|
||||
SettingsService.bind($scope, {
|
||||
target: 'dateFormat'
|
||||
, source: 'dateFormat'
|
||||
, defaultValue: $scope.defaultDateFormat
|
||||
})
|
||||
|
||||
$scope.$watch(
|
||||
function() {
|
||||
return SettingsService.get('dateFormat')
|
||||
}
|
||||
, function(newvalue) {
|
||||
if (typeof newvalue === 'undefined') {
|
||||
SettingsService.set('dateFormat', $scope.defaultDateFormat)
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
17
res/app/settings/general/date-format/date-format.pug
Normal file
17
res/app/settings/general/date-format/date-format.pug
Normal file
@@ -0,0 +1,17 @@
|
||||
//
|
||||
Copyright © 2019 code initially contributed by Orange SA, authors: Denis Barbaron - Licensed under the Apache license 2.0
|
||||
//
|
||||
|
||||
.widget-container.fluid-height(ng-controller='DateFormatCtrl')
|
||||
.heading
|
||||
i.fa.fa-clock-o
|
||||
span(translate) Date format
|
||||
.widget-content.padded
|
||||
.form-horizontal
|
||||
.form-group
|
||||
.input-group
|
||||
.input-group-addon.input-sm
|
||||
i.fa.fa-clock-o(
|
||||
uib-tooltip="{{'Define your own Date format' | translate}}" tooltip-placement='auto top-right' tooltip-popup-delay='500')
|
||||
input.form-control.input-sm(size='30' type='text' placeholder='M/d/yy h:mm:ss a' ng-model='dateFormat')
|
||||
|
||||
13
res/app/settings/general/date-format/index.js
Normal file
13
res/app/settings/general/date-format/index.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Copyright © 2019 code initially contributed by Orange SA, authors: Denis Barbaron - Licensed under the Apache license 2.0
|
||||
**/
|
||||
|
||||
module.exports = angular.module('stf.settings.general.date-format', [
|
||||
require('stf/settings').name
|
||||
])
|
||||
.run(['$templateCache', function($templateCache) {
|
||||
$templateCache.put(
|
||||
'settings/general/date-format/date-format.pug', require('./date-format.pug')
|
||||
)
|
||||
}])
|
||||
.controller('DateFormatCtrl', require('./date-format-controller'))
|
||||
Reference in New Issue
Block a user