Miglioramenti per le email (#9)
This commit is contained in:
parent
a045fa8250
commit
0a4a9c14ea
7
bug.php
7
bug.php
|
@ -3,7 +3,7 @@
|
|||
include_once __DIR__.'/core.php';
|
||||
|
||||
$pageTitle = 'Bug';
|
||||
$jscript_modules[] = $js.'/ckeditor/ckeditor.js';
|
||||
$jscript_modules[] = App::getPaths()['js'].'/ckeditor/ckeditor.js';
|
||||
|
||||
if (filter('op') == 'send') {
|
||||
// Preparazione email
|
||||
|
@ -193,10 +193,7 @@ echo '
|
|||
var firstFocus = 1;
|
||||
|
||||
CKEDITOR.replace("body", {
|
||||
toolbar: [
|
||||
{ name: "document", items: [ "NewPage", "Preview", "-", "Templates" ] }, // Defines toolbar group with name (used to create voice label) and items in 3 subgroups
|
||||
["Bold","Italic","Underline","Superscript","-","NumberedList","BulletedList","Outdent","Indent","Blockquote","-","Format",], // Defines toolbar group without name
|
||||
]
|
||||
toolbar: globals.ckeditorToolbar
|
||||
});
|
||||
|
||||
CKEDITOR.instances.body.on("key", function() {
|
||||
|
|
16
editor.php
16
editor.php
|
@ -92,7 +92,7 @@ if (empty($records)) {
|
|||
|
||||
// Pulsanti di default
|
||||
echo '
|
||||
<div id="pulsanti" data-spy="affix" data-offset-top="200">
|
||||
<div id="pulsanti">
|
||||
<a class="btn btn-warning" href="'.ROOTDIR.'/controller.php?id_module='.$id_module.'">
|
||||
<i class="fa fa-chevron-left"></i> '.tr("Torna all'elenco").'
|
||||
</a>
|
||||
|
@ -117,6 +117,15 @@ if (empty($records)) {
|
|||
|
||||
$("#save").click(function(){
|
||||
$("#submit").trigger("click");
|
||||
});';
|
||||
|
||||
// Pulsanti dinamici
|
||||
if (!isMobile()) {
|
||||
echo '
|
||||
$("#pulsanti").affix({
|
||||
offset: {
|
||||
top: 200
|
||||
}
|
||||
});
|
||||
|
||||
$("#pulsanti").on("affix.bs.affix", function(){
|
||||
|
@ -125,7 +134,10 @@ if (empty($records)) {
|
|||
|
||||
$("#pulsanti").on("affix-top.bs.affix", function(){
|
||||
$("#pulsanti").css("width", "100%");
|
||||
});
|
||||
});';
|
||||
}
|
||||
|
||||
echo '
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
@ -98,17 +98,31 @@ if (Auth::check()) {
|
|||
echo '
|
||||
};
|
||||
globals = {
|
||||
rootdir: \''.$rootdir.'\', js: \''.$paths['js'].'\', css: \''.$paths['css'].'\', img: \''.$paths['img'].'\',
|
||||
rootdir: \''.$rootdir.'\',
|
||||
js: \''.$paths['js'].'\',
|
||||
css: \''.$paths['css'].'\',
|
||||
img: \''.$paths['img'].'\',
|
||||
|
||||
id_module: \''.$id_module.'\',
|
||||
id_record: \''.$id_record.'\',
|
||||
|
||||
aggiornamenti_id: \''.($dbo->isInstalled() ? Modules::get('Aggiornamenti')['id'] : '').'\',
|
||||
|
||||
cifre_decimali: '.get_var('Cifre decimali per importi').',
|
||||
decimals: "'.Translator::getFormatter()->getNumberSeparators()['decimals'].'", thousands: "'.Translator::getFormatter()->getNumberSeparators()['thousands'].'",
|
||||
|
||||
decimals: "'.Translator::getFormatter()->getNumberSeparators()['decimals'].'",
|
||||
thousands: "'.Translator::getFormatter()->getNumberSeparators()['thousands'].'",
|
||||
|
||||
search: search,
|
||||
translations: translations,
|
||||
locale: \''.$lang.'\',
|
||||
|
||||
start_date: \''.Translator::dateToLocale($_SESSION['period_start']).'\',
|
||||
end_date: \''.Translator::dateToLocale($_SESSION['period_end']).'\',
|
||||
locale: \''.$lang.'\',
|
||||
|
||||
ckeditorToolbar: [
|
||||
[ "Bold", "Italic", "Underline", "Superscript", "-", "NumberedList", "BulletedList", "Outdent", "Indent", "Blockquote", "-", "Format"],
|
||||
],
|
||||
};
|
||||
</script>';
|
||||
}
|
||||
|
|
11
mail.php
11
mail.php
|
@ -119,11 +119,18 @@ echo '
|
|||
emails = JSON.parse(response);
|
||||
|
||||
$(".destinatari").each(function(){
|
||||
$(this).autocomplete({source: emails});
|
||||
$(this).autocomplete({
|
||||
source: emails,
|
||||
minLength: 0
|
||||
}).focus(function() {
|
||||
$(this).autocomplete("search", $(this).val())
|
||||
});;
|
||||
});
|
||||
});
|
||||
|
||||
CKEDITOR.replace("body");
|
||||
CKEDITOR.replace("body", {
|
||||
toolbar: globals.ckeditorToolbar
|
||||
});
|
||||
});
|
||||
|
||||
function send(){
|
||||
|
|
|
@ -125,6 +125,8 @@ echo '
|
|||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
CKEDITOR.replace("body");
|
||||
CKEDITOR.replace("body", {
|
||||
toolbar: globals.ckeditorToolbar
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue