fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [12816]


From: Nelson Guerra
Subject: [Fmsystem-commits] [12816]
Date: Wed, 04 Mar 2015 23:52:27 +0000

Revision: 12816
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=12816
Author:   nelson224
Date:     2015-03-04 23:52:26 +0000 (Wed, 04 Mar 2015)
Log Message:
-----------


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

Modified: branches/dev-syncromind/property/inc/class.uirequest.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.uirequest.inc.php        
2015-03-04 23:51:59 UTC (rev 12815)
+++ branches/dev-syncromind/property/inc/class.uirequest.inc.php        
2015-03-04 23:52:26 UTC (rev 12816)
@@ -578,7 +578,6 @@
                                                'menuaction'                    
=> 'property.uirequest.index', 
                                                'lookup'                        
        => $lookup,
                                                'project_id'                    
=> $project_id,
-                                               'query'                         
        => $query,
                                                'condition_survey_id'   => 
$this->condition_survey_id,
                                                'nonavbar'                      
        => $this->nonavbar,
                                                'p_num'                         
        => $this->p_num,
@@ -667,7 +666,7 @@
                                        array_push 
($data['datatable']['field'], $params);
                        }
 
-                       if (!empty($query))
+                       if ($lookup)
                        {
                                $params = array(
                                        'key' => 'select',
@@ -760,6 +759,56 @@
                                                );
                                }
                                unset($parameters);
+                       } 
+                       else 
+                       {
+                               $data['datatable']['actions'][] = array
+                                       (
+                                               'my_name'               => 
'update_project',
+                                               'statustext'    => lang('Update 
project'),
+                                               'text'                  => 
lang('Update project'),
+                                               'type'                  => 
'custom',
+                                               'custom_code'   => "
+                                                                               
        var myChecks = $('.mychecks');
+                                                                               
        
+                                                                               
        if (myChecks.length == 0) {
+                                                                               
                alert('Any box selected');
+                                                                               
                return;
+                                                                               
        }
+
+                                                                               
        for(i=0;i<myChecks.length;i++)
+                                                                               
        {
+                                                                               
                if(myChecks[i].checked)
+                                                                               
                {                       
+                                                                               
                   $('<input>').attr({
+                                                                               
                           type: 'hidden',
+                                                                               
                           id: 'add_request[request_id][]',
+                                                                               
                           name: 'add_request[request_id][]',
+                                                                               
                           value: myChecks[i].value
+                                                                               
                   }).appendTo('#custom_values_form');                   
+                                                                               
                }
+                                                                               
        }
+
+                                                                               
        var path_update = new Array();
+                                                                               
        path_update['menuaction'] = 'property.uiproject.edit';
+                                                                               
        path_update['id'] = '".$project_id."';
+
+                                                                               
        var sUrl = phpGWLink('index.php', path_update);
+                                                                               
        
+                                                                               
        $('#custom_values_form').attr('action', sUrl);
+                                                                               
        $('#custom_values_form').attr('method', 'POST');
+                                                                               
        $('#custom_values_form').submit();"
+                                       );                              
+
+                                       $code = <<<JS
+                                               function 
initCompleteDatatable(oSettings, json, oTable) 
+                                               {
+                                                       var api = oTable.api();
+                                                       api.search( '$query' ); 
                                                
+                                               }
+JS;
+
+                               $GLOBALS['phpgw']->js->add_code('', $code, 
true);
                        }
                        
                        self::add_javascript('property', 'portico', 
'request.index.js');




reply via email to

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