From 48923c16e00892fac916a83c8fdccca63800615f Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 16 Apr 2015 14:41:58 -0400 Subject: load shape images from posts --- themes/okadmin/public/js/app.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'themes/okadmin/public/js/app.js') diff --git a/themes/okadmin/public/js/app.js b/themes/okadmin/public/js/app.js index 874b7e1..e981223 100644 --- a/themes/okadmin/public/js/app.js +++ b/themes/okadmin/public/js/app.js @@ -1,7 +1,7 @@ var OKAdmin = function(){ // initialize our multi-image uploader with an element and a template - $(".image-list").each(function(){ + $(".group.image-list").each(function(){ var uploader = new OKUpload () uploader.bind( this ) uploader.add = function(url){ @@ -14,18 +14,20 @@ var OKAdmin = function(){ }) // delete image from gallery $(document).on("mousedown", ".image-list .remove-image", function(){ - if (confirm("Delete this image?")) { + if (confirm("Remove this image?")) { $(this).parent().remove() } }) // initialize our single image uploader with existing DOM - $(".image").each(function(){ + $(".group.image").each(function(){ var $el = $(this) var uploader = new OKUpload () uploader.bind( this ) uploader.add = function(url){ + console.log(url) + console.log($el) $el.find(".uri").val(url) $el.find(".caption").val("") $el.find("img").attr("src", url) @@ -34,7 +36,7 @@ var OKAdmin = function(){ }) // delete image from single image entry $(document).on("mousedown", ".image .remove-image", function(){ - if (confirm("Delete this image?")) { + if (confirm("Remove this image?")) { var $el = $(this).closest(".image") $el.removeClass('loaded') $el.find(".uri").val("") -- cgit v1.2.3-70-g09d2