From 7614201d851ae3bd63ba4ed296ec22898928c601 Mon Sep 17 00:00:00 2001 From: Simon Grim Date: Wed, 3 Feb 2016 12:02:47 +0500 Subject: [PATCH] attach templates to twister.tmpl.root instead twister.html.detached --- js/interface_common.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/interface_common.js b/js/interface_common.js index 28f135e..52ff3e5 100644 --- a/js/interface_common.js +++ b/js/interface_common.js @@ -10,7 +10,9 @@ var twister = { detached: $('
'), // here elements go to detach themself blanka: $('') // to open stuff in new tab, see routeOnClick() }, - tmpl: {}, // templates should be detached and stored here + tmpl: { // templates pointers are stored here + root: $('
') // 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) {