From aeec9263efa8a9f2319d75d4bf4118f4391effa4 Mon Sep 17 00:00:00 2001 From: nathan Date: Tue, 21 May 2024 15:10:19 -0600 Subject: [PATCH] Merge document fixes - Give some feedback for single document - Fix line breaks in long task messages - Fix link merged document to entries --- api/js/jsapi/egw_app.ts | 1 + api/src/Storage/Merge.php | 6 +++--- api/templates/default/etemplate2.css | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/api/js/jsapi/egw_app.ts b/api/js/jsapi/egw_app.ts index 78a6a7e9cb..50660b7834 100644 --- a/api/js/jsapi/egw_app.ts +++ b/api/js/jsapi/egw_app.ts @@ -871,6 +871,7 @@ export abstract class EgwApp { // Handle it all on the server in one request mergedFiles = await this.egw.request(vars.menuaction, [vars.id, vars.document, vars.options]); + this.egw.message(mergedFiles, "success"); } else { diff --git a/api/src/Storage/Merge.php b/api/src/Storage/Merge.php index cc557d57ec..feb55eafa9 100644 --- a/api/src/Storage/Merge.php +++ b/api/src/Storage/Merge.php @@ -2528,7 +2528,7 @@ abstract class Merge } foreach(['pdf', 'individual', 'link'] as $option) { - $$option = is_null($options) ? (boolean)$_REQUEST['options'][$option] : (boolean)$options[$option]; + $$option = is_null($options) || empty($options) ? (boolean)$_REQUEST['options'][$option] : (boolean)$options[$option]; } $app = (is_null($options) ? $_REQUEST['options']['app'] : $options['app']) ?? $GLOBALS['egw_info']['flags']['currentapp']; @@ -2564,7 +2564,7 @@ abstract class Merge { foreach((array)$ids as $id) { - Api\Link::link($app, $id, Api\Link::VFS_APPNAME, $target); + Api\Link::link($app, $id, Api\Link::VFS_LINK, Vfs::PREFIX . $target); } } } @@ -3237,7 +3237,7 @@ abstract class Merge 'type' => 'taglist', 'label' => 'Merged document filename', 'name' => self::PREF_DOCUMENT_FILENAME, - 'values' => self::DOCUMENT_FILENAME_OPTIONS, + 'values' => static::DOCUMENT_FILENAME_OPTIONS, 'help' => 'Choose the default filename for merged documents.', 'xmlrpc' => True, 'admin' => False, diff --git a/api/templates/default/etemplate2.css b/api/templates/default/etemplate2.css index 57ac9cddad..2e35748a27 100644 --- a/api/templates/default/etemplate2.css +++ b/api/templates/default/etemplate2.css @@ -2770,6 +2770,7 @@ table.egwGridView_outer thead tr th.noResize:hover { } .long_task .message { + white-space: break-spaces; height: inherit; display: list-item; border: none;