forked from 0x2620/pandora
only split listKeys
This commit is contained in:
parent
aef5f2dd19
commit
33c6faa4be
1 changed files with 3 additions and 2 deletions
|
@ -246,7 +246,8 @@ pandora.ui.infoView = function(data) {
|
||||||
clickLink: pandora.clickLink,
|
clickLink: pandora.clickLink,
|
||||||
editable: key != 'duration',
|
editable: key != 'duration',
|
||||||
format: function(value) {
|
format: function(value) {
|
||||||
return key != 'duration' ? formatValue(value, key)
|
return key != 'duration' ? formatValue(listKeys.indexOf(key) >= 0
|
||||||
|
? value.split(', ') : value, key)
|
||||||
: value < 60 ? Math.round(value) + ' sec'
|
: value < 60 ? Math.round(value) + ' sec'
|
||||||
: Math.round(value / 60) + ' min';
|
: Math.round(value / 60) + ' min';
|
||||||
},
|
},
|
||||||
|
@ -509,7 +510,7 @@ pandora.ui.infoView = function(data) {
|
||||||
var edit = {id: data.id};
|
var edit = {id: data.id};
|
||||||
if (key == 'title') {
|
if (key == 'title') {
|
||||||
edit[key] = value;
|
edit[key] = value;
|
||||||
} else if (listKeys.indexOf(key) > -1) {
|
} else if (listKeys.indexOf(key) >= 0) {
|
||||||
edit[key] = value ? value.split(', ') : [];
|
edit[key] = value ? value.split(', ') : [];
|
||||||
} else {
|
} else {
|
||||||
edit[key] = value ? value : null;
|
edit[key] = value ? value : null;
|
||||||
|
|
Loading…
Reference in a new issue