]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
webui: Render upcoming recording duplicates with a line-through in grid. (#4632)
authorE.Smith <31170571+azlm8t@users.noreply.github.com>
Tue, 26 Sep 2017 13:56:55 +0000 (14:56 +0100)
committerJaroslav Kysela <perex@perex.cz>
Thu, 28 Sep 2017 16:59:56 +0000 (18:59 +0200)
The advanced and expert views on the upcoming tab have a column for the
duplicate date. But on the basic view there is no indication of
duplicates unless you click information on the entry.

So we now render duplicates with a line-through. This makes it clear
they are duplicates that will not be recorded.

Issue: #4632

src/webui/static/app/dvr.js
src/webui/static/app/ext.css

index f6e7881a8b0d66293a627e12878e80a9c0958e28..c9838e52161ce45dfc826ffd48d84e81870434f7 100644 (file)
@@ -195,6 +195,21 @@ tvheadend.filesizeRenderer = function(st) {
     }
 }
 
+/** Render an entry differently if it is a duplicate */
+tvheadend.displayWithDuplicateRenderer = function(value, meta, record) {
+    return function() {
+        return function(value, meta, record) {
+            if (value == null)
+                return '';
+            var is_dup = record.data['duplicate'];
+            if (is_dup)
+                return "<span class='x-epg-duplicate'>" + value + "</span>";
+            else
+                return value;
+        }
+    }
+}
+
 /**
  *
  */
@@ -305,6 +320,12 @@ tvheadend.dvr_upcoming = function(panel, index) {
               'start_real,stop_real,duration,pri,filesize,' +
               'sched_status,errors,data_errors,config_name,owner,creator,comment',
         columns: {
+            disp_title: {
+              renderer: tvheadend.displayWithDuplicateRenderer()
+            },
+            disp_subtitle: {
+              renderer: tvheadend.displayWithDuplicateRenderer()
+            },
             filesize: {
                 renderer: tvheadend.filesizeRenderer()
             }
index 56eee796886cdf9c978012593daceb6640f29c6a..15ed817b3fd6e5e254497cd553357f69b41d25da 100644 (file)
     margin-left: 5px;
 }
 
+.x-epg-duplicate {
+    text-decoration: line-through;
+}
+
 .tv-video-player {
     margin-right: auto;
     margin-left : auto;