mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Code refactoring
a lot of small fixes (Closes #173) Added login field (ownCloud package)
This commit is contained in:
parent
a059b3d063
commit
fed896776f
129 changed files with 1016 additions and 804 deletions
8
dev/Models/FilterConditionModel.js
Normal file
8
dev/Models/FilterConditionModel.js
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function FilterConditionModel()
|
||||
{
|
||||
}
|
||||
36
dev/Models/FilterModel.js
Normal file
36
dev/Models/FilterModel.js
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function FilterModel()
|
||||
{
|
||||
this.enabled = ko.observable(true);
|
||||
|
||||
this.conditions = ko.observableArray([]);
|
||||
|
||||
this.action = ko.observable(Enums.FiltersAction.None);
|
||||
}
|
||||
|
||||
FilterModel.prototype.deleteCondition = function (oCondition)
|
||||
{
|
||||
this.conditions.remove(oCondition);
|
||||
};
|
||||
|
||||
FilterModel.prototype.addCondition = function ()
|
||||
{
|
||||
this.conditions.push(new FilterConditionModel());
|
||||
};
|
||||
|
||||
FilterModel.prototype.parse = function (oItem)
|
||||
{
|
||||
var bResult = false;
|
||||
if (oItem && 'Object/Filter' === oItem['@Object'])
|
||||
{
|
||||
this.name(Utils.pString(oItem['Name']));
|
||||
|
||||
bResult = true;
|
||||
}
|
||||
|
||||
return bResult;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue