From: Edward Date: Fri, 7 Mar 2014 09:49:31 +0000 (+0800) Subject: Roo/form/ComboBoxArray.js X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=3be000f3673d353df2e1c5bca23d0ece144edc97 Roo/form/ComboBoxArray.js --- diff --git a/Roo/form/ComboBoxArray.js b/Roo/form/ComboBoxArray.js index 9eb133708a..9dcdfedb9e 100644 --- a/Roo/form/ComboBoxArray.js +++ b/Roo/form/ComboBoxArray.js @@ -427,6 +427,31 @@ Roo.extend(Roo.form.ComboBoxArray.Item, Roo.BoxComponent, { this.el.child('img').un('click', this.remove, this); this.el.remove(); this.cb.updateHiddenEl(); + }, + + /*@ + * overide + * + */ + isDirty : function() { + if(this.disabled) { + return false; + } + + try { + var d = Roo.decode(String(this.originalValue)); + } catch (e) { + return String(this.getValue()) !== String(this.originalValue); + } + + var originalValue = []; + + for (var i = 0; i < d.length; i++){ + originalValue.push(d[i][this.valueField]); + } + + return String(this.getValue()) !== String(originalValue.join(',')); + } }); \ No newline at end of file