[opencourrier-Commits] r1050 - in branches/5.0.0: . app/js obj

0 views
Skip to first unread message

fray...@adullact.net

unread,
Sep 19, 2017, 6:29:56 AM9/19/17
to openmairie-...@googlegroups.com
Author: fraynaud
Date: 2017-09-19 12:29:53 +0200 (Tue, 19 Sep 2017)
New Revision: 1050

Modified:
branches/5.0.0/HISTORY.txt
branches/5.0.0/app/js/script.js
branches/5.0.0/obj/courrier.class.php
Log:

mise en place d un html specifique courrier



Modified: branches/5.0.0/HISTORY.txt
===================================================================
--- branches/5.0.0/HISTORY.txt 2017-09-19 10:18:21 UTC (rev 1049)
+++ branches/5.0.0/HISTORY.txt 2017-09-19 10:29:53 UTC (rev 1050)
@@ -4,8 +4,6 @@
todo
----

-* om etat enlever le sous form courrier
-
* bug moteur de recherche table categorie non remplie / enlever du mdr

* limiter copie a service en cours dans rechercheform

Modified: branches/5.0.0/app/js/script.js
===================================================================
--- branches/5.0.0/app/js/script.js 2017-09-19 10:18:21 UTC (rev 1049)
+++ branches/5.0.0/app/js/script.js 2017-09-19 10:29:53 UTC (rev 1050)
@@ -13,6 +13,7 @@
inputText_bind_tinyMCE_texte();
inputText_bind_tinyMCE_bible();
inputText_bind_tinyMCE_categorie();
+ inputText_bind_tinyMCE_courrier();
}
}

@@ -780,3 +781,61 @@
context: 'insert'
});
}
+
+// courrier - module simplifié
+
+function inputText_bind_tinyMCE_courrier() {
+ //
+ tinymce.init({
+ //
+ selector: "textarea.html_courrier",
+ //
+ menubar: "edit insert format table tools",
+ //
+ menu: {
+ },
+ // modifier le language via l'appel à la LOCALE
+ language : locale,
+ // Spell check (pas de contextmenu...)
+ browser_spellcheck : true,
+ //
+ fontsize_formats: "6pt 7pt 8pt 9pt 10pt 11pt 12pt 13pt 14pt 15pt 18pt 24pt 36pt",
+ entity_encoding : "raw",
+ plugins: [
+ "advlist lists hr",
+ "searchreplace wordcount",
+ "insertdatetime save",
+ "paste textcolor autoresize code"
+ ],
+ // Custom CSS
+ content_css: "../css/tinymce.css",
+ // Style inline
+ inline_styles : true,
+ paste_auto_cleanup_on_paste : true,
+ paste_word_valid_elements: "b,strong,i,em,h1,h2",
+ //
+ contextmenu : "cut copy paste pastetext selectall | removeformat | insertdate",
+ insertdatetime_formats : ["%d/%m/%Y", "%H:%M"],
+ invalid_elements : "script,applet,iframe,tcpdf",
+ toolbar1: "undo | bold italic underline | ",
+
+ formats : {
+ bold: {inline: 'span', styles: {'font-weight': 'bold'}},
+ },
+
+ // Liste des polices
+ font_formats: "Courier New=courier new,courier;"+
+ "Helvetica=helvetica;"+
+ "Times New Roman=times new roman,times",
+
+ // Colle le texte brut sans style, ni balise
+ paste_as_text: true,
+ //
+ setup: function(editor) {
+ //
+ editor.on('SetContent', function(e) {
+ editor.save();
+ });
+ }
+ });
+}

Modified: branches/5.0.0/obj/courrier.class.php
===================================================================
--- branches/5.0.0/obj/courrier.class.php 2017-09-19 10:18:21 UTC (rev 1049)
+++ branches/5.0.0/obj/courrier.class.php 2017-09-19 10:29:53 UTC (rev 1050)
@@ -55,7 +55,7 @@
$form->setType('categorie_courrier', 'autocomplete');
$form->setType('affaire_reference', 'autocomplete');
$form->setType('service_origine', 'hidden');
- $form->setType('objetcourrier', 'html');
+ $form->setType('objetcourrier', 'html_courrier');
}
if($maj==1){
if ( $this->nb_scan==1 ){
@@ -71,7 +71,7 @@
$form->setType('ajout_emetteur', 'hidden');
$form->setType('categorie_courrier','selecthiddenstatic');
$form->setType('service_origine', 'hidden');
- $form->setType('objetcourrier', 'html');
+ $form->setType('objetcourrier', 'html_courrier');
}
if($maj==3){
if ( $this->nb_scan==1 ){

Reply all
Reply to author
Forward
0 new messages