[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [6905] property: default district on entity lookup
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [6905] property: default district on entity lookup |
Date: |
Wed, 02 Feb 2011 07:58:38 +0000 |
Revision: 6905
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6905
Author: sigurdne
Date: 2011-02-02 07:58:37 +0000 (Wed, 02 Feb 2011)
Log Message:
-----------
property: default district on entity lookup
Modified Paths:
--------------
trunk/property/inc/class.uilookup.inc.php
trunk/property/js/yahoo/lookup.entity.index.js
Modified: trunk/property/inc/class.uilookup.inc.php
===================================================================
--- trunk/property/inc/class.uilookup.inc.php 2011-02-01 13:48:08 UTC (rev
6904)
+++ trunk/property/inc/class.uilookup.inc.php 2011-02-02 07:58:37 UTC (rev
6905)
@@ -1798,6 +1798,15 @@
$this->location_code =
$boentity->location_code;
$this->criteria_id =
$boentity->criteria_id;
+ $second_display = phpgw::get_var('second_display',
'bool');
+ $default_district =
(isset($GLOBALS['phpgw_info']['user']['preferences']['property']['default_district'])?$GLOBALS['phpgw_info']['user']['preferences']['property']['default_district']:'');
+
+ if ($default_district && !$second_display &&
!$this->district_id)
+ {
+ $this->bo->district_id = $default_district;
+ $this->district_id =
$default_district;
+ }
+
if( phpgw::get_var('phpgw_return_as') != 'json' )
{
@@ -1816,6 +1825,7 @@
$datatable['config']['allow_allrows'] = true;
$datatable['config']['base_java_url'] =
"menuaction:'property.uilookup.entity',"
+ ."second_display:1,"
."entity_id:'{$this->entity_id}',"
."cat_id:'{$this->cat_id}',"
."district_id:'{$this->district_id}',"
@@ -1844,6 +1854,7 @@
array
(
'menuaction'
=> 'property.uilookup.entity',
+
'second_display' => $second_display,
'entity_id'
=> $this->entity_id,
'cat_id'
=> $this->cat_id,
'district_id'
=> $this->district_id,
Modified: trunk/property/js/yahoo/lookup.entity.index.js
===================================================================
--- trunk/property/js/yahoo/lookup.entity.index.js 2011-02-01 13:48:08 UTC
(rev 6904)
+++ trunk/property/js/yahoo/lookup.entity.index.js 2011-02-02 07:58:37 UTC
(rev 6905)
@@ -6,7 +6,7 @@
var oMenuButton_0, oMenuButton_1, oMenuButton_2;
var selectsButtons = [
{order:0,
var_URL:'cat_id',name:'btn_cat_id',style:'districtbutton',dependiente:''},
- {order:1, var_URL:'district_id',name:'btn_district_id',
style:'districtbutton', dependiente:''},
+ {order:1, var_URL:'district_id',name:'btn_district_id',
style:'districtbutton', dependiente:''},
{order:2, var_URL:'criteria_id',
name:'btn_criteria_id',style:'criteriabutton',dependiente:''}
]
@@ -32,6 +32,13 @@
{
if(flag_particular_setting=='init')
{
+ //district
+ index =
locate_in_array_options(1,"value",path_values.district_id);
+ if(index)
+ {
+ oMenuButton_1.set("label", ("<em>" +
array_options[1][index][1] + "</em>"));
+ }
+
oMenuButton_0.focus();
}
else if(flag_particular_setting=='update')
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [6905] property: default district on entity lookup,
Sigurd Nes <=