Skip to content

Commit

Permalink
Merge pull request #14 from inetis-ch/dev
Browse files Browse the repository at this point in the history
Fix script duplication when using RainLab.Pages >= 1.3.5
  • Loading branch information
Fl0Cri authored Sep 8, 2020
2 parents 35ed390 + 95c01b7 commit d881195
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ public function boot()

RichEditor::extend(function($widget) {
// Adds default CSS/JS for snippets from Rainlab Pages Plugin
$widget->addCss('/plugins/rainlab/pages/assets/css/pages.css');
$widget->addJs('/plugins/rainlab/pages/assets/js/pages-page.js');
$widget->addJs('/plugins/rainlab/pages/assets/js/pages-snippets.js');
$widget->addCss('/plugins/rainlab/pages/assets/css/pages.css', 'RainLab.Pages');
$widget->addJs('/plugins/rainlab/pages/assets/js/pages-page.js', 'RainLab.Pages');
$widget->addJs('/plugins/rainlab/pages/assets/js/pages-snippets.js', 'RainLab.Pages');

// Adds custom javascript
$widget->addJs('/inetis/snippets/list');
$widget->addJs('/plugins/inetis/richeditorsnippets/assets/js/froala.snippets.plugin.js');
$widget->addJs('/plugins/inetis/richeditorsnippets/assets/js/froala.snippets.plugin.js', 'Inetis.RicheditorSnippets');
});

// Register components from cache for AJAX handlers
Expand Down
3 changes: 3 additions & 0 deletions updates/version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@
- Handlers cache is no more shared between users
2.1.3:
- Fix broken error message when a snippet is not found - Thanks to Tobias Kündig
2.1.4:
- Fix duplicate stuff on RainLab.Pages (open page twice, add snippet twice, etc.)
- '!!! This update fixes a compatibility issue with RainLab.Pages >= v1.3.5. You should make sure you are using the latest version of RainLab.Pages'

0 comments on commit d881195

Please sign in to comment.