From d00b72d9eb17b89b7ca65ef2c6c79f320f25fa7d Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sun, 2 Feb 2014 05:06:15 +0000 Subject: [PATCH] fix editing encyclopedia, wiki entries --- static/js/infoView.indiancinema.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/static/js/infoView.indiancinema.js b/static/js/infoView.indiancinema.js index 5f21abbe..2ee6b551 100644 --- a/static/js/infoView.indiancinema.js +++ b/static/js/infoView.indiancinema.js @@ -464,8 +464,6 @@ pandora.ui.infoView = function(data) { }) : []; data[key] = edit[key]; $alternativeTitles.html(formatKey(key)); - } else if (key == 'encyclopedia') { - edit[key] = ['Index', 'Summary'].indexOf(value) > -1 ? value : ''; } else if (key == 'year') { edit[key] = value ? parseInt(value) : ''; } else if (key == 'runtime') { @@ -587,8 +585,8 @@ pandora.ui.infoView = function(data) { + (value == 'Summary' ? '240' : '570') + '">' + value + ''; } else if (key == 'wiki') { - ret = '' - + Ox.decodeURI(data.wiki.split('wiki/').pop()) + ''; + ret = '' + + Ox.decodeURI(value.split('wiki/').pop()) + ''; } else { ret = value; } @@ -910,6 +908,15 @@ pandora.ui.infoView = function(data) { key == 'runtime' && $minutes.show(); }, submit: function(data) { + if (key == 'encyclopedia') { + data.value = ['Index', 'Summary'].indexOf(data.value) > -1 + ? data.value + : ''; + this.options({ + value: data.value + }); + } + editMetadata(key, data.value); } })