Skip to content

Commit

Permalink
修改评论的button样式在禁用时更有效
Browse files Browse the repository at this point in the history
  • Loading branch information
windy committed Apr 3, 2014
1 parent cb114f0 commit 12a2342
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions app/assets/stylesheets/comments.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,17 @@
}
}

.comment-submit[disabled] {
opacity: 0.4;
cursor: not-allowed;
}

.comment-submit {
background-color: #008cba;
opacity: 0.8;
}


.comment-success {
color: #66FAB5;
}
Expand Down
2 changes: 1 addition & 1 deletion app/views/blogs/_comment.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
.small-12.large-6.columns
= text_field_tag(:name, nil, placeholder: '你的名字', 'ng-model'=> 'name', 'ng-required'=> 'true')
= text_field_tag(:email, nil, placeholder: '你的邮箱', 'ng-model'=> 'email', 'ng-pattern'=>"/^.+@.+$/", 'ng-required'=>"true")
button ng-click="submit()" ng-disabled="form.$invalid" 发表
button.comment-submit ng-click="submit()" ng-disabled="form.$invalid" 发表
p.comment-success ng-show="publish_success" 发布成功
p.comment-fail ng-show="publish_success == false" 发布失败: {{ publish_fail_msg }}
.comment-diag ng-cloak=""
Expand Down

0 comments on commit 12a2342

Please sign in to comment.