[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [11182] controller: more generic location level
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [11182] controller: more generic location level |
Date: |
Mon, 17 Jun 2013 09:08:17 +0000 |
Revision: 11182
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11182
Author: sigurdne
Date: 2013-06-17 09:08:17 +0000 (Mon, 17 Jun 2013)
Log Message:
-----------
controller: more generic location level
Modified Paths:
--------------
trunk/controller/inc/class.uicase.inc.php
trunk/controller/inc/helper/class.location_finder.inc.php
trunk/controller/js/controller/case.js
trunk/controller/templates/base/check_list/fragments/select_buildings_on_property.xsl
Modified: trunk/controller/inc/class.uicase.inc.php
===================================================================
--- trunk/controller/inc/class.uicase.inc.php 2013-06-17 08:30:21 UTC (rev
11181)
+++ trunk/controller/inc/class.uicase.inc.php 2013-06-17 09:08:17 UTC (rev
11182)
@@ -204,11 +204,6 @@
}
}
-
-//_debug_array($control_groups_with_items_array);
-//_debug_array($components_at_location);
-//die();
-
}
$level =
$this->location_finder->get_location_level($location_code);
@@ -223,7 +218,7 @@
{
$building['selected'] = $building['id'] ==
$case_location_code ? 1 : 0;
}
-//_debug_array($control_groups_with_items_array);
+
$data = array
(
'control'
=> $control,
Modified: trunk/controller/inc/helper/class.location_finder.inc.php
===================================================================
--- trunk/controller/inc/helper/class.location_finder.inc.php 2013-06-17
08:30:21 UTC (rev 11181)
+++ trunk/controller/inc/helper/class.location_finder.inc.php 2013-06-17
09:08:17 UTC (rev 11182)
@@ -49,9 +49,19 @@
return $locations;
}
- function get_buildings_on_property($user_role, $location_code, $level)
+ function get_buildings_on_property($user_role,
$parent_location_code, $level)
{
+ $children =
execMethod('property.solocation.get_children', $parent_location_code);
+
+ foreach ($children as &$entry)
+ {
+ $entry['id'] =
"{$parent_location_code}-{$entry['id']}";
+ }
+
+ return $children;
+
+/*
// Property level
if ($level == 1)
{
@@ -79,9 +89,11 @@
}
return $buildings_on_property;
+
+*/
}
- function get_building_location_code($location_code)
+ function get_building_location_code($location_code)
{
if( strlen( $location_code ) == 6 )
{
Modified: trunk/controller/js/controller/case.js
===================================================================
--- trunk/controller/js/controller/case.js 2013-06-17 08:30:21 UTC (rev
11181)
+++ trunk/controller/js/controller/case.js 2013-06-17 09:08:17 UTC (rev
11182)
@@ -300,7 +300,7 @@
{
if( $(thisInput).attr("type") == 'hidden' )
{
- $(formObj).prepend("<div class='input_error_msg'>Du må velge
bygg</div>");
+ $(formObj).prepend("<div class='input_error_msg'>Du må
spesifisere lokalisering</div>");
}else
{
$(thisInput).before("<div class='input_error_msg'>Du må fylle ut dette
feltet</div>");
Modified:
trunk/controller/templates/base/check_list/fragments/select_buildings_on_property.xsl
===================================================================
---
trunk/controller/templates/base/check_list/fragments/select_buildings_on_property.xsl
2013-06-17 08:30:21 UTC (rev 11181)
+++
trunk/controller/templates/base/check_list/fragments/select_buildings_on_property.xsl
2013-06-17 09:08:17 UTC (rev 11182)
@@ -1,7 +1,7 @@
<!-- $Id: view_calendar_month.xsl 9200 2012-04-21 20:05:34Z vator $ -->
<xsl:template name="select_buildings_on_property">
- <span style="display: block;font-size: 16px;margin-bottom: 8px;">Velg
hvilket bygg du vil registrere saken pa</span>
+ <span style="display: block;font-size: 16px;margin-bottom: 8px;">Spesifiser
lokalisering du vil registrere saken pa</span>
<select id="choose-building-on-property">
<xsl:choose>
<xsl:when test="cases_view = 'open_cases' or cases_view =
'closed_cases'">
@@ -12,7 +12,7 @@
</xsl:otherwise>
</xsl:choose>
- <option value="">Velg bygg</option>
+ <option value="">Velg lokalisering</option>
<xsl:for-each select="buildings_on_property">
<option>
<xsl:if test="selected = 1">
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [11182] controller: more generic location level,
Sigurd Nes <=