fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [9646]


From: Torstein
Subject: [Fmsystem-commits] [9646]
Date: Fri, 22 Jun 2012 10:20:13 +0000

Revision: 9646
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9646
Author:   vator
Date:     2012-06-22 10:20:13 +0000 (Fri, 22 Jun 2012)
Log Message:
-----------


Modified Paths:
--------------
    trunk/controller/inc/component/class.year_calendar.inc.php
    trunk/controller/inc/model/class.component.inc.php
    trunk/controller/js/controller/ajax.js
    trunk/controller/templates/base/calendar/view_calendar_year.xsl
    trunk/controller/templates/base/css/base.css

Modified: trunk/controller/inc/component/class.year_calendar.inc.php
===================================================================
--- trunk/controller/inc/component/class.year_calendar.inc.php  2012-06-22 
10:19:58 UTC (rev 9645)
+++ trunk/controller/inc/component/class.year_calendar.inc.php  2012-06-22 
10:20:13 UTC (rev 9646)
@@ -79,7 +79,6 @@
                        $this->calendar_array[ $month_nr ]["status"] = 
$check_list_status_info->get_status();
                        $this->calendar_array[ $month_nr ]["info"]   = 
$check_list_status_info->serialize();
                }
-               print_r( $this->calendar_array );
                
                return $this->calendar_array;
        }

Modified: trunk/controller/inc/model/class.component.inc.php
===================================================================
--- trunk/controller/inc/model/class.component.inc.php  2012-06-22 10:19:58 UTC 
(rev 9645)
+++ trunk/controller/inc/model/class.component.inc.php  2012-06-22 10:20:13 UTC 
(rev 9646)
@@ -37,6 +37,8 @@
                protected $id;
                protected $guid;
                protected $xml;
+               // Not a table column
+               protected $xml_short_desc;
                protected $location_code;
                protected $loc_1;
                protected $address;

Modified: trunk/controller/js/controller/ajax.js
===================================================================
--- trunk/controller/js/controller/ajax.js      2012-06-22 10:19:58 UTC (rev 
9645)
+++ trunk/controller/js/controller/ajax.js      2012-06-22 10:20:13 UTC (rev 
9646)
@@ -6,7 +6,6 @@
                
        }
        
-       
        /* ================================  SEARCH LOCATION BOX  
========================== */
        
        // Changes location level between building and property in serch 
location select box
@@ -50,6 +49,22 @@
                 window.location.href = requestUrl;
     });
        
+       $("#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

Modified: trunk/controller/templates/base/calendar/view_calendar_year.xsl
===================================================================
--- trunk/controller/templates/base/calendar/view_calendar_year.xsl     
2012-06-22 10:19:58 UTC (rev 9645)
+++ trunk/controller/templates/base/calendar/view_calendar_year.xsl     
2012-06-22 10:20:13 UTC (rev 9646)
@@ -123,18 +123,54 @@
                        
                        <!-- =====================  COLOR ICON MAP  
================= -->
                        <xsl:call-template name="icon_color_map" />
+                                       
+                       <!-- =====================  FILTERS  ================= 
-->
+                       <form id="filters" class="select-box" 
action="index.php?menuaction=controller.uicalendar.view_calendar_for_year" 
method="post">
+                               <input type="hidden" name="year">
+                                       <xsl:attribute name="value">
+                                       <xsl:value-of select="current_year"/>
+                                       </xsl:attribute>
+                               </input>
+                               <input type="hidden" name="location_code">
+                                       <xsl:attribute name="value">
+                                               <xsl:value-of 
select="current_location/location_code"/>
+                                               </xsl:attribute>
+                               </input>
+                               <input type="hidden" name="repeat_type">
+                                       <xsl:attribute name="value">
+                                               <xsl:value-of 
select="current_repeat_type"/>
+                                       </xsl:attribute>
+                               </input>
+                               <input type="hidden" name="role">
+                                       <xsl:attribute name="value">
+                                               <xsl:value-of 
select="current_role"/>
+                                       </xsl:attribute>
+                               </input>
+                               
+                               <div class="filter first">
+                                       <label>Filtrer på rolle</label>
+                                       <select id="filter-role">
+                                               <xsl:for-each 
select="roles_array">
+                                                       <xsl:variable 
name="role_id"><xsl:value-of select="id"/></xsl:variable>
+                                                       <option 
value="{$role_id}">
+                                                               <xsl:value-of 
disable-output-escaping="yes" select="name"/>
+                                                       </option>
+                                               </xsl:for-each>
+                                       </select>
+                               </div>
+                               <div class="filter">
+                               <label>Filtrer på frekvenstype</label>
+                                       <select class="required" 
id="filter-repeat_type" name="repeat_type">
+                                               <option value="" 
selected="selected" >Velg frekvenstype</option>
+                                               <xsl:for-each 
select="repeat_type_array">
+                                                       <option value="{id}">
+                                                               <xsl:value-of 
disable-output-escaping="yes" select="value"/>
+                                                       </option>
+                                               </xsl:for-each>
+                                       </select>
+                               </div>
+                       </form>
                        
-                               <select>
-                                       <xsl:for-each select="roles_array">
-                                               <xsl:variable 
name="role_id"><xsl:value-of select="id"/></xsl:variable>
-                                               <option value="{$role_id}">
-                                                       <xsl:value-of 
disable-output-escaping="yes" select="name"/>
-                                               </option>
-                                       </xsl:for-each>
-                               </select>
-                       
-                       
-                       
                        <!-- =====================  CALENDAR NAVIGATION  
================= -->
                        <div id="calNav">
                                <a class="showPrev">
@@ -273,15 +309,16 @@
                                                </th>
                                        </xsl:for-each>
                                </tr>
+                               
+                               
                <xsl:for-each select="components_calendar_array">
+                 <tr>
+                   <td>
+                           <h3><xsl:value-of select="component/xml"/></h3>
+                   </td>
+                 </tr>
                
-               <tr>
-               <td>
-                       <h3><xsl:value-of 
select="component/location_code"/></h3>
-               </td>
                        <xsl:for-each select="controls_calendar">
-                       
-                               
                                        <xsl:variable 
name="control_id"><xsl:value-of select="control/id"/></xsl:variable>
                                
                                        <tr>
@@ -326,8 +363,6 @@
                                                        </xsl:for-each>
                                        </tr>   
                                </xsl:for-each> 
-                       
-               </tr>
                
                </xsl:for-each>
                

Modified: trunk/controller/templates/base/css/base.css
===================================================================
--- trunk/controller/templates/base/css/base.css        2012-06-22 10:19:58 UTC 
(rev 9645)
+++ trunk/controller/templates/base/css/base.css        2012-06-22 10:20:13 UTC 
(rev 9646)
@@ -1053,24 +1053,24 @@
 
 /* ====================================  CALENDAR  
========================================= */
 #control_plan .top h3 {
-    float: left;
-    font-size: 19px;
-    margin: 0;
+  float: left;
+  font-size: 19px;
+  margin: 0;
 }
 
 #control_plan .top h3 .year{
-   margin-left:5px;
+  margin-left:5px;
 }
 
 #control_plan .middle {
-    background: none repeat scroll 0 0 #EDF5FF;
-    border-color: #DBE5EF;
-    border-style: solid solid none;
-    border-width: 1px 1px 0;
-    clear: both;
-    margin-top: 1em;
-    overflow: hidden;
-    padding: 1em 1em 0;
+  background: none repeat scroll 0 0 #EDF5FF;
+  border-color: #DBE5EF;
+  border-style: solid solid none;
+  border-width: 1px 1px 0;
+  clear: both;
+  margin-top: 1em;
+  overflow: hidden;
+  padding: 1em 1em 0;
 }
 
 /* =============================  SEARCH LOCATION BOX  ======================= 
*/
@@ -1085,14 +1085,33 @@
 }
 
 #choose-my-location {
-    float: right;
-    margin-right: 10px;
+  float: right;
+  margin-right: 10px;
 }
 
 #choose-building {
+  float: left;
+}
+
+#filters {
+  clear: left;
+  float: left;
+  margin-top: 2em;
+}
+
+#filters.select-box {
+  background: none repeat scroll 0 0 #DEEAF8;
+  border: 1px solid #BDD3ED;
+}
+
+#filters .filter {
     float: left;
 }
 
+#filters .filter.first {
+    margin-right: 1em;
+}
+
 .month_view #choose-building {
     clear:left;
     margin-top: 1em;




reply via email to

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