fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [14253]


From: Nelson Guerra
Subject: [Fmsystem-commits] [14253]
Date: Fri, 30 Oct 2015 00:11:07 +0000

Revision: 14253
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14253
Author:   nelson224
Date:     2015-10-30 00:11:06 +0000 (Fri, 30 Oct 2015)
Log Message:
-----------


Modified Paths:
--------------
    branches/dev-syncromind/frontend/templates/base/entity.xsl

Modified: branches/dev-syncromind/frontend/templates/base/entity.xsl
===================================================================
--- branches/dev-syncromind/frontend/templates/base/entity.xsl  2015-10-30 
00:10:28 UTC (rev 14252)
+++ branches/dev-syncromind/frontend/templates/base/entity.xsl  2015-10-30 
00:11:06 UTC (rev 14253)
@@ -1,37 +1,104 @@
 <!-- $Id$ -->
 <xsl:template match="entity" xmlns:php="http://php.net/xsl";>
+       
     <xsl:variable name="form_action"><xsl:value-of 
select="form_action"/></xsl:variable>
-    <div class="yui-navset" id="entity_tabview">
-        <xsl:value-of disable-output-escaping="yes" select="tabs" />
-        <div class="yui-content">
-               <xsl:choose>
-                               <xsl:when 
test="normalize-space(//header/selected_location) != ''">
-                                       <div class="toolbar-container">
-                               <div class="toolbar">
-                                   <xsl:apply-templates 
select="datatable/actions" />  
-                               </div>
-                           </div>
-                           <div class="entity">
-                               <table cellpadding="2" cellspacing="2" 
width="95%" align="center">
-                                               <xsl:choose>
-                                                   <xsl:when test="msgbox_data 
!= ''">
-                                                       <tr>
-                                                           <td align="left" 
colspan="3">
-                                                               
<xsl:call-template name="msgbox"/>
-                                                           </td>
-                                                       </tr>
-                                                   </xsl:when>
-                                               </xsl:choose>
-                                           </table>
-                               <xsl:apply-templates select="datatable" />
-                           </div>
-                               </xsl:when>
-                               <xsl:otherwise>
-                                       <div class="entity">
-                               <xsl:value-of select="php:function('lang', 
'no_buildings')"/>
-                           </div>
-                               </xsl:otherwise>
-                       </xsl:choose>
-        </div>
-    </div>
+       <xsl:variable name="location_id"><xsl:value-of 
select="location_id"/></xsl:variable>
+       
+       <form id="form" name="form" method="post" action="{$form_action}" 
class="pure-form pure-form-aligned">
+               <div id="tab-content">
+                       <xsl:value-of disable-output-escaping="yes" 
select="tabs" />
+                       <div id="{$location_id}">
+                               <xsl:choose>
+                                       <xsl:when 
test="normalize-space(//header/selected_location) != ''">
+                                               <div class="toolbar-container">
+                                                       <div>
+                                                               <xsl:for-each 
select="filters">
+                                                                       
<xsl:variable name="name"><xsl:value-of select="name"/></xsl:variable>
+                                                                       <select 
id="{$name}" name="{$name}">
+                                                                               
<xsl:for-each select="list">
+                                                                               
        <xsl:variable name="id"><xsl:value-of select="id"/></xsl:variable>
+                                                                               
        <xsl:choose>
+                                                                               
                <xsl:when test="id = 'NEW'">
+                                                                               
                        <option value="{$id}" selected="selected">
+                                                                               
                                <xsl:value-of select="name"/>
+                                                                               
                        </option>
+                                                                               
                </xsl:when>
+                                                                               
                <xsl:otherwise>
+                                                                               
                        <xsl:choose>
+                                                                               
                                <xsl:when test="selected = 'selected'">
+                                                                               
                                        <option value="{$id}" 
selected="selected">
+                                                                               
                                                <xsl:value-of select="name"/>
+                                                                               
                                        </option>
+                                                                               
                                </xsl:when>
+                                                                               
                                <xsl:otherwise>
+                                                                               
                                        <option value="{$id}">
+                                                                               
                                                <xsl:value-of select="name"/>
+                                                                               
                                        </option>
+                                                                               
                                </xsl:otherwise>
+                                                                               
                        </xsl:choose>
+                                                                               
                </xsl:otherwise>
+                                                                               
        </xsl:choose>
+                                                                               
</xsl:for-each>
+                                                                       
</select>                                                                       
+                                                               </xsl:for-each>
+                                                       </div>
+                                               </div>
+                                               <div>
+                                                       <table cellpadding="2" 
cellspacing="2" width="95%" align="center">
+                                                               <xsl:choose>
+                                                                       
<xsl:when test="msgbox_data != ''">
+                                                                               
<tr>
+                                                                               
        <td align="left" colspan="3">
+                                                                               
                <xsl:call-template name="msgbox"/>
+                                                                               
        </td>
+                                                                               
</tr>
+                                                                       
</xsl:when>
+                                                               </xsl:choose>
+                                                       </table>
+               
+                                                       <xsl:for-each 
select="datatable_def">
+                                                               <xsl:if 
test="container = 'datatable-container_0'">
+                                                                       
<xsl:call-template name="table_setup">
+                                                                               
<xsl:with-param name="container" select ='container'/>
+                                                                               
<xsl:with-param name="requestUrl" select ='requestUrl' />
+                                                                               
<xsl:with-param name="ColumnDefs" select ='ColumnDefs' />
+                                                                               
<xsl:with-param name="tabletools" select ='tabletools' />
+                                                                               
<xsl:with-param name="data" select ='data' />
+                                                                               
<xsl:with-param name="config" select ='config' />
+                                                                       
</xsl:call-template>
+                                                               </xsl:if>
+                                                       </xsl:for-each>         
                                
+                                               </div>
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <div class="entity">
+                                                       <xsl:value-of 
select="php:function('lang', 'no_buildings')"/>
+                                               </div>                          
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </div>
+               </div>
+       </form>
+       <script type="text/javascript" class="init">
+
+               <xsl:for-each select="filters">
+                       <xsl:if test="type = 'filter'">
+                               $('select#<xsl:value-of 
select="name"/>').change( function() 
+                               {
+                                       <xsl:value-of select="extra"/>
+                                       filterData('<xsl:value-of 
select="name"/>', $(this).val());
+                               });
+                       </xsl:if>
+               </xsl:for-each>
+
+               <![CDATA[
+                       function filterData(param, value)
+                       {
+                               
oTable0.dataTableSettings[0]['ajax']['data'][param] = value;
+                               oTable0.fnDraw();
+                       }
+               ]]>
+               
+       </script>
 </xsl:template>
+




reply via email to

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