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
d35ff48e
Commit
d35ff48e
authored
Oct 04, 2012
by
Lyla Fischer
Committed by
Calen Pennington
Oct 11, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed up some of the ajax feedback to display to the user
parent
deca6e66
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
12 deletions
+10
-12
cms/static/js/base.js
+9
-9
cms/templates/asset_index.html
+1
-3
No files found.
cms/static/js/base.js
View file @
d35ff48e
...
...
@@ -234,25 +234,27 @@ function startUpload(e) {
$
(
'.upload-modal h1'
).
html
(
'Uploading…'
);
$
(
'.upload-modal .file-name'
).
html
(
$
(
'.file-input'
).
val
());
var
bar
=
$
(
'.progress-fill'
);
var
percent
=
$
(
'.percent'
);
var
bar
=
$
(
'.upload-modal .progress-fill'
);
$
(
'.upload-modal .file-chooser'
).
ajaxSubmit
({
beforeSend
:
function
()
{
var
percentVal
=
'0%'
;
bar
.
width
(
percentVal
)
percent
.
html
(
percentVal
);
bar
.
html
(
percentVal
);
},
uploadProgress
:
function
(
event
,
position
,
total
,
percentComplete
)
{
var
percentVal
=
percentComplete
+
'%'
;
bar
.
width
(
percentVal
)
percent
.
html
(
percentVal
);
bar
.
html
(
percentVal
);
},
complete
:
function
(
xhr
)
{
markAsLoaded
();
if
(
xhr
.
status
=
200
){
markAsLoaded
();
}
bar
.
html
(
xhr
.
responseText
);
$
(
'.upload-modal .choose-file-button'
).
html
(
'Load Another File'
).
show
();
}
});
$
(
'.upload-modal .choose-file-button'
).
hide
();
$
(
'.upload-modal .progress-bar'
).
removeClass
(
'loaded'
).
show
();
}
...
...
@@ -260,9 +262,7 @@ function startUpload(e) {
function
markAsLoaded
()
{
$
(
'.upload-modal .copy-button'
).
css
(
'display'
,
'inline-block'
);
$
(
'.upload-modal .progress-bar'
).
addClass
(
'loaded'
);
$
(
'.upload-modal .progress-fill'
).
html
(
'loaded successfully'
);
$
(
'.upload-modal .choose-file-button'
).
html
(
'Load Another File'
).
show
();
}
}
function
hideModal
(
e
)
{
e
.
preventDefault
();
...
...
cms/templates/asset_index.html
View file @
d35ff48e
...
...
@@ -188,9 +188,7 @@
<div
class=
"progress-bar"
>
<div
class=
"progress-fill"
></div>
</div>
<div
class=
"percent"
>
0%
</div>
<div
class=
"status"
></div>
<a
href=
"#"
class=
"copy-button"
>
Copy Embed Link
</a>
<a
href=
"#"
class=
"copy-button"
>
Copy Embed Link
</a>
<form
class=
"file-chooser"
action=
"${upload_asset_callback_url}"
method=
"post"
enctype=
"multipart/form-data"
>
<a
href=
"#"
class=
"choose-file-button"
>
Choose File
</a>
<input
type=
"file"
class=
"file-input"
name=
"file"
>
...
...
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