fix editDialog.js

This commit is contained in:
j 2016-01-05 15:58:18 +05:30
parent ef9b13b310
commit c3db57922a
2 changed files with 6 additions and 5 deletions

View file

@ -63,7 +63,7 @@ oml.ui.editDialog = function() {
} }
function formatValue(value, key) { function formatValue(value, key) {
return value === mixed ? Ox.formatLight(Ox._( return value === mixed ? formatLight(Ox._(
key == 'title' ? 'Mixed Title' key == 'title' ? 'Mixed Title'
: key == 'author' ? 'Mixed Author' : key == 'author' ? 'Mixed Author'
: 'mixed' : 'mixed'
@ -89,7 +89,7 @@ oml.ui.editDialog = function() {
var data = {}, var data = {},
items = result.data.items; items = result.data.items;
keys.forEach(function(key) { keys.forEach(function(key) {
values = items.map(function(item) { var values = items.map(function(item) {
return item[key]; return item[key];
}); });
var isArray = Ox.isArray(values[0]) var isArray = Ox.isArray(values[0])
@ -100,7 +100,7 @@ oml.ui.editDialog = function() {
} }
data[key] = Ox.unique(values).length == 1 data[key] = Ox.unique(values).length == 1
? (isArray ? values[0].split(separator) : values[0]) ? (isArray ? values[0].split(separator) : values[0])
: mixed; : isArray ? [mixed] : mixed;
}); });
callback(data); callback(data);
}); });
@ -169,7 +169,7 @@ oml.ui.editDialog = function() {
// Place, Publisher, Date // Place, Publisher, Date
$div = $('<div') $div = $('<div>')
.css({ .css({
marginTop: '4px' marginTop: '4px'
}) })

View file

@ -12,6 +12,7 @@
"connectionButton.js", "connectionButton.js",
"deleteItemsDialog.js", "deleteItemsDialog.js",
"deleteListDialog.js", "deleteListDialog.js",
"editDialog.js",
"errorDialog.js", "errorDialog.js",
"filter.js", "filter.js",
"filtersInnerPanel.js", "filtersInnerPanel.js",