# HG changeset patch # User Mads Kiilerich # Date 2013-06-12 00:13:05 # Node ID 1e7befa639cc4e690a5b81ed54ec73506c75f53c # Parent 3608f15f51ed7af7619b28ea04bffcc4871678db pull request comments: implement 'close' as a checkbox that always is visible but sometimes disabled diff --git a/rhodecode/public/css/style.css b/rhodecode/public/css/style.css --- a/rhodecode/public/css/style.css +++ b/rhodecode/public/css/style.css @@ -3698,6 +3698,10 @@ div.gravatar img { border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); } +label.disabled { + color: #aaa; +} + .ui-btn.blue.hidden { display: none; } diff --git a/rhodecode/templates/changeset/changeset_file_comment.html b/rhodecode/templates/changeset/changeset_file_comment.html --- a/rhodecode/templates/changeset/changeset_file_comment.html +++ b/rhodecode/templates/changeset/changeset_file_comment.html @@ -159,6 +159,10 @@ %endfor + %if close_btn and change_status: + + + %endif %endif
@@ -175,9 +179,6 @@
${h.submit('save', _('Comment'), class_="ui-btn large")} - %if close_btn and change_status: - ${h.submit('save_close', _('Comment and close'), class_='ui-btn blue large %s' % ('hidden' if cur_status in ['not_reviewed','under_review'] else ''))} - %endif
${h.end_form()} @@ -196,9 +197,11 @@ YUE.onDOMReady(function () { YUE.on(YUQ('.status_change_radio'), 'change',function(e){ var val = e.currentTarget.value; if (val == 'approved' || val == 'rejected') { - YUD.removeClass('save_close', 'hidden'); + YUD.removeClass('save_close_label', 'disabled'); + YUD.get('save_close').disabled = false; }else{ - YUD.addClass('save_close', 'hidden'); + YUD.addClass('save_close_label', 'disabled'); + YUD.get('save_close').disabled = true; } }) YUE.on('preview-btn', 'click', function(e){