From 479f917c09a08de9c9a4508031c6a4917a90294b Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Thu, 26 Feb 2015 12:54:59 +0000 Subject: [PATCH] Build expose gallery only for filemanager nm, other nms may have expose view but not neccessary would be a gallery (eg. resources) --- etemplate/js/expose.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/etemplate/js/expose.js b/etemplate/js/expose.js index 331d21af3a..f5823b345d 100644 --- a/etemplate/js/expose.js +++ b/etemplate/js/expose.js @@ -73,7 +73,10 @@ function expose (widget) } } // No nextmatch, or nextmatch not quite ready - if(nextmatch == null || nextmatch.controller == null) return null; + // At the moment only filemanger nm would work + // as gallery, thus we disable other nestmatches + // to build up gallery but filemanager + if(nextmatch == null || nextmatch.controller == null || !nextmatch.dom_id.match(/filemanager/,'ig')) return null; return nextmatch; };