[Clocks] Add license, change keys

Un-namespace keys in clock plugin, and add licensing
info for moment-duration-format. WTD-1239
This commit is contained in:
Victor Woeltjen 2015-09-14 16:52:56 -07:00
parent c932e953bc
commit 96f72b3765
7 changed files with 59 additions and 24 deletions

View File

@ -345,6 +345,41 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
---
### moment-duration-format
#### Info
* Link: https://github.com/jsmreese/moment-duration-format
* Version: 1.3.0
* Authors: John Madhavan-Reese
* Description: Duration parsing/formatting
#### License
Copyright 2014 John Madhavan-Reese
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
---
### Json.NET
#### Info

View File

@ -1,5 +1,5 @@
{
"name": "WARP Clocks/Timers",
"name": "Clocks/Timers",
"descriptions": "Domain objects for displaying current & relative times.",
"configuration": {
"paths": {
@ -17,13 +17,13 @@
"indicators": [
{
"implementation": "indicators/ClockIndicator.js",
"depends": [ "warp.tickerService", "CLOCK_INDICATOR_FORMAT" ],
"depends": [ "tickerService", "CLOCK_INDICATOR_FORMAT" ],
"priority": "preferred"
}
],
"services": [
{
"key": "warp.tickerService",
"key": "tickerService",
"implementation": "services/TickerService.js",
"depends": [ "$timeout", "now" ]
}
@ -32,7 +32,7 @@
{
"key": "ClockController",
"implementation": "controllers/ClockController.js",
"depends": [ "$scope", "warp.tickerService" ]
"depends": [ "$scope", "tickerService" ]
},
{
"key": "TimerController",
@ -42,24 +42,24 @@
{
"key": "RefreshingController",
"implementation": "controllers/RefreshingController.js",
"depends": [ "$scope", "warp.tickerService" ]
"depends": [ "$scope", "tickerService" ]
}
],
"views": [
{
"key": "warp.clock",
"type": "warp.clock",
"key": "clock",
"type": "clock",
"templateUrl": "templates/clock.html"
},
{
"key": "warp.timer",
"type": "warp.timer",
"key": "timer",
"type": "timer",
"templateUrl": "templates/timer.html"
}
],
"actions": [
{
"key": "warp.timer.start",
"key": "timer.start",
"implementation": "actions/StartTimerAction.js",
"depends": ["now"],
"category": "contextual",
@ -68,7 +68,7 @@
"priority": "preferred"
},
{
"key": "warp.timer.restart",
"key": "timer.restart",
"implementation": "actions/RestartTimerAction.js",
"depends": ["now"],
"category": "contextual",
@ -79,7 +79,7 @@
],
"types": [
{
"key": "warp.clock",
"key": "clock",
"name": "Clock",
"glyph": "C",
"features": [ "creation" ],
@ -127,7 +127,7 @@
}
},
{
"key": "warp.timer",
"key": "timer",
"name": "Timer",
"glyph": "\u00F5",
"features": [ "creation" ],

View File

@ -23,7 +23,7 @@ define(
// We show this variant for timers which already have
// a target time.
return model.type === 'warp.timer' &&
return model.type === 'timer' &&
model.timestamp !== undefined;
};

View File

@ -24,7 +24,7 @@ define(
// We show this variant for timers which do not yet have
// a target time.
return model.type === 'warp.timer' &&
return model.type === 'timer' &&
model.timestamp === undefined;
};

View File

@ -49,7 +49,7 @@ define(
formatKey = model.timerFormat,
actionCapability = domainObject.getCapability('action'),
actionKey = (timestamp === undefined) ?
'warp.timer.start' : 'warp.timer.restart';
'timer.start' : 'timer.restart';
updateFormat(formatKey);
updateTimestamp(timestamp);

View File

@ -59,15 +59,15 @@ define(
});
it("applies only to timers with a target time", function () {
testModel.type = 'warp.timer';
testModel.type = 'timer';
testModel.timestamp = 12000;
expect(RestartTimerAction.appliesTo(testContext)).toBeTruthy();
testModel.type = 'warp.timer';
testModel.type = 'timer';
testModel.timestamp = undefined;
expect(RestartTimerAction.appliesTo(testContext)).toBeFalsy();
testModel.type = 'warp.clock';
testModel.type = 'clock';
testModel.timestamp = 12000;
expect(RestartTimerAction.appliesTo(testContext)).toBeFalsy();
});

View File

@ -62,8 +62,8 @@ define(
});
mockActionCapability.getActions.andCallFake(function (k) {
return [{
'warp.timer.start': mockStart,
'warp.timer.restart': mockRestart
'timer.start': mockStart,
'timer.restart': mockRestart
}[k]];
});
mockStart.getMetadata.andReturn({ glyph: "S", name: "Start" });