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
ab45ce19
Commit
ab45ce19
authored
Oct 15, 2013
by
David Baumgold
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1335 from edx/db/requirejs-use-domReady
use domReady rather than $.ready()
parents
55925110
061e046e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
19 deletions
+16
-19
cms/templates/index.html
+16
-19
No files found.
cms/templates/index.html
View file @
ab45ce19
...
...
@@ -7,29 +7,26 @@
<
%
block
name=
"jsextra"
>
<script
type=
"text/javascript"
>
require
([
'jquery'
,
'jquery.form'
],
function
(
$
)
{
$
(
document
).
ready
(
function
()
{
// showing/hiding creation rights UI
$
(
'.show-creationrights'
).
click
(
function
(
e
){
(
e
).
preventDefault
();
$
(
this
).
closest
(
'.wrapper-creationrights'
).
toggleClass
(
'is-shown'
).
find
(
'.ui-toggle-control'
).
toggleClass
(
'current'
);
});
require
([
"domReady!"
,
"jquery"
,
"jquery.form"
],
function
(
doc
,
$
)
{
// showing/hiding creation rights UI
$
(
'.show-creationrights'
).
click
(
function
(
e
){
(
e
).
preventDefault
();
$
(
this
).
closest
(
'.wrapper-creationrights'
).
toggleClass
(
'is-shown'
).
find
(
'.ui-toggle-control'
).
toggleClass
(
'current'
);
});
var
reloadPage
=
function
()
{
location
.
reload
();
};
var
reloadPage
=
function
()
{
location
.
reload
();
};
var
showError
=
function
()
{
$
(
'#request-coursecreator-submit'
).
toggleClass
(
'has-error'
).
find
(
'.label'
).
text
(
'Sorry, there was error with your request'
);
$
(
'#request-coursecreator-submit'
).
find
(
'.icon-cog'
).
toggleClass
(
'icon-spin'
);
};
var
showError
=
function
()
{
$
(
'#request-coursecreator-submit'
).
toggleClass
(
'has-error'
).
find
(
'.label'
).
text
(
'Sorry, there was error with your request'
);
$
(
'#request-coursecreator-submit'
).
find
(
'.icon-cog'
).
toggleClass
(
'icon-spin'
);
};
$
(
'#request-coursecreator'
).
ajaxForm
({
error
:
showError
,
success
:
reloadPage
});
$
(
'#request-coursecreator'
).
ajaxForm
({
error
:
showError
,
success
:
reloadPage
});
$
(
'#request-coursecreator-submit'
).
click
(
function
(
e
){
$
(
this
).
toggleClass
(
'is-disabled is-submitting'
).
find
(
'.label'
).
text
(
'Submitting Your Request'
);
});
$
(
'#request-coursecreator-submit'
).
click
(
function
(
e
){
$
(
this
).
toggleClass
(
'is-disabled is-submitting'
).
find
(
'.label'
).
text
(
'Submitting Your Request'
);
});
});
</script>
...
...
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