Small fixes

This commit is contained in:
RainLoop Team 2013-12-13 03:23:47 +04:00
parent ff8ef2012b
commit c9b5194baf
33 changed files with 296 additions and 58 deletions

View file

@ -56,17 +56,26 @@ function PopupsComposeViewModel()
this.saving = ko.observable(false);
this.attachments = ko.observableArray([]);
this.attachmentsInProcess = ko.computed(function () {
return _.filter(this.attachments(), function (oItem) {
return oItem && '' === oItem.tempName();
});
}, this);
// this.attachmentsInProcess = ko.computed(function () {
// return _.filter(this.attachments(), function (oItem) {
// return oItem && '' === oItem.tempName();
// });
// }, this);
//
// this.attachmentsInReady = ko.computed(function () {
// return _.filter(this.attachments(), function (oItem) {
// return oItem && '' !== oItem.tempName();
// });
// }, this);
this.attachmentsInReady = ko.computed(function () {
return _.filter(this.attachments(), function (oItem) {
return oItem && '' !== oItem.tempName();
});
}, this);
this.attachmentsInProcess = this.attachments.filter(function (oItem) {
return oItem && '' === oItem.tempName();
});
this.attachmentsInReady = this.attachments.filter(function (oItem) {
return oItem && '' !== oItem.tempName();
});
this.attachments.subscribe(function () {
this.triggerForResize();