fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [10770] Removed check on status must be done for chec


From: Torstein
Subject: [Fmsystem-commits] [10770] Removed check on status must be done for checklist
Date: Thu, 07 Feb 2013 14:58:02 +0000

Revision: 10770
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10770
Author:   vator
Date:     2013-02-07 14:58:00 +0000 (Thu, 07 Feb 2013)
Log Message:
-----------
Removed check on status must be done for checklist

Modified Paths:
--------------
    trunk/controller/inc/class.uicheck_list.inc.php
    trunk/controller/js/controller/ajax.js

Modified: trunk/controller/inc/class.uicheck_list.inc.php
===================================================================
--- trunk/controller/inc/class.uicheck_list.inc.php     2013-02-07 10:28:07 UTC 
(rev 10769)
+++ trunk/controller/inc/class.uicheck_list.inc.php     2013-02-07 14:58:00 UTC 
(rev 10770)
@@ -261,8 +261,8 @@
                        (
                                'location_array'                                
        => $location_array,
                                'component_array'                               
        => $component_array,
-                               'control'                                       
                                => $control->toArray(),
-                               'check_list'                                    
                => $check_list->toArray(),
+                               'control'                                       
                                => $control,
+                               'check_list'                                    
                => $check_list,
                                'type'                                          
                                => $type,
                                'current_year'                                  
        => $year,
                                'current_month_nr'                              
=> $month_nr,
@@ -272,10 +272,10 @@
                        
                        $GLOBALS['phpgw']->jqcal->add_listener('planned_date');
                        
$GLOBALS['phpgw']->jqcal->add_listener('completed_date');
-
+      
                        self::add_javascript('controller', 'controller', 
'custom_ui.js');
                        self::add_javascript('controller', 'controller', 
'ajax.js');
-                       self::render_template_xsl('check_list/add_check_list', 
$data);
+                       self::render_template_xsl( 
array('check_list/add_check_list', 'check_list/nav_control_plan'), $data );
                }
                
                /**
@@ -327,8 +327,8 @@
                        
                        $data = array
                        (
-                               'control'                                       
                        => $control->toArray(),
-                               'check_list'                                    
                => $check_list->toArray(),
+                               'control'                                       
                        => $control,
+                               'check_list'                                    
                => $check_list,
                                'location_array'                                
        => $location_array,
                                'component_array'                               
        => $component_array,
                                'type'                                          
                                => $type,
@@ -414,7 +414,7 @@
 
                        if( $check_list->validate() )
                        {
-                                       $check_list_id  = 
$this->so->store($check_list);
+                               $check_list_id  = $this->so->store($check_list);
                                
                                if( $check_list_id > 0 )
                                {
@@ -476,8 +476,8 @@
                                                        
                        $data = array
                        (
-                               'control'                                       
                        => $control->toArray(),
-                               'check_list'                                    
                => $check_list->toArray(),
+                               'control'                                       
                        => $control,
+                               'check_list'                                    
                => $check_list,
                                'location_array'                                
        => $location_array,
                                'component_array'                               
        => $component_array,
                                'type'                                          
                                => $type,
@@ -519,7 +519,7 @@
                        $data = array
                        (
                                'saved_groups_with_items_array' => 
$saved_groups_with_items_array,
-                               'check_list'                                    
=> $check_list->toArray()
+                               'check_list'                                    
                                        => $check_list
                        );
                        
                        
self::render_template_xsl('check_list/print_check_list', $data);
@@ -563,8 +563,8 @@
                        
                        $data = array
                        (
-                               'control'                                       
                        => $control->toArray(),
-                               'check_list'                                    
                => $check_list->toArray(),
+                               'control'                                       
                        => $control,
+                               'check_list'                                    
                => $check_list,
                                'location_array'                                
        => $location_array,
                                'component_array'                               
        => $component_array,
                                'type'                                          
                                => $type,
@@ -587,7 +587,7 @@
                        
                        $data = array
                        (
-                               'control'                                       
        => $control->toArray(),
+                               'control'       => $control,
                        );
                        
                        
self::render_template_xsl('check_list/view_control_details', $data);
@@ -689,8 +689,8 @@
                                                        
                        $data = array
                        (
-                               'control'                                       
                                                                => 
$control->toArray(),
-                               'check_list'                                    
                                                        => 
$check_list->toArray(),
+                               'control'                                       
                                                                => $control,
+                               'check_list'                                    
                                                        => $check_list,
                                'location_array'                                
                                                => $location_array,
                                'component_array'                               
                                                => $component_array,
                                'control_groups_with_items_array'       => 
$control_groups_with_items_array,
@@ -727,7 +727,7 @@
                        $data = array
                        (
                                'open_check_items_and_cases'    => 
$open_check_items_and_cases,
-                               'check_list'                                    
                                => $check_list->toArray()
+                               'check_list'                                    
                                => $check_list
                        );
                        
                        self::render_template_xsl( 
array('check_list/cases_tab_menu', 'check_list/view_open_cases', 
'check_list/case_row'), $data );                    
@@ -744,7 +744,7 @@
                        $data = array
                        (
                                'closed_check_items_and_cases'                  
        => $closed_check_items_and_cases,
-                               'check_list'                                    
                                                                => 
$check_list->toArray()
+                               'check_list'                                    
                                                                => $check_list
                        );
                        
                        self::render_template_xsl( 
array('check_list/cases_tab_menu', 'check_list/view_closed_cases'), $data );
@@ -773,7 +773,7 @@
                        $data = array
                        (
                                'saved_groups_with_items_array' => 
$saved_groups_with_items_array,
-                               'check_list'                                    
=> $check_list->toArray()
+                               'check_list'                                    
=> $check_list
                        );
                        
                        
self::render_template_xsl('check_list/view_control_items', $data);

Modified: trunk/controller/js/controller/ajax.js
===================================================================
--- trunk/controller/js/controller/ajax.js      2013-02-07 10:28:07 UTC (rev 
10769)
+++ trunk/controller/js/controller/ajax.js      2013-02-07 14:58:00 UTC (rev 
10770)
@@ -1,11 +1,5 @@
 $(document).ready(function(){
-
        
-       function ajaxRequest(request, callback_func, elem){
-               
-               
-       }
-       
        $("#curtain").click(function() {
                $("#curtain").hide();
                $("#popupBox").hide();
@@ -536,25 +530,18 @@
                
                $(thisForm).find(".input_error_msg").remove();
                
-               // Checks that COMPLETE DATE is set if status is set to DONE 
+               // Is COMPLETED DATE assigned when STATUS is done 
                if(statusFieldVal == 1 && completedDateVal == ''){
                        e.preventDefault();
                        // Displays error message above completed date
                        $(completedDateRow).before("<div 
class='input_error_msg'>Vennligst angi når kontrollen ble utført</div>");
                }
+    // Is COMPLETED DATE assigned when STATUS is not done
                else if(statusFieldVal == 0 && completedDateVal != ''){
                        e.preventDefault();
                        // Displays error message above completed date
                        $(statusRow).before("<div class='input_error_msg'>Du 
har angitt utførtdato, men status er Ikke utført. Vennligst endre status til 
utført</div>");
                }
-               else if(statusFieldVal == 0 & plannedDateVal == ''){
-                       e.preventDefault();
-                       // Displays error message above planned date
-                       if( 
!$(plannedDateRow).prev().hasClass("input_error_msg") )
-                       {
-                         $(plannedDateRow).before("<div 
class='input_error_msg'>Vennligst endre status for kontroll eller angi 
planlagtdato</div>");   
-                       }
-               }               
        });     
        
        // Display submit button on click
@@ -605,13 +592,14 @@
        });
        
        // Display submit button on click
-       $("#frm_update_check_list").live("click", function(e){
+       /*
+  $("#frm_update_check_list").live("click", function(e){
                var thisForm = $(this);
                var submitBnt = $(thisForm).find("input[type='submit']");
                $(submitBnt).removeClass("not_active");
        });
+       */
        
-       
        //=======================================  CASE  
======================================
        
        // REGISTER CASE




reply via email to

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