From c5f5e1b2d4a80cb93672577aec69ffdb07e72aa2 Mon Sep 17 00:00:00 2001 From: Kuldeep M Date: Mon, 15 Jul 2019 17:58:15 +0100 Subject: [PATCH] [refactor] move title into layout render --- src/index.html | 1 - src/js/control.js | 2 +- src/js/init.js | 1 - src/js/layout.js | 5 +++++ src/js/title.js | 19 ------------------- 5 files changed, 6 insertions(+), 22 deletions(-) delete mode 100644 src/js/title.js diff --git a/src/index.html b/src/index.html index d06ade34..eb276719 100644 --- a/src/index.html +++ b/src/index.html @@ -1179,7 +1179,6 @@ - diff --git a/src/js/control.js b/src/js/control.js index 29ef5b00..5d7156db 100644 --- a/src/js/control.js +++ b/src/js/control.js @@ -255,7 +255,7 @@ var control = (function() { path: "layout.title", type: "text", func: function() { - title.render.name(); + layout.render.title(); } }, { element: helper.e(".control-layout-scrollpastend"), diff --git a/src/js/init.js b/src/js/init.js index b4c6edad..cfeeec69 100644 --- a/src/js/init.js +++ b/src/js/init.js @@ -15,6 +15,5 @@ keyboard.init(); layout.init(); background.init(); search.init(); -title.init(); header.init(); version.init(); diff --git a/src/js/layout.js b/src/js/layout.js index 3f6d443c..cb5e0323 100644 --- a/src/js/layout.js +++ b/src/js/layout.js @@ -29,6 +29,11 @@ var layout = (function() { }; }; + render.title = function() { + var title = helper.e("title"); + title.textContent = state.get().layout.title; + }; + var init = function() { render.width(); render.padding(); diff --git a/src/js/title.js b/src/js/title.js deleted file mode 100644 index a9c3f0bc..00000000 --- a/src/js/title.js +++ /dev/null @@ -1,19 +0,0 @@ -var title = (function() { - - var render = {}; - - render.name = function() { - helper.e("title").textContent = state.get().layout.title; - }; - - var init = function() { - render.name(); - }; - - // exposed methods - return { - render: render, - init: init - }; - -})();