[refactor] move title into layout render

This commit is contained in:
Kuldeep M 2019-07-15 17:58:15 +01:00
parent 4ae20b0444
commit c5f5e1b2d4
5 changed files with 6 additions and 22 deletions

View File

@ -1179,7 +1179,6 @@
<script src="js/version.js"></script> <script src="js/version.js"></script>
<script src="js/keyboard.js"></script> <script src="js/keyboard.js"></script>
<script src="js/background.js"></script> <script src="js/background.js"></script>
<script src="js/title.js"></script>
<script src="js/layout.js"></script> <script src="js/layout.js"></script>
<script src="js/auto-suggest.js"></script> <script src="js/auto-suggest.js"></script>
<script src="js/page.js"></script> <script src="js/page.js"></script>

View File

@ -255,7 +255,7 @@ var control = (function() {
path: "layout.title", path: "layout.title",
type: "text", type: "text",
func: function() { func: function() {
title.render.name(); layout.render.title();
} }
}, { }, {
element: helper.e(".control-layout-scrollpastend"), element: helper.e(".control-layout-scrollpastend"),

View File

@ -15,6 +15,5 @@ keyboard.init();
layout.init(); layout.init();
background.init(); background.init();
search.init(); search.init();
title.init();
header.init(); header.init();
version.init(); version.init();

View File

@ -29,6 +29,11 @@ var layout = (function() {
}; };
}; };
render.title = function() {
var title = helper.e("title");
title.textContent = state.get().layout.title;
};
var init = function() { var init = function() {
render.width(); render.width();
render.padding(); render.padding();

View File

@ -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
};
})();