From 07fac33b9ace46b36efc28b56419831885efa809 Mon Sep 17 00:00:00 2001 From: rolux Date: Mon, 22 Dec 2014 22:21:42 +0000 Subject: [PATCH] refactoring --- static/js/documentsDialog.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/static/js/documentsDialog.js b/static/js/documentsDialog.js index 0438d004..1164d319 100644 --- a/static/js/documentsDialog.js +++ b/static/js/documentsDialog.js @@ -52,6 +52,14 @@ pandora.ui.documentsDialog = function() { resize: $content.updateSize }); + that.superClose = that.close; + that.close = function() { + Ox.Request.clearCache('findDocuments'); + that.superClose(); + // needed in documentDialog to determine if isItemView + delete pandora.$ui.documentsDialog; + }; + function addDocuments() { pandora.api.addDocument({ item: pandora.user.ui.item, @@ -67,14 +75,6 @@ pandora.ui.documentsDialog = function() { }); } - that.superClose = that.close; - that.close = function() { - Ox.Request.clearCache('findDocuments'); - that.superClose(); - // needed in documentDialog to determine if isItemView - delete pandora.$ui.documentsDialog; - }; - return that; };