fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [10295] Logistic: Added validation


From: Torstein
Subject: [Fmsystem-commits] [10295] Logistic: Added validation
Date: Mon, 22 Oct 2012 12:27:53 +0000

Revision: 10295
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10295
Author:   vator
Date:     2012-10-22 12:27:53 +0000 (Mon, 22 Oct 2012)
Log Message:
-----------
Logistic: Added validation

Modified Paths:
--------------
    trunk/logistic/inc/class.uiproject.inc.php
    trunk/logistic/js/logistic/project.js
    trunk/logistic/templates/base/project/project_item.xsl

Modified: trunk/logistic/inc/class.uiproject.inc.php
===================================================================
--- trunk/logistic/inc/class.uiproject.inc.php  2012-10-22 11:46:13 UTC (rev 
10294)
+++ trunk/logistic/inc/class.uiproject.inc.php  2012-10-22 12:27:53 UTC (rev 
10295)
@@ -29,6 +29,7 @@
         */
        phpgw::import_class('phpgwapi.uicommon');
        phpgw::import_class('logistic.soproject');
+       phpgw::import_class('phpgwapi.jquery');
 
        include_class('logistic', 'project');
 
@@ -513,6 +514,9 @@
 
                        $this->use_yui_editor('description');
                        $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('logistic') . '::' . lang('Project type');
+                       
+                       phpgwapi_jquery::load_widget('core');
+                       self::add_javascript('logistic', 'logistic', 
'project.js');
                        
self::render_template_xsl(array('project/project_item'), $data);
                }
                

Modified: trunk/logistic/js/logistic/project.js
===================================================================
--- trunk/logistic/js/logistic/project.js       2012-10-22 11:46:13 UTC (rev 
10294)
+++ trunk/logistic/js/logistic/project.js       2012-10-22 12:27:53 UTC (rev 
10295)
@@ -1,4 +1,35 @@
 $(document).ready(function(){
 
        
+       // HELP TEXT ON SAVING CONTROL DETAILS 
+       $("#project_details input").focus(function(e){
+               var wrpElem = $(this).parents("dd");
+               $(wrpElem).find(".help_text").fadeIn(200);
+       });
+       
+       $("#project_details textarea").focus(function(e){
+               var wrpElem = $(this).parents("dd");
+               $(wrpElem).find(".help_text").fadeIn(200);
+       });
+
+       $("#project_details select").focus(function(e){
+               var wrpElem = $(this).parents("dd");
+               $(wrpElem).find(".help_text").fadeIn(200);
+       });
+       
+       $("#project_details textarea").focusout(function(e){
+               var wrpElem = $(this).parents("dd");
+               $(wrpElem).find(".help_text").fadeOut();
+       });
+       
+       $("#project_details input").focusout(function(e){
+               var wrpElem = $(this).parents("dd");
+               $(wrpElem).find(".help_text").fadeOut();
+       });
+               
+       $("#project_details select").focusout(function(e){
+               var wrpElem = $(this).parents("dd");
+               $(wrpElem).find(".help_text").fadeOut();
+       });
+       
 });
\ No newline at end of file

Modified: trunk/logistic/templates/base/project/project_item.xsl
===================================================================
--- trunk/logistic/templates/base/project/project_item.xsl      2012-10-22 
11:46:13 UTC (rev 10294)
+++ trunk/logistic/templates/base/project/project_item.xsl      2012-10-22 
12:27:53 UTC (rev 10295)
@@ -10,7 +10,7 @@
                        <xsl:value-of select="php:function('lang', 'Project')" 
/>
        </h1>
        
-       <div class="content-wrp">
+       <div id="project_details" class="content-wrp">
                <div id="details">
                        <xsl:variable name="action_url">
                                <xsl:value-of 
select="php:function('get_phpgw_link', '/index.php', 
'menuaction:logistic.uiproject.save')" />
@@ -29,8 +29,8 @@
                                                                <xsl:variable 
name="error_msg"><xsl:value-of select="project/error_msg_array/name" 
/></xsl:variable>
                                                                <div 
class='input_error_msg'><xsl:value-of select="php:function('lang', $error_msg)" 
/></div>
                                                        </xsl:if>
+                                                       <div 
style="margin-left:0; margin-bottom: 3px;" class="help_text line">Angi 
startdato for aktiviteten</div>
                                                        <input type="text" 
name="name" id="name" value="{project/name}" size="100"/>
-                                                       <span class="help_text 
line">Angi startdato for aktiviteten</span>
                                                </xsl:when>
                                                <xsl:otherwise>
                                                        <xsl:value-of 
select="project/name" />
@@ -47,10 +47,10 @@
                                                                <xsl:variable 
name="error_msg"><xsl:value-of select="project/error_msg_array/project_type_id" 
/></xsl:variable>
                                                                <div 
class='input_error_msg'><xsl:value-of select="php:function('lang', $error_msg)" 
/></div>
                                                        </xsl:if>
+                                                       <div 
style="margin-left:0; margin-bottom: 3px;" class="help_text line">Angi 
startdato for aktiviteten</div>
                                                        <select 
id="project_type_id" name="project_type_id">
                                                                
<xsl:apply-templates select="options"/>
                                                        </select>
-                                                       <span class="help_text 
line">Angi startdato for aktiviteten</span>
                                                </xsl:when>
                                                <xsl:otherwise>
                                                        <xsl:value-of 
select="project/project_type_label" />
@@ -67,8 +67,8 @@
                                                                <xsl:variable 
name="error_msg"><xsl:value-of select="project/error_msg_array/description" 
/></xsl:variable>
                                                                <div 
class='input_error_msg'><xsl:value-of select="php:function('lang', $error_msg)" 
/></div>
                                                        </xsl:if>
+                                                       <div 
style="margin-left:0; margin-bottom: 3px;" class="help_text line">Angi 
startdato for aktiviteten</div>
                                                        <textarea 
id="description" name="description" rows="5" cols="60"><xsl:value-of 
select="project/description" disable-output-escaping="yes"/></textarea>
-                                                       <span class="help_text 
line">Angi startdato for aktiviteten</span>
                                                </xsl:when>
                                                <xsl:otherwise>
                                                        <xsl:value-of 
select="project/description" disable-output-escaping="yes"/>




reply via email to

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