[Clocks / Timers]  adding ability to pause and resume

added the alternating pause and resume timer
This commit is contained in:
DJ
2017-01-14 16:43:20 -06:00
parent 9df59522d9
commit 165bd4f638
9 changed files with 431 additions and 7 deletions

View File

@@ -29,6 +29,8 @@ define([
"./src/actions/StartTimerAction",
"./src/actions/RestartTimerAction",
"./src/actions/StopTimerAction",
"./src/actions/PauseTimerAction",
"./src/actions/ResumeTimerAction",
"text!./res/templates/clock.html",
"text!./res/templates/timer.html",
'legacyRegistry'
@@ -41,6 +43,8 @@ define([
StartTimerAction,
RestartTimerAction,
StopTimerAction,
PauseTimerAction,
ResumeTimerAction,
clockTemplate,
timerTemplate,
legacyRegistry
@@ -152,6 +156,28 @@ define([
"cssclass": "icon-refresh",
"priority": "preferred"
},
{
"key": "timer.pause",
"implementation": PauseTimerAction,
"depends": [
"now"
],
"category": "contextual",
"name": "Pause",
"cssclass": "icon-pause",
"priority": "preferred"
},
{
"key": "timer.resume",
"implementation": ResumeTimerAction,
"depends": [
"now"
],
"category": "contextual",
"name": "Resume",
"cssclass": "icon-play",
"priority": "preferred"
},
{
"key": "timer.stop",
"implementation": StopTimerAction,
@@ -251,6 +277,16 @@ define([
"name": "hh:mm:ss"
}
]
},
{
"key": "paused",
"control": "boolean",
"name": "PauseCheck"
},
{
"key": "pausedTime",
"control": "long",
"name": "TimeOfPause"
}
],
"model": {