Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatthieu_ <matthieu_@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2007-09-18 14:36:04 +0400
committermatthieu_ <matthieu_@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2007-09-18 14:36:04 +0400
commit821930515aa95c4ca1367ab33879e6208d6d7db7 (patch)
treea388ea795d1a4a0f49781283283ad8152503f8aa
parent5f80dfd757c207c0963cf790fe61fa220dcc1382 (diff)
Added test for the URL which seems buggy on windows
Fixed some bugs in Opera (still some bugs remaining in the Action table, see TODO)
-rw-r--r--TODO6
-rw-r--r--modules/Url.php3
-rw-r--r--modules/ViewDataTable/Graph.php4
-rw-r--r--plugins/UserSettings/templates/datatable.js2
-rw-r--r--plugins/UserSettings/templates/datatable_actions.tpl6
-rw-r--r--plugins/UserSettings/templates/datatable_footer.tpl8
-rw-r--r--plugins/UserSettings/templates/graph.tpl9
-rwxr-xr-xtests/config_test.php2
-rw-r--r--tests/modules/Url.test.php49
9 files changed, 68 insertions, 21 deletions
diff --git a/TODO b/TODO
index 795f20a359..6ea2f082c8 100644
--- a/TODO
+++ b/TODO
@@ -46,6 +46,12 @@ User Interface
- add the columns containing the % values based on the nb_visits or nb_visitors
- when a given output is chosen (Tag cloud) hide the icon under the datatable
+Browsers bugs
+==============
+Opera 9.23 windows
+ - actions expanding / collapse doesnt work. always expand. multiple clicks load the content multiple times
+ - the columns width are changing when sorting the columns, annoying effect
+
TODO MISC
=========
- check that ajax called made once per request
diff --git a/modules/Url.php b/modules/Url.php
index 72df3763c3..a5dfab2a98 100644
--- a/modules/Url.php
+++ b/modules/Url.php
@@ -1,7 +1,7 @@
<?php
+
class Piwik_Url
{
-
static function getCurrentQueryStringWithParametersModified( $params )
{
$queryString = Piwik_Url::getCurrentQueryString();
@@ -116,4 +116,3 @@ class Piwik_Url
}
}
-//echo Piwik_Url::getCurrentCompleteUrl(); \ No newline at end of file
diff --git a/modules/ViewDataTable/Graph.php b/modules/ViewDataTable/Graph.php
index 786d6a31d4..8e639fbdda 100644
--- a/modules/ViewDataTable/Graph.php
+++ b/modules/ViewDataTable/Graph.php
@@ -43,6 +43,8 @@ class Piwik_ViewDataTable_Graph extends Piwik_ViewDataTable
$view->jsInvocationTag = $this->getFlashInvocationCode($url);
// print($url);exit;
$view->urlData = $url;
+
+ $view->formId = "formEmbed".$this->id;
$view->codeEmbed = $this->codeEmbed;
$view->javascriptVariablesToSet = $this->getJavascriptVariablesToSet();
@@ -98,7 +100,7 @@ class Piwik_ViewDataTable_Graph extends Piwik_ViewDataTable
<noscript>
';
}
- $this->codeEmbed = '<embed src="'.$pathToLibraryOpenChart.'open-flash-chart.swf?data=' . $url .'" quality="high" bgcolor="#FFFFFF" width="'. $width .'" height="'. $height .'" name="open-flash-chart" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" id="'. $obj_id .'"/>';
+ $this->codeEmbed = "<embed src='".$pathToLibraryOpenChart."open-flash-chart.swf?data=" . $url ."' quality='high' bgcolor='#FFFFFF' width='". $width ."' height='". $height ."' name='open-flash-chart' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' id='". $obj_id ."'/>";
$return .= '
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
diff --git a/plugins/UserSettings/templates/datatable.js b/plugins/UserSettings/templates/datatable.js
index 57af701990..aa324b35f8 100644
--- a/plugins/UserSettings/templates/datatable.js
+++ b/plugins/UserSettings/templates/datatable.js
@@ -233,7 +233,7 @@ function bindDataTableEvent( indexDiv )
$('.exportToFormat', this).attr( 'href', function(){
var format = $(this).attr('format');
- var method = $(this).attr('method');
+ var method = $(this).attr('methodToCall');
var filter_limit = $(this).attr('filter_limit');
var str = '?module=API'
diff --git a/plugins/UserSettings/templates/datatable_actions.tpl b/plugins/UserSettings/templates/datatable_actions.tpl
index 6072338930..71e2adfa04 100644
--- a/plugins/UserSettings/templates/datatable_actions.tpl
+++ b/plugins/UserSettings/templates/datatable_actions.tpl
@@ -26,12 +26,6 @@
{/foreach}
</tbody>
-
- </foot>
- <tr><td colspan="{$dataTableColumns|@count}">
-
- </td>
- </tr>
</tfoot>
</table>
{/if}
diff --git a/plugins/UserSettings/templates/datatable_footer.tpl b/plugins/UserSettings/templates/datatable_footer.tpl
index bc6be7941e..061cda8302 100644
--- a/plugins/UserSettings/templates/datatable_footer.tpl
+++ b/plugins/UserSettings/templates/datatable_footer.tpl
@@ -19,10 +19,10 @@
<span id="exportToFormat">
<img width="16" height="16" src="themes/default/images/export.png">
<span id="linksExportToFormat" style="display:none">
- <a target="_blank" class="exportToFormat" method="{$method}" format="CSV" filter_limit="100">CSV</a> |
- <a target="_blank" class="exportToFormat" method="{$method}" format="XML" filter_limit="100">XML</a> |
- <a target="_blank" class="exportToFormat" method="{$method}" format="JSON" filter_limit="100">Json</a> |
- <a target="_blank" class="exportToFormat" method="{$method}" format="PHP" filter_limit="100">Php</a>
+ <a target="_blank" class="exportToFormat" methodToCall="{$method}" format="CSV" filter_limit="100">CSV</a> |
+ <a target="_blank" class="exportToFormat" methodToCall="{$method}" format="XML" filter_limit="100">XML</a> |
+ <a target="_blank" class="exportToFormat" methodToCall="{$method}" format="JSON" filter_limit="100">Json</a> |
+ <a target="_blank" class="exportToFormat" methodToCall="{$method}" format="PHP" filter_limit="100">Php</a>
</span>
</span>
diff --git a/plugins/UserSettings/templates/graph.tpl b/plugins/UserSettings/templates/graph.tpl
index c49fe79b8d..9c25a5a320 100644
--- a/plugins/UserSettings/templates/graph.tpl
+++ b/plugins/UserSettings/templates/graph.tpl
@@ -2,13 +2,8 @@
{$jsInvocationTag}
<br/><br/>
<small>
-<form name="urlForm" id="urlForm">
-Embed <input
-name="embed_code"
-value="{$codeEmbed|escape}"
-onclick="javascript:document.urlForm.embed_code.focus();document.urlForm.embed_code.select();"
-readonly="true"
-type="text">
+<form name="urlForm" id="{$formId}">
+Embed <input name="embed_code" value="{$codeEmbed}" onclick="javascript:document.getElementById('{$formId}').embed_code.focus();document.getElementById('{$formId}').embed_code.select();" readonly="true" type="text">
| <a target="_blank" href="{$urlData}">Graph data</a>
</form>
diff --git a/tests/config_test.php b/tests/config_test.php
index ab651623d2..4bbe899e56 100755
--- a/tests/config_test.php
+++ b/tests/config_test.php
@@ -16,6 +16,8 @@ if(!defined('PIWIK_INCLUDE_PATH'))
set_include_path(PATH_TEST_TO_ROOT .'/'
. PATH_SEPARATOR . getcwd()
. PATH_SEPARATOR . getcwd() . '/../'
+ . PATH_SEPARATOR . PATH_TEST_TO_ROOT2
+ . PATH_SEPARATOR . PATH_TEST_TO_ROOT
. PATH_SEPARATOR . PATH_TEST_TO_ROOT . '/libs/'
. PATH_SEPARATOR . getcwd() . '/../../libs/'
. PATH_SEPARATOR . getcwd() . '/../libs/'
diff --git a/tests/modules/Url.test.php b/tests/modules/Url.test.php
new file mode 100644
index 0000000000..92056f33da
--- /dev/null
+++ b/tests/modules/Url.test.php
@@ -0,0 +1,49 @@
+<?php
+if(!defined("PATH_TEST_TO_ROOT")) {
+ define('PATH_TEST_TO_ROOT', '..');
+}
+if(!defined('CONFIG_TEST_INCLUDED'))
+{
+ require_once PATH_TEST_TO_ROOT ."/../tests/config_test.php";
+}
+
+require_once "modules/Url.php";
+
+class Test_Piwik_Url extends UnitTestCase
+{
+ function __construct( $title = '')
+ {
+ parent::__construct( $title );
+ }
+
+ public function setUp()
+ {
+ }
+
+ public function tearDown()
+ {
+ }
+
+
+ /**
+ * display output of all methods
+ */
+ public function test_allMethods()
+ {
+ print("<br>\nPiwik_Url::getCurrentQueryStringWithParametersModified() "
+ . Piwik_Url::getCurrentQueryStringWithParametersModified(array()));
+ print("<br>\nPiwik_Url::getCurrentUrl() "
+ . Piwik_Url::getCurrentUrl());
+ print("<br>\nPiwik_Url::getCurrentUrlWithoutQueryString() "
+ . Piwik_Url::getCurrentUrlWithoutQueryString());
+ print("<br>\nPiwik_Url::getCurrentUrlWithoutFileName() "
+ . Piwik_Url::getCurrentUrlWithoutFileName());
+ print("<br>\nPiwik_Url::getCurrentScriptName() "
+ . Piwik_Url::getCurrentScriptName());
+ print("<br>\nPiwik_Url::getCurrentHost() "
+ . Piwik_Url::getCurrentHost());
+ print("<br>\nPiwik_Url::getCurrentQueryString() "
+ . Piwik_Url::getCurrentQueryString());
+ }
+}
+