Fixed breadcrumb, added submode()
This commit is contained in:
@@ -39,9 +39,16 @@ abstract class Controller_lnApp_TemplateDefault extends Controller_Template {
|
||||
* @var array actions that require a valid user
|
||||
*/
|
||||
protected $secure_actions = array(
|
||||
'menu' => FALSE,
|
||||
);
|
||||
|
||||
public function __construct(Request $request, Response $response) {
|
||||
// Our Menu's can run without method authentication by default.
|
||||
if (! isset($this->secure_actions['menu']))
|
||||
$this->secure_actions['menu'] = FALSE;
|
||||
|
||||
return parent::__construct($request,$response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check and see if this controller needs authentication
|
||||
*
|
||||
@@ -197,6 +204,10 @@ abstract class Controller_lnApp_TemplateDefault extends Controller_Template {
|
||||
// In case there any style sheets for this render.
|
||||
$this->response->bodyadd(Style::factory());
|
||||
|
||||
// Since we are ajax, we should re-render the breadcrumb
|
||||
Session::instance()->set('breadcrumb',(string)Breadcrumb::factory());
|
||||
$this->response->bodyadd(Script::add(array('type'=>'stdin','data'=>'$().ready($("#ajCONTROL").load("'.URL::site('welcome/breadcrumb').'",null,function(x,s,r) {}));')));
|
||||
|
||||
// In case there any javascript for this render.
|
||||
$this->response->bodyadd(Script::factory());
|
||||
|
||||
|
@@ -101,7 +101,7 @@ $(function () {
|
||||
'attr'=>array('id'=>sprintf('B_%s',$branch['id'])),
|
||||
'state'=>$branch['state'],
|
||||
'data'=>array('title'=>$branch['name']),
|
||||
'attr'=>array('id'=>sprintf('N_%s',$branch['id']),'href'=>empty($branch['attr_href']) ? URL::site(sprintf('%s/menu',$branch['name'])) : $branch['attr_href']),
|
||||
'attr'=>array('id'=>sprintf('N_%s',$branch['id']),'href'=>empty($branch['attr_href']) ? URL::site(sprintf('user/%s/menu',$branch['name'])) : $branch['attr_href']),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user