Changeset - 716ac7659b90
[Not reviewed]
beta
0 1 0
Mads Kiilerich - 13 years ago 2013-03-07 22:08:33
madski@unity3d.com
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.
1 file changed with 8 insertions and 12 deletions:
0 comments (0 inline, 0 general)
rhodecode/templates/changeset/changeset_file_comment.html
Show inline comments
 
@@ -134,15 +134,14 @@
 
    %if c.rhodecode_user.username != 'default':
 
    <div class="comment-form ac">
 
        ${h.form(post_url)}
 
        <strong>${_('Leave a comment or change status by checking `change status` checkbox')}</strong>
 
        <div class="clearfix">
 
            <div class="comment-help">
 
                ${(_('Comments parsed using %s syntax with %s support.') % (('<a href="%s">RST</a>' % h.url('rst_help')),
 
                  '<span style="color:#003367" class="tooltip" title="%s">@mention</span>' %
 
                  _('Use @username inside this text to send notification to this RhodeCode user')))|n}
 
              %if change_status:
 
                | <label for="show_changeset_status_box" class="tooltip" title="${_('Check this to change current status of code-review for this changeset')}"> ${_('change status')}</label>
 
                  <input style="vertical-align: bottom;margin-bottom:-2px" id="show_changeset_status_box" type="checkbox" name="change_changeset_status" />
 
                | <a id="show_changeset_link" onClick="change_status_show();"> ${_('Change status')}</a>
 
                  <input id="show_changeset_status_box" type="checkbox" name="change_changeset_status" style="display: none;" />
 
              %endif
 
            </div>
 
            %if change_status:
 
@@ -169,18 +168,15 @@
 
    %endif
 
</div>
 
<script>
 
var change_status_show = function(){
 
    var show = ! YUD.get('show_changeset_status_box').checked;
 
    YUD.get('show_changeset_status_box').checked = show;
 
    YUD.setStyle('status_block_container', 'display', show?'':'none');
 
};
 

	
 
YUE.onDOMReady(function () {
 
   MentionsAutoComplete('text', 'mentions_container', _USERS_AC_DATA, _GROUPS_AC_DATA);
 

	
 
   // changeset status box listener
 
   YUE.on(YUD.get('show_changeset_status_box'),'change',function(e){
 
       if(e.currentTarget.checked){
 
           YUD.setStyle('status_block_container','display','');
 
       }
 
       else{
 
           YUD.setStyle('status_block_container','display','none');
 
       }
 
   })
 
   YUE.on(YUQ('.status_change_radio'), 'change',function(e){
 
       var val = e.currentTarget.value;
 
       if (val == 'approved' || val == 'rejected') {
0 comments (0 inline, 0 general)