comparison rhodecode/templates/changeset/changeset_file_comment.html @ 3593:716ac7659b90 beta

pullrequest: use simple link for 'Change style' This seems to be more obvious and not require any explanation. The checkbox is kept but made invisible - just to avoid controller changes.
author Mads Kiilerich <madski@unity3d.com>
date Thu, 07 Mar 2013 22:08:33 +0100
parents 2c1924699bf7
children 87b0a652b6b1
comparison
equal deleted inserted replaced
3592:549c73bfc206 3593:716ac7659b90
132 132
133 <div class="comments"> 133 <div class="comments">
134 %if c.rhodecode_user.username != 'default': 134 %if c.rhodecode_user.username != 'default':
135 <div class="comment-form ac"> 135 <div class="comment-form ac">
136 ${h.form(post_url)} 136 ${h.form(post_url)}
137 <strong>${_('Leave a comment or change status by checking `change status` checkbox')}</strong>
138 <div class="clearfix"> 137 <div class="clearfix">
139 <div class="comment-help"> 138 <div class="comment-help">
140 ${(_('Comments parsed using %s syntax with %s support.') % (('<a href="%s">RST</a>' % h.url('rst_help')), 139 ${(_('Comments parsed using %s syntax with %s support.') % (('<a href="%s">RST</a>' % h.url('rst_help')),
141 '<span style="color:#003367" class="tooltip" title="%s">@mention</span>' % 140 '<span style="color:#003367" class="tooltip" title="%s">@mention</span>' %
142 _('Use @username inside this text to send notification to this RhodeCode user')))|n} 141 _('Use @username inside this text to send notification to this RhodeCode user')))|n}
143 %if change_status: 142 %if change_status:
144 | <label for="show_changeset_status_box" class="tooltip" title="${_('Check this to change current status of code-review for this changeset')}"> ${_('change status')}</label> 143 | <a id="show_changeset_link" onClick="change_status_show();"> ${_('Change status')}</a>
145 <input style="vertical-align: bottom;margin-bottom:-2px" id="show_changeset_status_box" type="checkbox" name="change_changeset_status" /> 144 <input id="show_changeset_status_box" type="checkbox" name="change_changeset_status" style="display: none;" />
146 %endif 145 %endif
147 </div> 146 </div>
148 %if change_status: 147 %if change_status:
149 <div id="status_block_container" class="status-block" style="display:none"> 148 <div id="status_block_container" class="status-block" style="display:none">
150 %for status,lbl in c.changeset_statuses: 149 %for status,lbl in c.changeset_statuses:
167 ${h.end_form()} 166 ${h.end_form()}
168 </div> 167 </div>
169 %endif 168 %endif
170 </div> 169 </div>
171 <script> 170 <script>
171 var change_status_show = function(){
172 var show = ! YUD.get('show_changeset_status_box').checked;
173 YUD.get('show_changeset_status_box').checked = show;
174 YUD.setStyle('status_block_container', 'display', show?'':'none');
175 };
176
172 YUE.onDOMReady(function () { 177 YUE.onDOMReady(function () {
173 MentionsAutoComplete('text', 'mentions_container', _USERS_AC_DATA, _GROUPS_AC_DATA); 178 MentionsAutoComplete('text', 'mentions_container', _USERS_AC_DATA, _GROUPS_AC_DATA);
174 179
175 // changeset status box listener
176 YUE.on(YUD.get('show_changeset_status_box'),'change',function(e){
177 if(e.currentTarget.checked){
178 YUD.setStyle('status_block_container','display','');
179 }
180 else{
181 YUD.setStyle('status_block_container','display','none');
182 }
183 })
184 YUE.on(YUQ('.status_change_radio'), 'change',function(e){ 180 YUE.on(YUQ('.status_change_radio'), 'change',function(e){
185 var val = e.currentTarget.value; 181 var val = e.currentTarget.value;
186 if (val == 'approved' || val == 'rejected') { 182 if (val == 'approved' || val == 'rejected') {
187 YUD.removeClass('save_close', 'hidden'); 183 YUD.removeClass('save_close', 'hidden');
188 }else{ 184 }else{