fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [16658] more on helpdesk


From: sigurdne
Subject: [Fmsystem-commits] [16658] more on helpdesk
Date: Sat, 29 Apr 2017 19:10:52 -0400 (EDT)

Revision: 16658
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16658
Author:   sigurdne
Date:     2017-04-29 19:10:52 -0400 (Sat, 29 Apr 2017)
Log Message:
-----------
more on helpdesk

Modified Paths:
--------------
    trunk/helpdesk/inc/class.sotts.inc.php
    trunk/helpdesk/templates/base/tts.xsl
    trunk/phpgwapi/templates/base/attributes_form.xsl

Modified: trunk/helpdesk/inc/class.sotts.inc.php
===================================================================
--- trunk/helpdesk/inc/class.sotts.inc.php      2017-04-29 17:34:30 UTC (rev 
16657)
+++ trunk/helpdesk/inc/class.sotts.inc.php      2017-04-29 23:10:52 UTC (rev 
16658)
@@ -920,10 +920,17 @@
 
                        $data_attribute = 
$this->custom->prepare_for_db('phpgw_helpdesk_tickets', $values_attribute);
 
-                       if (isset($data_attribute['value_set']))
+                       if (!empty($data_attribute['value_set']))
                        {
+                               $this->db->query("SELECT * FROM 
phpgw_helpdesk_tickets WHERE id='$id'", __LINE__, __FILE__);
+                               $this->db->next_record();
                                foreach ($data_attribute['value_set'] as 
$input_name => $value)
                                {
+                                       $old_values = $this->db->f($input_name);
+                                       if($value == $old_values)
+                                       {
+                                               continue;
+                                       }
                                        $this->fields_updated[] = $input_name;
                                        $value_set[$input_name] = $value;
                                }
@@ -936,6 +943,7 @@
 
                        if (isset($this->fields_updated) && 
$this->fields_updated && $simple)
                        {
+                               $this->db->query("DELETE FROM 
phpgw_helpdesk_views WHERE id={$id} AND account_id !=" . (int) $this->account, 
__LINE__, __FILE__);
                                $receipt['message'][] = array('msg' => 
lang('Ticket has been updated'));
                                $this->db->transaction_commit();
                                return $receipt;
@@ -1054,13 +1062,15 @@
 
                                $this->db->query("UPDATE phpgw_helpdesk_tickets 
SET $value_set WHERE id={$id}", __LINE__, __FILE__);
                        }
-
-                       $this->db->transaction_commit();
-
+//                     _debug_array($this->fields_updated);die();
                        if (isset($this->fields_updated) && 
$this->fields_updated)
                        {
+                               $this->db->query("DELETE FROM 
phpgw_helpdesk_views WHERE id={$id} AND account_id !=" . (int) $this->account, 
__LINE__, __FILE__);
                                $receipt['message'][] = array('msg' => 
lang('Ticket has been updated'));
                        }
+
+                       $this->db->transaction_commit();
+
                        return $receipt;
                }
 

Modified: trunk/helpdesk/templates/base/tts.xsl
===================================================================
--- trunk/helpdesk/templates/base/tts.xsl       2017-04-29 17:34:30 UTC (rev 
16657)
+++ trunk/helpdesk/templates/base/tts.xsl       2017-04-29 23:10:52 UTC (rev 
16658)
@@ -209,7 +209,7 @@
                                                        <br/>
                                                        <xsl:text>Ctrl + 
V</xsl:text>
                                                </label>
-                                               <canvas title="Copy image data 
into clipboard and press Ctrl+V" style="border:1px solid grey;" id="my_canvas" 
width="100" height="100" class="pure-input-1-2" >
+                                               <canvas title="Copy image data 
into clipboard and press Ctrl+V" style="border:1px solid grey;" id="my_canvas" 
width="100" height="10" class="pure-input-1-2" >
                                                </canvas>
                                                <input type="hidden" 
id="pasted_image" name="pasted_image"></input>
                                                <input type="hidden" 
id="pasted_image_is_blank" name="pasted_image_is_blank" value="1"></input>
@@ -548,7 +548,7 @@
                                                        <br/>
                                                        <xsl:text>Ctrl + 
V</xsl:text>
                                                </label>
-                                               <canvas title="Copy image data 
into clipboard and press Ctrl+V" style="border:1px solid grey;" id="my_canvas" 
width="100" height="100" class="pure-input-1-2" >
+                                               <canvas title="Copy image data 
into clipboard and press Ctrl+V" style="border:1px solid grey;" id="my_canvas" 
width="100" height="10" class="pure-input-1-2" >
                                                </canvas>
                                                <input type="hidden" 
id="pasted_image" name="pasted_image"></input>
                                        </div>

Modified: trunk/phpgwapi/templates/base/attributes_form.xsl
===================================================================
--- trunk/phpgwapi/templates/base/attributes_form.xsl   2017-04-29 17:34:30 UTC 
(rev 16657)
+++ trunk/phpgwapi/templates/base/attributes_form.xsl   2017-04-29 23:10:52 UTC 
(rev 16658)
@@ -418,7 +418,7 @@
                                                        <xsl:value-of 
select="name"/>
                                                        <xsl:text>();</xsl:text>
                                                </xsl:variable>
-                                               <input type="text" id="{name}" 
name="{name}" value="{value}" onClick="{$lookup_function}" readonly="readonly" 
size="6">
+                                               <input type="text" id="{name}" 
name="values_attribute[{id}][value]" value="{value}" 
onClick="{$lookup_function}" readonly="readonly" size="6">
                                                        <xsl:choose>
                                                                <xsl:when 
test="disabled!=''">
                                                                        
<xsl:attribute name="disabled">




reply via email to

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