From c55e1f2bedd50bebb35ca199fc3930b97beb0f0f Mon Sep 17 00:00:00 2001 From: Reinhold Kainhofer <reinhold@kainhofer.com> Date: Fri, 12 Jun 2015 20:36:40 +0200 Subject: [PATCH] Fix issues with the JS counter modifications --- library/js/ordernumber.js | 2 +- library/ordernumber_helper.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library/js/ordernumber.js b/library/js/ordernumber.js index f05fc49..70c92e4 100644 --- a/library/js/ordernumber.js +++ b/library/js/ordernumber.js @@ -141,7 +141,7 @@ var ajaxAddCounter = function (btn, nrtype) { var countername = prompt (ajax_ordernumber.ORDERNUMBER_JS_NEWCOUNTER); if (countername != null) { var loading = jQuery("img.ordernumber-loading").first().clone().insertAfter(jQuery(btn).find("img.ordernumber-counter-addbtn")).show(); - var ajxargs = { + var ajaxargs = { type: "POST", dataType: "json", url: ajax_ordernumber.ajax_url, diff --git a/library/ordernumber_helper.php b/library/ordernumber_helper.php index 86c2bf5..2b504bc 100644 --- a/library/ordernumber_helper.php +++ b/library/ordernumber_helper.php @@ -425,7 +425,7 @@ JFactory::getApplication()->enqueueMessage("<pre>Counter Settings: ".print_r($ct public function counter_modification_create_row ($type, $counter, $value) { $html=array(); $html[] = " <tr class='counter_row counter_row_$type'>"; - $html[] = " <td class='counter_format'>" . htmlentities((string)(($counter=="")?($this->__ ('PLG_ORDERNUMBER_COUNTERLIST_GLOBAL')):$counter)) . "</td>"; + $html[] = " <td class='counter_format'>" . (($counter=="")?($this->__ ('PLG_ORDERNUMBER_COUNTERLIST_GLOBAL')):htmlentities($counter)) . "</td>"; $html[] = " <td class='counter_value'>" . htmlentities((string)$value) . "</td>"; $html[] = " <td class='counter_buttons'>"; $html[] = " <div class='ordernumber-ajax-loading'>"; -- GitLab