fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [10904] Deleted function view_cases_for_check_list


From: Torstein
Subject: [Fmsystem-commits] [10904] Deleted function view_cases_for_check_list
Date: Sun, 17 Feb 2013 18:49:41 +0000

Revision: 10904
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10904
Author:   vator
Date:     2013-02-17 18:49:40 +0000 (Sun, 17 Feb 2013)
Log Message:
-----------
Deleted function view_cases_for_check_list

Modified Paths:
--------------
    trunk/controller/inc/class.uicase.inc.php
    trunk/controller/js/controller/case.js
    
trunk/controller/templates/base/check_list/fragments/select_buildings_on_property.xsl
    trunk/controller/templates/base/css/base.css

Modified: trunk/controller/inc/class.uicase.inc.php
===================================================================
--- trunk/controller/inc/class.uicase.inc.php   2013-02-17 18:17:30 UTC (rev 
10903)
+++ trunk/controller/inc/class.uicase.inc.php   2013-02-17 18:49:40 UTC (rev 
10904)
@@ -616,14 +616,13 @@
     function view_open_cases()
                {
                        $check_list_id = phpgw::get_var('check_list_id');
-      $location_code = phpgw::get_var('location_code');
+      $case_location_code = phpgw::get_var('location_code');
                        
                        $check_list = 
$this->so_check_list->get_single($check_list_id);
                        $control = 
$this->so_control->get_single($check_list->get_control_id());                   
     
 
-      $location_code = $check_list->get_location_code();
+      $check_list_location_code = $check_list->get_location_code();
       
-
                        $component_id = $check_list->get_component_id();
 
                        if($component_id > 0)
@@ -645,24 +644,28 @@
                        else
                        {
                                
-                               $location_array = 
execMethod('property.bolocation.read_single', array('location_code' => 
$location_code));
+                               $location_array = 
execMethod('property.bolocation.read_single', array('location_code' => 
$check_list_location_code));
                                $type = 'location';
                        }
       
       
-      $level = $this->location_finder->get_location_level($location_code);
+      $level = 
$this->location_finder->get_location_level($check_list_location_code);
                        $year = date("Y", $check_list->get_deadline());
                        $month = date("n", $check_list->get_deadline());
                                                        
       $user_role = true;
 
                        // Fetches buildings on property
-                       $buildings_on_property = 
$this->location_finder->get_buildings_on_property($user_role, $location_code, 
$level);
+                       $buildings_on_property = 
$this->location_finder->get_buildings_on_property($user_role, 
$check_list_location_code, $level);
       
       if( count($buildings_on_property) > 0 )
       {
-        $building_location_code = $buildings_on_property[0]['id'];
-        $open_check_items_and_cases = 
$this->so_check_item->get_check_items_with_cases($check_list_id, $type = null, 
'open_or_waiting', null, $building_location_code);
+        if($case_location_code == "")
+        {
+          $case_location_code = $buildings_on_property[0]['id'];
+        }
+        
+        $open_check_items_and_cases = 
$this->so_check_item->get_check_items_with_cases($check_list_id, $type = null, 
'open_or_waiting', null, $case_location_code);
       }
       
                        foreach($open_check_items_and_cases as $key => 
$check_item)
@@ -682,7 +685,7 @@
                                'component_array'                               
                        => $component_array,
                                'type'                                          
                                                => $type,
                                'location_level'                                
                        => $level,
-                               'building_location_code'                        
=> $building_location_code,
+                               'building_location_code'                        
=> $case_location_code,
                                'current_year'                                  
                        => $year,
                                'current_month_nr'                              
                => $month,
                                'open_check_items_and_cases'  => 
$open_check_items_and_cases,

Modified: trunk/controller/js/controller/case.js
===================================================================
--- trunk/controller/js/controller/case.js      2013-02-17 18:17:30 UTC (rev 
10903)
+++ trunk/controller/js/controller/case.js      2013-02-17 18:49:40 UTC (rev 
10904)
@@ -256,29 +256,15 @@
        });     
   
   $("#choose-building-on-property.view-cases").change(function () {
-                var location_code = $(this).val();
-                var thisForm = $(this).parents("form");
+     var location_code = $(this).val();
+                var thisForm = $(this).closest("form");
 
-                var period_type = 
$(thisForm).find("input[name='period_type']").val();
-                var year = $(thisForm).find("input[name='year']").val();
-                var month = $(thisForm).find("input[name='month']").val();
-                
-                if(location_code != "" & period_type == 'view_month')
-                {
-                        var oArgs = 
{menuaction:'controller.uicalendar.view_calendar_for_month'};
-                        var baseUrl = phpGWLink('index.php', oArgs, false);
-                        var requestUrl = baseUrl + "&location_code=" + 
location_code + "&year=" + year + "&month=" + month;
-                        
-                        window.location.href = requestUrl;
-                }
-                else if(location_code != "" & period_type == 'view_year')
-                {
-                        var oArgs = 
{menuaction:'controller.uicalendar.view_calendar_for_year'};
-                        var baseUrl = phpGWLink('index.php', oArgs, false);
-                        var requestUrl = baseUrl +  "&location_code=" + 
location_code + "&year=" + year;
-                        
-                        window.location.href = requestUrl;
-                }
+     var url = location.href;
+console.log(url);
+     
+                
$(thisForm).find("input[name='location_code']").val(location_code);
+     console.log(location_code);
+    $(thisForm).submit();
     });
   
 });

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-02-17 18:17:30 UTC (rev 10903)
+++ 
trunk/controller/templates/base/check_list/fragments/select_buildings_on_property.xsl
       2013-02-17 18:49:40 UTC (rev 10904)
@@ -1,7 +1,7 @@
 <!-- $Id: view_calendar_month.xsl 9200 2012-04-21 20:05:34Z vator $ -->
 <xsl:template name="select_buildings_on_property">
                
-  <form action="#">
+  <form action="#" method="GET" runat="server">
     <input type="hidden" name="location_code" value="" />
        
     <select id="choose-building-on-property" class="view-cases">

Modified: trunk/controller/templates/base/css/base.css
===================================================================
--- trunk/controller/templates/base/css/base.css        2013-02-17 18:17:30 UTC 
(rev 10903)
+++ trunk/controller/templates/base/css/base.css        2013-02-17 18:49:40 UTC 
(rev 10904)
@@ -1793,16 +1793,11 @@
 }
 
 li.check_item_case ul li .col_1 {
-    font-size: 15px;
-    font-weight: bold;
-    text-align: center;
-}
-
-li.check_item_case ul li .col_1 {
+  font-size: 13px;
+  font-weight: bold;
+  text-align: center;
   float: left;
   padding: 2em 0;
-  text-align: center;
-  vertical-align: middle;
   width: 5%;
 }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]