mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-01-27 23:24:26 +00:00
attach templates to twister.tmpl.root instead twister.html.detached
This commit is contained in:
parent
82ec957172
commit
7614201d85
@ -10,7 +10,9 @@ var twister = {
|
|||||||
detached: $('<div>'), // here elements go to detach themself
|
detached: $('<div>'), // here elements go to detach themself
|
||||||
blanka: $('<a target="_blank">') // to open stuff in new tab, see routeOnClick()
|
blanka: $('<a target="_blank">') // to open stuff in new tab, see routeOnClick()
|
||||||
},
|
},
|
||||||
tmpl: {}, // templates should be detached and stored here
|
tmpl: { // templates pointers are stored here
|
||||||
|
root: $('<div>') // templates should be detached from DOM and attached here; use extractTemplate()
|
||||||
|
},
|
||||||
modal: {}
|
modal: {}
|
||||||
};
|
};
|
||||||
var window_scrollY = 0;
|
var window_scrollY = 0;
|
||||||
@ -2064,7 +2066,7 @@ function initInterfaceCommon() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function extractTemplate(selector) {
|
function extractTemplate(selector) {
|
||||||
return $(selector).appendTo(twister.html.detached).children();
|
return $(selector).appendTo(twister.tmpl.root).children();
|
||||||
}
|
}
|
||||||
|
|
||||||
function promptCopyAttrData(event) {
|
function promptCopyAttrData(event) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user