From 56b0eba5b65d1d73faee3113eae7b368cec911d3 Mon Sep 17 00:00:00 2001 From: abose Date: Sun, 3 Dec 2023 17:11:52 +0530 Subject: [PATCH] refactor: move status bar template to index html for performance --- src/index.html | 22 +++++++++++++++++++--- src/widgets/StatusBar.html | 17 ----------------- src/widgets/StatusBar.js | 8 ++------ 3 files changed, 21 insertions(+), 26 deletions(-) delete mode 100644 src/widgets/StatusBar.html diff --git a/src/index.html b/src/index.html index f16ad32ce8..24ed962aea 100644 --- a/src/index.html +++ b/src/index.html @@ -558,11 +558,27 @@
-
- + +
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
- +
diff --git a/src/widgets/StatusBar.html b/src/widgets/StatusBar.html deleted file mode 100644 index 7825a4ece5..0000000000 --- a/src/widgets/StatusBar.html +++ /dev/null @@ -1,17 +0,0 @@ -
-
-
-
-
-
-
-
-
- -
-
-
-
{{STATUSBAR_INSERT}}
-
-
-
diff --git a/src/widgets/StatusBar.js b/src/widgets/StatusBar.js index 8b3f3cfd9c..a096b380ab 100644 --- a/src/widgets/StatusBar.js +++ b/src/widgets/StatusBar.js @@ -29,10 +29,8 @@ define(function (require, exports, module) { var AppInit = require("utils/AppInit"), - StatusBarHTML = require("text!widgets/StatusBar.html"), Strings = require("strings"), - WorkspaceManager = require("view/WorkspaceManager"), - Mustache = require("thirdparty/mustache/mustache"); + WorkspaceManager = require("view/WorkspaceManager"); var _init = false; @@ -246,9 +244,7 @@ define(function (require, exports, module) { } AppInit.htmlReady(function () { - var $parent = $(".main-view .content"); - $parent.append(Mustache.render(StatusBarHTML, Strings)); - + $("#status-overwrite").text(Strings.STATUSBAR_INSERT); // Initialize items dependent on HTML DOM $statusBar = $("#status-bar"); $indicators = $("#status-indicators");