From 6724355aa0d317e5a20c569b26aa2e7f9346d08c Mon Sep 17 00:00:00 2001 From: Sanj Date: Sun, 4 Nov 2012 11:49:03 +0530 Subject: [PATCH] accordion on test template --- itf/mediagallery/views.py | 8 ++++++++ itf/static/js/upload/itfUpload.js | 10 +++++----- .../test_static_templates/scriptarchive.html | 14 ++++++++++++++ itf/urls.py | 1 + 4 files changed, 28 insertions(+), 5 deletions(-) diff --git a/itf/mediagallery/views.py b/itf/mediagallery/views.py index 60f00ef..9327ea4 100644 --- a/itf/mediagallery/views.py +++ b/itf/mediagallery/views.py @@ -1 +1,9 @@ # Create your views here. +from django.shortcuts import render_to_response +from django.template import RequestContext + +def edit_gallery(request): + context = RequestContext(request, {}) + return render_to_response("mediagallery/upload.html", context) + + diff --git a/itf/static/js/upload/itfUpload.js b/itf/static/js/upload/itfUpload.js index 51e4770..8eeb4db 100644 --- a/itf/static/js/upload/itfUpload.js +++ b/itf/static/js/upload/itfUpload.js @@ -1,6 +1,6 @@ (function($) { -var ItfFileUpload = function(file, Q) { +ItfFileUpload = function(file, Q) { this.file = file; this.Q = Q; @@ -41,8 +41,8 @@ ItfFileUpload.prototype.showProgress = function() { this.$elem.find(".fileProgress").show(); }; -ItfFileUpload.prototype.doProgress = function() { - +ItfFileUpload.prototype.doProgress = function(progress) { + console.log(progress); }; ItfFileUpload.prototype.getLi = function() { @@ -55,7 +55,7 @@ ItfFileUpload.prototype.getLi = function() { return $li; }; -var ItfUploadQueue = function(options, $elem) { +ItfUploadQueue = function(options, $elem) { var that = this; this.files = []; this.isUploading = false; @@ -79,7 +79,7 @@ ItfUploadQueue.prototype.addFile = function(f) { ItfUploadQueue.prototype.getData = function(f) { var that = this; return { - 'name' f.name, + 'name': f.name, 'id': that.options.id } }; diff --git a/itf/templates/test_static_templates/scriptarchive.html b/itf/templates/test_static_templates/scriptarchive.html index f0ec06d..040e3e9 100644 --- a/itf/templates/test_static_templates/scriptarchive.html +++ b/itf/templates/test_static_templates/scriptarchive.html @@ -1,5 +1,14 @@ + +