- Added new view application/views/system/messages/FAShtmlWriteTemplate.php to be used with FAS/SeaMonkey and TinyMCE3

- Replaced TinyMCE V4 with V5
- Dropped TinyMCE V4
- Added new JS public/js/messaging/fasMessageWrite.js to be included by application/views/system/messages/FAShtmlWriteTemplate.php
This commit is contained in:
Paolo
2022-11-11 13:54:25 +01:00
parent 9c0d70fe89
commit ac1df7691a
20 changed files with 363 additions and 24 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)
);
}
@@ -9,7 +9,6 @@
'jqueryui1' => true,
'ajaxlib' => true,
'tablesorter2' => true,
'tinymce4' => true,
'sbadmintemplate3' => true,
'addons' => true,
'navigationwidget' => true,
@@ -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,
@@ -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" 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"></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;
+2 -2
View File
@@ -100,8 +100,8 @@
// 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');
@@ -79,9 +79,6 @@
// Tabulator 5 CSS
if ($tabulator5 === true) generateCSSsInclude('vendor/olifolkerd/tabulator5/dist/css/tabulator_bootstrap5.min.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?>>