[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [13158] incoming data from jquery tables
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [13158] incoming data from jquery tables |
Date: |
Thu, 07 May 2015 14:09:19 +0000 |
Revision: 13158
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=13158
Author: sigurdne
Date: 2015-05-07 14:09:18 +0000 (Thu, 07 May 2015)
Log Message:
-----------
incoming data from jquery tables
Modified Paths:
--------------
branches/dev-syncromind/booking/inc/class.bocommon.inc.php
Modified: branches/dev-syncromind/booking/inc/class.bocommon.inc.php
===================================================================
--- branches/dev-syncromind/booking/inc/class.bocommon.inc.php 2015-05-07
14:07:58 UTC (rev 13157)
+++ branches/dev-syncromind/booking/inc/class.bocommon.inc.php 2015-05-07
14:09:18 UTC (rev 13158)
@@ -57,6 +57,14 @@
protected function build_default_read_params()
{
+ /*
+ * Sigurd: Temporary est for new datatables
+ */
+ if($columns = phpgw::get_var('columns'))
+ {
+ return $this->build_default_read_params_new();
+ }
+
$start = phpgw::get_var('startIndex', 'int', 'REQUEST',
0);
$results = phpgw::get_var('results', 'int', 'REQUEST',
null);
$query = phpgw::get_var('query');
@@ -86,6 +94,42 @@
);
}
+ protected function build_default_read_params_new()
+ {
+
+ $search = phpgw::get_var('search');
+ $order = phpgw::get_var('order');
+ $draw = phpgw::get_var('draw', 'int');
+ $columns = phpgw::get_var('columns');
+
+ $params = array(
+ 'start' => phpgw::get_var('start', 'int',
'REQUEST', 0),
+ 'results' => phpgw::get_var('length', 'int',
'REQUEST', 0),
+ 'query' => $search['value'],
+ 'sort' => $columns[$order[0]['column']]['data'],
+ 'dir' => $order[0]['dir'],
+ 'allrows' => phpgw::get_var('length', 'int') ==
-1,
+ );
+
+ foreach($this->so->get_field_defs() as $field =>
$_params)
+ {
+ if(phpgw::get_var("filter_$field"))
+ {
+ $params['filters'][$field] =
phpgw::get_var("filter_$field");
+ }
+ }
+
+ if(!isset($_SESSION['showall']))
+ {
+ if(!isset($params['filters']['application_id']))
+ {
+ $params['filters']['active'] = "1";
+ }
+ }
+
+ return $params;
+ }
+
function add($entity)
{
return $this->so->add($entity);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [13158] incoming data from jquery tables,
Sigurd Nes <=