From 6cde517c5587c4c4674407689e712f7c05b88e9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Sun, 10 Sep 2017 15:47:19 +0200 Subject: [PATCH] comments and removed unused flag from some old version --- jssrc/appcommon.js | 12 ++++-------- jssrc/term.js | 3 ++- pages/term.php | 4 +--- 3 files changed, 7 insertions(+), 12 deletions(-) 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 @@