changeset 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 549c73bfc206
children 381c1466141d
files rhodecode/templates/changeset/changeset_file_comment.html
diffstat 1 files changed, 8 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/templates/changeset/changeset_file_comment.html	Fri Mar 08 00:50:49 2013 +0100
+++ b/rhodecode/templates/changeset/changeset_file_comment.html	Thu Mar 07 22:08:33 2013 +0100
@@ -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') {