Add IDs to task cards in the canvas edit mode [SCI-7523] (#4666)

This commit is contained in:
ajugo 2022-12-02 11:40:57 +01:00 committed by GitHub
parent efa05ca390
commit 7525ffeede
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 1 deletions

View file

@ -1127,7 +1127,7 @@ function updateModuleHtml(module, id, name, gridDistX, gridDistY) {
module.find(".panel-title").html(name);
module.find(".ep").html($("#drag-connections-placeholder").text().trim());
module.find(".ep").html($("#drag-connections-placeholder").html());
// Add dropdown
var dropdown = document.createElement("div");

View file

@ -192,12 +192,24 @@ path, ._jsPlumb_endpoint {
left: 0;
}
}
.panel-body {
height: 90px;
}
.ep {
font-style: italic;
.task-card-code {
color: $color-volcano;
font-style: normal;
font-weight: 400;
margin-bottom: 4px;
.new-my-module-canvas {
color: $color-silver-chalice;
}
}
}
.dropdown {

View file

@ -67,6 +67,9 @@
<%=t "experiments.canvas.edit.delete_module_group" %>
</span>
<span style="display: none;" id="drag-connections-placeholder">
<div class="task-card-code">
<%=t "experiments.canvas.edit.id" %> <span class="new-my-module-canvas"><%=t "experiments.canvas.edit.no_module_id" %></span>
</div>
<%=t "experiments.canvas.edit.drag_connections" %>
</span>
</div>

View file

@ -21,6 +21,9 @@
</div>
<div class="panel-body ep">
<div class="task-card-code">
<%=t "experiments.canvas.edit.id" %> <%= my_module.code %>
</div>
<%= t('experiments.canvas.edit.drag_connections') %>
</div>

View file

@ -1316,6 +1316,7 @@ en:
create: "Add"
create_new: "New"
edit:
id: "ID:"
new_module: "New task"
new_module_hover: "Drag me onto canvas"
save: "Save workflow"
@ -1323,6 +1324,7 @@ en:
cancel: "Cancel"
unsaved_work: "Are you sure you want to leave this page? All unsaved data will be lost."
drag_connections: "Drag connection/s from here"
no_module_id: "to be assigned after saving"
options_header: "Options"
edit_module: "Rename task"
task_access: "Task access"