From 1b74f94b70650ed940ddc9e7a5582d48614effa1 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Fri, 27 Jul 2018 17:45:07 +0000 Subject: [PATCH] --- wwwroot/default.htm | 1 + wwwroot/js/app.ops.js | 102 ++++++++++++++++++++++ wwwroot/js/app.shell.js | 9 +- wwwroot/js/templates/app.ops.handlebars | 16 ++++ wwwroot/js/templates/app.shell.handlebars | 4 + wwwroot/js/templates/templates.js | 4 +- 6 files changed, 133 insertions(+), 3 deletions(-) create mode 100644 wwwroot/js/app.ops.js create mode 100644 wwwroot/js/templates/app.ops.handlebars diff --git a/wwwroot/default.htm b/wwwroot/default.htm index 43fb8b1..48db6dd 100644 --- a/wwwroot/default.htm +++ b/wwwroot/default.htm @@ -70,6 +70,7 @@ + diff --git a/wwwroot/js/app.ops.js b/wwwroot/js/app.ops.js new file mode 100644 index 0000000..0db3831 --- /dev/null +++ b/wwwroot/js/app.ops.js @@ -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( + "

Ops status response: " + + res + + "

" + ); + } + }); + + +//{"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 --------------------- +})(); diff --git a/wwwroot/js/app.shell.js b/wwwroot/js/app.shell.js index bf47286..3ed427d 100644 --- a/wwwroot/js/app.shell.js +++ b/wwwroot/js/app.shell.js @@ -237,6 +237,7 @@ app.shell = (function () { page('/rfcases', rfcases); page('/rfcaseEdit/:id', rfcaseEdit); page('/rfsettings', rfsettings); + page('/ops', ops); page('*', notFound); page({ hashbang: true @@ -539,7 +540,13 @@ app.shell = (function () { app.rfsettings.initModule(); } - + var ops = function (ctx) { + app.nav.setSelectedMenuItem('ops'); + app.ops.configModule({ + context: ctx + }); + app.ops.initModule(); + } var notFound = function (ctx) { diff --git a/wwwroot/js/templates/app.ops.handlebars b/wwwroot/js/templates/app.ops.handlebars new file mode 100644 index 0000000..3b42508 --- /dev/null +++ b/wwwroot/js/templates/app.ops.handlebars @@ -0,0 +1,16 @@ +
+

OPS

+
+ +
+ +
+ + + +
+ +
+
+
+
\ No newline at end of file diff --git a/wwwroot/js/templates/app.shell.handlebars b/wwwroot/js/templates/app.shell.handlebars index 3f49e97..805c6b8 100644 --- a/wwwroot/js/templates/app.shell.handlebars +++ b/wwwroot/js/templates/app.shell.handlebars @@ -28,6 +28,10 @@ Cases + + diff --git a/wwwroot/js/templates/templates.js b/wwwroot/js/templates/templates.js index a88ed43..dbc7ff1 100644 --- a/wwwroot/js/templates/templates.js +++ b/wwwroot/js/templates/templates.js @@ -1,2 +1,2 @@ -!function(){var n=Handlebars.template,e=Handlebars.templates=Handlebars.templates||{};e["app.authenticate"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,l,t){return'
\n Rockfish logo\n

Login

\n
\n

\n

\n

\n
\n
'},useData:!0}),e["app.customerEdit"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,l,t){return'
\n
\n\n\n
\n \n \n
\n\n
\n \n \n
\n\n
\n \n \n
\n\n
\n \n \n
\n\n
\n \n
\n\n\n
\n \n
\n\n\n\n
\n \n