info cleanup
This commit is contained in:
parent
84f59ce4f3
commit
494604c0d7
2 changed files with 6 additions and 5 deletions
|
@ -76,7 +76,7 @@
|
||||||
{
|
{
|
||||||
"id": "language",
|
"id": "language",
|
||||||
"title": "Language",
|
"title": "Language",
|
||||||
"type": "string",
|
"type": ["string"],
|
||||||
"columnWidth": 128,
|
"columnWidth": 128,
|
||||||
"filter": true,
|
"filter": true,
|
||||||
"find": true,
|
"find": true,
|
||||||
|
@ -112,6 +112,7 @@
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"columnWidth": 80,
|
"columnWidth": 80,
|
||||||
"format": {"type": "upper", "args": []},
|
"format": {"type": "upper", "args": []},
|
||||||
|
"filter": true,
|
||||||
"sort": true
|
"sort": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -219,7 +219,7 @@ oml.ui.infoView = function(identifyData) {
|
||||||
if (data.mediastate == 'unavailable' && !ui._lists) {
|
if (data.mediastate == 'unavailable' && !ui._lists) {
|
||||||
setListItems();
|
setListItems();
|
||||||
}
|
}
|
||||||
var $element = data.mediastate == 'unavailable'
|
var $element = (data.mediastate == 'unavailable' || Ox.isUndefined(data.mediastate))
|
||||||
? Ox.FormElementGroup({
|
? Ox.FormElementGroup({
|
||||||
elements: [
|
elements: [
|
||||||
Ox.Button({
|
Ox.Button({
|
||||||
|
@ -540,12 +540,12 @@ oml.ui.infoView = function(identifyData) {
|
||||||
editable: isEditable,
|
editable: isEditable,
|
||||||
format: function(value) {
|
format: function(value) {
|
||||||
return key == 'language'
|
return key == 'language'
|
||||||
? formatValue(value, key)
|
? formatValue(value.split('; '), key)
|
||||||
: value;
|
: value;
|
||||||
},
|
},
|
||||||
placeholder: formatLight('unknown'),
|
placeholder: formatLight('unknown'),
|
||||||
tooltip: isEditable ? oml.getEditTooltip() : '',
|
tooltip: isEditable ? oml.getEditTooltip() : '',
|
||||||
value: data[key] || ''
|
value: data[key] ? key == 'language' ? data[key].join('; ') : data[key] : ''
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
submit: function(event) {
|
submit: function(event) {
|
||||||
|
@ -648,7 +648,7 @@ oml.ui.infoView = function(identifyData) {
|
||||||
.text(title)
|
.text(title)
|
||||||
.appendTo($data);
|
.appendTo($data);
|
||||||
Ox.makeArray(data[id.key]/*FIXME!*/).forEach(function(value) {
|
Ox.makeArray(data[id.key]/*FIXME!*/).forEach(function(value) {
|
||||||
var isPrimary = data.primaryid[0] == id.key
|
var isPrimary = data.primaryid && data.primaryid[0] == id.key
|
||||||
&& data.primaryid[1] == value;
|
&& data.primaryid[1] == value;
|
||||||
value = Ox.encodeHTMLEntities(value);
|
value = Ox.encodeHTMLEntities(value);
|
||||||
Ox.Element({
|
Ox.Element({
|
||||||
|
|
Loading…
Reference in a new issue