mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-18 15:31:28 +01:00
Fix: missing row and col parameters
This commit is contained in:
@@ -292,8 +292,8 @@ class Form
|
|||||||
{
|
{
|
||||||
$tmp=explode(':',$inputType);
|
$tmp=explode(':',$inputType);
|
||||||
$inputType=$tmp[0];
|
$inputType=$tmp[0];
|
||||||
if (! empty($tmp[1])) $rows=$tmp[1];
|
$rows=($tmp[1]?$tmp[1]:'8');
|
||||||
if (! empty($tmp[2])) $cols=$tmp[2];
|
$cols=($tmp[2]?$tmp[2]:'80');
|
||||||
}
|
}
|
||||||
else if (preg_match('/^ckeditor/',$inputType))
|
else if (preg_match('/^ckeditor/',$inputType))
|
||||||
{
|
{
|
||||||
@@ -320,6 +320,10 @@ class Form
|
|||||||
if (! empty($savemethod)) $out.= '<input id="savemethod_'.$htmlname.'" value="'.$savemethod.'" type="hidden"/>'."\n";
|
if (! empty($savemethod)) $out.= '<input id="savemethod_'.$htmlname.'" value="'.$savemethod.'" type="hidden"/>'."\n";
|
||||||
if (! empty($ext_element)) $out.= '<input id="ext_element_'.$htmlname.'" value="'.$ext_element.'" type="hidden"/>'."\n";
|
if (! empty($ext_element)) $out.= '<input id="ext_element_'.$htmlname.'" value="'.$ext_element.'" type="hidden"/>'."\n";
|
||||||
if (! empty($success)) $out.= '<input id="success_'.$htmlname.'" value="'.$success.'" type="hidden"/>'."\n";
|
if (! empty($success)) $out.= '<input id="success_'.$htmlname.'" value="'.$success.'" type="hidden"/>'."\n";
|
||||||
|
if ($inputType == 'textarea') {
|
||||||
|
$out.= '<input id="textarea_'.$htmlname.'_rows" value="'.$rows.'" type="hidden"/>'."\n";
|
||||||
|
$out.= '<input id="textarea_'.$htmlname.'_cols" value="'.$cols.'" type="hidden"/>'."\n";
|
||||||
|
}
|
||||||
|
|
||||||
$out.= '<span id="viewval_'.$htmlname.'" class="viewval_'.$inputType.($button_only ? ' inactive' : ' active').'">'.$value.'</span>'."\n";
|
$out.= '<span id="viewval_'.$htmlname.'" class="viewval_'.$inputType.($button_only ? ' inactive' : ' active').'">'.$value.'</span>'."\n";
|
||||||
$out.= '<span id="editval_'.$htmlname.'" class="editval_'.$inputType.($button_only ? ' inactive' : ' active').' hideobject">'.(! empty($editvalue) ? $editvalue : $value).'</span>'."\n";
|
$out.= '<span id="editval_'.$htmlname.'" class="editval_'.$inputType.($button_only ? ' inactive' : ' active').' hideobject">'.(! empty($editvalue) ? $editvalue : $value).'</span>'."\n";
|
||||||
|
|||||||
@@ -26,9 +26,11 @@ $(document).ready(function() {
|
|||||||
var table_element = $('#jeditable_table_element').html();
|
var table_element = $('#jeditable_table_element').html();
|
||||||
var fk_element = $('#jeditable_fk_element').html();
|
var fk_element = $('#jeditable_fk_element').html();
|
||||||
|
|
||||||
|
if ($('.editval_textarea').length > 0) {
|
||||||
$('.editval_textarea').editable(urlSaveInPlace, {
|
$('.editval_textarea').editable(urlSaveInPlace, {
|
||||||
type : 'textarea',
|
type : 'textarea',
|
||||||
rows : 4,
|
rows : $('#textarea_' + $('.editval_textarea').attr('id').substr(8) + '_rows').val(),
|
||||||
|
cols : $('#textarea_' + $('.editval_textarea').attr('id').substr(8) + '_cols').val(),
|
||||||
id : 'field',
|
id : 'field',
|
||||||
tooltip : tooltipInPlace,
|
tooltip : tooltipInPlace,
|
||||||
placeholder : ' ',
|
placeholder : ' ',
|
||||||
@@ -68,6 +70,7 @@ $(document).ready(function() {
|
|||||||
$('#viewval_' + $(this).attr('id')).hide();
|
$('#viewval_' + $(this).attr('id')).hide();
|
||||||
$('#editval_' + $(this).attr('id')).show().click();
|
$('#editval_' + $(this).attr('id')).show().click();
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof ckeditorConfig != 'undefined') {
|
if (typeof ckeditorConfig != 'undefined') {
|
||||||
$('.editval_ckeditor').editable(urlSaveInPlace, {
|
$('.editval_ckeditor').editable(urlSaveInPlace, {
|
||||||
@@ -120,6 +123,7 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($('.editval_string').length > 0) {
|
||||||
$('.editval_string').editable(urlSaveInPlace, {
|
$('.editval_string').editable(urlSaveInPlace, {
|
||||||
type : 'text',
|
type : 'text',
|
||||||
id : 'field',
|
id : 'field',
|
||||||
@@ -158,7 +162,9 @@ $(document).ready(function() {
|
|||||||
$('#viewval_' + $(this).attr('id')).hide();
|
$('#viewval_' + $(this).attr('id')).hide();
|
||||||
$('#editval_' + $(this).attr('id')).show().click();
|
$('#editval_' + $(this).attr('id')).show().click();
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($('.editval_numeric').length > 0) {
|
||||||
$('.editval_numeric').editable(urlSaveInPlace, {
|
$('.editval_numeric').editable(urlSaveInPlace, {
|
||||||
type : 'text',
|
type : 'text',
|
||||||
id : 'field',
|
id : 'field',
|
||||||
@@ -197,7 +203,9 @@ $(document).ready(function() {
|
|||||||
$('#viewval_' + $(this).attr('id')).hide();
|
$('#viewval_' + $(this).attr('id')).hide();
|
||||||
$('#editval_' + $(this).attr('id')).show().click();
|
$('#editval_' + $(this).attr('id')).show().click();
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($('.editval_datepicker').length > 0) {
|
||||||
$('.editval_datepicker').editable(urlSaveInPlace, {
|
$('.editval_datepicker').editable(urlSaveInPlace, {
|
||||||
type : 'datepicker',
|
type : 'datepicker',
|
||||||
id : 'field',
|
id : 'field',
|
||||||
@@ -233,7 +241,9 @@ $(document).ready(function() {
|
|||||||
$('#viewval_' + $(this).attr('id')).hide();
|
$('#viewval_' + $(this).attr('id')).hide();
|
||||||
$('#editval_' + $(this).attr('id')).show().click();
|
$('#editval_' + $(this).attr('id')).show().click();
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($('.editval_select').length > 0) {
|
||||||
$('.editval_select').editable(urlSaveInPlace, {
|
$('.editval_select').editable(urlSaveInPlace, {
|
||||||
type : 'select',
|
type : 'select',
|
||||||
id : 'field',
|
id : 'field',
|
||||||
@@ -274,8 +284,10 @@ $(document).ready(function() {
|
|||||||
$('#viewval_' + $(this).attr('id')).hide();
|
$('#viewval_' + $(this).attr('id')).hide();
|
||||||
$('#editval_' + $(this).attr('id')).show().click();
|
$('#editval_' + $(this).attr('id')).show().click();
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// for test only (not stable)
|
// for test only (not stable)
|
||||||
|
if ($('.editval_autocomplete').length > 0) {
|
||||||
$('.editval_autocomplete').editable(urlSaveInPlace, {
|
$('.editval_autocomplete').editable(urlSaveInPlace, {
|
||||||
type : 'autocomplete',
|
type : 'autocomplete',
|
||||||
id : 'field',
|
id : 'field',
|
||||||
@@ -318,6 +330,7 @@ $(document).ready(function() {
|
|||||||
$('#viewval_' + $(this).attr('id')).hide();
|
$('#viewval_' + $(this).attr('id')).hide();
|
||||||
$('#editval_' + $(this).attr('id')).show().click();
|
$('#editval_' + $(this).attr('id')).show().click();
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function getParameters(obj, type) {
|
function getParameters(obj, type) {
|
||||||
var htmlname = $(obj).attr('id').substr(8);
|
var htmlname = $(obj).attr('id').substr(8);
|
||||||
|
|||||||
@@ -912,7 +912,7 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
print '<tr><td valign="top">';
|
print '<tr><td valign="top">';
|
||||||
print $form->editfieldkey("Description",'description',$object->description,$object,$user->rights->ficheinter->creer,'textarea');
|
print $form->editfieldkey("Description",'description',$object->description,$object,$user->rights->ficheinter->creer,'textarea');
|
||||||
print '</td><td colspan="3">';
|
print '</td><td colspan="3">';
|
||||||
print $form->editfieldval("Description",'description',$object->description,$object,$user->rights->ficheinter->creer,'textarea');
|
print $form->editfieldval("Description",'description',$object->description,$object,$user->rights->ficheinter->creer,'textarea:8:80');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user