[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [10374]
From: |
Torstein |
Subject: |
[Fmsystem-commits] [10374] |
Date: |
Tue, 30 Oct 2012 07:58:15 +0000 |
Revision: 10374
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10374
Author: vator
Date: 2012-10-30 07:58:14 +0000 (Tue, 30 Oct 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/logistic/templates/base/requirement/requirement_overview.xsl
Modified: trunk/logistic/templates/base/requirement/requirement_overview.xsl
===================================================================
--- trunk/logistic/templates/base/requirement/requirement_overview.xsl
2012-10-30 07:43:54 UTC (rev 10373)
+++ trunk/logistic/templates/base/requirement/requirement_overview.xsl
2012-10-30 07:58:14 UTC (rev 10374)
@@ -1,8 +1,24 @@
-<xsl:template match="data" xmlns:php="http://php.net/xsl">
+<func:function name="phpgw:conditional">
+ <xsl:param name="test"/>
+ <xsl:param name="true"/>
+ <xsl:param name="false"/>
+
+ <func:result>
+ <xsl:choose>
+ <xsl:when test="$test">
+ <xsl:value-of select="$true"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$false"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </func:result>
+</func:function>
+
+<xsl:template match="data" xmlns:php="http://php.net/xsl">
<xsl:call-template name="yui_phpgw_i18n"/>
- <div class="content-wrp">
-
+ <div style="margin: 20px; padding: 20px;" class="content-wrp">
<form action="" name="acl_form" id="acl_form" method="post">
<div id="paging"></div>
@@ -10,15 +26,36 @@
<div id="allocation-container"></div>
</form>
-
- <xsl:apply-templates select="datasource-definition"/>
</div>
+ <xsl:call-template name="datasource-definition" />
</xsl:template>
-<xsl:template match="datasource-definition">
+<xsl:template name="datasource-definition">
+
<script>
-
- YAHOO.portico.columnDefs = [
+ YAHOO.util.Event.onDOMReady(function(){
+
+ <xsl:choose>
+ <xsl:when test="//datatable/actions">
+ YAHOO.portico.actions = [
+ <xsl:for-each
select="//datatable/actions">
+ {
+ my_name: "<xsl:value-of
select="my_name"/>",
+ text: "<xsl:value-of
select="text"/>",
+ <xsl:if
test="parameters">
+ parameters:
<xsl:value-of select="parameters"/>,
+ </xsl:if>
+ action: "<xsl:value-of
select="action"/>"
+ }<xsl:value-of
select="phpgw:conditional(not(position() = last()), ',', '')"/>
+ </xsl:for-each>
+ ];
+ </xsl:when>
+ <xsl:otherwise>
+ YAHOO.portico.actions = [];
+ </xsl:otherwise>
+ </xsl:choose>
+
+ YAHOO.portico.columnDefs = [
<xsl:for-each select="//datatable/field">
{
resizeable: true,
@@ -41,15 +78,26 @@
</xsl:for-each>
];
- YAHOO.portico.dataSourceUrl = '<xsl:value-of
select="source"/>';
+ var reqUrl = '<xsl:value-of
select="//datatable/source"/>';
-
- YAHOO.portico.inlineTableHelper('requirement-container',
YAHOO.portico.dataSourceUrl, YAHOO.portico.columnDefs, null, null);
+
YAHOO.portico.inlineTableHelper('requirement-container', reqUrl,
YAHOO.portico.columnDefs);
+
+ var oArgs = {
+
menuaction:'logistic.uirequirement_resource_allocation.index',
+ requirement_id: '2',
+ phpgw_return_as: 'json'
+ };
+
+ var requestUrl = phpGWLink('index.php', oArgs, true);
+ var myColumnDefs = [
+ {key:"id", sortable:true},
+ {key:"requirement_id", sortable:true},
+ {key:"location_id", sortable:true},
+ {key:"resource_id", sortable:true}
+ ];
- YAHOO.portico.inlineTableHelper('allocation-container',
YAHOO.portico.dataSourceUrl, YAHOO.portico.columnDefs, null, null);
-
-
-
- </script>
+ YAHOO.portico.inlineTableHelper('allocation-container',
requestUrl, myColumnDefs);
+ });
+ </script>
</xsl:template>
\ No newline at end of file
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [10374],
Torstein <=