From ae3fc7f54a1bd437ae990a5795c03697ad363a5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gasparin?= <55391441+andre-gasparin@users.noreply.github.com> Date: Sun, 13 Jun 2021 17:27:52 -0300 Subject: [PATCH] =?UTF-8?q?Corre=C3=A7=C3=A3o=20para=20pacote=20composer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/AutoTutorial.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/AutoTutorial.php b/src/AutoTutorial.php index af30d66..c84f525 100644 --- a/src/AutoTutorial.php +++ b/src/AutoTutorial.php @@ -1,6 +1,9 @@ - - '; - + $this->id = uniqid(); $this->header = "function tutorial".$this->id."(){ const con".$this->id." = new Driver( { animate: false, doneBtnText: 'Concluir', closeBtnText: 'Fechar', nextBtnText: 'Próximo', prevBtnText: 'Anterior'} ); con".$this->id.".defineSteps([ "; } @@ -81,8 +80,12 @@ public function run($debug = false) $js .= ' tutorial'.$this->id.'(); '; $js .= ' });'; - TScript::create($js); + TScript::create(' + $("", { rel: "stylesheet", type: "text/css", href: "vendor/andregasparin/autotutorial/src/driver.min.css" }).appendTo("head"); + $.getScript("vendor/andregasparin/autotutorial/src/driver.min.js", function(){ '.$js.' }); + '); echo ""; + if($debug == true) echo 'JS:
'.$js.'
'; } @@ -102,4 +105,4 @@ public function debug() echo ''; } -} \ No newline at end of file +}