fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [12135] fix formatter for jquery


From: Sigurd Nes
Subject: [Fmsystem-commits] [12135] fix formatter for jquery
Date: Thu, 09 Oct 2014 20:37:11 +0000

Revision: 12135
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=12135
Author:   sigurdne
Date:     2014-10-09 20:37:10 +0000 (Thu, 09 Oct 2014)
Log Message:
-----------
fix formatter for jquery

Modified Paths:
--------------
    branches/dev-syncromind/phpgwapi/inc/class.uicommon_jquery.inc.php
    branches/dev-syncromind/phpgwapi/templates/base/datatable_jquery.xsl
    branches/dev-syncromind/phpgwapi/templates/base/jquery_phpgw_i18n.xsl

Added Paths:
-----------
    branches/dev-syncromind/phpgwapi/js/jquery/common.js

Modified: branches/dev-syncromind/phpgwapi/inc/class.uicommon_jquery.inc.php
===================================================================
--- branches/dev-syncromind/phpgwapi/inc/class.uicommon_jquery.inc.php  
2014-10-09 20:36:20 UTC (rev 12134)
+++ branches/dev-syncromind/phpgwapi/inc/class.uicommon_jquery.inc.php  
2014-10-09 20:37:10 UTC (rev 12135)
@@ -67,8 +67,9 @@
                                self::add_javascript('phpgwapi', 'yui3', 
'yui/yui-min.js');
                                self::add_javascript('phpgwapi', $yui, 
'common.js');
                        }
-                       //self::add_javascript('phpgwapi', "jquery", 
'common.js');
 
+                       self::add_javascript('phpgwapi', "jquery", 'common.js');
+
                        $this->url_prefix = str_replace('_', '.', 
get_class($this));
 
                        $this->dateFormat = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];

Added: branches/dev-syncromind/phpgwapi/js/jquery/common.js
===================================================================
--- branches/dev-syncromind/phpgwapi/js/jquery/common.js                        
        (rev 0)
+++ branches/dev-syncromind/phpgwapi/js/jquery/common.js        2014-10-09 
20:37:10 UTC (rev 12135)
@@ -0,0 +1,13 @@
+/* 
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+//Namespacing
+;var JqueryPortico = {};
+
+JqueryPortico.formatLink = function(key, oData) {
+       var name = oData[key];
+       var link = oData['link'];
+       return '<a href="' + link + '">' + name + '</a>';
+};

Modified: branches/dev-syncromind/phpgwapi/templates/base/datatable_jquery.xsl
===================================================================
--- branches/dev-syncromind/phpgwapi/templates/base/datatable_jquery.xsl        
2014-10-09 20:36:20 UTC (rev 12134)
+++ branches/dev-syncromind/phpgwapi/templates/base/datatable_jquery.xsl        
2014-10-09 20:37:10 UTC (rev 12135)
@@ -318,7 +318,7 @@
                                        <xsl:if test="formatter">
                                         render: function (dummy1, dummy2, 
oData) {
                                                        try {
-                                                               var ret = 
<xsl:value-of select="formatter"/>(oData);
+                                                               var ret = 
<xsl:value-of select="formatter"/>("<xsl:value-of select="key"/>", oData);
                                                        }
                                                        catch(err) {
                                                                return 
err.message;

Modified: branches/dev-syncromind/phpgwapi/templates/base/jquery_phpgw_i18n.xsl
===================================================================
--- branches/dev-syncromind/phpgwapi/templates/base/jquery_phpgw_i18n.xsl       
2014-10-09 20:36:20 UTC (rev 12134)
+++ branches/dev-syncromind/phpgwapi/templates/base/jquery_phpgw_i18n.xsl       
2014-10-09 20:37:10 UTC (rev 12135)
@@ -1,9 +1,6 @@
        <xsl:template name="jquery_phpgw_i18n" xmlns:php="http://php.net/xsl";>
                <xsl:if test="jquery_phpgw_i18n">
                        <script type="text/javascript">
-                               //Namespacing
-                               ;var JqueryPortico = {};
-
                                JqueryPortico.i18n = {
                                <xsl:for-each select="jquery_phpgw_i18n/*">
                                        <xsl:value-of select="local-name()"/>: 
function(cfg)




reply via email to

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