fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [9758]


From: Torstein
Subject: [Fmsystem-commits] [9758]
Date: Wed, 11 Jul 2012 12:39:53 +0000

Revision: 9758
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9758
Author:   vator
Date:     2012-07-11 12:39:52 +0000 (Wed, 11 Jul 2012)
Log Message:
-----------


Modified Paths:
--------------
    trunk/controller/inc/model/class.component.inc.php
    trunk/controller/inc/model/class.control_item.inc.php
    trunk/controller/js/controller/ajax.js
    trunk/controller/setup/phpgw_no.lang
    
trunk/controller/templates/base/calendar/view_calendar_month_for_locations.xsl
    
trunk/controller/templates/base/calendar/view_calendar_year_for_locations.xsl
    trunk/controller/templates/base/control_item/control_item.xsl
    trunk/controller/templates/base/css/base.css

Modified: trunk/controller/inc/model/class.component.inc.php
===================================================================
--- trunk/controller/inc/model/class.component.inc.php  2012-07-11 12:19:23 UTC 
(rev 9757)
+++ trunk/controller/inc/model/class.component.inc.php  2012-07-11 12:39:52 UTC 
(rev 9758)
@@ -40,6 +40,7 @@
                protected $xml;
                // Not a table column
                protected $xml_short_desc;
+               protected $type_str;
                protected $location_code;
                protected $p_location_code;
                protected $loc_1;
@@ -118,6 +119,13 @@
                
                public function get_address() { return $this->address; }
                
+               public function set_type_str($type_str)
+               {
+                       $this->type_str = $type_str;
+               }
+               
+               public function get_type_str() { return $this->type_str; }
+               
                public function set_controls_array($controls_array)
                {
                        $this->controls_array = $controls_array;

Modified: trunk/controller/inc/model/class.control_item.inc.php
===================================================================
--- trunk/controller/inc/model/class.control_item.inc.php       2012-07-11 
12:19:23 UTC (rev 9757)
+++ trunk/controller/inc/model/class.control_item.inc.php       2012-07-11 
12:39:52 UTC (rev 9758)
@@ -48,6 +48,7 @@
                protected $type;
                
                protected $options_array;
+               protected $error_msg_array;
                
                /**
                 * Constructor.  Takes an optional ID.  If a contract is 
created from outside
@@ -141,6 +142,13 @@
                {
                        return array_values( $this->type_array );
                }
+               
+               public function get_error_msg_array() { return 
$this->error_msg_array; }
+               
+               public function set_error_msg_array( $error_msg_array )
+               {
+                       $this->error_msg_array = $error_msg_array;
+               }
                        
                /**
                 * Get a static reference to the storage object associated with 
this model object
@@ -157,7 +165,7 @@
                        return self::$so;
                }
                
-                public function serialize()
+               public function serialize()
                 {
                        $result = array();
                        $result['id'] = $this->get_id();
@@ -171,4 +179,34 @@
                                                
                        return $result;
                }
-       }
+               
+               public function validate()
+               {
+                       $status = true;
+       
+                 if( $this->title == '')
+                 {
+                       $status = false;
+                       $this->error_msg_array['title'] = "error_msg_1";
+                 }
+
+                 if( $this->what_to_do == '' | strlen( $this->what_to_do ) == 
0 )
+                 {
+                       $status = false;
+                       $this->error_msg_array['what_to_do'] = "error_msg_1";
+                 }
+                 
+                       if( $this->how_to_do == '')
+                 {
+                       $status = false;
+                       $this->error_msg_array['how_to_do'] = "error_msg_1";
+                 }
+                 
+                       if( $this->control_area_id == '' && 
intval($this->control_area_id) > 0)
+                 {
+                       $status = false;
+                       $this->error_msg_array['control_area_id'] = 
"error_msg_2";
+                 }
+                 return $status;
+               }
+       }
\ No newline at end of file

Modified: trunk/controller/js/controller/ajax.js
===================================================================
--- trunk/controller/js/controller/ajax.js      2012-07-11 12:19:23 UTC (rev 
9757)
+++ trunk/controller/js/controller/ajax.js      2012-07-11 12:39:52 UTC (rev 
9758)
@@ -48,25 +48,7 @@
                
                 window.location.href = requestUrl;
     });
-       
-       /* ================================  FILTERS  
================================== */
-       
-       $("#filter-repeat_type").change(function () {
-      var repeat_type = $(this).val();
-         var thisForm = $(this).closest("form");
-                
-         $(thisForm).find("input[name=repeat_type]").val(repeat_type);
-         $(thisForm).submit();
-       });
-       
-       $("#filter-role").change(function () {
-         var role = $(this).val();
-         var thisForm = $(this).closest("form");
                
-         $(thisForm).find("input[name=role]").val(role);
-         $(thisForm).submit();
-       });
-       
        /* ================================  CONTROL LOCATION 
================================== */
        
        // Update location category based on location type
@@ -142,7 +124,6 @@
                                }
                          }  
                        });
-                       
     });
 
 
@@ -280,7 +261,8 @@
        
        /* ================================  CONTROL AREA 
================================== */
        
-       // When control area is selected, control groups are fetched from db 
and control select list is populated
+       /* POPULATE CONTROL GROUP SELECT LIST 
+        * Fetches control groups from db from selected control area populates 
control group select list */
        $("#control_area").change(function () {
                 var control_area_id = $(this).val();
                 if(control_area_id == '')
@@ -327,7 +309,7 @@
        });
        
        /* ================================  CONTROL ITEM 
================================== */
-       
+               
        if( $("#frm_control_items").length > 0 ){
                var check_box_arr = 
$("#frm_control_items").find("input[type='checkbox']");
                
@@ -375,7 +357,7 @@
        
        /* =========================  CONTROL OPTION 
======================================== */
          
-       // Changes control type location level between building and property in 
search location select box
+       // SHOW CONTROL OPTION PANEL
        $(".control_item_type").live("click", function(){
                var thisBtn = $(this).find(".btn");
                var thisRadio = $(this).find("input[type=radio]");
@@ -402,11 +384,13 @@
                        $("#add_control_item_option_panel").slideUp(500);
                }
        });
-       
+
+       // DELETE CONTROL OPTION FROM CHOSEN LIST
        $("#control_item_options li .delete").live("click", function(e){
                $(this).closest("li").remove();
        });
-       
+
+       // ADD OPTION VALUE TO OPTION LIST      
        $("#add_control_item_list_value input[type=button]").live("click", 
function(e){
                e.preventDefault();
                
@@ -431,28 +415,39 @@
                }
        });
        
-       /* =========================  CONTROL  
=============================================== */
-       
-       $("#control_id").change(function () {
-               var control_id = $(this).val();
-               $("#hidden_control_id").val( control_id );
-    });
-
-       $("#frm_save_control_details input").focus(function(e){
-               
$("#frm_save_control_details").find(".focus").removeClass("focus");
-               $(this).addClass("focus");
-       });
+       /* Virker som at denne ikke er i bruk. Torstein: 11.07.12
+       $(".frm_save_control_item").live("click", function(e){
+               e.preventDefault();
+               var thisForm = $(this);
+               var liWrp = $(this).parent();
+               var submitBnt = $(thisForm).find("input[type='submit']");
+               var requestUrl = $(thisForm).attr("action");
                
-       $("#frm_save_control_details select").focus(function(e){
-               
$("#frm_save_control_details").find(".focus").removeClass("focus");
-               $(this).addClass("focus");
+               $.ajax({
+                         type: 'POST',
+                         url: requestUrl + "&phpgw_return_as=json&" + 
$(thisForm).serialize(),
+                         success: function(data) {
+                                 if(data){
+                                 var obj = jQuery.parseJSON(data);
+                                 
+                                 if(obj.status == "saved"){
+                                         $(liWrp).fadeOut('3000', function() {
+                                                 $(liWrp).addClass("hidden");
+                                         });
+                                         }
+                                 }
+                               }
+                       });
        });
+       */
        
+       
+       /* =========================  CONTROL  ===================== */
+       
        // SAVE CONTROL DETAILS
        $("#frm_save_control_details").submit(function(e){
                
                var thisForm = $(this);
-
                var $required_input_fields = $(this).find(".required");
                var status = true;
        
@@ -461,14 +456,12 @@
                
                if($(this).val() == ''){
                        var nextElem = $(this).next();
-                       
                        if( !$(nextElem).hasClass("input_error_msg") )
                                $(this).after("<div class='input_error_msg'>Du 
må fylle ut dette feltet</div>");
                                                
                        status = false;
                }else{
                        var nextElem = $(this).next();
-
                        if( $(nextElem).hasClass("input_error_msg") )
                                $(nextElem).remove();
                }
@@ -492,7 +485,7 @@
                
        });
        
-       /* HELP TEXT */
+       // HELP TEXT ON SAVING CONTROL DETAILS 
        $("#control_details input").focus(function(e){
                var wrpElem = $(this).parents("dd");
                $(wrpElem).find(".help_text").fadeIn(300);
@@ -513,30 +506,24 @@
                $(wrpElem).find(".help_text").fadeOut(300);
        });
        
-       $(".frm_save_control_item").live("click", function(e){
-               e.preventDefault();
-               var thisForm = $(this);
-               var liWrp = $(this).parent();
-               var submitBnt = $(thisForm).find("input[type='submit']");
-               var requestUrl = $(thisForm).attr("action");
+       // CONTROL DETAILS ON FOCUS FIELDS 
+       $("#frm_save_control_details input").focus(function(e){
+               
$("#frm_save_control_details").find(".focus").removeClass("focus");
+               $(this).addClass("focus");
+       });
                
-               $.ajax({
-                         type: 'POST',
-                         url: requestUrl + "&phpgw_return_as=json&" + 
$(thisForm).serialize(),
-                         success: function(data) {
-                                 if(data){
-                                 var obj = jQuery.parseJSON(data);
-                                 
-                                 if(obj.status == "saved"){
-                                         $(liWrp).fadeOut('3000', function() {
-                                                 $(liWrp).addClass("hidden");
-                                         });
-                                         }
-                                 }
-                               }
-                       });
+       $("#frm_save_control_details select").focus(function(e){
+               
$("#frm_save_control_details").find(".focus").removeClass("focus");
+               $(this).addClass("focus");
        });
        
+       
+
+       $("#control_id").change(function () {
+               var control_id = $(this).val();
+               $("#hidden_control_id").val( control_id );
+    });
+       
        //=====================================  CHECKLIST  
================================
        
        // ADD CHECKLIST
@@ -912,7 +899,24 @@
        
        /* ==================================  CALENDAR 
===================================== */ 
        
-       // Fetches info about a check list on hover status image icon
+       // CALENDAR FILTERS  
+       $("#filter-repeat_type").change(function () {
+      var repeat_type = $(this).val();
+         var thisForm = $(this).closest("form");
+                
+         $(thisForm).find("input[name=repeat_type]").val(repeat_type);
+         $(thisForm).submit();
+       });
+       
+       $("#filter-role").change(function () {
+         var role = $(this).val();
+         var thisForm = $(this).closest("form");
+               
+         $(thisForm).find("input[name=role]").val(role);
+         $(thisForm).submit();
+       });
+       
+       // SHOW INFO BOX: Fetches info about a check list on hover image icon
        $('a.view_info_box').bind('contextmenu', function(){
                var thisA = $(this);
                var divWrp = $(this).parent();
@@ -957,13 +961,12 @@
                return false;
        });
        
+       // HIDE INFO BOX
        $("a.view_info_box").mouseout(function(){
                var infoBox = $(this).parent().find("#info_box");
                
                $(infoBox).hide();
        });
-               
-       
 });
 
 function clear_form( form ){

Modified: trunk/controller/setup/phpgw_no.lang
===================================================================
--- trunk/controller/setup/phpgw_no.lang        2012-07-11 12:19:23 UTC (rev 
9757)
+++ trunk/controller/setup/phpgw_no.lang        2012-07-11 12:39:52 UTC (rev 
9758)
@@ -350,3 +350,5 @@
 location category      controller      no      Lokaliseringskategori
 select add     controller      no      Velg for å legge til
 select delete  controller      no      Velg for sletting
+error_msg_1    controller      no      Vennligst fyll inn dette feltet
+error_msg_2    controller      no      Vennligst velg en verdi i listen
\ No newline at end of file

Modified: 
trunk/controller/templates/base/calendar/view_calendar_month_for_locations.xsl
===================================================================
--- 
trunk/controller/templates/base/calendar/view_calendar_month_for_locations.xsl  
    2012-07-11 12:19:23 UTC (rev 9757)
+++ 
trunk/controller/templates/base/calendar/view_calendar_month_for_locations.xsl  
    2012-07-11 12:39:52 UTC (rev 9758)
@@ -6,7 +6,7 @@
        <div id="control_plan">
                <div class="top">
                        <h1>Kontrollplan for <xsl:value-of 
select="control/title"/></h1>
-                       <h3>Periode: <xsl:value-of select="$current_year"/></h3>
+                       <h3>Periode: <xsl:value-of select="current_year"/></h3>
                        
                        <form action="#">
                                <input type="hidden" name="period_type" 
value="view_year" />
@@ -27,36 +27,37 @@
                        </form>
                </div>
                <div class="middle">
-                       
-               <!-- =====================  ICON COLOR MAP  ================= 
-->
-               <xsl:call-template name="icon_color_map" />
-                               
-                               
-               <!-- =====================  CALENDAR NAVIGATION  
================= -->
-               <div id="calNav">
-                       <a class="showPrev month">
-                               <xsl:attribute name="href">
-                                       
<xsl:text>index.php?menuaction=controller.uicalendar.view_calendar_month_for_locations</xsl:text>
-                                       <xsl:text>&amp;year=</xsl:text>
-                                       <xsl:value-of select="current_year"/>
-                                       <xsl:text>&amp;month=</xsl:text>
-                                       <xsl:value-of select="current_month"/>
-                                       <xsl:text>&amp;control_id=</xsl:text>
-                                       <xsl:value-of select="control/id"/>
-                               </xsl:attribute>
-                               Årsoversikt
-                       </a>
+                       <!-- =====================  ICON COLOR MAP  
================= -->
+                       <xsl:call-template name="icon_color_map" />
+                                       
+                                       
+                       <!-- =====================  CALENDAR NAVIGATION  
================= -->
+                       <div id="calNav">
+                               <a class="showPrev month">
+                                       <xsl:attribute name="href">
+                                               
<xsl:text>index.php?menuaction=controller.uicalendar.view_calendar_month_for_locations</xsl:text>
+                                               <xsl:text>&amp;year=</xsl:text>
+                                               <xsl:value-of 
select="current_year"/>
+                                               <xsl:text>&amp;month=</xsl:text>
+                                               <xsl:value-of 
select="current_month"/>
+                                               
<xsl:text>&amp;control_id=</xsl:text>
+                                               <xsl:value-of 
select="control/id"/>
+                                       </xsl:attribute>
+                                       Årsoversikt
+                               </a>
+                       </div>
                </div>
                
                <!-- =====================  CALENDAR ================= -->
                <div id="cal_wrp">
+               <h2>Bygg/Eiendom</h2>
                        <table id="calendar" class="month">
                                <tr>
-                                       <th>
-                                               <span 
class="location_code">Lokasjonskode</span>
+                                       <th class="title">
+                                               <span 
class="location-code">Lokasjonskode</span>
                                        </th>
-                                       <th>
-                                               <span 
class="location_name">Lokasjonsnavn</span>
+                                       <th class="title">
+                                               <span 
class="location-name">Lokasjonsnavn</span>
                                        </th>
                                        <xsl:for-each select="heading_array">
                                                <th>
@@ -82,7 +83,7 @@
                                            <td>
                                                        <xsl:value-of 
select="location/location_code"/>
                                                </td>
-                                               <td class="location_name">
+                                               <td class="location-name">
                                                        <xsl:value-of 
select="location/loc1_name"/>
                                                </td>
 
@@ -99,6 +100,58 @@
                        </xsl:otherwise>
                </xsl:choose>
        </table>
+       
+       <h2 class="components">Komponenter</h2>
+                       <table id="calendar" class="month">
+                               <tr>
+                                       <th class="title">
+                                               <span 
class="location-code">Komponent</span>
+                                       </th>
+                                       <th class="title">
+                                               <span 
class="location-name">Komponenttype</span>
+                                       </th>
+                                       <xsl:for-each select="heading_array">
+                                               <th>
+                                                       <xsl:value-of 
select="."/>
+                                               </th>
+                                       </xsl:for-each>
+                               </tr>
+                               
+                               <xsl:choose>
+                               <xsl:when 
test="components_with_calendar_array/child::node()">
+                               
+                               <xsl:for-each 
select="components_with_calendar_array">
+                                       <tr>                            
+                                               <xsl:choose>
+                                               <xsl:when test="(position() mod 
2) != 1">
+                                                   <xsl:attribute 
name="class">odd</xsl:attribute>
+                                               </xsl:when>
+                                               <xsl:otherwise>
+                                                   <xsl:attribute 
name="class">even</xsl:attribute>
+                                               </xsl:otherwise>
+                                           </xsl:choose>
+                                   
+                                               <td class="title">
+                                                       <xsl:value-of 
select="component/xml_short_desc"/>
+                                               </td>
+                                               <td class="location-name">
+                                                       <xsl:value-of 
select="component/type_str"/>
+                                               </td>
+                                                       
+                                               <xsl:for-each 
select="calendar_array">
+                                                       <xsl:call-template 
name="check_list_status_checker" >
+                                                               <xsl:with-param 
name="location_code"><xsl:value-of select="//location"/></xsl:with-param>
+                                                       </xsl:call-template>
+                                               </xsl:for-each>
+                                       </tr>   
+                               </xsl:for-each> 
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <tr class="cal_info_msg"><td colspan="3">Ingen 
sjekklister for komponent i angitt periode</td></tr>
+                       </xsl:otherwise>
+               </xsl:choose>
+       </table>
+       
        </div>
 </div>
 </div>

Modified: 
trunk/controller/templates/base/calendar/view_calendar_year_for_locations.xsl
===================================================================
--- 
trunk/controller/templates/base/calendar/view_calendar_year_for_locations.xsl   
    2012-07-11 12:19:23 UTC (rev 9757)
+++ 
trunk/controller/templates/base/calendar/view_calendar_year_for_locations.xsl   
    2012-07-11 12:39:52 UTC (rev 9758)
@@ -21,10 +21,10 @@
                        <table id="calendar" class="year">
                                <tr>
                                        <th class="title">
-                                               <span 
class="location_code">Lokasjonskode</span>
+                                               <span 
class="location-code">Lokasjonskode</span>
                                        </th>
                                        <th class="title">
-                                               <span 
class="location_name">Lokasjonsnavn</span>
+                                               <span 
class="location-name">Lokasjonsnavn</span>
                                        </th>
                                        <xsl:for-each select="heading_array">
                                                <th>
@@ -32,7 +32,7 @@
                                                                <xsl:attribute 
name="href">
                                                                        
<xsl:text>index.php?menuaction=controller.uicalendar.view_calendar_month_for_locations</xsl:text>
                                                                        
<xsl:text>&amp;year=</xsl:text>
-                                                                       
<xsl:value-of select="current_year"/>
+                                                                       
<xsl:value-of select="//current_year"/>
                                                                        
<xsl:text>&amp;month=</xsl:text>
                                                                        
<xsl:number/>
                                                                        
<xsl:text>&amp;control_id=</xsl:text>
@@ -63,7 +63,7 @@
                                                <td class="title">
                                                        <xsl:value-of 
select="location/location_code"/>
                                                </td>
-                                               <td class="location_name">
+                                               <td class="location-name">
                                                        <xsl:value-of 
select="location/loc1_name"/>
                                                </td>
                                                        
@@ -80,14 +80,13 @@
                        </xsl:otherwise>
                </xsl:choose>
        </table>
-       </div>
-               <div id="cal_wrp">
+
                        <table id="calendar" class="year">
                                <tr>
-                                       <th class="location_name">
+                                       <th class="location-name">
                                                <span>Lokasjon</span>
                                        </th>
-                                       <th class="component_type">
+                                       <th class="component-type">
                                                <span>Komponenttype</span>
                                        </th>
                                        <xsl:for-each select="heading_array">
@@ -96,7 +95,7 @@
                                                                <xsl:attribute 
name="href">
                                                                        
<xsl:text>index.php?menuaction=controller.uicalendar.view_calendar_month_for_locations</xsl:text>
                                                                        
<xsl:text>&amp;year=</xsl:text>
-                                                                       
<xsl:value-of select="current_year"/>
+                                                                       
<xsl:value-of select="//current_year"/>
                                                                        
<xsl:text>&amp;month=</xsl:text>
                                                                        
<xsl:number/>
                                                                        
<xsl:text>&amp;control_id=</xsl:text>
@@ -126,11 +125,11 @@
                                                </xsl:otherwise>
                                            </xsl:choose>
                                    
-                                               <td class="title">
-                                                       <xsl:value-of 
select="component/component_location"/>
+                                               <td class="location-name">
+                                                       <xsl:value-of 
select="component/xml_short_desc"/>
                                                </td>
-                                               <td class="location_name">
-                                                       <xsl:value-of 
select="component/component_description"/>
+                                               <td class="component-type">
+                                                       <xsl:value-of 
select="component/type_str"/>
                                                </td>
                                                        
                                                <xsl:for-each 
select="calendar_array">

Modified: trunk/controller/templates/base/control_item/control_item.xsl
===================================================================
--- trunk/controller/templates/base/control_item/control_item.xsl       
2012-07-11 12:19:23 UTC (rev 9757)
+++ trunk/controller/templates/base/control_item/control_item.xsl       
2012-07-11 12:39:52 UTC (rev 9758)
@@ -24,7 +24,13 @@
                                        <label for="title">Tittel</label>
                                        <xsl:choose>
                                                <xsl:when test="editable">
-                                                       <input type="text" 
name="title" id="title" value="{control_item/title}" size="80"/>
+                                                       <xsl:if 
test="control_item/error_msg_array/title != ''">
+                                                               <xsl:variable 
name="error_msg"><xsl:value-of select="control_item/error_msg_array/title" 
/></xsl:variable>
+                                                               <div 
class='input_error_msg'><xsl:value-of select="php:function('lang', $error_msg)" 
/></div>
+                                                       </xsl:if>
+                                                       <input type="" 
name="title" id="title" size="80"  class="required">
+                                                               <xsl:attribute 
name="value"><xsl:value-of select="control_item/title"/></xsl:attribute>
+                                                       </input>
                                                </xsl:when>
                                                <xsl:otherwise>
                                                        <xsl:value-of 
select="control_item/title"/>
@@ -37,7 +43,7 @@
                                        <xsl:choose>
                                                <xsl:when test="editable">
                                                        <xsl:choose>
-                                                               <xsl:when 
test="$required_item=1">
+                                                               <xsl:when 
test="$required_item = 1">
                                                                        <input 
type="checkbox" name="required" id="required" checked="true"/>
                                                                </xsl:when>
                                                                <xsl:otherwise>
@@ -47,7 +53,7 @@
                                                </xsl:when>
                                                <xsl:otherwise>
                                                        <xsl:choose>
-                                                               <xsl:when 
test="$required_item=1">
+                                                               <xsl:when 
test="$required_item = 1">
                                                                        <input 
type="checkbox" name="required" id="required" checked="true" disabled="true"/>
                                                                </xsl:when>
                                                                <xsl:otherwise>
@@ -165,7 +171,7 @@
                                                                                
                <li>
                                                                                
                        <label>Listeverdi<span class="order_nr"><xsl:number 
/></span></label>
                                                                                
                        <xsl:variable name="option_value"><xsl:value-of 
select="option_value" /></xsl:variable>
-                                                                               
                        <input type="text" name="option_values[]" 
value="{$option_value}" />
+                                                                               
                        <input type="" name="option_values[]" 
value="{$option_value}" />
                                                                                
                        <span class="btn delete">Slett</span>
                                                                                
                </li>
                                                                                
        </xsl:for-each>
@@ -173,7 +179,7 @@
        
                                                                                
<div id="add_control_item_list_value" class="row">
                                                                                
        <label>Ny listeverdi</label>
-                                                                               
        <input type="text" name="option_value" />
+                                                                               
        <input type="" name="option_value" />
                                                                                
        <input class="btn" type="button" value="Legg til" />
                                                                                
</div>
                                                                        </div>
@@ -193,7 +199,7 @@
        
                                                                                
<div id="add_control_item_list_value" class="row">
                                                                                
        <label>Ny listeverdi</label>
-                                                                               
        <input type="text" name="option_value" />
+                                                                               
        <input type="" name="option_value" />
                                                                                
        <input class="btn" type="button" value="Legg til" />
                                                                                
</div>
                                                                        </div>
@@ -215,6 +221,10 @@
                                                <label 
for="control_area">Kontrollområde</label>
                                                <xsl:choose>
                                                        <xsl:when 
test="editable">
+                                                               <xsl:if 
test="control_item/error_msg_array/control_area_id != ''">
+                                                                       
<xsl:variable name="error_msg"><xsl:value-of 
select="control_item/error_msg_array/control_area_id" /></xsl:variable>
+                                                                       <div 
class='input_error_msg'><xsl:value-of select="php:function('lang', $error_msg)" 
/></div>
+                                                               </xsl:if>
                                                                <select 
class="required" id="control_area" name="control_area">
                                                                <option 
value="">Velg kontrollområde</option>
                                                                        
<xsl:for-each select="control_areas">
@@ -274,7 +284,11 @@
                                        <label for="what_to_do">Hva skal 
utføres</label>
                                        <xsl:choose>
                                                <xsl:when test="editable">
-                                                       <textarea 
name="what_to_do" id="what_to_do" rows="5" cols="60">
+                                                       <xsl:if 
test="control_item/error_msg_array/what_to_do != ''">
+                                                               <xsl:variable 
name="error_msg"><xsl:value-of select="control_item/error_msg_array/what_to_do" 
/></xsl:variable>
+                                                               <div 
class='input_error_msg'><xsl:value-of select="php:function('lang', $error_msg)" 
/></div>
+                                                       </xsl:if>
+                                                       <textarea 
name="what_to_do" id="what_to_do" rows="5" cols="60" class="required">
                                                                <xsl:value-of 
select="control_item/what_to_do" disable-output-escaping="yes" />
                                                        </textarea>
                                                </xsl:when>
@@ -287,7 +301,13 @@
                                        <label 
for="how_to_do">Utførelsesbeskrivelse</label>
                                        <xsl:choose>
                                                <xsl:when test="editable">
-                                                       <textarea 
name="how_to_do" id="how_to_do" rows="5" cols="60"><xsl:value-of 
select="control_item/how_to_do" disable-output-escaping="yes" /></textarea>
+                                                       <xsl:if 
test="control_item/error_msg_array/how_to_do != ''">
+                                                               <xsl:variable 
name="error_msg"><xsl:value-of select="control_item/error_msg_array/how_to_do" 
/></xsl:variable>
+                                                               <div 
class='input_error_msg'><xsl:value-of select="php:function('lang', $error_msg)" 
/></div>
+                                                       </xsl:if>
+                                                       <textarea 
name="how_to_do" id="how_to_do" rows="5" cols="60" class="required">
+                                                               <xsl:value-of 
select="control_item/how_to_do" disable-output-escaping="yes" />
+                                                       </textarea>
                                                </xsl:when>
                                                <xsl:otherwise>
                                                        <xsl:value-of 
select="control_item/how_to_do" disable-output-escaping="yes" />
@@ -307,8 +327,8 @@
                                        <xsl:otherwise>
                                                <a class="btn">
                                                        <xsl:attribute 
name="href">
-                                                               
<xsl:text>index.php?menuaction=controller.uicontrol_item.edit</xsl:text>
-                                                               
<xsl:text>&amp;id=</xsl:text>
+                                                               
<xsl:>index.php?menuaction=controller.uicontrol_item.edit</xsl:>
+                                                               
<xsl:>&amp;id=</xsl:>
                                                                <xsl:value-of 
select="control_item/id"/>
                                                        </xsl:attribute>
                                                        <xsl:value-of 
select="php:function('lang', 'edit')" />

Modified: trunk/controller/templates/base/css/base.css
===================================================================
--- trunk/controller/templates/base/css/base.css        2012-07-11 12:19:23 UTC 
(rev 9757)
+++ trunk/controller/templates/base/css/base.css        2012-07-11 12:39:52 UTC 
(rev 9758)
@@ -1078,9 +1078,11 @@
 
 /* ====================================  CALENDAR  
========================================= */
 #control_plan .top h3 {
+  clear: left;
   float: left;
   font-size: 19px;
-  margin: 0;
+  margin-bottom: 1em;
+  margin-top: 0;
   padding: 0;
 }
 
@@ -1280,8 +1282,9 @@
        width: 150px;
 }
 
-#calendar .location_name, #calendar .component_type {
+#calendar .location-name, #calendar .component-type {
        width: 150px;
+       text-align: left;
 }
 
 #calendar .frequency {
@@ -1289,7 +1292,7 @@
     width: 100px;
 }
 
-#calendar .frequency, #calendar .title, #calendar .assigned, #calendar 
.location_name {
+#calendar .frequency, #calendar .title, #calendar .assigned, #calendar 
.location-name {
     text-align: left;
 }
 




reply via email to

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