clean up accounts#show stylesheets, js.
remove hover javascript that was adding .info_hover class and replace it with :hover css rules. additionally, always show action links on touch devices. test plan: * navigate to /accounts/:id; * mouse over the listed courses and verify that the action links display on hover; * add the "touch" class to the body element and verify that all of the action links display. Change-Id: I5fb7fc8070f03addf0ee5e40b9ddba154023e615 Reviewed-on: https://gerrit.instructure.com/12379 Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: Ryan Shaw <ryan@instructure.com>
This commit is contained in:
parent
5dc3a17133
commit
acf0e65914
|
@ -1,12 +1,6 @@
|
|||
define ['jquery', 'jqueryui/autocomplete'], ($) ->
|
||||
page =
|
||||
init: ->
|
||||
$('.courses .course, .groups .group').on 'focus mouseover', (e) ->
|
||||
$(this).find('.info').addClass('info_hover')
|
||||
|
||||
$('.courses .course, .groups .group').on 'blur mouseout', (e) ->
|
||||
$(this).find('.info').removeClass('info_hover')
|
||||
|
||||
if $('#new_course').length > 0
|
||||
reEscape = new RegExp('(\\' + ['/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\'].join('|\\') + ')', 'g')
|
||||
$newCourseForm = $('#new_course')
|
||||
|
|
|
@ -396,38 +396,43 @@ table.formtable td
|
|||
vertical-align: top
|
||||
padding: 2px 3px
|
||||
|
||||
|
||||
.courses,
|
||||
.groups,
|
||||
.accounts
|
||||
.courses, .groups, .accounts
|
||||
.name
|
||||
font-size: 1.1em
|
||||
font-weight: bold
|
||||
.unpublished .name a
|
||||
:color #888
|
||||
.details
|
||||
margin-left: 10px
|
||||
font-size: 0.8em
|
||||
color: #888
|
||||
.info
|
||||
:font-size 0.8em
|
||||
:clear left
|
||||
:visibility hidden
|
||||
:margin-bottom 5px
|
||||
:margin-left 10px
|
||||
&.info_hover
|
||||
:visibility visible
|
||||
.links
|
||||
:color #ccc
|
||||
a
|
||||
:color #666
|
||||
.links
|
||||
:color #eee
|
||||
a
|
||||
:color #bbb
|
||||
|
||||
a
|
||||
:color #888
|
||||
.unpublished .name a
|
||||
color: #888
|
||||
|
||||
.details
|
||||
color: #888
|
||||
font-size: 0.8em
|
||||
margin: 0 0 0 10px
|
||||
|
||||
.info
|
||||
clear: left
|
||||
font-size: 0.8em
|
||||
margin: 0 0 5px 10px
|
||||
visibility: hidden
|
||||
|
||||
.links
|
||||
color: #eee
|
||||
a
|
||||
color: #bbb
|
||||
|
||||
.touch .course,
|
||||
.touch .group,
|
||||
.touch .account,
|
||||
.course:hover,
|
||||
.group:hover,
|
||||
.account:hover
|
||||
.course, .group, .account
|
||||
.info
|
||||
visibility: visible
|
||||
.links
|
||||
color: #ccc
|
||||
a
|
||||
color: #666
|
||||
|
||||
span.hint
|
||||
:color #666
|
||||
|
|
|
@ -13,19 +13,3 @@
|
|||
<%= render :partial => "course", :collection => @courses %>
|
||||
<%= render :partial => "course", :object => nil %>
|
||||
</ul>
|
||||
<% js_block do %>
|
||||
<script>
|
||||
require([
|
||||
'jquery' /* $ */
|
||||
], function($) {
|
||||
$(document).ready(function() {
|
||||
$(".courses .course,.groups .group").bind('focus mouseover', function(event) {
|
||||
$(this).find(".info").addClass('info_hover');
|
||||
});
|
||||
$(".courses .course,.groups .group").bind('blur mouseout', function(event) {
|
||||
$(this).find(".info").removeClass('info_hover');
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in New Issue