update edit dialog

This commit is contained in:
Rolux 2016-01-05 23:36:57 +05:30
parent a6c8e1d478
commit 1d7ebde097

View file

@ -52,9 +52,7 @@ oml.ui.editDialog = function() {
} }
oml.api.edit(edit, function(result) { oml.api.edit(edit, function(result) {
Ox.Request.clearCache(); Ox.Request.clearCache();
if (Ox.contains(['author', 'place', 'description'], key)) { oml.$ui.info.updateElement();
oml.$ui.info.updateElement();
}
oml.$ui.filters.forEach(function($filter) { oml.$ui.filters.forEach(function($filter) {
$filter.reloadList(); $filter.reloadList();
}); });
@ -103,10 +101,10 @@ oml.ui.editDialog = function() {
var data = {}, var data = {},
items = result.data.items; items = result.data.items;
keys.forEach(function(key) { keys.forEach(function(key) {
var values = items.map(function(item) { var isArray = Ox.contains(arrayKeys, key),
return item[key]; values = items.map(function(item) {
}); return item[key];
var isArray = Ox.isArray(values[0]) });
if (isArray) { if (isArray) {
values = values.map(function(value) { values = values.map(function(value) {
return value.join(separator); return value.join(separator);