From 3be000f3673d353df2e1c5bca23d0ece144edc97 Mon Sep 17 00:00:00 2001 From: Edward Date: Fri, 7 Mar 2014 17:49:31 +0800 Subject: [PATCH] Roo/form/ComboBoxArray.js --- Roo/form/ComboBoxArray.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) 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 -- 2.39.2