From 4ad1b4ca9301f5a3c8421d51956166683d1057e1 Mon Sep 17 00:00:00 2001
From: Hakan Sandell <sandell.hakan@gmail.com>
Date: Sat, 29 Oct 2011 22:22:35 +0200
Subject: [PATCH] Full screen media manager, file list is now updated on delete
 (FS#2346)

---
 lib/scripts/media.js | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/scripts/media.js b/lib/scripts/media.js
index 23a1fe5d8..4eefe8d57 100644
--- a/lib/scripts/media.js
+++ b/lib/scripts/media.js
@@ -427,6 +427,10 @@ var dw_mediamanager = {
             function (data) {
                 dw_mediamanager.$resizables().resizable('destroy');
 
+                if (update_list) {
+                    dw_mediamanager.list.call(jQuery('a.selected')[0]);
+                }
+
                 $content.html(data);
 
                 dw_mediamanager.prepare_content($content);
@@ -442,9 +446,6 @@ var dw_mediamanager = {
                 dw_mediamanager.init_ajax_uploader();
                 dw_mediamanager.init_options();
 
-                if (update_list) {
-                    dw_mediamanager.list.call(jQuery('a.files')[0]);
-                }
             },
             'html'
         );
-- 
GitLab