NIFI-256:
- Hiding the context menu when opening the shell if possible.

Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/549c97d3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/549c97d3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/549c97d3

Branch: refs/heads/NIFI-250
Commit: 549c97d3f4f69a2f04e877bc7b74095fd4a5b0d3
Parents: 95b22a0
Author: Matt Gilman <[email protected]>
Authored: Tue Jan 13 15:17:58 2015 -0500
Committer: Matt Gilman <[email protected]>
Committed: Tue Jan 13 15:17:58 2015 -0500

----------------------------------------------------------------------
 .../web/nifi-web-ui/src/main/webapp/js/nf/nf-shell.js     | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/549c97d3/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-shell.js
----------------------------------------------------------------------
diff --git 
a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-shell.js
 
b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-shell.js
index b0793a9..85ca0bf 100644
--- 
a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-shell.js
+++ 
b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-shell.js
@@ -53,6 +53,11 @@ nf.Shell = (function () {
          * @argument {boolean} canUndock        Whether or not the shell is 
undockable
          */
         showPage: function (uri, canUndock) {
+            // if the context menu is on this page, attempt to close
+            if (nf.Common.isDefinedAndNotNull(nf.ContextMenu)) {
+                nf.ContextMenu.hide();
+            }
+            
             return $.Deferred(function (deferred) {
                 var shell = $('#shell');
 
@@ -108,6 +113,11 @@ nf.Shell = (function () {
          * @argument {string} domId             The id of the element to show 
in the shell
          */
         showContent: function (domId) {
+            // if the context menu is on this page, attempt to close
+            if (nf.Common.isDefinedAndNotNull(nf.ContextMenu)) {
+                nf.ContextMenu.hide();
+            }
+            
             return $.Deferred(function (deferred) {
                 var content = $(domId);
                 if (content.length) {

Reply via email to