left-align quiz show dropdown items - order bug

links within the ember quiz show page should be left aligned. items in
the menu should be keyboard navigable and maintain order.

closes CNVS-13053

test plan:
  - enable ember quizzes
  - as instructor visit the quiz show page for a quiz
  - click on cog in top right corner
    - verify that items are left aligned within the dropdown
    - use keyboard arrows to move up and down the list
      - verify that selected item moves linearly through list

Change-Id: I52d5af3a7b4ae8a0da95425108fe1b83c5dd1831
Reviewed-on: https://gerrit.instructure.com/34915
Reviewed-by: Stanley Stuart <stanley@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Jason Madsen <jmadsen@instructure.com>
This commit is contained in:
Jason Madsen 2014-05-14 15:03:58 -06:00
parent 4e091e3278
commit 8e412e06aa
3 changed files with 19 additions and 13 deletions

View File

@ -72,6 +72,12 @@ define [
@replaceRoute 'quiz.moderate'
$.flashMessage I18n.t('now_on_moderate', 'This information is now found on the Moderate tab.')
toggleLock: ->
if @get('lockAt')
@send('unlock')
else
@send('lock')
lock: ->
updateAllDates.call(this, 'lockAt').then ->
$.flashMessage I18n.t('quiz_successfully_updated', 'Quiz Successfully Updated!')

View File

@ -32,12 +32,6 @@
<i class="icon-discussion"></i>
{{#t 'Message Students'}}Message Students{{/t}}
{{/ic-menu-item}}
{{#ic-menu-item class="js-delete" on-select="confirmDeletion"}}
<i class="icon-trash"></i>
{{#t "delete"}}Delete{{/t}}
{{/ic-menu-item}}
{{#ic-menu-item}}
<i class="icon-mark-as-read"></i>
{{#t 'preview'}}Preview{{/t}}
@ -48,19 +42,24 @@
{{#t 'show_quiz_results'}}Show Student Quiz Results{{/t}}
{{/ic-menu-item}}
{{#if lockAt}}
{{#ic-menu-item class="js-due-date-toggler" on-select="unlock"}}
{{! reuse existing ic-menu-item or order issues arise }}
{{#ic-menu-item class="js-due-date-toggler" on-select="toggleLock"}}
{{#if lockAt}}
<i class="icon-unlock"></i>
{{#t 'unlock_this_quiz_now'}}Unlock This Quiz Now{{/t}}
{{/ic-menu-item}}
{{else}}
{{#ic-menu-item class="js-due-date-toggler" on-select="lock"}}
{{else}}
<i class="icon-lock"></i>
{{#t 'lock_this_quiz_now'}}
Lock This Quiz Now
{{/t}}
{{/ic-menu-item}}
{{/if}}
{{/if}}
{{/ic-menu-item}}
{{#ic-menu-item class="js-delete" on-select="confirmDeletion"}}
<i class="icon-trash"></i>
{{#t "delete"}}Delete{{/t}}
{{/ic-menu-item}}
{{/ic-actions}}
</div>

View File

@ -226,6 +226,7 @@
ic-menu-list {
top: 32px;
right: 5px;
text-align: left;
}
}