Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add placeholder.

  • Loading branch information...
commit a670899e1bba21de6ff249875ba1970385f0ef57 1 parent 5c271f6
@chloerei authored
View
1  app/assets/javascripts/editor.js
@@ -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) {
View
4 app/views/topics/_form.haml
@@ -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
3  config/locales/en.yml
@@ -130,6 +130,9 @@ en:
create_topic: "Create topic"
edit:
topics: "Topics"
+ form:
+ title_placeholder: 'Title'
+ tags_placeholder: 'Tags'
replies:
edit:
topics: "Topics"
View
3  config/locales/zh-CN.yml
@@ -130,6 +130,9 @@ zh-CN:
create_topic: "创建话题"
edit:
topics: "话题"
+ form:
+ title_placeholder: '标题'
+ tags_placeholder: '标签'
replies:
edit:
topics: "话题"
Please sign in to comment.
Something went wrong with that request. Please try again.