From f5fdfc147586e82767156d519a18600eea4a6709 Mon Sep 17 00:00:00 2001 From: sajjadcb Date: Thu, 3 Apr 2014 10:04:02 +0000 Subject: [PATCH] fixed: photo uploader \n updated: photo uploader design --- upload/styles/cb_2014/layout/photo_upload.html | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/upload/styles/cb_2014/layout/photo_upload.html b/upload/styles/cb_2014/layout/photo_upload.html index 0655b7c9..d50cfaa7 100644 --- a/upload/styles/cb_2014/layout/photo_upload.html +++ b/upload/styles/cb_2014/layout/photo_upload.html @@ -101,7 +101,7 @@
-
+
Drag & Drop Files Here @@ -121,12 +121,12 @@ -
-
-
+
+
+
@@ -216,6 +216,9 @@ $(oneUploadForm).find("input[name='photo_title']").val(files[i].name); $(oneUploadForm).find("textarea#photo_description").val(files[i].name); $(oneUploadForm).find("input[name='category[]']:first").attr('checked', 'checked'); + if(typeof files[i]['photoThumb'] !== "undefined"){ + $(oneUploadForm).find("img").attr("src", files[i]['photoThumb']); + } wrapperDiv.appendChild(oneUploadForm); uploadForms.push(wrapperDiv); } @@ -229,7 +232,7 @@ setTimeout(function(){ $("#uploaderContainer").toggleClass("hidden"); - $("#uploadDataContainer").toggleClass("hidden"); + $("#uploadDataContainer").removeClass("hidden"); $(".uploadingProgressContainer").show(); $(".allProgress").removeClass("hidden"); uploader.start(); @@ -297,7 +300,10 @@ //creating the hidden form fields $(uploadForm).find("img").attr("src", msg.photoPreview); $(uploadForm).find(".submitPhoto").removeAttr("disabled"); - + + if(typeof files[(currentFileIndex - 1)] !== "undefined"){ + files[(totalUploaded-1)]['photoThumb'] = msg.photoPreview; + } var hiddenPhotoIdField = document.createElement('input'); hiddenPhotoIdField.name = 'photo_id'; hiddenPhotoIdField.type = 'hidden';