snappymail/dev/ViewModels/AdminSettingsPaneViewModel.js
2014-08-27 19:59:44 +04:00

45 lines
No EOL
1 KiB
JavaScript

/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
(function (module, require) {
'use strict';
var
ko = require('ko'),
Settings = require('Storage:Settings'),
Data = require('Storage:Admin:Data'),
Remote = require('Storage:Admin:Remote'),
kn = require('App:Knoin'),
KnoinAbstractViewModel = require('Knoin:AbstractViewModel')
;
/**
* @constructor
* @extends KnoinAbstractViewModel
*/
function AdminPaneViewModel()
{
KnoinAbstractViewModel.call(this, 'Right', 'AdminPane');
this.adminDomain = ko.observable(Settings.settingsGet('AdminDomain'));
this.version = ko.observable(Settings.settingsGet('Version'));
this.adminManLoadingVisibility = Data.adminManLoadingVisibility;
kn.constructorEnd(this);
}
kn.extendAsViewModel('AdminPaneViewModel', AdminPaneViewModel);
AdminPaneViewModel.prototype.logoutClick = function ()
{
Remote.adminLogout(function () {
require('App:Admin').loginAndLogoutReload();
});
};
module.exports = AdminPaneViewModel;
}(module, require));