X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=sidebyside;f=testing%2FMCTXWeb%2Fpublic_html%2Fstatic%2Fmctx.gui.js;h=48737b5932395324837ddd2413c9a377cce4e815;hb=e0132025a1df98f88b2415e9e5f75ce7304efb33;hp=c609ef585bf44c0b0c85435c8c9b367a07c76eaa;hpb=ae0cc3f8745c9c398dc7745b986c0d96bf4ce0f8;p=matches%2FMCTX3420.git diff --git a/testing/MCTXWeb/public_html/static/mctx.gui.js b/testing/MCTXWeb/public_html/static/mctx.gui.js index c609ef5..48737b5 100644 --- a/testing/MCTXWeb/public_html/static/mctx.gui.js +++ b/testing/MCTXWeb/public_html/static/mctx.gui.js @@ -284,6 +284,36 @@ $.fn.setErrorLog = function () { return this; }; +$(document).ready(function () { + //Show the content! + $("#content").css("display", "block"); + + //Set the welcome bar + var name = " " + (mctx.friendlyName ? mctx.friendlyName : ""); + $("#welcome-container").text("Welcome"+ name + "!"); + $("#logout-container").css("display", "block"); + //$("#menu-container").populateNavbar(); + + $("#logout").click(function () { + $("#logout").logout(); + }); + + //Enable the error log, if present + $("#errorlog").setErrorLog(); + + //Enable the hide/show clicks + $("#sidebar-hide").click(function () { + $("#sidebar").css("display", "none"); + $("#sidebar-show").css("display", "inherit"); + return this; + }); + + $("#sidebar-show").click(function () { + $("#sidebar-show").css("display", "none"); + $("#sidebar").css("display", "inherit"); + return this; + }); +}); $(document).ajaxError(function (event, jqXHR) { //console.log("AJAX query failed with: " + jqXHR.status + " (" + jqXHR.statusText + ")"); }); \ No newline at end of file