diff --git a/composer.json b/composer.json index c6e0db3..303e84d 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "matejch/yii2-page-guide", "description": "Ability to add guide to pages for user orientation", "type": "yii2-extension", - "version": "1.2.1", + "version": "1.3.0", "keywords": ["yii2","extension","guide"], "license": "MIT", "authors": [ @@ -13,8 +13,7 @@ ], "require": { "php": ">=7.2.0", - "yiisoft/yii2": "~2.0.42", - "bower-asset/intro.js": "^2.9" + "yiisoft/yii2": "~2.0.42" }, "repositories": [ { @@ -31,5 +30,10 @@ "psr-4": { "matejch\\pageGuide\\tests\\": "tests/" } + }, + "config": { + "allow-plugins": { + "yiisoft/yii2-composer": true + } } } diff --git a/composer.lock b/composer.lock index c1555ca..ea93b47 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "afa6df6d62a33e19ab9c824eb65fd244", + "content-hash": "76db5ced5d41b04da589cd5075db3b6c", "packages": [ { "name": "bower-asset/inputmask", @@ -27,27 +27,12 @@ "http://opensource.org/licenses/mit-license.php" ] }, - { - "name": "bower-asset/intro.js", - "version": "v2.9.3", - "source": { - "type": "git", - "url": "git@github.com:usablica/intro.js.git", - "reference": "b46bbcd8af46be2ae3b43aba850334b12ff03cdb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/usablica/intro.js/zipball/b46bbcd8af46be2ae3b43aba850334b12ff03cdb", - "reference": "b46bbcd8af46be2ae3b43aba850334b12ff03cdb" - }, - "type": "bower-asset" - }, { "name": "bower-asset/jquery", "version": "3.6.0", "source": { "type": "git", - "url": "git@github.com:jquery/jquery-dist.git", + "url": "https://github.com/jquery/jquery-dist.git", "reference": "e786e3d9707ffd9b0dd330ca135b66344dcef85a" }, "dist": { @@ -470,5 +455,5 @@ "php": ">=7.2.0" }, "platform-dev": [], - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.2.0" } diff --git a/package.json b/package.json index 89c7c5e..7938920 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yii2-page-guide", - "version": "1.2.1", + "version": "1.3.0", "description": "Page guide extension\r ====================\r Ability to add guide to pages for user orientation", "main": "", "scripts": { diff --git a/readme/Create page guide.png b/readme/Create page guide.png index 4092a6e..987f438 100644 Binary files a/readme/Create page guide.png and b/readme/Create page guide.png differ diff --git a/src/assets/IntrojsAsset.php b/src/assets/IntrojsAsset.php index 654f838..e9fdd3a 100644 --- a/src/assets/IntrojsAsset.php +++ b/src/assets/IntrojsAsset.php @@ -6,13 +6,15 @@ class IntrojsAsset extends AssetBundle { - public $sourcePath = '@vendor/bower-asset/intro.js/minified/'; - public $css = [ - 'introjs.min.css', + 'https://cdn.jsdelivr.net/npm/intro.js@5.1.0/introjs.css', ]; public $js = [ - 'intro.min.js', + 'https://cdn.jsdelivr.net/npm/intro.js@5.1.0/intro.min.js', + ]; + + public $jsOptions = [ + 'defer' => 'defer', ]; } \ No newline at end of file diff --git a/src/messages/cs/view.php b/src/messages/cs/view.php index 2df5912..7f4344d 100644 --- a/src/messages/cs/view.php +++ b/src/messages/cs/view.php @@ -14,6 +14,7 @@ 'step' => 'Krok', 'element' => 'Element na který napojit návod', 'element_help' => 'Nápověda k elementu', + 'element_title' => 'Titulek nápovedy', 'help_4' => 'Přesuňte požadovaný element sem', 'rule_element' => 'Element', 'intro' => 'Obsah', diff --git a/src/messages/en/view.php b/src/messages/en/view.php index 6dab3dd..94b8f5f 100644 --- a/src/messages/en/view.php +++ b/src/messages/en/view.php @@ -13,6 +13,7 @@ 'help_3' => 'Every page you want to use for creating page guides must have widget PageAssist on it from widget directory', 'step' => 'Step', 'element' => 'Element for linking information', + 'element_title' => 'Assistance title', 'element_help' => 'Assistance for element', 'help_4' => 'Moved element from other window here', 'rule_element' => 'Element', diff --git a/src/messages/it/view.php b/src/messages/it/view.php index 26de316..4d7138a 100644 --- a/src/messages/it/view.php +++ b/src/messages/it/view.php @@ -14,6 +14,7 @@ 'step' => 'Passo', 'element' => 'Elemento per collegare le informazioni', 'element_help' => 'Assistenza per l\'elemento', + 'element_title' => 'Assistance title', 'help_4' => 'Muovere l\'elemento dall\'altra finestra qui', 'rule_element' => 'Elemento', 'intro' => 'Contenuto', diff --git a/src/messages/sk/view.php b/src/messages/sk/view.php index e7b5921..447bd51 100644 --- a/src/messages/sk/view.php +++ b/src/messages/sk/view.php @@ -13,6 +13,7 @@ 'help_3' => 'Na stránkach ktorých chcete vytvoriť pomocníka musí mať widget PageAssist z adresára widget', 'step' => 'Krok', 'element' => 'Element na ktorý napojiť návod', + 'element_title' => 'Titulok nápovedy', 'element_help' => 'Nápoveda k elementu', 'help_4' => 'Presuňte požadovaný element sem', 'rule_element' => 'Element', diff --git a/src/views/page-guide/partials/_rule.php b/src/views/page-guide/partials/_rule.php index a424b6c..151c48d 100644 --- a/src/views/page-guide/partials/_rule.php +++ b/src/views/page-guide/partials/_rule.php @@ -25,6 +25,12 @@ 'top' => Yii::t('pageGuide/view','top') ], ['class' => 'form-control js-position']) ?> + +