[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [7645] controller: example on seprate tabs and inline
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [7645] controller: example on seprate tabs and inline tables |
Date: |
Sun, 18 Sep 2011 12:38:49 +0000 |
Revision: 7645
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7645
Author: sigurdne
Date: 2011-09-18 12:38:48 +0000 (Sun, 18 Sep 2011)
Log Message:
-----------
controller: example on seprate tabs and inline tables
Modified Paths:
--------------
trunk/controller/inc/class.uicontrol_item2.inc.php
Added Paths:
-----------
trunk/controller/js/yahoo/example_separate_tabs.js
trunk/controller/templates/base/example_separate_tabs.xsl
Modified: trunk/controller/inc/class.uicontrol_item2.inc.php
===================================================================
--- trunk/controller/inc/class.uicontrol_item2.inc.php 2011-09-18 12:05:13 UTC
(rev 7644)
+++ trunk/controller/inc/class.uicontrol_item2.inc.php 2011-09-18 12:38:48 UTC
(rev 7645)
@@ -168,6 +168,7 @@
'tabs' =>
$GLOBALS['phpgw']->common->create_tabs($tabs, $selected),
'resource' => $resource
);
+ $GLOBALS['phpgw']->js->validate_file( 'yahoo',
'example_separate_tabs', 'controller' );
self::render_template_xsl('example_separate_tabs',
$data);
}
Added: trunk/controller/js/yahoo/example_separate_tabs.js
===================================================================
--- trunk/controller/js/yahoo/example_separate_tabs.js
(rev 0)
+++ trunk/controller/js/yahoo/example_separate_tabs.js 2011-09-18 12:38:48 UTC
(rev 7645)
@@ -0,0 +1,13 @@
+YAHOO.util.Event.addListener(window, "load", function() {
+
+ var oArgs =
{menuaction:'booking.uidocument_resource.index',sort:'name',filter_owner_id:resource_id};
+ var url = phpGWLink('index.php', oArgs, true);
+ var colDefs = [{key: 'name', label: lang['Name'], formatter:
YAHOO.portico.formatLink}, {key: 'category', label: lang['Category']}, {key:
'actions', label: lang['Actions'], formatter:
YAHOO.portico.formatGenericLink(lang['Edit'], lang['Delete'])}];
+ YAHOO.portico.inlineTableHelper('documents_container', url, colDefs);
+
+ var oArgs =
{menuaction:'booking.uipermission_resource.index',sort:'name',filter_object_id:resource_id};
+ var url = phpGWLink('index.php', oArgs, true);
+ var colDefs = [{key: 'subject_name', label: lang['Account']}, {key:
'role', label: lang['Role']}, {key: 'actions', label: lang['Actions'],
formatter: YAHOO.portico.formatGenericLink(lang['Edit'], lang['Delete'])}];
+ YAHOO.portico.inlineTableHelper('permissions_container', url, colDefs);
+});
+
Added: trunk/controller/templates/base/example_separate_tabs.xsl
===================================================================
--- trunk/controller/templates/base/example_separate_tabs.xsl
(rev 0)
+++ trunk/controller/templates/base/example_separate_tabs.xsl 2011-09-18
12:38:48 UTC (rev 7645)
@@ -0,0 +1,25 @@
+<!-- separate tabs and inline tables-->
+
+<xsl:template match="data" xmlns:php="http://php.net/xsl">
+ <xsl:value-of disable-output-escaping="yes" select="tabs"/>
+
+ <div id="content">
+ <h4><xsl:value-of select="php:function('lang', 'Documents')"
/></h4>
+ <div id="documents_container"/>
+ <a class='button'>
+ <xsl:attribute name="href"><xsl:value-of
select="resource/add_document_link"/></xsl:attribute>
+ <xsl:if test="resource/permission/write">
+ <xsl:value-of select="php:function('lang', 'Add
Document')" />
+ </xsl:if>
+ </a>
+ <h4><xsl:value-of select="php:function('lang', 'Permissions')"
/></h4>
+ <div id="permissions_container"/>
+ </div>
+
+<script type="text/javascript">
+var resource_id = <xsl:value-of select="resource/id"/>;
+ var lang = <xsl:value-of select="php:function('js_lang', 'Name',
'Category', 'Actions', 'Edit', 'Delete', 'Account', 'Role')"/>;
+</script>
+
+</xsl:template>
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [7645] controller: example on seprate tabs and inline tables,
Sigurd Nes <=