diff --git a/src/sunstone/public/app/tabs/images-tab/form-panels/create-common.js b/src/sunstone/public/app/tabs/images-tab/form-panels/create-common.js index eb9482ddc0..e0683e9d85 100644 --- a/src/sunstone/public/app/tabs/images-tab/form-panels/create-common.js +++ b/src/sunstone/public/app/tabs/images-tab/form-panels/create-common.js @@ -289,10 +289,21 @@ define(function(require) { fileName = file.fileName; file_input = fileName; - $('#file-uploader-input', context).hide() + $('#file-uploader-input', context).hide(); $("#file-uploader-label", context).html(file.fileName); + $("#file-uploader-label", context).show(); + $('#close_image', context).show(); }); - var abort = false; + + $('#close_image', context).on('click', function(){ + console.log("click"); + $("#file-uploader-label", context).hide(); + $('#close_image', context).hide(); + $('#file-uploader-input', context).show(); + fileName= ''; + that.uploader.files.length = 0; + }); + that.uploader.on('uploadStart', function() { var myThis = this; if(!(myThis.progress() > 0)){ diff --git a/src/sunstone/public/app/tabs/images-tab/form-panels/create/wizard.hbs b/src/sunstone/public/app/tabs/images-tab/form-panels/create/wizard.hbs index e5f1c486ef..37db4780e8 100644 --- a/src/sunstone/public/app/tabs/images-tab/form-panels/create/wizard.hbs +++ b/src/sunstone/public/app/tabs/images-tab/form-panels/create/wizard.hbs @@ -92,6 +92,7 @@