From bf1a4102c129c8bcc8d466e1b1f9a766c50d51db Mon Sep 17 00:00:00 2001 From: rolux Date: Fri, 8 Feb 2013 22:59:42 +0530 Subject: [PATCH] files view: only register changes when value has actually changed --- static/js/pandora/filesView.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/static/js/pandora/filesView.js b/static/js/pandora/filesView.js index 8b866c01..6414dcdc 100644 --- a/static/js/pandora/filesView.js +++ b/static/js/pandora/filesView.js @@ -253,8 +253,11 @@ pandora.ui.filesView = function(options, self) { }, select: selectFiles, submit: function(data) { - self.$saveButton.options({disabled: false}); - self.$filesList.value(data.id, data.key, data.value || null); + var value = self.$filesList.value(data.id, data.key); + if (data.value != value && !(data.value === '' && value === null)) { + self.$saveButton.options({disabled: false}); + self.$filesList.value(data.id, data.key, data.value || null); + } } });