[Piwik-svn] r206 - in trunk: libs/Smarty/plugins plugins/Home/templates plugins/Widgetize plugins/Widgetize/templates
svnmaster at piwik.org
svnmaster at piwik.org
Sun Jan 20 02:43:23 CET 2008
Author: matt
Date: 2008-01-20 02:43:23 +0100 (Sun, 20 Jan 2008)
New Revision: 206
Added:
trunk/plugins/Widgetize/templates/test_jsinclude2.tpl
Modified:
trunk/libs/Smarty/plugins/modifier.escape.php
trunk/plugins/Home/templates/cloud.tpl
trunk/plugins/Home/templates/datatable.js
trunk/plugins/Widgetize/Controller.php
trunk/plugins/Widgetize/templates/index.tpl
trunk/plugins/Widgetize/templates/test_jsinclude.tpl
Log:
- testing js include...
Modified: trunk/libs/Smarty/plugins/modifier.escape.php
===================================================================
--- trunk/libs/Smarty/plugins/modifier.escape.php 2008-01-20 01:15:04 UTC (rev 205)
+++ trunk/libs/Smarty/plugins/modifier.escape.php 2008-01-20 01:43:23 UTC (rev 206)
@@ -62,7 +62,8 @@
case 'javascript':
// escape quotes and backslashes, newlines, etc.
- return strtr($string, array('\\'=>'\\\\',"'"=>"\\'",'"'=>'\\"',"\r"=>'\\r',"\n"=>'\\n','</'=>'<\/'));
+ return strtr($string, array('\\'=>'\\\\',"'"=>"\\'",'"'=>'\\"',"\r"=>'\\r',"\n"=>'\\n','</'=>'<\/',
+ 'script' => "sc'+'ript"));
case 'mail':
// safe way to display e-mail address on a web page
Modified: trunk/plugins/Home/templates/cloud.tpl
===================================================================
--- trunk/plugins/Home/templates/cloud.tpl 2008-01-20 01:15:04 UTC (rev 205)
+++ trunk/plugins/Home/templates/cloud.tpl 2008-01-20 01:43:23 UTC (rev 206)
@@ -1,7 +1,7 @@
<div id="{$id}" class="parentDiv">
{literal}
<style>
-<!--
+
#tagCloud{
width:500px;
}
@@ -45,7 +45,6 @@
color: #A3A8B6;
font-size: 11px;
}
-//-->
</style>
{/literal}
Modified: trunk/plugins/Home/templates/datatable.js
===================================================================
--- trunk/plugins/Home/templates/datatable.js 2008-01-20 01:15:04 UTC (rev 205)
+++ trunk/plugins/Home/templates/datatable.js 2008-01-20 01:43:23 UTC (rev 206)
@@ -4,7 +4,6 @@
//A list of all our datatables
var dataTables = new Object;
-
//On document ready we create a JS object for every datatable in the page
$(document).ready( createAllDataTableObjects );
Modified: trunk/plugins/Widgetize/Controller.php
===================================================================
--- trunk/plugins/Widgetize/Controller.php 2008-01-20 01:15:04 UTC (rev 205)
+++ trunk/plugins/Widgetize/Controller.php 2008-01-20 01:43:23 UTC (rev 206)
@@ -31,12 +31,19 @@
echo $view->render();
}
+
-
- function testJsInclude()
+ function testJsInclude1()
{
$view = new Piwik_View('Widgetize/templates/test_jsinclude.tpl');
$view->url1 = '?module=Widgetize&action=js&moduleToWidgetize=Home&actionToWidgetize=getBrowser&idSite=1&period=day&date=yesterday';
+ echo $view->render();
+ }
+
+ function testJsInclude2()
+ {
+ $view = new Piwik_View('Widgetize/templates/test_jsinclude2.tpl');
+ $view->url1 = '?module=Widgetize&action=js&moduleToWidgetize=Home&actionToWidgetize=getBrowser&idSite=1&period=day&date=yesterday';
$view->url2 = '?module=Widgetize&action=js&moduleToWidgetize=Home&actionToWidgetize=getCountry&idSite=1&period=day&date=yesterday&viewDataTable=cloud&showDataTableFooter=0';
echo $view->render();
}
Modified: trunk/plugins/Widgetize/templates/index.tpl
===================================================================
--- trunk/plugins/Widgetize/templates/index.tpl 2008-01-20 01:15:04 UTC (rev 205)
+++ trunk/plugins/Widgetize/templates/index.tpl 2008-01-20 01:43:23 UTC (rev 206)
@@ -1,5 +1,6 @@
<ul>
<li><a href='?module=Widgetize&action=testIframe'>Test getCountry table in a IFRAME</li>
-<li><a href='?module=Widgetize&action=testJsInclude'>Test getCountry table in a JS include</a></li>
+<li><a href='?module=Widgetize&action=testJsInclude1'>Test getCountry table in a JS include</a></li>
+<li><a href='?module=Widgetize&action=testJsInclude2'>Test include 2 tables in 2 JS include in one page</a></li>
</ul>
\ No newline at end of file
Modified: trunk/plugins/Widgetize/templates/test_jsinclude.tpl
===================================================================
--- trunk/plugins/Widgetize/templates/test_jsinclude.tpl 2008-01-20 01:15:04 UTC (rev 205)
+++ trunk/plugins/Widgetize/templates/test_jsinclude.tpl 2008-01-20 01:43:23 UTC (rev 206)
@@ -1,26 +1,14 @@
<html>
<body>
-<h2>Test getCountry table in a JS include</h2>
+<p>This text is after the JS INCLUDE</p>
-<script type="text/javascript" src="{$url1}"></script>
-<noscript>Powered by <a href="http://piwik.org">Piwik</a></div></noscript>
-{literal}
-<style>
-table.dataTable td {
- background-color:red;
-}
-</style>
-{/literal}
-<p>This test is after the JS INCLUDE</p>
-
-
<h2>Test tag cloud in a JS include</h2>
-<script type="text/javascript" src="{$url2}"></script>
+<script type="text/javascript" src="{$url1}"></script>
<noscript>Powered by <a href="http://piwik.org">Piwik</a></div></noscript>
-<p>This test is after the JS INCLUDE</p>
+<p>This text is after the JS INCLUDE</p>
</body>
</html>
\ No newline at end of file
Added: trunk/plugins/Widgetize/templates/test_jsinclude2.tpl
===================================================================
--- trunk/plugins/Widgetize/templates/test_jsinclude2.tpl (rev 0)
+++ trunk/plugins/Widgetize/templates/test_jsinclude2.tpl 2008-01-20 01:43:23 UTC (rev 206)
@@ -0,0 +1,20 @@
+<html>
+<body>
+<p>This text is after the JS INCLUDE</p>
+
+<h2>Test table in a JS include</h2>
+
+<script type="text/javascript" src="{$url1}"></script>
+<noscript>Powered by <a href="http://piwik.org">Piwik</a></div></noscript>
+
+<p>This text is after the JS INCLUDE</p>
+
+<h2>Test tag cloud in a JS include</h2>
+
+<script type="text/javascript" src="{$url2}"></script>
+<noscript>Powered by <a href="http://piwik.org">Piwik</a></div></noscript>
+
+<p>This text is after the JS INCLUDE</p>
+
+</body>
+</html>
\ No newline at end of file
More information about the Piwik-svn
mailing list