##// END OF EJS Templates
pull requests: fix issue when close button was inactive even if status...
marcink -
r4055:9314f264 default
parent child Browse files
Show More
@@ -208,16 +208,22 b' var change_status_show = function(){'
208 YUE.onDOMReady(function () {
208 YUE.onDOMReady(function () {
209 MentionsAutoComplete('text', 'mentions_container', _USERS_AC_DATA, _GROUPS_AC_DATA);
209 MentionsAutoComplete('text', 'mentions_container', _USERS_AC_DATA, _GROUPS_AC_DATA);
210
210
211 YUE.on(YUQ('.status_change_radio'), 'change',function(e){
211 var set_close_button_state = function(cur_val){
212 var val = e.currentTarget.value;
212 if (cur_val == 'approved' || cur_val == 'rejected') {
213 if (val == 'approved' || val == 'rejected') {
214 YUD.removeClass('save_close_label', 'disabled');
213 YUD.removeClass('save_close_label', 'disabled');
215 YUD.get('save_close').disabled = false;
214 YUD.get('save_close').disabled = false;
216 }else{
215 }else{
217 YUD.addClass('save_close_label', 'disabled');
216 YUD.addClass('save_close_label', 'disabled');
218 YUD.get('save_close').disabled = true;
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 YUE.on('preview-btn', 'click', function(e){
227 YUE.on('preview-btn', 'click', function(e){
222 var _text = YUD.get('text').value;
228 var _text = YUD.get('text').value;
223 if(!_text){
229 if(!_text){
General Comments 0
You need to be logged in to leave comments. Login now