From d4df903f82c78d0d8bc52d10a556d82d90bc7bc7 Mon Sep 17 00:00:00 2001 From: j Date: Thu, 27 Jul 2023 15:06:43 +0200 Subject: [PATCH] add multi value add/remove to items --- static/js/infoView.js | 5 +++-- static/js/infoView.padma.js | 10 +++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/static/js/infoView.js b/static/js/infoView.js index 2307e1092..b74c6e012 100644 --- a/static/js/infoView.js +++ b/static/js/infoView.js @@ -516,12 +516,12 @@ pandora.ui.infoView = function(data, isMixed) { } $('').html(formatKey(key)).appendTo($element); Ox.EditableContent({ - editable: canEdit, clickLink: pandora.clickLink, + editable: canEdit, format: function(value) { return formatValue(key, value); }, - placeholder: formatLight(Ox._( isMixed[key] ? 'mixed' : 'unknown')), + placeholder: formatLight(Ox._(isMixed[key] ? 'mixed' : 'unknown')), tooltip: canEdit ? pandora.getEditTooltip() : '', value: getValue(key, data[key]) }) @@ -542,6 +542,7 @@ pandora.ui.infoView = function(data, isMixed) { }); $element.appendTo($text); } + return $element; } function renderRemainingKeys() { diff --git a/static/js/infoView.padma.js b/static/js/infoView.padma.js index 5f90f139f..824849bee 100644 --- a/static/js/infoView.padma.js +++ b/static/js/infoView.padma.js @@ -655,8 +655,8 @@ pandora.ui.infoView = function(data, isMixed) { } $('').html(formatKey(key)).appendTo($element); Ox.EditableContent({ - editable: canEdit, clickLink: pandora.clickLink, + editable: canEdit, format: function(value) { return formatValue(key, value); }, @@ -670,10 +670,18 @@ pandora.ui.infoView = function(data, isMixed) { } }) .appendTo($element); + if (isMixed[key] && Ox.contains(listKeys, key)) { + pandora.ui.addRemoveKeyDialog({ + ids: ui.listSelection, + key: key, + section: ui.section + }).appendTo($element) + } } }); $element.appendTo($text); } + return $element; } function toggleIconSize() {