fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [12676] more on lookup


From: Sigurd Nes
Subject: [Fmsystem-commits] [12676] more on lookup
Date: Fri, 30 Jan 2015 13:46:39 +0000

Revision: 12676
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=12676
Author:   sigurdne
Date:     2015-01-30 13:46:38 +0000 (Fri, 30 Jan 2015)
Log Message:
-----------
more on lookup

Modified Paths:
--------------
    branches/dev-syncromind/property/inc/class.bolookup.inc.php
    branches/dev-syncromind/property/inc/class.solookup.inc.php
    branches/dev-syncromind/property/inc/class.uilookup.inc.php
    branches/dev-syncromind/property/setup/default_records.inc.php
    branches/dev-syncromind/property/templates/base/pricebook.xsl
    branches/dev-syncromind/property/templates/base/template.xsl
    branches/dev-syncromind/property/templates/base/wo_hour.xsl

Removed Paths:
-------------
    branches/dev-syncromind/property/templates/base/lookup.xsl

Modified: branches/dev-syncromind/property/inc/class.bolookup.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.bolookup.inc.php 2015-01-29 
23:07:46 UTC (rev 12675)
+++ branches/dev-syncromind/property/inc/class.bolookup.inc.php 2015-01-30 
13:46:38 UTC (rev 12676)
@@ -42,7 +42,7 @@
                public $cat_id;
                public $total_records = 0;
 
-               function property_bolookup($session=false)
+               function __construct($session=false)
                {
                        $this->so                       = 
CreateObject('property.solookup');
                        $this->solocation       = 
CreateObject('property.solocation');
@@ -239,36 +239,6 @@
                        return $orgs;
                }
 
-               /**
-                * Get the the person data what you want
-                *
-                * @param array $fields The fields that you can see from person
-                * @param integer $limit Limit of records that you want
-                * @param integer $ofset Ofset of record that you want start
-                * @param string $orderby The field which you want order
-                * @param string $sort ASC | DESC depending what you want
-                * @param mixed $criteria All criterias what you want
-                * @param mixed $criteria_token same like $criteria but 
builded<br>with sql_criteria class, more powerfull
-                * @return array with records
-                */
-               function get_persons($fields, $start='', $limit='', 
$orderby='', $sort='', $criteria='', $token_criteria='')
-               {
-                       $entries =  $this->so->get_persons($fields, $start, 
$limit, $orderby, $sort, $criteria, $token_criteria);
-                       if(is_array($entries))
-                       {
-                               foreach($entries as $data)
-                               {
-                                       $persons[$data['contact_id']] = $data;
-                               }
-                       }
-                       else
-                       {
-                               $persons = array();
-                       }
-                       $this->total = $this->so->contacts->total_records;
-                       return $persons;
-               }
-
                function read_vendor($data = array())
                {
                        $sogeneric      = CreateObject('property.sogeneric');
@@ -315,24 +285,7 @@
                        return $b_account;
                }
 
-               function read_street()
-               {
-                       $street = $this->so->read_street(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
-                               'filter' => $this->filter,'cat_id' => 
$this->cat_id, 'allrows' => $this->allrows));
-                       $this->total_records = $this->so->total_records;
 
-                       return $street;
-               }
-
-               function read_ns3420()
-               {
-                       $ns3420 = $this->so->read_ns3420(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
-                               'filter' => $this->filter,'cat_id' => 
$this->cat_id));
-                       $this->total_records = $this->so->total_records;
-
-                       return $ns3420;
-               }
-
                function read_phpgw_user($data = array())
                {
                        $phpgw_user = $this->so->read_phpgw_user($data);

Modified: branches/dev-syncromind/property/inc/class.solookup.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.solookup.inc.php 2015-01-29 
23:07:46 UTC (rev 12675)
+++ branches/dev-syncromind/property/inc/class.solookup.inc.php 2015-01-30 
13:46:38 UTC (rev 12676)
@@ -34,83 +34,17 @@
 
        class property_solookup
        {
-               var $grants;
+               private $db;
+               private $join;
+               private $like;
 
                function __construct()
                {
-                       $this->account          = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        $this->db           = & $GLOBALS['phpgw']->db;
                        $this->join                     = & $this->db->join;
                        $this->like                     = & $this->db->like;
                }
 
-               function read_addressbook($data)
-               {
-                       if(is_array($data))
-                       {
-                               $start          = isset($data['start']) && 
$data['start'] ? $data['start'] : 0;
-                               $filter         = 
isset($data['filter'])?$data['filter']:'none';
-                               $query          = 
isset($data['query'])?$data['query']:'';
-                               $sort           = isset($data['sort']) && 
$data['sort'] ? $data['sort']:'DESC';
-                               $order          = 
isset($data['order'])?$data['order']:'';
-                               $cat_id         = 
isset($data['cat_id'])?$data['cat_id']:0;
-                               $allrows        = 
isset($data['allrows'])?$data['allrows']:'';
-                       }
-
-                       if ($order)
-                       {
-                               $ordermethod = " order by $order $sort";
-                       }
-                       else
-                       {
-                               $ordermethod = ' order by last_name DESC';
-                       }
-
-
-                       $where= 'WHERE';
-
-                       if ($cat_id > 0)
-                       {
-                               $filtermethod .= " $where cat_id $this->like 
'%,$cat_id,%' ";
-                               $where= 'AND';
-                       }
-
-                       if($query)
-                       {
-                               $query = $this->db->db_addslashes($query);
-
-                               $querymethod = " $where org_name $this->like 
'%$query%'";
-                       }
-
-                       $sql = "SELECT person_id,first_name,last_name FROM 
phpgw_contact_person $filtermethod $querymethod";
-
-                       $this->db->query($sql,__LINE__,__FILE__);
-                       $this->total_records = $this->db->num_rows();
-
-                       if(!$allrows)
-                       {
-                               $this->db->limit_query($sql . 
$ordermethod,$start,__LINE__,__FILE__);
-                       }
-                       else
-                       {
-                               $this->db->query($sql . 
$ordermethod,__LINE__,__FILE__);                        
-                       }
-
-                       $contact = array();
-                       while ($this->db->next_record())
-                       {
-                               $contact[] = array
-                                       (
-                                               'id'                    => 
$this->db->f('person_id'),
-                                               'contact_name'  => 
$this->db->f('last_name',true) . ', ' . $this->db->f('first_name',true),
-                                       );
-                       }
-                       //_debug_array($vendor);
-
-                       return $contact;
-               }
-
-
                function read_b_account($data)
                {
                        $start          = isset($data['start']) && 
$data['start'] ? (int)$data['start'] : 0;
@@ -193,108 +127,6 @@
                }
 
 
-               function read_street($data)
-               {
-                       if(is_array($data))
-                       {
-                               $start          = isset($data['start']) && 
$data['start'] ? $data['start'] : 0;
-                               $filter         = 
isset($data['filter'])?$data['filter']:'none';
-                               $query          = 
isset($data['query'])?$data['query']:'';
-                               $sort           = isset($data['sort']) && 
$data['sort'] ? $data['sort']:'DESC';
-                               $order          = 
isset($data['order'])?$data['order']:'';
-                               $cat_id         = 
isset($data['cat_id'])?$data['cat_id']:0;
-                               $allrows        = 
isset($data['allrows'])?$data['allrows']:'';
-                       }
-
-                       if ($order)
-                       {
-                               $ordermethod = " order by $order $sort";
-                       }
-                       else
-                       {
-                               $ordermethod = ' order by 
fm_streetaddress.descr DESC';
-                       }
-
-                       if($query)
-                       {
-                               $query = $this->db->db_addslashes($query);
-
-                               $querymethod = " where ( descr $this->like 
'%$query%')";
-                       }
-
-                       $sql = "SELECT * FROM fm_streetaddress $querymethod  ";
-
-                       $this->db->query($sql,__LINE__,__FILE__);
-                       $this->total_records = $this->db->num_rows();
-                       if(!$allrows)
-                       {
-                               $this->db->limit_query($sql . 
$ordermethod,$start,__LINE__,__FILE__);
-                       }
-                       else
-                       {
-                               $this->db->query($sql . 
$ordermethod,__LINE__,__FILE__);
-                       }
-
-                       $street = array();
-                       while ($this->db->next_record())
-                       {
-                               $street[] = array
-                                       (
-                                               'id'                    => 
$this->db->f('id'),
-                                               'street_name'   => 
$this->db->f('descr',true)
-                                       );
-                       }
-
-                       return $street;
-               }
-
-               function read_ns3420($data)
-               {
-                       if(is_array($data))
-                       {
-                               $start          = isset($data['start']) && 
$data['start'] ? $data['start'] : 0;
-                               $filter         = 
isset($data['filter'])?$data['filter']:'none';
-                               $query          = 
isset($data['query'])?$data['query']:'';
-                               $sort           = isset($data['sort']) && 
$data['sort'] ? $data['sort']:'DESC';
-                               $order          = 
isset($data['order'])?$data['order']:'';
-                               $cat_id         = 
isset($data['cat_id'])?$data['cat_id']:0;
-                       }
-
-                       if ($order)
-                       {
-                               $ordermethod = " order by $order $sort";
-                       }
-                       else
-                       {
-                               $ordermethod = ' order by tekst1 DESC';
-                       }
-
-                       if($query)
-                       {
-                               $query = $this->db->db_addslashes($query);
-
-                               $querymethod = " where ( tekst1 $this->like 
'%$query%' or tekst2 $this->like '%$query%' or tekst3 $this->like '%$query%' or 
tekst4 $this->like '%$query%' or tekst5 $this->like '%$query%' or tekst6 
$this->like '%$query%')";
-                       }
-
-                       $sql = "SELECT * FROM fm_ns3420  $querymethod  ";
-
-                       $this->db->query($sql,__LINE__,__FILE__);
-                       $this->total_records = $this->db->num_rows();
-                       $this->db->limit_query($sql . 
$ordermethod,$start,__LINE__,__FILE__);
-
-                       $ns3420 = array();
-                       while ($this->db->next_record())
-                       {
-                               $ns3420[] = array
-                                       (
-                                               'id'                    => 
$this->db->f('id'),
-                                               'ns3420_descr'  => 
$this->db->f('tekst1',true) . ' ' .$this->db->f('tekst2',true) . ' ' 
.$this->db->f('tekst3',true) . ' ' .$this->db->f('tekst4',true) . ' ' 
.$this->db->f('tekst5',true) . ' ' .$this->db->f('tekst6',true)
-                                       );
-                       }
-
-                       return $ns3420;
-               }
-
                function read_phpgw_user($data)
                {
                        if(is_array($data))

Modified: branches/dev-syncromind/property/inc/class.uilookup.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.uilookup.inc.php 2015-01-29 
23:07:46 UTC (rev 12675)
+++ branches/dev-syncromind/property/inc/class.uilookup.inc.php 2015-01-30 
13:46:38 UTC (rev 12676)
@@ -112,22 +112,6 @@
                public function query()
                {
                }
-               
-               function save_sessiondata()
-               {
-                       $data = array
-                               (
-                                       'start'                         => 
$this->start,
-                                       'query'                         => 
$this->query,
-                                       'sort'                          => 
$this->sort,
-                                       'order'                         => 
$this->order,
-                                       'filter'                        => 
$this->filter,
-                                       'cat_id'                        => 
$this->cat_id,
-                                       'part_of_town_id'       => 
$this->part_of_town_id,
-                                       'district_id'           => 
$this->district_id
-                               );
-                       $this->bo->save_sessiondata($data);
-               }
 
                function addressbook()
                {
@@ -852,228 +836,98 @@
                        self::render_template_xsl('datatable_jquery', $data);
                }
 
-
                function ns3420()
                {
-                       if( phpgw::get_var('phpgw_return_as') != 'json' )
+                       if( phpgw::get_var('phpgw_return_as') == 'json' )
                        {
+                               $search = phpgw::get_var('search');
+                               $order = phpgw::get_var('order');
+                               $draw = phpgw::get_var('draw', 'int');
+                               $columns = phpgw::get_var('columns');
 
-                               $datatable['config']['base_url']        = 
$GLOBALS['phpgw']->link('/index.php', array
-                                       (
-                                               'menuaction'                    
=> 'property.uilookup.ns3420',
-                                               'second_display'        => true,
-                                               'cat_id'                        
=> $this->cat_id,
-                                               'query'                         
=> $this->query,
-                                               'filter'                        
=> $this->filter
-                                       ));
+                               $params = array(
+                                       'start' => phpgw::get_var('start', 
'int', 'REQUEST', 0),
+                                       'results' => phpgw::get_var('length', 
'int', 'REQUEST', 0),
+                                       'query' => $search['value'],
+                                       'order' => 
$columns[$order[0]['column']]['data'],
+                                       'sort' => $order[0]['dir'],
+                                       'dir' => $order[0]['dir'],
+                                       'allrows' => phpgw::get_var('length', 
'int') == -1,
+                                       'filter' => ''
+                               );
 
-                               $datatable['config']['allow_allrows'] = true;
+                               $values = array();
+                               $bo     = CreateObject('property.bogeneric');
+                               $bo->get_location_info('ns3420');
+                               $values = $bo->read($params);
 
-                               $datatable['config']['base_java_url'] = 
"menuaction:'property.uilookup.ns3420',"
-                                       ."second_display:true,"
-                                       ."cat_id:'{$this->cat_id}',"
-                                       ."query:'{$this->query}',"
-                                       ."filter:'{$this->filter}'";
-
-                               $datatable['actions']['form'] = array
-                                       (
-                                               array
-                                               (
-                                                       'action'        => 
$GLOBALS['phpgw']->link('/index.php',
-                                                       array
-                                                       (
-                                                               'menuaction'    
        => 'property.uilookup.ns3420',
-                                                               
'second_display'        => true,
-                                                               'cat_id'        
                => $this->cat_id,
-                                                               'query'         
                => $this->query,
-                                                               'filter'        
                => $this->filter
-                                                       )
-                                               ),
-                                               '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' 
   => '',//'',//$query,
-                                                                       'type' 
=> 'text',
-                                                                       'size'  
  => 28,
-                                                                       
'onkeypress' => 'return pulsar(event)',
-                                                                       
'tab_index' => 1
-                                                               )
-                                                       ),
-                                                       'hidden_value' => array
-                                                       (
-                                                               )
-                                                       )
-                                               )
-                                       );
+                               $result_data = array
+                               (
+                                       'results' => $values,
+                                       'total_records' => $bo->total_records,
+                                       'draw' => $draw
+                               );
+                               return $this->jquery_results($result_data);
                        }
 
+                       $action = 
'parent.document.getElementsByName("ns3420_id")[0].value = "";' ."\r\n";
+                       $action .= 
'parent.document.getElementsByName("ns3420_descr")[0].value = "";' ."\r\n";
+                       $action .= 
'parent.document.getElementsByName("ns3420_id")[0].value = aData["num"];' 
."\r\n";
+                       $action .= 
'parent.document.getElementsByName("ns3420_descr")[0].value = aData["tekst1"];' 
."\r\n";
+                       $action .= 
'parent.JqueryPortico.onPopupClose("close");'."\r";
+
+                       $data = array(
+                               'left_click_action'     => $action,
+                               'datatable_name'        => '',
+                               'form' => array(
+                                       'toolbar' => array(
+                                               'item' => array()
+                                       )
+                               ),
+                               'datatable' => array(
+                                       'source' => self::link(array(
+                                                       'menuaction'            
=> 'property.uilookup.ns3420',
+                                                       'query'                 
        => $this->query,
+                                                       'filter'                
        => $this->filter,
+                                                       'cat_id'                
        => $this->cat_id,
+                                                       'type'                  
        => 'ns3420',
+                                                       'phpgw_return_as'       
=> 'json'
+                                       )),
+                                       'allrows'       => true,
+                                       'editor_action' => '',
+                                       'field' => array()
+                               )
+                       );
+
                        $uicols = array (
                                'input_type'    =>      array('text','text'),
-                               'name'                  =>      
array('id','ns3420_descr'),
-                               'sort_field'    =>      array('id','tekst1'),
-                               'formatter'             =>      array('',''),
+                               'name'                  =>      
array('num','tekst1'),
+                               'sortable'              =>      
array(true,true),
                                'descr'                 =>      
array(lang('ID'),lang('ns3420 description'))
                        );
 
-                       $ns3420_list = array();
-                       $ns3420_list = $this->bo->read_ns3420();
+                       $count_uicols_name = count($uicols['name']);
 
-                       $content = array();
-                       $j=0;
-                       if (isset($ns3420_list) && is_array($ns3420_list))
+                       for($k=0;$k<$count_uicols_name;$k++)
                        {
-                               foreach($ns3420_list as $ns3420_entry)
-                               {
-                                       for 
($i=0;$i<count($uicols['name']);$i++)
-                                       {
-                                               
$datatable['rows']['row'][$j]['column'][$i]['value']    = 
$ns3420_entry[$uicols['name'][$i]];
-                                               
$datatable['rows']['row'][$j]['column'][$i]['name']     = $uicols['name'][$i];
-                                       }
-                                       $j++;
-                               }
-                       }
+                               $params = array(
+                                                               'key' => 
$uicols['name'][$k],
+                                                               'label' => 
$uicols['descr'][$k],
+                                                               'sortable' => 
$uicols['sortable'][$k],
+                                                               'hidden' => 
false
+                                                       );
 
-                       $uicols_count   = count($uicols['descr']);
-                       $datatable['rowactions']['action'] = array();
-                       for ($i=0;$i<$uicols_count;$i++)
-                       {
-                               //all colums should be have formatter
-                               
$datatable['headers']['header'][$i]['formatter'] = 
($uicols['formatter'][$i]==''?  '""' : $uicols['formatter'][$i]);
-
-                               $datatable['headers']['header'][$i]['name']     
                = $uicols['name'][$i];
-                               $datatable['headers']['header'][$i]['text']     
                = $uicols['descr'][$i];
-                               $datatable['headers']['header'][$i]['visible']  
                = true;
-                               $datatable['headers']['header'][$i]['sortable'] 
                = true;
-                               
$datatable['headers']['header'][$i]['sort_field']       = 
$uicols['sort_field'][$i];
+                               array_push ($data['datatable']['field'], 
$params);
                        }
 
-                       $function_exchange_values = '';
+                       $appname                                                
= lang('template');
+                       $function_msg                                   = 
lang('list order template');
 
-                       $function_exchange_values .= 
'opener.document.getElementsByName("ns3420_id")[0].value = "";' ."\r\n";
-                       $function_exchange_values .= 
'opener.document.getElementsByName("ns3420_descr")[0].value = "";' ."\r\n";
-
-
-                       $function_exchange_values .= 
'opener.document.getElementsByName("ns3420_id")[0].value = data.getData("id");' 
."\r\n";
-                       $function_exchange_values .= 
'opener.document.getElementsByName("ns3420_descr")[0].value = 
data.getData("ns3420_descr");' ."\r\n";
-
-                       $function_exchange_values .= 'window.close()';
-
-                       $datatable['exchange_values'] = 
$function_exchange_values;
-                       $datatable['valida'] = '';
-
-                       // 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->start;
-                       $datatable['pagination']['records_limit']       = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
-                       $datatable['pagination']['records_returned']= 
count($ns3420_entry);
-                       $datatable['pagination']['records_total']       = 
$this->bo->total_records;
-
-                       if ( (phpgw::get_var("start")== "") && 
(phpgw::get_var("order",'string')== ""))
-                       {
-                               $datatable['sorting']['order']                  
= 'id'; // name key Column in myColumnDef
-                               $datatable['sorting']['sort']                   
= 'asc'; // 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
-                       }
-
-                       $appname                                                
= lang('standard description');
-                       $function_msg                                   = 
lang('list standard description');
-
-
-                       //-- 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']."' target='_blank'>" 
.$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 ----------------------
-
-                       // 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);
-
-                       //Title of Page
                        $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('property') . ' - ' . $appname . ': ' . $function_msg;
 
-                       // Prepare YUI Library
-                       $GLOBALS['phpgw']->js->validate_file( 'yahoo', 
'lookup.tenant.index', 'property' );
-
-                       $this->save_sessiondata();
+                       self::render_template_xsl('datatable_jquery', $data);
                }
 
-
                function entity()
                {
                        $bocommon                                       = 
CreateObject('property.bocommon');

Modified: branches/dev-syncromind/property/setup/default_records.inc.php
===================================================================
--- branches/dev-syncromind/property/setup/default_records.inc.php      
2015-01-29 23:07:46 UTC (rev 12675)
+++ branches/dev-syncromind/property/setup/default_records.inc.php      
2015-01-30 13:46:38 UTC (rev 12676)
@@ -302,8 +302,8 @@
 #
 #  fm_ns3420
 #
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_ns3420 (id, tekst1, 
enhet) VALUES ('D00', 'RIGGING, KLARGJØRING', 'RS')");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_ns3420 (id, tekst1, 
enhet,tekst2) VALUES ('D20', 'RIGGING, ANLEGGSTOMT', 'RS','TILFØRSEL- OG 
FORSYNINGSANLEGG')");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_ns3420 (id, num, tekst1, 
enhet) VALUES (1, 'D00', 'RIGGING, KLARGJØRING', 'RS')");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_ns3420 (id, num, tekst1, 
enhet,tekst2) VALUES (2, 'D20', 'RIGGING, ANLEGGSTOMT', 'RS','TILFØRSEL- OG 
FORSYNINGSANLEGG')");
 
 #
 # Data-ark for tabell fm_idgenerator

Deleted: branches/dev-syncromind/property/templates/base/lookup.xsl
===================================================================
--- branches/dev-syncromind/property/templates/base/lookup.xsl  2015-01-29 
23:07:46 UTC (rev 12675)
+++ branches/dev-syncromind/property/templates/base/lookup.xsl  2015-01-30 
13:46:38 UTC (rev 12676)
@@ -1,967 +0,0 @@
-  <!-- $Id$ -->
-       <xsl:template name="app_data">
-               <xsl:choose>
-                       <xsl:when test="list_tenant">
-                               <xsl:apply-templates select="list_tenant"/>
-                       </xsl:when>
-                       <xsl:when test="list_entity">
-                               <xsl:apply-templates select="list_entity"/>
-                       </xsl:when>
-                       <xsl:when test="list_street">
-                               <xsl:apply-templates select="list_street"/>
-                       </xsl:when>
-                       <xsl:when test="list_ns3420">
-                               <xsl:apply-templates select="list_ns3420"/>
-                       </xsl:when>
-                       <xsl:when test="list_b_account">
-                               <xsl:apply-templates select="list_b_account"/>
-                       </xsl:when>
-                       <xsl:when test="list_vendor">
-                               <xsl:apply-templates select="list_vendor"/>
-                       </xsl:when>
-                       <xsl:when test="list_phpgw_user">
-                               <xsl:apply-templates select="list_phpgw_user"/>
-                       </xsl:when>
-                       <xsl:otherwise>
-                               <xsl:apply-templates select="list_contact"/>
-                       </xsl:otherwise>
-               </xsl:choose>
-       </xsl:template>
-
-       <!-- New template-->
-       <xsl:template match="list_contact">
-               <script type="text/javascript">
-                       function ExchangeContact(thisform)
-                       {
-                               opener.document.form.<xsl:value-of 
select="contact_id"/>.value = thisform.elements[0].value;
-                               opener.document.form.<xsl:value-of 
select="contact_name"/>.value = thisform.elements[1].value;
-                               window.close()
-                       }
-               </script>
-               <table width="100%" cellpadding="2" cellspacing="2" 
align="center">
-                       <tr>
-                               <td>
-                                       <xsl:call-template name="cat_filter"/>
-                               </td>
-                               <!--<td align="center">
-<xsl:call-template name="filter_select"/>
-</td> -->
-                               <td align="right">
-                                       <xsl:call-template name="search_field"/>
-                               </td>
-                       </tr>
-                       <tr>
-                               <td colspan="3" width="100%">
-                                       <xsl:call-template name="nextmatchs"/>
-                               </td>
-                       </tr>
-               </table>
-               <table width="100%" cellpadding="2" cellspacing="2" 
align="center">
-                       <xsl:apply-templates select="table_header_contact"/>
-                       <xsl:apply-templates select="values_contact"/>
-                       <tr>
-                               <td colspan="3" width="100%">
-                                       <xsl:call-template name="nextmatchs"/>
-                               </td>
-                       </tr>
-               </table>
-               <xsl:apply-templates select="table_done"/>
-       </xsl:template>
-
-       <!-- New template-->
-       <xsl:template match="table_header_contact">
-               <xsl:variable name="sort_id">
-                       <xsl:value-of select="sort_id"/>
-               </xsl:variable>
-               <xsl:variable name="sort_name">
-                       <xsl:value-of select="sort_name"/>
-               </xsl:variable>
-               <tr class="th">
-                       <td class="th_text" width="10%" align="right">
-                               <a href="{$sort_id}">
-                                       <xsl:value-of select="lang_id"/>
-                               </a>
-                       </td>
-                       <td class="th_text" width="40%" align="left">
-                               <a href="{$sort_name}">
-                                       <xsl:value-of select="lang_name"/>
-                               </a>
-                       </td>
-                       <td class="th_text" width="10%">
-                               <xsl:value-of select="lang_select"/>
-                       </td>
-               </tr>
-       </xsl:template>
-
-       <!-- New template-->
-       <xsl:template match="values_contact">
-               <xsl:variable name="lang_select_statustext">
-                       <xsl:value-of select="lang_select_statustext"/>
-               </xsl:variable>
-               <tr>
-                       <xsl:attribute name="class">
-                               <xsl:choose>
-                                       <xsl:when test="@class">
-                                               <xsl:value-of select="@class"/>
-                                       </xsl:when>
-                                       <xsl:when test="position() mod 2 = 0">
-                                               <xsl:text>row_off</xsl:text>
-                                       </xsl:when>
-                                       <xsl:otherwise>
-                                               <xsl:text>row_on</xsl:text>
-                                       </xsl:otherwise>
-                               </xsl:choose>
-                       </xsl:attribute>
-                       <td class="small_text" align="right">
-                               <xsl:value-of select="id"/>
-                       </td>
-                       <td class="small_text" align="left">
-                               <xsl:value-of select="contact_name"/>
-                       </td>
-                       <xsl:choose>
-                               <xsl:when test="id">
-                                       <form>
-                                               <td class="small_text" 
valign="top">
-                                                       <input type="hidden" 
name="hidden" value="{id}"/>
-                                                       <input type="hidden" 
name="hidden" value="{contact_name}"/>
-                                                       <xsl:variable 
name="lang_select">
-                                                               <xsl:value-of 
select="lang_select"/>
-                                                       </xsl:variable>
-                                                       <input type="button" 
name="convert" value="{$lang_select}" onClick="ExchangeContact(this.form);" 
onMouseout="window.status='';return true;">
-                                                               <xsl:attribute 
name="onMouseover">
-                                                                       
<xsl:text>window.status='</xsl:text>
-                                                                       
<xsl:value-of select="lang_select_statustext"/>
-                                                                       
<xsl:text>'; return true;</xsl:text>
-                                                               </xsl:attribute>
-                                                       </input>
-                                               </td>
-                                       </form>
-                               </xsl:when>
-                       </xsl:choose>
-               </tr>
-       </xsl:template>
-
-       <!-- list list_vendor-->
-       <xsl:template match="list_vendor">
-               <script type="text/javascript">
-                       function ExchangeVendor(thisform)
-                       {
-                               /* opener.document.form.<xsl:value-of 
select="contact_id"/>.value = thisform.elements[0].value;
-                               opener.document.form.<xsl:value-of 
select="org_name"/>.value = thisform.elements[1].value;*/
-
-                               //cramirez: modifying this seccion for use in 
datatable YUI
-                               opener.document.forms[0].<xsl:value-of 
select="contact_id"/>.value = thisform.elements[0].value;
-                               opener.document.forms[0].<xsl:value-of 
select="org_name"/>.value = thisform.elements[1].value;
-
-                               window.close()
-                       }
-               </script>
-               <table width="100%" cellpadding="2" cellspacing="2" 
align="center">
-                       <tr>
-                               <td>
-                                       <xsl:call-template name="cat_filter"/>
-                               </td>
-                               <!--<td align="center">
-<xsl:call-template name="filter_select"/>
-</td> -->
-                               <td align="right">
-                                       <xsl:call-template name="search_field"/>
-                               </td>
-                       </tr>
-                       <tr>
-                               <td colspan="3" width="100%">
-                                       <xsl:call-template name="nextmatchs"/>
-                               </td>
-                       </tr>
-               </table>
-               <table width="100%" cellpadding="2" cellspacing="2" 
align="center">
-                       <xsl:apply-templates select="table_header_vendor"/>
-                       <xsl:apply-templates select="values_vendor"/>
-                       <tr>
-                               <td colspan="3" width="100%">
-                                       <xsl:call-template name="nextmatchs"/>
-                               </td>
-                       </tr>
-               </table>
-               <xsl:apply-templates select="table_done"/>
-       </xsl:template>
-
-       <!-- New template-->
-       <xsl:template match="table_header_vendor">
-               <xsl:variable name="sort_id">
-                       <xsl:value-of select="sort_id"/>
-               </xsl:variable>
-               <xsl:variable name="sort_name">
-                       <xsl:value-of select="sort_name"/>
-               </xsl:variable>
-               <tr class="th">
-                       <td class="th_text" width="10%" align="right">
-                               <a href="{$sort_id}">
-                                       <xsl:value-of select="lang_id"/>
-                               </a>
-                       </td>
-                       <td class="th_text" width="40%" align="left">
-                               <a href="{$sort_name}">
-                                       <xsl:value-of select="lang_name"/>
-                               </a>
-                       </td>
-                       <td class="th_text" width="10%">
-                               <xsl:value-of select="lang_select"/>
-                       </td>
-               </tr>
-       </xsl:template>
-
-       <!-- New template-->
-       <xsl:template match="values_vendor">
-               <xsl:variable name="lang_select_statustext">
-                       <xsl:value-of select="lang_select_statustext"/>
-               </xsl:variable>
-               <tr>
-                       <xsl:attribute name="class">
-                               <xsl:choose>
-                                       <xsl:when test="@class">
-                                               <xsl:value-of select="@class"/>
-                                       </xsl:when>
-                                       <xsl:when test="position() mod 2 = 0">
-                                               <xsl:text>row_off</xsl:text>
-                                       </xsl:when>
-                                       <xsl:otherwise>
-                                               <xsl:text>row_on</xsl:text>
-                                       </xsl:otherwise>
-                               </xsl:choose>
-                       </xsl:attribute>
-                       <td class="small_text" align="right">
-                               <xsl:value-of select="id"/>
-                       </td>
-                       <td class="small_text" align="left">
-                               <xsl:value-of select="vendor_name"/>
-                       </td>
-                       <xsl:choose>
-                               <xsl:when test="id">
-                                       <form>
-                                               <td class="small_text" 
valign="top">
-                                                       <input type="hidden" 
name="hidden" value="{id}"/>
-                                                       <input type="hidden" 
name="hidden" value="{vendor_name}"/>
-                                                       <xsl:variable 
name="lang_select">
-                                                               <xsl:value-of 
select="lang_select"/>
-                                                       </xsl:variable>
-                                                       <input type="button" 
name="convert" value="{$lang_select}" onClick="ExchangeVendor(this.form);" 
onMouseout="window.status='';return true;">
-                                                               <xsl:attribute 
name="onMouseover">
-                                                                       
<xsl:text>window.status='</xsl:text>
-                                                                       
<xsl:value-of select="lang_select_statustext"/>
-                                                                       
<xsl:text>'; return true;</xsl:text>
-                                                               </xsl:attribute>
-                                                       </input>
-                                               </td>
-                                       </form>
-                               </xsl:when>
-                       </xsl:choose>
-               </tr>
-       </xsl:template>
-
-       <!-- list b_account-->
-       <xsl:template match="list_b_account">
-               <script type="text/javascript">
-                       function Exchangeb_account(thisform)
-                       {
-                               opener.document.form.b_account_id.value = 
thisform.elements[0].value;
-                               opener.document.form.b_account_name.value = 
thisform.elements[1].value;
-                               window.close()
-                       }
-               </script>
-               <table width="100%" cellpadding="2" cellspacing="2" 
align="center">
-                       <tr>
-                               <td align="right">
-                                       <xsl:call-template name="search_field"/>
-                               </td>
-                       </tr>
-                       <tr>
-                               <td colspan="3" width="100%">
-                                       <xsl:call-template name="nextmatchs"/>
-                               </td>
-                       </tr>
-               </table>
-               <table width="100%" cellpadding="2" cellspacing="2" 
align="center">
-                       <xsl:apply-templates select="table_header_b_account"/>
-                       <xsl:apply-templates select="values_b_account"/>
-                       <tr>
-                               <td colspan="3" width="100%">
-                                       <xsl:call-template name="nextmatchs"/>
-                               </td>
-                       </tr>
-               </table>
-               <xsl:apply-templates select="table_done"/>
-       </xsl:template>
-
-       <!-- New template-->
-       <xsl:template match="table_header_b_account">
-               <xsl:variable name="sort_id">
-                       <xsl:value-of select="sort_id"/>
-               </xsl:variable>
-               <xsl:variable name="sort_name">
-                       <xsl:value-of select="sort_name"/>
-               </xsl:variable>
-               <tr class="th">
-                       <td class="th_text" width="10%" align="right">
-                               <a href="{$sort_id}">
-                                       <xsl:value-of select="lang_id"/>
-                               </a>
-                       </td>
-                       <td class="th_text" width="40%" align="right">
-                               <a href="{$sort_name}">
-                                       <xsl:value-of select="lang_name"/>
-                               </a>
-                       </td>
-                       <td class="th_text" width="10%">
-                               <xsl:value-of select="lang_select"/>
-                       </td>
-               </tr>
-       </xsl:template>
-
-       <!-- New template-->
-       <xsl:template match="values_b_account">
-               <xsl:variable name="lang_select_statustext">
-                       <xsl:value-of select="lang_select_statustext"/>
-               </xsl:variable>
-               <tr>
-                       <xsl:attribute name="class">
-                               <xsl:choose>
-                                       <xsl:when test="@class">
-                                               <xsl:value-of select="@class"/>
-                                       </xsl:when>
-                                       <xsl:when test="position() mod 2 = 0">
-                                               <xsl:text>row_off</xsl:text>
-                                       </xsl:when>
-                                       <xsl:otherwise>
-                                               <xsl:text>row_on</xsl:text>
-                                       </xsl:otherwise>
-                               </xsl:choose>
-                       </xsl:attribute>
-                       <td class="small_text" align="right">
-                               <xsl:value-of select="id"/>
-                       </td>
-                       <td class="small_text" align="right">
-                               <xsl:value-of select="b_account_name"/>
-                       </td>
-                       <xsl:choose>
-                               <xsl:when test="id">
-                                       <form>
-                                               <td class="small_text" 
valign="top">
-                                                       <input type="hidden" 
name="hidden" value="{id}"/>
-                                                       <input type="hidden" 
name="hidden" value="{b_account_name}"/>
-                                                       <xsl:variable 
name="lang_select">
-                                                               <xsl:value-of 
select="lang_select"/>
-                                                       </xsl:variable>
-                                                       <input type="button" 
name="convert" value="{$lang_select}" onClick="Exchangeb_account(this.form);" 
onMouseout="window.status='';return true;">
-                                                               <xsl:attribute 
name="onMouseover">
-                                                                       
<xsl:text>window.status='</xsl:text>
-                                                                       
<xsl:value-of select="lang_select_statustext"/>
-                                                                       
<xsl:text>'; return true;</xsl:text>
-                                                               </xsl:attribute>
-                                                       </input>
-                                               </td>
-                                       </form>
-                               </xsl:when>
-                       </xsl:choose>
-               </tr>
-       </xsl:template>
-
-       <!-- list street-->
-       <xsl:template match="list_street">
-               <script type="text/javascript">
-                       function ExchangeStreet(thisform)
-                       {
-                               opener.document.form.street_id.value = 
thisform.elements[0].value;
-                               opener.document.form.street_name.value = 
thisform.elements[1].value;
-                               window.close()
-                       }
-               </script>
-               <table width="100%" cellpadding="2" cellspacing="2" 
align="center">
-                       <tr>
-                               <td align="right">
-                                       <xsl:call-template name="search_field"/>
-                               </td>
-                       </tr>
-                       <tr>
-                               <td colspan="3" width="100%">
-                                       <xsl:call-template name="nextmatchs"/>
-                               </td>
-                       </tr>
-               </table>
-               <table width="100%" cellpadding="2" cellspacing="2" 
align="center">
-                       <xsl:apply-templates select="table_header_street"/>
-                       <xsl:apply-templates select="values_street"/>
-                       <tr>
-                               <td colspan="3" width="100%">
-                                       <xsl:call-template name="nextmatchs"/>
-                               </td>
-                       </tr>
-               </table>
-               <xsl:apply-templates select="table_done"/>
-       </xsl:template>
-
-       <!-- New template-->
-       <xsl:template match="table_header_street">
-               <xsl:variable name="sort_id">
-                       <xsl:value-of select="sort_id"/>
-               </xsl:variable>
-               <xsl:variable name="sort_name">
-                       <xsl:value-of select="sort_name"/>
-               </xsl:variable>
-               <tr class="th">
-                       <td class="th_text" width="5%" align="right">
-                               <a href="{$sort_id}">
-                                       <xsl:value-of select="lang_id"/>
-                               </a>
-                       </td>
-                       <td class="th_text" width="90%" align="right">
-                               <a href="{$sort_name}">
-                                       <xsl:value-of select="lang_name"/>
-                               </a>
-                       </td>
-                       <td class="th_text" width="5%">
-                               <xsl:value-of select="lang_select"/>
-                       </td>
-               </tr>
-       </xsl:template>
-
-       <!-- New template-->
-       <xsl:template match="values_street">
-               <xsl:variable name="lang_select_statustext">
-                       <xsl:value-of select="lang_select_statustext"/>
-               </xsl:variable>
-               <tr>
-                       <xsl:attribute name="class">
-                               <xsl:choose>
-                                       <xsl:when test="@class">
-                                               <xsl:value-of select="@class"/>
-                                       </xsl:when>
-                                       <xsl:when test="position() mod 2 = 0">
-                                               <xsl:text>row_off</xsl:text>
-                                       </xsl:when>
-                                       <xsl:otherwise>
-                                               <xsl:text>row_on</xsl:text>
-                                       </xsl:otherwise>
-                               </xsl:choose>
-                       </xsl:attribute>
-                       <td class="small_text" align="right">
-                               <xsl:value-of select="id"/>
-                       </td>
-                       <td class="small_text" align="right">
-                               <xsl:value-of select="street_name"/>
-                       </td>
-                       <xsl:choose>
-                               <xsl:when test="id">
-                                       <form>
-                                               <td class="small_text" 
valign="top">
-                                                       <input type="hidden" 
name="hidden" value="{id}"/>
-                                                       <input type="hidden" 
name="hidden" value="{street_name}"/>
-                                                       <xsl:variable 
name="lang_select">
-                                                               <xsl:value-of 
select="lang_select"/>
-                                                       </xsl:variable>
-                                                       <input type="button" 
name="convert" value="{$lang_select}" onClick="ExchangeStreet(this.form);" 
onMouseout="window.status='';return true;">
-                                                               <xsl:attribute 
name="onMouseover">
-                                                                       
<xsl:text>window.status='</xsl:text>
-                                                                       
<xsl:value-of select="lang_select_statustext"/>
-                                                                       
<xsl:text>'; return true;</xsl:text>
-                                                               </xsl:attribute>
-                                                       </input>
-                                               </td>
-                                       </form>
-                               </xsl:when>
-                       </xsl:choose>
-               </tr>
-       </xsl:template>
-
-       <!-- list tenant-->
-       <xsl:template match="list_tenant">
-               <script type="text/javascript">
-                       function Exchangetenant(thisform)
-                       {
-                               opener.document.form.tenant_id.value = 
thisform.elements[0].value;
-                               opener.document.form.last_name.value = 
thisform.elements[1].value;
-                               opener.document.form.first_name.value = 
thisform.elements[2].value;
-                               window.close()
-                       }
-               </script>
-               <table width="100%" cellpadding="2" cellspacing="2" 
align="center">
-                       <tr>
-                               <td align="right">
-                                       <xsl:call-template name="search_field"/>
-                               </td>
-                       </tr>
-                       <tr>
-                               <td colspan="3" width="100%">
-                                       <xsl:call-template name="nextmatchs"/>
-                               </td>
-                       </tr>
-               </table>
-               <table width="100%" cellpadding="2" cellspacing="2" 
align="center">
-                       <xsl:apply-templates select="table_header_tenant_new"/>
-                       <xsl:apply-templates select="values_tenant_new"/>
-                       <tr>
-                               <td colspan="3" width="100%">
-                                       <xsl:call-template name="nextmatchs"/>
-                               </td>
-                       </tr>
-               </table>
-               <xsl:apply-templates select="table_done"/>
-       </xsl:template>
-
-       <!-- New template-->
-       <xsl:template match="table_header_tenant_new">
-               <xsl:variable name="sort_id">
-                       <xsl:value-of select="sort_id"/>
-               </xsl:variable>
-               <xsl:variable name="sort_last_name">
-                       <xsl:value-of select="sort_last_name"/>
-               </xsl:variable>
-               <xsl:variable name="sort_first_name">
-                       <xsl:value-of select="sort_first_name"/>
-               </xsl:variable>
-               <tr class="th">
-                       <td class="th_text" width="5%" align="right">
-                               <a href="{$sort_id}">
-                                       <xsl:value-of select="lang_id"/>
-                               </a>
-                       </td>
-                       <td class="th_text" width="40%" align="right">
-                               <a href="{$sort_last_name}">
-                                       <xsl:value-of select="lang_last_name"/>
-                               </a>
-                       </td>
-                       <td class="th_text" width="40%" align="right">
-                               <a href="{$sort_first_name}">
-                                       <xsl:value-of select="lang_first_name"/>
-                               </a>
-                       </td>
-                       <td class="th_text" width="5%">
-                               <xsl:value-of select="lang_select"/>
-                       </td>
-               </tr>
-       </xsl:template>
-
-       <!-- New template-->
-       <xsl:template match="values_tenant_new">
-               <xsl:variable name="lang_select_statustext">
-                       <xsl:value-of select="lang_select_statustext"/>
-               </xsl:variable>
-               <tr>
-                       <xsl:attribute name="class">
-                               <xsl:choose>
-                                       <xsl:when test="@class">
-                                               <xsl:value-of select="@class"/>
-                                       </xsl:when>
-                                       <xsl:when test="position() mod 2 = 0">
-                                               <xsl:text>row_off</xsl:text>
-                                       </xsl:when>
-                                       <xsl:otherwise>
-                                               <xsl:text>row_on</xsl:text>
-                                       </xsl:otherwise>
-                               </xsl:choose>
-                       </xsl:attribute>
-                       <td class="small_text" align="right">
-                               <xsl:value-of select="id"/>
-                       </td>
-                       <td class="small_text" align="right">
-                               <xsl:value-of select="last_name"/>
-                       </td>
-                       <td class="small_text" align="right">
-                               <xsl:value-of select="first_name"/>
-                       </td>
-                       <xsl:choose>
-                               <xsl:when test="id">
-                                       <form>
-                                               <td class="small_text" 
valign="top">
-                                                       <input type="hidden" 
name="hidden" value="{id}"/>
-                                                       <input type="hidden" 
name="hidden" value="{last_name}"/>
-                                                       <input type="hidden" 
name="hidden" value="{first_name}"/>
-                                                       <xsl:variable 
name="lang_select">
-                                                               <xsl:value-of 
select="lang_select"/>
-                                                       </xsl:variable>
-                                                       <input type="button" 
name="convert" value="{$lang_select}" onClick="Exchangetenant(this.form);" 
onMouseout="window.status='';return true;">
-                                                               <xsl:attribute 
name="onMouseover">
-                                                                       
<xsl:text>window.status='</xsl:text>
-                                                                       
<xsl:value-of select="lang_select_statustext"/>
-                                                                       
<xsl:text>'; return true;</xsl:text>
-                                                               </xsl:attribute>
-                                                       </input>
-                                               </td>
-                                       </form>
-                               </xsl:when>
-                       </xsl:choose>
-               </tr>
-       </xsl:template>
-
-       <!-- New template-->
-       <!-- list ns3420-->
-       <xsl:template match="list_ns3420">
-               <script type="text/javascript">
-                       function Exchangens3420(thisform)
-                       {
-                               opener.document.form.ns3420_id.value = 
thisform.elements[0].value;
-                               opener.document.form.ns3420_descr.value = 
thisform.elements[1].value;
-                               window.close()
-                       }
-               </script>
-               <table width="100%" cellpadding="2" cellspacing="2" 
align="center">
-                       <tr>
-                               <td align="right">
-                                       <xsl:call-template name="search_field"/>
-                               </td>
-                       </tr>
-                       <tr>
-                               <td colspan="3" width="100%">
-                                       <xsl:call-template name="nextmatchs"/>
-                               </td>
-                       </tr>
-               </table>
-               <table width="100%" cellpadding="2" cellspacing="2" 
align="center">
-                       <xsl:apply-templates select="table_header_ns3420"/>
-                       <xsl:apply-templates select="values_ns3420"/>
-                       <tr>
-                               <td colspan="3" width="100%">
-                                       <xsl:call-template name="nextmatchs"/>
-                               </td>
-                       </tr>
-               </table>
-               <xsl:apply-templates select="table_done"/>
-       </xsl:template>
-
-       <!-- New template-->
-       <xsl:template match="table_header_ns3420">
-               <xsl:variable name="sort_id">
-                       <xsl:value-of select="sort_id"/>
-               </xsl:variable>
-               <xsl:variable name="sort_descr">
-                       <xsl:value-of select="sort_descr"/>
-               </xsl:variable>
-               <tr class="th">
-                       <td class="th_text" width="15%" align="right">
-                               <a href="{$sort_id}">
-                                       <xsl:value-of select="lang_id"/>
-                               </a>
-                       </td>
-                       <td class="th_text" width="85%" align="right">
-                               <a href="{$sort_descr}">
-                                       <xsl:value-of select="lang_descr"/>
-                               </a>
-                       </td>
-                       <td class="th_text" width="5%">
-                               <xsl:value-of select="lang_select"/>
-                       </td>
-               </tr>
-       </xsl:template>
-
-       <!-- New template-->
-       <xsl:template match="values_ns3420">
-               <xsl:variable name="lang_select_statustext">
-                       <xsl:value-of select="lang_select_statustext"/>
-               </xsl:variable>
-               <tr>
-                       <xsl:attribute name="class">
-                               <xsl:choose>
-                                       <xsl:when test="@class">
-                                               <xsl:value-of select="@class"/>
-                                       </xsl:when>
-                                       <xsl:when test="position() mod 2 = 0">
-                                               <xsl:text>row_off</xsl:text>
-                                       </xsl:when>
-                                       <xsl:otherwise>
-                                               <xsl:text>row_on</xsl:text>
-                                       </xsl:otherwise>
-                               </xsl:choose>
-                       </xsl:attribute>
-                       <td class="small_text" align="left">
-                               <xsl:value-of select="id"/>
-                       </td>
-                       <td class="small_text" align="left">
-                               <xsl:value-of select="ns3420_descr"/>
-                       </td>
-                       <xsl:choose>
-                               <xsl:when test="id">
-                                       <form>
-                                               <td class="small_text" 
valign="top">
-                                                       <input type="hidden" 
name="hidden" value="{id}"/>
-                                                       <input type="hidden" 
name="hidden" value="{ns3420_descr}"/>
-                                                       <xsl:variable 
name="lang_select">
-                                                               <xsl:value-of 
select="lang_select"/>
-                                                       </xsl:variable>
-                                                       <input type="button" 
name="convert" value="{$lang_select}" onClick="Exchangens3420(this.form);" 
onMouseout="window.status='';return true;">
-                                                               <xsl:attribute 
name="onMouseover">
-                                                                       
<xsl:text>window.status='</xsl:text>
-                                                                       
<xsl:value-of select="lang_select_statustext"/>
-                                                                       
<xsl:text>'; return true;</xsl:text>
-                                                               </xsl:attribute>
-                                                       </input>
-                                               </td>
-                                       </form>
-                               </xsl:when>
-                       </xsl:choose>
-               </tr>
-       </xsl:template>
-
-       <!-- New template-->
-       <xsl:template match="list_entity">
-               <xsl:choose>
-                       <xsl:when test="//lookup=1">
-                               <script type="text/javascript">
-                                       function Exchange_values(thisform)
-                                       {
-                                               <xsl:value-of 
select="function_exchange_values"/>
-                                       }
-                               </script>
-                       </xsl:when>
-               </xsl:choose>
-               <table width="95%" cellpadding="2" cellspacing="2" 
align="center">
-                       <tr>
-                               <td>
-                                       <xsl:call-template name="cat_filter"/>
-                               </td>
-                               <td>
-                                       <xsl:call-template 
name="filter_district"/>
-                               </td>
-                               <td align="right">
-                                       <xsl:call-template name="search_field"/>
-                               </td>
-                       </tr>
-                       <tr>
-                               <td colspan="3" width="100%">
-                                       <xsl:call-template name="nextmatchs"/>
-                               </td>
-                       </tr>
-               </table>
-               <table width="100%" cellpadding="2" cellspacing="2" 
align="center">
-                       <tr class="th">
-                               <xsl:choose>
-                                       <xsl:when test="//lookup=1">
-                                               <td>
-                                                       <!--make room for 
hidden fields  -->
-                                               </td>
-                                       </xsl:when>
-                               </xsl:choose>
-                               <xsl:for-each select="table_header_entity">
-                                       <td class="th_text" width="{with}" 
align="{align}">
-                                               <xsl:choose>
-                                                       <xsl:when 
test="sort_link!=''">
-                                                               <a 
href="{sort}" onMouseover="window.status='{header}';return true;" 
onMouseout="window.status='';return true;">
-                                                                       
<xsl:value-of select="header"/>
-                                                               </a>
-                                                       </xsl:when>
-                                                       <xsl:otherwise>
-                                                               <xsl:value-of 
select="header"/>
-                                                       </xsl:otherwise>
-                                               </xsl:choose>
-                                       </td>
-                               </xsl:for-each>
-                       </tr>
-                       <xsl:call-template name="list_values_entity"/>
-               </table>
-               <xsl:apply-templates select="table_done"/>
-       </xsl:template>
-
-       <!-- New template-->
-       <xsl:template name="list_values_entity">
-               <xsl:for-each select="values_entity">
-                       <tr>
-                               <xsl:attribute name="class">
-                                       <xsl:choose>
-                                               <xsl:when test="@class">
-                                                       <xsl:value-of 
select="@class"/>
-                                               </xsl:when>
-                                               <xsl:when test="position() mod 
2 = 0">
-                                                       
<xsl:text>row_off</xsl:text>
-                                               </xsl:when>
-                                               <xsl:otherwise>
-                                                       
<xsl:text>row_on</xsl:text>
-                                               </xsl:otherwise>
-                                       </xsl:choose>
-                               </xsl:attribute>
-                               <form>
-                                       <xsl:choose>
-                                               <xsl:when test="//lookup=1">
-                                                       <td>
-                                                               <xsl:for-each 
select="hidden">
-                                                                       <input 
type="hidden" name="{name}" value="{value}"/>
-                                                               </xsl:for-each>
-                                                       </td>
-                                               </xsl:when>
-                                       </xsl:choose>
-                                       <xsl:for-each select="row">
-                                               <xsl:choose>
-                                                       <xsl:when test="link">
-                                                               <td 
class="small_text" align="center">
-                                                                       <a 
href="{link}" onMouseover="window.status='{statustext}';return true;" 
onMouseout="window.status='';return true;">
-                                                                               
<xsl:value-of select="text"/>
-                                                                       </a>
-                                                               </td>
-                                                       </xsl:when>
-                                                       <xsl:otherwise>
-                                                               <td 
class="small_text" align="left">
-                                                                       
<xsl:value-of select="value"/>
-                                                                       
<xsl:choose>
-                                                                               
<xsl:when test="//lookup=1">
-                                                                               
        <xsl:if test="position() = last()">
-                                                                               
                <td class="small_text" align="center">
-                                                                               
                        <input type="button" name="select" 
value="{//lang_select}" onClick="{//exchange_values}" 
onMouseout="window.status='';return true;">
-                                                                               
                                <xsl:attribute name="onMouseover">
-                                                                               
                                        <xsl:text>window.status='</xsl:text>
-                                                                               
                                        <xsl:value-of 
select="lang_select_statustext"/>
-                                                                               
                                        <xsl:text>'; return true;</xsl:text>
-                                                                               
                                </xsl:attribute>
-                                                                               
                        </input>
-                                                                               
                </td>
-                                                                               
        </xsl:if>
-                                                                               
</xsl:when>
-                                                                       
</xsl:choose>
-                                                               </td>
-                                                       </xsl:otherwise>
-                                               </xsl:choose>
-                                       </xsl:for-each>
-                               </form>
-                       </tr>
-               </xsl:for-each>
-       </xsl:template>
-
-       <!-- New template-->
-       <xsl:template match="table_done">
-               <table width="95%" cellpadding="2" cellspacing="2" 
align="center">
-                       <tr>
-                               <td height="50">
-                                       <xsl:variable name="lang_done">
-                                               <xsl:value-of 
select="lang_done"/>
-                                       </xsl:variable>
-                                       <form method="post">
-                                               <input type="button" 
name="done" value="{$lang_done}" onClick="window.close()" 
onMouseout="window.status='';return true;">
-                                                       <xsl:attribute 
name="title">
-                                                               <xsl:value-of 
select="lang_done_statustext"/>
-                                                       </xsl:attribute>
-                                               </input>
-                                       </form>
-                               </td>
-                       </tr>
-               </table>
-       </xsl:template>
-
-       <!-- list phpgw_user-->
-       <xsl:template match="list_phpgw_user">
-               <script type="text/javascript">
-                       function Exchangephpgw_user(thisform)
-                       {
-                               opener.document.form.<xsl:value-of 
select="user_id"/>.value = thisform.elements[0].value;
-                               opener.document.form.<xsl:value-of 
select="user_name"/>.value = thisform.elements[1].value;
-                               window.close()
-                       }
-               </script>
-               <table width="100%" cellpadding="2" cellspacing="2" 
align="center">
-                       <tr>
-                               <td align="right">
-                                       <xsl:call-template name="search_field"/>
-                               </td>
-                       </tr>
-                       <tr>
-                               <td colspan="3" width="100%">
-                                       <xsl:call-template name="nextmatchs"/>
-                               </td>
-                       </tr>
-               </table>
-               <table width="100%" cellpadding="2" cellspacing="2" 
align="center">
-                       <xsl:apply-templates select="table_header_phpgw_user"/>
-                       <xsl:apply-templates select="values_phpgw_user"/>
-                       <tr>
-                               <td colspan="3" width="100%">
-                                       <xsl:call-template name="nextmatchs"/>
-                               </td>
-                       </tr>
-               </table>
-               <xsl:apply-templates select="table_done"/>
-       </xsl:template>
-
-       <!-- New template-->
-       <xsl:template match="table_header_phpgw_user">
-               <xsl:variable name="sort_id">
-                       <xsl:value-of select="sort_id"/>
-               </xsl:variable>
-               <xsl:variable name="sort_last_name">
-                       <xsl:value-of select="sort_last_name"/>
-               </xsl:variable>
-               <xsl:variable name="sort_first_name">
-                       <xsl:value-of select="sort_first_name"/>
-               </xsl:variable>
-               <tr class="th">
-                       <td class="th_text" width="5%" align="right">
-                               <a href="{$sort_id}">
-                                       <xsl:value-of select="lang_id"/>
-                               </a>
-                       </td>
-                       <td class="th_text" width="40%" align="right">
-                               <a href="{$sort_first_name}">
-                                       <xsl:value-of select="lang_first_name"/>
-                               </a>
-                       </td>
-                       <td class="th_text" width="40%" align="right">
-                               <a href="{$sort_last_name}">
-                                       <xsl:value-of select="lang_last_name"/>
-                               </a>
-                       </td>
-                       <td class="th_text" width="5%">
-                               <xsl:value-of select="lang_select"/>
-                       </td>
-               </tr>
-       </xsl:template>
-
-       <!-- New template-->
-       <xsl:template match="values_phpgw_user">
-               <xsl:variable name="lang_select_statustext">
-                       <xsl:value-of select="lang_select_statustext"/>
-               </xsl:variable>
-               <xsl:variable name="full_name">
-                       <xsl:value-of select="first_name"/>
-                       <xsl:text> </xsl:text>
-                       <xsl:value-of select="last_name"/>
-               </xsl:variable>
-               <tr>
-                       <xsl:attribute name="class">
-                               <xsl:choose>
-                                       <xsl:when test="@class">
-                                               <xsl:value-of select="@class"/>
-                                       </xsl:when>
-                                       <xsl:when test="position() mod 2 = 0">
-                                               <xsl:text>row_off</xsl:text>
-                                       </xsl:when>
-                                       <xsl:otherwise>
-                                               <xsl:text>row_on</xsl:text>
-                                       </xsl:otherwise>
-                               </xsl:choose>
-                       </xsl:attribute>
-                       <td class="small_text" align="right">
-                               <xsl:value-of select="id"/>
-                       </td>
-                       <td class="small_text" align="right">
-                               <xsl:value-of select="first_name"/>
-                       </td>
-                       <td class="small_text" align="right">
-                               <xsl:value-of select="last_name"/>
-                       </td>
-                       <xsl:choose>
-                               <xsl:when test="id">
-                                       <form>
-                                               <td class="small_text" 
valign="top">
-                                                       <input type="hidden" 
name="hidden" value="{id}"/>
-                                                       <input type="hidden" 
name="hidden" value="{$full_name}"/>
-                                                       <xsl:variable 
name="lang_select">
-                                                               <xsl:value-of 
select="lang_select"/>
-                                                       </xsl:variable>
-                                                       <input type="button" 
name="convert" value="{$lang_select}" onClick="Exchangephpgw_user(this.form);" 
onMouseout="window.status='';return true;">
-                                                               <xsl:attribute 
name="onMouseover">
-                                                                       
<xsl:text>window.status='</xsl:text>
-                                                                       
<xsl:value-of select="lang_select_statustext"/>
-                                                                       
<xsl:text>'; return true;</xsl:text>
-                                                               </xsl:attribute>
-                                                       </input>
-                                               </td>
-                                       </form>
-                               </xsl:when>
-                       </xsl:choose>
-               </tr>
-       </xsl:template>

Modified: branches/dev-syncromind/property/templates/base/pricebook.xsl
===================================================================
--- branches/dev-syncromind/property/templates/base/pricebook.xsl       
2015-01-29 23:07:46 UTC (rev 12675)
+++ branches/dev-syncromind/property/templates/base/pricebook.xsl       
2015-01-30 13:46:38 UTC (rev 12676)
@@ -994,10 +994,9 @@
        <!-- add / edit -->
        <xsl:template match="edit_activity">
                <script type="text/javascript">
-                       self.name="first_Window";
                        function ns3420_lookup()
                        {
-                               Window1=window.open('<xsl:value-of 
select="ns3420_link"/>',"Search","left=50,top=100,width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");
+                               TINY.box.show({iframe:'<xsl:value-of 
select="ns3420_link"/>', 
boxid:"frameless",width:750,height:450,fixed:false,maskid:"darkmask",maskopacity:40,
 mask:true, animate:true, close: true});
                        }
                </script>
                <div align="left">
@@ -1162,10 +1161,9 @@
        <!-- add / edit agreement_group -->
        <xsl:template match="edit_agreement_group">
                <script type="text/javascript">
-                       self.name="first_Window";
                        function ns3420_lookup()
                        {
-                               Window1=window.open('<xsl:value-of 
select="ns3420_link"/>',"Search","left=50,top=100,width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");
+                               TINY.box.show({iframe:'<xsl:value-of 
select="ns3420_link"/>', 
boxid:"frameless",width:750,height:450,fixed:false,maskid:"darkmask",maskopacity:40,
 mask:true, animate:true, close: true});
                        }
                </script>
                <div align="left">

Modified: branches/dev-syncromind/property/templates/base/template.xsl
===================================================================
--- branches/dev-syncromind/property/templates/base/template.xsl        
2015-01-29 23:07:46 UTC (rev 12675)
+++ branches/dev-syncromind/property/templates/base/template.xsl        
2015-01-30 13:46:38 UTC (rev 12676)
@@ -531,10 +531,9 @@
        <!-- New template-->
        <xsl:template xmlns:php="http://php.net/xsl"; match="edit_hour">
                <script type="text/javascript">
-                       self.name="first_Window";
                        function ns3420_lookup()
                        {
-                               Window1=window.open('<xsl:value-of 
select="ns3420_link"/>',"Search","left=50,top=100,width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");
+                               TINY.box.show({iframe:'<xsl:value-of 
select="ns3420_link"/>', 
boxid:"frameless",width:750,height:450,fixed:false,maskid:"darkmask",maskopacity:40,
 mask:true, animate:true, close: true});
                        }
                </script>
                <div align="left">

Modified: branches/dev-syncromind/property/templates/base/wo_hour.xsl
===================================================================
--- branches/dev-syncromind/property/templates/base/wo_hour.xsl 2015-01-29 
23:07:46 UTC (rev 12675)
+++ branches/dev-syncromind/property/templates/base/wo_hour.xsl 2015-01-30 
13:46:38 UTC (rev 12676)
@@ -2189,10 +2189,9 @@
        <!-- add / edit -->
        <xsl:template xmlns:php="http://php.net/xsl"; match="edit_hour">
                <script type="text/javascript">
-                       self.name="first_Window";
                        function ns3420_lookup()
                        {
-                               Window1=window.open('<xsl:value-of 
select="ns3420_link"/>',"Search","left=50,top=100,width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");
+                               TINY.box.show({iframe:'<xsl:value-of 
select="ns3420_link"/>', 
boxid:"frameless",width:750,height:450,fixed:false,maskid:"darkmask",maskopacity:40,
 mask:true, animate:true, close: true});
                        }
                </script>
                <div align="left">




reply via email to

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