Limite grafico per immagini in CKEditor

This commit is contained in:
Thomas Zilio 2020-08-12 13:30:34 +02:00
parent f6635fd851
commit 184f9d4696
3 changed files with 5 additions and 3 deletions

View File

@ -174,7 +174,7 @@ foreach ($primo_livello as $conto_primo) {
// Span con info del conto // Span con info del conto
echo ' echo '
<span class="clickable" id="movimenti-'.$conto_terzo['id'].'"> <span class="clickable" id="movimenti-'.$conto_terzo['id'].'">
&nbsp;'.$conto_secondo['numero'].'.'.$conto_terzo['numero'].' '.$conto_terzo['descrizione'].($conto_terzo['percentuale_deducibile']<100 ? ' <span class="text-muted">('.tr('deducibile al _PERC_%', ['_PERC_' => Translator::numberToLocale($conto_terzo['percentuale_deducibile'],0)]).')</span>' : '').' &nbsp;'.$conto_secondo['numero'].'.'.$conto_terzo['numero'].' '.$conto_terzo['descrizione'].($conto_terzo['percentuale_deducibile'] < 100 ? ' <span class="text-muted">('.tr('deducibile al _PERC_%', ['_PERC_' => Translator::numberToLocale($conto_terzo['percentuale_deducibile'], 0)]).')</span>' : '').'
</span> </span>
<div id="conto_'.$conto_terzo['id'].'" style="display:none;"></div> <div id="conto_'.$conto_terzo['id'].'" style="display:none;"></div>
</td> </td>

View File

@ -32,11 +32,11 @@ $info = $dbo->fetchOne($query);
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-4 <?php echo intval($lvl != 3 || $info['dir'] != 'uscita') ? 'hidden': ''; ?>"> <div class="col-md-4 <?php echo intval($lvl != 3 || $info['dir'] != 'uscita') ? 'hidden' : ''; ?>">
{[ "type": "number", "decimals": 0, "label": "<?php echo tr('Percentuale deducibile'); ?>", "name": "percentuale_deducibile", "value": "<?php echo $info['percentuale_deducibile']; ?>", "icon-after": "<i class=\"fa fa-percent\"></i>", "max-value": "100", "min-value": "0" ]} {[ "type": "number", "decimals": 0, "label": "<?php echo tr('Percentuale deducibile'); ?>", "name": "percentuale_deducibile", "value": "<?php echo $info['percentuale_deducibile']; ?>", "icon-after": "<i class=\"fa fa-percent\"></i>", "max-value": "100", "min-value": "0" ]}
</div> </div>
<div class="col-md-4 <?php echo intval($lvl != 2) ? 'hidden': ''; ?>"> <div class="col-md-4 <?php echo intval($lvl != 2) ? 'hidden' : ''; ?>">
{[ "type": "select", "label": "<?php echo tr('Utilizza come'); ?>", "name": "dir", "value": "<?php echo $info['dir']; ?>", "values": "list=\"entrata\":\"Ricavo\", \"uscita\":\"Costo\", \"\": \"Non usare\"" ]} {[ "type": "select", "label": "<?php echo tr('Utilizza come'); ?>", "name": "dir", "value": "<?php echo $info['dir']; ?>", "values": "list=\"entrata\":\"Ricavo\", \"uscita\":\"Costo\", \"\": \"Non usare\"" ]}
</div> </div>
</div> </div>

View File

@ -16,6 +16,8 @@ class CKEditorHandler implements HandlerInterface
<textarea |attr|>|value|</textarea> <textarea |attr|>|value|</textarea>
<script src="'.ROOTDIR.'/assets/dist/js/ckeditor/ckeditor.js"></script> <script src="'.ROOTDIR.'/assets/dist/js/ckeditor/ckeditor.js"></script>
<script> <script>
CKEDITOR.addCss(".cke_editable img { max-width: 100% !important; height: auto !important; }");
CKEDITOR.replace("'.prepareToField($values['id']).'", { CKEDITOR.replace("'.prepareToField($values['id']).'", {
toolbar: globals.ckeditorToolbar, toolbar: globals.ckeditorToolbar,
language: globals.locale, language: globals.locale,