FIX: tabindex was not set on the category chooser when creating a topic.

This commit is contained in:
Robin Ward 2014-09-04 13:50:32 -04:00
parent 742e2b1fa9
commit 52e25c9272
2 changed files with 8 additions and 7 deletions

View file

@ -16,7 +16,7 @@
{{#if canEdit}}
{{#if showEditReason}}
<div class="edit-reason-input">
{{text-field value=editReason tabindex="5" id="edit-reason" maxlength="255" placeholderKey="composer.edit_reason_placeholder"}}
{{text-field value=editReason tabindex="7" id="edit-reason" maxlength="255" placeholderKey="composer.edit_reason_placeholder"}}
</div>
{{else}}
<a {{action displayEditReason}} class="display-edit-reason">{{i18n composer.show_edit_reason}}</a>
@ -44,7 +44,7 @@
{{#unless model.privateMessage}}
<div class="category-input">
{{category-chooser valueAttribute="id" value=model.categoryId scopedCategoryId=scopedCategoryId}}
{{category-chooser valueAttribute="id" value=model.categoryId scopedCategoryId=scopedCategoryId tabindex="3"}}
{{popupInputTip validation=view.categoryValidation shownAt=view.showCategoryTip}}
</div>
{{#if model.archetype.hasOptions}}
@ -59,7 +59,7 @@
<div class='textarea-wrapper'>
<div class='wmd-button-bar' id='wmd-button-bar'></div>
<div id='wmd-preview-scroller'></div>
{{composer-text-area tabindex="3" value=model.reply}}
{{composer-text-area tabindex="4" value=model.reply}}
{{popupInputTip validation=view.replyValidation shownAt=view.showReplyTip}}
</div>
<!-- keep the classes here in sync with post.js.handlebars -->
@ -81,8 +81,8 @@
{{#if currentUser}}
<div class='submit-panel'>
<button {{action save}} tabindex="4" {{bind-attr class=":btn :btn-primary :create disableSubmit:disabled"}} title="{{i18n composer.title}}">{{model.saveText}}</button>
<a href='#' {{action cancel}} class='cancel' tabindex="4">{{i18n cancel}}</a>
<button {{action save}} tabindex="5" {{bind-attr class=":btn :btn-primary :create disableSubmit:disabled"}} title="{{i18n composer.title}}">{{model.saveText}}</button>
<a href='#' {{action cancel}} class='cancel' tabindex="6">{{i18n cancel}}</a>
</div>
{{/if}}

View file

@ -8,6 +8,7 @@
**/
export default Discourse.View.extend({
tagName: 'select',
attributeBindings: ['tabindex'],
classNames: ['combobox'],
valueAttribute: 'id',
@ -74,8 +75,8 @@ export default Discourse.View.extend({
},
willClearRender: function() {
var chosenId = "s2id_" + this.$().attr('id');
Ember.$("#" + chosenId).remove();
var elementId = "s2id_" + this.$().attr('id');
Ember.$("#" + elementId).remove();
}
});