mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-17 23:11:29 +01:00
Fix: missing row and col parameters
This commit is contained in:
@@ -292,8 +292,8 @@ class Form
|
||||
{
|
||||
$tmp=explode(':',$inputType);
|
||||
$inputType=$tmp[0];
|
||||
if (! empty($tmp[1])) $rows=$tmp[1];
|
||||
if (! empty($tmp[2])) $cols=$tmp[2];
|
||||
$rows=($tmp[1]?$tmp[1]:'8');
|
||||
$cols=($tmp[2]?$tmp[2]:'80');
|
||||
}
|
||||
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($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 ($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="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 fk_element = $('#jeditable_fk_element').html();
|
||||
|
||||
if ($('.editval_textarea').length > 0) {
|
||||
$('.editval_textarea').editable(urlSaveInPlace, {
|
||||
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',
|
||||
tooltip : tooltipInPlace,
|
||||
placeholder : ' ',
|
||||
@@ -68,6 +70,7 @@ $(document).ready(function() {
|
||||
$('#viewval_' + $(this).attr('id')).hide();
|
||||
$('#editval_' + $(this).attr('id')).show().click();
|
||||
});
|
||||
}
|
||||
|
||||
if (typeof ckeditorConfig != 'undefined') {
|
||||
$('.editval_ckeditor').editable(urlSaveInPlace, {
|
||||
@@ -120,6 +123,7 @@ $(document).ready(function() {
|
||||
});
|
||||
}
|
||||
|
||||
if ($('.editval_string').length > 0) {
|
||||
$('.editval_string').editable(urlSaveInPlace, {
|
||||
type : 'text',
|
||||
id : 'field',
|
||||
@@ -158,7 +162,9 @@ $(document).ready(function() {
|
||||
$('#viewval_' + $(this).attr('id')).hide();
|
||||
$('#editval_' + $(this).attr('id')).show().click();
|
||||
});
|
||||
}
|
||||
|
||||
if ($('.editval_numeric').length > 0) {
|
||||
$('.editval_numeric').editable(urlSaveInPlace, {
|
||||
type : 'text',
|
||||
id : 'field',
|
||||
@@ -197,7 +203,9 @@ $(document).ready(function() {
|
||||
$('#viewval_' + $(this).attr('id')).hide();
|
||||
$('#editval_' + $(this).attr('id')).show().click();
|
||||
});
|
||||
}
|
||||
|
||||
if ($('.editval_datepicker').length > 0) {
|
||||
$('.editval_datepicker').editable(urlSaveInPlace, {
|
||||
type : 'datepicker',
|
||||
id : 'field',
|
||||
@@ -233,7 +241,9 @@ $(document).ready(function() {
|
||||
$('#viewval_' + $(this).attr('id')).hide();
|
||||
$('#editval_' + $(this).attr('id')).show().click();
|
||||
});
|
||||
}
|
||||
|
||||
if ($('.editval_select').length > 0) {
|
||||
$('.editval_select').editable(urlSaveInPlace, {
|
||||
type : 'select',
|
||||
id : 'field',
|
||||
@@ -274,8 +284,10 @@ $(document).ready(function() {
|
||||
$('#viewval_' + $(this).attr('id')).hide();
|
||||
$('#editval_' + $(this).attr('id')).show().click();
|
||||
});
|
||||
}
|
||||
|
||||
// for test only (not stable)
|
||||
if ($('.editval_autocomplete').length > 0) {
|
||||
$('.editval_autocomplete').editable(urlSaveInPlace, {
|
||||
type : 'autocomplete',
|
||||
id : 'field',
|
||||
@@ -318,6 +330,7 @@ $(document).ready(function() {
|
||||
$('#viewval_' + $(this).attr('id')).hide();
|
||||
$('#editval_' + $(this).attr('id')).show().click();
|
||||
});
|
||||
}
|
||||
|
||||
function getParameters(obj, type) {
|
||||
var htmlname = $(obj).attr('id').substr(8);
|
||||
|
||||
@@ -912,7 +912,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
print '<tr><td valign="top">';
|
||||
print $form->editfieldkey("Description",'description',$object->description,$object,$user->rights->ficheinter->creer,'textarea');
|
||||
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 '</tr>';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user