Give example values for CSS rules in embedding

This commit is contained in:
Robin Ward 2015-09-23 12:10:15 -04:00
parent 6b48647fc7
commit 7d4dbc9962
4 changed files with 15 additions and 3 deletions

View File

@ -6,6 +6,11 @@ export default Ember.Component.extend({
@computed('field')
inputId(field) { return field.dasherize(); },
@computed('placeholder')
placeholderValue(placeholder) {
return placeholder ? I18n.t(placeholder) : null;
},
@computed('field')
translationKey(field) { return `admin.embedding.${field}`; },

View File

@ -5,7 +5,7 @@
</label>
{{else}}
<label for={{inputId}}>{{i18n translationKey}}</label>
{{input value=value id=inputId}}
{{input value=value id=inputId placeholder=placeholderValue}}
{{/if}}
<div class='clearfix'></div>

View File

@ -46,8 +46,13 @@
<h3>{{i18n "admin.embedding.crawling_settings"}}</h3>
<p class="description">{{i18n "admin.embedding.crawling_description"}}</p>
{{embedding-setting field="embed_whitelist_selector" value=embedding.embed_whitelist_selector}}
{{embedding-setting field="embed_blacklist_selector" value=embedding.embed_blacklist_selector}}
{{embedding-setting field="embed_whitelist_selector"
value=embedding.embed_whitelist_selector
placeholder="admin.embedding.whitelist_example"}}
{{embedding-setting field="embed_blacklist_selector"
value=embedding.embed_blacklist_selector
placeholder="admin.embedding.blacklist_example"}}
</div>
<div class='embedding-secondary'>

View File

@ -2592,7 +2592,9 @@ en:
embed_username_key_from_feed: "Key to pull discourse username from feed"
embed_truncate: "Truncate the embedded posts"
embed_whitelist_selector: "CSS selector for elements that are allowed in embeds"
whitelist_example: "article, #story, .post"
embed_blacklist_selector: "CSS selector for elements that are removed from embeds"
blacklist_example: ".ad-unit, header"
feed_polling_enabled: "Import posts via RSS/ATOM"
feed_polling_url: "URL of RSS/ATOM feed to crawl"
save: "Save Embedding Settings"