From f59cf388eeb512718b534e956653a768c2326f26 Mon Sep 17 00:00:00 2001 From: coolcat-creations Date: Sat, 14 Oct 2017 13:25:15 +0200 Subject: [PATCH] Fix script and template to show background image again after disabling it --- mod_ccctwoclick/media/js/script.js | 6 +++++- mod_ccctwoclick/tmpl/default.php | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/mod_ccctwoclick/media/js/script.js b/mod_ccctwoclick/media/js/script.js index 60e38db..edba956 100644 --- a/mod_ccctwoclick/media/js/script.js +++ b/mod_ccctwoclick/media/js/script.js @@ -39,7 +39,8 @@ content[0].innerHTML = ""; content[0].appendChild( iframe ); - content[0].style.background = null; + content[0].style.backgroundImage = null; + content[0].style.backgroundRepeat = null; content[0].style.backgroundSize = null; enablebtn[0].style.display = 'none'; @@ -55,6 +56,9 @@ disablebtn[0].style.display = 'none'; enablebtn[0].style.display = 'inline'; contentbefore[0].style.display = 'block'; + content[0].style.backgroundImage = content[0].dataset.background; + content[0].style.backgroundRepeat = 'no-repeat'; + content[0].style.backgroundSize = content[0].dataset.backgroundsize; } ); diff --git a/mod_ccctwoclick/tmpl/default.php b/mod_ccctwoclick/tmpl/default.php index bd990ab..3b24567 100644 --- a/mod_ccctwoclick/tmpl/default.php +++ b/mod_ccctwoclick/tmpl/default.php @@ -21,8 +21,8 @@
+ data-height="" data-background="url()" data-backgroundsize="" + style="width:; height:; background-image:url(); background-repeat:no-repeat; background-size:;">