diff --git a/jssrc/appcommon.js b/jssrc/appcommon.js index 2927c89..e1a9514 100644 --- a/jssrc/appcommon.js +++ b/jssrc/appcommon.js @@ -73,6 +73,8 @@ $.ready(function () { e.preventDefault() }) + // populate the form errors box from GET arg ?err=... + // (a way to pass errors back from server via redirect) let errAt = location.search.indexOf('err=') if (errAt !== -1 && qs('.Box.errors')) { let errs = location.search.substr(errAt + 4).split(',') @@ -108,18 +110,12 @@ $.ready(function () { } }) +// setup the ajax loader $._loader = function (vis) { $('#loader').toggleClass('show', vis) } +// reveal content on load function showPage () { $('#content').addClass('load') } - -$.ready(function () { - if (window.noAutoShow !== true) { - setTimeout(function () { - showPage() - }, 1) - } -}) diff --git a/jssrc/term.js b/jssrc/term.js index dd2a51a..23e2133 100644 --- a/jssrc/term.js +++ b/jssrc/term.js @@ -1,6 +1,7 @@ /** Init the terminal sub-module - called from HTML */ -window.termInit = function () { +window.termInit = function (labels, theme) { Conn.init() Input.init() TermUpl.init() + Screen.load(labels, theme) // populate labels } diff --git a/pages/term.php b/pages/term.php index f9dc768..77d7edd 100644 --- a/pages/term.php +++ b/pages/term.php @@ -71,9 +71,7 @@