[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [14578] clean up from yui
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [14578] clean up from yui |
Date: |
Fri, 11 Dec 2015 13:23:46 +0000 |
Revision: 14578
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14578
Author: sigurdne
Date: 2015-12-11 13:23:46 +0000 (Fri, 11 Dec 2015)
Log Message:
-----------
clean up from yui
Modified Paths:
--------------
branches/dev-syncromind/property/inc/class.uicondition_survey.inc.php
branches/dev-syncromind/property/inc/class.uicustom.inc.php
Modified: branches/dev-syncromind/property/inc/class.uicondition_survey.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.uicondition_survey.inc.php
2015-12-11 13:20:20 UTC (rev 14577)
+++ branches/dev-syncromind/property/inc/class.uicondition_survey.inc.php
2015-12-11 13:23:46 UTC (rev 14578)
@@ -682,22 +682,7 @@
'delete_file' => "<input
type='checkbox' name='file_action[]' value='{$_entry['name']}'
title='$lang_delete'>",
);
}
- /*
- * yui-result
- $data = array(
- 'ResultSet' => array(
- 'totalResultsAvailable' => $total_records,
- 'startIndex' => $start,
- 'sortKey' => 'type',
- 'sortDir' => "ASC",
- 'Result' => $values,
- 'pageSize' => $num_rows,
- 'activePage' => floor($start / $num_rows) + 1
- )
- );
- return $data;
- */
- //Jquery result
+
return array(
'recordsTotal' => $total_records,
'recordsFiltered' => $total_records,
@@ -708,49 +693,7 @@
function get_summation()
{
- /* $id = phpgw::get_var('id', 'int', 'REQUEST');
- $year = phpgw::get_var('year', 'int',
'REQUEST');
- if( !$this->acl_read)
- {
- return;
- }
-
- $values = $this->bo->get_summation($id, $year);
-
- $total_records = count($values);
-
- $num_rows =
isset($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs']) &&
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] ? (int)
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] : 15;
- $start = phpgw::get_var('startIndex', 'int',
'REQUEST', 0);
-
- $allrows = true;
- $num_rows = $total_records;
-
- if($allrows)
- {
- $out = $values;
- }
- else
- {
- $page = ceil( ( $start / $total_records ) *
($total_records/ $num_rows) );
- $values_part = array_chunk($values, $num_rows);
- $out = $values_part[$page];
- }
-
-
- $data = array(
- 'ResultSet' => array(
- 'totalResultsAvailable' => $total_records,
- 'startIndex' => $start,
- 'sortKey' => 'building_part',
- 'sortDir' => "ASC",
- 'Result' => $out,
- 'pageSize' => $num_rows,
- 'activePage' => floor($start / $num_rows) + 1
- )
- );
- return $data; */
-
$id = phpgw::get_var('id', 'int',
'REQUEST');
$year = phpgw::get_var('year', 'int', 'REQUEST');
@@ -820,21 +763,7 @@
}
$num_rows =
isset($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs']) &&
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] ?
(int)$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] : 15;
- /* yui-data
- $data = array(
- 'ResultSet' => array(
- 'totalResultsAvailable' => $total_records,
- 'startIndex' => $start,
- 'sortKey' => $sortKey,
- 'sortDir' => $sortDir,
- 'Result' => $values,
- 'pageSize' => $num_rows,
- 'activePage' => floor($start / $num_rows) + 1
- )
- );
- return $data;
- *
- */
+
return array(
'recordsTotal' => $total_records,
'recordsFiltered' => $total_records,
Modified: branches/dev-syncromind/property/inc/class.uicustom.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.uicustom.inc.php 2015-12-11
13:20:20 UTC (rev 14577)
+++ branches/dev-syncromind/property/inc/class.uicustom.inc.php 2015-12-11
13:23:46 UTC (rev 14578)
@@ -26,7 +26,6 @@
* @subpackage custom
* @version $Id$
*/
- //phpgw::import_class('phpgwapi.yui');
/**
* Description
@@ -227,15 +226,6 @@
);
}
- /* $datatable['rowactions']['action'][] = array
- (
- 'my_name' => 'add',
- 'text' => lang('add'),
- 'action' =>
$GLOBALS['phpgw']->link('/index.php',array
- (
- 'menuaction' => 'property.uicustom.edit'
- ))); */
-
unset($parameters);
self::render_template_xsl('datatable_jquery', $data);
@@ -554,91 +544,12 @@
)
);
-// if( phpgw::get_var('phpgw_return_as') != 'json' )
-// {
-// $datatable['menu'] =
$this->bocommon->get_menu();
-//
-// $datatable['config']['base_url'] =
$GLOBALS['phpgw']->link('/index.php', array
-// (
-// 'menuaction' =>
'property.uicustom.view',
-// 'sort' => $this->sort,
-// 'order' => $this->order,
-// 'custom_id' => $custom_id,
-// 'filter' =>
$this->filter,
-// 'query' => $this->query
-// ));
-//
-// $datatable['config']['base_java_url'] =
"menuaction:'property.uicustom.view',"
-// ."sort:'{$this->sort}',"
-// ."order:'{$this->order}',"
-// ."custom_id:'{$custom_id}',"
-// ."filter:'{$this->filter}',"
-// ."query:'{$this->query}'";
-//
-// $link_data = array
-// (
-// 'menuaction' =>
'property.uicustom.view',
-// 'sort' => $this->sort,
-// 'order' => $this->order,
-// 'custom_id' => $custom_id,
-// 'filter' =>
$this->filter,
-// 'query' => $this->query
-// );
-//
-// $datatable['config']['allow_allrows'] = true;
-//
-// $datatable['actions']['form'] = array
-// (
-// array
-// (
-// 'action' =>
$GLOBALS['phpgw']->link('/index.php',
-// array
-// (
-// 'menuaction'
=> 'property.uicustom.view',
-// 'sort'
=> $this->sort,
-// 'order'
=> $this->order,
-// 'custom_id'
=> $custom_id,
-// 'filter'
=> $this->filter,
-// 'query'
=> $this->query
-// )
-// ),
-// 'fields' => array
-// (
-// 'field' => array
-// (
-// 'type' =>
'button',
-// 'id' =>
'btn_export',
-// 'value' =>
lang('download'),
-// 'tab_index' => 1
-// )
-// )
-// )
-// );
-// }
- //_debug_array($custom_id);die;
$list = $this->bo->read_custom(array('custom_id' =>
$custom_id));
$uicols = $this->bo->uicols;
$count_uicols_name = count($uicols);
-// if (isset($list) AND is_array($list))
-// {
-// foreach($list as $list_entry)
-// {
-// for ($k=0;$k<$count_uicols_name;$k++)
-// {
-//
$datatable['rows']['row'][$j]['column'][$k]['name'] =
$uicols[$k]['name'];
-//
$datatable['rows']['row'][$j]['column'][$k]['value'] =
$list_entry[$uicols[$k]['name']];
-// }
-// $j++;
-// }
-//
-// $datatable['rowactions']['action'] = array();
-//
-// }
- //_debug_array($datatable);die;
-
for($i = 0; $i < $count_uicols_name; $i++)
{
@@ -650,144 +561,11 @@
'hidden' =>
($uicols[$i]['input_type'] == 'hidden') ? true : false
);
-// if($uicols['input_type'][$i]!='hidden')
-// {
-//
$datatable['headers']['header'][$i]['formatter'] =
($uicols[$i]['formatter']==''? '""' : $uicols[$i]['formatter']);
-//
$datatable['headers']['header'][$i]['name'] =
$uicols[$i]['name'];
-//
$datatable['headers']['header'][$i]['text'] =
$uicols[$i]['descr'];
-//
$datatable['headers']['header'][$i]['visible'] = true;
-//
$datatable['headers']['header'][$i]['sortable'] = false;
-// }
array_push($data['datatable']['field'],
$params);
}
$data['datatable']['actions'][] = array();
-// $link_download = array
-// (
-// 'menuaction' =>
'property.uicustom.download',
-// 'sort' => $this->sort,
-// 'order' => $this->order,
-// 'filter' => $this->filter,
-// 'query' => $this->query,
-// 'custom_id' => $custom_id,
-// 'allrows' => $this->allrows
-// );
-//
-// //path for property.js
-// $property_js = "/property/js/yahoo/property.js";
-//
-// if
(!isset($GLOBALS['phpgw_info']['server']['no_jscombine']) ||
!$GLOBALS['phpgw_info']['server']['no_jscombine'])
-// {
-// $cachedir =
urlencode($GLOBALS['phpgw_info']['server']['temp_dir']);
-// $property_js =
"/phpgwapi/inc/combine.php?cachedir={$cachedir}&type=javascript&files=" .
str_replace('/', '--', ltrim($property_js,'/'));
-// }
-//
-// $datatable['property_js'] =
$GLOBALS['phpgw_info']['server']['webserver_url'] . $property_js;
-//
-// // Pagination and sort values
-// $datatable['pagination']['records_start'] =
(int)$this->bo->start;
-// $datatable['pagination']['records_limit'] =
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
-// $datatable['pagination']['records_returned']=
count($list);
-// $datatable['pagination']['records_total'] =
$this->bo->total_records;
-//
-// $appname =
lang('documents');
-// $function_msg = lang('list
documents');
-//
-// //_debug_array($datatable['headers']['header']);die;
-//
-// if ( (phpgw::get_var("start")== "") &&
(phpgw::get_var("order",'string')== ""))
-// {
-// $datatable['sorting']['order']
= $datatable['headers']['header'][0]['name']; // name key Column in myColumnDef
-// $datatable['sorting']['sort']
= 'asc'; // ASC / DESC
-// }
-// else
-// {
-// $datatable['sorting']['order']
= null; // name of column of Database
-// $datatable['sorting']['sort']
= null; // ASC / DESC
-// }
-//
-// phpgwapi_yui::load_widget('dragdrop');
-// phpgwapi_yui::load_widget('datatable');
-// phpgwapi_yui::load_widget('menu');
-// phpgwapi_yui::load_widget('connection');
-// phpgwapi_yui::load_widget('loader');
-// phpgwapi_yui::load_widget('tabview');
-// phpgwapi_yui::load_widget('paginator');
-// phpgwapi_yui::load_widget('animation');
-//
-//
-// //-- BEGIN----------------------------- JSON CODE
------------------------------
-// //values for Pagination
-// $json = array
-// (
-// 'recordsReturned' =>
$datatable['pagination']['records_returned'],
-// 'totalRecords' =>
(int)$datatable['pagination']['records_total'],
-// 'startIndex' =>
$datatable['pagination']['records_start'],
-// 'sort' =>
$datatable['sorting']['order'],
-// 'dir' =>
$datatable['sorting']['sort'],
-// 'records' =>
array()
-// );
-//
-// // values for datatable
-// if(isset($datatable['rows']['row']) &&
is_array($datatable['rows']['row'])){
-// foreach( $datatable['rows']['row'] as $row )
-// {
-// $json_row = array();
-// foreach( $row['column'] as $column)
-// {
-// if(isset($column['format']) &&
$column['format']== "link" && $column['java_link']==true)
-// {
-//
$json_row[$column['name']] = "<a href='#' id='".$column['link']."'
onclick='javascript:filter_data(this.id);'>" .$column['value']."</a>";
-// }
-// else
if(isset($column['format']) && $column['format']== "link")
-// {
-//
$json_row[$column['name']] = "<a href='".$column['link']."'>"
.$column['value']."</a>";
-// }
-// else
-// {
-//
$json_row[$column['name']] = $column['value'];
-// }
-// }
-// $json['records'][] = $json_row;
-// }
-// }
-//
-// // right in datatable
-// if(isset($datatable['rowactions']['action']) &&
is_array($datatable['rowactions']['action']))
-// {
-// $json ['rights'] =
$datatable['rowactions']['action'];
-// }
-//
-// if( phpgw::get_var('phpgw_return_as') == 'json' )
-// {
-// return $json;
-// }
-//
-//
-// $datatable['json_data'] = json_encode($json);
-// //-------------------- JSON CODE ----------------------
-//
-// $template_vars = array();
-// $template_vars['datatable'] = $datatable;
-//
$GLOBALS['phpgw']->xslttpl->add_file(array('datatable'));
-// $GLOBALS['phpgw']->xslttpl->set_var('phpgw',
$template_vars);
-//
-// if ( !isset($GLOBALS['phpgw']->css) ||
!is_object($GLOBALS['phpgw']->css) )
-// {
-// $GLOBALS['phpgw']->css =
createObject('phpgwapi.css');
-// }
-//
-// $GLOBALS['phpgw']->css->validate_file('datatable');
-// $GLOBALS['phpgw']->css->validate_file('property');
-//
$GLOBALS['phpgw']->css->add_external_file('property/templates/base/css/property.css');
-//
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/datatable/assets/skins/sam/datatable.css');
-//
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/paginator/assets/skins/sam/paginator.css');
-//
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/container/assets/skins/sam/container.css');
-//
-// $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('property') . ' - ' . $appname . ': ' . $function_msg;
-//
-// $GLOBALS['phpgw']->js->validate_file( 'yahoo',
'custom.view', 'property' );
- //$this->save_sessiondata();
+
self::render_template_xsl('datatable_jquery', $data);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [14578] clean up from yui,
Sigurd Nes <=