[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [11220] link entity to entity
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [11220] link entity to entity |
Date: |
Sun, 30 Jun 2013 17:17:39 +0000 |
Revision: 11220
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11220
Author: sigurdne
Date: 2013-06-30 17:17:37 +0000 (Sun, 30 Jun 2013)
Log Message:
-----------
link entity to entity
Modified Paths:
--------------
trunk/property/inc/class.bolocation.inc.php
trunk/property/inc/class.uientity.inc.php
trunk/property/inc/class.uilocation.inc.php
trunk/property/inc/class.uitts.inc.php
trunk/property/templates/base/entity.xsl
trunk/property/templates/base/location_form.xsl
trunk/property/templates/base/tts.xsl
Modified: trunk/property/inc/class.bolocation.inc.php
===================================================================
--- trunk/property/inc/class.bolocation.inc.php 2013-06-30 16:21:52 UTC (rev
11219)
+++ trunk/property/inc/class.bolocation.inc.php 2013-06-30 17:17:37 UTC (rev
11220)
@@ -564,10 +564,11 @@
$location['location'][$i]['statustext']
= lang('click this link to select') .'
' . $entity['name'];
$location['location'][$i]['extra'][0]['input_name'] =
'entity_cat_name_' . $entity['id'];
- $input_name_entity[]
=
$location['location'][$i]['extra'][0]['input_name'];
+ $input_name_entity[]
=
$location['location'][$i]['extra'][0]['input_name'];
$location['location'][$i]['extra'][0]['input_type'] =
'text';
$location['location'][$i]['extra'][0]['size'] = 30;
$location['location'][$i]['extra'][0]['lookup_function_call'] =
'lookup_entity_' . $entity['id'] .'()';
+
$location['location'][$i]['extra'][0]['is_entity'] = true;
if (is_array($data['entity_data']))
{
Modified: trunk/property/inc/class.uientity.inc.php
===================================================================
--- trunk/property/inc/class.uientity.inc.php 2013-06-30 16:21:52 UTC (rev
11219)
+++ trunk/property/inc/class.uientity.inc.php 2013-06-30 17:17:37 UTC (rev
11220)
@@ -2316,9 +2316,20 @@
$property_js =
"/phpgwapi/inc/combine.php?cachedir={$cachedir}&type=javascript&files=" .
str_replace('/', '--', ltrim($property_js,'/'));
}
+ $function_blank_entity_values = '';
+ $input_name_entity =
phpgwapi_cache::session_get('property', 'lookup_fields_entity');
+ if($input_name_entity && is_array($input_name_entity))
+ {
+ for ($k=0;$k<count($input_name_entity);$k++)
+ {
+ $function_blank_entity_values .=
'document.getElementsByName("'.$input_name_entity[$k].'")[0].value = "";'
."\r\n";
+ }
+ }
+
$data = array
(
- 'property_js'
=> json_encode($GLOBALS['phpgw_info']['server']['webserver_url'] .
$property_js),
+ 'function_blank_entity_values' =>
$function_blank_entity_values,
+ 'property_js'
=> json_encode($GLOBALS['phpgw_info']['server']['webserver_url'] .
$property_js),
'datatable'
=> $datavalues,
'myColumnDefs'
=> $myColumnDefs,
'enable_bulk'
=> $category['enable_bulk'],
Modified: trunk/property/inc/class.uilocation.inc.php
===================================================================
--- trunk/property/inc/class.uilocation.inc.php 2013-06-30 16:21:52 UTC (rev
11219)
+++ trunk/property/inc/class.uilocation.inc.php 2013-06-30 17:17:37 UTC (rev
11220)
@@ -880,7 +880,6 @@
if($lookup)
{
$input_name =
phpgwapi_cache::session_get('property', 'lookup_fields');
-
$function_exchange_values = '';
if(is_array($input_name))
@@ -1663,6 +1662,7 @@
}
+
$datatable['json_data'] = json_encode($json);
//-------------------- JSON CODE ----------------------
Modified: trunk/property/inc/class.uitts.inc.php
===================================================================
--- trunk/property/inc/class.uitts.inc.php 2013-06-30 16:21:52 UTC (rev
11219)
+++ trunk/property/inc/class.uitts.inc.php 2013-06-30 17:17:37 UTC (rev
11220)
@@ -1991,8 +1991,19 @@
$GLOBALS['phpgw']->jqcal->add_listener('values_finnish_date');
}
+ $function_blank_entity_values = '';
+ $input_name_entity =
phpgwapi_cache::session_get('property', 'lookup_fields_entity');
+ if($input_name_entity && is_array($input_name_entity))
+ {
+ for ($k=0;$k<count($input_name_entity);$k++)
+ {
+ $function_blank_entity_values .=
'document.getElementsByName("'.$input_name_entity[$k].'")[0].value = "";'
."\r\n";
+ }
+ }
+
$data = array
- (
+ (
+ 'function_blank_entity_values' =>
$function_blank_entity_values,
'custom_attributes'
=> array('attributes' => $values['attributes']),
'lookup_functions'
=> isset($values['lookup_functions'])?$values['lookup_functions']:'',
'contact_data'
=> $contact_data,
Modified: trunk/property/templates/base/entity.xsl
===================================================================
--- trunk/property/templates/base/entity.xsl 2013-06-30 16:21:52 UTC (rev
11219)
+++ trunk/property/templates/base/entity.xsl 2013-06-30 17:17:37 UTC (rev
11220)
@@ -405,6 +405,11 @@
document.form.active_tab.value = active_tab;
}
+ function blank_entity_values()
+ {
+ <xsl:value-of
select="function_blank_entity_values"/>
+ }
+
var property_js = <xsl:value-of select="property_js"/>;
var base_java_url = <xsl:value-of
select="base_java_url"/>;
var datatable = new Array();
Modified: trunk/property/templates/base/location_form.xsl
===================================================================
--- trunk/property/templates/base/location_form.xsl 2013-06-30 16:21:52 UTC
(rev 11219)
+++ trunk/property/templates/base/location_form.xsl 2013-06-30 17:17:37 UTC
(rev 11220)
@@ -4,7 +4,7 @@
</xsl:template>
<!-- New template-->
- <xsl:template match="location_data">
+ <xsl:template match="location_data" xmlns:php="http://php.net/xsl">
<xsl:for-each select="location">
<tr>
<td class="th_text" width="{with}"
align="{align}" title="{statustext}">
@@ -55,6 +55,18 @@
</input>
</xsl:otherwise>
</xsl:choose>
+ <xsl:choose>
+ <xsl:when
test="is_entity=1">
+ <input
type="checkbox" name="clear_{input_name}_box" onClick="blank_entity_values()">
+
<xsl:attribute name="title">
+
<xsl:value-of select="php:function('lang', 'delete')"/>
+
</xsl:attribute>
+
<xsl:attribute name="readonly">
+
<xsl:text>readonly</xsl:text>
+
</xsl:attribute>
+ </input>
+ </xsl:when>
+ </xsl:choose>
</xsl:for-each>
</td>
</tr>
Modified: trunk/property/templates/base/tts.xsl
===================================================================
--- trunk/property/templates/base/tts.xsl 2013-06-30 16:21:52 UTC (rev
11219)
+++ trunk/property/templates/base/tts.xsl 2013-06-30 17:17:37 UTC (rev
11220)
@@ -22,6 +22,12 @@
<script type="text/javascript">
self.name="first_Window";
<xsl:value-of select="lookup_functions"/>
+
+ function blank_entity_values()
+ {
+ <xsl:value-of
select="function_blank_entity_values"/>
+ }
+
</script>
<xsl:choose>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [11220] link entity to entity,
Sigurd Nes <=