mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-10 00:38:04 +08:00
40 lines
889 B
JavaScript
40 lines
889 B
JavaScript
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||
|
|
||
|
(function (module) {
|
||
|
|
||
|
'use strict';
|
||
|
|
||
|
var
|
||
|
ko = require('../External/ko.js'),
|
||
|
Utils = require('../Common/Utils.js'),
|
||
|
PopupsFilterViewModel = require('../ViewModels/Popups/PopupsFilterViewModel.js')
|
||
|
;
|
||
|
|
||
|
/**
|
||
|
* @constructor
|
||
|
*/
|
||
|
function SettingsFilters()
|
||
|
{
|
||
|
this.filters = ko.observableArray([]);
|
||
|
this.filters.loading = ko.observable(false);
|
||
|
|
||
|
this.filters.subscribe(function () {
|
||
|
Utils.windowResize();
|
||
|
});
|
||
|
}
|
||
|
|
||
|
kn.addSettingsViewModel(SettingsFilters, 'SettingsFilters', 'SETTINGS_LABELS/LABEL_FILTERS_NAME', 'filters');
|
||
|
|
||
|
SettingsFilters.prototype.deleteFilter = function (oFilter)
|
||
|
{
|
||
|
this.filters.remove(oFilter);
|
||
|
};
|
||
|
|
||
|
SettingsFilters.prototype.addFilter = function ()
|
||
|
{
|
||
|
kn.showScreenPopup(PopupsFilterViewModel, [new FilterModel()]);
|
||
|
};
|
||
|
|
||
|
module.exports = SettingsFilters;
|
||
|
|
||
|
}(module));
|