Added jquery validation and other minor cleanup
This commit is contained in:
parent
823248cbe0
commit
95a58d5fa7
@ -16,7 +16,7 @@ abstract class lnApp_Block extends HTMLRender {
|
||||
protected static $_data = array();
|
||||
protected static $_spacer = '';
|
||||
protected static $_c = 0;
|
||||
protected $_items = array('body','scrollable','span','title','title_icon','type');
|
||||
protected $_items = array('body','id','scrollable','span','title','title_icon','type');
|
||||
|
||||
protected static $_required_keys = array('body');
|
||||
|
||||
@ -60,12 +60,12 @@ abstract class lnApp_Block extends HTMLRender {
|
||||
|
||||
if (! empty($record['type']))
|
||||
switch ($record['type']) {
|
||||
case 'form': $output .= Form::open();
|
||||
case 'form': $output .= Form::open(NULL,(empty($record['id']) ? NULL : array('id'=>$record['id'])));
|
||||
$output .= (string)$record['body'];
|
||||
$output .= Form::close();
|
||||
break;
|
||||
|
||||
case 'form-horizontal': $output .= Form::open(NULL,array('class'=>'form-horizontal'));
|
||||
case 'form-horizontal': $output .= Form::open(NULL,Arr::merge(array('class'=>'form-horizontal'),(empty($record['id']) ? array() : array('id'=>$record['id']))));
|
||||
$output .= (string)$record['body'];
|
||||
$output .= Form::close();
|
||||
break;
|
||||
|
@ -144,12 +144,6 @@ abstract class lnApp_Controller_TemplateDefault extends Kohana_Controller_Templa
|
||||
// Description
|
||||
$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
|
||||
} elseif ($this->request->is_ajax() && isset($this->template->content) && ! $this->response->body()) {
|
||||
$output = Style::factory()->render_all();
|
||||
|
@ -25,7 +25,12 @@ abstract class lnApp_Table {
|
||||
private $select = array(); // Our select form details
|
||||
|
||||
public function __toString() {
|
||||
try {
|
||||
return (string) $this->render();
|
||||
|
||||
} catch (Exception $e) {
|
||||
return $e->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
public function columns($cols) {
|
||||
|
2
media/js/jquery/jquery.validate-1.11.1.min.js
vendored
Normal file
2
media/js/jquery/jquery.validate-1.11.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user