Add cmd interface

Code refactoring
This commit is contained in:
RainLoop Team 2016-08-24 01:17:50 +03:00
parent e6e1a19477
commit 962391e2a0
23 changed files with 180 additions and 223 deletions

View file

@ -424,12 +424,24 @@ export const Magics = {
'BitLength2048': 2048,
'BitLength1024': 1024,
'Size350px': 350,
'Size50px': 50,
'Size20px': 20,
'Size1px': 1,
'Time30mInMin': 30,
'Time60m': 60000 * 60,
'Time30m': 60000 * 30,
'Time20m': 60000 * 20,
'Time15m': 60000 * 15,
'Time10m': 60000 * 10,
'Time5m': 60000 * 5,
'Time3m': 60000 * 3,
'Time2m': 60000 * 2,
'Time1m': 60000,
'Time30s': 30000,
'Time10s': 10000,
'Time7s': 7000,
'Time5s': 5000,
'Time3s': 3000,
@ -440,7 +452,9 @@ export const Magics = {
'Time200ms': 200,
'Time100ms': 100,
'Time50ms': 50,
'Time20ms': 20
'Time20ms': 20,
'Time10ms': 10,
'Time1ms': 1
};
/**

View file

@ -76,33 +76,8 @@ class Selector
}, this);
this.selectedItem = this.selectedItem.extend({toggleSubscribe: [null,
(prev) => {
if (prev)
{
prev.selected(false);
}
}, (next) => {
if (next)
{
next.selected(true);
}
}
]});
this.focusedItem = this.focusedItem.extend({toggleSubscribe: [null,
(prev) => {
if (prev)
{
prev.focused(false);
}
}, (next) => {
if (next)
{
next.focused(true);
}
}
]});
this.selectedItem = this.selectedItem.extend({toggleSubscribeProperty: [this, 'selected']});
this.focusedItem = this.focusedItem.extend({toggleSubscribeProperty: [null, 'focused']});
this.iSelectNextHelper = 0;
this.iFocusedNextHelper = 0;