From 38c649f2dc07f6c34db25316a0ad4411a24c6c25 Mon Sep 17 00:00:00 2001 From: Luca Date: Mon, 25 Oct 2021 16:21:19 +0200 Subject: [PATCH 1/2] Aggiunta descrizione in gestione documentale --- gulpfile.js | 2 +- include/top.php | 2 +- modules/gestione_documentale/actions.php | 1 + modules/gestione_documentale/edit.php | 8 ++++++-- update/2_4_27.sql | 7 +++++-- 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 57ea3f20c..4716fd428 100755 --- a/gulpfile.js +++ b/gulpfile.js @@ -277,7 +277,7 @@ function srcFonts() { function ckeditor() { return gulp.src([ - config.nodeDirectory + '/ckeditor4/{adapters,lang,skins,plugins,core}/**/*.{js,json,css,png}', + config.nodeDirectory + '/ckeditor4/{adapters,lang,skins,plugins,core}/**/*.{js,json,css,png,gif,html}', config.nodeDirectory + '/ckeditor4/*.{js,css}', ]) .pipe(gulp.dest(config.production + '/' + config.paths.js + '/ckeditor')); diff --git a/include/top.php b/include/top.php index 9d7835e1c..c6e3843fa 100755 --- a/include/top.php +++ b/include/top.php @@ -213,7 +213,7 @@ if (Auth::check()) { ["Undo","Redo","-","Cut","Copy","Paste","PasteText","PasteFromWord","-","SpellChecker", "Scayt", "-","Link","Unlink","-","Bold","Italic","Underline","Superscript","SpecialChar","HorizontalRule","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","-","NumberedList","BulletedList","Outdent","Indent","Blockquote","-","Styles","Format","Image","Table", "TextColor", "BGColor" ], ], ckeditorToolbar_Full: [ - { name: "document", items : [ "Source" ] }, + { name: "document", items : [ "Source", "ExportPdf", "Preview", "Print" ] }, { name: "clipboard", items : [ "Cut","Copy","Paste","PasteText","PasteFromWord","-","Undo","Redo" ] }, { name: "editing", items : [ "Find","Replace","-","SelectAll","-","SpellChecker", "Scayt" ] }, { name: "forms", items : [ "Form", "Checkbox", "Radio", "TextField", "Textarea", "Select", "Button", "ImageButton", diff --git a/modules/gestione_documentale/actions.php b/modules/gestione_documentale/actions.php index 77979cfca..dce348512 100755 --- a/modules/gestione_documentale/actions.php +++ b/modules/gestione_documentale/actions.php @@ -36,6 +36,7 @@ switch (post('op')) { $dbo->update('do_documenti', [ 'idcategoria' => post('idcategoria'), 'nome' => post('nome'), + 'descrizione' => post('descrizione') ?: null, 'data' => post('data') ?: null, ], ['id' => $id_record]); diff --git a/modules/gestione_documentale/edit.php b/modules/gestione_documentale/edit.php index dc6162850..b98efd5bf 100755 --- a/modules/gestione_documentale/edit.php +++ b/modules/gestione_documentale/edit.php @@ -37,8 +37,6 @@ include_once __DIR__.'/../../core.php'; {[ "type": "text", "label": "Nome", "name": "nome", "required": 1, "value": "$nome$", "extra": "" ]} - -
{[ "type": "select", "label": "Categoria", "name": "idcategoria", "required": 1, "ajax-source": "categorie_documenti", "value": "$idcategoria$", "extra": "" ]}
@@ -49,6 +47,12 @@ include_once __DIR__.'/../../core.php'; + +
+
+ {[ "type": "ckeditor", "use_full_ckeditor": 1, "label": "", "name": "descrizione", "value": "$descrizione$" ]} +
+
diff --git a/update/2_4_27.sql b/update/2_4_27.sql index ccecabc94..080702587 100644 --- a/update/2_4_27.sql +++ b/update/2_4_27.sql @@ -22,10 +22,13 @@ UPDATE `zz_modules` SET `options` = 'SELECT |select| FROM `do_documenti`\nINNER -- Task per l'eliminazione automatica della coda d'invio INSERT INTO `zz_tasks` (`id`, `name`, `class`, `expression`, `next_execution_at`, `last_executed_at`) VALUES -(NULL, 'Eliminazione automatica coda d\'invio', 'Modules\\StatoEmail\\EliminaMailTask', '0 */4 * * *', NULL, NULL); +(NULL, "Eliminazione automatica coda d'invio", 'Modules\\StatoEmail\\EliminaMailTask', '0 */4 * * *', NULL, NULL); INSERT INTO `zz_settings` (`id`, `nome`, `valore`, `tipo`, `editable`, `sezione`, `order`, `help`) VALUES (NULL, 'Numero di giorni mantenimento coda di invio', '0', 'integer', 1, 'Mail', 1, NULL); -- Plugin contratti del cliente -INSERT INTO `zz_plugins` (`id`, `name`, `title`, `idmodule_from`, `idmodule_to`, `position`, `script`, `enabled`, `default`, `order`, `compatibility`, `version`, `options2`, `options`, `directory`, `help`) VALUES (NULL, 'Contratti del cliente', 'Contratti del cliente', '2', '2', 'tab', 'contratti_cliente.php', '1', '0', '0', '', '', NULL, NULL, '', ''); \ No newline at end of file +INSERT INTO `zz_plugins` (`id`, `name`, `title`, `idmodule_from`, `idmodule_to`, `position`, `script`, `enabled`, `default`, `order`, `compatibility`, `version`, `options2`, `options`, `directory`, `help`) VALUES (NULL, 'Contratti del cliente', 'Contratti del cliente', '2', '2', 'tab', 'contratti_cliente.php', '1', '0', '0', '', '', NULL, NULL, '', ''); + +-- Aggiunto campo descrizione (facoltativo) in gestione documentale +ALTER TABLE `do_documenti` ADD `descrizione` TEXT NULL AFTER `nome`; \ No newline at end of file From 4b649cd02019414888b2f8b720298757ae8420c7 Mon Sep 17 00:00:00 2001 From: Luca Date: Mon, 25 Oct 2021 16:39:37 +0200 Subject: [PATCH 2/2] Fix minori --- include/top.php | 9 +++++---- modules/gestione_documentale/actions.php | 2 +- modules/newsletter/actions.php | 2 +- modules/stato_servizi/edit.php | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/include/top.php b/include/top.php index c6e3843fa..bbaf487f8 100755 --- a/include/top.php +++ b/include/top.php @@ -213,21 +213,22 @@ if (Auth::check()) { ["Undo","Redo","-","Cut","Copy","Paste","PasteText","PasteFromWord","-","SpellChecker", "Scayt", "-","Link","Unlink","-","Bold","Italic","Underline","Superscript","SpecialChar","HorizontalRule","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","-","NumberedList","BulletedList","Outdent","Indent","Blockquote","-","Styles","Format","Image","Table", "TextColor", "BGColor" ], ], ckeditorToolbar_Full: [ - { name: "document", items : [ "Source", "ExportPdf", "Preview", "Print" ] }, + { name: "document", items : [ "Source", "ExportPdf", "Preview", "Print", "-", "Templates" ] }, { name: "clipboard", items : [ "Cut","Copy","Paste","PasteText","PasteFromWord","-","Undo","Redo" ] }, { name: "editing", items : [ "Find","Replace","-","SelectAll","-","SpellChecker", "Scayt" ] }, { name: "forms", items : [ "Form", "Checkbox", "Radio", "TextField", "Textarea", "Select", "Button", "ImageButton", "HiddenField" ] }, "/", - { name: "basicstyles", items : [ "Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat" ] }, + { name: "basicstyles", items : [ "Bold","Italic","Underline","Strike","Subscript","Superscript","-","CopyFormatting","RemoveFormat" ] }, { name: "paragraph", items : [ "NumberedList","BulletedList","-","Outdent","Indent","-","Blockquote","CreateDiv", - "-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","-","BidiLtr","BidiRtl" ] }, + "-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","-","BidiLtr","BidiRtl","Language" ] }, { name: "links", items : [ "Link","Unlink","Anchor" ] }, { name: "insert", items : [ "Image","Flash","Table","HorizontalRule","Smiley","SpecialChar","PageBreak","Iframe" ] }, "/", { name: "styles", items : [ "Styles","Format","Font","FontSize" ] }, { name: "colors", items : [ "TextColor","BGColor" ] }, - { name: "tools", items : [ "Maximize", "ShowBlocks","-","About" ] } + { name: "tools", items : [ "Maximize", "ShowBlocks" ] }, + { name: "about", items: [ "About" ] } ], order_manager_id: "'.($dbo->isInstalled() ? Modules::get('Stato dei servizi')['id'] : '').'", dataload_page_buffer: '.setting('Lunghezza in pagine del buffer Datatables').', diff --git a/modules/gestione_documentale/actions.php b/modules/gestione_documentale/actions.php index dce348512..4640a0d5a 100755 --- a/modules/gestione_documentale/actions.php +++ b/modules/gestione_documentale/actions.php @@ -36,7 +36,7 @@ switch (post('op')) { $dbo->update('do_documenti', [ 'idcategoria' => post('idcategoria'), 'nome' => post('nome'), - 'descrizione' => post('descrizione') ?: null, + 'descrizione' => post('descrizione', true) ?: null, 'data' => post('data') ?: null, ], ['id' => $id_record]); diff --git a/modules/newsletter/actions.php b/modules/newsletter/actions.php index f0d4ba719..983723f97 100755 --- a/modules/newsletter/actions.php +++ b/modules/newsletter/actions.php @@ -46,7 +46,7 @@ switch (filter('op')) { $newsletter->completed_at = filter('completed_at'); $newsletter->subject = filter('subject'); - $newsletter->content = $_POST['content']; //filter('content'); + $newsletter->content = post('content', true); //filter('content'); $newsletter->save(); diff --git a/modules/stato_servizi/edit.php b/modules/stato_servizi/edit.php index efe6c1a7e..d7bb5e494 100755 --- a/modules/stato_servizi/edit.php +++ b/modules/stato_servizi/edit.php @@ -100,7 +100,7 @@ if (Services::isEnabled()) { if (!$risorse_in_scadenza->isEmpty()){ echo ' -