[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [13829] fixing datatable and forms
From: |
Saul |
Subject: |
[Fmsystem-commits] [13829] fixing datatable and forms |
Date: |
Tue, 01 Sep 2015 23:53:02 +0000 |
Revision: 13829
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=13829
Author: psaul
Date: 2015-09-01 23:53:02 +0000 (Tue, 01 Sep 2015)
Log Message:
-----------
fixing datatable and forms
Modified Paths:
--------------
branches/dev-syncromind/booking/inc/class.uiapplication.inc.php
branches/dev-syncromind/booking/inc/class.uibooking.inc.php
branches/dev-syncromind/booking/inc/class.uibuilding.inc.php
Modified: branches/dev-syncromind/booking/inc/class.uiapplication.inc.php
===================================================================
--- branches/dev-syncromind/booking/inc/class.uiapplication.inc.php
2015-09-01 23:52:46 UTC (rev 13828)
+++ branches/dev-syncromind/booking/inc/class.uiapplication.inc.php
2015-09-01 23:53:02 UTC (rev 13829)
@@ -171,46 +171,43 @@
'value' =>
lang('New application'),
'href' =>
self::link(array('menuaction' => 'booking.uiapplication.add'))
),
+ array(
+ 'type' =>
'filter',
+ 'name' => 'status',
+ 'text' =>
lang('Status').':',
+ 'list' => array(
+ array(
+ 'id' =>
'none',
+ 'name' =>
lang('Not selected')
+ ),
+ array(
+ 'id' =>
'NEW',
+ 'name' =>
lang('NEW')
+ ),
+ array(
+ 'id' =>
'PENDING',
+ 'name' =>
lang('PENDING')
+ ),
+ array(
+ 'id' =>
'REJECTED',
+ 'name' =>
lang('REJECTED')
+ ),
+ array(
+ 'id' =>
'ACCEPTED',
+ 'name' =>
lang('ACCEPTED')
+ )
+ )
+ ),
array('type' =>
'filter',
- 'name' =>
'status',
- 'text' => lang('Status').':',
- 'list' => array(
- array(
- 'id' => 'none',
- 'name' => lang('Not selected')
- ),
- array(
- 'id' => 'NEW',
- 'name' => lang('NEW')
- ),
- array(
- 'id' => 'PENDING',
- 'name' => lang('PENDING')
- ),
- array(
- 'id' => 'REJECTED',
- 'name' => lang('REJECTED')
- ),
- array(
- 'id' => 'ACCEPTED',
- 'name' => lang('ACCEPTED')
- )
- )
- ),
- array('type' =>
'filter',
'name' =>
'buildings',
- 'text' => lang('Building').':',
- 'list' => $this->bo->so->get_buildings(),
+ 'text' =>
lang('Building').':',
+ 'list' =>
$this->bo->so->get_buildings(),
),
array('type' =>
'filter',
'name' =>
'activities',
- 'text' => lang('Activity').':',
- 'list' =>
$this->bo->so->get_activities_main_level(),
+ 'text' =>
lang('Activity').':',
+ 'list' =>
$this->bo->so->get_activities_main_level(),
),
- array('type' => 'text',
- 'text' => lang('searchfield'),
- 'name' =>
'query'
- ),
array(
'type' =>
'submit',
'name' =>
'search',
@@ -243,7 +240,8 @@
),
array(
'key' => 'what',
- 'label' => lang('What')
+ 'label' => lang('What'),
+ 'sortable' => false
),
array(
'key' => 'created',
@@ -255,7 +253,8 @@
),
array(
'key' => 'from_',
- 'label' => lang('From')
+ 'label' => lang('From'),
+ 'sortable' => false
),
array(
'key' =>
'activity_name',
@@ -273,7 +272,7 @@
),
);
- self::render_template_xsl('datatable_jquery',$data);
+ self::render_template_xsl('datatable_jquery',$data);
// self::render_template('datatable', $data);
}
@@ -291,18 +290,18 @@
if(isset($_SESSION['showall']))
{
$filters['status'] = array('NEW',
'PENDING','REJECTED', 'ACCEPTED');
- $testdata = phpgw::get_var('buildings', 'int', 'REQUEST',
null);
- if ($testdata != 0) {
- $filters['building_name'] =
$this->bo->so->get_building(phpgw::get_var('buildings', 'int', 'REQUEST',
null));
- } else {
- unset($filters['building_name']);
- }
- $testdata2 = phpgw::get_var('activities', 'int', 'REQUEST',
null);
- if ($testdata2 != 0) {
- $filters['activity_id'] =
$this->bo->so->get_activities(phpgw::get_var('activities', 'int', 'REQUEST',
null));
- } else {
- unset($filters['activity_id']);
- }
+ $testdata = phpgw::get_var('buildings',
'int', 'REQUEST', null);
+ if ($testdata != 0) {
+ $filters['building_name'] =
$this->bo->so->get_building(phpgw::get_var('buildings', 'int', 'REQUEST',
null));
+ } else {
+ unset($filters['building_name']);
+ }
+ $testdata2 = phpgw::get_var('activities',
'int', 'REQUEST', null);
+ if ($testdata2 != 0) {
+ $filters['activity_id'] =
$this->bo->so->get_activities(phpgw::get_var('activities', 'int', 'REQUEST',
null));
+ } else {
+ unset($filters['activity_id']);
+ }
} else {
$test = phpgw::get_var('status', 'string',
'REQUEST', null);
@@ -312,11 +311,11 @@
}
elseif (isset($test))
{
- $filters['status'] = phpgw::get_var('status');
+ $filters['status'] =
phpgw::get_var('status');
}
else
{
- $filters['status'] = 'NEW';
+ $filters['status'] = 'NEW';
}
$testdata = phpgw::get_var('buildings', 'int', 'REQUEST',
null);
if ($testdata != 0) {
@@ -481,7 +480,6 @@
}
}
array_walk($applications["results"], array($this,
"_add_links"), "booking.uiapplication.show");
-
return $this->yui_results($applications);
}
@@ -497,7 +495,8 @@
$association['type'] =
lang($association['type']);
}
- return $this->yui_results($associations);
+// return $this->yui_results($associations);
+ return $associations;
}
private function _combine_dates($from_, $to_)
@@ -1014,5 +1013,8 @@
'audience' =>
$audience, 'agegroups' => $agegroups,
'num_associations'=>$num_associations, 'assoc' =>$from, 'collision' =>
$collision_dates, 'comments' => $comments,'config' => $application_text));
// self::render_template_xsl('application', array('application' =>
$application));
+// var_dump($application);
+// var_dump($application);
+// exit();
}
}
Modified: branches/dev-syncromind/booking/inc/class.uibooking.inc.php
===================================================================
--- branches/dev-syncromind/booking/inc/class.uibooking.inc.php 2015-09-01
23:52:46 UTC (rev 13828)
+++ branches/dev-syncromind/booking/inc/class.uibooking.inc.php 2015-09-01
23:53:02 UTC (rev 13829)
@@ -74,12 +74,9 @@
),
array('type' =>
'filter',
'name' =>
'organizations',
- 'text' => lang('Organization').':',
- 'list' => $this->bo->so->get_organizations(),
+ 'text' =>
lang('Organization').':',
+ 'list' =>
$this->bo->so->get_organizations(),
),
- array('type' => 'text',
- 'name' =>
'query'
- ),
array(
'type' =>
'submit',
'name' =>
'search',
@@ -142,16 +139,16 @@
}
$data['filters'] = $this->export_filters;
// self::render_template('datatable', $data);
- self::render_template_xsl('datatable_jquery',$data);
+ self::render_template_xsl('datatable_jquery',$data);
}
public function query()
{
if(isset($_SESSION['showall']))
{
- unset($filters['building_name']);
- unset($filters['group_id']);
- unset($filters['season_id']);
+ unset($filters['building_name']);
+ unset($filters['group_id']);
+ unset($filters['season_id']);
} else {
$testdata = phpgw::get_var('filter_building_id', 'int',
'REQUEST', null);
if ($testdata != 0) {
@@ -161,7 +158,7 @@
}
$testdata2 = phpgw::get_var('organizations', 'int',
'REQUEST', null);
if ($testdata2 != 0) {
- $filters['group_id'] =
$this->bo->so->get_group_of_organization(phpgw::get_var('organizations', 'int',
'REQUEST', null));
+ $filters['group_id'] =
$this->bo->so->get_groups_of_organization(phpgw::get_var('organizations',
'int', 'REQUEST', null));
} else {
unset($filters['group_id']);
}
@@ -183,7 +180,7 @@
'query' => $search['value'],
'order' =>
$columns[$order[0]['column']]['data'],
'sort' =>
$columns[$order[0]['column']]['data'],
- 'dir' => $order[0]['dir'],
+ 'dir' => $order[0]['dir'],
'filters' => $filters
);
@@ -197,7 +194,6 @@
}
array_walk($bookings["results"], array($this,
"_add_links"), "booking.uibooking.show");
-
return $this->jquery_results($bookings);
}
Modified: branches/dev-syncromind/booking/inc/class.uibuilding.inc.php
===================================================================
--- branches/dev-syncromind/booking/inc/class.uibuilding.inc.php
2015-09-01 23:52:46 UTC (rev 13828)
+++ branches/dev-syncromind/booking/inc/class.uibuilding.inc.php
2015-09-01 23:53:02 UTC (rev 13829)
@@ -77,15 +77,6 @@
'toolbar' => array(
'item' => array(
array(
- 'type' =>
'text',
- 'name' =>
'query'
- ),
- array(
- 'type' =>
'submit',
- 'name' =>
'search',
- 'value' =>
lang('Search')
- ),
- array(
'type' =>
'link',
'value' =>
$_SESSION['showall'] ? lang('Show only active') : lang('Show all'),
'href' =>
self::link(array('menuaction' => $this->url_prefix.'.toggle_show_inactive'))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [13829] fixing datatable and forms,
Saul <=