fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [8374]


From: Torstein
Subject: [Fmsystem-commits] [8374]
Date: Tue, 20 Dec 2011 07:45:04 +0000

Revision: 8374
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8374
Author:   vator
Date:     2011-12-20 07:45:04 +0000 (Tue, 20 Dec 2011)
Log Message:
-----------


Modified Paths:
--------------
    trunk/controller/templates/base/add_check_list_for_location.xsl
    trunk/controller/templates/base/css/base.css
    trunk/controller/templates/base/edit_check_list.xsl
    trunk/controller/templates/base/view_calendar_month.xsl

Modified: trunk/controller/templates/base/add_check_list_for_location.xsl
===================================================================
--- trunk/controller/templates/base/add_check_list_for_location.xsl     
2011-12-19 20:15:48 UTC (rev 8373)
+++ trunk/controller/templates/base/add_check_list_for_location.xsl     
2011-12-20 07:45:04 UTC (rev 8374)
@@ -8,12 +8,17 @@
                $( "#planned_date" ).datepicker({ 
                        monthNames: 
['Januar','Februar','Mars','April','Mai','Juni','Juli','August','September','Oktober','November','Desember'],
                        dayNamesMin: ['Sø', 'Ma', 'Ti', 'On', 'To', 'Fr', 'Lø'],
-                       dateFormat: 'd/m-yy' 
+                       dateFormat: 'dd/mm-yy' 
                });
                $( "#completed_date" ).datepicker({ 
                        monthNames: 
['Januar','Februar','Mars','April','Mai','Juni','Juli','August','September','Oktober','November','Desember'],
                        dayNamesMin: ['Sø', 'Ma', 'Ti', 'On', 'To', 'Fr', 'Lø'],
-                       dateFormat: 'd/m-yy' 
+                       dateFormat: 'dd/mm-yy' 
+               });
+               $( "#deadline_date" ).datepicker({ 
+                       monthNames: 
['Januar','Februar','Mars','April','Mai','Juni','Juli','August','September','Oktober','November','Desember'],
+                       dayNamesMin: ['Sø', 'Ma', 'Ti', 'On', 'To', 'Fr', 'Lø'],
+                       dateFormat: 'dd/mm-yy' 
                });             
        });
 </script>
@@ -23,25 +28,11 @@
        
        <h1>Registrere sjekkliste for <xsl:value-of 
select="location_array/loc1_name"/></h1>
 
-       <fieldset class="check_list_details">
-               <label>Tittel</label><xsl:value-of 
select="control_array/title"/><br/>
-               <label>Startdato</label>
-               <xsl:if test="control_array/start_date != ''">
-                       <xsl:value-of select="php:function('date', 
$date_format, number(control_array/start_date))"/><br/>
-               </xsl:if>
-               <label>Sluttdato</label>
-               <xsl:if test="control_array/end_date != ''">
-                       <xsl:value-of select="php:function('date', 
$date_format, number(control_array/end_date))"/><br/>
-               </xsl:if>
-               <label>Frekvenstype</label><xsl:value-of 
select="control_array/repeat_type"/><br/>
-               <label>Frekvens</label><xsl:value-of 
select="control_array/repeat_interval"/><br/>
-       </fieldset>
+       <h2>Tittel <xsl:value-of select="control_array/title"/></h2>
        
-       <form 
action="index.php?menuaction=controller.uicheck_list_for_location.save_check_list_for_location"
 method="post">
-               <input type="hidden" id="deadline_date" name="deadline_date" 
value=""/>
-               
+       <form id="frm_add_check_list" 
action="index.php?menuaction=controller.uicheck_list_for_location.save_check_list_for_location"
 method="post">
+                               
                <div id="calendar_dates">
-                       <p>Velg fristdato</p>
                        <xsl:for-each select="calendar_array">
                                <xsl:variable name="cal_date"><xsl:value-of 
select="."/></xsl:variable>
                                        
@@ -65,14 +56,20 @@
                                </select>
                        </div>
                        <div>
+                               <label>Fristdato</label>
+                               <input>
+                             <xsl:attribute 
name="id">deadline_date</xsl:attribute>
+                             <xsl:attribute 
name="name">deadline_date</xsl:attribute>
+                             <xsl:attribute name="type">text</xsl:attribute>
+                             <xsl:attribute name="value"><xsl:value-of 
select="php:function('date', $date_format, number(deadline))"/></xsl:attribute>
+                           </input>
+                   </div>
+                       <div>
                                <label>Planlagt dato</label>
                                <input>
                              <xsl:attribute 
name="id">planned_date</xsl:attribute>
                              <xsl:attribute 
name="name">planned_date</xsl:attribute>
                              <xsl:attribute name="type">text</xsl:attribute>
-                             <xsl:if test="check_list/planned_date != ''">
-                               <xsl:attribute name="value"><xsl:value-of 
select="php:function('date', $date_format, 
number(check_list/planned_date))"/></xsl:attribute>
-                             </xsl:if>
                            </input>
                    </div>
                    <div>

Modified: trunk/controller/templates/base/css/base.css
===================================================================
--- trunk/controller/templates/base/css/base.css        2011-12-19 20:15:48 UTC 
(rev 8373)
+++ trunk/controller/templates/base/css/base.css        2011-12-20 07:45:04 UTC 
(rev 8374)
@@ -999,4 +999,16 @@
     text-decoration: none;
     color:#000;
 }
+.not_active{
+       opacity:0.5;
+}
+ul.check_items li.hidden{
+       display: none;  
+}
 
+.frm_save_check_item input[type='submit']{
+       width: 130px;   
+}
+ul.check_items{
+       width: 800px;
+}
\ No newline at end of file

Modified: trunk/controller/templates/base/edit_check_list.xsl
===================================================================
--- trunk/controller/templates/base/edit_check_list.xsl 2011-12-19 20:15:48 UTC 
(rev 8373)
+++ trunk/controller/templates/base/edit_check_list.xsl 2011-12-20 07:45:04 UTC 
(rev 8374)
@@ -24,10 +24,13 @@
                });
        </script>
                
-       <form id="frm_save_check_items" 
action="index.php?menuaction=controller.uicheck_list.save_check_items" 
method="post">
                <h1>Sjekkliste</h1>
                
                <fieldset class="check_list_details">
+               
+                       <xsl:variable name="check_list_id"><xsl:value-of 
select="check_list/id"/></xsl:variable>
+                       <input type="hidden" name="check_list_id" 
value="{$check_list_id}" />   
+                               
                        <div>
                                <label>ID</label>
                                <input>
@@ -85,60 +88,204 @@
                        
                </fieldset>
                                
-               <h2 class="check_item_details">Sjekkpunkter</h2>
+               <h2 class="check_item_details">Åpne sjekkpunkter</h2>
        
                <xsl:choose>
                        <xsl:when 
test="check_list/check_item_array/child::node()">
+                               
+                       <div class="expand_menu"><div class="expand_all">Vis 
alle</div><div class="collapse_all focus">Skjul alle</div></div>
                
-                       <xsl:variable name="check_list_id"><xsl:value-of 
select="check_list/id"/></xsl:variable>
-                       <input type="hidden" name="check_list_id" 
value="{$check_list_id}" />   
+                               <ul class="check_items expand_list">
+                                       <xsl:for-each 
select="check_list/check_item_array">
+                                                       <li>
+                                                       <xsl:if test="status = 
0">
+                                                               <h4><img 
src="controller/images/arrow_right.png" width="14"/><xsl:number />. 
<span><xsl:value-of select="control_item/title"/></span></h4>                   
                           
+                                                               <form 
class="frm_save_check_item" 
action="index.php?menuaction=controller.uicheck_list.save_check_item" 
method="post">
+                                                                       
<xsl:variable name="check_item_id"><xsl:value-of select="id"/></xsl:variable>
+                                                                       <input 
type="hidden" name="check_item_id" value="{$check_item_id}" /> 
+                                                                       <div 
class="check_item">
+                                                                         <div>
+                                                                              
<label>Status</label>
+                                                                              
<select name="status">
+                                                                               
        <xsl:choose>
+                                                                               
                <xsl:when test="status = 0">
+                                                                               
                        <option value="0" SELECTED="SELECTED">Feil på 
sjekkpunkt</option>
+                                                                               
                        <option value="1">Feil fikset</option>
+                                                                               
                </xsl:when>
+                                                                               
                <xsl:when test="status = 1">
+                                                                               
                        <option value="0">Feil på sjekkpunkt</option>
+                                                                               
                        <option value="1" SELECTED="SELECTED">Feil 
fikset</option>
+                                                                               
                </xsl:when>
+                                                                               
        </xsl:choose>
+                                                                               
   </select>
+                                                                      </div>
+                                                                      <div>
+                                                                        <label 
class="comment">Kommentar</label>
+                                                                        
<textarea name="comment">
+                                                                               
        <xsl:value-of select="comment"/>
+                                                                               
 </textarea>
+                                                                      </div>
+                                                                      <div>
+                                                                        
<label>Hva skal gjøres</label>
+                                                                        
<textarea><xsl:value-of select="control_item/what_to_do"/></textarea>
+                                                                      </div>
+                                                                      <div>
+                                                                        
<label>Utførelsesbeskrivelse</label>
+                                                                        
<textarea><xsl:value-of select="control_item/what_to_do"/></textarea>
+                                                                      </div>
+                                                                      <div 
class="form-buttons">
+                                                                               
        <xsl:variable name="lang_save"><xsl:value-of 
select="php:function('lang', 'save_check_item')" /></xsl:variable>
+                                                                               
        <input type="submit" name="save_control" value="{$lang_save}" 
class="not_active" title="{$lang_save}" />
+                                                                               
</div>
+                                                                       </div>
+                                                               </form>
+                                                       </xsl:if>
+                                           </li>
+                                       </xsl:for-each>
+                               </ul>                   
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       Ingen sjekkpunkter
+                               </xsl:otherwise>
+               </xsl:choose>
                
-                       <xsl:for-each select="check_list/check_item_array">
-                               <xsl:variable 
name="check_item_id"><xsl:value-of select="id"/></xsl:variable>
-                               <input type="hidden" name="check_item_ids[]" 
value="{$check_item_id}" />                
-                       </xsl:for-each>
-               
+               <h2 class="check_item_details">Sjekkpunkter som er fikset</h2>
+       
+               <xsl:choose>
+                       <xsl:when 
test="check_list/check_item_array/child::node()">
+                               
                        <div class="expand_menu"><div class="expand_all">Vis 
alle</div><div class="collapse_all focus">Skjul alle</div></div>
-               
+                               
                                <ul class="check_items expand_list">
                                        <xsl:for-each 
select="check_list/check_item_array">
-                                               <xsl:variable 
name="check_item_id"><xsl:value-of select="id"/></xsl:variable>
-                                               <li>
+                                                       <xsl:if test="status = 
1">
+                                                       <li>
                                                        <h4><img 
src="controller/images/arrow_right.png" width="14"/><xsl:number/>. 
<span><xsl:value-of select="control_item/title"/></span></h4>                   
                            
+                                                               <form 
class="frm_save_check_item" 
action="index.php?menuaction=controller.uicheck_list.save_check_item" 
method="post">
+                                                                       
<xsl:variable name="check_item_id"><xsl:value-of select="id"/></xsl:variable>
+                                                                       <input 
type="hidden" name="check_item_id" value="{$check_item_id}" /> 
+                                                                       <div 
class="check_item">
+                                                                         <div>
+                                                                              
<label>Status</label>
+                                                                              
<select name="status">
+                                                                               
        <xsl:choose>
+                                                                               
                <xsl:when test="status = 0">
+                                                                               
                        <option value="0" SELECTED="SELECTED">Feil på 
sjekkpunkt</option>
+                                                                               
                        <option value="1">Feil fikset</option>
+                                                                               
                </xsl:when>
+                                                                               
                <xsl:when test="status = 1">
+                                                                               
                        <option value="0">Feil på sjekkpunkt</option>
+                                                                               
                        <option value="1" SELECTED="SELECTED">Feil 
fikset</option>
+                                                                               
                </xsl:when>
+                                                                               
        </xsl:choose>
+                                                                               
   </select>
+                                                                      </div>
+                                                                      <div>
+                                                                        <label 
class="comment">Kommentar</label>
+                                                                        
<textarea name="comment">
+                                                                               
        <xsl:value-of select="comment"/>
+                                                                               
 </textarea>
+                                                                      </div>
+                                                                      <div>
+                                                                        
<label>Hva skal gjøres</label>
+                                                                        
<textarea><xsl:value-of select="control_item/what_to_do"/></textarea>
+                                                                      </div>
+                                                                      <div>
+                                                                        
<label>Utførelsesbeskrivelse</label>
+                                                                        
<textarea><xsl:value-of select="control_item/what_to_do"/></textarea>
+                                                                      </div>
+                                                                      <div 
class="form-buttons">
+                                                                               
        <xsl:variable name="lang_save"><xsl:value-of 
select="php:function('lang', 'save_check_item')" /></xsl:variable>
+                                                                               
        <input type="submit" name="save_control" value="{$lang_save}" 
class="not_active" title="{$lang_save}" />
+                                                                               
</div>
+                                                                       </div>
+                                                               </form>
+                                                   </li>
+                                               </xsl:if>
+                                       </xsl:for-each>
+                               </ul>                   
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       Ingen sjekkpunkter
+                               </xsl:otherwise>
+               </xsl:choose>
+               
+               <h2 class="check_item_details">Kontrollpunkter</h2>
+       
+               <xsl:choose>
+                       <xsl:when test="control_items_list/child::node()">
+               
+                               <ul class="check_items expand_list">
+                                       <xsl:for-each 
select="control_items_list">
+                                               <li>
+                                               <h4><img 
src="controller/images/arrow_right.png" width="14"/><xsl:number/>. 
<span><xsl:value-of select="title"/></span></h4>                                
            
+                                                       <form 
class="frm_save_control_item" 
action="index.php?menuaction=controller.uicheck_list.add_check_item_to_list" 
method="post">
+                                                               <xsl:variable 
name="control_item_id"><xsl:value-of select="id"/></xsl:variable>
+                                                               <input 
type="hidden" name="control_item_id" value="{$control_item_id}" /> 
+                                                               <input>
+                                                             <xsl:attribute 
name="name">check_list_id</xsl:attribute>
+                                                             <xsl:attribute 
name="type">hidden</xsl:attribute>
+                                                             <xsl:attribute 
name="value">
+                                                               <xsl:value-of 
select="//check_list/id"/>
+                                                             </xsl:attribute>
+                                                           </input>
+                                                           <input>
+                                                             <xsl:attribute 
name="name">status</xsl:attribute>
+                                                             <xsl:attribute 
name="type">hidden</xsl:attribute>
+                                                             <xsl:attribute 
name="value">
+                                                               <xsl:value-of 
select="0"/>
+                                                             </xsl:attribute>
+                                                           </input>
+                                                                               
                                                
                                                                <div 
class="check_item">
-                                                              <div>
-                                                                      
<label>Status</label>
-                                                                      <select 
name="status_{$check_item_id}">
-                                                                               
        <option value="true">Utført</option>
-                                                                               
        <option value="false">Ikke utført</option>
-                                                                          
</select>
+                                                                 <div>
+                                                                      
<label>Tittel</label>
+                                                                      <input>
+                                                                             
<xsl:attribute name="name">control_item_title</xsl:attribute>
+                                                                             
<xsl:attribute name="type">text</xsl:attribute>
+                                                                             
<xsl:attribute name="value">
+                                                                               
<xsl:value-of select="title"/>
+                                                                             
</xsl:attribute>
+                                                                           
</input>
                                                               </div>
+                                                               <div>
+                                                                        <label 
class="comment">Kommentar</label>
+                                                                        
<textarea name="comment">
+                                                                               
        <xsl:value-of select="comment"/>
+                                                                               
 </textarea>
+                                                                      </div>
                                                               <div>
-                                                                <label 
class="comment">Kommentar</label>
-                                                                <textarea 
name="comment_{$check_item_id}">
-                                                                               
<xsl:value-of select="comment"/>
-                                                                        
</textarea>
+                                                                <label 
class="comment">Påkrevd</label>
+                                                                  <input>
+                                                                             
<xsl:attribute name="name">required</xsl:attribute>
+                                                                             
<xsl:attribute name="type">text</xsl:attribute>
+                                                                             
<xsl:attribute name="value">
+                                                                               
<xsl:value-of select="required"/>
+                                                                             
</xsl:attribute>
+                                                                           
</input>
                                                               </div>
                                                               <div>
-                                                                <label>Hva 
skal gjøres</label><span><xsl:value-of select="control_item/what_to_do"/></span>
+                                                                <label>Hva 
skal gjøres</label>
+                                                                
<textarea><xsl:value-of select="control_item/what_to_do"/></textarea>
                                                               </div>
                                                               <div>
-                                                                
<label>Utførelsesbeskrivelse</label><span><xsl:value-of 
select="control_item/what_to_do"/></span>
+                                                                
<label>Utførelsesbeskrivelse</label>
+                                                                
<textarea><xsl:value-of select="control_item/what_to_do"/></textarea>
                                                               </div>
-                                                           </div>
-                                                   </li>
+                                                              <div 
class="form-buttons">
+                                                                               
<xsl:variable name="lang_save"><xsl:value-of select="php:function('lang', 
'save_check_item')" /></xsl:variable>
+                                                                               
<input type="submit" name="save_control" value="{$lang_save}" 
class="not_active" title="{$lang_save}" />
+                                                                       </div>
+                                                               </div>
+                                                       </form>
+                                           </li>
                                        </xsl:for-each>
                                </ul>                   
                                </xsl:when>
                                <xsl:otherwise>
-                                       Ingen sjekkpunkter
+                                       Ingen kontrollpunkter
                                </xsl:otherwise>
-                       </xsl:choose>
-               
-                       <div class="form-buttons">
-                               <xsl:variable name="lang_save"><xsl:value-of 
select="php:function('lang', 'save')" /></xsl:variable>
-                               <input type="submit" name="save_control" 
value="{$lang_save}" title = "{$lang_save}" />
-                       </div>
-               </form>
+               </xsl:choose>
+                       
 </div>
 </xsl:template>

Modified: trunk/controller/templates/base/view_calendar_month.xsl
===================================================================
--- trunk/controller/templates/base/view_calendar_month.xsl     2011-12-19 
20:15:48 UTC (rev 8373)
+++ trunk/controller/templates/base/view_calendar_month.xsl     2011-12-20 
07:45:04 UTC (rev 8374)
@@ -42,6 +42,10 @@
                                                $("#days_view").animate({
                                    left: '+=110' 
                                    }, 800);
+                                       }else if(-502 == leftNumVal){
+                                               $("#days_view").animate({
+                                   left: '+=502' 
+                                   }, 800);
                                        }else if(-502 > leftNumVal){
                                                $("#days_view").animate({
                                    left: '+=502' 
@@ -106,7 +110,7 @@
                                        <li>
                                                <xsl:for-each 
select="calendar_array">
                                                        <xsl:choose>
-                                                                       
<xsl:when test="status = 0">
+                                                                       
<xsl:when test="status = 'control_registered'">
                                                                                
<div>
                                                                                
<a>
                                                                                
        <xsl:attribute name="href">
@@ -122,8 +126,24 @@
                                                                                
</a>
                                                                                
</div>
                                                                        
</xsl:when>
-                                                                       
<xsl:when test="status = 1">
+                                                                       
<xsl:when test="status = 'control_planned'">
                                                                                
<div>
+                                                                               
<a>
+                                                                               
        <xsl:attribute name="href">
+                                                                               
                
<xsl:text>index.php?menuaction=controller.uicheck_list_for_location.add_check_list_for_location</xsl:text>
+                                                                               
                <xsl:text>&amp;date=</xsl:text>
+                                                                               
                <xsl:value-of select="info/date"/>
+                                                                               
                <xsl:text>&amp;control_id=</xsl:text>
+                                                                               
                <xsl:value-of select="info/control_id"/>
+                                                                               
                <xsl:text>&amp;location_code=</xsl:text>
+                                                                               
                <xsl:value-of select="$location_code"/>
+                                                                               
        </xsl:attribute>
+                                                                               
        <img height="15" src="controller/images/status_icon_light_green.png" />
+                                                                               
</a>
+                                                                               
</div>
+                                                                       
</xsl:when>
+                                                                       
<xsl:when test="status = 'control_accomplished_in_time_without_errors'">
+                                                                               
<div>
                                                                                
        <a class="view_check_list">
                                                                                
                <xsl:attribute name="href">
                                                                                
                        
<xsl:text>index.php?menuaction=controller.uicheck_list.get_check_list_info</xsl:text>
@@ -132,11 +152,26 @@
                                                                                
                        <xsl:value-of select="info/id"/>
                                                                                
                </xsl:attribute>
                                                                                
                <span style="display:none"><xsl:value-of 
select="info/id"/></span>
+                                                                               
                <img height="15" 
src="controller/images/status_icon_dark_green.png" />
+                                                                               
        </a>
+                                                                               
</div>
+                                                                       
</xsl:when>
+                                                                       
<xsl:when test="status = 'control_accomplished_over_time_without_errors'">
+                                                                               
<div style="position:relative;">
+                                                                               
<div id="info_box" style="position:absolute;display:none;"></div>
+                                                                               
        <a class="view_check_list">
+                                                                               
                <xsl:attribute name="href">
+                                                                               
                        
<xsl:text>index.php?menuaction=controller.uicheck_list.get_check_list_info</xsl:text>
+                                                                               
                        <xsl:text>&amp;phpgw_return_as=json</xsl:text>
+                                                                               
                        <xsl:text>&amp;check_list_id=</xsl:text>
+                                                                               
                        <xsl:value-of select="info/id"/>
+                                                                               
                </xsl:attribute>
+                                                                               
                <span style="display:none"><xsl:value-of 
select="info/id"/></span>
                                                                                
                <img height="15" 
src="controller/images/status_icon_light_green.png" />
                                                                                
        </a>
                                                                                
</div>
                                                                        
</xsl:when>
-                                                                       
<xsl:when test="status = 2">
+                                                                       
<xsl:when test="status = 'control_accomplished_with_errors'">
                                                                                
<div style="position:relative;">
                                                                                
<div id="info_box" style="position:absolute;display:none;"></div>
                                                                                
        <a class="view_check_list">
@@ -151,11 +186,16 @@
                                                                                
        </a>
                                                                                
</div>
                                                                        
</xsl:when>
-                                                                       
<xsl:when test="status = 5">
+                                                                       
<xsl:when test="status = 'control_canceled'">
                                                                                
<div>
                                                                                
        <img height="12" src="controller/images/status_icon_red_cross.png" />
                                                                                
</div>
                                                                        
</xsl:when>
+                                                                       
<xsl:when test="status = 'control_not_accomplished'">
+                                                                               
<div>
+                                                                               
        <img height="12" src="controller/images/status_icon_red_cross.png" />
+                                                                               
</div>
+                                                                       
</xsl:when>
                                                                        
<xsl:otherwise>
                                                                        
<div></div>
                                                                        
</xsl:otherwise>




reply via email to

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