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
4e78e589
Commit
4e78e589
authored
Dec 14, 2012
by
Valera Rozuvan
Committed by
Alexander Kryklia
Jan 15, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mod to XML GST.
parent
dbf1dc68
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
7 deletions
+14
-7
common/lib/xmodule/xmodule/gst_module.py
+3
-4
common/lib/xmodule/xmodule/js/src/graphical_slider_tool/inputs.js
+2
-2
common/lib/xmodule/xmodule/js/src/graphical_slider_tool/sliders.js
+9
-1
No files found.
common/lib/xmodule/xmodule/gst_module.py
View file @
4e78e589
...
@@ -69,8 +69,7 @@ class GraphicalSliderToolModule(XModule):
...
@@ -69,8 +69,7 @@ class GraphicalSliderToolModule(XModule):
Simple variant: slider and plot controls are not inside any tag.
Simple variant: slider and plot controls are not inside any tag.
"""
"""
#substitute plot
#substitute plot
plot_div
=
'<div class="'
+
self
.
html_class
+
'_plot" id="'
+
self
.
html_id
+
'_plot"
\
plot_div
=
'<div class="'
+
self
.
html_class
+
'_plot" id="'
+
self
.
html_id
+
'_plot"></div>'
style="width: 600px; height: 600px; padding: 0px; position: relative;">This is plot</div>'
html_string
=
html_string
.
replace
(
'$plot$'
,
plot_div
)
html_string
=
html_string
.
replace
(
'$plot$'
,
plot_div
)
# substitute sliders if we have them
# substitute sliders if we have them
...
@@ -81,7 +80,7 @@ class GraphicalSliderToolModule(XModule):
...
@@ -81,7 +80,7 @@ class GraphicalSliderToolModule(XModule):
vars
=
[
x
[
'@var'
]
for
x
in
sliders
]
vars
=
[
x
[
'@var'
]
for
x
in
sliders
]
slider_div
=
'<span class="{element_class}_slider" id="{element_id}_slider_{var}"
\
slider_div
=
'<span class="{element_class}_slider" id="{element_id}_slider_{var}"
\
data-var="{var}"></span>'
data-var="{var}"
data-el_width="120"
></span>'
for
var
in
vars
:
for
var
in
vars
:
html_string
=
re
.
sub
(
r'\$slider\s+'
+
var
+
r'\$'
,
html_string
=
re
.
sub
(
r'\$slider\s+'
+
var
+
r'\$'
,
...
@@ -98,7 +97,7 @@ class GraphicalSliderToolModule(XModule):
...
@@ -98,7 +97,7 @@ class GraphicalSliderToolModule(XModule):
vars
=
[
x
[
'@var'
]
for
x
in
inputs
]
vars
=
[
x
[
'@var'
]
for
x
in
inputs
]
input_div
=
'<span class="{element_class}_input" id="{element_id}_input_{var}"
\
input_div
=
'<span class="{element_class}_input" id="{element_id}_input_{var}"
\
data-var="{var}"></span>'
data-var="{var}"
data-el_width="60"
></span>'
for
var
in
vars
:
for
var
in
vars
:
html_string
=
re
.
sub
(
r'\$input\s+'
+
var
+
r'\$'
,
html_string
=
re
.
sub
(
r'\$input\s+'
+
var
+
r'\$'
,
...
...
common/lib/xmodule/xmodule/js/src/graphical_slider_tool/inputs.js
View file @
4e78e589
...
@@ -124,8 +124,8 @@ define('Inputs', [], function () {
...
@@ -124,8 +124,8 @@ define('Inputs', [], function () {
'text-align'
:
'left'
,
'text-align'
:
'left'
,
'outline'
:
'none'
,
'outline'
:
'none'
,
'cursor'
:
'text'
,
'cursor'
:
'text'
,
'height'
:
'15px'
,
'height'
:
'15px'
'width'
:
'50px'
//
'width': '50px'
});
});
// And finally, publish the text input element to the page.
// And finally, publish the text input element to the page.
...
...
common/lib/xmodule/xmodule/js/src/graphical_slider_tool/sliders.js
View file @
4e78e589
...
@@ -164,7 +164,15 @@ define('Sliders', [], function () {
...
@@ -164,7 +164,15 @@ define('Sliders', [], function () {
}
}
// Set the defined width to the slider.
// Set the defined width to the slider.
sliderEl
.
width
(
sliderWidth
);
// sliderEl.width(sliderWidth);
console
.
log
(
'[Before]'
);
console
.
log
(
'sliderEl.width: '
+
sliderEl
.
width
());
sliderEl
.
width
(
spanEl
.
data
(
'el_width'
));
console
.
log
(
'[After]'
);
console
.
log
(
'sliderEl.width: '
+
sliderEl
.
width
());
// And make sure that it gets added to the page as an
// And make sure that it gets added to the page as an
// 'inline-block' element. This will allow for the insertion of the
// 'inline-block' element. This will allow for the insertion of the
...
...
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