diff --git a/system/admin/views/add-content.html.php b/system/admin/views/add-content.html.php
index c9a5ec1..53729b9 100644
--- a/system/admin/views/add-content.html.php
+++ b/system/admin/views/add-content.html.php
@@ -138,8 +138,10 @@ $( function() {
+
-
+
';} ?>
+
@@ -215,7 +217,7 @@ $( function() {
-
+
-
-
+
+
diff --git a/system/admin/views/edit-content.html.php b/system/admin/views/edit-content.html.php
index ae12c32..94d7b16 100644
--- a/system/admin/views/edit-content.html.php
+++ b/system/admin/views/edit-content.html.php
@@ -192,8 +192,10 @@ $( function() {
+
-
+
+
@@ -274,7 +276,7 @@ $( function() {
-
+
-
+
diff --git a/system/resources/js/media.uploader.js b/system/resources/js/media.uploader.js
index c21d39c..b2006d2 100644
--- a/system/resources/js/media.uploader.js
+++ b/system/resources/js/media.uploader.js
@@ -9,7 +9,9 @@
};
$('#insertMediaDialogInsert').click( function() {
$('.media-uploader').val('');
+ $('.imgPrev > img').remove();
$('.media-uploader').val( $('#insertMediaDialogURL').val().length > 0 ? $('#insertMediaDialogURL').val() : null );
+ $('.imgPrev').prepend($('
',{id:'imgFile',src: $('#insertMediaDialogURL').val()}));
dialogClose();
});
$('#insertMediaDialogClose').click( function() {
@@ -33,7 +35,9 @@
if (response.error == '0')
{
$('.media-uploader').val('');
+ $('.imgPrev > img').remove();
$('.media-uploader').val(base_path + response.path);
+ $('.imgPrev').prepend($('
',{id:'imgFile',src: base_path + response.path}));
dialogClose();
}
else
@@ -54,7 +58,7 @@
}
});//ajax
});//oninput
-
+
$('#insertButton').click(function() {
$('#insertMediaDialog').modal('show');
});