You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by dk...@apache.org on 2018/12/15 03:00:13 UTC

[sling-org-apache-sling-app-cms] branch master updated: Fixed issue where the actions were not resetting

This is an automated email from the ASF dual-hosted git repository.

dklco pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git


The following commit(s) were added to refs/heads/master by this push:
     new a112434  Fixed issue where the actions were not resetting
     new 20e8cb5  Merge branch 'master' of git@github.com:apache/sling-org-apache-sling-app-cms.git
a112434 is described below

commit a1124340b825d22d0c718f5d0bea15cf820a70c5
Author: Dan Klco <dk...@apache.org>
AuthorDate: Thu Dec 6 23:24:41 2018 -0500

    Fixed issue where the actions were not resetting
---
 ui/src/main/frontend/src/js/cms.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/ui/src/main/frontend/src/js/cms.js b/ui/src/main/frontend/src/js/cms.js
index 6f2e1f7..49c2721 100644
--- a/ui/src/main/frontend/src/js/cms.js
+++ b/ui/src/main/frontend/src/js/cms.js
@@ -85,10 +85,10 @@ Sling.CMS = {
             return modal;
         },
         reloadContext: function(){
-            //close all existing modals
-            document.querySelectorAll('.modal').forEach(function(modal){
-                modal.remove();
-            });
+            // close all existing modals
+            document.querySelectorAll('.modal').forEach(modal => modal.remove());
+            // reset the actions
+            document.querySelectorAll('.actions-target *').forEach(child => child.remove());
             var containers = document.querySelectorAll('.reload-container');
             var modal = Sling.CMS.ui.loaderModal('Refreshing...');
             var count = containers.length;