New thread controller

This commit is contained in:
RainLoop Team 2015-03-06 04:42:40 +04:00
parent 9dbf77f942
commit b6ca9e357e
20 changed files with 922 additions and 595 deletions

View file

@ -17,12 +17,13 @@
* @constructor
* @param {koProperty} oKoList
* @param {koProperty} oKoSelectedItem
* @param {koProperty} oKoFocusedItem
* @param {string} sItemSelector
* @param {string} sItemSelectedSelector
* @param {string} sItemCheckedSelector
* @param {string} sItemFocusedSelector
*/
function Selector(oKoList, oKoSelectedItem,
function Selector(oKoList, oKoSelectedItem, oKoFocusedItem,
sItemSelector, sItemSelectedSelector, sItemCheckedSelector, sItemFocusedSelector)
{
this.list = oKoList;
@ -37,8 +38,8 @@
return 0 < this.listChecked().length;
}, this);
this.focusedItem = ko.observable(null);
this.selectedItem = oKoSelectedItem;
this.focusedItem = oKoFocusedItem || ko.observable(null);
this.selectedItem = oKoSelectedItem || ko.observable(null);
this.selectedItemUseCallback = true;
this.itemSelectedThrottle = _.debounce(_.bind(this.itemSelected, this), 300);