You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by sc...@apache.org on 2018/06/07 22:27:31 UTC
nifi git commit: NIFI-3217: - Disabling the resize of SlickGrid when
there is an active edit occuring. This will prevent the accidental closure of
the current edit. - Triggering a resize when the active editor closes.
Repository: nifi
Updated Branches:
refs/heads/master f5364875e -> 7b9d779a4
NIFI-3217:
- Disabling the resize of SlickGrid when there is an active edit occuring. This will prevent the accidental closure of the current edit.
- Triggering a resize when the active editor closes.
This cloese #2766
Signed-off-by: Scott Aslan <sc...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/7b9d779a
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/7b9d779a
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/7b9d779a
Branch: refs/heads/master
Commit: 7b9d779a4bf6b36d44802909bcba539b1739d716
Parents: f536487
Author: Matt Gilman <ma...@gmail.com>
Authored: Wed Jun 6 11:40:07 2018 -0400
Committer: Scott Aslan <sc...@gmail.com>
Committed: Thu Jun 7 18:26:13 2018 -0400
----------------------------------------------------------------------
.../src/main/webapp/css/slick-nifi-theme.css | 4 +++
.../propertytable/jquery.propertytable.js | 8 +++++
.../src/main/webapp/js/nf/canvas/nf-canvas.js | 10 ++++--
.../webapp/js/nf/canvas/nf-variable-registry.js | 5 +++
.../src/main/webapp/js/application.js | 33 ++++++++++++++++++--
5 files changed, 55 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/nifi/blob/7b9d779a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/slick-nifi-theme.css
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/slick-nifi-theme.css b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/slick-nifi-theme.css
index bc77b6d..45c44a3 100755
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/slick-nifi-theme.css
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/slick-nifi-theme.css
@@ -91,6 +91,10 @@
text-align: center;
}
+.slick-header.ui-state-default {
+ background-color: #728E9B;
+}
+
.slick-header.ui-state-default, .slick-headerrow.ui-state-default {
font-family: Roboto;
font-weight: 500;
http://git-wip-us.apache.org/repos/asf/nifi/blob/7b9d779a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
index 56551f7..ea333a9 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
@@ -1492,6 +1492,14 @@
}
});
+ if (options.readOnly !== true) {
+ propertyGrid.onBeforeCellEditorDestroy.subscribe(function (e, args) {
+ setTimeout(function() {
+ propertyGrid.resizeCanvas();
+ }, 50);
+ });
+ }
+
// wire up the dataview to the grid
propertyData.onRowCountChanged.subscribe(function (e, args) {
propertyGrid.updateRowCount();
http://git-wip-us.apache.org/repos/asf/nifi/blob/7b9d779a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
index bd2906d..28c8a40 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
@@ -667,9 +667,13 @@
// resize grids when appropriate
var gridElements = $('*[class*="slickgrid_"]');
for (var j = 0, len = gridElements.length; j < len; j++) {
- if ($(gridElements[j]).is(':visible')){
- setTimeout(function(gridElement){
- gridElement.data('gridInstance').resizeCanvas();
+ if ($(gridElements[j]).is(':visible')) {
+ setTimeout(function(gridElement) {
+ var grid = gridElement.data('gridInstance');
+ var editorLock = grid.getEditorLock();
+ if (!editorLock.isActive()) {
+ grid.resizeCanvas();
+ }
}, 50, $(gridElements[j]));
}
}
http://git-wip-us.apache.org/repos/asf/nifi/blob/7b9d779a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-variable-registry.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-variable-registry.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-variable-registry.js
index d8057d9..fa31b5b 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-variable-registry.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-variable-registry.js
@@ -585,6 +585,11 @@
}
}
});
+ variablesGrid.onBeforeCellEditorDestroy.subscribe(function (e, args) {
+ setTimeout(function() {
+ variablesGrid.resizeCanvas();
+ }, 50);
+ });
// wire up the dataview to the grid
variableData.onRowCountChanged.subscribe(function (e, args) {
http://git-wip-us.apache.org/repos/asf/nifi/blob/7b9d779a/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/src/main/webapp/js/application.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/src/main/webapp/js/application.js b/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/src/main/webapp/js/application.js
index 502c033..755ae81 100644
--- a/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/src/main/webapp/js/application.js
+++ b/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/src/main/webapp/js/application.js
@@ -68,8 +68,15 @@ var ua = {
// enable grid resizing
$(window).resize(function (e) {
if (e.target === window) {
- conditionsGrid.resizeCanvas();
- actionsGrid.resizeCanvas();
+ var conditionsLock = conditionsGrid.getEditorLock();
+ if (!conditionsLock.isActive()) {
+ conditionsGrid.resizeCanvas();
+ }
+
+ var actionsLock = actionsGrid.getEditorLock();
+ if (!actionsLock.isActive()) {
+ actionsGrid.resizeCanvas();
+ }
// toggle .scrollable when appropriate
toggleScrollable($('#rule-details-panel').get(0));
@@ -766,6 +773,17 @@ var ua = {
e.stopImmediatePropagation();
});
+ if (ua.editable) {
+ conditionsGrid.onBeforeCellEditorDestroy.subscribe(function (e, args) {
+ setTimeout(function() {
+ conditionsGrid.resizeCanvas();
+
+ var actionsGrid = $('#selected-rule-actions').data('gridInstance');
+ actionsGrid.resizeCanvas();
+ }, 50);
+ });
+ }
+
// wire up the dataview to the grid
conditionsData.onRowCountChanged.subscribe(function (e, args) {
conditionsGrid.updateRowCount();
@@ -844,6 +862,17 @@ var ua = {
e.stopImmediatePropagation();
});
+ if (ua.editable) {
+ actionsGrid.onBeforeCellEditorDestroy.subscribe(function (e, args) {
+ setTimeout(function() {
+ actionsGrid.resizeCanvas();
+
+ var conditionsGrid = $('#selected-rule-conditions').data('gridInstance');
+ conditionsGrid.resizeCanvas();
+ }, 50);
+ });
+ }
+
// wire up the dataview to the grid
actionsData.onRowCountChanged.subscribe(function (e, args) {
actionsGrid.updateRowCount();