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 Steur <thomas.steur@googlemail.com>2014-05-29 07:45:34 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-05-29 07:45:34 +0400
commit8fb7b4c161293e1c824dc4aaf287d8bdc5efd460 (patch)
treeabbb20b4b6b57399d19bdd646aa80c5cbdc3fde6 /plugins
parent7d1b664211287dda8199f8757b00d0b023fda4a4 (diff)
refs #5212 always add leftMenu css but apply it only if there is a class .leftMenuPlugin. Added an event to add classes to the body which I found quite useful already for a while
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/LeftMenu/LeftMenu.php12
-rw-r--r--plugins/LeftMenu/stylesheets/theme.less280
-rw-r--r--plugins/Morpheus/templates/admin.twig2
-rw-r--r--plugins/Morpheus/templates/dashboard.twig2
4 files changed, 153 insertions, 143 deletions
diff --git a/plugins/LeftMenu/LeftMenu.php b/plugins/LeftMenu/LeftMenu.php
index b4d899ec8a..1cc98dba49 100755
--- a/plugins/LeftMenu/LeftMenu.php
+++ b/plugins/LeftMenu/LeftMenu.php
@@ -14,16 +14,22 @@ class LeftMenu extends \Piwik\Plugin
public function getListHooksRegistered()
{
return array(
- 'AssetManager.getStylesheetFiles' => array('function' => 'getStylesheetFiles', 'after' => true)
+ 'AssetManager.getStylesheetFiles' => array('function' => 'getStylesheetFiles', 'after' => true),
+ 'Template.bodyClass' => 'addClassToBody'
);
}
- public function getStylesheetFiles(&$stylesheets)
+ public function addClassToBody($str)
{
if (API::getInstance()->isEnabled()) {
- $stylesheets[] = "plugins/LeftMenu/stylesheets/theme.less";
+ $str .= ' leftMenuPlugin';
}
}
+ public function getStylesheetFiles(&$stylesheets)
+ {
+ $stylesheets[] = "plugins/LeftMenu/stylesheets/theme.less";
+ }
+
}
diff --git a/plugins/LeftMenu/stylesheets/theme.less b/plugins/LeftMenu/stylesheets/theme.less
index f2623d8aeb..2c9cd7f70b 100644
--- a/plugins/LeftMenu/stylesheets/theme.less
+++ b/plugins/LeftMenu/stylesheets/theme.less
@@ -1,147 +1,151 @@
-#container {
- clear: left;
-}
+.leftMenuPlugin {
-.top_controls {
- clear: none;
-}
+ #container {
+ clear: left;
+ }
-#root .Menu--dashboard {
- border-top: 0px !important;
-}
+ .top_controls {
+ clear: none;
+ }
-.sites_selector_in_dashboard {
- margin-top: 0px;
- margin-left: 5px;
-}
+ #root .Menu--dashboard {
+ border-top: 0px;
+ }
-#content.home {
+ .sites_selector_in_dashboard {
+ margin-top: 0px;
+ margin-left: 5px;
+ }
+
+ #content.home {
padding-top: 15px;
display:inline-block;
width:100%;
-}
-
-.Menu--dashboard {
- padding: 0;
- float: left;
- width: 240px;
- padding-top: 10px;
-}
-
-.Menu--dashboard > .Menu-tabList {
- -moz-background-size: 5px 100%;
- background-size: 5px 100%;
- background-position: 0 0, 100% 0;
- background-repeat: no-repeat;
-}
-
-.Menu--dashboard > .Menu-tabList {
- margin-left: 5px !important;
- margin-bottom: 0;
- margin-top: 0.1em;
- border: 1px solid #ddd;
- border-radius: 5px;
-}
-
-.Menu--dashboard > .Menu-tabList > li > ul {
- min-height: 0;
- max-height: 0;
- padding: 0;
- overflow: hidden;
- position: static;
- float: none;
-}
-
-.Menu--dashboard > .Menu-tabList > .sfActive > ul {
- padding-bottom: 5px;
- max-height: 500px; /* That's a hack for CSS transitions */
-}
-
-.Menu--dashboard > .Menu-tabList li {
- list-style: none;
- margin: 0;
- float: none;
- border: 0;
- border-radius: 0;
- background: transparent;
-}
-
-.Menu--dashboard > .Menu-tabList li a:hover {
- text-decoration: underline;
-}
-
-.Menu--dashboard > .Menu-tabList > li > span,
-.Menu--dashboard > .Menu-tabList > li > a {
- border-bottom: 1px dotted #778;
- display: block;
- padding: 5px 10px;
- font-size: 18px;
- line-height: 24px;
- text-decoration: none;
- float: none;
-}
-
-.Menu--dashboard > .Menu-tabList a {
- height: auto !important;
-}
-
-.Menu--dashboard > .Menu-tabList li li {
- float: none;
- text-align: left;
-}
-
-.Menu--dashboard > .Menu-tabList li li a {
- text-decoration: none;
- padding: 0.6em 0.9em;
- font: 14px Arial, Helvetica, sans-serif;
- display: block;
-}
-
-.Menu--dashboard > .Menu-tabList li li a:link,
-.Menu--dashboard > .Menu-tabList li li a:visited {
- color: #000;
-}
-
-.Menu--dashboard > .Menu-tabList > .sfActive > a,
-.Menu--dashboard > .Menu-tabList > li > a:hover {
- background: #f1f1f1;
- border-bottom: 1px dotted #777788 !important;
-}
-
-.Menu--dashboard > .Menu-tabList li li a:hover,
-.Menu--dashboard > .Menu-tabList li li a.active {
- color: @theme-color-link;
-}
-
-.Menu--dashboard > .Menu-tabList > .sfActive .sfHover > a {
- color: @theme-color-link;
- font-weight: bold;
-}
-
-.Menu--dashboard > .Menu-tabList li li a.current {
- background: #defdbb;
-}
-
-/* Fixes */
-.nav_sep {
- display: none;
-}
-
-.top_bar_sites_selector {
- float: left;
-}
-
-.Menu--dashboard {
- clear: left;
-}
-
-.pageWrap {
- margin-left: 240px;
- border-width: 0;
- padding-top: 0;
- max-height: none;
-}
-
-.widget:first-child {
+ }
+
+ .Menu--dashboard {
+ padding: 0;
+ float: left;
+ width: 240px;
+ padding-top: 10px;
+ }
+
+ .Menu--dashboard > .Menu-tabList {
+ -moz-background-size: 5px 100%;
+ background-size: 5px 100%;
+ background-position: 0 0, 100% 0;
+ background-repeat: no-repeat;
+ }
+
+ #root .Menu--dashboard > .Menu-tabList {
+ margin-left: 5px;
+ margin-bottom: 0;
+ margin-top: 0.1em;
+ border: 1px solid #ddd;
+ border-radius: 5px;
+ }
+
+ .Menu--dashboard > .Menu-tabList > li > ul {
+ min-height: 0;
+ max-height: 0;
+ padding: 0;
+ overflow: hidden;
+ position: static;
+ float: none;
+ }
+
+ .Menu--dashboard > .Menu-tabList > .sfActive > ul {
+ padding-bottom: 5px;
+ max-height: 500px; /* That's a hack for CSS transitions */
+ }
+
+ .Menu--dashboard > .Menu-tabList li {
+ list-style: none;
+ margin: 0;
+ float: none;
+ border: 0;
+ border-radius: 0;
+ background: transparent;
+ }
+
+ .Menu--dashboard > .Menu-tabList li a:hover {
+ text-decoration: underline;
+ }
+
+ .Menu--dashboard > .Menu-tabList > li > span,
+ .Menu--dashboard > .Menu-tabList > li > a {
+ border-bottom: 1px dotted #778;
+ display: block;
+ padding: 5px 10px;
+ font-size: 18px;
+ line-height: 24px;
+ text-decoration: none;
+ float: none;
+ }
+
+ .Menu--dashboard > .Menu-tabList a {
+ height: auto;
+ }
+
+ .Menu--dashboard > .Menu-tabList li li {
+ float: none;
+ text-align: left;
+ }
+
+ .Menu--dashboard > .Menu-tabList li li a {
+ text-decoration: none;
+ padding: 0.6em 0.9em;
+ font: 14px Arial, Helvetica, sans-serif;
+ display: block;
+ }
+
+ .Menu--dashboard > .Menu-tabList li li a:link,
+ .Menu--dashboard > .Menu-tabList li li a:visited {
+ color: #000;
+ }
+
+ .Menu--dashboard > .Menu-tabList > .sfActive > a,
+ .Menu--dashboard > .Menu-tabList > li > a:hover {
+ background: #f1f1f1;
+ border-bottom: 1px dotted #777788 !important;
+ }
+
+ .Menu--dashboard > .Menu-tabList li li a:hover,
+ .Menu--dashboard > .Menu-tabList li li a.active {
+ color: @theme-color-link;
+ }
+
+ .Menu--dashboard > .Menu-tabList > .sfActive .sfHover > a {
+ color: @theme-color-link;
+ font-weight: bold;
+ }
+
+ .Menu--dashboard > .Menu-tabList li li a.current {
+ background: #defdbb;
+ }
+
+ /* Fixes */
+ .nav_sep {
+ display: none;
+ }
+
+ .top_bar_sites_selector {
+ float: left;
+ }
+
+ .Menu--dashboard {
+ clear: left;
+ }
+
+ .pageWrap {
+ margin-left: 240px;
+ border-width: 0;
+ padding-top: 0;
+ max-height: none;
+ }
+
+ .widget:first-child {
margin-top: 0;
+ }
+
} \ No newline at end of file
diff --git a/plugins/Morpheus/templates/admin.twig b/plugins/Morpheus/templates/admin.twig
index b9fd1a3743..067dfb8e28 100644
--- a/plugins/Morpheus/templates/admin.twig
+++ b/plugins/Morpheus/templates/admin.twig
@@ -20,7 +20,7 @@
<![endif]-->
{% endblock %}
</head>
- <body ng-app="app">
+ <body ng-app="app" class="{{ postEvent('Template.bodyClass', 'admin') }}">
{% set isAdminLayout = true %}
{% include "_iframeBuster.twig" %}
{% include "@CoreHome/_javaScriptDisabled.twig" %}
diff --git a/plugins/Morpheus/templates/dashboard.twig b/plugins/Morpheus/templates/dashboard.twig
index 28408683d9..a2dfff69ca 100644
--- a/plugins/Morpheus/templates/dashboard.twig
+++ b/plugins/Morpheus/templates/dashboard.twig
@@ -24,7 +24,7 @@
<![endif]-->
{% endblock %}
</head>
- <body ng-app="app">
+ <body ng-app="app" class="{{ postEvent('Template.bodyClass', 'dashboard') }}">
{% include "_iframeBuster.twig" %}
{% include "@CoreHome/_javaScriptDisabled.twig" %}