prefer empty href attribute to #

This commit is contained in:
Régis Hanol 2015-09-08 18:27:20 +02:00
parent c0136eb6e6
commit e3a80936c8
15 changed files with 21 additions and 21 deletions

View File

@ -8,9 +8,9 @@
<div class="toggle">
<label>{{i18n 'admin.email.format'}}</label>
{{#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}}
<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}}
</div>
</div>

View File

@ -1,10 +1,10 @@
<div>
<ul class="nav nav-pills">
<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 {{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>
</ul>
<div class="modal-body">

View File

@ -19,7 +19,7 @@ export default Ember.Component.extend(StringBuffer, {
const renderActionIf = function(property, dataAttribute, text) {
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

View File

@ -91,7 +91,7 @@ export default function(options) {
transformed = _.isArray(transformedItem) ? transformedItem : [transformedItem || item];
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');
if (prev.length === 0) {
me.parent().prepend(d);

View File

@ -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}}
<span class='post-count'>{{unbound participant.post_count}}</span>
{{/if}}

View File

@ -93,7 +93,7 @@
<div class='submit-panel'>
{{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>
<a href='#' {{action "cancel"}} class='cancel' tabindex="6">{{i18n 'cancel'}}</a>
<a href {{action "cancel"}} class='cancel' tabindex="6">{{i18n 'cancel'}}</a>
</div>
{{/if}}

View File

@ -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}}}

View File

@ -46,10 +46,10 @@
loginAction="showLogin"
title="user.avatar.header_title"}}
{{#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 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}}
{{/header-dropdown}}
{{/if}}

View File

@ -20,7 +20,7 @@
{{#unless t.canClearPin}}<a href="{{unbound t.url}}">{{i18n 'read_more'}}</a>{{/unless}}
{{/if}}
{{#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}}
</div>
{{/if}}

View File

@ -30,7 +30,7 @@
{{#unless t.canClearPin}}<a href="{{unbound t.url}}">{{i18n 'read_more'}}</a>{{/unless}}
{{/if}}
{{#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}}
</div>
{{/if}}
@ -60,7 +60,7 @@
<figure title="{{i18n 'week_desc'}}">{{number c.topics_week}} <figcaption>{{i18n 'week'}}</figcaption></figure>
{{#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}}
</footer>

View File

@ -38,7 +38,7 @@
</div>
<h3>
{{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>
{{else}}
{{#if top}}

View File

@ -3,7 +3,7 @@
{{{i18n 'login.sent_activation_email_again' currentEmail=currentEmail}}}
{{else}}
{{{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}}
</div>
<div class="modal-footer">

View File

@ -2,7 +2,7 @@
<ul>
{{#each user in options.users}}
<li>
<a href='#'>{{avatar user imageSize="tiny"}}
<a href {{avatar user imageSize="tiny"}}
<span class='username'>{{user.username}}</span>
<span class='name'>{{user.name}}</span>
</a>
@ -12,7 +12,7 @@
{{#if options.users}}<hr>{{/if}}
{{#each group in options.groups}}
<li>
<a href=''>
<a href>
<i class='icon-group'></i>
<span class='username'>{{group.name}}</span>
<span class='name'>{{max-usernames group.usernames max="3"}}</span>

View File

@ -72,7 +72,7 @@
<div class="control-group pref-password">
<label class="control-label">{{i18n 'user.password.title'}}</label>
<div class="controls">
<a href="#" {{action "changePassword"}} class='btn'>
<a href {{action "changePassword"}} class='btn'>
{{fa-icon "envelope"}}
{{#if model.no_password}}
{{i18n 'user.change_password.set_password'}}

View File

@ -66,12 +66,12 @@ describe Email::Styles do
end
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
end
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
end