From 22f72c3d2ed66251c1b3f020a1407463201b18c0 Mon Sep 17 00:00:00 2001 From: Scott Aslan Date: Thu, 7 Jul 2016 11:46:22 -0400 Subject: [PATCH] [NIFI-2189] Update open/close handlers for dialogs [NIFI-2190] About Dialog fixed text overlayed on image [NIFI-2187] Update iconResize.png [NIFI-2166] When adding Processor to canvas, previously selected tags is no longer selected This closes #615 --- .../nifi-web-ui/src/main/webapp/css/about.css | 8 +--- .../src/main/webapp/images/iconResize.png | Bin 142 -> 117 bytes .../webapp/js/jquery/modal/jquery.modal.js | 35 +++++++++++++++++- .../js/jquery/tagcloud/jquery.tagcloud.js | 2 +- .../nf-ng-canvas-global-menu-controller.js | 9 +++++ .../components/nf-ng-processor-component.js | 12 +++--- .../src/main/webapp/js/nf/nf-shell.js | 24 ++++++------ 7 files changed, 62 insertions(+), 28 deletions(-) mode change 100755 => 100644 nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/images/iconResize.png diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/about.css b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/about.css index 95485da2c7..9556b28ecf 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/about.css +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/about.css @@ -16,8 +16,8 @@ */ #nf-about { overflow: hidden; - width: 450px; - height: 450px; + width: 500px; + height: 500px; max-height: 450px; } @@ -33,10 +33,6 @@ background: #000000; } -#nf-about-content { - margin: 10px 0px 0px 0px; -} - #nf-version { font-weight:500; font-size: 13px; diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/images/iconResize.png b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/images/iconResize.png old mode 100755 new mode 100644 index 795337ef5836f692fcf77970ea37b77774a761b3..9d27563ba19f5e37262d3ed440fd22b6a3f766bf GIT binary patch delta 87 zcmV-d0I2_t0d*c4!m;f2bpXysAN0v;{YgkigvNA^ojrg002ovPDHLkV1kLTC7S>M delta 112 zcmXTzW1OIpC0XJcQ4*Y=R#Ki=l*-_klAn~S;F+74o*I;zm{M7IGS!BGfx*Dj#WAGf zR??sU|LvJo8#)`E436;J*q(pCUSQcOZVC2sodv%uRazJo?fEYoFmM').text(tag); - var removeTagIcon = $('
').click(function () { + var removeTagIcon = $('
').click(function () { // remove this tag $(this).closest('li').remove(); diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-global-menu-controller.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-global-menu-controller.js index 2309020fd8..f0865183a8 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-global-menu-controller.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-global-menu-controller.js @@ -289,9 +289,18 @@ nf.ng.Canvas.GlobalMenuCtrl = function (serviceProvider) { init: function () { var self = this; + var resizeAbout = function(){ + var dialog = $(this); + var top = $('#nf-about-pic-container').height() + $('.dialog-header').height() + 10; //10 for padding-top + dialog.find('.dialog-content').css('top', top); + }; + this.getElement().modal({ scrollableContentStyle: 'scrollable', headerText: 'About Apache NiFi', + handler: { + resize: resizeAbout + }, buttons: [{ buttonText: 'Ok', color: { diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-processor-component.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-processor-component.js index a32bef9932..30f644ef5d 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-processor-component.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-processor-component.js @@ -566,14 +566,12 @@ nf.ng.ProcessorComponent = function (serviceProvider) { }]); // set a new handler for closing the the dialog - this.modal.update('setCloseHandler', { - close: function () { - // remove the handler - grid.onDblClick.unsubscribe(gridDoubleClick); + this.modal.update('setCloseHandler', function () { + // remove the handler + grid.onDblClick.unsubscribe(gridDoubleClick); - // clear the current filters - resetProcessorDialog(); - } + // clear the current filters + resetProcessorDialog(); }); // show the dialog diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-shell.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-shell.js index c2ecc49f52..5d3890b8b5 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-shell.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-shell.js @@ -94,13 +94,13 @@ nf.Shell = (function () { shell.empty(); // register a new close handler - $('#shell-dialog').modal('setCloseHandler', { - close: function () { - deferred.resolve(); - }, - open: function () { - nf.Common.toggleScrollable($('#' + this.find('.tab-container').attr('id') + '-content').get(0)); - } + $('#shell-dialog').modal('setCloseHandler', function () { + deferred.resolve(); + }); + + // register a new open handler + $('#shell-dialog').modal('setOpenHandler', function () { + nf.Common.toggleScrollable($('#' + this.find('.tab-container').attr('id') + '-content').get(0)); }); // show the custom processor ui @@ -150,13 +150,11 @@ nf.Shell = (function () { content.detach(); // register a new close handler - $('#shell-dialog').modal('setCloseHandler', { - close: function () { - deferred.resolve(); + $('#shell-dialog').modal('setCloseHandler', function () { + deferred.resolve(); - // detach the content and add it back to the parent - content.hide().detach().appendTo(parent); - } + // detach the content and add it back to the parent + content.hide().detach().appendTo(parent); }); // hide the undock button