mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-19 21:10:49 +01:00
Fix minore
This commit is contained in:
parent
87be1cd6e1
commit
db700a4809
@ -42,24 +42,26 @@ function init() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if ($('form').length) {
|
if ($('form').length) {
|
||||||
$('form').not('.no-check').parsley();
|
$('form').not('.no-check').parsley();
|
||||||
|
|
||||||
|
if (window.CKEDITOR){
|
||||||
CKEDITOR.on('instanceReady', function () {
|
CKEDITOR.on('instanceReady', function () {
|
||||||
$('form textarea').each(function () {
|
$('form textarea').each(function () {
|
||||||
if ($(this).attr('obbligatorio') === "1") {
|
if ($(this).data('mandatory') === '1') {
|
||||||
$(this).attr('required', '');
|
$(this).prop('required', true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$.each(CKEDITOR.instances, function (instance) {
|
||||||
|
CKEDITOR.instances[instance].on("change", function (e) {
|
||||||
|
for (instance in CKEDITOR.instances) {
|
||||||
|
CKEDITOR.instances[instance].updateElement();
|
||||||
|
$('form').parsley().validate();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$.each(CKEDITOR.instances, function (instance) {
|
|
||||||
CKEDITOR.instances[instance].on("change", function (e) {
|
|
||||||
for (instance in CKEDITOR.instances) {
|
|
||||||
CKEDITOR.instances[instance].updateElement();
|
|
||||||
$('form').parsley().validate();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Aggiunta nell'URL del nome tab su cui tornare dopo il submit
|
// Aggiunta nell'URL del nome tab su cui tornare dopo il submit
|
||||||
|
@ -95,6 +95,11 @@ function initCKEditor(input) {
|
|||||||
let $input = $(input);
|
let $input = $(input);
|
||||||
let name = input.getAttribute("id");
|
let name = input.getAttribute("id");
|
||||||
|
|
||||||
|
|
||||||
|
if($input.prop('required')){
|
||||||
|
$input.data('mandatory', '1');
|
||||||
|
}
|
||||||
|
|
||||||
// Controllo su istanza già esistente
|
// Controllo su istanza già esistente
|
||||||
let instance = CKEDITOR.instances[name];
|
let instance = CKEDITOR.instances[name];
|
||||||
if (instance) {
|
if (instance) {
|
||||||
|
@ -226,7 +226,6 @@ echo '
|
|||||||
'label' => tr('Richiesta'),
|
'label' => tr('Richiesta'),
|
||||||
'name' => 'richiesta',
|
'name' => 'richiesta',
|
||||||
'id' => 'richiesta_add',
|
'id' => 'richiesta_add',
|
||||||
'obbligatorio' => 1,
|
|
||||||
'required' => 1,
|
'required' => 1,
|
||||||
'value' => htmlentities($richiesta),
|
'value' => htmlentities($richiesta),
|
||||||
'extra' => 'style=\'max-height:80px;\'',
|
'extra' => 'style=\'max-height:80px;\'',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user