From 2f62d7e3b5525a52bc0205dcb0a6b9e621c9c32e Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 28 Mar 2012 13:01:37 +0000 Subject: [PATCH] allow to set target in mime-registry: need target _self (instead default _blank) for directories opened in filemanager --- filemanager/inc/class.filemanager_hooks.inc.php | 1 + phpgwapi/inc/class.egw_link.inc.php | 3 ++- phpgwapi/js/jsapi/egw_open.js | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/filemanager/inc/class.filemanager_hooks.inc.php b/filemanager/inc/class.filemanager_hooks.inc.php index 87fe8adc33..6f0ab19b71 100644 --- a/filemanager/inc/class.filemanager_hooks.inc.php +++ b/filemanager/inc/class.filemanager_hooks.inc.php @@ -282,6 +282,7 @@ class filemanager_hooks egw_vfs::DIR_MIME_TYPE => array( 'menuaction' => 'filemanager.filemanager_ui.index', 'mime_id' => 'path', + 'mime_target' => '_self', ), ), ); diff --git a/phpgwapi/inc/class.egw_link.inc.php b/phpgwapi/inc/class.egw_link.inc.php index 164ac548ef..237eff6422 100644 --- a/phpgwapi/inc/class.egw_link.inc.php +++ b/phpgwapi/inc/class.egw_link.inc.php @@ -75,6 +75,7 @@ * 'mime_url' => 'url', * 'menuaction' => 'app.class.method', // method to call * 'mime_popup' => '400x300', // optional size of popup + * 'mime_target' => '_self', // optional target, default _blank * // other get-parameters to set in url * ), * // further mime types supported ... @@ -560,7 +561,7 @@ class egw_link extends solink { if (self::DEBUG) { - echo "

egw_link::unlink('$link_id','$app','$id','$owner','$app2','$id2')

\n"; + echo "

egw_link::unlink('$link_id','$app',".array2string($id).",'$owner','$app2','$id2', $hold_for_purge)

\n"; } if ($link_id < 0) // vfs-link? { diff --git a/phpgwapi/js/jsapi/egw_open.js b/phpgwapi/js/jsapi/egw_open.js index bd9745a302..869e834941 100644 --- a/phpgwapi/js/jsapi/egw_open.js +++ b/phpgwapi/js/jsapi/egw_open.js @@ -69,6 +69,11 @@ egw.extend('open', egw.MODULE_WND_LOCAL, function(_egw, _wnd) { popup = url.mime_popup; delete url.mime_popup; } + if(typeof url.mime_target != 'undefined') + { + target = url.mime_target; + delete url.mime_target; + } params = url; url = '/index.php'; }