Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xblock-drag-and-drop-v2
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
OpenEdx
xblock-drag-and-drop-v2
Commits
dac6ba40
Commit
dac6ba40
authored
Sep 26, 2017
by
Matjaz Gregoric
Committed by
GitHub
Sep 26, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #132 from open-craft/cgopalan/adjust-feedback-popup-styles
[MCKIN-5772] Adjust feedback popup styles
parents
86e70248
969d5441
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
158 additions
and
26 deletions
+158
-26
.travis.yml
+1
-1
Changelog.md
+6
-0
drag_and_drop_v2/public/css/drag_and_drop.css
+105
-17
drag_and_drop_v2/public/js/drag_and_drop.js
+45
-7
setup.py
+1
-1
No files found.
.travis.yml
View file @
dac6ba40
...
@@ -12,7 +12,7 @@ install:
...
@@ -12,7 +12,7 @@ install:
-
"
pip
install
selenium==2.53.0"
-
"
pip
install
selenium==2.53.0"
-
"
pip
uninstall
-y
xblock-drag-and-drop-v2"
-
"
pip
uninstall
-y
xblock-drag-and-drop-v2"
-
"
python
setup.py
sdist"
-
"
python
setup.py
sdist"
-
"
pip
install
dist/xblock-drag-and-drop-v2-2.
0.18
.tar.gz"
-
"
pip
install
dist/xblock-drag-and-drop-v2-2.
1.1
.tar.gz"
script
:
script
:
-
pep8 drag_and_drop_v2 tests --max-line-length=120
-
pep8 drag_and_drop_v2 tests --max-line-length=120
-
pylint drag_and_drop_v2
-
pylint drag_and_drop_v2
...
...
Changelog.md
View file @
dac6ba40
Version 2.1.1 (2017-09-26)
---------------------------
*
Enforce XBlock variable types (PR #104)
*
Improvements for mobile (PRs #132, #133, #134)
Version 2.0.14 (2017-01-17)
Version 2.0.14 (2017-01-17)
---------------------------
---------------------------
...
...
drag_and_drop_v2/public/css/drag_and_drop.css
View file @
dac6ba40
...
@@ -112,6 +112,19 @@
...
@@ -112,6 +112,19 @@
z-index
:
10
!important
;
z-index
:
10
!important
;
}
}
@media
screen
and
(
max-width
:
480px
)
{
/* Horizontal scroll for item bank on mobile */
.xblock--drag-and-drop
.item-bank
{
-ms-flex-flow
:
row
nowrap
;
flex-flow
:
row
nowrap
;
overflow-x
:
auto
;
}
.xblock--drag-and-drop
.drag-container
.item-bank
.option
{
flex-shrink
:
0
;
}
}
.xblock--drag-and-drop
.drag-container
.option.specified-width
img
{
.xblock--drag-and-drop
.drag-container
.option.specified-width
img
{
width
:
100%
;
/* If the image is smaller than the specified width, make it larger */
width
:
100%
;
/* If the image is smaller than the specified width, make it larger */
}
}
...
@@ -405,7 +418,7 @@
...
@@ -405,7 +418,7 @@
max-width
:
100%
;
max-width
:
100%
;
}
}
.xblock--drag-and-drop
.popup
.close-feedback-popup-button
{
.xblock--drag-and-drop
.popup
.close-feedback-popup-
desktop-
button
{
cursor
:
pointer
;
cursor
:
pointer
;
margin-top
:
8px
;
margin-top
:
8px
;
color
:
#ffffff
;
color
:
#ffffff
;
...
@@ -413,22 +426,110 @@
...
@@ -413,22 +426,110 @@
font-size
:
18pt
;
font-size
:
18pt
;
}
}
.ltr
.xblock--drag-and-drop
.popup
.close-feedback-popup-button
{
.xblock--drag-and-drop
.popup
.close-feedback-popup-mobile-button
{
display
:
none
;
}
.xblock--drag-and-drop
.popup
.popup-header-icon
{
display
:
none
;
}
.xblock--drag-and-drop
.popup
.popup-header-text
{
display
:
none
;
}
.xblock--drag-and-drop
.popup
.popup-header-icon.popup-header-icon-incorrect
{
color
:
#ff143e
;
}
.ltr
.xblock--drag-and-drop
.popup
.close-feedback-popup-desktop-button
{
float
:
right
;
float
:
right
;
margin-right
:
8px
;
margin-right
:
8px
;
margin-left
:
20px
;
margin-left
:
20px
;
}
}
.rtl
.xblock--drag-and-drop
.popup
.close-feedback-popup-button
{
.rtl
.xblock--drag-and-drop
.popup
.close-feedback-popup-
desktop-
button
{
float
:
left
;
float
:
left
;
margin-right
:
20px
;
margin-right
:
20px
;
margin-left
:
8px
;
margin-left
:
8px
;
}
}
.xblock--drag-and-drop
.popup
.close-feedback-popup-button
:focus
{
.xblock--drag-and-drop
.popup
.close-feedback-popup-
desktop-
button
:focus
{
outline
:
2px
dotted
white
;
outline
:
2px
dotted
white
;
}
}
@media
screen
and
(
max-width
:
480px
)
{
.xblock--drag-and-drop
.popup
.popup-content
p
{
text-align
:
center
;
}
.xblock--drag-and-drop
.popup
{
background-color
:
#fff
;
border-radius
:
10px
;
text-align
:
center
;
box-shadow
:
0
0
100px
rgba
(
0
,
0
,
0
,
0.4
);
border
:
none
;
max-height
:
90vh
;
}
.xblock--drag-and-drop
.popup
.close-feedback-popup-desktop-button
{
display
:
none
;
}
.xblock--drag-and-drop
.popup.popup-incorrect
{
background-color
:
#fff
;
}
.xblock--drag-and-drop
.popup
.popup-header-icon
{
display
:
inline-block
;
margin-top
:
10px
;
color
:
#629a2c
;
font-size
:
20pt
;
}
.xblock--drag-and-drop
.popup
.popup-header-icon.popup-header-icon-incorrect
{
color
:
#ff143e
;
}
.xblock--drag-and-drop
.popup
.popup-header-text
{
display
:
block
;
padding
:
2px
0
8px
;
font-weight
:
600
;
}
.xblock--drag-and-drop
.popup
.popup-content
{
color
:
#629a2c
;
margin
:
10px
0px
0px
0px
;
font-size
:
14px
;
background-color
:
#f4ffe7
;
padding
:
20px
;
border-color
:
#eee
;
border-style
:
solid
;
border-width
:
1px
0
1px
0
;
}
.xblock--drag-and-drop
.popup
.popup-content
ul
{
list-style-position
:
inside
;
padding
:
0
;
}
.xblock--drag-and-drop
.popup
.popup-content.popup-content-incorrect
{
color
:
#ff143e
;
background-color
:
#ffe8ec
;
}
.xblock--drag-and-drop
.popup
.close-feedback-popup-mobile-button
{
display
:
inline
;
cursor
:
pointer
;
margin-top
:
10px
;
margin-bottom
:
10px
;
color
:
#3384ca
;
font-size
:
12pt
;
padding
:
10px
;
}
}
/*** edX pattern library components ***/
/*** edX pattern library components ***/
/* reset stock edx-platform button styles */
/* reset stock edx-platform button styles */
...
@@ -586,19 +687,6 @@
...
@@ -586,19 +687,6 @@
}
}
}
}
@media
screen
and
(
max-width
:
480px
)
{
/* Horizontal scroll for item bank on mobile */
.xblock--drag-and-drop
.drag-container
.item-bank
.option
{
flex-shrink
:
0
;
}
.xblock--drag-and-drop
.item-bank
{
-ms-flex-flow
:
row
nowrap
;
flex-flow
:
row
nowrap
;
overflow-x
:
auto
;
}
}
.xblock--drag-and-drop
.sidebar-buttons
.sidebar-button-wrapper
{
.xblock--drag-and-drop
.sidebar-buttons
.sidebar-button-wrapper
{
border-collapse
:
collapse
;
border-collapse
:
collapse
;
padding
:
0
5px
;
padding
:
0
5px
;
...
...
drag_and_drop_v2/public/js/drag_and_drop.js
View file @
dac6ba40
...
@@ -427,11 +427,19 @@ function DragAndDropTemplates(configuration) {
...
@@ -427,11 +427,19 @@ function DragAndDropTemplates(configuration) {
return
h
(
"li"
,
{
innerHTML
:
message
.
message
});
return
h
(
"li"
,
{
innerHTML
:
message
.
message
});
}))
}))
];
];
popup_content
=
h
(
"div.popup-content"
,
{},
have_messages
?
content_items
:
[]);
popup_content
=
h
(
ctx
.
last_action_correct
?
"div.popup-content"
:
"div.popup-content.popup-content-incorrect"
,
{},
have_messages
?
content_items
:
[]
);
}
else
{
}
else
{
popup_content
=
h
(
"div.popup-content"
,
{},
msgs
.
map
(
function
(
message
)
{
popup_content
=
h
(
return
h
(
"p"
,
{
innerHTML
:
message
.
message
});
ctx
.
last_action_correct
?
"div.popup-content"
:
"div.popup-content.popup-content-incorrect"
,
}))
{},
msgs
.
map
(
function
(
message
)
{
return
h
(
"p"
,
{
innerHTML
:
message
.
message
});
})
);
}
}
return
h
(
return
h
(
...
@@ -441,7 +449,7 @@ function DragAndDropTemplates(configuration) {
...
@@ -441,7 +449,7 @@ function DragAndDropTemplates(configuration) {
},
},
[
[
h
(
h
(
'button.unbutton.close-feedback-popup-button'
,
'button.unbutton.close-feedback-popup-button
.close-feedback-popup-desktop-button
'
,
{},
{},
[
[
h
(
h
(
...
@@ -460,7 +468,37 @@ function DragAndDropTemplates(configuration) {
...
@@ -460,7 +468,37 @@ function DragAndDropTemplates(configuration) {
)
)
]
]
),
),
popup_content
h
(
ctx
.
last_action_correct
?
'div.popup-header-icon'
:
'div.popup-header-icon.popup-header-icon-incorrect'
,
{},
[
h
(
ctx
.
last_action_correct
?
'span.icon.fa.fa-check-circle'
:
'span.icon.fa.fa-exclamation-circle'
,
{
attributes
:
{
'aria-hidden'
:
true
}
}
)
]
),
h
(
'div.popup-header-text'
,
{},
ctx
.
last_action_correct
?
gettext
(
"Correct"
)
:
gettext
(
"Incorrect"
)
),
popup_content
,
h
(
'button.unbutton.close-feedback-popup-button.close-feedback-popup-mobile-button'
,
{},
[
h
(
'span'
,
{},
gettext
(
"Close"
)
)
]
)
]
]
)
)
};
};
...
@@ -1092,7 +1130,7 @@ function DragAndDropBlock(runtime, element, configuration) {
...
@@ -1092,7 +1130,7 @@ function DragAndDropBlock(runtime, element, configuration) {
var
focusItemFeedbackPopup
=
function
()
{
var
focusItemFeedbackPopup
=
function
()
{
var
popup
=
$root
.
find
(
'.item-feedback-popup'
);
var
popup
=
$root
.
find
(
'.item-feedback-popup'
);
if
(
popup
.
length
&&
popup
.
is
(
":visible"
))
{
if
(
popup
.
length
&&
popup
.
is
(
":visible"
))
{
popup
.
find
(
'.close-feedback-popup-button'
).
focus
();
popup
.
find
(
'.close-feedback-popup-button
:visible
'
).
focus
();
return
true
;
return
true
;
}
}
return
false
;
return
false
;
...
...
setup.py
View file @
dac6ba40
...
@@ -23,7 +23,7 @@ def package_data(pkg, root_list):
...
@@ -23,7 +23,7 @@ def package_data(pkg, root_list):
setup
(
setup
(
name
=
'xblock-drag-and-drop-v2'
,
name
=
'xblock-drag-and-drop-v2'
,
version
=
'2.
0.18
'
,
version
=
'2.
1.1
'
,
description
=
'XBlock - Drag-and-Drop v2'
,
description
=
'XBlock - Drag-and-Drop v2'
,
packages
=
[
'drag_and_drop_v2'
],
packages
=
[
'drag_and_drop_v2'
],
install_requires
=
[
install_requires
=
[
...
...
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