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,9 +253,12 @@ pandora.ui.filesView = function(options, self) {
}, },
select: selectFiles, select: selectFiles,
submit: function(data) { submit: function(data) {
var value = self.$filesList.value(data.id, data.key);
if (data.value != value && !(data.value === '' && value === null)) {
self.$saveButton.options({disabled: false}); self.$saveButton.options({disabled: false});
self.$filesList.value(data.id, data.key, data.value || null); self.$filesList.value(data.id, data.key, data.value || null);
} }
}
}); });
self.$instancesList = Ox.TableList({ self.$instancesList = Ox.TableList({