fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [12229] removing duplicated features, fix allrows


From: Sigurd Nes
Subject: [Fmsystem-commits] [12229] removing duplicated features, fix allrows
Date: Fri, 24 Oct 2014 09:16:03 +0000

Revision: 12229
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=12229
Author:   sigurdne
Date:     2014-10-24 09:16:02 +0000 (Fri, 24 Oct 2014)
Log Message:
-----------
removing duplicated features, fix allrows

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

Modified: branches/dev-syncromind/property/inc/class.sogeneric.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.sogeneric.inc.php        
2014-10-23 22:55:23 UTC (rev 12228)
+++ branches/dev-syncromind/property/inc/class.sogeneric.inc.php        
2014-10-24 09:16:02 UTC (rev 12229)
@@ -66,6 +66,7 @@
                        $allrows                        = 
isset($data['allrows']) ? $data['allrows'] : '';
                        $custom_criteria        = 
isset($data['custom_criteria']) && $data['custom_criteria'] ? 
$data['custom_criteria'] : array();
                        $filter                         = 
isset($data['filter']) && $data['filter'] ? $data['filter'] : array();
+                       $results        = isset($data['results'])  ? (int) 
$data['results'] : 0;
 
                        $values = array();
                        if (!isset($this->location_info['table']) || !$table = 
$this->location_info['table'])
@@ -327,7 +328,7 @@
 
                        if(!$allrows)
                        {
-                               $this->_db->limit_query($sql . 
$ordermethod,$start,__LINE__,__FILE__);
+                               $this->_db->limit_query($sql . 
$ordermethod,$start,__LINE__,__FILE__, $results);
                        }
                        else
                        {

Modified: branches/dev-syncromind/property/inc/class.uigeneric.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.uigeneric.inc.php        
2014-10-23 22:55:23 UTC (rev 12228)
+++ branches/dev-syncromind/property/inc/class.uigeneric.inc.php        
2014-10-24 09:16:02 UTC (rev 12229)
@@ -359,25 +359,17 @@
 
                        self::add_javascript('phpgwapi', 'jquery', 
'editable/jquery.jeditable.js');
                        self::add_javascript('phpgwapi', 'jquery', 
'editable/jquery.dataTables.editable.js');
+
+                       $appname                        =  
$this->location_info['name'];
+                       $function_msg           = lang('list %1', $appname);
+                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
$GLOBALS['phpgw']->translation->translate($this->location_info['acl_app'], 
array(), false, $this->location_info['acl_app']) . 
"::{$appname}::{$function_msg}";
                        
                        $data = array(
-                               'datatable_name'        => lang('condition 
survey'),
+                               'datatable_name'        => $appname,
                                'form' => array(
                                        'toolbar' => array(
                                                'item' => array(
                                                        array(
-                                                               'type'  => 
'text',
-                                                               'name'  => 
'query',
-                                                               'id'    => 
'txt_query',
-                                                               'value' => 
$this->query
-                                                       ),
-                                                       array(
-                                                               'type'  => 
'submit',
-                                                               'name'  => 
'search',
-                                                               'id'    => 
'btn_search',
-                                                               'value' => 
lang('Search')
-                                                       ),
-                                                       array(
                                                                'type' => 
'link',
                                                                'value' => 
lang('new'),
                                                                'href' => 
self::link(array(
@@ -387,31 +379,9 @@
                                                                        
'type_id'    => $this->type_id                                                  
        
                                                                        )),
                                                                'class' => 
'new_item'
-                                                       ),
-                                                       array(
-                                                               'type' => 
'link',
-                                                               'value' => 
lang('download'),
-                                                               'href' => 
'javascript:window.open("'. self::link(array(
-                                                                       
'menuaction' => 'property.uigeneric.download', 
-                                                                       
'appname'    => $this->appname,
-                                                                       'type'  
     => $this->type,
-                                                                       
'type_id'    => $this->type_id,                                                 
                
-                                                                       
'export'     => true, 
-                                                                       
'allrows'    => true
-                                                                       )) . 
'","window")',
-                                                               'class' => 
'new_item'
-                                                       ),
-                                                       array(
-                                                               'type' => 
'link',
-                                                               'value' => 
$_SESSION['allrows'] ? lang('Show only active') : lang('Show all'),
-                                                               'href' => 
self::link(array('menuaction' => 'property.uigeneric.index',
-                                                                       
'appname'    => $this->appname,
-                                                                       'type'  
     => $this->type,
-                                                                       
'type_id'    => $this->type_id,
-                                                                       
'allrows' => true))
-                                                       ),
-                                               ),
-                                       ),
+                                                       )
+                                               )
+                                       )
                                ),
                                'datatable' => array(
                                        'source' => self::link(array(
@@ -421,9 +391,16 @@
                                                'type_id'               => 
$this->type_id,
                                                'phpgw_return_as' => 'json'
                                        )),
+                                       'download'      => 
self::link(array('menuaction' => 'property.uigeneric.download',
+                                                                       
'appname'    => $this->appname,
+                                                                       'type'  
     => $this->type,
+                                                                       
'type_id'    => $this->type_id,
+                                                                       
'export'     => true,
+                                                                       
'allrows'    => true)),
+                                       'allrows'       => true,
                                        'editor_action' => '',
                                        'field' => array()
-                               ),
+                               )
                        );
        
                        $filters = $this->_get_categories();
@@ -534,12 +511,7 @@
                                                ))
                                        );
                        }
-
-                       $appname                        =  
$this->location_info['name'];
-                       $function_msg           = lang('list %1', $appname);
                        
-                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
$GLOBALS['phpgw']->translation->translate($this->location_info['acl_app'], 
array(), false, $this->location_info['acl_app']) . 
"::{$appname}::{$function_msg}";
-                       
                        self::render_template_xsl('datatable_jquery', $data);
 
                }
@@ -564,7 +536,7 @@
                                'sort' => $order[0]['dir'],
                                'dir' => $order[0]['dir'],
                                'cat_id' => phpgw::get_var('cat_id', 'int', 
'REQUEST', 0),
-                               'allrows' => phpgw::get_var('allrows', 'bool')
+                               'allrows' => phpgw::get_var('length', 'int') == 
-1
                        );
 
                        foreach ( $this->location_info['fields'] as $field )




reply via email to

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