fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [14576] clean up from yui


From: Sigurd Nes
Subject: [Fmsystem-commits] [14576] clean up from yui
Date: Fri, 11 Dec 2015 13:18:50 +0000

Revision: 14576
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14576
Author:   sigurdne
Date:     2015-12-11 13:18:50 +0000 (Fri, 11 Dec 2015)
Log Message:
-----------
clean up from yui

Modified Paths:
--------------
    branches/dev-syncromind/property/inc/class.uialarm.inc.php

Modified: branches/dev-syncromind/property/inc/class.uialarm.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.uialarm.inc.php  2015-12-11 
13:16:30 UTC (rev 14575)
+++ branches/dev-syncromind/property/inc/class.uialarm.inc.php  2015-12-11 
13:18:50 UTC (rev 14576)
@@ -30,7 +30,6 @@
         * Description
         * @package property
         */
-//     phpgw::import_class('phpgwapi.yui');
 
        phpgw::import_class('phpgwapi.uicommon_jquery');
        phpgw::import_class('phpgwapi.jquery');
@@ -661,153 +660,13 @@
                     onActionsClick_Toolbar('delete_alarm', ids);
                    "
                        );
-//            JqueryPortico.updateinlineTableHelper(oTable, {$requestUrl});
-//
-//                     $data['datatable']['actions'][] = array(
-//                             'my_name'               => 'add',
-//                             'text'                  => lang('add'),
-//                             'action'                => 
$GLOBALS['phpgw']->link('/index.php',array
-//                             (
-//                                     'menuaction'    => 
'property.uialarm.edit',
-//                             ))
-//                     );
-//                     for ($i=0;$i<count($uicols);$i++)
-//                     {
-//                             
$datatable['headers']['header'][$i]['formatter']        = 
($uicols[$i]['formatter']==''?  '""' : $uicols[$i]['formatter']);
-//                             $datatable['headers']['header'][$i]['name']     
        = $uicols[$i]['col_name'];
-//                             $datatable['headers']['header'][$i]['text']     
        = $uicols[$i]['descr'];
-//                             $datatable['headers']['header'][$i]['sortable'] 
        = $uicols[$i]['sortable'];
-//                             
$datatable['headers']['header'][$i]['sort_field']       = 
$uicols[$i]['sort_field'];
-//                             
$datatable['headers']['header'][$i]['className']        = 
$uicols[$i]['className'];
-//                             $datatable['headers']['header'][$i]['visible']  
        = true;
-//
-//                             if($uicols[$i]['input_type']=='hidden')
-//                             {
-//                                     
$datatable['headers']['header'][$i]['visible']  = false;
-//                             }
-//                     }
-//
-//                     // 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;
-//
-//                     if ( (phpgw::get_var("start")== "") && 
(phpgw::get_var("order",'string')== ""))
-//                     {
-//                             //avoid ,in the last page, reformate paginator 
when records are lower than records_returned
-//                             if(count($content) <= 
$datatable['pagination']['records_limit'])
-//                             {
-//                                     
$datatable['pagination']['records_returned']= count($content);
-//                             }
-//                             else
-//                             {
-//                                     
$datatable['pagination']['records_returned']= 
$datatable['pagination']['records_limit'];
-//                             }
-//                             $datatable['sorting']['currentPage']    = 1;
-//                             $datatable['sorting']['order']                  
= $uicols[0]["col_name"]; // name key Column in myColumnDef
-//                             $datatable['sorting']['sort']                   
= 'desc'; // ASC / DESC
-//                     }
-//                     else
-//                     {
-//
-//                             $datatable['sorting']['currentPage']            
= phpgw::get_var('currentPage');
-//                             $datatable['sorting']['order']                  
        = phpgw::get_var('order', 'string'); // name of column of Database
-//                             $datatable['sorting']['sort']                   
        = phpgw::get_var('sort', 'string'); // ASC / DESC
-//                             $datatable['pagination']['records_returned']= 
phpgw::get_var('recordsReturned', 'int');
-//                     }
-//
-//                     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 
------------------------------
-//
-//                     $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'],
-//                                     'currentPage'           => 
$datatable['sorting']['currentPage'],
-//                                     'records'                       => 
array()
-//                             );
-//
-//                     if(isset($datatable['rows']['row']) && 
is_array($datatable['rows']['row']))
-//                     {
-//                             foreach( $datatable['rows']['row'] as $row )
-//                             {
-//                                     $json_row = array();
-//                                     foreach( $row['column'] as $column)
-//                                     {
-//                                             $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 ---------------------- 
        
-//                     // Prepare template variables and process XSLT
-//                     $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');
-//                     }
-//                     // Prepare CSS Style
-//                     $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/container/assets/skins/sam/container.css');
-//                     
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/paginator/assets/skins/sam/paginator.css');
-//
-//                     //Title of Page
-//                     $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('alarm') . ': ' . lang('list alarm');
-                       // Prepare YUI Library
-//                     $GLOBALS['phpgw']->js->validate_file( 'yahoo', 
'alarm.index', 'property' );
 
                        phpgwapi_jquery::load_widget('core');
                        phpgwapi_jquery::load_widget('numberformat');
 
                        self::add_javascript('property', 'portico', 
'uialarm.index.js');
-//            self::render_template_xsl('uialarm.index',$data);
                        self::render_template_xsl('datatable_jquery', $data);
 
-                       //$this->save_sessiondata();            
                }
 
                public function query_list()
@@ -900,16 +759,8 @@
                                unset($text_edit);
                        }
 
-//            if( phpgw::get_var('export','bool'))
-//            {
-//                return $content;
-//            }
-//            echo '<pre>'; print_r($content); echo '</pre>';exit('saul');
-
                        $result_data = array('results' => $content);
 
-
-
                        $result_data['total_records']    = 
$this->bo->total_records;
                        $result_data['draw']                     = $draw;
 
@@ -1007,167 +858,6 @@
                                )
                        );
 
-//                     $datatable = array();
-//                     $values_combo_box = array();
-//                     if( phpgw::get_var('phpgw_return_as') != 'json' )
-//                     {
-//                             $datatable['config']['base_url']        = 
$GLOBALS['phpgw']->link('/index.php', array
-//                                     (
-//                                             'menuaction'                    
=> 'property.uialarm.list_alarm',
-//                                             'query'                         
=> $this->query
-//
-//                                     ));
-//                             $datatable['config']['allow_allrows'] = true;
-//
-//                             $datatable['config']['base_java_url'] = 
"menuaction:'property.uialarm.list_alarm',"
-//                                     ."query:'{$this->query}'";
-//
-//
-//                             $datatable['actions']['form'] = array
-//                                     (
-//                                             array
-//                                             (
-//                                                     'action'        => 
$GLOBALS['phpgw']->link('/index.php',
-//                                                     array
-//                                                     (
-//                                                             'menuaction'    
        => 'property.uialarm.list_alarm',
-//                                                             'query'         
                => $this->query
-//                                                     )
-//                                             ),
-//                                             'fields'        => array
-//                                             (
-//                                                     'field' => array
-//                                                     (
-//                                                             array
-//                                                             ( //boton     
SEARCH
-//                                                                     'id'    
        => 'btn_search',
-//                                                                     'name'  
        => 'search',
-//                                                                     'value' 
        => lang('search'),
-//                                                                     'type'  
        => 'button',
-//                                                                     
'tab_index' => 2
-//                                                             ),
-//                                                             array
-//                                                             ( // TEXT IMPUT
-//                                                                     'name'  
        => 'query',
-//                                                                     'id'    
        => 'txt_query',
-//                                                                     'value' 
        => $this->query,
-//                                                                     'type'  
        => 'text',
-//                                                                     'size'  
        => 28,
-//                                                                     
'onkeypress'=> 'return pulsar(event)',
-//                                                                     
'tab_index'     => 1
-//                                                             )
-//                                                     ),
-//                                                     'hidden_value' => 
array()
-//                                             )
-//                                     )
-//                             );
-//                     }
-//                     $list = $this->bo->read();
-//
-//                     while (is_array($list) && list($id,$alarm) = 
each($list))
-//                     {
-//                             if(is_array($alarm['times']))
-//                             {
-//                                     while (is_array($alarm['times']) && 
list($key,$value) = each($alarm['times']))
-//                                     {
-//                                             $times .=$key . ' => ' .$value. 
' ';
-//                                     }
-//
-//                             }
-//                             else
-//                             {
-//                                     $times = 
$GLOBALS['phpgw']->common->show_date($alarm['times']);
-//                             }
-//
-//                             if(is_array($alarm['data']))
-//                             {
-//                                     while (is_array($alarm['data']) && 
list($key,$value) = each($alarm['data']))
-//                                     {
-//                                             if($key=='owner')
-//                                             {
-//                                                     $value = 
$GLOBALS['phpgw']->accounts->id2name($value);
-//                                             }
-//                                             $data .=$key . ' => ' .$value . 
' ';
-//                                     }
-//
-//                             }
-//
-//                             $id = explode(':', $id);
-//
-//                             if($id[0] == 's_agreement' || $id[0] == 
'agreement')
-//                             {
-//                                     $link_edit                              
= $GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 'property.ui' 
.$id[0] .'.edit', 'id'=> $id[1]));
-//                                     $lang_edit_statustext   = lang('edit 
the alarm');
-//                                     $text_edit                              
= lang('edit');
-//
-//                             }
-//
-//                             $content[] = array
-//                                     (
-//                                             'id_cod'                        
=> $id[1],
-//                                             'id'                            
=> $alarm['id'],
-//                                             'next_run'                      
=> $GLOBALS['phpgw']->common->show_date($alarm['next']),
-//                                             'method'                        
=> $alarm['method'],
-//                                             'times'                         
=> $times,
-//                                             'data'                          
=> $data,
-//                                             'enabled'                       
=> $alarm['enabled'],
-//                                             'user'                          
=> $alarm['user'],
-//                                             //                              
        'link_edit'                     => $link_edit,
-//                                             //                              
        'lang_edit_statustext'          => $lang_edit_statustext,
-//                                             //                              
        'text_edit'                     => $text_edit
-//                                     );
-//                             unset($alarm);
-//                             unset($data);
-//                             unset($times);
-//                             unset($link_edit);
-//                             unset($lang_edit_statustext);
-//                             unset($text_edit);
-//                     }
-                       //die(_debug_array($content));
-//
-//                     $uicols = array
-//                             (
-//                                     array
-//                                     (
-//                                             'col_name'=>'id',               
        'input_type'=>'hidden', 'name'=>'id_cod',       'descr'=>'',            
                'className'=>'',                                
'sortable'=>false ,'formatter'=>'',             'sort_field'=>''
-//                                     ),
-//                                     array
-//                                     (
-//                                             'col_name'=>'alarm_id', 
'input_type'=>'varchar',        'name'=>'id',           'descr'=>lang('alarm 
id'),      'className'=>'centerClasss',    'sortable'=>true ,'formatter'=>'',   
           'sort_field'=>'id'
-//                                     ),
-//                                     array
-//                                     (
-//                                             'col_name'=>'next_run', 
'input_type'=>'varchar',        'name'=>'next_run',     'descr'=>lang('Next 
run'),      'className'=>'centerClasss',    'sortable'=>true ,'formatter'=>'',  
            'sort_field'=>'next'
-//                                     ),
-//                                     array
-//                                     (
-//                                             'col_name'=>'data',             
'input_type'=>'varchar',        'name'=>'data',         'descr'=>lang('Data'),  
        'className'=>'leftClasss',              'sortable'=>false 
,'formatter'=>'',     '       sort_field'=>''
-//                                     ),
-//                                     array
-//                                     (
-//                                             'col_name'=>'enable',           
'input_type'=>'varchar',        'name'=>'enabled',      
'descr'=>lang('enabled'),       'className'=>'centerClasss',    
'sortable'=>false ,'formatter'=>'',             'sort_field'=>''
-//                                     ),
-//                                     array
-//                                     (
-//                                             'col_name'=>'user',             
'input_type'=>'varchar',        'name'=>'user',         'descr'=>lang('User'),  
        'className'=>'centerClasss',    'sortable'=>true ,'formatter'=>'',      
        'sort_field'=>'account_lid')
-//                                     );
-//
-//                     $j=0;
-//                     if (isset($content) && is_array($content))
-//                     {
-//                             foreach($content as $alarm)
-//                             {
-//                                     for ($i=0;$i<count($uicols);$i++)
-//                                     {
-//                                             
$datatable['rows']['row'][$j]['column'][$i]['name']             = 
$uicols[$i]['col_name'];
-//                                             
$datatable['rows']['row'][$j]['column'][$i]['value']            = 
$alarm[$uicols[$i]['name']];
-//                                             
$datatable['rows']['row'][$j]['column'][$i]['format']           = 
$uicols[$i]['input_type'];
-//                                     }
-//                                     $j++;
-//                             }
-//                     }
-                       //die(_debug_array($datatable['rows']));
-//                     $datatable['rowactions']['action'] = array();
 
                        $parameters = array
                                (
@@ -1193,133 +883,6 @@
 
                        unset($parameters);
 
-
-//                     for ($i=0;$i<count($uicols);$i++)
-//                     {
-//                             //all colums should be have formatter
-//                             
$datatable['headers']['header'][$i]['formatter'] = 
($uicols[$i]['formatter']==''?  '""' : $uicols[$i]['formatter']);
-//
-//                             $datatable['headers']['header'][$i]['name']     
        = $uicols[$i]['col_name'];
-//                             $datatable['headers']['header'][$i]['text']     
        = $uicols[$i]['descr'];
-//                             $datatable['headers']['header'][$i]['sortable'] 
        = $uicols[$i]['sortable'];
-//                             
$datatable['headers']['header'][$i]['sort_field']       = 
$uicols[$i]['sort_field'];
-//                             
$datatable['headers']['header'][$i]['className']        = 
$uicols[$i]['className'];
-//
-//                             if($uicols[$i]['input_type']!='hidden')
-//                             {
-//                                     
$datatable['headers']['header'][$i]['visible']  = true;
-//                             }
-//                             else
-//                             {
-//                                     
$datatable['headers']['header'][$i]['visible']  = false;
-//                             }
-//                     }
-//
-//                     //die(_debug_array($datatable['headers']));
-//                     // 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;
-//
-//
-//
-//                     if ( (phpgw::get_var("start")== "") && 
(phpgw::get_var("order",'string')== ""))
-//                     {
-//                             $datatable['sorting']['order']                  
= $uicols[0]['col_name']; // name key Column in myColumnDef
-//                             $datatable['sorting']['sort']                   
= 'desc'; // ASC / DESC
-//                     }
-//                     else
-//                     {
-//                             $datatable['sorting']['order']                  
= phpgw::get_var('order', 'string'); // name of column of Database
-//                             $datatable['sorting']['sort']                   
= phpgw::get_var('sort', 'string'); // 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)
-//                                     {
-//                                             $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 ----------------------
-//
-//                     // Prepare template variables and process XSLT
-//                     $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');
-//                     }
-//                     // Prepare CSS Style
-//                     $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/container/assets/skins/sam/container.css');
-//                     
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/paginator/assets/skins/sam/paginator.css');
-//
-//                     //Title of Page
-//                     $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('alarm') . ': ' . lang('list alarm');
-//
-//                     // Prepare YUI Library
-//                     $GLOBALS['phpgw']->js->validate_file( 'yahoo', 
'alarm.list_alarm', 'property' );
-                       //$this->save_sessiondata();
                        phpgwapi_jquery::load_widget('core');
                        phpgwapi_jquery::load_widget('numberformat');
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]