[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [11887] property: moret on department relation
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [11887] property: moret on department relation |
Date: |
Fri, 04 Apr 2014 19:01:47 +0000 |
Revision: 11887
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11887
Author: sigurdne
Date: 2014-04-04 19:01:47 +0000 (Fri, 04 Apr 2014)
Log Message:
-----------
property: moret on department relation
Modified Paths:
--------------
trunk/property/inc/class.bogeneric.inc.php
trunk/property/inc/class.uientity.inc.php
trunk/property/templates/base/entity.xsl
trunk/rental/inc/class.bofellesdata.inc.php
Modified: trunk/property/inc/class.bogeneric.inc.php
===================================================================
--- trunk/property/inc/class.bogeneric.inc.php 2014-04-04 12:32:50 UTC (rev
11886)
+++ trunk/property/inc/class.bogeneric.inc.php 2014-04-04 19:01:47 UTC (rev
11887)
@@ -43,6 +43,10 @@
var $location_info = array();
var $appname;
var $allrows;
+ var $public_functions = array
+ (
+ 'get_autocomplete' => true
+ );
function __construct($session=false)
{
@@ -319,4 +323,18 @@
return $history_type;
}
+ function get_autocomplete()
+ {
+ $this->get_location_info();
+ $values = $this->read();
+
+ foreach($values as &$entry)
+ {
+ if($entry['parent_id'])
+ {
+ $entry['name'] .=
"::{$entry['parent_id']}";
+ }
+ }
+ return array('ResultSet'=> array('Result'=>$values));
+ }
}
Modified: trunk/property/inc/class.uientity.inc.php
===================================================================
--- trunk/property/inc/class.uientity.inc.php 2014-04-04 12:32:50 UTC (rev
11886)
+++ trunk/property/inc/class.uientity.inc.php 2014-04-04 19:01:47 UTC (rev
11887)
@@ -2378,13 +2378,30 @@
$property_js =
"/phpgwapi/inc/combine.php?cachedir={$cachedir}&type=javascript&files=" .
str_replace('/', '--', ltrim($property_js,'/'));
}
+ if($category['department'] && $mode == 'edit')
+ {
+ $_autocomplete = <<<JS
+ YAHOO.util.Event.addListener(window,
"load", function()
+ {
+ var oArgs =
{menuaction:'property.bogeneric.get_autocomplete', type:'department'};
+ var strURL =
phpGWLink('index.php', oArgs, true);
+
+
YAHOO.portico.autocompleteHelper(strURL,
+ 'department_name', 'department_id',
'department_container');
+
+ });
+JS;
+ $GLOBALS['phpgw']->js->add_code('',
$_autocomplete);
+ }
+
$data = array
(
'property_js'
=> json_encode($GLOBALS['phpgw_info']['server']['webserver_url'] .
$property_js),
'datatable'
=> $datavalues,
'myColumnDefs'
=> $myColumnDefs,
'enable_bulk'
=> $category['enable_bulk'],
+ 'department'
=> $category['department'],
'value_location_id'
=> $GLOBALS['phpgw']->locations->get_id($this->type_app[$this->type],
$this->acl_location),
'link_pdf'
=> $GLOBALS['phpgw']->link('/index.php',$pdf_data),
'start_project'
=> $category['start_project'],
Modified: trunk/property/templates/base/entity.xsl
===================================================================
--- trunk/property/templates/base/entity.xsl 2014-04-04 12:32:50 UTC (rev
11886)
+++ trunk/property/templates/base/entity.xsl 2014-04-04 19:01:47 UTC (rev
11887)
@@ -585,6 +585,32 @@
<table>
<xsl:choose>
<xsl:when test="mode='edit'">
+
<xsl:choose>
+
<xsl:when test="department='1'">
+
<tr>
+
<td>
+
<xsl:value-of
select="php:function('lang', 'department')"/>
+
</td>
+
<td>
+
<div class="autocomplete">
+
<input id="department_id"
name="department_id" type="hidden" value="department_id">
+
</input>
+
<input id="department_name"
name="department_name" type="text" value="{department_name}" size='60'>
+
<xsl:choose>
+
<xsl:when
test="disabled!=''">
+
<xsl:attribute name="disabled">
+
<xsl:text>disabled</xsl:text>
+
</xsl:attribute>
+
</xsl:when>
+
</xsl:choose>
+
</input>
+
<div id="department_container"/>
+
</div>
+
</td>
+
</tr>
+
</xsl:when>
+
</xsl:choose>
+
<xsl:call-template name="location_form"/>
</xsl:when>
<xsl:otherwise>
Modified: trunk/rental/inc/class.bofellesdata.inc.php
===================================================================
--- trunk/rental/inc/class.bofellesdata.inc.php 2014-04-04 12:32:50 UTC (rev
11886)
+++ trunk/rental/inc/class.bofellesdata.inc.php 2014-04-04 19:01:47 UTC (rev
11887)
@@ -307,7 +307,7 @@
{
$sql = strtolower($sql);
}
- $db->query($sql,__LINE__,__FILE__);
+ $db->limit_query($sql,0,__LINE__,__FILE__);
$org_enhet_field = $db->Type == 'postgres' ?
'org_enhet_id' : 'ORG_ENHET_ID';
$name_field = $db->Type ==
'postgres' ? 'org_navn' : 'ORG_NAVN';
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [11887] property: moret on department relation,
Sigurd Nes <=