Commit 170694e5 by Chris Dodge

fix/cdodge/asset-upload-tweeks

parent 3d67c960
......@@ -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")
......@@ -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)
......
......@@ -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) {
......
<%inherit file="base.html" />
<%! from django.core.urlresolvers import reverse %>
<%block name="bodyclass">assets</%block>
<%block name="title">CMS Courseware Overview</%block>
<%block name="title">Courseware Assets</%block>
<%block name="content">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment