// It is now possible to add customs params when using ajax call with the 'details' action

This commit is contained in:
bMancone committed 2011-11-08 13:41:11 +00:00
1 parent 1d717225a8
commit 90fec28d2c
3 files changed
+9 -2

No files matched your search

@@ -34,7 +34,10 @@ $(document).ready(function() {
controller: '{$controller}', controller: '{$controller}',
token: '{$token}', token: '{$token}',
action: '{$action}', action: '{$action}',
ajax: true ajax: true,
{foreach $params as $key => $param}
{$key}: {$param},
{/foreach}
}, },
context: document.body, context: document.body,
dataType: 'json', dataType: 'json',
@@ -122,4 +125,4 @@ $(document).ready(function() {
</script> </script>
<a href="#" id="details_{$id}"> <a href="#" id="details_{$id}">
<img src="../img/admin/more.png" alt="{$action}" title="{$action}" /> <img src="../img/admin/more.png" alt="{$action}" title="{$action}" />
</a> </a>
+1
View File
@@ -1388,6 +1388,7 @@ class AdminControllerCore extends Controller
$helper->no_link = $this->list_no_link; $helper->no_link = $this->list_no_link;
$helper->colorOnBackground = $this->colorOnBackground; $helper->colorOnBackground = $this->colorOnBackground;
$helper->no_back = isset($this->no_back) ? $this->no_back : true; $helper->no_back = isset($this->no_back) ? $this->no_back : true;
$helper->ajax_params = $this->ajax_params;
// For each action, try to add the corresponding skip elements list // For each action, try to add the corresponding skip elements list
$helper->list_skip_actions = $this->list_skip_actions; $helper->list_skip_actions = $this->list_skip_actions;
+3
View File
@@ -115,6 +115,8 @@ class HelperListCore extends Helper
*/ */
public $no_back = true; public $no_back = true;
public $ajax_params = array();
public function __construct() public function __construct()
{ {
$this->base_folder = 'helper/list/'; $this->base_folder = 'helper/list/';
@@ -393,6 +395,7 @@ class HelperListCore extends Helper
'controller' => str_replace('Controller', '', get_class($this->context->controller)), 'controller' => str_replace('Controller', '', get_class($this->context->controller)),
'token' => $this->token, 'token' => $this->token,
'action' => self::$cache_lang['Details'], 'action' => self::$cache_lang['Details'],
'params' => $this->ajax_params
)); ));
return $tpl->fetch(); return $tpl->fetch();
} }