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:
authorThomas ZILLIOX <thomas@zilliox.me>2013-06-20 01:54:02 +0400
committerThomas ZILLIOX <thomas@zilliox.me>2013-06-20 01:54:02 +0400
commit5dc13b6807d2ad14c15ced69077b7a91a82df00c (patch)
tree350eeb33896585e1838e9ce431ce680dca18835a /plugins/DBStats
parent1b145d391b7120ba425f058028e2de7d16ac783c (diff)
Remove inline styles from DBStats plugin
Diffstat (limited to 'plugins/DBStats')
-rw-r--r--plugins/DBStats/DBStats.php10
-rw-r--r--plugins/DBStats/stylesheets/dbstatsTable.css16
-rwxr-xr-xplugins/DBStats/templates/index.twig22
3 files changed, 27 insertions, 21 deletions
diff --git a/plugins/DBStats/DBStats.php b/plugins/DBStats/DBStats.php
index 479596f30a..044e01ddc8 100644
--- a/plugins/DBStats/DBStats.php
+++ b/plugins/DBStats/DBStats.php
@@ -30,6 +30,7 @@ class Piwik_DBStats extends Piwik_Plugin
function getListHooksRegistered()
{
return array(
+ 'AssetManager.getCssFiles' => 'getCssFiles',
'AdminMenu.add' => 'addMenu',
'TaskScheduler.getScheduledTasks' => 'getScheduledTasks',
);
@@ -76,6 +77,15 @@ class Piwik_DBStats extends Piwik_Plugin
Piwik_SetOption(self::TIME_OF_LAST_TASK_RUN_OPTION, $now);
}
+ /**
+ * @param Piwik_Event_Notification $notification notification object
+ */
+ function getCssFiles($notification)
+ {
+ $cssFiles = & $notification->getNotificationObject();
+ $cssFiles[] = "plugins/DBStats/stylesheets/dbstatsTable.css";
+ }
+
/** Returns the date when the cacheDataByArchiveNameReports was last run. */
public static function getDateOfLastCachingRun()
{
diff --git a/plugins/DBStats/stylesheets/dbstatsTable.css b/plugins/DBStats/stylesheets/dbstatsTable.css
new file mode 100644
index 0000000000..9d897c8405
--- /dev/null
+++ b/plugins/DBStats/stylesheets/dbstatsTable.css
@@ -0,0 +1,16 @@
+.dbstatsTable {
+ display: inline-block;
+}
+
+.dbstatsTable > tbody > tr > td:first-child {
+ width: 550px;
+}
+
+.dbstatsTable h2 {
+ width: 500px;
+}
+
+.adminTable.dbstatsTable a {
+ color: black;
+ text-decoration: underline;
+} \ No newline at end of file
diff --git a/plugins/DBStats/templates/index.twig b/plugins/DBStats/templates/index.twig
index b28e241764..f860f45705 100755
--- a/plugins/DBStats/templates/index.twig
+++ b/plugins/DBStats/templates/index.twig
@@ -3,27 +3,7 @@
{% block content %}
{{ loadJavascriptTranslations(['CoreAdminHome','CoreHome']) }}
-<style>
- .dbstatsTable {
- display: inline-block;
- }
-
- .dbstatsTable>tbody>tr>td:first-child {
- width: 550px;
- }
-
- .dbstatsTable h2 {
- width: 500px;
- }
-
- .adminTable.dbstatsTable a {
- color: black;
- text-decoration: underline;
- }
-</style>
-
-<a name="databaseUsageSummary"></a>
-<h2>{{ 'DBStats_DatabaseUsage'|translate }}</h2>
+<h2 id="databaseUsageSummary">{{ 'DBStats_DatabaseUsage'|translate }}</h2>
<p>
{{ 'DBStats_MainDescription'|translate(totalSpaceUsed) }}<br/>
{{ 'DBStats_LearnMore'|translate("<a href='?module=Proxy&action=redirect&url=http://piwik.org/docs/setup-auto-archiving/' target='_blank'>Piwik Auto Archiving</a>")|raw }}