Fixes usage rights dialog styles

This commit also adds a way to specify a class to add to a tooltip.
All you need to do is "data-tooltip-class" and that class will be
applied to the tooltip when it opens.

fixes CNVS-17270

Test Plan:
	- Enable Usage Rights
	- Go to New Files
	- Select a mix of files with different usage rights and folders
          (You need at least 4 or 5 folders with different length names)
	- The warning icon should be spaced away from the warning text.
	- The tooltip text should be left aligned.

Change-Id: Ia5b9686dd870c50eca6c3ed778da8b2ba4305042
Reviewed-on: https://gerrit.instructure.com/45438
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
This commit is contained in:
Clay Diffrient 2014-12-08 15:32:24 -07:00
parent d217c07599
commit c45f93f819
3 changed files with 9 additions and 0 deletions

View File

@ -126,6 +126,9 @@ define [
opts.content = -> $(this).data('tooltip-title')
opts.items = '[data-tooltip-title]'
if $this.data('tooltip-class')
opts.tooltipClass = $this.data('tooltip-class')
$this
.removeAttr('data-tooltip')
.timeoutTooltip(opts)

View File

@ -111,6 +111,7 @@ define [
tabIndex: '0'
title: renderedNames
'data-tooltip': 'right'
'data-tooltip-class': 'UsageRightsDialog__tooltip'
},
I18n.t("and %{count} more…", {count: toolTipFolders.length})
span {className: 'screenreader-only'},

View File

@ -4,6 +4,7 @@
.UsageRightsDialog__warning {
color: $canvas-alert;
margin-right: 10px;
}
.UsageRightsDialog__andMore {
@ -15,6 +16,10 @@
padding: 10px;
}
.UsageRightsDialog__tooltip {
text-align: left !important; /* Important so it overides the default stuff */
}
.UsageRightsDialog__folderBulletList {
/* list-style-image: url(/images/mimeClassIcons/folder.svg)
would be better than this stuff, but sizing is hard with it. */