[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property inc/class.bolocation.inc.php inc/class...
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] property inc/class.bolocation.inc.php inc/class... |
Date: |
Tue, 11 Apr 2006 15:09:01 +0000 |
CVSROOT: /sources/phpgroupware
Module name: property
Branch:
Changes by: Sigurd Nes <address@hidden> 06/04/11 15:09:01
Modified files:
inc : class.bolocation.inc.php
class.uilocation.inc.php
templates/base : location.xsl location_form.xsl
Log message:
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.bolocation.inc.php.diff?tr1=1.13&tr2=1.14&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.uilocation.inc.php.diff?tr1=1.24&tr2=1.25&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/templates/base/location.xsl.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/templates/base/location_form.xsl.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
Patches:
Index: property/inc/class.bolocation.inc.php
diff -u property/inc/class.bolocation.inc.php:1.13
property/inc/class.bolocation.inc.php:1.14
--- property/inc/class.bolocation.inc.php:1.13 Tue Apr 11 14:17:14 2006
+++ property/inc/class.bolocation.inc.php Tue Apr 11 15:09:01 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage location
- * @version $Id: class.bolocation.inc.php,v 1.13 2006/04/11 14:17:14
sigurdne Exp $
+ * @version $Id: class.bolocation.inc.php,v 1.14 2006/04/11 15:09:01
sigurdne Exp $
*/
/**
@@ -337,7 +337,8 @@
if($data['no_link']>=($i+3))
{
$location['location'][$i]['lookup_link'] = False;
- $lookup_functions[$i]['action']
= 'Window1=window.open('."'" . $location_link
.'&type_id=' . ($data['no_link']-1) . '&lookup_name=' . ($data[no_link]-2) .
"'"
.',"Search","width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");';
+ $lookup_functions[$i]['link']
= $location_link .'&type_id=' . ($data['no_link']-1) .
'&lookup_name=' . ($data[no_link]-2);
+ $lookup_functions[$i]['action']
=
'Window1=window.open(link,"Search","width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");';
$location['location'][$i]['statustext']
= lang('Klick this link to select') . ' ' .
$location_types[($data[no_link]-2)]['name'];
}
@@ -418,7 +419,8 @@
{
$m++;
$lookup_functions[$m]['name'] =
'lookup_loc' . ($m+1) . '()';
- $lookup_functions[$m]['action']
= 'Window1=window.open('."'" . $location_link .'&lookup_tenant=1&type_id=' .
$config[$j]['location_type'] . '&lookup_name=' . $i ."'"
.',"Search","width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");';
+ $lookup_functions[$m]['link'] =
$location_link .'&lookup_tenant=1&type_id=' . $config[$j]['location_type'] .
'&lookup_name=' . $i;
+ $lookup_functions[$m]['action']
=
'Window1=window.open(link,"Search","width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");';
$location['location'][$i]['lookup_link'] = True;
$location['location'][$i]['name'] = lang('Tenant');
@@ -482,10 +484,10 @@
foreach($data['lookup_entity'] as $entity)
{
$m++;
- $entity_link =
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.entity&location_type='
. $data['type_id'] . '&entity_id=' .$entity['id']);
$lookup_functions[$m]['name'] =
'lookup_entity_' . $entity['id'] .'()';
- $lookup_functions[$m]['action'] =
'Window1=window.open('."'" . $entity_link ."'"
.',"Search","width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");';
+ $lookup_functions[$m]['link'] =
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.entity&location_type='
. $data['type_id'] . '&entity_id=' .$entity['id']);
+ $lookup_functions[$m]['action'] =
'Window1=window.open(link,"Search","width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");';
$location['location'][$i]['input_type']
= 'text';
$location['location'][$i]['input_name']
= 'entity_num_' . $entity['id'];
@@ -553,12 +555,12 @@
for ($j=0;$j<count($lookup_functions);$j++)
{
- $location['lookup_functions'] .= 'function ' .
$lookup_functions[$j]['name'] ."\r\n";
- $location['lookup_functions'] .= '{'."\r\n";
- $location['lookup_functions'] .= "var link = '"
. $lookup_functions[$j]['link'] ."';" . "\r\n";
- $location['lookup_functions'] .= 'link =
link.split("amp;").join("");' ."\r\n";
- $location['lookup_functions'] .=
$lookup_functions[$j]['action'] ."\r\n";
- $location['lookup_functions'] .= '}'."\r\n";
+ $location['lookup_functions'] .= "\t".'function
' . $lookup_functions[$j]['name'] ."\n";
+ $location['lookup_functions'] .= "\t".'{'."\n";
+ $location['lookup_functions'] .= "\t\tvar link
= '" . $lookup_functions[$j]['link'] ."';" . "\n";
+ $location['lookup_functions'] .= "\t\t".'link =
link.split("amp;").join("");' ."\n";
+ $location['lookup_functions'] .=
"\t\t".$lookup_functions[$j]['action'] ."\n";
+ $location['lookup_functions'] .= "\t".'}'."\n";
}
Index: property/inc/class.uilocation.inc.php
diff -u property/inc/class.uilocation.inc.php:1.24
property/inc/class.uilocation.inc.php:1.25
--- property/inc/class.uilocation.inc.php:1.24 Tue Apr 11 14:17:14 2006
+++ property/inc/class.uilocation.inc.php Tue Apr 11 15:09:01 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage location
- * @version $Id: class.uilocation.inc.php,v 1.24 2006/04/11 14:17:14
sigurdne Exp $
+ * @version $Id: class.uilocation.inc.php,v 1.25 2006/04/11 15:09:01
sigurdne Exp $
*/
/**
@@ -723,10 +723,9 @@
$attributes_values[$r]['contact_name'] = $contact_data[0]['n_family'] . ', ' .
$contact_data[0]['n_given'];
}
- $lookup_link =
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.addressbook&column='
. $attributes_values[$r]['name']);
-
$functions[$m]['name'] = 'lookup_'.
$attributes_values[$r]['name'] .'()';
- $functions[$m]['action'] =
'Window1=window.open('."'" . $lookup_link ."'"
.',"Search","width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");';
+ $functions[$m]['link'] =
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.addressbook&column='
. $attributes_values[$r]['name']);
+ $functions[$m]['action'] =
'Window1=window.open(link,"Search","width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");';
$m++;
}
@@ -746,17 +745,16 @@
}
}
- $lookup_link =
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.vendor&column='
. $attributes_values[$r]['name']);
-
$lookup_functions[$m]['name'] =
'lookup_'. $attributes_values[$r]['name'] .'()';
- $lookup_functions[$m]['action'] =
'Window1=window.open('."'" . $lookup_link ."'"
.',"Search","width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");';
+ $lookup_functions[$m]['link'] =
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.vendor&column='
. $attributes_values[$r]['name']);
+ $lookup_functions[$m]['action'] =
'Window1=window.open(link,"Search","width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");';
$m++;
}
if($attributes_values[$r]['datatype']=='R' ||
$attributes_values[$r]['datatype']=='CH' ||
$attributes_values[$r]['datatype']=='LB')
{
- $attributes_values[$r]['choice']
=
$this->soadmin_location->read_attrib_choice($type_id,$attributes_values[$r]['id']);
+ $attributes_values[$r]['choice'] =
$this->soadmin_location->read_attrib_choice($type_id,$attributes_values[$r]['id']);
$input_type=$input_type_array[$attributes_values[$r]['datatype']];
if($attributes_values[$r]['datatype']=='CH')
@@ -782,14 +780,14 @@
$attributes_values[$r]['counter'] = $r;
$attributes_values[$r]['type_id'] =
$type_id;
$r++;
-//FIX !!!
+
for ($j=0;$j<count($functions);$j++)
{
- $lookup_functions .= 'function ' .
$functions[$j]['name'] ."\r\n";
+ $lookup_functions .= 'function ' .
$functions[$j]['name'] ."\n";
$lookup_functions .= '{'."\r\n";
- $lookup_functions .= 'var link = ' .
$functions[$i]['link'] ."\r\n";
- $lookup_functions .= 'link =
link.split("&").join("&")' ."\r\n";
- $lookup_functions .=
$functions[$j]['action'] ."\r\n";
+ $lookup_functions .= "var link = '" .
$functions[$i]['link'] ."';" . "\n";
+ $lookup_functions .= 'link =
link.split("amp;").join("");' ."\n";
+ $lookup_functions .=
$functions[$j]['action'] ."\n";
$lookup_functions .= '}'."\r\n";
}
}
@@ -1015,7 +1013,7 @@
'done_action' =>
$GLOBALS['phpgw']->link('/index.php',$link_data),
'delete_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilocation.delete&location_code='
. $location_code . '&type_id=' . $type_id),
'lang_confirm_msg' => lang('do you
really want to delete this entry'),
- 'lang_yes' =>
lang('yes'),
+ 'lang_yes' => lang('yes'),
'lang_yes_statustext' => lang('Delete the
entry'),
'lang_no_statustext' => lang('Back to the
list'),
'lang_no' =>
lang('no')
@@ -1151,14 +1149,15 @@
while (is_array($custom_fields) && list(,$custom) =
each($custom_fields))
{
- $location_datatype[]= array('input_name'
=> $custom['column_name'],
- 'datatype' =>
$custom['datatype']
+ $location_datatype[]= array(
+ 'input_name' =>
$custom['column_name'],
+ 'datatype' => $custom['datatype']
);
$attributes_values[$r]['id'] = $custom['id'];
$attributes_values[$r]['input_text'] =
$custom['input_text'];
$attributes_values[$r]['statustext'] =
$custom['statustext'];
- $attributes_values[$r]['datatype']
= $custom['datatype'];
+ $attributes_values[$r]['datatype'] =
$custom['datatype'];
$attributes_values[$r]['name'] =
$custom['column_name'];
$attributes_values[$r]['input_name'] =
$custom['column_name'];
$attributes_values[$r]['value']
= $values[$custom['column_name']];
@@ -1175,10 +1174,9 @@
$attributes_values[$r]['contact_name'] = $contact_data[0]['n_family'] . ', ' .
$contact_data[0]['n_given'];
}
- $lookup_link =
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.addressbook&column='
. $attributes_values[$r]['name']);
-
$functions[$m]['name'] = 'lookup_'.
$attributes_values[$r]['name'] .'()';
- $functions[$m]['action'] =
'Window1=window.open('."'" . $lookup_link ."'"
.',"Search","width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");';
+ $functions[$m]['link'] =
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.addressbook&column='
. $attributes_values[$r]['name']);
+ $functions[$m]['action'] =
'Window1=window.open(link,"Search","width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");';
$m++;
}
@@ -1198,10 +1196,10 @@
}
}
- $lookup_link =
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.vendor&column='
. $attributes_values[$r]['name']);
$lookup_functions[$m]['name'] =
'lookup_'. $attributes_values[$r]['name'] .'()';
- $lookup_functions[$m]['action'] =
'Window1=window.open('."'" . $lookup_link ."'"
.',"Search","width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");';
+ $lookup_functions[$m]['link'] =
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.vendor&column='
. $attributes_values[$r]['name']);
+ $lookup_functions[$m]['action'] =
'Window1=window.open(link,"Search","width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");';
$m++;
}
Index: property/templates/base/location.xsl
diff -u property/templates/base/location.xsl:1.7
property/templates/base/location.xsl:1.8
--- property/templates/base/location.xsl:1.7 Mon Apr 10 09:39:13 2006
+++ property/templates/base/location.xsl Tue Apr 11 15:09:01 2006
@@ -1,4 +1,4 @@
-<!-- $Id: location.xsl,v 1.7 2006/04/10 09:39:13 sigurdne Exp $ -->
+<!-- $Id: location.xsl,v 1.8 2006/04/11 15:09:01 sigurdne Exp $ -->
<xsl:template name="app_data">
<xsl:choose>
@@ -26,7 +26,7 @@
<xsl:template match="list">
<xsl:choose>
<xsl:when test="//lookup=1">
- <script LANGUAGE="JavaScript">
+ <script type="text/javascript">
function Exchange_values(thisform)
{
<xsl:value-of
select="function_exchange_values"/>
@@ -227,15 +227,19 @@
<!-- add / edit -->
<xsl:template match="edit">
- <script language="JavaScript">
+ <script type="text/javascript">
self.name="first_Window";
function street_lookup()
{
- Window1=window.open('<xsl:value-of
select="street_link"/>',"Search","width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");
+ var link = '<xsl:value-of
select="street_link"/>';
+ link = link.split("amp;").join("");
+
Window1=window.open(link,"Search","width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");
}
function tenant_lookup()
{
- Window1=window.open('<xsl:value-of
select="tenant_link"/>',"Search","width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");
+ var link = '<xsl:value-of
select="tenant_link"/>';
+ link = link.split("amp;").join("");
+
Window1=window.open(link,"Search","width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");
}
</script>
Index: property/templates/base/location_form.xsl
diff -u property/templates/base/location_form.xsl:1.1
property/templates/base/location_form.xsl:1.2
--- property/templates/base/location_form.xsl:1.1 Mon Jan 17 10:03:18 2005
+++ property/templates/base/location_form.xsl Tue Apr 11 15:09:01 2006
@@ -1,11 +1,11 @@
-<!-- $Id: location_form.xsl,v 1.1 2005/01/17 10:03:18 sigurdne Exp $ -->
+<!-- $Id: location_form.xsl,v 1.2 2006/04/11 15:09:01 sigurdne Exp $ -->
<xsl:template name="location_form">
<xsl:apply-templates select="location_data"/>
</xsl:template>
<xsl:template match="location_data">
- <script language="JavaScript">
+ <script type="text/javascript">
self.name="first_Window";
<xsl:value-of select="lookup_functions"/>
</script>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] property inc/class.bolocation.inc.php inc/class...,
Sigurd Nes <=