From 9c08118f5718d21320c35e63144cd4eb0de78a9e Mon Sep 17 00:00:00 2001 From: Matt Gilman Date: Wed, 17 Dec 2014 09:11:25 -0500 Subject: [PATCH] NIFI-85: - Using draggable on all dialogs that are applicable at the moment. --- .../framework/web/nifi-web-ui/src/main/webapp/css/main.css | 4 ++++ .../webapp/js/nf/canvas/nf-connection-configuration.js | 3 +++ .../src/main/webapp/js/nf/canvas/nf-port-configuration.js | 3 +++ .../src/main/webapp/js/nf/canvas/nf-port-details.js | 3 +++ .../webapp/js/nf/canvas/nf-process-group-configuration.js | 3 +++ .../main/webapp/js/nf/canvas/nf-process-group-details.js | 3 +++ .../main/webapp/js/nf/canvas/nf-processor-configuration.js | 3 ++- .../js/nf/canvas/nf-remote-process-group-configuration.js | 3 +++ .../webapp/js/nf/canvas/nf-remote-process-group-details.js | 3 +++ .../webapp/js/nf/canvas/nf-remote-process-group-ports.js | 3 +++ .../webapp/js/nf/canvas/nf-secure-port-configuration.js | 3 +++ .../src/main/webapp/js/nf/canvas/nf-secure-port-details.js | 3 +++ .../src/main/webapp/js/nf/nf-connection-details.js | 7 +++++++ .../src/main/webapp/js/nf/nf-processor-details.js | 7 +++++++ 14 files changed, 50 insertions(+), 1 deletion(-) diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/css/main.css b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/css/main.css index 2b93141476..862db6e249 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/css/main.css +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/css/main.css @@ -170,6 +170,10 @@ div.button-refresh-hover { background: transparent url(../images/buttonRefresh.png) no-repeat scroll top right; } +.ui-draggable .dialog-header { + cursor: move; +} + /* processor status styles */ div.disabled { diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js index a8e4accbfb..ef387d66b2 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js @@ -1108,6 +1108,9 @@ nf.ConnectionConfiguration = (function () { resetDialog(); } } + }).draggable({ + containment: 'parent', + handle: '.dialog-header' }); // initialize the properties tabs diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-configuration.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-configuration.js index 189f19f677..49d2b01f71 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-configuration.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-configuration.js @@ -121,6 +121,9 @@ nf.PortConfiguration = (function () { $('#port-comments').val(''); } } + }).draggable({ + containment: 'parent', + handle: '.dialog-header' }); }; diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-details.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-details.js index 6b4bd8f021..a2cba4494b 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-details.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-details.js @@ -39,6 +39,9 @@ nf.PortDetails = (function () { nf.Common.clearField('read-only-port-comments'); } } + }).draggable({ + containment: 'parent', + handle: '.dialog-header' }); }, diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-configuration.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-configuration.js index de7a2d8a4a..3603976f53 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-configuration.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-configuration.js @@ -78,6 +78,9 @@ nf.ProcessGroupConfiguration = (function () { $('#process-group-comments').val(''); } } + }).draggable({ + containment: 'parent', + handle: '.dialog-header' }); }, diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-details.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-details.js index 7c6baddc81..2f88c12c10 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-details.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-details.js @@ -38,6 +38,9 @@ nf.ProcessGroupDetails = (function () { nf.Common.clearField('read-only-process-group-comments'); } } + }).draggable({ + containment: 'parent', + handle: '.dialog-header' }); }, diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js index e755de23c7..31bd79eb46 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js @@ -427,7 +427,8 @@ nf.ProcessorConfiguration = (function () { } } }).draggable({ - handle: ".modal-header" + containment: 'parent', + handle: '.dialog-header' }); // initialize the bulletin combo diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-configuration.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-configuration.js index 8920bdd7ef..8e0ea8e0d6 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-configuration.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-configuration.js @@ -91,6 +91,9 @@ nf.RemoteProcessGroupConfiguration = (function () { $('#remote-process-group-yield-duration').val(''); } } + }).draggable({ + containment: 'parent', + handle: '.dialog-header' }); }, diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-details.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-details.js index 296652b06c..c75c244a09 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-details.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-details.js @@ -37,6 +37,9 @@ nf.RemoteProcessGroupDetails = (function () { $('#read-only-remote-process-group-yield-duration').val(''); } } + }).draggable({ + containment: 'parent', + handle: '.dialog-header' }); }, diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-ports.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-ports.js index 3d68fe56cd..7cce907ab5 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-ports.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-ports.js @@ -167,6 +167,9 @@ nf.RemoteProcessGroupPorts = (function () { $('#remote-process-group-output-ports-container').empty(); } } + }).draggable({ + containment: 'parent', + handle: '.dialog-header' }); }; diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-configuration.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-configuration.js index 54e2bb2cd4..7c119c8b66 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-configuration.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-configuration.js @@ -128,6 +128,9 @@ nf.SecurePortConfiguration = (function () { $('#allowed-groups').empty(); } } + }).draggable({ + containment: 'parent', + handle: '.dialog-header' }); // listen for removal requests diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-details.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-details.js index 9b66b09d2c..fec4229d7d 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-details.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-details.js @@ -83,6 +83,9 @@ nf.SecurePortDetails = (function () { $('#read-only-allowed-groups').empty(); } } + }).draggable({ + containment: 'parent', + handle: '.dialog-header' }); }, diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-connection-details.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-connection-details.js index 4ba2a1d008..ca3304f096 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-connection-details.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-connection-details.js @@ -345,6 +345,13 @@ nf.ConnectionDetails = (function () { } } }); + + if (overlayBackground) { + $('#connection-details').draggable({ + containment: 'parent', + handle: '.dialog-header' + }); + } }, /** diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-processor-details.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-processor-details.js index 480a380b9f..da7c6e95a3 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-processor-details.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-processor-details.js @@ -249,6 +249,13 @@ nf.ProcessorDetails = (function () { } } }); + + if (overlayBackground) { + $('#processor-details').draggable({ + containment: 'parent', + handle: '.dialog-header' + }); + } // function for formatting the property name var nameFormatter = function (row, cell, value, columnDef, dataContext) {