From fcf54ac9ca8627241ef392ac7fccc9c2228a98e7 Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Fri, 6 May 2016 22:22:41 -0400 Subject: [PATCH 1/4] Several attachment changes - Use an "Add File" button at the bottom of the dropzone instead of clicking directly on the dropzone - Adjust layout to hopefully fix issue with long file names (haven't tested yet) - Show percentage in percentage bar - Fix issue where percentage bar would still animate even after upload finished --- css/mods-for-hesk.css | 6 +++++ inc/view_attachment_functions.inc.php | 36 +++++++++++++++++---------- index.php | 2 +- language/en/text.php | 3 ++- 4 files changed, 32 insertions(+), 15 deletions(-) diff --git a/css/mods-for-hesk.css b/css/mods-for-hesk.css index d67bbd49..37725234 100644 --- a/css/mods-for-hesk.css +++ b/css/mods-for-hesk.css @@ -331,4 +331,10 @@ div.setupButtons { .rate { margin: 0; +} + +.fileinput-button { + width: 100%; + border-top-left-radius: 0; + border-top-right-radius: 0; } \ No newline at end of file diff --git a/inc/view_attachment_functions.inc.php b/inc/view_attachment_functions.inc.php index df3e80ee..6bdc230b 100644 --- a/inc/view_attachment_functions.inc.php +++ b/inc/view_attachment_functions.inc.php @@ -176,18 +176,22 @@ function output_dropzone_window() { -
+
From 41bbeaf97f5bbe9b288bf6452d70f9f98571373b Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Tue, 10 May 2016 12:53:25 -0400 Subject: [PATCH 4/4] Use the new button layout on all dropzones --- admin/admin_ticket.php | 27 ++-------------------- admin/manage_knowledgebase.php | 33 ++++----------------------- inc/view_attachment_functions.inc.php | 17 ++++++++++++++ index.php | 15 +----------- ticket.php | 15 +----------- 5 files changed, 25 insertions(+), 82 deletions(-) diff --git a/admin/admin_ticket.php b/admin/admin_ticket.php index aa77f1b5..0a480cdc 100644 --- a/admin/admin_ticket.php +++ b/admin/admin_ticket.php @@ -1298,18 +1298,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
-
-
- -
'; - } - ?> -
-
- +
@@ -1869,19 +1858,7 @@ function hesk_printReplyForm()
-
-
- -
'; - } - ?> -
-
- +
-
-
- -
'; - } - ?> -
-
+
-
-
- -
'; - } - } - ?> -
-
- - - + diff --git a/inc/view_attachment_functions.inc.php b/inc/view_attachment_functions.inc.php index c8f4eed3..28e061ae 100644 --- a/inc/view_attachment_functions.inc.php +++ b/inc/view_attachment_functions.inc.php @@ -208,6 +208,23 @@ function output_attachment_id_holder_container($id) { echo '
'; } +function build_dropzone_markup($id = 'filedrop') { + global $hesklang, $hesk_settings; + + echo '
+
+ '; + for ($i = 1; $i <= $hesk_settings['attachments']['max_number']; $i++) { + $cls = ($i == 1 && in_array('attachments', $_SESSION['iserror'])) ? ' class="isError" ' : ''; + echo '
'; + } + echo '
+
+
+ '. $hesklang['ful'] . ''; +} + function display_dropzone_field($url, $id = 'filedrop') { global $hesk_settings, $hesklang; diff --git a/index.php b/index.php index 535325b1..9ed243b7 100644 --- a/index.php +++ b/index.php @@ -979,20 +979,7 @@ function print_add_ticket() :
-
-
- -
'; - } - ?> -
-
-
- +
-
-
- -
'; - } - ?> -
-
- - +