From 65a959c37ee12e7fa84b3692f98e052ceec0fe57 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Mon, 3 Sep 2018 06:19:40 +0200 Subject: [PATCH] [enh] modify index on a deleted job --- static/css/style.css | 5 +++++ templates/index.html | 12 ++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/static/css/style.css b/static/css/style.css index f7a93e7..184b46d 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -7,3 +7,8 @@ padding-bottom: 1.25rem; padding-left: 1.5rem; } + +.deleted { + font-style: italic; + color: darkgrey; +} \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index 5213203..d3edcf5 100644 --- a/templates/index.html +++ b/templates/index.html @@ -15,8 +15,8 @@ Started time End time - - {{job.name}} + + {{job.name}}{{job.name}} (deleted) {{job.state}} {{job.target_revision}} {{job.yunohost_version}} @@ -63,6 +63,14 @@ } } else if (action == "new_job") { app.jobs.splice(0, 0, data); + } else if (action == "delete_job") { + for (var i = 0; i < app.jobs.length; ++i) { + if (app.jobs[i].id == data.id) { + Vue.set(app.jobs[i], 'deleted', true); + Vue.set(app.jobs[i], 'state', 'deleted'); + break; + } + } } }; })()