mirror of
https://github.com/zombieFox/nightTab.git
synced 2024-12-28 09:38:50 +01:00
[refactor] move title into layout render
This commit is contained in:
parent
4ae20b0444
commit
c5f5e1b2d4
@ -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>
|
||||||
|
@ -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"),
|
||||||
|
@ -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();
|
||||||
|
@ -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();
|
||||||
|
@ -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
|
|
||||||
};
|
|
||||||
|
|
||||||
})();
|
|
Loading…
Reference in New Issue
Block a user