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
216db510
Commit
216db510
authored
Dec 16, 2011
by
Piotr Mitros
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tabs _appear_ to work, but no internet
parent
1f6d5830
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
13 deletions
+28
-13
seq_module.js
+2
-4
tab_module.html
+0
-4
tab_module.js
+26
-5
No files found.
seq_module.js
View file @
216db510
...
...
@@ -22,10 +22,8 @@ var ${ id }destroy_functions=["",
var
$
{
id
}
loc
=
-
1
;
function
$
{
id
}
goto
(
i
)
{
// TODO:
// ${ id }contents[${ id }loc] = $('#content').html();
if
(
$
{
id
}
loc
!=-
1
)
$
{
id
}
init
_functions
[
$
{
id
}
loc
]();
$
{
id
}
destroy
_functions
[
$
{
id
}
loc
]();
$
(
'#content'
).
html
(
$
{
id
}
contents
[
i
]);
$
{
id
}
init_functions
[
i
]()
$
(
'#tt_'
+
$
{
id
}
loc
).
attr
(
"style"
,
"background-color:grey"
);
...
...
@@ -52,7 +50,7 @@ function ${ id }prev() {
$
(
function
()
{
var
i
;
for
(
i
=
1
;
i
<
11
;
i
++
)
{
for
(
i
=
1
;
i
<
$
{
len
(
items
)
+
1
}
;
i
++
)
{
$
{
id
}
setup_click
(
i
);
}
$
(
'#${ id }next'
).
click
(
function
(
eo
)
{
$
{
id
}
next
();});
...
...
tab_module.html
View file @
216db510
<script>
</script>
<div
id=
"tabs"
>
<ul>
% for t in items:
...
...
@@ -10,7 +7,6 @@
% for t in items:
<div
id=
"tabs-${items.index(t)}"
>
${t[1]['content']}
</div>
% endfor
...
...
tab_module.js
View file @
216db510
var
$
{
id
}
files
=
[
""
,
// IMPORTANT TODO: Namespace
var
$
{
id
}
contents
=
[
""
,
%
for
t
in
items
:
$
{
t
[
1
][
'content'
]}
,
%
endfor
""
];
var
$
{
id
}
functions
=
[
""
,
var
$
{
id
}
init_
functions
=
[
""
,
%
for
t
in
items
:
function
(){
$
{
t
[
1
][
'init_js'
]}
},
%
endfor
""
];
var
$
{
id
}
destroy_functions
=
[
""
,
%
for
t
in
items
:
function
(){
$
{
t
[
1
][
'destroy_js'
]}
},
%
endfor
""
];
var
$
{
id
}
loc
=
-
1
;
function
$
{
id
}
goto
(
i
)
{
if
(
$
{
id
}
loc
!=-
1
)
$
{
id
}
destroy_functions
[
$
{
id
}
loc
]();
$
(
'#tabs-'
+
(
i
-
1
)).
html
(
$
{
id
}
contents
[
i
]);
$
{
id
}
init_functions
[
i
]()
$
(
'#tt_'
+
$
{
id
}
loc
).
attr
(
"style"
,
"background-color:grey"
);
$
{
id
}
loc
=
i
;
$
(
'#tt_'
+
i
).
attr
(
"style"
,
"background-color:red"
);
MathJax
.
Hub
.
Queue
([
"Typeset"
,
MathJax
.
Hub
]);
}
$
(
"#tabs"
).
tabs
({
select
:
function
(
event
,
ui
){
global
=
ui
;
//
global=ui;
return
true
;
},
show
:
function
(
event
,
ui
){
global
=
ui
;
alert
(
'hello'
);
//
global=ui;
$
{
id
}
goto
(
ui
.
index
+
1
);
return
true
;
},
});
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