Gmail style selection (UNSTABLE)

This commit is contained in:
RainLoop Team 2014-04-09 20:01:41 +04:00
parent deffb81888
commit da88e0d2b5
19 changed files with 561 additions and 572 deletions

View file

@ -14,23 +14,17 @@ function AdminPackages()
this.packagesReal = oData.packagesReal;
this.packagesMainUpdatable = oData.packagesMainUpdatable;
this.packagesCurrent = ko.computed(function () {
return _.filter(this.packages(), function (oItem) {
return oItem && '' !== oItem['installed'] && !oItem['compare'];
});
}, this);
this.packagesAvailableForUpdate = ko.computed(function () {
return _.filter(this.packages(), function (oItem) {
return oItem && '' !== oItem['installed'] && !!oItem['compare'];
});
}, this);
this.packagesAvailableForInstallation = ko.computed(function () {
return _.filter(this.packages(), function (oItem) {
return oItem && '' === oItem['installed'];
});
}, this);
this.packagesCurrent = this.packages.filter(function (oItem) {
return oItem && '' !== oItem['installed'] && !oItem['compare'];
});
this.packagesAvailableForUpdate = this.packages.filter(function (oItem) {
return oItem && '' !== oItem['installed'] && !!oItem['compare'];
});
this.packagesAvailableForInstallation = this.packages.filter(function (oItem) {
return oItem && '' === oItem['installed'];
});
this.visibility = ko.computed(function () {
return oData.packagesLoading() ? 'visible' : 'hidden';