mirror of https://github.com/apache/nifi.git
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 <scottyaslan@gmail.com>
This commit is contained in:
parent
f5364875e8
commit
7b9d779a4b
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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]));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue