loading on resize and update elements VC

This commit is contained in:
Daniel Barbero 2020-01-14 15:52:47 +01:00
parent e723c98275
commit 89b43f1aee
5 changed files with 22 additions and 4 deletions

View File

@ -2083,6 +2083,13 @@ function load_modal(settings) {
}
if (flagError === false) {
if (
settings.onsubmitClose != undefined &&
settings.onsubmitClose == 1
) {
$(this).dialog("close");
}
$.ajax({
method: "post",
url: settings.url,

View File

@ -325,13 +325,13 @@ function createVisualConsole(
// Resize the element to its initial Size.
item.resize(e.prevSize.width, e.prevSize.height);
done();
return; // Stop task execution.
}
}
visualConsole.updateElement(data);
item.setMeta({ isUpdating: false });
done();
}
@ -1397,8 +1397,8 @@ function createOrUpdateVisualConsoleItem(
return;
}
$("#modalVCItemForm").dialog("close");
if (item.itemProps.id) {
item.setMeta({ isUpdating: false });
visualConsole.updateElement(data);
} else {
data["receivedAt"] = new Date();
@ -1444,8 +1444,12 @@ function createOrUpdateVisualConsoleItem(
var label = tinyMCE.activeEditor.getContent();
$("#textarea_label").val(label);
}
if (item.itemProps.id) {
item.setMeta({ isUpdating: true });
}
}
},
onsubmitClose: 1,
beforeClose: function() {
tinyMCE.remove("#textarea_label");
tinyMCE.execCommand("mceRemoveControl", true, "textarea_label");

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -305,6 +305,13 @@ export default class VisualConsole {
y: props.y
};
const meta = this.elementsById[itemId].meta;
this.elementsById[itemId].meta = {
...meta,
isUpdating: true
};
relations.forEach(relation => {
if (relation.parentId === itemId) {
// Move the line start.