diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 98d370eed8e..3bdaeaf6057 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -242,8 +242,6 @@ class Form $savemethod = false; $ext_element = false; $button_only = false; - //$ext_table_element = false; - //$ext_fk_element = false; if (is_object($object)) { @@ -255,8 +253,6 @@ class Form if (is_object($extObject)) { $ext_element = $extObject->element; - //$ext_table_element = $extObject->table_element; - //$ext_fk_element = $extObject->id; } if (preg_match('/^(string|email|numeric)/',$inputType)) @@ -273,7 +269,7 @@ class Form $out.= ''."\n"; // Use for timestamp format } - else if (preg_match('/^select/',$inputType)) + else if (preg_match('/^(select|autocomplete)/',$inputType)) { $tmp=explode(':',$inputType); $inputType=$tmp[0]; $loadmethod=$tmp[1]; @@ -302,11 +298,9 @@ class Form $out.= ''."\n"; $out.= ''."\n"; $out.= ''."\n"; - $out.= ''."\n"; - $out.= ''."\n"; - if (! empty($success)) $out.= ''."\n"; - //$out.= ''."\n"; - //$out.= ''."\n"; + if (! empty($savemethod)) $out.= ''."\n"; + if (! empty($ext_element)) $out.= ''."\n"; + if (! empty($success)) $out.= ''."\n"; $out.= '
'.$value.'
'."\n"; $out.= '
'.(! empty($editvalue) ? $editvalue : $value).'
'."\n"; diff --git a/htdocs/core/js/editinplace.js b/htdocs/core/js/editinplace.js index fdbfbab2e3d..7748b73fce6 100644 --- a/htdocs/core/js/editinplace.js +++ b/htdocs/core/js/editinplace.js @@ -37,14 +37,12 @@ $(document).ready(function() { indicator : indicatorInPlace, loadurl : urlLoadInPlace, loaddata : function(result, settings) { - var htmlname = $(this).attr('id').substr(8); - return getParameters('textarea', htmlname); + return getParameters(this, 'textarea'); }, submitdata : function(result, settings) { - var htmlname = $(this).attr('id').substr(8); - return getParameters('textarea', htmlname); + return getParameters(this, 'textarea'); }, - callback : function(result, settings) { + callback : function(result, settings) { getResult(this, result); }, onreset : function(result, settings) { @@ -85,10 +83,9 @@ $(document).ready(function() { toolbar: $('#ckeditor_toolbar').val() }, submitdata : function(result, settings) { - var htmlname = $(this).attr('id').substr(8); - return getParameters('ckeditor', htmlname); + return getParameters(this, 'ckeditor'); }, - callback : function(result, settings) { + callback : function(result, settings) { getResult(this, result); }, onreset : function(result, settings) { @@ -125,10 +122,9 @@ $(document).ready(function() { submit : submitInPlace, indicator : indicatorInPlace, submitdata : function(result, settings) { - var htmlname = $(this).attr('id').substr(8); - return getParameters('string', htmlname); + return getParameters(this, 'string'); }, - callback : function(result, settings) { + callback : function(result, settings) { getResult(this, result); }, onreset : function(result, settings) { @@ -165,10 +161,9 @@ $(document).ready(function() { submit : submitInPlace, indicator : indicatorInPlace, submitdata : function(result, settings) { - var htmlname = $(this).attr('id').substr(8); - return getParameters('numeric', htmlname); + return getParameters(this, 'numeric'); }, - callback : function(result, settings) { + callback : function(result, settings) { getResult(this, result); }, onreset : function(result, settings) { @@ -205,10 +200,9 @@ $(document).ready(function() { submit : submitInPlace, indicator : indicatorInPlace, submitdata : function(result, settings) { - var htmlname = $(this).attr('id').substr(8); - return getParameters('datepicker', htmlname); + return getParameters(this, 'datepicker'); }, - callback : function(result, settings) { + callback : function(result, settings) { getResult(this, result); }, onreset : function(result, settings) { @@ -244,12 +238,10 @@ $(document).ready(function() { indicator : indicatorInPlace, loadurl : urlLoadInPlace, loaddata : function(result, settings) { - var htmlname = $(this).attr('id').substr(8); - return getParameters('select', htmlname); + return getParameters(this, 'select'); }, submitdata : function(result, settings) { - var htmlname = $(this).attr('id').substr(8); - return getParameters('select', htmlname); + return getParameters(this, 'select'); }, callback : function(result, settings) { getResult(this, result); @@ -275,7 +267,52 @@ $(document).ready(function() { $('#editval_' + $(this).attr('id')).show().click(); }); - function getParameters(type, htmlname) { + // for test only (not stable) + $('.editval_autocomplete').editable(urlSaveInPlace, { + type : 'autocomplete', + id : 'field', + width : 300, + onblur : 'ignore', + tooltip : tooltipInPlace, + placeholder : ' ', + cancel : cancelInPlace, + submit : submitInPlace, + indicator : indicatorInPlace, + autocomplete : { + source : urlLoadInPlace, + data : function(result, settings) { + return getParameters(this, 'select'); + } + }, + submitdata : function(result, settings) { + return getParameters(this, 'select'); + }, + callback : function(result, settings) { + getResult(this, result); + }, + onreset : function(result, settings) { + getDefault(settings); + } + }); + $('.editkey_autocomplete').hover( + function () { + $('#viewval_' + $(this).attr('id')).addClass("viewval_hover"); + }, + function () { + $('#viewval_' + $(this).attr('id')).removeClass("viewval_hover"); + } + ); + $('.viewval_autocomplete.active').click(function() { + $('#viewval_' + $(this).attr('id').substr(8)).hide(); + $('#editval_' + $(this).attr('id').substr(8)).show().click(); + }); + $('.editkey_autocomplete').click(function() { + $('#viewval_' + $(this).attr('id')).hide(); + $('#editval_' + $(this).attr('id')).show().click(); + }); + + function getParameters(obj, type) { + var htmlname = $(obj).attr('id').substr(8); var element = $('#element_' + htmlname).val(); var table_element = $('#table_element_' + htmlname).val(); var fk_element = $('#fk_element_' + htmlname).val(); @@ -283,8 +320,6 @@ $(document).ready(function() { var savemethod = $('#savemethod_' + htmlname).val(); var ext_element = $('#ext_element_' + htmlname).val(); var timestamp = $('#timestamp').val(); - //var ext_table_element = $( '#ext_table_element_' + htmlname ).val(); - //var ext_fk_element = $( '#ext_fk_element_' + htmlname ).val(); return { type: type, @@ -294,9 +329,7 @@ $(document).ready(function() { loadmethod: loadmethod, savemethod: savemethod, timestamp: timestamp, - ext_element: ext_element, - //ext_table_element: ext_table_element, - //ext_fk_element: ext_fk_element + ext_element: ext_element }; } @@ -323,15 +356,4 @@ $(document).ready(function() { $('#editval_' + htmlname).hide(); $('#viewval_' + htmlname).show(); } - - $('.edit_autocomplete').editable(urlSaveInPlace, { - type : 'autocomplete', - id : 'field', - onblur : 'submit', - tooltip : tooltipInPlace, - indicator : indicatorInPlace, - autocomplete : { - data : ["Aberdeen", "Ada", "Adamsville", "Addyston", "Adelphi", "Adena", "Adrian", "Akron"] - } - }); }); diff --git a/htdocs/includes/jquery/plugins/jeditable/jquery.jeditable.ui-autocomplete.js b/htdocs/includes/jquery/plugins/jeditable/jquery.jeditable.ui-autocomplete.js index 6983002ef56..3c85e9c51b8 100644 --- a/htdocs/includes/jquery/plugins/jeditable/jquery.jeditable.ui-autocomplete.js +++ b/htdocs/includes/jquery/plugins/jeditable/jquery.jeditable.ui-autocomplete.js @@ -4,6 +4,6 @@ $.editable.addInputType('autocomplete', { element : $.editable.types.text.element, plugin : function(settings, original) { - $('input', this).autocomplete(settings.autocomplete.data); + $('input', this).autocomplete(settings.autocomplete); } }); \ No newline at end of file diff --git a/htdocs/paypal/lib/paypal.lib.php b/htdocs/paypal/lib/paypal.lib.php index 1e963c61e99..d5026c0028c 100755 --- a/htdocs/paypal/lib/paypal.lib.php +++ b/htdocs/paypal/lib/paypal.lib.php @@ -763,4 +763,26 @@ function deformatNVP($nvpstr) return $nvpArray; } +/** + * Get API errors + */ +function getApiError() +{ + $errors=array(); + + $resArray=$_SESSION['reshash']; + + if(isset($_SESSION['curl_error_no'])) + { + $errors[] = $_SESSION['curl_error_no'].'-'.$_SESSION['curl_error_msg']; + } + + foreach($resArray as $key => $value) + { + $errors[] = $key.'-'.$value; + } + + return $errors; +} + ?> \ No newline at end of file diff --git a/htdocs/theme/auguria/style.css.php b/htdocs/theme/auguria/style.css.php index dc325c2a979..3d547852aa5 100644 --- a/htdocs/theme/auguria/style.css.php +++ b/htdocs/theme/auguria/style.css.php @@ -1670,7 +1670,7 @@ table.cal_event td { border: 0px; padding-: 0px; padding-) right top no-repeat; cursor: pointer; } @@ -1680,12 +1680,12 @@ table.cal_event td { border: 0px; padding-: 0px; padding-: 0px; padding-) right top no-repeat; cursor: pointer; } @@ -1880,12 +1880,12 @@ table.cal_event td { border: 0px; padding-: 0px; padding-: 0px; padding-) right top no-repeat; cursor: pointer; } @@ -1815,12 +1815,12 @@ table.cal_event td { border: 0px; padding-: 0px; padding-: 0px; padding-) right top no-repeat; cursor: pointer; } @@ -1990,12 +1990,12 @@ table.cal_event td { border: 0px; padding-: 0px; padding-