From a1b44f8df718cb84c10ff8c54d41b1effe8a018d Mon Sep 17 00:00:00 2001 From: Christian Binder Date: Fri, 8 Apr 2011 19:32:17 +0000 Subject: [PATCH] projectmanager: added a moreOptions dropdown list to the link add widget in elements view to be able to assign eRoles to added elements quick; added a preference to give a downloaded merge document a default name --- etemplate/inc/class.bo_merge.inc.php | 19 ++++++++++++++++--- phpgwapi/templates/idots/css/traditional.css | 9 +++++++++ .../templates/jerryr/css/brushed-metal.css | 9 +++++++++ phpgwapi/templates/jerryr/css/jerryr.css | 9 +++++++++ 4 files changed, 43 insertions(+), 3 deletions(-) diff --git a/etemplate/inc/class.bo_merge.inc.php b/etemplate/inc/class.bo_merge.inc.php index 13f964c3f8..5c40df80a1 100644 --- a/etemplate/inc/class.bo_merge.inc.php +++ b/etemplate/inc/class.bo_merge.inc.php @@ -751,9 +751,10 @@ abstract class bo_merge * * @param string $document vfs-path of document * @param array $ids array with contact id(s) + * @param string $name='' name to use for downloaded document * @return string with error-message on error, otherwise it does NOT return */ - public function download($document,$ids) + public function download($document,$ids,$name='') { $content_url = egw_vfs::PREFIX.$document; switch (($mimetype = egw_vfs::mime_content_type($document))) @@ -804,6 +805,18 @@ abstract class bo_merge { return $err; } + if(!empty($name)) + { + if(empty($ext)) + { + $ext = '.'.pathinfo($document,PATHINFO_EXTENSION); + } + $name .= $ext; + } + else + { + $name = basename($document); + } if (isset($archive)) { $zip = new ZipArchive; @@ -821,7 +834,7 @@ abstract class bo_merge { exec('/usr/bin/zip -F '.escapeshellarg($archive)); } - html::content_header(basename($document),$mimetype,filesize($archive)); + html::content_header($name,$mimetype,filesize($archive)); readfile($archive,'r'); } else @@ -837,7 +850,7 @@ abstract class bo_merge $mimetype = 'application/vnd.ms-excel'; // to open it automatically in excel or oocalc } } - ExecMethod2('phpgwapi.browser.content_header',basename($document),$mimetype); + ExecMethod2('phpgwapi.browser.content_header',$name,$mimetype); echo $merged; } common::egw_exit(); diff --git a/phpgwapi/templates/idots/css/traditional.css b/phpgwapi/templates/idots/css/traditional.css index b0f485f140..69aa33e4fd 100755 --- a/phpgwapi/templates/idots/css/traditional.css +++ b/phpgwapi/templates/idots/css/traditional.css @@ -838,3 +838,12 @@ td.lettersearch { .egwGridView_grid input[type=checkbox] { margin: 0; } + +.egwLinkMoreOptions { + display: none; + margin: 0; + padding: 0; + border-bottom: 2px solid black; + border-left: 2px solid black; + border-right: 2px solid black; +} diff --git a/phpgwapi/templates/jerryr/css/brushed-metal.css b/phpgwapi/templates/jerryr/css/brushed-metal.css index 4da49e3247..0e10699ff5 100644 --- a/phpgwapi/templates/jerryr/css/brushed-metal.css +++ b/phpgwapi/templates/jerryr/css/brushed-metal.css @@ -1068,3 +1068,12 @@ td.lettersearch { .egwGridView_grid input[type=checkbox] { margin: 0; } + +.egwLinkMoreOptions { + display: none; + margin: 0; + padding: 0; + border-bottom: 2px solid black; + border-left: 2px solid black; + border-right: 2px solid black; +} diff --git a/phpgwapi/templates/jerryr/css/jerryr.css b/phpgwapi/templates/jerryr/css/jerryr.css index 774b18c01f..a3551ddba4 100644 --- a/phpgwapi/templates/jerryr/css/jerryr.css +++ b/phpgwapi/templates/jerryr/css/jerryr.css @@ -1012,3 +1012,12 @@ td.lettersearch { .egwGridView_grid input[type=checkbox] { margin: 0; } + +.egwLinkMoreOptions { + display: none; + margin: 0; + padding: 0; + border-bottom: 2px solid black; + border-left: 2px solid black; + border-right: 2px solid black; +}