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
bbed49db
Commit
bbed49db
authored
Oct 10, 2012
by
Tom Giannattasio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
styled log in and sign up errors; fixed expand/collapse transition bug
parent
07ac0d06
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
26 deletions
+44
-26
cms/static/sass/_courseware.scss
+1
-0
cms/static/sass/_graphics.scss
+1
-0
cms/static/sass/_login.scss
+12
-0
cms/templates/login.html
+29
-25
cms/templates/signup.html
+1
-1
No files found.
cms/static/sass/_courseware.scss
View file @
bbed49db
...
...
@@ -65,6 +65,7 @@ input.courseware-unit-search-input {
.expand-collapse-icon
{
float
:
left
;
margin
:
16px
6px
16px
16px
;
@include
transition
(
none
);
}
.drag-handle
{
...
...
cms/static/sass/_graphics.scss
View file @
bbed49db
...
...
@@ -5,6 +5,7 @@
height
:
11px
;
margin-right
:
10px
;
background
:
url(../img/expand-collapse-icons.png)
no-repeat
;
@include
transition
(
none
);
&
.expand
{
top
:
1px
;
...
...
cms/static/sass/_login.scss
View file @
bbed49db
...
...
@@ -77,4 +77,15 @@
text-align
:
right
;
font-size
:
13px
;
}
#login_error
,
#register_error
{
display
:
none
;
margin-bottom
:
30px
;
padding
:
5px
10px
;
border-radius
:
3px
;
background
:
$error-red
;
font-size
:
14px
;
color
:
#fff
;
}
}
\ No newline at end of file
cms/templates/login.html
View file @
bbed49db
...
...
@@ -30,36 +30,40 @@
<script
type=
"text/javascript"
>
(
function
()
{
function
getCookie
(
name
)
{
return
$
.
cookie
(
name
);
}
function
postJSON
(
url
,
data
,
callback
)
{
$
.
ajax
({
type
:
'POST'
,
url
:
url
,
dataType
:
'json'
,
data
:
data
,
success
:
callback
,
headers
:
{
'X-CSRFToken'
:
getCookie
(
'csrftoken'
)}
});
}
function
getCookie
(
name
)
{
return
$
.
cookie
(
name
);
}
function
postJSON
(
url
,
data
,
callback
)
{
$
.
ajax
({
type
:
'POST'
,
url
:
url
,
dataType
:
'json'
,
data
:
data
,
success
:
callback
,
headers
:
{
'X-CSRFToken'
:
getCookie
(
'csrftoken'
)}
});
}
$
(
'form#login_form'
).
submit
(
function
(
e
)
{
e
.
preventDefault
();
var
submit_data
=
$
(
'#login_form'
).
serialize
();
$
(
'form#login_form'
).
submit
(
function
(
e
)
{
e
.
preventDefault
();
var
submit_data
=
$
(
'#login_form'
).
serialize
();
postJSON
(
'/login_post'
,
submit_data
,
function
(
json
)
{
if
(
json
.
success
)
{
location
.
href
=
"${reverse('index')}"
;
postJSON
(
'/login_post'
,
submit_data
,
function
(
json
)
{
if
(
json
.
success
)
{
console
.
log
(
'success'
);
location
.
href
=
"${reverse('index')}"
;
}
else
if
(
$
(
'#login_error'
).
length
==
0
)
{
$
(
'#login_form'
).
prepend
(
'<div id="login_error">Email or password is incorrect.</div>'
);
console
.
log
(
'error 1'
);
$
(
'#login_form'
).
prepend
(
'<div id="login_error">Email or password is incorrect.</div>'
);
$
(
'#login_error'
).
slideDown
(
150
);
}
else
{
$
(
'#login_error'
).
stop
().
css
(
"background-color"
,
"#933"
).
animate
({
backgroundColor
:
"#333"
},
2000
);
console
.
log
(
'error 2'
);
$
(
'#login_error'
).
stop
().
slideDown
(
150
);
}
}
);
});
}
);
});
})(
this
)
</script>
...
...
cms/templates/signup.html
View file @
bbed49db
...
...
@@ -81,7 +81,7 @@
if
(
json
.
success
)
{
$
(
'#register'
).
html
(
json
.
value
);
}
else
{
$
(
'#register_error'
).
html
(
json
.
value
).
stop
().
css
(
"background-color"
,
"#933"
).
animate
({
backgroundColor
:
"#333"
},
200
0
);
$
(
'#register_error'
).
html
(
json
.
value
).
stop
().
slideDown
(
15
0
);
}
}
);
...
...
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