Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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-platform
Commits
545b1bea
Commit
545b1bea
authored
Dec 26, 2012
by
Valera Rozuvan
Committed by
Alexander Kryklia
Jan 21, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Slight changes to UI design.
parent
30488537
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
95 additions
and
20 deletions
+95
-20
common/static/images/arrow-left.png
+0
-0
common/static/images/arrow-right.png
+0
-0
common/static/js/capa/drag_and_drop/container.js
+0
-2
common/static/js/capa/drag_and_drop/draggables.js
+1
-0
common/static/js/capa/drag_and_drop/scroller.js
+93
-17
common/static/js/capa/drag_and_drop/targets.js
+1
-1
No files found.
common/static/images/arrow-left.png
View replaced file @
30488537
View file @
545b1bea
2.41 KB
|
W:
|
H:
1.04 KB
|
W:
|
H:
2-up
Swipe
Onion skin
common/static/images/arrow-right.png
View replaced file @
30488537
View file @
545b1bea
2.4 KB
|
W:
|
H:
1.05 KB
|
W:
|
H:
2-up
Swipe
Onion skin
common/static/js/capa/drag_and_drop/container.js
View file @
545b1bea
...
@@ -11,8 +11,6 @@ define(['logme'], function (logme) {
...
@@ -11,8 +11,6 @@ define(['logme'], function (logme) {
state
.
containerEl
=
$
(
state
.
containerEl
=
$
(
'<div '
+
'<div '
+
'style=" '
+
'style=" '
+
'border: 1px solid black; '
+
// 'overflow: hidden; ' +
'clear: both; '
+
'clear: both; '
+
'" '
+
'" '
+
'></div>'
'></div>'
...
...
common/static/js/capa/drag_and_drop/draggables.js
View file @
545b1bea
...
@@ -35,6 +35,7 @@ define(['logme', 'update_input'], function (logme, updateInput) {
...
@@ -35,6 +35,7 @@ define(['logme', 'update_input'], function (logme, updateInput) {
'float: left; '
+
'float: left; '
+
'overflow: hidden; '
+
'overflow: hidden; '
+
'z-index: '
+
index
+
'; '
+
'z-index: '
+
index
+
'; '
+
'border: 1px solid gray; '
+
'" '
+
'" '
+
'data-draggable-position-index="'
+
index
+
'" '
+
'data-draggable-position-index="'
+
index
+
'" '
+
'></div>'
'></div>'
...
...
common/static/js/capa/drag_and_drop/scroller.js
View file @
545b1bea
...
@@ -13,9 +13,8 @@ define(['logme'], function (logme) {
...
@@ -13,9 +13,8 @@ define(['logme'], function (logme) {
parentEl
=
$
(
parentEl
=
$
(
'<div '
+
'<div '
+
'style=" '
+
'style=" '
+
'width: 95%; '
+
'width: 100%; '
+
'height: 100px; '
+
'height: 102px; '
+
'border: 1px solid black; '
+
'margin-left: auto; '
+
'margin-left: auto; '
+
'margin-right: auto; '
+
'margin-right: auto; '
+
'" '
+
'" '
+
...
@@ -26,27 +25,74 @@ define(['logme'], function (logme) {
...
@@ -26,27 +25,74 @@ define(['logme'], function (logme) {
'<div '
+
'<div '
+
'style=" '
+
'style=" '
+
'width: 6%; '
+
'width: 6%; '
+
'height: 10
0
px; '
+
'height: 10
2
px; '
+
'display: inline; '
+
'display: inline; '
+
'float: left; '
+
'float: left; '
+
'background: url(
\'
/static/images/arrow-left.png
\'
) center center no-repeat; '
+
'" '
+
'" '
+
'></div>'
'>'
+
'<div '
+
'style=" '
+
'width: 80%; '
+
'height: 50px; '
+
'margin-left: auto; '
+
'margin-right: auto; '
+
'margin-top: 26px; '
+
'border: 1px solid #CCC; '
+
'background-color: #EEE; '
+
'background-image: -webkit-linear-gradient(top, #EEE, #DDD); '
+
'background-image: -moz-linear-gradient(top, #EEE, #DDD); '
+
'background-image: -ms-linear-gradient(top, #EEE, #DDD); '
+
'background-image: -o-linear-gradient(top, #EEE, #DDD); '
+
'background-image: linear-gradient(top, #EEE, #DDD); '
+
'-webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset; '
+
'box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset; '
+
'background-image: url(
\'
/static/images/arrow-left.png
\'
); '
+
'background-position: center center; '
+
'background-repeat: no-repeat; '
+
'border-radius: 35px 0 0 35px; '
+
'" '
+
'></div>'
+
'</div>'
);
);
moveLeftEl
.
appendTo
(
parentEl
);
moveLeftEl
.
appendTo
(
parentEl
);
/*
position: absolute;
margin-bottom: 0;
height: 44px;
width: 70px;
border: 1px solid #CCC;
background-color: #EEE;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #EEE), color-stop(100%, #DDD));
background-image: -webkit-linear-gradient(top, #EEE, #DDD);
background-image: -moz-linear-gradient(top, #EEE, #DDD);
background-image: -ms-linear-gradient(top, #EEE, #DDD);
background-image: -o-linear-gradient(top, #EEE, #DDD);
background-image: linear-gradient(top, #EEE, #DDD);
-webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
-moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
*/
moveLeftEl
.
click
(
function
()
{
moveLeftEl
.
click
(
function
()
{
showElLeftMargin
+=
100
;
if
(
showElLeftMargin
>
-
102
)
{
return
;
}
showElLeftMargin
+=
102
;
state
.
sliderEl
.
animate
({
state
.
sliderEl
.
animate
({
'margin-left'
:
showElLeftMargin
+
'px'
'margin-left'
:
showElLeftMargin
+
'px'
});
}
,
100
);
});
});
showEl
=
$
(
showEl
=
$
(
'<div '
+
'<div '
+
'style=" '
+
'style=" '
+
'width:
88%
; '
+
'width:
714px
; '
+
'height: 10
0
px; '
+
'height: 10
2
px; '
+
'overflow: hidden; '
+
'overflow: hidden; '
+
'display: inline; '
+
'display: inline; '
+
'float: left; '
+
'float: left; '
+
...
@@ -60,8 +106,8 @@ define(['logme'], function (logme) {
...
@@ -60,8 +106,8 @@ define(['logme'], function (logme) {
state
.
sliderEl
=
$
(
state
.
sliderEl
=
$
(
'<div '
+
'<div '
+
'style=" '
+
'style=" '
+
'width:
8
00px; '
+
'width:
200
00px; '
+
'height: 10
0
px; '
+
'height: 10
2
px; '
+
'" '
+
'" '
+
'></div>'
'></div>'
);
);
...
@@ -71,20 +117,50 @@ define(['logme'], function (logme) {
...
@@ -71,20 +117,50 @@ define(['logme'], function (logme) {
'<div '
+
'<div '
+
'style=" '
+
'style=" '
+
'width: 6%; '
+
'width: 6%; '
+
'height: 10
0
px; '
+
'height: 10
2
px; '
+
'display: inline; '
+
'display: inline; '
+
'float: left; '
+
'float: left; '
+
'background: url(
\'
/static/images/arrow-right.png
\'
) center center no-repeat; '
+
//
'background: url(\'/static/images/arrow-right.png\') center center no-repeat; ' +
'" '
+
'" '
+
'></div>'
'>'
+
'<div '
+
'style=" '
+
'width: 80%; '
+
'height: 50px; '
+
'margin-left: auto; '
+
'margin-right: auto; '
+
'margin-top: 26px; '
+
'border: 1px solid #CCC; '
+
'background-color: #EEE; '
+
'background-image: -webkit-linear-gradient(top, #EEE, #DDD); '
+
'background-image: -moz-linear-gradient(top, #EEE, #DDD); '
+
'background-image: -ms-linear-gradient(top, #EEE, #DDD); '
+
'background-image: -o-linear-gradient(top, #EEE, #DDD); '
+
'background-image: linear-gradient(top, #EEE, #DDD); '
+
'-webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset; '
+
'box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset; '
+
'background-image: url(
\'
/static/images/arrow-right.png
\'
); '
+
'background-position: center center; '
+
'background-repeat: no-repeat; '
+
'border-radius: 0 35px 35px 0; '
+
'" '
+
'></div>'
+
'</div>'
);
);
moveRightEl
.
appendTo
(
parentEl
);
moveRightEl
.
appendTo
(
parentEl
);
moveRightEl
.
click
(
function
()
{
moveRightEl
.
click
(
function
()
{
showElLeftMargin
-=
100
;
if
(
showElLeftMargin
<
-
102
*
(
state
.
sliderEl
.
children
().
length
-
8
))
{
return
;
}
showElLeftMargin
-=
102
;
state
.
sliderEl
.
animate
({
state
.
sliderEl
.
animate
({
'margin-left'
:
showElLeftMargin
+
'px'
'margin-left'
:
showElLeftMargin
+
'px'
});
}
,
100
);
});
});
parentEl
.
appendTo
(
state
.
containerEl
);
parentEl
.
appendTo
(
state
.
containerEl
);
...
...
common/static/js/capa/drag_and_drop/targets.js
View file @
545b1bea
...
@@ -33,7 +33,7 @@ define(['logme', 'update_input'], function (logme, updateInput) {
...
@@ -33,7 +33,7 @@ define(['logme', 'update_input'], function (logme, updateInput) {
borderCss
=
''
;
borderCss
=
''
;
if
(
state
.
config
.
target_outline
===
true
)
{
if
(
state
.
config
.
target_outline
===
true
)
{
borderCss
=
'border: 1px
solid black
; '
;
borderCss
=
'border: 1px
dashed gray
; '
;
}
}
tEl
=
$
(
tEl
=
$
(
...
...
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