diff --git a/html/js/noalyss_script.js b/html/js/noalyss_script.js
index 78e461ae4..7516c7d35 100644
--- a/html/js/noalyss_script.js
+++ b/html/js/noalyss_script.js
@@ -2265,7 +2265,7 @@ function filter_list(phrase, _id) {
ele += la_content[e].innerText;
}
- console.debug(`ele = ${ele}`);
+
if (ele.toLowerCase().indexOf(words) >= 0) {
tot_found++;
l_list.childNodes[r].style.display = 'block';
@@ -4326,7 +4326,7 @@ function check_password_strength(p_pass_domid, p_result_domid, details) {
return;
}
var answer = req.responseJSON;
- console.debug(answer);
+
if (answer['password'] == 'nok') {
id$(p_pass_domid).setStyle("background-color:red");
@@ -4726,18 +4726,23 @@ Noalyss = function () {
*/
Noalyss.prototype.activate_tinymce=function (domid,mode) {
tinymce.remove('#'+domid);
- if ( mode == 'min' || ! mode )
+
+ if ( mode == 'minimal' || ! mode )
{
tinymce.init({
selector: 'textarea#'+domid,
+ plugins:'link quickbars ',
height: 500,
menubar: false,
toolbar: 'undo redo | ' +
- 'bold italic underline forecolor backcolor |fontsize styles ' +
+ 'bold italic underline forecolor backcolor |fontsize ' +
' | bullist numlist | ' +
'removeformat | help',
content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:16px }',
+ quickbars_insert_toolbar:false,
promotion: false,
+ quickbars_selection_toolbar:' bold italic underline forecolor backcolor ',
+
license_key:'gpl',
statusbar: false,
branding: false
@@ -4758,18 +4763,38 @@ Noalyss.prototype.activate_tinymce=function (domid,mode) {
menubar: false,
plugins:'link lists emoticons quickbars pagebreak table',
toolbar: 'undo redo ' +
- 'bold italic underline strikethrough | hr quickimage | forecolor backcolor|emoticons |fontsize styles ' +
+ 'bold italic underline strikethrough | hr quickimage | forecolor backcolor|emoticons |fontsize styles fontfamily ' +
' table tabledelete |' +
' | link unlink bullist numlist | ' +
'removeformat | help',
content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:16px }',
+ quickbars_insert_toolbar:false,
promotion: false,
+ quickbars_selection_toolbar:' bold italic underline forecolor backcolor ',
license_key:'gpl',
- statusbar: false,
+ statusbar: true,
branding: false
});
- }else {
+ }else if ( mode == 'no-toolbar' )
+ {
+
+ tinymce.init({
+ selector: 'textarea#'+domid,
+ height: 500,
+ plugins:' quickbars',
+ menubar:false,
+ toolbar: false,
+ quickbars_selection_toolbar:' bold italic underline forecolor backcolor hide',
+ content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:16px }',
+ promotion: false,
+ license_key:'gpl',
+ statusbar: false,
+ toolbar_mode: 'hide',
+ quickbars_insert_toolbar:false,
+ branding: false
+ });
+ } else {
console.error(`Noalyss.activate_tinymce unknow mode`);
}
diff --git a/include/class/follow_up.class.php b/include/class/follow_up.class.php
index 3edab1571..cc9a05487 100644
--- a/include/class/follow_up.class.php
+++ b/include/class/follow_up.class.php
@@ -225,7 +225,7 @@ class Follow_Up
// Description
$desc=new ITextArea();
- $desc->set_enrichText("enrich");
+ $desc->set_enrichText("full");
$desc->style=' class="itextarea" style="width:80%;margin-left:5%;"';
$desc->name="ag_comment";
$desc->readOnly=$readonly;
diff --git a/include/lib/itextarea.class.php b/include/lib/itextarea.class.php
index 4912e27b5..03bd8865c 100644
--- a/include/lib/itextarea.class.php
+++ b/include/lib/itextarea.class.php
@@ -53,9 +53,10 @@ class ITextarea extends HtmlInput
*/
public function set_enrichText($enrich)
{
- if ( ! in_array($enrich,['plain','enrich',"min"])) {
- throw new \Exception("IT57.Invalid option");
+ if ( ! in_array($enrich,['enrich','plain','full',"minimal","no-toolbar"])) {
+ throw new \Exception("IT57.Invalid option [$enrich]");
}
+ if ( $enrich == 'enrich') $enrich='full';
$this->enrichText = $enrich;
return $this;
}
@@ -69,36 +70,26 @@ class ITextarea extends HtmlInput
$this->value=($p_value==null)?$this->value:$p_value;
$this->id=($this->id=="")?$this->name:$this->id;
if ( $this->readOnly==true) return $this->display();
-
+ if ( empty($this->id)) $this->id=$this->name;
+
if ( $this->enrichText == "plain" ) {
$r="";
$r.='";
- } elseif ($this->enrichText=='enrich') {
- if ( empty($this->id)) $this->id=$this->name;
+ } else {
$r=<<style}>{$this->value}
-EOF;
- }elseif ($this->enrichText=='min') {
- if ( empty($this->id)) $this->id=$this->name;
-
- $r=<<style}>{$this->value}
-
EOF;
}
+
return $r;
}
diff --git a/include/template/follow_up-display.php b/include/template/follow_up-display.php
index d76725d8f..3c69974dc 100644
--- a/include/template/follow_up-display.php
+++ b/include/template/follow_up-display.php
@@ -334,7 +334,7 @@ function small(p_id_textarea){
$style_enl='style="display:inline"';$style_small='style="display:none"';
// description
$description = new ITextarea("ag_description");
- $description->set_enrichText("enrich");
+ $description->set_enrichText("full");
$description->id="ag_description";
$has_description = false;
//---------------------------------- Description -------------------------------------------------------------------
diff --git a/scenario/LIB/itextarea-test.php b/scenario/LIB/itextarea-test.php
index b6d3896d6..048541c40 100644
--- a/scenario/LIB/itextarea-test.php
+++ b/scenario/LIB/itextarea-test.php
@@ -38,12 +38,35 @@ echo '';
$itext=new \ITextarea("enrich");
$itext->value= $http->post("enrich","raw","");
-$itext->set_enrichText("enrich");
+$itext->set_enrichText("full");
echo $itext->input();
?>
+Minimum Area
+ value= $http->post("enrich2","raw","");
+
+ $itext->set_enrichText("minimal");
+ echo $itext->input();
+ ?>
+
+
+
+
No Toolbar
+ value= $http->post("enrich3","raw","");
+
+ $itext->set_enrichText("no-toolbar");
+ echo $itext->input();
+ ?>
+
+
+
+
Plain Area