Merge branch 'feature-16354/TinyMCE_move_to_new_version' into infocenter_2023_12_04

# Conflicts:
#	composer.lock
This commit is contained in:
ma0048
2023-12-04 12:44:10 +01:00
25 changed files with 411 additions and 44 deletions
@@ -37,7 +37,7 @@ class FASMessages extends Auth_Controller
// Loads the view to write a new message with a template
$this->load->view(
'system/messages/htmlWriteTemplate',
'system/messages/FAShtmlWriteTemplate',
$this->CLMessagesModel->prepareHtmlWriteTemplatePrestudents($prestudents)
);
}
@@ -53,7 +53,7 @@ class FASMessages extends Auth_Controller
// Loads the view to write a new message with a template
$this->load->view(
'system/messages/htmlWriteTemplate',
'system/messages/FAShtmlWriteTemplate',
$this->CLMessagesModel->prepareHtmlWriteTemplatePrestudents($prestudents, $message_id, $recipient_id)
);
}
+10 -3
View File
@@ -9,7 +9,6 @@
'jqueryui1' => true,
'ajaxlib' => true,
'tablesorter2' => true,
'tinymce4' => true,
'sbadmintemplate3' => true,
'addons' => true,
'navigationwidget' => true,
@@ -126,10 +125,18 @@
</table>
</div>
<div class="col-lg-4 table-responsive">
<form action="<?php echo base_url('soap/datenverbund_client.php?action=pruefeBPK');?>" method="POST" target="_blank">
<form
action="<?php echo base_url('soap/datenverbund_client.php?action=pruefeBPK');?>"
method="POST"
target="_blank"
>
<input type="hidden" name="vorname" value="<?php echo $stammdaten->vorname; ?>"/>
<input type="hidden" name="nachname" value="<?php echo $stammdaten->nachname; ?>"/>
<input type="hidden" name="geburtsdatum" value="<?php echo mb_str_replace('-', '',$stammdaten->gebdatum); ?>"/>
<input
type="hidden"
name="geburtsdatum"
value="<?php echo mb_str_replace('-', '', $stammdaten->gebdatum); ?>"
/>
<input type="hidden" name="geschlecht" value="<?php echo mb_strtoupper($stammdaten->geschlecht); ?>"/>
<input type="submit" value="Namenssuche starten" class="btn btn-default"/>
</form>
@@ -8,7 +8,7 @@
'dialoglib' => true,
'ajaxlib' => true,
'tablesorter2' => true,
'tinymce4' => true,
'tinymce5' => true,
'sbadmintemplate3' => true,
'addons' => true,
'navigationwidget' => true,
@@ -10,7 +10,7 @@
'dialoglib' => true,
'ajaxlib' => true,
'tablesorter2' => true,
'tinymce4' => true,
'tinymce5' => true,
'sbadmintemplate3' => true,
'addons' => true,
'navigationwidget' => true,
@@ -131,7 +131,11 @@
<?php echo $this->p->t('infocenter', 'zgvNichtErfuellt') ?>
</button>
<?php if ($studiengang_typ === 'm') : ?>
<button type="button" class="btn btn-default zgvAkzeptierenPruefung" id="zgvAkzeptierenPruefung_<?php echo $prestudent_id ?>">
<button
type="button"
class="btn btn-default zgvAkzeptierenPruefung"
id="zgvAkzeptierenPruefung_<?php echo $prestudent_id ?>"
>
<?php echo $this->p->t('infocenter', 'zgvErfuelltPruefung') ?>
</button>
<?php endif; ?>
@@ -0,0 +1,197 @@
<?php
$this->load->view(
'templates/FHC-Header',
array(
'title' => 'Write a new message or reply using templates',
'jquery3' => true,
'jqueryui1' => true,
'bootstrap3' => true,
'ajaxlib' => true,
'fontawesome4' => true,
'tinymce3' => true,
'sbadmintemplate3' => true,
'dialoglib' => true,
'widgets' => true,
'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/message.css'),
'customJSs' => array('public/js/bootstrapper.js', 'public/js/messaging/fasMessageWrite.js')
)
);
?>
<body>
<div id="wrapper">
<div id="page-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<h3 class="page-header">
<?php echo ucfirst($this->p->t('ui', 'nachrichtSenden')); ?>
</h3>
</div>
</div>
<form id="sendForm" method="post" action="<?php echo site_url('/system/messages/Messages/sendImplicitTemplate'); ?>">
<div class="row">
<div class="form-group">
<div class="col-lg-1 msgfieldcol-left">
<label>
<?php echo ucfirst($this->p->t('global', 'empfaenger')); ?>:
</label>
</div>
<div class="col-lg-11 msgfieldcol-right">
<?php echo $recipientsList; ?>
</div>
</div>
</div>
<div class="row">
<div class="form-group">
<div class="col-lg-1 msgfield msgfieldcol-left">
<label>
<?php echo ucfirst($this->p->t('global', 'betreff')); ?>:
</label>
</div>
&nbsp;
<div class="col-lg-7">
<input id="subject" class="form-control" type="text" value="<?php echo $subject; ?>" name="subject">
</div>
</div>
</div>
<br>
<div class="row">
<div class="col-lg-9">
<label>
<?php echo ucfirst($this->p->t('global', 'nachricht')); ?>:
</label>
<textarea id="bodyTextArea" class="bodyTextArea" name="body">
<?php echo $body; ?>
</textarea>
</div>
<div class="col-lg-3">
<div class="form-group">
<label>
<?php echo ucfirst($this->p->t('ui', 'felder')); ?>:
</label>
<?php
$size = count($variables) > 19 ? 19 : count($variables);
echo $this->widgetlib->widget(
'MultipleDropdown_widget',
array('elements' => success($variables)),
array(
'name' => 'variables[]',
'id' => 'variables',
'size' => $size,
'multiple' => true
)
);
?>
</div>
<br>
<div class="form-group">
<label>
<?php echo ucfirst($this->p->t('ui', 'meineFelder')); ?>:
</label>
<?php
$size = count($user_fields) > 5 ? 5 : count($user_fields);
echo $this->widgetlib->widget(
'MultipleDropdown_widget',
array('elements' => success($user_fields)),
array(
'name' => 'user_fields[]',
'id' => 'user_fields',
'size' => $size,
'multiple' => true
)
);
?>
</div>
</div>
</div>
<br>
<div class="row">
<div class="col-xs-3">
<?php
echo $this->widgetlib->widget(
'Vorlage_widget',
array('oe_kurzbz' => $organisationUnits, 'isAdmin' => $senderIsAdmin),
array('name' => 'vorlage', 'id' => 'vorlageDnD')
);
?>
</div>
<div class="col-xs-6">
<button id="sendButton" class="btn btn-default pull-right" type="button">
<?php echo $this->p->t('ui', 'senden'); ?>
</button>
</div>
</div>
<br>
<hr>
<div class="row">
<div class="col-lg-12">
<label>
<?php echo ucfirst($this->p->t('global', 'vorschau')); ?>:
</label>
</div>
</div>
<div class="well" id="templatePreviewDiv">
<div class="row">
<div class="col-sm-12" style="display: inline">
<div class="form-group form-inline">
<div class="input-group">
<?php
echo $this->widgetlib->widget(
'Dropdown_widget',
array(
'elements' => success($recipientsArray),
'emptyElement' => ucfirst($this->p->t('global', 'empfaenger')).'...'
),
array(
'name' => 'recipients[]',
'id' => 'recipients'
)
);
?>
<span class="input-group-btn">
<a class="btn btn-default" href="#templatePreviewDiv" id="refresh">
<?php echo ucfirst($this->p->t('ui', 'refresh')); ?>
</a>
</span>
</div>
</div>
</div>
</div>
<br>
<textarea id="tinymcePreview" class="tinymcePreview"></textarea>
</div>
<?php echo $recipients_ids; ?>
<?php echo $relationmessage_id; ?>
<?php echo $type; ?>
</form>
</div>
</div>
</div>
</body>
<?php $this->load->view("templates/FHC-Footer"); ?>
@@ -12,7 +12,7 @@
'tabulator4' => true,
'ajaxlib' => true,
'dialoglib' => true,
'tinymce4' => true,
'tinymce5' => true,
'phrases' => array('global', 'ui'),
'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/message.css'),
'customJSs' => array('public/js/bootstrapper.js', 'public/js/messaging/read.js')
@@ -10,7 +10,7 @@
'sbadmintemplate3' => true,
'ajaxlib' => true,
'dialoglib' => true,
'tinymce4' => true,
'tinymce5' => true,
'phrases' => array('global', 'ui'),
'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/message.css'),
'customJSs' => array('public/js/bootstrapper.js', 'public/js/messaging/write.js')
@@ -10,7 +10,7 @@
'sbadmintemplate3' => true,
'ajaxlib' => true,
'dialoglib' => true,
'tinymce4' => true,
'tinymce5' => true,
'phrases' => array('global', 'ui'),
'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/message.css'),
'customJSs' => array('public/js/bootstrapper.js', 'public/js/messaging/writeReply.js')
@@ -6,7 +6,7 @@
'jquery3' => true,
'bootstrap3' => true,
'fontawesome4' => true,
'tinymce4' => true,
'tinymce5' => true,
'sbadmintemplate3' => true,
'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/message.css'),
'customJSs' => array('public/js/bootstrapper.js', 'public/js/messaging/messageWriteReply.js')
@@ -8,7 +8,7 @@
'bootstrap3' => true,
'ajaxlib' => true,
'fontawesome4' => true,
'tinymce4' => true,
'tinymce5' => true,
'sbadmintemplate3' => true,
'dialoglib' => true,
'widgets' => true,
@@ -1,5 +1,5 @@
<?php
$this->load->view('templates/header', array('title' => 'VorlageEdit', 'tinymce4' => true, 'jsonforms' => true));
$this->load->view('templates/header', array('title' => 'VorlageEdit', 'tinymce5' => true, 'jsonforms' => true));
?>
<div class="row">
+1 -1
View File
@@ -23,7 +23,7 @@
$tablesorter2 = isset($tablesorter2) ? $tablesorter2 : false;
$tabulator4 = isset($tabulator4) ? $tabulator4 : false;
$tabulator5 = isset($tabulator5) ? $tabulator5 : false;
$tinymce4 = isset($tinymce4) ? $tinymce4 : false;
$tinymce3 = isset($tinymce3) ? $tinymce3 : false;
$tinymce5 = isset($tinymce5) ? $tinymce5 : false;
$vue3 = isset($vue3) ? $vue3 : false;
$primevue3 = isset($primevue3) ? $primevue3 : false;
+3 -3
View File
@@ -100,14 +100,14 @@
// Tabulator 5 JS
if ($tabulator5 === true) generateJSsInclude('vendor/olifolkerd/tabulator5/dist/js/tabulator.min.js');
// Tinymce 4 JS
if ($tinymce4 === true) generateJSsInclude('vendor/tinymce/tinymce4/tinymce.min.js');
// Tinymce 3 JS
if ($tinymce3 === true) generateJSsInclude('include/tiny_mce/tiny_mce.js');
// Tinymce 5 JS
if ($tinymce5 === true) generateJSsInclude('vendor/tinymce/tinymce5/tinymce.min.js');
// Vue 3 JS
if ($vue3 === true)
if ($vue3 === true)
{
generateJSsInclude('vendor/vuejs/vuejs3/vue.global.prod.js');
generateJSsInclude('vendor/vuejs/vuerouter4/vue-router.global.js');
@@ -79,9 +79,6 @@
// Tabulator 5 CSS
if ($tabulator5 === true) generateCSSsInclude('public/css/Tabulator5.css');
// Tinymce 4 CSS
if ($tinymce4 === true) generateCSSsInclude('public/css/TinyMCE4.css');
// Tinymce 5 CSS
if ($tinymce5 === true) generateCSSsInclude('public/css/TinyMCE5.css');
+1 -1
View File
@@ -95,7 +95,7 @@ if($jqueryV1 && $jqueryV2) show_error("Two JQuery versions used: composer and in
<?php endif ?>
<?php if($tinymce) : ?>
<script type="text/javascript" src="<?php echo base_url('vendor/tinymce/tinymce4/tinymce.min.js');?>"></script>
<script type="text/javascript" src="<?php echo base_url('vendor/tinymce/tinymce5/tinymce.min.js');?>"></script>
<?php endif ?>
<?php if($textile) : ?>
+3 -2
View File
@@ -5,5 +5,6 @@
plugins: [<?php echo $plugins; ?>],
toolbar: "<?php echo $toolbar; ?>"
});
</script>
<<?=$selector?> name="<?=$name?>" style="<?=$style?>"><?=$text?></<?=$selector?>>
</script>
<<?=$selector?> name="<?=$name?>" style="<?=$style?>"><?=$text?></<?=$selector?>>
-12
View File
@@ -270,17 +270,6 @@
}
}
},
{
"type": "package",
"package": {
"name": "tinymce/tinymce4",
"version": "4.9.11",
"dist": {
"url": "https://github.com/tinymce/tinymce-dist/archive/refs/tags/4.9.11.zip",
"type": "zip"
}
}
},
{
"type": "package",
"package": {
@@ -435,7 +424,6 @@
"scottjehl/respond": "1.4.2",
"tapmodo/jcrop": "2.0.4",
"tinymce/tinymce4": "4.9.*",
"tinymce/tinymce5": "5.10.*",
"tomazdragar/simplecropper": "1.0",
"twbs/bootstrap3": "3.4.*",
+1
View File
@@ -15,6 +15,7 @@ var MessageList = {
statusbar: false,
plugins: "autoresize",
autoresize_bottom_margin: 10,
max_height:495,
autoresize_min_height: 140,
autoresize_max_height: 495,
//callback to avoid conflict with ajax (for getting body of first message)
+154
View File
@@ -0,0 +1,154 @@
// ********************************************************
// JS used by view system/messages/htmlWriteTemplate
// ********************************************************
function tinymcePreviewSetContent()
{
if ($("#tinymcePreview"))
{
if ($("#recipients").children(":selected").val() > -1)
{
parseMessageText($("#recipients").children(":selected").val(), tinyMCE.get("bodyTextArea").getContent());
}
else
{
tinyMCE.get("tinymcePreview").setContent("");
}
}
}
function parseMessageText(receiver_id, text)
{
FHC_AjaxClient.ajaxCallPost(
"system/messages/Messages/parseMessageText",
{
receiver_id: receiver_id,
text: text,
type: $("#type").val()
},
{
successCallback: function(data, textStatus, jqXHR) {
if (FHC_AjaxClient.hasData(data))
{
tinyMCE.get("tinymcePreview").setContent(FHC_AjaxClient.getData(data));
}
else if (FHC_AjaxClient.isError(data))
{
FHC_DialogLib.alertError(data.retval);
}
}
}
);
}
$(document).ready(function ()
{
tinymce.init({
theme : "advanced",
mode : "specific_textareas",
editor_selector: "bodyTextArea",
theme_advanced_buttons2: "undo, redo, outdent, indent, bullist, numlist, link",
theme_advanced_buttons3: "",
theme_advanced_buttons4: "",
theme_advanced_toolbar_location: "top",
height: "400px",
});
tinymce.init({
theme : "advanced",
mode : "specific_textareas",
editor_selector: "tinymcePreview",
height: 400,
readonly: 1,
});
if ($("#variables"))
{
$("#variables").dblclick(function ()
{
if ($("#bodyTextArea"))
{
//if editor active add at cursor position, otherwise at end
if (tinymce.activeEditor.id === "bodyTextArea")
tinymce.activeEditor.execCommand('mceInsertContent', false, $(this).children(":selected").val());
else
tinyMCE.get("bodyTextArea").setContent(tinyMCE.get("bodyTextArea").getContent() + $(this).children(":selected").val());
}
});
}
if ($("#user_fields"))
{
$("#user_fields").dblclick(function ()
{
if ($("#bodyTextArea"))
{
//if editor active add at cursor position, otherwise at end
if (tinymce.activeEditor.id === "bodyTextArea")
tinymce.activeEditor.execCommand('mceInsertContent', false, $(this).children(":selected").val());
else
tinyMCE.get("bodyTextArea").setContent(tinyMCE.get("bodyTextArea").getContent() + $(this).children(":selected").val());
}
});
}
if ($("#recipients"))
{
$("#recipients").change(tinymcePreviewSetContent);
}
if ($("#refresh"))
{
$("#refresh").click(tinymcePreviewSetContent);
}
if ($("#sendButton") && $("#sendForm"))
{
$("#sendButton").click(function ()
{
if ($("#subject") && $("#subject").val() != '' && tinyMCE.get("bodyTextArea").getContent() != '')
{
$("#sendForm").submit();
}
else
{
FHC_DialogLib.alertInfo("Subject and text are required fields!");
}
});
}
if ($("#vorlageDnD"))
{
$("#vorlageDnD").change(function ()
{
var vorlage_kurzbz = this.value;
if (vorlage_kurzbz != '')
{
FHC_AjaxClient.ajaxCallGet(
"system/messages/Messages/getVorlage",
{
vorlage_kurzbz: vorlage_kurzbz
},
{
successCallback: function(data, textStatus, jqXHR) {
if (FHC_AjaxClient.hasData(data))
{
var msg = FHC_AjaxClient.getData(data);
tinyMCE.get("bodyTextArea").setContent(msg[0].text);
$("#subject").val(msg[0].subject);
}
}
}
);
}
});
}
$("#subject").focus();
});
+14 -4
View File
@@ -42,11 +42,14 @@ function parseMessageText(receiver_id, text)
);
}
$(document).ready(function ()
{
$(document).ready(function () {
tinymce.init({
selector: "#bodyTextArea",
plugins: "autoresize",
plugins: "link",
toolbar: "undo redo | presentation | bold italic | link | alignleft aligncenter alignright alignjustify | outdent indent",
min_height: 400,
max_height: 700,
autoresize_on_init: false,
autoresize_min_height: 400,
autoresize_max_height: 400,
@@ -60,7 +63,14 @@ $(document).ready(function ()
menubar: false,
toolbar: false,
statusbar: false,
readonly: 1
readonly: 1,
min_height: 400,
max_height: 700,
autoresize_on_init: false,
autoresize_min_height: 400,
autoresize_max_height: 700,
autoresize_bottom_margin: 10,
auto_focus: "bodyTextArea"
});
if ($("#variables"))
+3 -1
View File
@@ -6,7 +6,9 @@ $(document).ready(function ()
{
tinymce.init({
selector: "#bodyTextArea",
plugins: "autoresize",
plugins: "autoresize, link",
toolbar: "undo redo | presentation | bold italic | link | alignleft aligncenter alignright alignjustify | outdent indent",
max_height: 600,
autoresize_min_height: 150,
autoresize_max_height: 600,
autoresize_bottom_margin: 10,
+1
View File
@@ -220,6 +220,7 @@ $(document).ready(function () {
statusbar: false,
readonly: 1,
autoresize_min_height: 300,
max_height: 600,
autoresize_bottom_margin: 0
});
+5 -2
View File
@@ -62,8 +62,11 @@ $(document).ready(function () {
//
tinymce.init({
selector: "#body",
plugins: "autoresize",
autoresize_min_height: 150,
plugins: "autoresize, link",
toolbar: "undo redo | presentation | bold italic | link | alignleft aligncenter alignright alignjustify | outdent indent",
min_height: 300,
max_height: 600,
autoresize_min_height: 300,
autoresize_max_height: 600,
autoresize_bottom_margin: 10
});
+3 -1
View File
@@ -37,7 +37,9 @@ $(document).ready(function () {
//
tinymce.init({
selector: "#body",
plugins: "autoresize",
plugins: "autoresize, link",
toolbar: "undo redo | presentation | bold italic | link | alignleft aligncenter alignright alignjustify | outdent indent",
max_height: 600,
autoresize_min_height: 150,
autoresize_max_height: 600,
autoresize_bottom_margin: 10