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
170694e5
Commit
170694e5
authored
Oct 17, 2012
by
Chris Dodge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix/cdodge/asset-upload-tweeks
parent
3d67c960
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
4 deletions
+7
-4
cms/djangoapps/contentstore/utils.py
+2
-1
cms/djangoapps/contentstore/views.py
+1
-1
cms/static/js/base.js
+3
-1
cms/templates/asset_index.html
+1
-1
No files found.
cms/djangoapps/contentstore/utils.py
View file @
170694e5
...
...
@@ -76,5 +76,6 @@ def compute_unit_state(unit):
return
UnitState
.
public
def
get_date_display
(
date
):
def
get_date_display
(
date
,
convertToLocalTime
=
False
):
print
date
.
__class__
.
__name__
return
date
.
strftime
(
"
%
d
%
B,
%
Y at
%
I:
%
M
%
p"
)
cms/djangoapps/contentstore/views.py
View file @
170694e5
...
...
@@ -872,7 +872,7 @@ def asset_index(request, org, course, name):
id
=
asset
[
'_id'
]
display_info
=
{}
display_info
[
'displayname'
]
=
asset
[
'displayname'
]
display_info
[
'uploadDate'
]
=
get_date_display
(
asset
[
'uploadDate'
])
display_info
[
'uploadDate'
]
=
get_date_display
(
asset
[
'uploadDate'
]
,
True
)
asset_location
=
StaticContent
.
compute_location
(
id
[
'org'
],
id
[
'course'
],
id
[
'name'
])
display_info
[
'url'
]
=
StaticContent
.
get_url_path_from_location
(
asset_location
)
...
...
cms/static/js/base.js
View file @
170694e5
...
...
@@ -321,7 +321,7 @@ function startUpload(e) {
function
resetUploadBar
(){
var
percentVal
=
'0%'
;
$
(
'.upload-modal .progress-fill'
).
width
(
percentVal
)
$
(
'.upload-modal .progress-fill'
).
width
(
percentVal
)
;
$
(
'.upload-modal .progress-fill'
).
html
(
percentVal
);
}
...
...
@@ -338,6 +338,7 @@ function displayFinishedUpload(xhr) {
$
(
'.upload-modal .copy-button'
).
attr
(
'href'
,
xhr
.
getResponseHeader
(
'asset_url'
));
$
(
'.upload-modal .progress-fill'
).
html
(
xhr
.
responseText
);
$
(
'.upload-modal .choose-file-button'
).
html
(
'Load Another File'
).
show
();
$
(
'.upload-modal .progress-fill'
).
width
(
'100%'
);
}
function
markAsLoaded
()
{
...
...
@@ -349,6 +350,7 @@ function hideModal(e) {
e
.
preventDefault
();
$
(
'.modal'
).
hide
();
$modalCover
.
hide
();
location
.
reload
();
}
function
onKeyUp
(
e
)
{
...
...
cms/templates/asset_index.html
View file @
170694e5
<
%
inherit
file=
"base.html"
/>
<
%!
from
django
.
core
.
urlresolvers
import
reverse
%
>
<
%
block
name=
"bodyclass"
>
assets
</
%
block>
<
%
block
name=
"title"
>
C
MS Courseware Overview
</
%
block>
<
%
block
name=
"title"
>
C
ourseware Assets
</
%
block>
<
%
block
name=
"content"
>
...
...
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