This commit is contained in:
102
wwwroot/js/app.ops.js
Normal file
102
wwwroot/js/app.ops.js
Normal file
@@ -0,0 +1,102 @@
|
||||
/*jslint browser : true, continue : true,
|
||||
devel : true, indent : 2, maxerr : 50,
|
||||
newcap : true, nomen : true, plusplus : true,
|
||||
regexp : true, sloppy : true, vars : false,
|
||||
white : true
|
||||
*/
|
||||
|
||||
/*global $, app */
|
||||
|
||||
app.ops = (function() {
|
||||
"use strict";
|
||||
//---------------- BEGIN MODULE SCOPE VARIABLES --------------
|
||||
var stateMap = {},
|
||||
configModule,
|
||||
//onChangePassword,
|
||||
initModule;
|
||||
//----------------- END MODULE SCOPE VARIABLES ---------------
|
||||
|
||||
//------------------- BEGIN UTILITY METHODS ------------------
|
||||
//-------------------- END UTILITY METHODS -------------------
|
||||
|
||||
//------------------- BEGIN EVENT HANDLERS -------------------
|
||||
|
||||
///////////////////////////////
|
||||
//ONUPDATE
|
||||
//
|
||||
// onChangePassword = function(event) {
|
||||
// event.preventDefault();
|
||||
// $.gevent.publish("app-clear-error");
|
||||
// //get form data
|
||||
// var formData = $("form").serializeArray({
|
||||
// checkboxesAsBools: true
|
||||
// });
|
||||
|
||||
// var submitData = app.utilB.objectifyFormDataArray(formData);
|
||||
|
||||
// app.api.create(
|
||||
// "user/" + app.shell.stateMap.user.id + "/changepassword",
|
||||
// submitData,
|
||||
// function(res) {
|
||||
// if (res.error) {
|
||||
// $.gevent.publish("app-show-error", res.msg);
|
||||
// } else {
|
||||
// page("#!/logout");
|
||||
// }
|
||||
// }
|
||||
// );
|
||||
|
||||
// return false; //prevent default?
|
||||
// };
|
||||
//-------------------- END EVENT HANDLERS --------------------
|
||||
|
||||
//------------------- BEGIN PUBLIC METHODS -------------------
|
||||
//CONFIGMODULE
|
||||
//
|
||||
configModule = function(context) {
|
||||
stateMap.context = context.context;
|
||||
if (stateMap.context.params.id) {
|
||||
stateMap.id = stateMap.context.params.id;
|
||||
}
|
||||
};
|
||||
|
||||
//INITMODULE
|
||||
//
|
||||
initModule = function($container) {
|
||||
if (typeof $container === "undefined") {
|
||||
$container = $("#app-shell-main-content");
|
||||
}
|
||||
$container.html(Handlebars.templates["app.ops"]({}));
|
||||
|
||||
// bind actions
|
||||
// $("#btn-change-password").bind("click", onChangePassword);
|
||||
|
||||
//Context menu
|
||||
app.nav.contextClear();
|
||||
|
||||
app.api.get("ops/status/", function(res) {
|
||||
if (res.error) {
|
||||
$.gevent.publish("app-show-error", res.msg);
|
||||
} else {
|
||||
$("#about").append(
|
||||
"<p>Ops status response: " +
|
||||
res +
|
||||
"</p>"
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//{"mailMirrorOK":true,"forumOK":true,"ayaNovaWebsiteOK":true,"apiWebsiteOK":true,"contactFormOK":true,"requestFormOK":true,"requestLiteFormOK":true,"subversionOK":true,"devOpsOK":true,"backupOK":true,"opsCheckMessage":""}
|
||||
|
||||
////app.nav.setContextTitle("Search");
|
||||
};
|
||||
|
||||
//PUBLIC METHODS
|
||||
//
|
||||
return {
|
||||
configModule: configModule,
|
||||
initModule: initModule
|
||||
};
|
||||
//------------------- END PUBLIC METHODS ---------------------
|
||||
})();
|
||||
Reference in New Issue
Block a user