[+] BO : new method initToolbar() available in AdminController
This commit is contained in:
@@ -91,6 +91,9 @@ class AdminControllerCore extends Controller
|
||||
/** @var array Cache for query results */
|
||||
protected $_list = array();
|
||||
|
||||
/** @var array Cache for query results */
|
||||
protected $toolbar_btn = array();
|
||||
|
||||
/** @var integer Number of results in list */
|
||||
protected $_listTotal = 0;
|
||||
|
||||
@@ -687,6 +690,7 @@ class AdminControllerCore extends Controller
|
||||
// Only if it is the first call to displayForm, otherwise it has already been defined
|
||||
if ($first_call)
|
||||
{
|
||||
// language related
|
||||
$content .= '
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
@@ -707,6 +711,15 @@ class AdminControllerCore extends Controller
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
* assign $this->toolbar_btn in smarty
|
||||
*
|
||||
*/
|
||||
public function initToolbar()
|
||||
{
|
||||
$this->context->smarty->assign('toolbar_btn', $this->toolbar_btn);
|
||||
}
|
||||
|
||||
/**
|
||||
* Load class object using identifier in $_GET (if possible)
|
||||
* otherwise return an empty object, or die
|
||||
@@ -1042,6 +1055,9 @@ class AdminControllerCore extends Controller
|
||||
$this->content .= $this->initOptions();
|
||||
}
|
||||
|
||||
// toolbar (save, cancel, new, ..)
|
||||
$this->initToolbar();
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'table' => $this->table,
|
||||
'current' => self::$currentIndex,
|
||||
@@ -2246,4 +2262,4 @@ EOF;
|
||||
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user