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