Show More
@@ -208,16 +208,22 b' var change_status_show = function(){' | |||
|
208 | 208 | YUE.onDOMReady(function () { |
|
209 | 209 | MentionsAutoComplete('text', 'mentions_container', _USERS_AC_DATA, _GROUPS_AC_DATA); |
|
210 | 210 | |
|
211 | YUE.on(YUQ('.status_change_radio'), 'change',function(e){ | |
|
212 | var val = e.currentTarget.value; | |
|
213 | if (val == 'approved' || val == 'rejected') { | |
|
211 | var set_close_button_state = function(cur_val){ | |
|
212 | if (cur_val == 'approved' || cur_val == 'rejected') { | |
|
214 | 213 | YUD.removeClass('save_close_label', 'disabled'); |
|
215 | 214 | YUD.get('save_close').disabled = false; |
|
216 | 215 | }else{ |
|
217 | 216 | YUD.addClass('save_close_label', 'disabled'); |
|
218 | 217 | YUD.get('save_close').disabled = true; |
|
219 | 218 | } |
|
219 | } | |
|
220 | YUE.on(YUQ('.status_change_radio'), 'change',function(e){ | |
|
221 | var val = e.currentTarget.value; | |
|
222 | set_close_button_state(val) | |
|
220 | 223 | }) |
|
224 | // if currect checked status is approved or rejected we should unlock the close button | |
|
225 | var cur_val = YUQ('.status_change_radio[checked]')[0].value; | |
|
226 | set_close_button_state(cur_val) | |
|
221 | 227 | YUE.on('preview-btn', 'click', function(e){ |
|
222 | 228 | var _text = YUD.get('text').value; |
|
223 | 229 | if(!_text){ |
General Comments 0
You need to be logged in to leave comments.
Login now