diff --git a/classes/lnApp/Controller/TemplateDefault.php b/classes/lnApp/Controller/TemplateDefault.php index 7c12de5..8799845 100644 --- a/classes/lnApp/Controller/TemplateDefault.php +++ b/classes/lnApp/Controller/TemplateDefault.php @@ -145,25 +145,18 @@ abstract class lnApp_Controller_TemplateDefault extends Kohana_Controller_Templa $this->meta->description = sprintf('%s::%s',$this->request->controller(),$this->request->action()); // In case we have some scripting/styling, we need to get that out too + // @todo Do we come here for ajax? } elseif ($this->request->is_ajax() AND $this->response->body()) { $this->response->bodyadd(Script::factory()->render_all()); $this->response->bodyadd(Style::factory()->render_all()); // For any ajax rendered actions, we'll need to capture the content and put it in the response - // @todo Do we come here for ajax? } elseif ($this->request->is_ajax() && isset($this->template->content) && ! $this->response->body()) { - // In case there any style sheets for this render. - $this->response->bodyadd(Style::factory()); + $output = Style::factory()->render_all(); + $output .= Script::factory()->render_all(); + $output .= $this->template->content; - // 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()); - - // Get the response body - $this->response->bodyadd(sprintf('
%s |