From 39a2d0326356f0111e2fda76458af6695f07e75a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 13 Feb 2018 13:36:44 +0100 Subject: [PATCH 1/5] Update changelog --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 3a5fa7d4f37..f9516e49a7b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ English Dolibarr ChangeLog ***** ChangeLog for 7.0.0 compared to 6.0.5 ***** For users: +NEW: Add a preview icon after files that can be previewed (pdf + images) NEW: When payment is registered, PDF of invoices are also regenerated so payments appears with no need to click on regenerate. NEW: #5711 Add shipment line deleting and editing for draft shipments. From af9e5885d0423b5b19acc4d01b8e5db01d58288b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 13 Feb 2018 13:36:44 +0100 Subject: [PATCH 2/5] Update changelog --- ChangeLog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChangeLog b/ChangeLog index 3a5fa7d4f37..d0893cbc3a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,9 +4,11 @@ English Dolibarr ChangeLog ***** ChangeLog for 7.0.0 compared to 6.0.5 ***** For users: +NEW: Add a preview icon after files that can be previewed (pdf + images) NEW: When payment is registered, PDF of invoices are also regenerated so payments appears with no need to click on regenerate. NEW: #5711 Add shipment line deleting and editing for draft shipments. +NEW: Accept substitution key __(ABC)__ replaced with value of translation of key ABC NEW: Accept substitution key __[ABC]__ replaced with value of const ABC NEW: Accountancy Add variant on sell account for intracommunity sales & export sales NEW: Add a button "Activate all services" on contracts From 7ed128ff2b642af0aa8ba5e99d4fd0352f50e27b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 13 Feb 2018 14:03:11 +0100 Subject: [PATCH 3/5] Fix bad escaping --- htdocs/core/tpl/ajaxrow.tpl.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/tpl/ajaxrow.tpl.php b/htdocs/core/tpl/ajaxrow.tpl.php index a75ed1846ff..e4a63b23b3d 100644 --- a/htdocs/core/tpl/ajaxrow.tpl.php +++ b/htdocs/core/tpl/ajaxrow.tpl.php @@ -71,7 +71,8 @@ $(document).ready(function(){ function() { console.log("tableDND end of ajax call"); if (reloadpage == 1) { - location.href = ''; + //console.log(''); + location.href = ''; } else { $("# .drag").each( function( intIndex ) { From e510e1b679aa97b04f9e10c873b654bcaad33884 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 13 Feb 2018 15:48:29 +0100 Subject: [PATCH 4/5] Fix search field at wrong column --- htdocs/core/class/html.formfile.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 4bff96700d5..ba1520e9a81 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -1297,8 +1297,8 @@ class FormFile if (! empty($addfilterfields)) { print ''; - print ''; print ''; + print ''; print ''; print ''; // Action column From 434980bb2212208e401d7d757f3a9ca72af577e7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 13 Feb 2018 16:33:45 +0100 Subject: [PATCH 5/5] Fix svg image preview ko --- htdocs/core/lib/functions.lib.php | 3 ++- htdocs/core/lib/images.lib.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 6a67dec48f6..3fc40ab8af6 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -6832,7 +6832,7 @@ function getAdvancedPreviewUrl($modulepart, $relativepath, $alldata=0, $param='' if (empty($conf->use_javascript_ajax)) return ''; - $mime_preview = array('bmp', 'jpeg', 'png', 'gif', 'tiff', 'pdf', 'plain', 'css'); + $mime_preview = array('bmp', 'jpeg', 'png', 'gif', 'tiff', 'pdf', 'plain', 'css', 'svg+xml'); //$mime_preview[]='vnd.oasis.opendocument.presentation'; //$mime_preview[]='archive'; $num_mime = array_search(dol_mimetype($relativepath, '', 1), $mime_preview); @@ -6919,6 +6919,7 @@ function dol_mimetype($file, $default='application/octet-stream', $mode=0) if (preg_match('/\.gif$/i',$tmpfile)) { $mime='image/gif'; $imgmime='image.png'; $famime='file-image-o'; } if (preg_match('/\.bmp$/i',$tmpfile)) { $mime='image/bmp'; $imgmime='image.png'; $famime='file-image-o'; } if (preg_match('/\.(tif|tiff)$/i',$tmpfile)) { $mime='image/tiff'; $imgmime='image.png'; $famime='file-image-o'; } + if (preg_match('/\.svg$/i',$tmpfile)) { $mime='image/svg+xml';$imgmime='image.png'; $famime='file-image-o'; } // Calendar if (preg_match('/\.vcs$/i',$tmpfile)) { $mime='text/calendar'; $imgmime='other.png'; $famime='file-text-o'; } if (preg_match('/\.ics$/i',$tmpfile)) { $mime='text/calendar'; $imgmime='other.png'; $famime='file-text-o'; } diff --git a/htdocs/core/lib/images.lib.php b/htdocs/core/lib/images.lib.php index e6f69da1d93..f0a666b03e9 100644 --- a/htdocs/core/lib/images.lib.php +++ b/htdocs/core/lib/images.lib.php @@ -37,7 +37,7 @@ $quality = 80; */ function image_format_supported($file) { - $regeximgext='\.gif|\.jpg|\.jpeg|\.png|\.bmp|\.xpm|\.xbm'; // See also into product.class.php + $regeximgext='\.gif|\.jpg|\.jpeg|\.png|\.bmp|\.xpm|\.xbm|\.svg'; // See also into product.class.php // Case filename is not a format image if (! preg_match('/('.$regeximgext.')$/i',$file,$reg)) return -1;