Created
October 16, 2015 15:38
-
-
Save junaidpv/467aec7b10d4fe589256 to your computer and use it in GitHub Desktop.
Patch for quickmodule to reload the app when toolbar is closed (not by saving). It is showing non-rendered media tags when toolbar is directly closed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/js/views/AppView.js b/js/views/AppView.js | |
| index b477e7d..f8b4ab8 100644 | |
| --- a/js/views/AppView.js | |
| +++ b/js/views/AppView.js | |
| @@ -18,6 +18,9 @@ | |
| var reload = false; | |
| Drupal.quickedit.AppView = Backbone.View.extend({ | |
| + setReload: function (value) { | |
| + reload = value; | |
| + }, | |
| /** | |
| * {@inheritdoc} | |
| diff --git a/js/views/EntityToolbarView.js b/js/views/EntityToolbarView.js | |
| index 25607e4..2b06318 100644 | |
| --- a/js/views/EntityToolbarView.js | |
| +++ b/js/views/EntityToolbarView.js | |
| @@ -339,6 +339,11 @@ | |
| onClickCancel: function (event) { | |
| event.preventDefault(); | |
| this.model.set('state', 'deactivating'); | |
| + // Always reload the app when toolbar is closed. | |
| + // TODO: Dirty hack, need to improve. | |
| + this.model.set('reload', true); | |
| + Drupal.quickedit.app.setReload(true); | |
| + this.model.set('reload', true); | |
| }, | |
| /** |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment