mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 20:26:28 +08:00
prefer empty href attribute to #
This commit is contained in:
parent
c0136eb6e6
commit
e3a80936c8
|
@ -8,9 +8,9 @@
|
||||||
<div class="toggle">
|
<div class="toggle">
|
||||||
<label>{{i18n 'admin.email.format'}}</label>
|
<label>{{i18n 'admin.email.format'}}</label>
|
||||||
{{#if showHtml}}
|
{{#if showHtml}}
|
||||||
<span>{{i18n 'admin.email.html'}}</span> | <a href='#' {{action "toggleShowHtml"}}>{{i18n 'admin.email.text'}}</a>
|
<span>{{i18n 'admin.email.html'}}</span> | <a href {{action "toggleShowHtml"}}>{{i18n 'admin.email.text'}}</a>
|
||||||
{{else}}
|
{{else}}
|
||||||
<a href='#' {{action "toggleShowHtml"}}>{{i18n 'admin.email.html'}}</a> | <span>{{i18n 'admin.email.text'}}</span>
|
<a href {{action "toggleShowHtml"}}>{{i18n 'admin.email.html'}}</a> | <span>{{i18n 'admin.email.text'}}</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<div>
|
<div>
|
||||||
<ul class="nav nav-pills">
|
<ul class="nav nav-pills">
|
||||||
<li {{bind-attr class="newSelected:active"}}>
|
<li {{bind-attr class="newSelected:active"}}>
|
||||||
<a href="#" {{action "selectNew"}}>{{i18n 'admin.logs.staff_actions.new_value'}}</a>
|
<a href {{action "selectNew"}}>{{i18n 'admin.logs.staff_actions.new_value'}}</a>
|
||||||
</li>
|
</li>
|
||||||
<li {{bind-attr class="previousSelected:active"}}>
|
<li {{bind-attr class="previousSelected:active"}}>
|
||||||
<a href="#" {{action "selectPrevious"}}>{{i18n 'admin.logs.staff_actions.previous_value'}}</a>
|
<a href {{action "selectPrevious"}}>{{i18n 'admin.logs.staff_actions.previous_value'}}</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
|
@ -19,7 +19,7 @@ export default Ember.Component.extend(StringBuffer, {
|
||||||
|
|
||||||
const renderActionIf = function(property, dataAttribute, text) {
|
const renderActionIf = function(property, dataAttribute, text) {
|
||||||
if (!c.get(property)) { return; }
|
if (!c.get(property)) { return; }
|
||||||
buffer.push(" <span class='action-link " + dataAttribute +"-action'><a href='#' data-" + dataAttribute + "='" + c.get('id') + "'>" + text + "</a>.</span>");
|
buffer.push(" <span class='action-link " + dataAttribute +"-action'><a href data-" + dataAttribute + "='" + c.get('id') + "'>" + text + "</a>.</span>");
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO multi line expansion for flags
|
// TODO multi line expansion for flags
|
||||||
|
|
|
@ -91,7 +91,7 @@ export default function(options) {
|
||||||
transformed = _.isArray(transformedItem) ? transformedItem : [transformedItem || item];
|
transformed = _.isArray(transformedItem) ? transformedItem : [transformedItem || item];
|
||||||
|
|
||||||
var divs = transformed.map(function(itm) {
|
var divs = transformed.map(function(itm) {
|
||||||
var d = $("<div class='item'><span>" + itm + "<a class='remove' href='#'><i class='fa fa-times'></i></a></span></div>");
|
var d = $("<div class='item'><span>" + itm + "<a class='remove' href><i class='fa fa-times'></i></a></span></div>");
|
||||||
var prev = me.parent().find('.item:last');
|
var prev = me.parent().find('.item:last');
|
||||||
if (prev.length === 0) {
|
if (prev.length === 0) {
|
||||||
me.parent().prepend(d);
|
me.parent().prepend(d);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<a href='#' {{bind-attr class=":poster toggled"}} {{action "toggle"}} title="{{unbound participant.username}}">
|
<a href {{bind-attr class=":poster toggled"}} {{action "toggle"}} title="{{unbound participant.username}}">
|
||||||
{{#if showPostCount}}
|
{{#if showPostCount}}
|
||||||
<span class='post-count'>{{unbound participant.post_count}}</span>
|
<span class='post-count'>{{unbound participant.post_count}}</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -93,7 +93,7 @@
|
||||||
<div class='submit-panel'>
|
<div class='submit-panel'>
|
||||||
{{plugin-outlet "composer-fields-below"}}
|
{{plugin-outlet "composer-fields-below"}}
|
||||||
<button {{action "save"}} tabindex="5" {{bind-attr class=":btn :btn-primary :create disableSubmit:disabled"}} title="{{i18n 'composer.title'}}">{{{model.saveIcon}}}{{model.saveText}}</button>
|
<button {{action "save"}} tabindex="5" {{bind-attr class=":btn :btn-primary :create disableSubmit:disabled"}} title="{{i18n 'composer.title'}}">{{{model.saveIcon}}}{{model.saveText}}</button>
|
||||||
<a href='#' {{action "cancel"}} class='cancel' tabindex="6">{{i18n 'cancel'}}</a>
|
<a href {{action "cancel"}} class='cancel' tabindex="6">{{i18n 'cancel'}}</a>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
<a href='#' {{action "closeMessage" this}} class='close'><i class='fa fa-times-circle'></i></a>
|
<a href {{action "closeMessage" this}} class='close'><i class='fa fa-times-circle'></i></a>
|
||||||
{{{body}}}
|
{{{body}}}
|
||||||
|
|
|
@ -46,10 +46,10 @@
|
||||||
loginAction="showLogin"
|
loginAction="showLogin"
|
||||||
title="user.avatar.header_title"}}
|
title="user.avatar.header_title"}}
|
||||||
{{#if currentUser.unread_notifications}}
|
{{#if currentUser.unread_notifications}}
|
||||||
<a href="#" {{action "showUserMenu"}} class='badge-notification unread-notifications'>{{currentUser.unread_notifications}}</a>
|
<a href {{action "showUserMenu"}} class='badge-notification unread-notifications'>{{currentUser.unread_notifications}}</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if currentUser.unread_private_messages}}
|
{{#if currentUser.unread_private_messages}}
|
||||||
<a href="#" {{action "showUserMenu"}} class='badge-notification unread-private-messages'>{{currentUser.unread_private_messages}}</a>
|
<a href {{action "showUserMenu"}} class='badge-notification unread-private-messages'>{{currentUser.unread_private_messages}}</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/header-dropdown}}
|
{{/header-dropdown}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
{{#unless t.canClearPin}}<a href="{{unbound t.url}}">{{i18n 'read_more'}}</a>{{/unless}}
|
{{#unless t.canClearPin}}<a href="{{unbound t.url}}">{{i18n 'read_more'}}</a>{{/unless}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if t.canClearPin}}
|
{{#if t.canClearPin}}
|
||||||
<a href="#" {{action "clearPin" t}} title="{{i18n 'topic.clear_pin.help'}}">{{i18n 'topic.clear_pin.title'}}</a>
|
<a href {{action "clearPin" t}} title="{{i18n 'topic.clear_pin.help'}}">{{i18n 'topic.clear_pin.title'}}</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
{{#unless t.canClearPin}}<a href="{{unbound t.url}}">{{i18n 'read_more'}}</a>{{/unless}}
|
{{#unless t.canClearPin}}<a href="{{unbound t.url}}">{{i18n 'read_more'}}</a>{{/unless}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if t.canClearPin}}
|
{{#if t.canClearPin}}
|
||||||
<a href="#" {{action "clearPin" t}} title="{{unbound i18n topic.clear_pin.help}}">{{i18n 'topic.clear_pin.title'}}</a>
|
<a href {{action "clearPin" t}} title="{{unbound i18n topic.clear_pin.help}}">{{i18n 'topic.clear_pin.title'}}</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
<figure title="{{i18n 'week_desc'}}">{{number c.topics_week}} <figcaption>{{i18n 'week'}}</figcaption></figure>
|
<figure title="{{i18n 'week_desc'}}">{{number c.topics_week}} <figcaption>{{i18n 'week'}}</figcaption></figure>
|
||||||
|
|
||||||
{{#if controller.canEdit}}
|
{{#if controller.canEdit}}
|
||||||
<a href='#' {{action "editCategory" c}} class='btn btn-small'>{{i18n 'category.edit'}}</a>
|
<a href {{action "editCategory" c}} class='btn btn-small'>{{i18n 'category.edit'}}</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
</footer>
|
</footer>
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
</div>
|
</div>
|
||||||
<h3>
|
<h3>
|
||||||
{{footerMessage}}
|
{{footerMessage}}
|
||||||
{{#if model.can_create_topic}}<a href='#' {{action "createTopic"}}>{{i18n 'topic.suggest_create_topic'}}</a>{{/if}}
|
{{#if model.can_create_topic}}<a href {{action "createTopic"}}>{{i18n 'topic.suggest_create_topic'}}</a>{{/if}}
|
||||||
</h3>
|
</h3>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if top}}
|
{{#if top}}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
{{{i18n 'login.sent_activation_email_again' currentEmail=currentEmail}}}
|
{{{i18n 'login.sent_activation_email_again' currentEmail=currentEmail}}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{{i18n 'login.not_activated' sentTo=sentTo}}}
|
{{{i18n 'login.not_activated' sentTo=sentTo}}}
|
||||||
<a href="#" {{action "sendActivationEmail"}}>{{i18n 'login.resend_activation_email'}}</a>
|
<a href {{action "sendActivationEmail"}}>{{i18n 'login.resend_activation_email'}}</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<ul>
|
<ul>
|
||||||
{{#each user in options.users}}
|
{{#each user in options.users}}
|
||||||
<li>
|
<li>
|
||||||
<a href='#'>{{avatar user imageSize="tiny"}}
|
<a href {{avatar user imageSize="tiny"}}
|
||||||
<span class='username'>{{user.username}}</span>
|
<span class='username'>{{user.username}}</span>
|
||||||
<span class='name'>{{user.name}}</span>
|
<span class='name'>{{user.name}}</span>
|
||||||
</a>
|
</a>
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
{{#if options.users}}<hr>{{/if}}
|
{{#if options.users}}<hr>{{/if}}
|
||||||
{{#each group in options.groups}}
|
{{#each group in options.groups}}
|
||||||
<li>
|
<li>
|
||||||
<a href=''>
|
<a href>
|
||||||
<i class='icon-group'></i>
|
<i class='icon-group'></i>
|
||||||
<span class='username'>{{group.name}}</span>
|
<span class='username'>{{group.name}}</span>
|
||||||
<span class='name'>{{max-usernames group.usernames max="3"}}</span>
|
<span class='name'>{{max-usernames group.usernames max="3"}}</span>
|
||||||
|
|
|
@ -72,7 +72,7 @@
|
||||||
<div class="control-group pref-password">
|
<div class="control-group pref-password">
|
||||||
<label class="control-label">{{i18n 'user.password.title'}}</label>
|
<label class="control-label">{{i18n 'user.password.title'}}</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<a href="#" {{action "changePassword"}} class='btn'>
|
<a href {{action "changePassword"}} class='btn'>
|
||||||
{{fa-icon "envelope"}}
|
{{fa-icon "envelope"}}
|
||||||
{{#if model.no_password}}
|
{{#if model.no_password}}
|
||||||
{{i18n 'user.change_password.set_password'}}
|
{{i18n 'user.change_password.set_password'}}
|
||||||
|
|
|
@ -66,12 +66,12 @@ describe Email::Styles do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "attaches a style to a tags" do
|
it "attaches a style to a tags" do
|
||||||
frag = html_fragment("<a href='#'>wat</a>")
|
frag = html_fragment("<a href>wat</a>")
|
||||||
expect(frag.at('a')['style']).to be_present
|
expect(frag.at('a')['style']).to be_present
|
||||||
end
|
end
|
||||||
|
|
||||||
it "attaches a style to a tags" do
|
it "attaches a style to a tags" do
|
||||||
frag = html_fragment("<a href='#'>wat</a>")
|
frag = html_fragment("<a href>wat</a>")
|
||||||
expect(frag.at('a')['style']).to be_present
|
expect(frag.at('a')['style']).to be_present
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user