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
4bbacb02
Commit
4bbacb02
authored
Sep 30, 2013
by
Julian Arni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-add bar references
parent
cab7c4ff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
+10
-1
cms/templates/import.html
+10
-1
No files found.
cms/templates/import.html
View file @
4bbacb02
...
@@ -144,6 +144,7 @@
...
@@ -144,6 +144,7 @@
require
([
"jquery"
,
"jquery.fileupload"
],
function
(
$
)
{
require
([
"jquery"
,
"jquery.fileupload"
],
function
(
$
)
{
var
file
;
var
file
;
var
bar
=
$
(
'.progress-bar'
);
var
fill
=
$
(
'.progress-fill'
);
var
fill
=
$
(
'.progress-fill'
);
var
percent
=
$
(
'.percent'
);
var
percent
=
$
(
'.percent'
);
var
status
=
$
(
'#status'
);
var
status
=
$
(
'#status'
);
...
@@ -194,6 +195,7 @@ $('#fileupload').fileupload({
...
@@ -194,6 +195,7 @@ $('#fileupload').fileupload({
submitBtn
.
show
();
submitBtn
.
show
();
bar
.
hide
();
bar
.
hide
();
chooseBtn
.
html
(
'${_("Choose new file")}'
).
show
();
chooseBtn
.
html
(
'${_("Choose new file")}'
).
show
();
bar
.
hide
();
}
}
});
});
});
});
...
@@ -205,6 +207,7 @@ $('#fileupload').fileupload({
...
@@ -205,6 +207,7 @@ $('#fileupload').fileupload({
progressall
:
function
(
e
,
data
){
progressall
:
function
(
e
,
data
){
var
doneAt
;
var
doneAt
;
var
percentInt
=
data
.
loaded
/
data
.
total
*
100
var
percentInt
=
data
.
loaded
/
data
.
total
*
100
var
percentVal
=
parseInt
(
percentInt
,
10
)
+
"%"
;
// Firefox makes ProgressEvent.loaded equal ProgressEvent.total only
// Firefox makes ProgressEvent.loaded equal ProgressEvent.total only
// after receiving a response from the server (see Mozilla bug 637002),
// after receiving a response from the server (see Mozilla bug 637002),
// so for Firefox we jump the gun a little.
// so for Firefox we jump the gun a little.
...
@@ -214,10 +217,16 @@ $('#fileupload').fileupload({
...
@@ -214,10 +217,16 @@ $('#fileupload').fileupload({
doneAt
=
99
;
doneAt
=
99
;
}
}
if
(
percentInt
>=
doneAt
)
{
if
(
percentInt
>=
doneAt
)
{
bar
.
hide
();
startServerFeedback
(
feedbackUrl
.
replace
(
"fillerName"
,
file
.
name
));
startServerFeedback
(
feedbackUrl
.
replace
(
"fillerName"
,
file
.
name
));
}
}
else
{
bar
.
show
();
fill
.
width
(
percentVal
);
percent
.
html
(
percentVal
);
}
},
},
done
:
function
(
e
,
data
){
done
:
function
(
e
,
data
){
bar
.
hide
();
window
.
onbeforeunload
=
null
;
window
.
onbeforeunload
=
null
;
displayFinishedImport
();
displayFinishedImport
();
alert
(
'${_("Your import was successful.")}'
);
alert
(
'${_("Your import was successful.")}'
);
...
...
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