fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [9974]


From: Torstein
Subject: [Fmsystem-commits] [9974]
Date: Thu, 06 Sep 2012 10:35:16 +0000

Revision: 9974
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9974
Author:   vator
Date:     2012-09-06 10:35:16 +0000 (Thu, 06 Sep 2012)
Log Message:
-----------


Modified Paths:
--------------
    trunk/controller/js/controller/ajax.js
    trunk/controller/templates/base/check_list/case_row.xsl

Modified: trunk/controller/js/controller/ajax.js
===================================================================
--- trunk/controller/js/controller/ajax.js      2012-09-05 13:36:53 UTC (rev 
9973)
+++ trunk/controller/js/controller/ajax.js      2012-09-06 10:35:16 UTC (rev 
9974)
@@ -641,11 +641,12 @@
                                  var jsonObj = jQuery.parseJSON(data);
                 
                                  if(jsonObj.status == "saved"){
-                                       var type = 
$(checkItemRow).find(".control_item_type").text();
+                                       var type = 
$(thisForm).find("input[name=control_item_type]").val();
                                        
                                        if(type == "control_item_type_1"){
                                                
-                                       }else if(type == "control_item_type_2"){
+                                       }
+                                       else if(type == "control_item_type_2"){
                                                var case_status = 
$(thisForm).find("select[name='case_status'] option:selected").text();
                                                
                                                $(clickRow).find(".case_info 
.case_status").empty().text( case_status );
@@ -653,6 +654,14 @@
                                                var measurement_text = 
$(thisForm).find("input[name='measurement']").val();
                                                $(clickRow).find(".case_info 
.measurement").text(measurement_text);
                                        }
+                                       else if(type == "control_item_type_3" | 
type == "control_item_type_4"){
+                                               var case_status = 
$(thisForm).find("select[name='case_status'] option:selected").text();
+                                               
+                                               $(clickRow).find(".case_info 
.case_status").empty().text( case_status );
+                                               
+                                               var measurement_text = 
$(thisForm).find("select[name='measurement'] option:selected").val();
+                                               $(clickRow).find(".case_info 
.measurement").text(measurement_text);
+                                       }
                                        
                                        // Text from forms textarea
                                        var desc_text = 
$(thisForm).find("textarea").val();

Modified: trunk/controller/templates/base/check_list/case_row.xsl
===================================================================
--- trunk/controller/templates/base/check_list/case_row.xsl     2012-09-05 
13:36:53 UTC (rev 9973)
+++ trunk/controller/templates/base/check_list/case_row.xsl     2012-09-06 
10:35:16 UTC (rev 9974)
@@ -104,8 +104,14 @@
                     <xsl:value-of select="id"/>
                     <xsl:text>&amp;check_list_id=</xsl:text>
                     <xsl:value-of select="//check_list/id"/>
+                    <xsl:text>&amp;control_item_type=</xsl:text>
+                    <xsl:value-of select="//control_item/type" />
                     <xsl:text>&amp;phpgw_return_as=json</xsl:text>
                   </xsl:attribute>
+                  <input type="hidden" name="control_item_type">
+                   <xsl:attribute name="value"><xsl:value-of 
select="//control_item/type" /></xsl:attribute>
+                       </input>
+                       
                   <xsl:if test="$control_item_type = 'control_item_type_2' or 
$control_item_type = 'control_item_type_3' or $control_item_type = 
'control_item_type_4'">
                     <!--  STATUS -->
                     <div class="row first">
@@ -143,7 +149,7 @@
                         <!--  MEASUREMENT -->
                         <div class="row">
                           <label class="comment">Velg verdi fra liste</label>
-                          <select name="option_value">
+                          <select name="measurement">
                             <xsl:for-each 
select="../control_item/options_array">
                               <option>
                                 <xsl:attribute name="value">




reply via email to

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