Updates from lnApp

This commit is contained in:
Deon George
2011-07-14 08:59:32 +10:00
parent 5c9750e957
commit 46c3b9a075
31 changed files with 991 additions and 434 deletions

View File

@@ -83,20 +83,18 @@ $(function () {
*
* @param id
*/
public function action_json($id=null) {
#if (! Auth::instance()->logged_in()) {
if ($this->_auth_required()) {
$this->treedata = array('attr'=>array('id'=>'a_login'),
public function action_json($id=null,array $data=array()) {
if ($this->_auth_required() AND ! Auth::instance()->logged_in()) {
$this->output = array('attr'=>array('id'=>'a_login'),
'data'=>array('title'=>_('Please Login').'...','attr'=>array('id'=>'N_login','href'=>URL::site('/login'))));
return;
}
$this->treedata = array();
$data = array();
$this->output = array();
foreach ($data as $branch) {
array_push($this->treedata,array(
array_push($this->output,array(
'attr'=>array('id'=>sprintf('B_%s',$branch['id'])),
'state'=>$branch['state'],
'data'=>array('title'=>$branch['name']),