Adding extra class for url uploads

This commit is contained in:
Hannah Wolfe 2013-09-27 13:34:39 +01:00
parent ee8d8102db
commit d841e749f9

View File

@ -135,7 +135,7 @@
var self = this;
//This is the start point if no image exists
$dropzone.find('img.js-upload-target').css({"display": "none"});
$dropzone.removeClass('pre-image-uploader').addClass('image-uploader');
$dropzone.removeClass('pre-image-uploader image-uploader-url').addClass('image-uploader');
this.removeExtras();
this.buildExtras();
this.bindFileUpload();
@ -146,6 +146,7 @@
initUrl: function () {
var self = this, val;
this.removeExtras();
$dropzone.addClass('image-uploader-url').removeClass('pre-image-uploader');
$dropzone.find('.js-fileupload').addClass('right');
$dropzone.append($cancel);
$dropzone.find('.js-cancel').on('click', function () {
@ -174,7 +175,7 @@
var self = this;
// This is the start point if an image already exists
source = $dropzone.find('img.js-upload-target').attr('src');
$dropzone.removeClass('image-uploader').addClass('pre-image-uploader');
$dropzone.removeClass('image-uploader image-uploader-url').addClass('pre-image-uploader');
$dropzone.find('div.description').hide();
$dropzone.append($cancel);
$dropzone.find('.js-cancel').on('click', function () {