Repository: incubator-nifi Updated Branches: refs/heads/NIFI-250 b8b9f2c25 -> f71588065
NIFI-250: - Reordering the invocation of the modal close handler and the hiding of the dialog. - Separating loading from showing the settings so the actions can be performed independently. This allows the transition back to the controller service/reporting task table more smooth when viewing usage or a custom UI. Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/f7158806 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/f7158806 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/f7158806 Branch: refs/heads/NIFI-250 Commit: f71588065d788de4d3957593d88473c6bc13c2a1 Parents: b8b9f2c Author: Matt Gilman <[email protected]> Authored: Wed Mar 25 11:07:13 2015 -0400 Committer: Matt Gilman <[email protected]> Committed: Wed Mar 25 11:07:13 2015 -0400 ---------------------------------------------------------------------- .../src/main/webapp/js/jquery/modal/jquery.modal.js | 7 ++++--- .../main/webapp/js/nf/canvas/nf-canvas-header.js | 4 ++-- .../src/main/webapp/js/nf/canvas/nf-settings.js | 16 ++++++++++------ 3 files changed, 16 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/f7158806/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/modal/jquery.modal.js ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/modal/jquery.modal.js b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/modal/jquery.modal.js index 2f9d166..9faaefd 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/modal/jquery.modal.js +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/modal/jquery.modal.js @@ -226,13 +226,14 @@ $('#faded-background').hide(); } + // hide the dialog + dialog.hide(); + + // invoke the handler var handler = dialog.data('handler'); if (isDefinedAndNotNull(handler) && typeof handler.close === 'function') { handler.close.call(dialog); } - - // hide the dialog - dialog.hide(); } }); } http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/f7158806/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-header.js ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-header.js b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-header.js index 21d611d..ff5d2f2 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-header.js +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-header.js @@ -62,8 +62,8 @@ nf.CanvasHeader = (function () { // mouse over for the flow settings link nf.Common.addHoverEffect('#flow-settings-link', 'flow-settings-link', 'flow-settings-link-hover').click(function () { - nf.Settings.showSettings().done(function () { - nf.Settings.resetTableSize(); + nf.Settings.loadSettings().done(function () { + nf.Settings.showSettings(); }); }); http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/f7158806/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js index b14b38a..ab1e65d 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js @@ -1658,6 +1658,7 @@ nf.Settings = (function () { initControllerServices(); initReportingTasks(); }, + /** * Update the size of the grid based on its container's current size. */ @@ -1672,18 +1673,21 @@ nf.Settings = (function () { reportingTasksGrid.resizeCanvas(); } }, + /** * Shows the settings dialog. */ showSettings: function () { - return nf.Settings.loadSettings().done(function () { - // show the settings dialog - nf.Shell.showContent('#settings').done(function () { - // reset button state - $('#settings-save').mouseout(); - }); + // show the settings dialog + nf.Shell.showContent('#settings').done(function () { + // reset button state + $('#settings-save').mouseout(); }); + + // adjust the table size + nf.Settings.resetTableSize(); }, + /** * Loads the settings. */
