diff --git a/static/js/documentsDialog.js b/static/js/documentsDialog.js index 0438d004b..1164d3193 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; };