Skip to content
Snippets Groups Projects

FIX: use paging during options generation in edit mode

Merged Henrik tom Wörden requested to merge f-edit-mode-paging into dev
All threads resolved!
1 file
+ 5
3
Compare changes
  • Side-by-side
  • Inline
+ 5
3
@@ -981,7 +981,7 @@ var edit_mode = new function () {
let time = dateandtime[1];
// subseconds are stored in the subsec attribue of the input element
result = "<span><input type='date' value='" + date + "'/>" +
"<input type='time' subsec='"+dateandtime[2]+"' value='" + time + "'/></span>";
"<input type='time' subsec='" + dateandtime[2] + "' value='" + time + "'/></span>";
} else if (property.value && ((property.name || "").toLowerCase() == "year" || (date.match(/-/g) || []).length == 0)) {
// Year
result = "<input type='number' value='" + date + "'/>";
@@ -1018,7 +1018,7 @@ var edit_mode = new function () {
options.then((_options) => {
// The options might not include all entites (if there are
// many). Include the property value if it is missing.
if (property.value!="" && -1 == _options.map((e) => {
if (property.value != "" && -1 == _options.map((e) => {
return e.value
}).indexOf(property.value)) {
_options = _options.concat([$(`<option value="${property.value}">ID: ${property.value}</option>`)[0]])
@@ -1893,7 +1893,9 @@ var edit_mode = new function () {
if (n_entities > max_options || n_files > max_options) {
// add notification that not all entities are shown
options = [$(`<option disabled=true value="NA"/>`).text('Dropdown only shows selection of possible entities!')[0]].concat(options);
options = [$(`<option disabled=true value="NA"/>`).text(
`More than ${max_options} possible options; showing only a subset. You may need to enter the id manually.`
)[0]].concat(options);
}
return options;
}
Loading