Skip to content

Commit 2ffc140

Browse files
committed
post params object or uri format
1 parent 2e4ffbe commit 2ffc140

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Ajax/common/traits/JsUtilsAjaxTrait.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ protected function _ajax($method,$url, $params="{}", $responseElement="", $jsCal
3030
$retour.=$this->_getOnAjaxDone($responseElement, $jqueryDone,$ajaxTransition,$jsCallback)."});\n";
3131
if ($immediatly)
3232
$this->jquery_code_for_compile[]=$retour;
33-
return $retour;
33+
return $retour;
3434
}
3535

3636

@@ -95,6 +95,15 @@ public static function _correctParams($params){
9595
return $params;
9696
}
9797

98+
public static function _implodeParams($parameters){
99+
$allParameters=[];
100+
foreach ($parameters as $params){
101+
if(isset($params))
102+
$allParameters[]=self::_correctParams($params);
103+
}
104+
return \implode("+'&'+", $allParameters);
105+
}
106+
98107
protected function addLoading(&$retour, $responseElement) {
99108
$loading_notifier='<div class="ajax-loader">';
100109
if ($this->ajaxLoader==='') {

0 commit comments

Comments
 (0)