diff --git a/application/controllers/projects.php b/application/controllers/projects.php index 2735759..b01b4a9 100644 --- a/application/controllers/projects.php +++ b/application/controllers/projects.php @@ -64,7 +64,7 @@ class Projects extends CI_Controller { // ->set_output(json_encode(array('count' => $count, 'projects' => $projects))); } - public function detail($projects, $area, $id) { + public function detail($project_id) { $project = $this->project->get($id); $this->output ->set_content_type('application/json') diff --git a/application/views/index.php b/application/views/index.php index 05eaaa0..7354aab 100644 --- a/application/views/index.php +++ b/application/views/index.php @@ -98,7 +98,7 @@ function logout() { function loadProjectInfo(n) { if(n.isLeaf()){ Ext.Ajax.request({ - url: BASE_URL + 'projects/detail' + n.id, + url: BASE_URL + 'projects/detail/' + n.prjId, method: 'get', success: function ( result, request ) { @@ -107,21 +107,10 @@ function loadProjectInfo(n) { tabPanel.add({ title: 'New Tab ', html: 'Lade Projekt...', - closable:true, - handler: function(){ - alert("foo"); - var data = theResponse.result; - var tpl = new Ext.Template( - '
ID: {id}
', - 'Name: {name}
' - ); - - tpl.overwrite(this.html, data); - } + closable:true }).show(); }, failure: function ( result, request ) { - //Ext.MessageBox.alert("Fehler!", "Das gewünschte Projekt kann nicht geladen werden."); switch(result.status) { case 404: Ext.MessageBox.alert("Fehler", "Das gewünschte Projekt konnte nicht gefunden werden.");