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
4e80e5c3
Commit
4e80e5c3
authored
Dec 15, 2011
by
Piotr Mitros
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Groundwork for formula support. Lots of other details
parent
5385a024
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
100 additions
and
50 deletions
+100
-50
main.html
+9
-1
profile.html
+61
-27
registration/password_reset_done.html
+0
-2
seq_module.js
+3
-3
tab_module.html
+7
-4
tab_module.js
+20
-13
No files found.
main.html
View file @
4e80e5c3
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title>
MIT
World
6.002
</title>
<title>
MIT
X
6.002
</title>
<link
rel=
"stylesheet"
href=
"/static/css/theme.css"
type=
"text/css"
media=
"all"
/>
<script
src=
"//www.google.com/jsapi"
></script>
<link
href=
"/static/css/cupertino/jquery-ui-1.8.16.custom.css"
rel=
"stylesheet"
type=
"text/css"
/>
...
...
@@ -14,6 +14,14 @@
<!-- Warning: Do not upgrade FancyBox. V2.0 is under a non-free CC license -->
<script
type=
"text/javascript"
src=
"/static/js/fancybox/jquery.fancybox-1.3.4.js"
></script>
<link
rel=
"stylesheet"
href=
"/static/js/fancybox/jquery.fancybox-1.3.4.css"
>
<script
type=
"text/x-mathjax-config"
>
MathJax
.
Hub
.
Config
({
tex2jax
:
{
inlineMath
:
[[
"$"
,
"$"
],[
"
\\
("
,
"
\\
)"
]]}
});
</script>
<script
type=
"text/javascript"
src=
"/static/js/mathjax/MathJax.js?config=TeX-AMS_HTML-full"
></script>
</head>
<body>
...
...
profile.html
View file @
4e80e5c3
<
%
inherit
file=
"main.html"
/>
<script>
var
loc
=
true
;
// Activate on clicks? Not if already clicked.
var
lang
=
true
;
$
(
function
()
{
$
(
"#change_location"
).
click
(
function
()
{
if
(
loc
)
{
$
(
"#description"
).
html
(
'<div style="color:#FF0000">'
+
"Preferred format is city, state, country (so for us, "
+
""Cambridge, Massachusetts, USA"), but give "
+
"as much or as little detail as you want. </div>"
);
loc
=
false
;
$
(
"#location_sub"
).
html
(
'<input id="id_loc_text" type="text" name="loc_text" />'
+
'<input type="button" id="change_loc_button" value="Change" />'
);
$
(
"#change_loc_button"
).
click
(
function
()
{
$
.
getJSON
(
'/change_setting'
,
{
'location'
:
$
(
"#id_loc_text"
).
attr
(
"value"
)},
function
(
json
)
{
$
(
"#location_sub"
).
text
(
json
.
location
);
loc
=
true
;
$
(
"#description"
).
html
(
""
);
});
});
}
});
$
(
"#change_language"
).
click
(
function
()
{
if
(
lang
)
{
lang
=
false
;
$
(
"#language_sub"
).
html
(
'<input id="id_lang_text" type="text" name="lang_text" />'
+
'<input type="button" id="change_lang_button" value="Change" />'
);
$
(
"#change_lang_button"
).
click
(
function
()
{
$
.
getJSON
(
'/change_setting'
,
{
'language'
:
$
(
"#id_lang_text"
).
attr
(
"value"
)},
function
(
json
)
{
$
(
"#language_sub"
).
text
(
json
.
language
);
lang
=
true
;
$
(
"#description"
).
html
(
""
);
});
});
}
});
$
(
"a#inline"
).
fancybox
({
'hideOnContentClick'
:
false
});
$
(
'#change_password'
).
click
(
function
(){
$
(
'#inline'
).
trigger
(
'click'
);
});
$
(
'#pwd_reset_button'
).
click
(
function
()
{
$
.
post
(
'/password_reset/'
,{
"csrfmiddlewaretoken"
:
"${ csrf }"
,
"email"
:
$
(
'#id_email'
).
val
()},
function
(
data
){
$
(
'#pwd_reset'
).
html
(
data
);
});
});
})
</script>
<div
align=
"right"
><table><tr><td
align=
right
valign=
top
><a
href=
"/courseware"
>
Digital Textbook
</a>
...
...
@@ -23,9 +72,14 @@ $(function() {
<h1>
${name}
</h1>
<table><td
align=
right
>
Forum name:
</td><td>
${username}
</td></tr>
<td
align=
right
>
E-mail:
</td><td>
${email}
</td></tr>
<td
align=
right
><a
id=
"inline"
href=
"#change_location"
>
Location:
</a></td><td><a
id=
"inline"
href=
"#change_location"
>
${location}
</a></td></tr>
<td
align=
right
><a
id=
"inline"
href=
"#change_language"
>
Language:
</a></td><td><a
id=
"inline"
href=
"#change_location"
>
${language}
</a></td></tr>
<td
align=
right
><a
id=
"inline"
href=
"#change_password"
>
Password:
</a></td><td><a
id=
"inline"
href=
"#change_location"
>
********
</a></td></tr></table>
<tr
id=
"change_location"
>
<td
align=
right
>
Location:
</a></td><td><div
id=
"location_sub"
>
${location}
</a></td></tr>
<tr
id=
"change_language"
><td
align=
right
><div
id=
"change_language"
>
Language:
</a></td><td><div
id=
"language_sub"
>
${language}
</a></td></tr>
<tr
id=
"change_password"
><td
align=
right
><div>
Password:
</a></td><td><div
id=
"change_password"
>
********
</a></td></tr></table>
<div><a
id=
"inline"
href=
"#change_password_pop"
></a></div>
<!-- hidden trigger for password -->
<div
id=
"description"
></div>
<h1>
Course Status
</h1>
<table>
% for hw in homeworks:
...
...
@@ -38,28 +92,8 @@ $(function() {
</table>
</center>
<div
style=
"display:none"
><div
id=
"change_location"
><h1>
Change location
</h1>
<table
width=
400
><tr><td>
Preferred format is city, state, country (so for us,
"
Cambridge, Massachusetts, USA
"
), but give as
much or as little detail as you want.
<p>
<div
align=
right
>
<input
id=
"id_loc_text"
type=
"text"
name=
"loc_text"
maxlength=
"75"
value=
"${location}"
/>
<input
type=
"button"
id=
"change_loc_button"
value=
"Change"
/></p>
</div>
</td></tr></table>
</div></div>
<div
style=
"display:none"
><div
id=
"change_language"
><h1>
Change language
</h1>
<table
width=
400
><tr><td>
Update your language:
<p>
<div
align=
right
>
<input
id=
"id_lang_text"
type=
"text"
name=
"lang_text"
maxlength=
"75"
value=
"${language}"
/>
<input
type=
"button"
id=
"change_lang_button"
value=
"Change"
/></p>
</div>
</td></tr></table>
</div></div>
<div
style=
"display:none"
><div
id=
"change_password"
>
<div
style=
"display:none"
><div
id=
"change_password_pop"
>
<div
id=
"pwd_reset"
>
<table
width=
400
><tr><td>
<h1>
Password reset
</h1>
<p>
Hit the button below, and we'll e-mail you a password reset link at ${email}.
</p>
...
...
@@ -67,10 +101,10 @@ much or as little detail as you want.
<p>
<div
align=
right
>
<input
id=
"id_email"
type=
"hidden"
name=
"email"
maxlength=
"75"
value=
"${email}"
/>
<input
type=
"button"
id=
"pwd_
change
_button"
value=
"E-mail me"
/></p>
<input
type=
"button"
id=
"pwd_
reset
_button"
value=
"E-mail me"
/></p>
</div>
</td></tr></table>
</div>
</div></div>
...
...
registration/password_reset_done.html
View file @
4e80e5c3
{% block title %}Password reset successful{% endblock %}
{% block content %}
<h1>
Password reset successful
</h1>
...
...
seq_module.js
View file @
4e80e5c3
// CRITICAL TODO: Namespace
var
$
{
id
}
file
s
=
[
""
,
var
$
{
id
}
content
s
=
[
""
,
%
for
t
in
items
:
$
{
t
[
1
][
'content'
]}
,
%
endfor
...
...
@@ -9,14 +9,14 @@ var ${ id }files=["",
var
$
{
id
}
functions
=
[
""
,
%
for
t
in
items
:
function
(){
$
{
t
[
1
][
'js'
]}
},
function
(){
$
{
t
[
1
][
'
init_
js'
]}
},
%
endfor
""
];
var
$
{
id
}
loc
;
function
$
{
id
}
goto
(
i
)
{
$
(
'#content'
).
html
(
$
{
id
}
file
s
[
i
]);
$
(
'#content'
).
html
(
$
{
id
}
content
s
[
i
]);
$
{
id
}
functions
[
i
]()
$
{
id
}
loc
=
i
;
}
...
...
tab_module.html
View file @
4e80e5c3
<script>
</script>
<div
id=
"tabs"
>
<ul>
% for t in
tab
s:
<li>
<a
href=
"#tabs-${
tab
s.index(t)}"
>
${t[0]}
</a>
% for t in
item
s:
<li>
<a
href=
"#tabs-${
item
s.index(t)}"
>
${t[0]}
</a>
% endfor
</ul>
% for t in
tab
s:
<div
id=
"tabs-${
tab
s.index(t)}"
>
% for t in
item
s:
<div
id=
"tabs-${
item
s.index(t)}"
>
${t[1]['content']}
</div>
% endfor
...
...
tab_module.js
View file @
4e80e5c3
var
tab_funcs
=
[]
##
We
'd like to refresh the contents of tabs when they'
re
shown
again
,
but
this
probably
##
isn
't the way
## % for t in tabs:
## % if '
js
' in t[1]:
## tab_funcs.push(function(){ ${t[1]['
js
']} });
## % else:
## tab_funcs.push(function(){});
## % endif
## % endfor
var
$
{
id
}
files
=
[
""
,
%
for
t
in
items
:
$
{
t
[
1
][
'content'
]}
,
%
endfor
""
];
var
$
{
id
}
functions
=
[
""
,
%
for
t
in
items
:
function
(){
$
{
t
[
1
][
'init_js'
]}
},
%
endfor
""
];
$
(
"#tabs"
).
tabs
({
select
:
function
(
event
,
ui
){
## tab_funcs[ui.index]();
}});
global
=
ui
;
return
true
;
},
show
:
function
(
event
,
ui
){
global
=
ui
;
alert
(
'hello'
);
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