files view: only register changes when value has actually changed

This commit is contained in:
rolux 2013-02-08 22:59:42 +05:30
parent e1889397b2
commit bf1a4102c1

View file

@ -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);
}
}
});