mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-01-13 08:27:51 +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
|
||||
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: {}
|
||||
};
|
||||
var window_scrollY = 0;
|
||||
@ -2064,7 +2066,7 @@ function initInterfaceCommon() {
|
||||
}
|
||||
|
||||
function extractTemplate(selector) {
|
||||
return $(selector).appendTo(twister.html.detached).children();
|
||||
return $(selector).appendTo(twister.tmpl.root).children();
|
||||
}
|
||||
|
||||
function promptCopyAttrData(event) {
|
||||
|
Loading…
Reference in New Issue
Block a user