Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-ora2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-ora2
Commits
50af4c8e
Commit
50af4c8e
authored
Mar 24, 2014
by
Brian Talbot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding in UI support for tooltips/hints on grade report
parent
50583fbc
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
333 additions
and
5 deletions
+333
-5
apps/openassessment/templates/openassessmentblock/grade/oa_grade_complete.html
+5
-5
apps/openassessment/xblock/static/css/openassessment.css
+0
-0
apps/openassessment/xblock/static/sass/oa/elements/_navigation.scss
+34
-0
apps/openassessment/xblock/static/sass/oa/utilities/_shame.scss
+9
-0
apps/openassessment/xblock/static/sass/oa/views/_oa-base.scss
+2
-0
apps/openassessment/xblock/static/sass/openassessment.scss
+1
-0
apps/openassessment/xblock/static/sass/vendor/_hint.scss
+282
-0
No files found.
apps/openassessment/templates/openassessmentblock/grade/oa_grade_complete.html
View file @
50af4c8e
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
</span>
</span>
</h4>
</h4>
<ul
class=
"question__answers ui-toggle-visibility__content"
>
<ul
class=
"question__answers ui-toggle-visibility__content
has--hints
"
>
{% for assessment in peer_assessments %}
{% for assessment in peer_assessments %}
{% with peer_num=forloop.counter %}
{% with peer_num=forloop.counter %}
{% for part in assessment.parts %}
{% for part in assessment.parts %}
...
@@ -63,8 +63,8 @@
...
@@ -63,8 +63,8 @@
<span
class=
"answer__value__value"
>
<span
class=
"answer__value__value"
>
{{ part.option.name }}
{{ part.option.name }}
<span
class=
"ui-
tooltip"
title
=
"{{ part.option.explanation }}"
>
<span
class=
"ui-
hint hint--top"
data-hint
=
"{{ part.option.explanation }}"
>
<i
class=
"ico icon-info-sign"
title=
"More Information on {{ part.option.name }}"
></i>
<i
class=
"ico icon-info-sign"
title=
"More Information on {{ part.option.name }}"
></i>
</span>
</span>
</span>
</span>
</span>
</span>
...
@@ -92,8 +92,8 @@
...
@@ -92,8 +92,8 @@
<span
class=
"answer__value__value"
>
<span
class=
"answer__value__value"
>
{{ part.option.name }}
{{ part.option.name }}
<span
class=
"ui-
tooltip"
title
=
"{{ part.option.explanation }}"
>
<span
class=
"ui-
hint hint--top"
data-hint
=
"{{ part.option.explanation }}"
>
<i
class=
"ico icon-info-sign"
title=
"More Information on {{ part.option.name }}"
></i>
<i
class=
"ico icon-info-sign"
title=
"More Information on {{ part.option.name }}"
></i>
</span>
</span>
</span>
</span>
</span>
</span>
...
...
apps/openassessment/xblock/static/css/openassessment.css
View file @
50af4c8e
This source diff could not be displayed because it is too large. You can
view the blob
instead.
apps/openassessment/xblock/static/sass/oa/elements/_navigation.scss
View file @
50af4c8e
...
@@ -68,3 +68,37 @@
...
@@ -68,3 +68,37 @@
}
}
}
}
}
}
// --------------------
// ui tooltips/hints - based on https://github.com/chinchang/hint.css
// --------------------
.has--hints
{
overflow
:
visible
;
}
.ui-hint
{
@extend
%fake-link
;
.ico
{
margin-left
:
(
$baseline-h
/
8
);
}
// STATE: hover
&
:hover
,
&
:focus
{
color
:
$action-primary-color-focus
;
}
// actual tooltip rendered
&
:after
{
left
:
0
;
display
:
block
;
white-space
:
normal
;
width
:
(
$baseline-h
*
5
);
background
:
$black-t3
;
}
&
.hint--top
:after
{
left
:
0
;
margin-left
:
-
(
$baseline-v
);
}
}
apps/openassessment/xblock/static/sass/oa/utilities/_shame.scss
View file @
50af4c8e
...
@@ -174,4 +174,13 @@
...
@@ -174,4 +174,13 @@
.openassessment__steps__step
.step__header
.step__title
{
.openassessment__steps__step
.step__header
.step__title
{
margin-bottom
:
0
;
margin-bottom
:
0
;
}
}
// --------------------
// needed overrides
// --------------------
.ui-hint
:after
{
@extend
%copy-4
;
@extend
%deco-shadow-down
;
}
}
}
apps/openassessment/xblock/static/sass/oa/views/_oa-base.scss
View file @
50af4c8e
...
@@ -759,6 +759,7 @@
...
@@ -759,6 +759,7 @@
// rubric options
// rubric options
.question__answers
{
.question__answers
{
@extend
%ui-rubric-answers
;
@extend
%ui-rubric-answers
;
overflow
:
visible
;
// needed for ui-hints
}
}
// genereal feedback question
// genereal feedback question
...
@@ -964,6 +965,7 @@
...
@@ -964,6 +965,7 @@
@extend
%no-list
;
@extend
%no-list
;
@extend
%wipe-last-child
;
@extend
%wipe-last-child
;
@include
row
();
@include
row
();
overflow
:
visible
;
// needed for ui-hints
}
}
// individual answers
// individual answers
...
...
apps/openassessment/xblock/static/sass/openassessment.scss
View file @
50af4c8e
...
@@ -70,6 +70,7 @@
...
@@ -70,6 +70,7 @@
// app - openassessment:
// app - openassessment:
// specific UI for this application
// specific UI for this application
// --------------------
// --------------------
@import
'vendor/hint'
;
// vendor - hint/tooltip UI
@import
'oa/utilities/variables'
;
// specific variables and overrides
@import
'oa/utilities/variables'
;
// specific variables and overrides
@import
'oa/utilities/extends'
;
// open assessment extends
@import
'oa/utilities/extends'
;
// open assessment extends
@import
'oa/elements/header'
;
// view/app headers
@import
'oa/elements/header'
;
// view/app headers
...
...
apps/openassessment/xblock/static/sass/vendor/_hint.scss
0 → 100644
View file @
50af4c8e
/*! Hint.css - v1.3.1 - 2013-11-23
* http://kushagragour.in/lab/hint/
* Copyright (c) 2013 Kushagra Gour; Licensed MIT */
/*-------------------------------------*\
HINT.css - A CSS tooltip library
\*-------------------------------------*/
/**
* HINT.css is a tooltip library made in pure CSS.
*
* Source: https://github.com/chinchang/hint.css
* Demo: http://kushagragour.in/lab/hint/
*
* Release under The MIT License
*
*/
/**
* source: hint-core.scss
*
* Defines the basic styling for the tooltip.
* Each tooltip is made of 2 parts:
* 1) body (:after)
* 2) arrow (:before)
*
* Classes added:
* 1) hint
*/
.hint
,
[
data-hint
]
{
position
:
relative
;
display
:
inline-block
;
/**
* tooltip arrow
*/
/**
* tooltip body
*/
}
.hint
:before
,
.hint
:after
,
[
data-hint
]
:before
,
[
data-hint
]
:after
{
position
:
absolute
;
-webkit-transform
:
translate3d
(
0
,
0
,
0
);
-moz-transform
:
translate3d
(
0
,
0
,
0
);
transform
:
translate3d
(
0
,
0
,
0
);
visibility
:
hidden
;
opacity
:
0
;
z-index
:
1000000
;
pointer-events
:
none
;
-webkit-transition
:
0
.3s
ease
;
-moz-transition
:
0
.3s
ease
;
transition
:
0
.3s
ease
;
}
.hint
:hover:before
,
.hint
:hover:after
,
.hint
:focus:before
,
.hint
:focus:after
,
[
data-hint
]
:hover:before
,
[
data-hint
]
:hover:after
,
[
data-hint
]
:focus:before
,
[
data-hint
]
:focus:after
{
visibility
:
visible
;
opacity
:
1
;
}
.hint
:before
,
[
data-hint
]
:before
{
content
:
''
;
position
:
absolute
;
background
:
transparent
;
border
:
6px
solid
transparent
;
z-index
:
1000001
;
}
.hint
:after
,
[
data-hint
]
:after
{
content
:
attr
(
data-hint
);
background
:
#383838
;
color
:
white
;
text-shadow
:
0
-1px
0px
black
;
padding
:
8px
10px
;
font-size
:
12px
;
line-height
:
12px
;
white-space
:
nowrap
;
box-shadow
:
4px
4px
8px
rgba
(
0
,
0
,
0
,
0
.3
);
}
/**
* source: hint-position.scss
*
* Defines the positoning logic for the tooltips.
*
* Classes added:
* 1) hint--top
* 2) hint--bottom
* 3) hint--left
* 4) hint--right
*/
/**
* set default color for tooltip arrows
*/
.hint--top
:before
{
border-top-color
:
#383838
;
}
.hint--bottom
:before
{
border-bottom-color
:
#383838
;
}
.hint--left
:before
{
border-left-color
:
#383838
;
}
.hint--right
:before
{
border-right-color
:
#383838
;
}
/**
* top tooltip
*/
.hint--top
:before
{
margin-bottom
:
-12px
;
}
.hint--top
:after
{
margin-left
:
-18px
;
}
.hint--top
:before
,
.hint--top
:after
{
bottom
:
100%
;
left
:
50%
;
}
.hint--top
:hover:after
,
.hint--top
:hover:before
,
.hint--top
:focus:after
,
.hint--top
:focus:before
{
-webkit-transform
:
translateY
(
-8px
);
-moz-transform
:
translateY
(
-8px
);
transform
:
translateY
(
-8px
);
}
/**
* bottom tooltip
*/
.hint--bottom
:before
{
margin-top
:
-12px
;
}
.hint--bottom
:after
{
margin-left
:
-18px
;
}
.hint--bottom
:before
,
.hint--bottom
:after
{
top
:
100%
;
left
:
50%
;
}
.hint--bottom
:hover:after
,
.hint--bottom
:hover:before
,
.hint--bottom
:focus:after
,
.hint--bottom
:focus:before
{
-webkit-transform
:
translateY
(
8px
);
-moz-transform
:
translateY
(
8px
);
transform
:
translateY
(
8px
);
}
/**
* right tooltip
*/
.hint--right
:before
{
margin-left
:
-12px
;
margin-bottom
:
-6px
;
}
.hint--right
:after
{
margin-bottom
:
-14px
;
}
.hint--right
:before
,
.hint--right
:after
{
left
:
100%
;
bottom
:
50%
;
}
.hint--right
:hover:after
,
.hint--right
:hover:before
,
.hint--right
:focus:after
,
.hint--right
:focus:before
{
-webkit-transform
:
translateX
(
8px
);
-moz-transform
:
translateX
(
8px
);
transform
:
translateX
(
8px
);
}
/**
* left tooltip
*/
.hint--left
:before
{
margin-right
:
-12px
;
margin-bottom
:
-6px
;
}
.hint--left
:after
{
margin-bottom
:
-14px
;
}
.hint--left
:before
,
.hint--left
:after
{
right
:
100%
;
bottom
:
50%
;
}
.hint--left
:hover:after
,
.hint--left
:hover:before
,
.hint--left
:focus:after
,
.hint--left
:focus:before
{
-webkit-transform
:
translateX
(
-8px
);
-moz-transform
:
translateX
(
-8px
);
transform
:
translateX
(
-8px
);
}
/**
* source: hint-color-types.scss
*
* Contains tooltips of various types based on color differences.
*
* Classes added:
* 1) hint--error
* 2) hint--warning
* 3) hint--info
* 4) hint--success
*
*/
/**
* Error
*/
.hint--error
:after
{
background-color
:
#b34e4d
;
text-shadow
:
0
-1px
0px
#592726
;
}
.hint--error.hint--top
:before
{
border-top-color
:
#b34e4d
;
}
.hint--error.hint--bottom
:before
{
border-bottom-color
:
#b34e4d
;
}
.hint--error.hint--left
:before
{
border-left-color
:
#b34e4d
;
}
.hint--error.hint--right
:before
{
border-right-color
:
#b34e4d
;
}
/**
* Warning
*/
.hint--warning
:after
{
background-color
:
#c09854
;
text-shadow
:
0
-1px
0px
#6c5328
;
}
.hint--warning.hint--top
:before
{
border-top-color
:
#c09854
;
}
.hint--warning.hint--bottom
:before
{
border-bottom-color
:
#c09854
;
}
.hint--warning.hint--left
:before
{
border-left-color
:
#c09854
;
}
.hint--warning.hint--right
:before
{
border-right-color
:
#c09854
;
}
/**
* Info
*/
.hint--info
:after
{
background-color
:
#3986ac
;
text-shadow
:
0
-1px
0px
#193b4d
;
}
.hint--info.hint--top
:before
{
border-top-color
:
#3986ac
;
}
.hint--info.hint--bottom
:before
{
border-bottom-color
:
#3986ac
;
}
.hint--info.hint--left
:before
{
border-left-color
:
#3986ac
;
}
.hint--info.hint--right
:before
{
border-right-color
:
#3986ac
;
}
/**
* Success
*/
.hint--success
:after
{
background-color
:
#458746
;
text-shadow
:
0
-1px
0px
#1a321a
;
}
.hint--success.hint--top
:before
{
border-top-color
:
#458746
;
}
.hint--success.hint--bottom
:before
{
border-bottom-color
:
#458746
;
}
.hint--success.hint--left
:before
{
border-left-color
:
#458746
;
}
.hint--success.hint--right
:before
{
border-right-color
:
#458746
;
}
/**
* source: hint-always.scss
*
* Defines a persisted tooltip which shows always.
*
* Classes added:
* 1) hint--always
*
*/
.hint--always
:after
,
.hint--always
:before
{
opacity
:
1
;
visibility
:
visible
;
}
.hint--always.hint--top
:after
,
.hint--always.hint--top
:before
{
-webkit-transform
:
translateY
(
-8px
);
-moz-transform
:
translateY
(
-8px
);
transform
:
translateY
(
-8px
);
}
.hint--always.hint--bottom
:after
,
.hint--always.hint--bottom
:before
{
-webkit-transform
:
translateY
(
8px
);
-moz-transform
:
translateY
(
8px
);
transform
:
translateY
(
8px
);
}
.hint--always.hint--left
:after
,
.hint--always.hint--left
:before
{
-webkit-transform
:
translateX
(
-8px
);
-moz-transform
:
translateX
(
-8px
);
transform
:
translateX
(
-8px
);
}
.hint--always.hint--right
:after
,
.hint--always.hint--right
:before
{
-webkit-transform
:
translateX
(
8px
);
-moz-transform
:
translateX
(
8px
);
transform
:
translateX
(
8px
);
}
/**
* source: hint-rounded.scss
*
* Defines rounded corner tooltips.
*
* Classes added:
* 1) hint--rounded
*
*/
.hint--rounded
:after
{
border-radius
:
4px
;
}
/**
* source: hint-effects.scss
*
* Defines various transition effects for the tooltips.
*
* Classes added:
* 1) hint--bounce
*
*/
.hint--bounce
:before
,
.hint--bounce
:after
{
-webkit-transition
:
opacity
0
.3s
ease
,
visibility
0
.3s
ease
,
-
webkit-transform
0
.3s
cubic-bezier
(
0
.71
,
1
.7
,
0
.77
,
1
.24
);
-moz-transition
:
opacity
0
.3s
ease
,
visibility
0
.3s
ease
,
-
moz-transform
0
.3s
cubic-bezier
(
0
.71
,
1
.7
,
0
.77
,
1
.24
);
transition
:
opacity
0
.3s
ease
,
visibility
0
.3s
ease
,
transform
0
.3s
cubic-bezier
(
0
.71
,
1
.7
,
0
.77
,
1
.24
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment