Fixes for render AJAX HTMLRender objects

This commit is contained in:
Deon George
2013-06-17 18:00:27 +10:00
parent 640e8a53ee
commit 5064f08999
19 changed files with 13 additions and 16884 deletions

View File

@@ -145,10 +145,14 @@ abstract class lnApp_Controller_TemplateDefault extends Kohana_Controller_Templa
$this->meta->description = sprintf('%s::%s',$this->request->controller(),$this->request->action());
// For any ajax rendered actions, we'll need to capture the content and put it in the response
} elseif ($this->request->is_ajax() && isset($this->template->content) && ! $this->response->body()) {
} elseif ($this->request->is_ajax()) {
$output = Style::factory()->render_all();
$output .= Script::factory()->render_all();
$output .= $this->template->content;
if (! isset($this->template->content) AND $this->response->body())
$output .= $this->response->body();
else
$output .= $this->template->content;
$this->response->body($output);
}