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
60759b8b
Commit
60759b8b
authored
Feb 11, 2013
by
Valera Rozuvan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding callback to conditional constructor. Not complete.
parent
8651040c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
0 deletions
+40
-0
common/lib/xmodule/xmodule/js/src/poll/poll_main.js
+40
-0
No files found.
common/lib/xmodule/xmodule/js/src/poll/poll_main.js
View file @
60759b8b
...
...
@@ -129,6 +129,15 @@ PollMain.prototype = {
logme
(
'Two.'
);
_this
.
showAnswerGraph
(
response
.
poll_answers
,
response
.
total
);
if
(
_this
.
verticalSectionEl
!==
null
)
{
_this
.
verticalSectionEl
.
find
(
'xmodule_ConditionalModule'
,
function
(
index
,
value
)
{
console
.
log
(
'Found conditional element. index = '
);
console
.
log
(
index
);
console
.
log
(
'value = '
);
console
.
log
(
value
);
});
}
/*
_this.vertModEl.find('.xmodule_ConditionalModule').each(
function (index, value) {
...
...
@@ -209,6 +218,37 @@ return PollMain;
function
PollMain
(
el
)
{
var
_this
;
var
tel
,
c1
;
tel
=
$
(
el
)[
0
];
c1
=
0
;
console
.
log
(
tel
);
this
.
verticalSectionEl
=
null
;
while
(
tel
.
tagName
.
toLowerCase
()
!==
'body'
)
{
tel
=
$
(
tel
).
parent
()[
0
];
c1
+=
1
;
console
.
log
(
''
+
c1
+
': parent = '
);
console
.
log
(
tel
);
if
((
tel
.
tagName
.
toLowerCase
()
===
'section'
)
&&
(
$
(
tel
).
hasClass
(
'xmodule_VerticalModule'
)
===
true
))
{
console
.
log
(
'Found vertical section. Saving element for future use.'
);
this
.
verticalSectionEl
=
tel
;
break
;
}
else
if
(
c1
>
50
)
{
console
.
log
(
'ERROR: HTML hierarchy is very large.'
);
break
;
}
}
console
.
log
(
'this.verticalSectionEl = '
);
console
.
log
(
this
.
verticalSectionEl
);
this
.
vertModEl
=
$
(
el
).
parent
().
parent
();
if
(
this
.
vertModEl
.
length
!==
1
)
{
// We will work with a single DOM element that contains one question, and zero or more conditionals.
...
...
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