Commit 82ad1c418044f53e24b60a5f5eacb8b37bcf7892
1 parent
1dff4503
Text-element-controllet update
Showing
2 changed files
with
9 additions
and
3 deletions
controllets/text-element-controllet/text-element-controllet.html
... | ... | @@ -123,8 +123,6 @@ Example: |
123 | 123 | * @event text-element-controllet_content-changed |
124 | 124 | */ |
125 | 125 | |
126 | - targets : null, | |
127 | - | |
128 | 126 | properties: { |
129 | 127 | /** |
130 | 128 | * It's the name of the elelent |
... | ... | @@ -159,10 +157,16 @@ Example: |
159 | 157 | type: String, |
160 | 158 | value : "0" |
161 | 159 | }, |
160 | + | |
162 | 161 | value :{ |
163 | 162 | type: String, |
164 | 163 | value: "", |
165 | 164 | observer : '_valueChanged' |
165 | + }, | |
166 | + | |
167 | + timer :{ | |
168 | + type: Number, | |
169 | + value : 0 | |
166 | 170 | } |
167 | 171 | }, |
168 | 172 | /** |
... | ... | @@ -173,7 +177,8 @@ Example: |
173 | 177 | * @param {Event} e |
174 | 178 | */ |
175 | 179 | _valueChanged : function(oldvalue, newValue){ |
176 | - this.fire('text-element-controllet_content-changed', {newValue: newValue}); | |
180 | + clearTimeout (this.timer); | |
181 | + this.timer = setTimeout(this.fire('text-element-controllet_content-changed', {newValue: newValue}), 2000); | |
177 | 182 | }, |
178 | 183 | /** |
179 | 184 | * It returns the value in text area |
... | ... |
datalets/base-ajax-json-jsonpath-datalet/static/js/AjaxJsonJsonPathBehavior.js