Skip to content

Commit 169fb08

Browse files
Chris Hartmfairbourn
authored andcommitted
Update Announcement lock/delete buttonset icons
Fixes: CNVS-19019 This change turns off the javascript that populates the jQueryUI buttonset with background-image icons and instead adds them directly to the markup via the icon font. Test Plan: - Go to the Announcements page in a course - Select an existing Announcement from the main list via the checkbox. The lock/delete buttonset should appear in the header bar. - The buttonset should now look like this: http://cl.ly/image/0q3f170Y1H1u ...and not like this: https://help.instructure.com/attachments/token/CtARKfdli9FnpLwm3szEKmupO/?name=AnnouncementButtons.jpg Change-Id: I9c08160f943fdbe23e438c78d6fb199f8ed001ae Reviewed-on: https://gerrit.instructure.com/49861 Tested-by: Jenkins Product-Review: Hilary Scharton <hilary@instructure.com> Reviewed-by: Colleen Palmer <colleen@instructure.com> QA-Review: Steven Shepherd <sshepherd@instructure.com>
1 parent eb0fcf5 commit 169fb08

3 files changed

Lines changed: 17 additions & 14 deletions

File tree

app/coffeescripts/views/announcements/IndexView.coffee

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,6 @@ define [
100100
$actions.removeClass 'screenreader-only'
101101
$actions.find('button,input').prop('disabled', false)
102102
checkLock = _.any selectedTopics, (model) -> model.get('locked')
103-
$actions.find('#lock').prop('checked', checkLock).button
104-
text: false
105-
icons:
106-
primary: 'ui-icon-locked'
107-
$actions.find('#delete').button
108-
text: false
109-
icons:
110-
primary: 'ui-icon-trash'
111103
$actions.buttonset()
112104
else
113105
$actions.addClass 'screenreader-only'

app/stylesheets/vendor/jqueryui/_jquery.ui.button.scss

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,15 @@ We use jQuery UI button set
3131
.ui-button {
3232
margin-left: 0;
3333
margin-right: -5px;
34-
35-
// get rid of rounded borders except on left-most and right-most edges
36-
&:not(:first-of-type){ @include border-left-radius(0) }
37-
&:not(:last-of-type){ @include border-right-radius(0) }
34+
border-radius: 0;
35+
&.ui-corner-right {
36+
border-top-right-radius: $baseBorderRadius;
37+
border-bottom-right-radius: $baseBorderRadius;
38+
}
39+
&.ui-corner-left {
40+
border-top-left-radius: $baseBorderRadius;
41+
border-bottom-left-radius: $baseBorderRadius;
42+
}
3843
}
3944
}
4045

app/views/jst/announcements/IndexView.handlebars

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,14 @@
2626
{{/if}}
2727
<span id="actionsForSelectedDiscussions" class="screenreader-only">
2828
<input type="checkbox" id="lock" disabled="disabled"/>
29-
<label for="lock" data-tooltip>{{#t "lock_for_comments"}}Lock for comments{{/t}}</label>
30-
<button id="delete" data-tooltip disabled="disabled">{{#t "delete"}}Delete{{/t}}</button>
29+
<label for="lock" data-tooltip title="{{#t "lock_for_comments"}}Lock for comments{{/t}}">
30+
<i class="icon-lock"></i>
31+
<span class="screenreader-only">{{#t "lock_for_comments"}}Lock for comments{{/t}}</span>
32+
</label>
33+
<button id="delete" data-tooltip data-tooltip title="{{#t "delete"}}Delete{{/t}}" disabled="disabled">
34+
<i class="icon-trash"></i>
35+
<span class="screenreader-only">{{#t "delete"}}Delete{{/t}}</span>
36+
</button>
3137
</span>
3238

3339
{{#if options.permissions.create}}

0 commit comments

Comments
 (0)