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
fd7142bc
Commit
fd7142bc
authored
Apr 09, 2014
by
Frances Botsford
Committed by
cahrens
May 02, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dnd container page styling
parent
fb150bcf
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
74 additions
and
9 deletions
+74
-9
cms/static/js/views/container.js
+3
-2
cms/static/sass/_base.scss
+1
-1
cms/static/sass/elements/_controls.scss
+11
-1
cms/static/sass/elements/_xblocks.scss
+3
-2
cms/static/sass/views/_container.scss
+52
-1
cms/templates/studio_xblock_wrapper.html
+3
-0
lms/static/sass/course/courseware/_courseware.scss
+0
-0
lms/templates/vert_module.html
+1
-2
No files found.
cms/static/js/views/container.js
View file @
fd7142bc
...
@@ -66,13 +66,14 @@ define(["jquery", "underscore", "js/views/xblock", "js/utils/module", "gettext",
...
@@ -66,13 +66,14 @@ define(["jquery", "underscore", "js/views/xblock", "js/utils/module", "gettext",
oldParent
=
parent
;
oldParent
=
parent
;
}
}
},
},
helper
:
"
clone
"
,
helper
:
"
original
"
,
opacity
:
'0.5'
,
opacity
:
'0.5'
,
placeholder
:
'component-placeholder'
,
placeholder
:
'component-placeholder'
,
forcePlaceholderSize
:
true
,
forcePlaceholderSize
:
true
,
axis
:
'y'
,
axis
:
'y'
,
items
:
'> .vertical-element'
,
items
:
'> .vertical-element'
,
connectWith
:
".vertical-container"
connectWith
:
".vertical-container"
,
tolerance
:
"pointer"
});
});
},
},
...
...
cms/static/sass/_base.scss
View file @
fd7142bc
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
// basic setup
// basic setup
html
{
html
{
font-size
:
62
.5%
;
font-size
:
62
.5%
;
overflow-y
:
scroll
;
height
:
102%
;
// force scrollbar to prevent jump when scroll appears, cannot use overflow because it breaks drag
}
}
body
{
body
{
...
...
cms/static/sass/elements/_controls.scss
View file @
fd7142bc
...
@@ -227,11 +227,12 @@
...
@@ -227,11 +227,12 @@
.action-item
{
.action-item
{
display
:
inline-block
;
display
:
inline-block
;
vertical-align
:
middle
;
.action-button
{
.action-button
{
display
:
block
;
border-radius
:
3px
;
border-radius
:
3px
;
padding
:
(
$baseline
/
4
)
(
$baseline
/
2
);
padding
:
(
$baseline
/
4
)
(
$baseline
/
2
);
height
:
(
$baseline
*
1
.5
);
color
:
$gray-l1
;
color
:
$gray-l1
;
&
:hover
{
&
:hover
{
...
@@ -248,6 +249,15 @@
...
@@ -248,6 +249,15 @@
background-color
:
$gray-l1
;
background-color
:
$gray-l1
;
}
}
}
}
.drag-handle
{
display
:
block
;
float
:
none
;
height
:
(
$baseline
*
1
.2
);
width
:
(
$baseline
);
margin
:
0
;
background
:
transparent
url("../img/drag-handles.png")
no-repeat
right
center
;
}
}
}
}
}
...
...
cms/static/sass/elements/_xblocks.scss
View file @
fd7142bc
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
@include
box-sizing
(
border-box
);
@include
box-sizing
(
border-box
);
@include
ui-flexbox
();
@include
ui-flexbox
();
@extend
%ui-align-center-flex
;
@extend
%ui-align-center-flex
;
justify-content
:
space-between
;
border-bottom
:
1px
solid
$gray-l4
;
border-bottom
:
1px
solid
$gray-l4
;
border-radius
:
(
$baseline
/
5
)
(
$baseline
/
5
)
0
0
;
border-radius
:
(
$baseline
/
5
)
(
$baseline
/
5
)
0
0
;
min-height
:
(
$baseline
*
2
.5
);
min-height
:
(
$baseline
*
2
.5
);
...
@@ -30,14 +31,14 @@
...
@@ -30,14 +31,14 @@
@extend
%ui-justify-left-flex
;
@extend
%ui-justify-left-flex
;
@include
ui-flexbox
();
@include
ui-flexbox
();
width
:
flex-grid
(
6
,
12
);
width
:
flex-grid
(
6
,
12
);
vertical-align
:
top
;
vertical-align
:
middle
;
}
}
.header-actions
{
.header-actions
{
@include
ui-flexbox
();
@include
ui-flexbox
();
@extend
%ui-justify-right-flex
;
@extend
%ui-justify-right-flex
;
width
:
flex-grid
(
6
,
12
);
width
:
flex-grid
(
6
,
12
);
vertical-align
:
top
;
vertical-align
:
middle
;
}
}
}
}
}
}
...
...
cms/static/sass/views/_container.scss
View file @
fd7142bc
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
// ====================
// ====================
// UI: container page view
// UI: container page view
body
.view-container
{
.view-container
{
.mast
{
.mast
{
border-bottom
:
none
;
border-bottom
:
none
;
...
@@ -99,6 +99,57 @@ body.view-container {
...
@@ -99,6 +99,57 @@ body.view-container {
// UI: xblock rendering
// UI: xblock rendering
body
.view-container
.content-primary
{
body
.view-container
.content-primary
{
// dragging bits
.ui-sortable-helper
{
article
{
display
:
none
;
}
}
.component-placeholder
{
height
:
(
$baseline
*
2
.5
);
opacity
:
.5
;
margin
:
$baseline
;
background-color
:
$gray-l5
;
border-radius
:
(
$baseline
/
2
);
border
:
2px
dashed
$gray-l2
;
}
.vert-mod
{
// min-height to allow drop when empty
.vertical-container
{
min-height
:
(
$baseline
*
2
.5
);
}
.vert
{
position
:
relative
;
.drag-handle
{
display
:
none
;
// only show when vert is draggable
position
:
absolute
;
top
:
0
;
right
:
(
$baseline
/
2
);
// equal to margin on component
width
:
(
$baseline
*
1
.5
);
height
:
(
$baseline
*
2
.5
);
margin
:
0
;
background
:
transparent
url("../img/drag-handles.png")
no-repeat
scroll
center
center
;
}
}
.is-draggable
{
.xblock-header
{
padding-right
:
(
$baseline
*
1
.5
);
// make room for drag handle
}
.drag-handle
{
display
:
block
;
}
}
}
.wrapper-xblock
{
.wrapper-xblock
{
@extend
%wrap-xblock
;
@extend
%wrap-xblock
;
...
...
cms/templates/studio_xblock_wrapper.html
View file @
fd7142bc
...
@@ -36,6 +36,9 @@
...
@@ -36,6 +36,9 @@
</a>
</a>
</li>
</li>
% endif
% endif
<li
class=
"action-item drag"
>
<span
data-tooltip=
"${_('Drag to reorder')}"
class=
"drag-handle action"
></span>
</li>
</ul>
</ul>
</div>
</div>
</header>
</header>
...
...
lms/static/sass/course/courseware/_courseware.scss
View file @
fd7142bc
lms/templates/vert_module.html
View file @
fd7142bc
...
@@ -4,9 +4,8 @@ from django.utils.translation import ugettext as _
...
@@ -4,9 +4,8 @@ from django.utils.translation import ugettext as _
<div
class=
"vert-mod"
>
<div
class=
"vert-mod"
>
<ol
class=
"vertical-container"
>
<ol
class=
"vertical-container"
>
% for idx, item in enumerate(items):
% for idx, item in enumerate(items):
<li
class=
"vertical-element"
>
<li
class=
"vertical-element
is-draggable
"
>
<div
class=
"vert vert-${idx}"
data-id=
"${item['id']}"
>
<div
class=
"vert vert-${idx}"
data-id=
"${item['id']}"
>
<span
data-tooltip=
"${_('Drag to reorder')}"
class=
"drag-handle action"
></span>
${item['content']}
${item['content']}
</div>
</div>
</li>
</li>
...
...
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