File tree Expand file tree Collapse file tree 2 files changed +16
-18
lines changed
app/plugins/miscellanea/alarm-clock Expand file tree Collapse file tree 2 files changed +16
-18
lines changed Original file line number Diff line number Diff line change 15
15
" enabled" ,
16
16
" hour" ,
17
17
" minute" ,
18
- " monday" ,
19
- " tuesday" ,
20
- " wednesday" ,
21
- " thursday" ,
22
- " friday" ,
23
- " saturday" ,
24
- " sunday"
18
+ " monday" ,
19
+ " tuesday" ,
20
+ " wednesday" ,
21
+ " thursday" ,
22
+ " friday" ,
23
+ " saturday" ,
24
+ " sunday"
25
25
]
26
26
},
27
27
"content" : [
391
391
"value" :59 ,
392
392
"label" : " 59"
393
393
}
394
-
395
-
396
394
],
397
395
"visibleIf" : {
398
396
"field" : " enabled" ,
Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ AlarmClock.prototype.clearJobs = function () {
141
141
142
142
AlarmClock . prototype . applyConf = function ( conf ) {
143
143
var self = this ;
144
-
144
+
145
145
for ( var i in conf ) {
146
146
var item = conf [ i ] ;
147
147
var d = new Date ( item . time ) ;
@@ -150,25 +150,25 @@ AlarmClock.prototype.applyConf = function(conf) {
150
150
var schedule = require ( 'node-schedule' ) ;
151
151
var rule = new schedule . RecurrenceRule ( ) ;
152
152
rule . dayOfWeek = [ ] ;
153
- if ( item . monday ) {
153
+ if ( item . monday ) {
154
154
rule . dayOfWeek . push ( 1 ) ;
155
155
}
156
- if ( item . tuesday ) {
156
+ if ( item . tuesday ) {
157
157
rule . dayOfWeek . push ( 2 ) ;
158
158
}
159
- if ( item . wednesday ) {
159
+ if ( item . wednesday ) {
160
160
rule . dayOfWeek . push ( 3 ) ;
161
161
}
162
- if ( item . thursday ) {
162
+ if ( item . thursday ) {
163
163
rule . dayOfWeek . push ( 4 ) ;
164
164
}
165
- if ( item . friday ) {
165
+ if ( item . friday ) {
166
166
rule . dayOfWeek . push ( 5 ) ;
167
167
}
168
- if ( item . saturday ) {
168
+ if ( item . saturday ) {
169
169
rule . dayOfWeek . push ( 6 ) ;
170
170
}
171
- if ( item . sunday ) {
171
+ if ( item . sunday ) {
172
172
rule . dayOfWeek . push ( 7 ) ;
173
173
}
174
174
rule . minute = d . getMinutes ( ) ;
@@ -280,7 +280,7 @@ AlarmClock.prototype.getSleep = function()
280
280
var sleep_action = sleepTask . sleep_action ;
281
281
if ( sleepTask . sleep_action == "stop" ) {
282
282
var sleep_actionText = self . commandRouter . getI18nString ( 'ALARM.STOP_MUSIC' ) ;
283
- } else if ( sleepTask . sleep_action == "poweroff" ) {
283
+ } else if ( sleepTask . sleep_action == "poweroff" ) {
284
284
var sleep_actionText = self . commandRouter . getI18nString ( 'ALARM.TURN_OFF' ) ;
285
285
}
286
286
} else {
You can’t perform that action at this time.
0 commit comments