Permalink
Browse files

add placeholder.

  • Loading branch information...
1 parent 5c271f6 commit a670899e1bba21de6ff249875ba1970385f0ef57 @chloerei committed Aug 6, 2012
Showing with 9 additions and 2 deletions.
  1. +1 −0 app/assets/javascripts/editor.js
  2. +2 −2 app/views/topics/_form.haml
  3. +3 −0 config/locales/en.yml
  4. +3 −0 config/locales/zh-CN.yml
@@ -11,6 +11,7 @@ $(function(){
});
$('#editor :input[name*=tag_string]').tagEditor();
+ $('#editor input.tag-input').attr('placeholder', $('#editor :input[name*=tag_string]').attr('placeholder'))
var $form = $('#editor form[data-validate]');
if ($form.length > 0) {
@@ -1,8 +1,8 @@
.control-group
- .full-input-wrap= form.text_field :title, :validate => false
+ .full-input-wrap= form.text_field :title, :validate => false, :placeholder => t('.title_placeholder')
.control-group
#editor-button-bar
.full-input-wrap= form.text_area :content, :id => 'editor-input', :rows => 20, :validate => false
#editor-preview
.control-group
- .full-input-wrap= form.text_field :tag_string, :data => {:suggest => Tag.suggest_tags}
+ .full-input-wrap= form.text_field :tag_string, :data => {:suggest => Tag.suggest_tags}, :placeholder => t('.tags_placeholder')
View
@@ -130,6 +130,9 @@ en:
create_topic: "Create topic"
edit:
topics: "Topics"
+ form:
+ title_placeholder: 'Title'
+ tags_placeholder: 'Tags'
replies:
edit:
topics: "Topics"
View
@@ -130,6 +130,9 @@ zh-CN:
create_topic: "创建话题"
edit:
topics: "话题"
+ form:
+ title_placeholder: '标题'
+ tags_placeholder: '标签'
replies:
edit:
topics: "话题"

0 comments on commit a670899

Please sign in to comment.