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 Aubry <matt@piwik.org>2015-10-08 00:39:44 +0300
committerMatthieu Aubry <matt@piwik.org>2015-10-08 00:39:44 +0300
commit12e370843cfd308613c7575d3ea048ce4f781c08 (patch)
tree74e4796b3443bf3ca83f98ec4af26f3a21a73ad5
parent4f452da46debf08978d769fa791a12e41d137dd2 (diff)
parent6f465eb01c10d578a4ad038dc003cfe194d7a218 (diff)
Merge pull request #8936 from piwik/left_menu_22.15.0-b16
Left menu
-rw-r--r--CHANGELOG.md2
-rw-r--r--config/global.ini.php2
-rw-r--r--core/Menu/MenuAbstract.php17
-rw-r--r--core/Period.php1
-rw-r--r--core/Plugin/Controller.php1
-rw-r--r--core/Updates/2.15.0-b16.php45
-rw-r--r--core/Version.php2
-rw-r--r--lang/en.json2
-rw-r--r--plugins/API/templates/listAllAPI.twig11
-rw-r--r--plugins/CoreAdminHome/CoreAdminHome.php1
-rw-r--r--plugins/CoreAdminHome/Menu.php11
-rw-r--r--plugins/CoreAdminHome/stylesheets/generalSettings.less16
-rw-r--r--plugins/CoreAdminHome/stylesheets/menu.less71
-rw-r--r--plugins/CoreAdminHome/templates/_menu.twig3
-rw-r--r--plugins/CoreHome/CoreHome.php17
-rw-r--r--plugins/CoreHome/Menu.php19
-rw-r--r--plugins/CoreHome/angularjs/enrichedheadline/enrichedheadline.directive.less10
-rw-r--r--plugins/CoreHome/angularjs/menudropdown/menudropdown.directive.html2
-rw-r--r--plugins/CoreHome/angularjs/menudropdown/menudropdown.directive.less10
-rw-r--r--plugins/CoreHome/angularjs/quick-access/quick-access.controller.js78
-rw-r--r--plugins/CoreHome/angularjs/quick-access/quick-access.directive.html36
-rw-r--r--plugins/CoreHome/angularjs/quick-access/quick-access.directive.js258
-rw-r--r--plugins/CoreHome/angularjs/quick-access/quick-access.directive.less55
-rw-r--r--plugins/CoreHome/angularjs/selector/selector.directive.js86
-rw-r--r--plugins/CoreHome/angularjs/selector/selector.directive.less59
-rw-r--r--plugins/CoreHome/angularjs/siteselector/siteselector.directive.html23
-rw-r--r--plugins/CoreHome/angularjs/siteselector/siteselector.directive.js8
-rw-r--r--plugins/CoreHome/angularjs/siteselector/siteselector.directive.less227
-rw-r--r--plugins/CoreHome/javascripts/calendar.js15
-rwxr-xr-xplugins/CoreHome/javascripts/corehome.js17
-rw-r--r--plugins/CoreHome/javascripts/menu.js118
-rw-r--r--plugins/CoreHome/javascripts/menu_init.js15
-rw-r--r--plugins/CoreHome/javascripts/top_controls.js34
-rw-r--r--plugins/CoreHome/lang/en.json4
-rw-r--r--plugins/CoreHome/stylesheets/coreHome.less62
-rw-r--r--plugins/CoreHome/stylesheets/dataTable/_dataTable.less4
-rw-r--r--plugins/CoreHome/stylesheets/jquery.ui.autocomplete.css2
-rw-r--r--plugins/CoreHome/stylesheets/layout.less387
-rw-r--r--plugins/CoreHome/stylesheets/menu.less177
-rw-r--r--plugins/CoreHome/stylesheets/notification.less5
-rw-r--r--plugins/CoreHome/stylesheets/zen-mode.less10
-rw-r--r--plugins/CoreHome/templates/ReportsByDimension/_reportsByDimension.twig2
-rw-r--r--plugins/CoreHome/templates/_headerMessage.twig46
-rw-r--r--plugins/CoreHome/templates/_indexContent.twig19
-rw-r--r--plugins/CoreHome/templates/_menu.twig65
-rw-r--r--plugins/CoreHome/templates/_periodSelect.twig10
-rw-r--r--plugins/CoreHome/templates/_siteSelectHeader.twig4
-rw-r--r--plugins/CoreHome/templates/_topBar.twig36
-rw-r--r--plugins/CoreHome/templates/_topBarTopMenu.twig37
-rw-r--r--plugins/CoreHome/templates/_topScreen.twig20
-rw-r--r--plugins/CoreHome/templates/_uiControl.twig1
-rw-r--r--plugins/CoreHome/templates/_userMenu.twig3
-rw-r--r--plugins/CoreHome/templates/getDefaultIndexView.twig22
-rw-r--r--plugins/CoreHome/templates/macros.twig26
-rw-r--r--plugins/CorePluginsAdmin/Menu.php4
-rw-r--r--plugins/CoreVisualizations/javascripts/jqplot.js2
-rw-r--r--plugins/Dashboard/Dashboard.php1
-rw-r--r--plugins/Dashboard/DashboardManagerControl.php2
-rw-r--r--plugins/Dashboard/DashboardSettingsControlBase.php2
-rw-r--r--plugins/Dashboard/Menu.php21
-rw-r--r--plugins/Dashboard/javascripts/dashboard.js14
-rw-r--r--plugins/Dashboard/javascripts/dashboardObject.js14
-rw-r--r--plugins/Dashboard/javascripts/widgetMenu.js9
-rw-r--r--plugins/Dashboard/stylesheets/dashboard.less47
-rw-r--r--plugins/Dashboard/stylesheets/standalone.css9
-rw-r--r--plugins/Dashboard/stylesheets/widget.less2
-rw-r--r--plugins/Dashboard/templates/_dashboardSettings.twig8
-rw-r--r--plugins/Dashboard/templates/index.twig5
-rw-r--r--plugins/ExamplePlugin/tests/UI/expected-ui-screenshots/SimpleUITest_simplePage.pngbin15196 -> 15064 bytes
-rw-r--r--plugins/ExamplePlugin/tests/UI/expected-ui-screenshots/SimpleUITest_simplePagePartial.pngbin9676 -> 10004 bytes
-rw-r--r--plugins/Goals/templates/manageGoals.twig6
-rw-r--r--plugins/ImageGraph/templates/testAllSizes.twig8
-rw-r--r--plugins/Installation/stylesheets/installation.css4
-rw-r--r--plugins/LeftMenu/API.php44
-rwxr-xr-xplugins/LeftMenu/LeftMenu.php35
-rw-r--r--plugins/LeftMenu/Settings.php67
-rw-r--r--plugins/LeftMenu/lang/bg.json5
-rw-r--r--plugins/LeftMenu/lang/cs.json11
-rw-r--r--plugins/LeftMenu/lang/da.json10
-rw-r--r--plugins/LeftMenu/lang/de.json11
-rw-r--r--plugins/LeftMenu/lang/el.json11
-rw-r--r--plugins/LeftMenu/lang/en.json11
-rw-r--r--plugins/LeftMenu/lang/es.json11
-rw-r--r--plugins/LeftMenu/lang/fi.json8
-rw-r--r--plugins/LeftMenu/lang/fr.json11
-rw-r--r--plugins/LeftMenu/lang/hi.json11
-rw-r--r--plugins/LeftMenu/lang/it.json11
-rw-r--r--plugins/LeftMenu/lang/ja.json10
-rw-r--r--plugins/LeftMenu/lang/nl.json11
-rw-r--r--plugins/LeftMenu/lang/pl.json6
-rw-r--r--plugins/LeftMenu/lang/pt-br.json11
-rw-r--r--plugins/LeftMenu/lang/pt.json11
-rw-r--r--plugins/LeftMenu/lang/ro.json10
-rw-r--r--plugins/LeftMenu/lang/ru.json9
-rw-r--r--plugins/LeftMenu/lang/sr.json11
-rw-r--r--plugins/LeftMenu/lang/sv.json11
-rw-r--r--plugins/LeftMenu/lang/tl.json10
-rw-r--r--plugins/LeftMenu/lang/tr.json5
-rw-r--r--plugins/LeftMenu/lang/zh-cn.json6
-rw-r--r--plugins/LeftMenu/stylesheets/theme.less150
-rw-r--r--plugins/LeftMenu/tests/Integration/APITest.php149
-rw-r--r--plugins/Morpheus/Menu.php22
-rwxr-xr-x[-rw-r--r--]plugins/Morpheus/fonts/piwik.eotbin15684 -> 20640 bytes
-rwxr-xr-x[-rw-r--r--]plugins/Morpheus/fonts/piwik.ttfbin15528 -> 20484 bytes
-rw-r--r--plugins/Morpheus/images/logo.svg10
-rw-r--r--plugins/Morpheus/images/signout.pngbin0 -> 345 bytes
-rw-r--r--plugins/Morpheus/javascripts/piwikHelper.js16
-rw-r--r--plugins/Morpheus/stylesheets/base/colors.less1
-rw-r--r--plugins/Morpheus/stylesheets/base/icons.css156
-rw-r--r--plugins/Morpheus/stylesheets/base/mixins.less2
-rw-r--r--plugins/Morpheus/stylesheets/general/_admin.less50
-rw-r--r--plugins/Morpheus/stylesheets/general/_forms.less38
-rw-r--r--plugins/Morpheus/stylesheets/ieonly.css6
-rw-r--r--plugins/Morpheus/stylesheets/main.less171
-rw-r--r--plugins/Morpheus/stylesheets/theme.less4
-rw-r--r--plugins/Morpheus/stylesheets/ui/_components.less59
-rw-r--r--plugins/Morpheus/stylesheets/uibase/_header.less34
-rw-r--r--plugins/Morpheus/stylesheets/uibase/_headerMessage.less32
-rw-r--r--plugins/Morpheus/stylesheets/uibase/_languageSelect.less13
-rw-r--r--plugins/Morpheus/stylesheets/uibase/_loading.less13
-rw-r--r--plugins/Morpheus/stylesheets/uibase/_periodSelect.less21
-rw-r--r--plugins/Morpheus/templates/admin.twig32
-rw-r--r--plugins/Morpheus/templates/dashboard.twig33
-rw-r--r--plugins/Morpheus/templates/demo.twig5
-rw-r--r--plugins/Morpheus/templates/user.twig31
-rw-r--r--plugins/MultiSites/angularjs/dashboard/dashboard.directive.less11
-rw-r--r--plugins/MultiSites/templates/getSitesInfo.twig17
-rw-r--r--plugins/Overlay/stylesheets/overlay.css10
-rw-r--r--plugins/ScheduledReports/templates/index.twig12
-rw-r--r--plugins/SegmentEditor/SegmentSelectorControl.php2
-rw-r--r--plugins/SegmentEditor/javascripts/Segmentation.js14
-rw-r--r--plugins/SegmentEditor/stylesheets/segmentation.less92
-rw-r--r--plugins/SegmentEditor/templates/_segmentSelector.twig11
-rw-r--r--plugins/SitesManager/stylesheets/SitesManager.less3
-rw-r--r--plugins/SitesManager/templates/siteWithoutData.twig6
-rw-r--r--plugins/UserCountryMap/javascripts/realtime-map.js11
-rw-r--r--plugins/UserCountryMap/stylesheets/realtime-map.less4
-rw-r--r--plugins/UsersManager/templates/index.twig2
-rw-r--r--plugins/UsersManager/templates/userSettings.twig2
-rw-r--r--plugins/Widgetize/Menu.php1
-rw-r--r--plugins/Widgetize/templates/index.twig11
-rw-r--r--plugins/ZenMode/ZenMode.php51
-rw-r--r--plugins/ZenMode/angularjs/quick-access/quick-access.directive.html41
-rw-r--r--plugins/ZenMode/angularjs/quick-access/quick-access.directive.js140
-rw-r--r--plugins/ZenMode/angularjs/quick-access/quick-access.directive.less20
-rw-r--r--plugins/ZenMode/angularjs/zen-mode/zen-mode-switcher.directive.js54
-rw-r--r--plugins/ZenMode/angularjs/zen-mode/zen-mode.less93
-rw-r--r--plugins/ZenMode/javascripts/zen-mode.js138
-rw-r--r--plugins/ZenMode/lang/cs.json10
-rw-r--r--plugins/ZenMode/lang/da.json9
-rw-r--r--plugins/ZenMode/lang/de.json10
-rw-r--r--plugins/ZenMode/lang/el.json10
-rwxr-xr-xplugins/ZenMode/lang/en.json10
-rw-r--r--plugins/ZenMode/lang/es.json10
-rw-r--r--plugins/ZenMode/lang/fa.json5
-rw-r--r--plugins/ZenMode/lang/fr.json10
-rw-r--r--plugins/ZenMode/lang/hi.json8
-rw-r--r--plugins/ZenMode/lang/it.json10
-rw-r--r--plugins/ZenMode/lang/ja.json9
-rw-r--r--plugins/ZenMode/lang/nb.json6
-rw-r--r--plugins/ZenMode/lang/nl.json10
-rw-r--r--plugins/ZenMode/lang/pl.json8
-rw-r--r--plugins/ZenMode/lang/pt-br.json10
-rw-r--r--plugins/ZenMode/lang/ro.json9
-rw-r--r--plugins/ZenMode/lang/ru.json9
-rw-r--r--plugins/ZenMode/lang/sr.json10
-rw-r--r--plugins/ZenMode/lang/sv.json9
-rw-r--r--plugins/ZenMode/lang/ta.json6
-rw-r--r--plugins/ZenMode/lang/tl.json9
-rw-r--r--tests/UI/specs/DashboardManager_spec.js2
-rw-r--r--tests/UI/specs/Dashboard_spec.js24
-rw-r--r--tests/UI/specs/EmptySite_spec.js2
-rw-r--r--tests/UI/specs/Login_spec.js4
-rw-r--r--tests/UI/specs/MeasurableManager_spec.js2
-rw-r--r--tests/UI/specs/Menus_spec.js29
-rw-r--r--tests/UI/specs/MultiSites_spec.js2
-rw-r--r--tests/UI/specs/QuickAccess_spec.js75
-rw-r--r--tests/UI/specs/SegmentSelectorEditor_spec.js14
-rw-r--r--tests/UI/specs/SiteSelector_spec.js2
-rw-r--r--tests/UI/specs/UIIntegration_spec.js59
-rw-r--r--tests/lib/screenshot-testing/support/page-renderer.js48
-rw-r--r--tests/resources/screenshot-override/override.css4
182 files changed, 2184 insertions, 2804 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f2b9c62546..5b29af62ec 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -26,10 +26,10 @@ This is a changelog for Piwik platform developers. All changes for our HTTP API'
### Internal change
* In `piwik.js` we replaced [JSON2](https://github.com/douglascrockford/JSON-js) with [JSON3](https://bestiejs.github.io/json3/) to implement CSP (Content Security Policy) as JSON3 does not use `eval()`. JSON3 will be used if a browser does not provide a native JSON API. We are using `JSON3` in a way that it will not conflict if your website is using `JSON3` as well.
-
### New APIs
* The JavaScript Tracker `piwik.js` got a new method `logAllContentBlocksOnPage` to log all found content blocks within a page to the console. This is useful to debug / test content tracking. It can be triggered via `_paq.push(['logAllContentBlocksOnPage'])`
* The Class `Piwik\Plugins\Login\Controller` is now considered a public API.
+* The new method `Piwik\Menu\MenuAbstract::registerMenuIcon()` can be used to define an icon for a menu category to replace the default arrow icon.
### Internal Change
* The option `branch` of the console command `development:sync-system-test-processed` was removed as it is no longer needed.
diff --git a/config/global.ini.php b/config/global.ini.php
index 2b86a1c131..cb49709b37 100644
--- a/config/global.ini.php
+++ b/config/global.ini.php
@@ -780,8 +780,6 @@ Plugins[] = MobileMessaging
Plugins[] = Overlay
Plugins[] = SegmentEditor
Plugins[] = Insights
-Plugins[] = ZenMode
-Plugins[] = LeftMenu
Plugins[] = Morpheus
Plugins[] = Contents
Plugins[] = TestRunner
diff --git a/core/Menu/MenuAbstract.php b/core/Menu/MenuAbstract.php
index 7651a1199d..777d97b523 100644
--- a/core/Menu/MenuAbstract.php
+++ b/core/Menu/MenuAbstract.php
@@ -30,6 +30,7 @@ abstract class MenuAbstract extends Singleton
protected $edits = array();
protected $renames = array();
protected $orderingApplied = false;
+ protected $menuIcons = array();
protected static $menus = array();
/**
@@ -49,6 +50,17 @@ abstract class MenuAbstract extends Singleton
}
/**
+ * Let's you register a menu icon for a certain menu category to replace the default arrow icon.
+ *
+ * @param string $menuName The translation key of a main menu category, eg 'Dashboard_Dashboard'
+ * @param string $iconCssClass The css class name of an icon, eg 'icon-user'
+ */
+ public function registerMenuIcon($menuName, $iconCssClass)
+ {
+ $this->menuIcons[$menuName] = $iconCssClass;
+ }
+
+ /**
* Returns a list of available plugin menu instances.
*
* @return \Piwik\Plugin\Menu[]
@@ -164,6 +176,11 @@ abstract class MenuAbstract extends Singleton
$this->menu[$menuName]['_order'] = $order;
$this->menu[$menuName]['_name'] = $menuName;
$this->menu[$menuName]['_tooltip'] = $tooltip;
+ if (!empty($this->menuIcons[$menuName])) {
+ $this->menu[$menuName]['_icon'] = $this->menuIcons[$menuName];
+ } else {
+ $this->menu[$menuName]['_icon'] = '';
+ }
}
if (!empty($subMenuName)) {
$this->menu[$menuName][$subMenuName]['_url'] = $url;
diff --git a/core/Period.php b/core/Period.php
index 11ddb9c7c2..80dc9f6f21 100644
--- a/core/Period.php
+++ b/core/Period.php
@@ -104,6 +104,7 @@ abstract class Period
if (self::isMultiplePeriod($dateString, 'day')) {
return;
}
+
Date::factory($dateString);
}
diff --git a/core/Plugin/Controller.php b/core/Plugin/Controller.php
index 3aab8374fb..df56b4a8da 100644
--- a/core/Plugin/Controller.php
+++ b/core/Plugin/Controller.php
@@ -15,7 +15,6 @@ use Piwik\API\Request;
use Piwik\Common;
use Piwik\Config as PiwikConfig;
use Piwik\Config;
-use Piwik\Container\StaticContainer;
use Piwik\DataTable\Filter\CalculateEvolutionFilter;
use Piwik\Date;
use Piwik\Exception\NoPrivilegesException;
diff --git a/core/Updates/2.15.0-b16.php b/core/Updates/2.15.0-b16.php
new file mode 100644
index 0000000000..a37e621129
--- /dev/null
+++ b/core/Updates/2.15.0-b16.php
@@ -0,0 +1,45 @@
+<?php
+/**
+ * Piwik - free/libre analytics platform
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ *
+ */
+
+namespace Piwik\Updates;
+
+use Piwik\Plugin\Manager;
+use Piwik\Updater;
+use Piwik\Updates;
+
+class Updates_2_15_0_b16 extends Updates
+{
+
+ public function doUpdate(Updater $updater)
+ {
+ $this->uninstallPlugin('LeftMenu');
+ $this->uninstallPlugin('ZenMode');
+ }
+
+ private function uninstallPlugin($plugin)
+ {
+ $pluginManager = Manager::getInstance();
+
+ if ($pluginManager->isPluginInstalled($plugin)) {
+ if ($pluginManager->isPluginActivated($plugin)) {
+ $pluginManager->deactivatePlugin($plugin);
+ }
+
+ $pluginManager->unloadPlugin($plugin);
+ $pluginManager->uninstallPlugin($plugin);
+ } else {
+ $this->makeSurePluginIsRemovedFromFilesystem($plugin);
+ }
+ }
+
+ private function makeSurePluginIsRemovedFromFilesystem($plugin)
+ {
+ Manager::deletePluginFromFilesystem($plugin);
+ }
+}
diff --git a/core/Version.php b/core/Version.php
index c9a04c200a..dd1ae538d2 100644
--- a/core/Version.php
+++ b/core/Version.php
@@ -20,7 +20,7 @@ final class Version
* The current Piwik version.
* @var string
*/
- const VERSION = '2.15.0-b15';
+ const VERSION = '2.15.0-b16';
public function isStableVersion($version)
{
diff --git a/lang/en.json b/lang/en.json
index 8e954f711f..3925c960e7 100644
--- a/lang/en.json
+++ b/lang/en.json
@@ -402,7 +402,7 @@
"YearsDays": "%1$s years %2$s days",
"Yes": "Yes",
"YouAreCurrentlyUsing": "You are currently using Piwik %s.",
- "YouAreViewingDemoShortMessage": "You are currently viewing the demo of Piwik",
+ "YouAreViewingDemoShortMessage": "You are viewing the demo of Piwik",
"YouMustBeLoggedIn": "You must be logged in to access this functionality.",
"YourChangesHaveBeenSaved": "Your changes have been saved."
},
diff --git a/plugins/API/templates/listAllAPI.twig b/plugins/API/templates/listAllAPI.twig
index 47a1327c36..d3c551c997 100644
--- a/plugins/API/templates/listAllAPI.twig
+++ b/plugins/API/templates/listAllAPI.twig
@@ -2,18 +2,17 @@
{% set title %}{{ 'API_ReportingApiReference'|translate }}{% endset %}
+{% block topcontrols %}
+ {% include "@CoreHome/_siteSelectHeader.twig" %}
+ {% include "@CoreHome/_periodSelect.twig" %}
+{% endblock %}
+
{% block content %}
<div class="api-list">
<h2>{{ title }}</h2>
- {% include "@CoreHome/_siteSelectHeader.twig" %}
-
- <div class="top_controls">
- {% include "@CoreHome/_periodSelect.twig" %}
- </div>
-
<p>{{ 'API_PluginDescription'|translate }}</p>
<p>
diff --git a/plugins/CoreAdminHome/CoreAdminHome.php b/plugins/CoreAdminHome/CoreAdminHome.php
index 75f1230cd6..305506038a 100644
--- a/plugins/CoreAdminHome/CoreAdminHome.php
+++ b/plugins/CoreAdminHome/CoreAdminHome.php
@@ -38,7 +38,6 @@ class CoreAdminHome extends \Piwik\Plugin
public function getStylesheetFiles(&$stylesheets)
{
$stylesheets[] = "libs/jquery/themes/base/jquery-ui.min.css";
- $stylesheets[] = "plugins/CoreAdminHome/stylesheets/menu.less";
$stylesheets[] = "plugins/Morpheus/stylesheets/base.less";
$stylesheets[] = "plugins/Morpheus/stylesheets/main.less";
$stylesheets[] = "plugins/CoreAdminHome/stylesheets/generalSettings.less";
diff --git a/plugins/CoreAdminHome/Menu.php b/plugins/CoreAdminHome/Menu.php
index 7994979450..b4621e2f5e 100644
--- a/plugins/CoreAdminHome/Menu.php
+++ b/plugins/CoreAdminHome/Menu.php
@@ -23,10 +23,10 @@ class Menu extends \Piwik\Plugin\Menu
$hasAdminAccess = Piwik::isUserHasSomeAdminAccess();
if ($hasAdminAccess) {
- $menu->addManageItem(null, "", $order = 1);
- $menu->addSettingsItem(null, "", $order = 5);
- $menu->addDiagnosticItem(null, "", $order = 10);
- $menu->addDevelopmentItem(null, "", $order = 15);
+ $menu->addManageItem(null, array(), $order = 1);
+ $menu->addSettingsItem(null, array(), $order = 5);
+ $menu->addDiagnosticItem(null, array(), $order = 10);
+ $menu->addDevelopmentItem(null, array(), $order = 15);
if (Piwik::hasUserSuperUserAccess()) {
$menu->addSettingsItem('General_General',
@@ -51,7 +51,8 @@ class Menu extends \Piwik\Plugin\Menu
$url = $this->urlForAction('generalSettings');
}
- $menu->addItem('CoreAdminHome_Administration', null, $url, 10);
+ $menu->registerMenuIcon('CoreAdminHome_Administration', 'icon-configure');
+ $menu->addItem('CoreAdminHome_Administration', null, $url, 980, Piwik::translate('CoreAdminHome_Administration'));
}
}
diff --git a/plugins/CoreAdminHome/stylesheets/generalSettings.less b/plugins/CoreAdminHome/stylesheets/generalSettings.less
index eac16b6c4c..9d232f789b 100644
--- a/plugins/CoreAdminHome/stylesheets/generalSettings.less
+++ b/plugins/CoreAdminHome/stylesheets/generalSettings.less
@@ -13,9 +13,6 @@
}
#content.admin {
- margin: 0 0 0 260px;
- padding: 0 0 40px;
- display: table;
font-size: 13px;
// Fix the <pre> blocks because of the display: table
@@ -25,8 +22,8 @@
}
.admin #header_message {
- margin-top: 10px;
- margin-right: 10px;
+ margin-top: 8px;
+ margin-right: 8px;
}
table.admin {
@@ -92,9 +89,9 @@ table.admin tbody td:hover, table.admin tbody th:hover {
width: 100%;
&:first-of-type:not(.secondary) {
- margin-top: 17px;
+ margin-top: 7px;
margin-bottom: 16px;
- border-bottom: 1px solid #DADADA;
+ border-bottom: 1px solid @theme-color-background-tinyContrast;
}
}
@@ -162,11 +159,6 @@ table.admin tbody td:hover, table.admin tbody th:hover {
margin-left: 0px;
}
-/* to override .admin a */
-.admin .sites_autocomplete a {
- color: #255792;
-}
-
/* trusted host styles */
#trustedHostSettings input {
width: 238px;
diff --git a/plugins/CoreAdminHome/stylesheets/menu.less b/plugins/CoreAdminHome/stylesheets/menu.less
deleted file mode 100644
index af76bc8281..0000000000
--- a/plugins/CoreAdminHome/stylesheets/menu.less
+++ /dev/null
@@ -1,71 +0,0 @@
-#container {
- clear: left;
-}
-
-.Menu--admin {
- padding: 0;
- float: left;
- width: 240px;
-}
-
-.Menu--admin > .Menu-tabList {
- -moz-background-size: 5px 100%;
- background-size: 5px 100%;
- background-position: 0 0, 100% 0;
- background-repeat: no-repeat;
-}
-
-.Menu--admin > .Menu-tabList {
- padding-left: 5px;
- margin-bottom: 0;
- margin-top: 0.1em;
- border: 1px solid @theme-color-background-lowContrast;
- border-radius: 5px;
- border-left: 0px;
-}
-
-.Menu--admin > .Menu-tabList li {
- list-style: none;
- margin: 0;
-}
-
-.Menu--admin > .Menu-tabList > li {
- padding-bottom: 5px;
-}
-
-.Menu--admin > .Menu-tabList > li > a,
-.Menu--admin > .Menu-tabList > li > span {
- text-decoration: none;
- border-bottom: 1px dotted #778;
- display: block;
- padding: 5px 10px;
- font-size: 18px;
- color: #7E7363;
-}
-
-.Menu--admin > .Menu-tabList li li a {
- text-decoration: none;
- padding: 0.6em 0.9em;
- font-size: 14px;
- display: block;
-}
-
-.Menu--admin > .Menu-tabList li li a:link,
-.Menu--admin > .Menu-tabList li li a:visited {
- color: #000;
-}
-
-.Menu--admin > .Menu-tabList li li a:hover,
-.Menu--admin > .Menu-tabList li li a.active {
- color: @theme-color-menu-contrast-textActive !important;
- background: @theme-color-menu-contrast-background;
- border-color: #000;
-}
-
-.Menu--admin > .Menu-tabList li li a:hover {
- text-decoration: underline;
-}
-
-.Menu--admin > .Menu-tabList li li a.current {
- background: #defdbb;
-}
diff --git a/plugins/CoreAdminHome/templates/_menu.twig b/plugins/CoreAdminHome/templates/_menu.twig
deleted file mode 100644
index 080f36e93c..0000000000
--- a/plugins/CoreAdminHome/templates/_menu.twig
+++ /dev/null
@@ -1,3 +0,0 @@
-{% import '@CoreHome/macros.twig' as corehome %}
-
-{{ corehome.sidebarMenu(adminMenu, currentModule, currentAction) }} \ No newline at end of file
diff --git a/plugins/CoreHome/CoreHome.php b/plugins/CoreHome/CoreHome.php
index 23da8326aa..5b023b9cb3 100644
--- a/plugins/CoreHome/CoreHome.php
+++ b/plugins/CoreHome/CoreHome.php
@@ -61,7 +61,6 @@ class CoreHome extends \Piwik\Plugin
$stylesheets[] = "plugins/Morpheus/stylesheets/base.less";
$stylesheets[] = "plugins/Morpheus/stylesheets/main.less";
$stylesheets[] = "plugins/CoreHome/stylesheets/coreHome.less";
- $stylesheets[] = "plugins/CoreHome/stylesheets/menu.less";
$stylesheets[] = "plugins/CoreHome/stylesheets/dataTable.less";
$stylesheets[] = "plugins/CoreHome/stylesheets/cloud.less";
$stylesheets[] = "plugins/CoreHome/stylesheets/jquery.ui.autocomplete.css";
@@ -72,9 +71,12 @@ class CoreHome extends \Piwik\Plugin
$stylesheets[] = "plugins/CoreHome/stylesheets/sparklineColors.less";
$stylesheets[] = "plugins/CoreHome/stylesheets/notification.less";
$stylesheets[] = "plugins/CoreHome/stylesheets/zen-mode.less";
+ $stylesheets[] = "plugins/CoreHome/stylesheets/layout.less";
$stylesheets[] = "plugins/CoreHome/angularjs/enrichedheadline/enrichedheadline.directive.less";
$stylesheets[] = "plugins/CoreHome/angularjs/dialogtoggler/ngdialog.less";
$stylesheets[] = "plugins/CoreHome/angularjs/notification/notification.directive.less";
+ $stylesheets[] = "plugins/CoreHome/angularjs/quick-access/quick-access.directive.less";
+ $stylesheets[] = "plugins/CoreHome/angularjs/selector/selector.directive.less";
}
public function getJsFiles(&$jsFiles)
@@ -163,6 +165,11 @@ class CoreHome extends \Piwik\Plugin
$jsFiles[] = "plugins/CoreHome/angularjs/ajax-form/ajax-form.controller.js";
$jsFiles[] = "plugins/CoreHome/angularjs/ajax-form/ajax-form.directive.js";
+
+ $jsFiles[] = "plugins/CoreHome/angularjs/quick-access/quick-access.controller.js";
+ $jsFiles[] = "plugins/CoreHome/angularjs/quick-access/quick-access.directive.js";
+
+ $jsFiles[] = "plugins/CoreHome/angularjs/selector/selector.directive.js";
}
public function getClientSideTranslationKeys(&$translationKeys)
@@ -171,8 +178,11 @@ class CoreHome extends \Piwik\Plugin
$translationKeys[] = 'General_Loading';
$translationKeys[] = 'General_Show';
$translationKeys[] = 'General_Hide';
+ $translationKeys[] = 'General_Website';
+ $translationKeys[] = 'General_ChooseWebsite';
$translationKeys[] = 'Intl_Year_Short';
$translationKeys[] = 'General_MultiSitesSummary';
+ $translationKeys[] = 'General_SearchNoResults';
$translationKeys[] = 'CoreHome_YouAreUsingTheLatestVersion';
$translationKeys[] = 'CoreHome_IncludeRowsWithLowPopulation';
$translationKeys[] = 'CoreHome_ExcludeRowsWithLowPopulation';
@@ -184,6 +194,7 @@ class CoreHome extends \Piwik\Plugin
$translationKeys[] = 'CoreHome_UnFlattenDataTable';
$translationKeys[] = 'CoreHome_ExternalHelp';
$translationKeys[] = 'CoreHome_ClickToEditX';
+ $translationKeys[] = 'CoreHome_Menu';
$translationKeys[] = 'SitesManager_NotFound';
$translationKeys[] = 'Annotations_ViewAndAddAnnotations';
$translationKeys[] = 'General_RowEvolutionRowActionTooltipTitle';
@@ -255,8 +266,10 @@ class CoreHome extends \Piwik\Plugin
$translationKeys[] = 'General_LoadingData';
$translationKeys[] = 'General_ErrorRequest';
$translationKeys[] = 'General_YourChangesHaveBeenSaved';
+ $translationKeys[] = 'General_LearnMore';
$translationKeys[] = 'CoreHome_UndoPivotBySubtable';
$translationKeys[] = 'CoreHome_PivotBySubtable';
- $translationKeys[] = 'General_LearnMore';
+ $translationKeys[] = 'CoreHome_QuickAccessTitle';
+ $translationKeys[] = 'CoreHome_Segments';
}
}
diff --git a/plugins/CoreHome/Menu.php b/plugins/CoreHome/Menu.php
index 83e5d053d6..20d9ac8eb8 100644
--- a/plugins/CoreHome/Menu.php
+++ b/plugins/CoreHome/Menu.php
@@ -27,24 +27,29 @@ class Menu extends \Piwik\Plugin\Menu
}
if (Plugin\Manager::getInstance()->isPluginActivated('Feedback')) {
- $menu->addItem('General_Help', null, array('module' => 'Feedback', 'action' => 'index'));
+ $menu->registerMenuIcon('General_Help', 'icon-help');
+ $menu->addItem('General_Help', null, array('module' => 'Feedback', 'action' => 'index'), $order = 990, Piwik::translate('General_Help'));
}
+ $menu->registerMenuIcon($login, 'icon-user');
+
if (Piwik::isUserIsAnonymous()) {
- if (Plugin\Manager::getInstance()->isPluginActivated('Feedback')) {
- $menu->addItem($login, null, array('module' => 'Feedback', 'action' => 'index'), 998);
+ if (Plugin\Manager::getInstance()->isPluginActivated('ScheduledReports')) {
+ $menu->addItem($login, null, array('module' => 'ScheduledReports', 'action' => 'index'), 970, $login);
} else {
- $menu->addItem($login, null, array('module' => 'API', 'action' => 'listAllAPI'), 998);
+ $menu->addItem($login, null, array('module' => 'API', 'action' => 'listAllAPI'), 970, $login);
}
} else {
- $menu->addItem($login, null, array('module' => 'UsersManager', 'action' => 'userSettings'), 998);
+ $menu->addItem($login, null, array('module' => 'UsersManager', 'action' => 'userSettings'), 970, $login);
}
$module = $this->getLoginModule();
if (Piwik::isUserIsAnonymous()) {
- $menu->addItem('Login_LogIn', null, array('module' => $module, 'action' => false), 999);
+ $menu->registerMenuIcon('Login_LogIn', 'icon-sign-in');
+ $menu->addItem('Login_LogIn', null, array('module' => $module, 'action' => false), 1000, Piwik::translate('Login_LogIn'));
} else {
- $menu->addItem('General_Logout', null, array('module' => $module, 'action' => 'logout', 'idSite' => null), 999);
+ $menu->registerMenuIcon('General_Logout', 'icon-sign-out');
+ $menu->addItem('General_Logout', null, array('module' => $module, 'action' => 'logout', 'idSite' => null), 1000, Piwik::translate('General_Logout'));
}
}
diff --git a/plugins/CoreHome/angularjs/enrichedheadline/enrichedheadline.directive.less b/plugins/CoreHome/angularjs/enrichedheadline/enrichedheadline.directive.less
index 054c0bdba0..4ffb8326f0 100644
--- a/plugins/CoreHome/angularjs/enrichedheadline/enrichedheadline.directive.less
+++ b/plugins/CoreHome/angularjs/enrichedheadline/enrichedheadline.directive.less
@@ -2,6 +2,16 @@
display: none;
}
+[piwik-enriched-headline] {
+ visibility: hidden;
+ height: 47px;
+}
+
+[piwik-enriched-headline].ng-isolate-scope {
+ visibility: visible;
+ height: auto;
+}
+
.enrichedHeadline {
min-height: 22px;
diff --git a/plugins/CoreHome/angularjs/menudropdown/menudropdown.directive.html b/plugins/CoreHome/angularjs/menudropdown/menudropdown.directive.html
index d1964d1ac4..5da730a2e2 100644
--- a/plugins/CoreHome/angularjs/menudropdown/menudropdown.directive.html
+++ b/plugins/CoreHome/angularjs/menudropdown/menudropdown.directive.html
@@ -5,7 +5,7 @@
title="{{ tooltip }}"
ng-bind-html="menuTitle"/>
- <div class="items" ng-show="view.showItems">
+ <div class="items borderedControl" ng-show="view.showItems">
<div class="search" ng-if="showSearch && view.showItems">
<input type="text"
piwik-focus-if="view.showItems"
diff --git a/plugins/CoreHome/angularjs/menudropdown/menudropdown.directive.less b/plugins/CoreHome/angularjs/menudropdown/menudropdown.directive.less
index da8b79a1fc..a36d00c0f5 100644
--- a/plugins/CoreHome/angularjs/menudropdown/menudropdown.directive.less
+++ b/plugins/CoreHome/angularjs/menudropdown/menudropdown.directive.less
@@ -25,9 +25,9 @@
}
.items {
- z-index: 21;
+ z-index: 200;
position: absolute;
- border: 1px solid @color-silver-l80 !important;
+ border: 1px solid @color-silver-l80;
background: @theme-color-background-base;
max-height: 400px;
overflow-y: auto;
@@ -41,7 +41,7 @@
.search_ico {
position: absolute;
right: 25px;
- top: 22px;
+ top: 27px;
margin: 0px;
left: initial;
}
@@ -74,11 +74,11 @@
text-align: left;
&:hover {
- background: @color-silver-l80;
+ background: @theme-color-background-tinyContrast;
}
&.active {
- background-color: @color-silver-l80;
+ background-color: @theme-color-background-tinyContrast;
}
&.category {
diff --git a/plugins/CoreHome/angularjs/quick-access/quick-access.controller.js b/plugins/CoreHome/angularjs/quick-access/quick-access.controller.js
new file mode 100644
index 0000000000..9e1fefba82
--- /dev/null
+++ b/plugins/CoreHome/angularjs/quick-access/quick-access.controller.js
@@ -0,0 +1,78 @@
+/*!
+ * Piwik - free/libre analytics platform
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+(function () {
+ angular.module('piwikApp').controller('QuickAccessController', QuickAccessController);
+
+ QuickAccessController.$inject = ['$scope', '$filter', 'siteSelectorModel'];
+
+ function QuickAccessController($scope, $filter, siteSelectorModel){
+
+ this.menuItems = [];
+ this.numMenuItems = 0;
+ this.sitesModel = siteSelectorModel;
+
+ this.onKeypress = function (event) {
+ if (38 == event.which) {
+ $scope.highlightPreviousItem();
+ event.preventDefault();
+ } else if (40 == event.which) {
+ $scope.highlightNextItem();
+ event.preventDefault();
+ } else if (13 == event.which) {
+ $scope.clickQuickAccessMenuItem();
+ }
+ };
+
+ this.searchMenu = function (searchTerm) {
+ searchTerm = searchTerm.toLowerCase();
+
+ var index = -1;
+ var menuItemsIndex = {};
+ var menuItems = [];
+
+ var moveToCategory = function (i, submenuItem) {
+ submenuItem = angular.copy(submenuItem); // force rerender of element to prevent weird side effects
+ submenuItem.menuIndex = ++index; // needed for proper highlighting with arrow keys
+
+ var category = submenuItem.category;
+ if (!(category in menuItemsIndex)) {
+ menuItems.push({title: category, items: []});
+ menuItemsIndex[category] = menuItems.length - 1;
+ }
+
+ var indexOfCategory = menuItemsIndex[category];
+ menuItems[indexOfCategory].items.push(submenuItem);
+ };
+
+ $scope.resetSearchIndex();
+
+ if ($scope.hasSitesSelector) {
+ this.sitesModel.searchSite(searchTerm);
+ }
+
+ var topMenuItems = $filter('filter')($scope.getTopMenuItems(), searchTerm);
+ var leftMenuItems = $filter('filter')($scope.getLeftMenuItems(), searchTerm);
+ var segmentItems = $filter('filter')($scope.getSegmentItems(), searchTerm);
+
+ $.each(topMenuItems, moveToCategory);
+ $.each(leftMenuItems, moveToCategory);
+ $.each(segmentItems, moveToCategory);
+
+ this.numMenuItems = topMenuItems.length + leftMenuItems.length + segmentItems.length;
+ this.menuItems = menuItems;
+ };
+
+ this.selectSite = function (idsite) {
+ this.sitesModel.loadSite(idsite);
+ };
+
+ this.selectMenuItem = function (index) {
+ $scope.selectMenuItem(index);
+ };
+
+ }
+})();
diff --git a/plugins/CoreHome/angularjs/quick-access/quick-access.directive.html b/plugins/CoreHome/angularjs/quick-access/quick-access.directive.html
new file mode 100644
index 0000000000..ccf97c14dc
--- /dev/null
+++ b/plugins/CoreHome/angularjs/quick-access/quick-access.directive.html
@@ -0,0 +1,36 @@
+<div class="quick-access" title="{{ 'CoreHome_QuickAccessTitle' | translate }}"
+ ng-class="{active: view.searchActive, expanded: view.searchActive}"
+ piwik-focus-anywhere-but-here="view.searchActive = false;">
+ <span class="icon-search" ng-hide="search.term || view.searchActive"
+ ng-mouseenter="view.searchActive=true"></span>
+ <input ng-keydown="quickAccess.onKeypress($event)"
+ ng-change="view.searchActive=true;quickAccess.searchMenu(search.term)"
+ ng-focus="view.searchActive=true"
+ ng-model="search.term" piwik-focus-if="view.searchActive"
+ type="text"/>
+ <ul ng-hide="!search.term || !view.searchActive || (quickAccess.numMenuItems > 0) || (quickAccess.sitesModel.sites | length)">
+ <li class="no-result">{{ 'General_SearchNoResults' | translate }}</li>
+ </ul>
+ <ul ng-show="search.term && view.searchActive" ng-repeat="subcategory in quickAccess.menuItems">
+ <li class="quick-access-category"
+ ng-click="search.term = subcategory.title;quickAccess.searchMenu(search.term)">{{ subcategory.title }}</li>
+ <li class="result"
+ ng-class="{selected: submenuEntry.menuIndex == search.index}"
+ ng-mouseenter="search.index=submenuEntry.menuIndex"
+ ng-click="quickAccess.selectMenuItem(submenuEntry.index)"
+ ng-repeat="submenuEntry in subcategory.items"><a>{{ submenuEntry.name | trim }}</a></li>
+ </ul>
+ <ul ng-show="search.term && view.searchActive">
+ <li class="quick-access-category websiteCategory"
+ ng-show="hasSitesSelector && ((quickAccess.sitesModel.sites | length) || quickAccess.sitesModel.isLoading)"
+ >{{ 'SitesManager_Sites' | translate }}</li>
+ <li class="no-result"
+ ng-show="hasSitesSelector && quickAccess.sitesModel.isLoading">{{ 'MultiSites_LoadingWebsites' | translate }}</li>
+ <li class="result"
+ ng-show="hasSitesSelector && !quickAccess.sitesModel.isLoading"
+ ng-mouseenter="search.index=(quickAccess.numMenuItems + $index)"
+ ng-class="{selected: (quickAccess.numMenuItems + $index) == search.index}"
+ ng-click="quickAccess.selectSite(site.idsite)"
+ ng-repeat="site in quickAccess.sitesModel.sites"><a ng-bind-html="site.name"></a></li>
+ </ul>
+</div> \ No newline at end of file
diff --git a/plugins/CoreHome/angularjs/quick-access/quick-access.directive.js b/plugins/CoreHome/angularjs/quick-access/quick-access.directive.js
new file mode 100644
index 0000000000..226b325ee0
--- /dev/null
+++ b/plugins/CoreHome/angularjs/quick-access/quick-access.directive.js
@@ -0,0 +1,258 @@
+/*!
+ * Piwik - free/libre analytics platform
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+/**
+ * Usage:
+ * <div piwik-dialog="showDialog">...</div>
+ * Will show dialog once showDialog evaluates to true.
+ *
+ * Will execute the "executeMyFunction" function in the current scope once the yes button is pressed.
+ */
+(function () {
+ angular.module('piwikApp').directive('piwikQuickAccess', QuickAccessDirective);
+
+ QuickAccessDirective.$inject = ['$rootElement', '$timeout', 'piwik'];
+
+ function QuickAccessDirective ($rootElement, $timeout, piwik) {
+
+ return {
+ restrict: 'A',
+ replace: true,
+ scope: {},
+ templateUrl: 'plugins/CoreHome/angularjs/quick-access/quick-access.directive.html?cb=' + piwik.cacheBuster,
+ controller: 'QuickAccessController',
+ controllerAs: 'quickAccess',
+ link: function (scope, element, attrs) {
+
+ var menuIndex = -1; // the menu index is used to identify which element to click
+ var topMenuItems = []; // cache for top menu items
+ var leftMenuItems = []; // cache for left menu items
+ var segmentItems = []; // cache for segment items
+ var hasSegmentSelector = angular.element('.segmentEditorPanel').length;
+ scope.hasSitesSelector = angular.element('[piwik-siteselector]').length;
+
+ function trim(str) {
+ return str.replace(/^\s+|\s+$/g,'');
+ }
+
+ scope.getTopMenuItems = function()
+ {
+ if (topMenuItems && topMenuItems.length) {
+ return topMenuItems;
+ }
+
+ var category = _pk_translate('CoreHome_Menu');
+
+ $rootElement.find('#topRightBar .navbar-right li > a').each(function (index, element) {
+ var $element = $(element);
+
+ if ($element.is('#topmenu-usersmanager')) {
+ // ignore languages manager
+ return;
+ }
+
+ var text = trim($element.text());
+
+ if (!text) {
+ text = trim($element.attr('title')); // possibly a icon, use title instead
+ }
+
+ if (text) {
+ topMenuItems.push({name: text, index: ++menuIndex, category: category});
+ $element.attr('quick_access', menuIndex);
+ }
+ });
+
+ return topMenuItems;
+ };
+
+ scope.getLeftMenuItems = function ()
+ {
+ if (leftMenuItems && leftMenuItems.length) {
+ return leftMenuItems;
+ }
+
+ $rootElement.find('#secondNavBar .menuTab').each(function (index, element) {
+ var $element = angular.element(element);
+ var category = trim($element.find('> .item').text());
+
+ if (category && -1 !== category.lastIndexOf("\n")) {
+ // remove "\n\nMenu"
+ category = trim(category.substr(0, category.lastIndexOf("\n")));
+ }
+
+ $element.find('li .item').each(function (i, element) {
+ var $element = angular.element(element);
+ var text = trim($element.text());
+
+ if (text) {
+ leftMenuItems.push({name: text, category: category, index: ++menuIndex});
+ $element.attr('quick_access', menuIndex);
+ }
+ })
+
+ });
+
+ return leftMenuItems;
+ };
+
+ scope.getSegmentItems = function()
+ {
+ if (!hasSegmentSelector) {
+ return [];
+ }
+
+ if (segmentItems && segmentItems.length) {
+ return segmentItems;
+ }
+
+ var category = _pk_translate('CoreHome_Segments');
+
+ $rootElement.find('.segmentList [data-idsegment]').each(function (index, element) {
+ var $element = angular.element(element);
+ var text = trim($element.find('.segname').text());
+
+ if (text) {
+ segmentItems.push({name: text, category: category, index: ++menuIndex});
+ $element.attr('quick_access', menuIndex);
+ }
+ });
+
+ return segmentItems;
+ };
+
+ scope.activateSearch = function()
+ {
+ scope.$eval('view.searchActive = true');
+ $timeout(function () {
+ scope.$apply();
+ }, 0);
+ };
+
+ scope.deactivateSearch = function()
+ {
+ scope.$eval('search.term = ""');
+ scope.$eval('view.searchActive = false');
+ element.find('input').blur();
+ $timeout(function () {
+ scope.$apply();
+ }, 0);
+ };
+
+ function isElementInViewport(element) {
+
+ var rect = element.getBoundingClientRect();
+
+ return (
+ rect.top >= 0 &&
+ rect.left >= 0 &&
+ rect.bottom <= $(window).height() &&
+ rect.right <= $(window).width()
+ );
+ }
+
+ function getCurrentlySelectedElement(index)
+ {
+ var results = element.find('li.result');
+ if (results && results.length && results[scope.search.index]) {
+ return $(results[scope.search.index]);
+ }
+ }
+
+ function makeSureSelectedItemIsInViewport() {
+ var element = getCurrentlySelectedElement();
+
+ if (element && element[0] && !isElementInViewport(element[0])) {
+ scrollFirstElementIntoView(element);
+ }
+ }
+
+ function scrollFirstElementIntoView(element)
+ {
+ if (element && element[0] && element[0].scrollIntoView) {
+ // make sure search is visible
+ element[0].scrollIntoView();
+ }
+ }
+
+ scope.highlightPreviousItem = function()
+ {
+ if (0 >= (scope.search.index - 1)) {
+ scope.search.index = 0;
+ } else {
+ scope.search.index--;
+ }
+ makeSureSelectedItemIsInViewport();
+ };
+
+ scope.resetSearchIndex = function () {
+ scope.search.index = 0;
+ makeSureSelectedItemIsInViewport();
+ };
+
+ scope.highlightNextItem = function()
+ {
+ var numTotal = element.find('li.result').length;
+
+ if (numTotal <= (scope.search.index + 1)) {
+ scope.search.index = numTotal - 1;
+ } else {
+ scope.search.index++;
+ }
+
+ makeSureSelectedItemIsInViewport();
+ };
+
+ scope.clickQuickAccessMenuItem = function()
+ {
+ var selectedMenuElement = getCurrentlySelectedElement();
+ if (selectedMenuElement) {
+ $timeout(function () {
+ selectedMenuElement.click();
+ }, 20);
+ }
+ };
+
+ scope.selectMenuItem = function(index)
+ {
+ var target = $rootElement.find('[quick_access=' + index + ']');
+
+ if (target && target.length && target[0]) {
+ scope.deactivateSearch();
+
+ var actualTarget = target[0];
+
+ var href = $(actualTarget).attr('href');
+
+ if (href && href.length > 10 && actualTarget && actualTarget.click) {
+ try {
+ actualTarget.click();
+ } catch (e) {
+ $(actualTarget).click();
+ }
+ } else {
+ $(actualTarget).click();
+ }
+ }
+ };
+
+ Mousetrap.bind('f', function(event) {
+ if (event.preventDefault) {
+ event.preventDefault();
+ } else {
+ event.returnValue = false; // IE
+ }
+
+ scrollFirstElementIntoView(element);
+
+ scope.activateSearch();
+ });
+
+ }
+ };
+ }
+})(); \ No newline at end of file
diff --git a/plugins/CoreHome/angularjs/quick-access/quick-access.directive.less b/plugins/CoreHome/angularjs/quick-access/quick-access.directive.less
new file mode 100644
index 0000000000..1c46c7533d
--- /dev/null
+++ b/plugins/CoreHome/angularjs/quick-access/quick-access.directive.less
@@ -0,0 +1,55 @@
+.quick-access {
+ position: relative;
+
+ li {
+ font-size: 11px;
+ }
+
+ li a {
+ padding: 10px 19px;
+ display: inline-block;
+ text-decoration: none;
+ word-break: break-all;
+ }
+
+ .icon-search {
+ position: absolute;
+ font-size: 14px;
+ top: 10px;
+ left: 10px;
+
+ }
+ input {
+ width:100%;
+ height: 100%;
+ border: 0 !important;
+ box-shadow: 0 0 !important;
+ border-radius: 0 !important;
+ font-size: 11px;
+ &:focus {
+ outline: none;
+ }
+ }
+ .selected {
+ background-color: @theme-color-background-tinyContrast !important;
+ }
+ .quick-access-category {
+ text-align: left !important;
+ font-size: 11px;
+ padding: 5px 5px 5px 10px;
+ cursor: pointer;
+ }
+ .result {
+ cursor: pointer;
+ }
+ .quick-access-category:hover {
+ background: none !important;
+ }
+ .no-result {
+ padding: 10px 19px;
+ cursor: default;
+ }
+ .websiteCategory {
+ cursor: default;
+ }
+} \ No newline at end of file
diff --git a/plugins/CoreHome/angularjs/selector/selector.directive.js b/plugins/CoreHome/angularjs/selector/selector.directive.js
new file mode 100644
index 0000000000..eec9dda6d1
--- /dev/null
+++ b/plugins/CoreHome/angularjs/selector/selector.directive.js
@@ -0,0 +1,86 @@
+/*!
+ * Piwik - free/libre analytics platform
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+/**
+ *
+ */
+(function () {
+ angular.module('piwikApp').directive('piwikExpandOnClick', piwikExpandOnClick);
+
+ piwikExpandOnClick.$inject = ['$document'];
+
+ function piwikExpandOnClick($document){
+
+ return {
+ restrict: 'A',
+ link: function(scope, element, attr) {
+ element.find('.title').on('click', function () {
+ element.toggleClass('expanded');
+ });
+
+ function onClickOutsideElement (event) {
+ if (element.has(event.target).length === 0) {
+ element.removeClass('expanded');
+ }
+ }
+
+ function onEscapeHandler (event) {
+ if (event.which === 27) {
+ element.removeClass('expanded');
+ }
+ }
+
+ $document.on('keyup', onEscapeHandler);
+ $document.on('mouseup', onClickOutsideElement);
+ scope.$on('$destroy', function() {
+ $document.off('mouseup', onClickOutsideElement);
+ $document.off('keyup', onEscapeHandler);
+ });
+ }
+ };
+ }
+
+ angular.module('piwikApp').directive('piwikExpandOnHover', piwikExpandOnHover);
+
+ piwikExpandOnHover.$inject = ['$document'];
+
+ function piwikExpandOnHover($document){
+
+ return {
+ restrict: 'A',
+ link: function(scope, element, attr) {
+
+ element.on('mouseenter', '.title', function () {
+ element.addClass('expanded');
+ });
+
+ element.on('mouseleave', function () {
+ element.removeClass('expanded');
+ });
+
+ function onClickOutsideElement (event) {
+ if (element.has(event.target).length === 0) {
+ element.removeClass('expanded');
+ }
+ }
+
+ function onEscapeHandler (event) {
+ if (event.which === 27) {
+ element.removeClass('expanded');
+ }
+ }
+
+ $document.on('keyup', onEscapeHandler);
+ $document.on('mouseup', onClickOutsideElement);
+ scope.$on('$destroy', function() {
+ $document.off('mouseup', onClickOutsideElement);
+ $document.off('keyup', onEscapeHandler);
+ });
+ }
+ };
+ }
+})();
diff --git a/plugins/CoreHome/angularjs/selector/selector.directive.less b/plugins/CoreHome/angularjs/selector/selector.directive.less
new file mode 100644
index 0000000000..9c0e207d4d
--- /dev/null
+++ b/plugins/CoreHome/angularjs/selector/selector.directive.less
@@ -0,0 +1,59 @@
+.piwikSelector {
+ display: inline-block;
+ line-height: 0;
+
+ span.title,
+ a.title {
+ .font-default(11px, 12px);
+ display: inline-block;
+ width: 100%;
+ padding: 11px 19px 10px;
+ white-space: nowrap;
+ cursor: pointer;
+ text-transform: uppercase;
+ text-decoration: none;
+ color: @theme-color-text;
+
+ &.activityIndicator {
+ background: url(plugins/Morpheus/images/loading-blue.gif) no-repeat right 9px;
+
+ .icon {
+ visibility: hidden;
+ }
+ }
+
+ .icon {
+ padding-left: 6px;
+ display: inline-block;
+ vertical-align: top;
+
+ &.iconHidden {
+ visibility: hidden;
+ }
+ }
+
+ .icon:not(.icon-fixed) {
+ float: right;
+ &:after {
+ clear:right;
+ content: ' ';
+ }
+ }
+
+ &:hover, &:focus {
+ text-decoration: none;
+ }
+ }
+
+ .dropdown {
+ .font-default(11px, 15px);
+ display: none;
+ padding: 5px 19px 11px 19px;
+ }
+
+ &.expanded {
+ .dropdown {
+ display: block;
+ }
+ }
+}
diff --git a/plugins/CoreHome/angularjs/siteselector/siteselector.directive.html b/plugins/CoreHome/angularjs/siteselector/siteselector.directive.html
index 5f6a3cac8a..3a4cbec8f2 100644
--- a/plugins/CoreHome/angularjs/siteselector/siteselector.directive.html
+++ b/plugins/CoreHome/angularjs/siteselector/siteselector.directive.html
@@ -1,5 +1,6 @@
-<div piwik-focus-anywhere-but-here="view.showSitesList=false" class="custom_select"
- ng-class="{'sites_autocomplete--dropdown': (model.hasMultipleWebsites || showAllSitesItem || !model.sites.length)}">
+<div piwik-focus-anywhere-but-here="view.showSitesList=false"
+ class="siteSelector piwikSelector borderedControl"
+ ng-class="{'expanded': view.showSitesList}">
<script type="text/ng-template" id="siteselector_allsiteslink.html">
<div ng-click="switchSite({idsite: 'all', name: allSitesText});view.showSitesList=false;"
@@ -13,13 +14,19 @@
<input ng-if="inputName" type="hidden" name="{{ inputName }}" ng-value="selectedSite.id"/>
<a ng-click="view.showSitesList=!view.showSitesList; view.showSitesList && model.loadInitialSites();"
+ piwik-onenter="view.showSitesList=!view.showSitesList; view.showSitesList && model.loadInitialSites();"
href="javascript:void(0)"
- class="custom_select_main_link"
- ng-class="{'loading': model.isLoading}">
- <span ng-bind-html="selectedSite.name || model.firstSiteName">?</span>
+ title="{{ 'General_ChooseWebsite'|translate }}"
+ ng-class="{'loading': model.isLoading}"
+ class="title">
+ <span class="icon icon-arrow-bottom"
+ ng-class="{'iconHidden': model.isLoading, 'collapsed': !view.showSitesList}"></span>
+ <span>{{ 'General_Website'| translate }}:
+ <span ng-bind-html="selectedSite.name || model.firstSiteName">?</span>
+ </span>
</a>
- <div ng-show="view.showSitesList" class="custom_select_block">
+ <div ng-show="view.showSitesList" class="dropdown">
<div ng-if="allSitesLocation=='top' && showAllSitesItem"
ng-include="'siteselector_allsiteslink.html'"></div>
@@ -49,10 +56,8 @@
ng-click="view.searchTerm=''"
ng-model="view.searchTerm"
ng-change="model.searchSite(view.searchTerm)"
+ placeholder="{{ 'General_Search' | translate }}"
class="websiteSearch inp"/>
- <input type="submit"
- ng-click="model.searchSite(view.searchTerm)"
- value="{{ 'General_Search' | translate }}" class="but"/>
<img title="Clear"
ng-show="view.searchTerm"
ng-click="view.searchTerm=''; model.loadInitialSites()"
diff --git a/plugins/CoreHome/angularjs/siteselector/siteselector.directive.js b/plugins/CoreHome/angularjs/siteselector/siteselector.directive.js
index 450813f2e1..ba5c492cb8 100644
--- a/plugins/CoreHome/angularjs/siteselector/siteselector.directive.js
+++ b/plugins/CoreHome/angularjs/siteselector/siteselector.directive.js
@@ -26,9 +26,9 @@
(function () {
angular.module('piwikApp').directive('piwikSiteselector', piwikSiteselector);
- piwikSiteselector.$inject = ['$document', 'piwik', '$filter'];
+ piwikSiteselector.$inject = ['$document', 'piwik', '$filter', '$timeout'];
- function piwikSiteselector($document, piwik, $filter){
+ function piwikSiteselector($document, piwik, $filter, $timeout){
var defaults = {
name: '',
siteid: piwik.idSite,
@@ -85,6 +85,10 @@
scope.$watch('view.showSitesList', function (newValue) {
element.toggleClass('expanded', !! newValue);
});
+
+ $timeout(function () {
+ initTopControls();
+ });
};
}
};
diff --git a/plugins/CoreHome/angularjs/siteselector/siteselector.directive.less b/plugins/CoreHome/angularjs/siteselector/siteselector.directive.less
index 8b38e556df..b0818ac472 100644
--- a/plugins/CoreHome/angularjs/siteselector/siteselector.directive.less
+++ b/plugins/CoreHome/angularjs/siteselector/siteselector.directive.less
@@ -1,155 +1,137 @@
-
-/*sites_autocomplete*/
-.sites_autocomplete {
- position: absolute;
- font-size: 12px;
- display: inline-block;
- height: 30px; /* Hack to not push the dashboard widget below */
-}
-
-table.dataTable tr td .sites_autocomplete a {
- width: auto;
-}
-
-.sites_selector_in_dashboard {
- margin-top:10px;
-}
-.top_bar_sites_selector {
- float: right
-}
-
-.top_bar_sites_selector > label {
- display: inline-block;
- padding: 7px 0 6px 0;
- float: left;
- font-size: 12px;
-}
-
-.top_bar_sites_selector > .sites_autocomplete {
- position: static;
- margin-left: 12px;
-}
-
.autocompleteMatched {
color: #5256BE;
font-weight: bold;
}
-
-.sites_autocomplete .custom_select {
- float: left;
- position: relative;
- z-index: 19;
- background: @theme-color-background-base url(plugins/Morpheus/images/sites_selection.png) repeat-x 0 0;
- border: 1px solid @color-silver-l85;
- color: #255792;
- border-radius: 4px;
- cursor: pointer;
- width: 205px;
-}
-
-.sites_autocomplete .custom_select_main_link {
- display: block;
- text-decoration: none;
- background: none;
- cursor: default;
- padding: 9px 5px 7px 5px;
-}
-
-#content.admin .adminTable .sites_autocomplete a {
- text-decoration: none;
-}
-
-.sites_autocomplete .custom_select_ul_list li a,
-.sites_autocomplete .custom_select_all a,
-.sites_autocomplete .custom_select_main_link > span {
+.siteSelector {
+ a.title {
+ .icon.collapsed.iconHidden {
+ visibility: visible;
+ }
+ }
+ .dropdown {
+ max-width: 210px;
+ }
+}
+
+#content {
+ .sites_autocomplete {
+ position: static !important;
+ height: 36px;
+ z-index: 99;
+ vertical-align: middle;
+
+ > .siteSelector {
+ position: absolute;
+ z-index: 9999;
+ }
+
+ a.title {
+ text-decoration: none;
+ }
+ }
+}
+
+.siteSelector.expanded {
+ .loading {
+ background: url(plugins/Morpheus/images/loading-blue.gif) no-repeat right 9px;
+ }
+}
+
+.siteSelector a.title,
+.siteSelector .custom_select_ul_list li a,
+.siteSelector .custom_select_all a,
+.siteSelector .custom_select_main_link > span {
display: inline-block;
- max-width: 170px;
+ max-width: 210px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
- padding: 0 10px 0 4px;
-}
-
-.sites_autocomplete--dropdown .custom_select_main_link:not(.loading):before {
- content: " \25BC";
- position: absolute;
- right: 0;
- font-size: 0.8em;
- margin-top: 0.2em;
- color: @theme-color-text-light;
- margin-top: 9px;
+ padding: 0;
+ color: @theme-color-text;
+ text-transform: uppercase;
+ width: 100%;
}
-.sites_autocomplete--dropdown .custom_select_main_link {
- cursor: pointer;
- position: relative;
-}
+.siteSelector a.title {
+ > span {
+ max-width: 161px;
+ display: inline-block;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
-.sites_autocomplete .custom_select_main_link.loading {
- background: url(plugins/Morpheus/images/loading-blue.gif) no-repeat right 9px;
+ span {
+ vertical-align: top;
+ }
}
-.sites_autocomplete .custom_select_ul_list,
-.sites_autocomplete ul.ui-autocomplete {
+.siteSelector .custom_select_ul_list,
+.siteSelector ul.ui-autocomplete {
position: relative;
list-style: none;
line-height: 18px;
padding: 0 0 15px 0;
+ box-shadow: none !important;
}
-.sites_autocomplete .custom_select_ul_list li a,
-.sites_autocomplete .custom_select_all a {
+.siteSelector .custom_select_ul_list {
+ padding: 0 0 5px 0;
+}
+
+.siteSelector .dropdown {
+ padding-top: 0;
+}
+
+.siteSelector .custom_select_ul_list li a,
+.siteSelector .custom_select_all a {
line-height: 18px;
height: auto;
display: block;
text-decoration: none;
+ padding-left: 5px;
+ margin-left: -5px;
}
-.sites_autocomplete .custom_select_ul_list li a:hover,
-.sites_autocomplete .custom_select_all a:hover {
+.siteSelector .custom_select_ul_list li a:hover,
+.siteSelector .custom_select_all a:hover {
background: #ebeae6;
}
-.sites_autocomplete .custom_select_all a {
+.siteSelector .custom_select_all a {
text-decoration: none;
- margin: 0 0 5px 0;
+ margin: 0 0 5px -5px;
}
-.sites_autocomplete .custom_select_search {
- margin: 0 0 0 4px;
- height: 26px;
+.siteSelector .custom_select_search {
+ margin: 0;
+ height: 33px;
display: block;
white-space: nowrap;
- background: url(plugins/Morpheus/images/search_bg.png) no-repeat 0 0;
-}
-
-.sites_autocomplete .custom_select_search .inp {
- vertical-align: top;
- width: 165px;
- padding: 2px 6px !important;
- border: 0 !important;
- background: transparent !important;
- font-size: 10px !important;
- color: #454545 !important;
-
-}
-.sites_autocomplete {
- width: 205px;
-}
-
-.sites_autocomplete .custom_select_search .but {
- vertical-align: top;
- font-size: 10px;
- border: 0;
- background: transparent;
- width: 21px;
- height: 17px;
- overflow: hidden;
- opacity: 0;
- cursor: pointer;
+ position: relative;
+ padding-top: 4px;
+
+ .inp {
+ vertical-align: top;
+ width: 100%;
+ padding: 4px 6px !important;
+ border: 1px solid #d0d0d0 !important;
+ background: transparent !important;
+ font-size: 11px !important;
+ color: #454545 !important;
+ }
+ .reset {
+ position: absolute;
+ top: 4px;
+ right: 4px;
+ cursor: pointer;
+ }
+}
+
+.siteSelector {
+ width: auto;
}
-.sites_selector_container>.sites_autocomplete {
+.sites_selector_container>.siteSelector {
padding-left: 12px;
}
@@ -158,17 +140,6 @@ table.dataTable tr td .sites_autocomplete a {
float:none;position:static
}
-.custom_select_search .reset {
- position: relative; top: 3px; left: -50px; cursor: pointer;
-}
-
-.custom_select_block {
- overflow: hidden;
- max-width: inherit;
- visibility: visible;
- padding: 0 5px 7px 5px;
-}
-
.custom_select_block_show {
height: auto;
overflow: visible;
diff --git a/plugins/CoreHome/javascripts/calendar.js b/plugins/CoreHome/javascripts/calendar.js
index ceb11e4ec4..d4119de31b 100644
--- a/plugins/CoreHome/javascripts/calendar.js
+++ b/plugins/CoreHome/javascripts/calendar.js
@@ -473,21 +473,6 @@
toggleMonthDropdown(selectedPeriod == 'year');
});
- // reset date/period when opening calendar
- $("#periodString").on('click', "#date,.calendar-icon", function () {
- var periodMore = $("#periodMore").toggle();
- if (periodMore.is(":visible")) {
- periodMore.find(".ui-state-highlight").removeClass('ui-state-highlight');
- }
- });
-
- $('body').on('click', function(e) {
- var target = $(e.target);
- if (target.closest('html').length && !target.closest('#periodString').length && !target.is('option') && $("#periodMore").is(":visible")) {
- $("#periodMore").hide();
- }
- });
-
function onDateRangeSelect(dateText, inst) {
var toOrFrom = inst.id == 'calendarFrom' ? 'From' : 'To';
$('#inputCalendar' + toOrFrom).val(dateText);
diff --git a/plugins/CoreHome/javascripts/corehome.js b/plugins/CoreHome/javascripts/corehome.js
index 5bddc23f9e..4580ddca8c 100755
--- a/plugins/CoreHome/javascripts/corehome.js
+++ b/plugins/CoreHome/javascripts/corehome.js
@@ -16,9 +16,13 @@
var headerMessageParent = $('#header_message').parent();
// when 'check for updates...' link is clicked, force a check & display the result
- headerMessageParent.on('click', '#updateCheckLinkContainer', function (e) {
+ headerMessageParent.on('click', '.title', function (e) {
e.preventDefault();
+ if (!$(this).find('#updateCheckLinkContainer').length) {
+ return;
+ }
+
var headerMessage = $(this).closest('#header_message');
var ajaxRequest = new ajaxHelper();
@@ -27,16 +31,23 @@
module: 'CoreHome',
action: 'checkForUpdates'
}, 'get');
+
+ var $titleElement = $(this);
+ $titleElement.addClass('activityIndicator');
ajaxRequest.setCallback(function (response) {
headerMessage.fadeOut('slow', function () {
response = $(response);
+ $titleElement.removeClass('activityIndicator');
+
var newVersionAvailable = response.hasClass('header_alert');
if (newVersionAvailable) {
headerMessage.replaceWith(response);
+ headerMessage.show();
}
else {
- headerMessage.html(_pk_translate('CoreHome_YouAreUsingTheLatestVersion')).show();
+ headerMessage.find('.title').html(_pk_translate('CoreHome_YouAreUsingTheLatestVersion'));
+ headerMessage.show();
setTimeout(function () {
headerMessage.fadeOut('slow', function () {
headerMessage.replaceWith(response);
@@ -54,7 +65,7 @@
// when clicking the header message, show the long message w/o needing to hover
headerMessageParent.on('click', '#header_message', function (e) {
if (e.target.tagName.toLowerCase() != 'a') {
- $(this).toggleClass('active');
+ $(this).toggleClass('expanded');
}
});
diff --git a/plugins/CoreHome/javascripts/menu.js b/plugins/CoreHome/javascripts/menu.js
index 2f5e16c827..2f3a78a045 100644
--- a/plugins/CoreHome/javascripts/menu.js
+++ b/plugins/CoreHome/javascripts/menu.js
@@ -16,46 +16,76 @@ menu.prototype =
{
resetTimer: null,
- adaptSubMenuHeight: function() {
- var subNavHeight = $('.sfHover > ul').outerHeight();
- $('.nav_sep').height(subNavHeight);
- },
-
- overMainLI: function () {
- var $this = $(this);
- $this.siblings().removeClass('sfHover');
- $this.addClass('sfHover');
- menu.prototype.adaptSubMenuHeight();
- clearTimeout(menu.prototype.resetTimer);
- },
-
- outMainLI: function () {
- clearTimeout(menu.prototype.resetTimer);
- menu.prototype.resetTimer = setTimeout(function() {
- $('.Menu-tabList > .sfHover', this.menuNode).removeClass('sfHover');
- $('.Menu-tabList > .sfActive', this.menuNode).addClass('sfHover');
- menu.prototype.adaptSubMenuHeight();
- }, 2000);
- },
-
onItemClick: function (e) {
if (e.which === 2) {
return;
}
- $('.Menu--dashboard').trigger('piwikSwitchPage', this);
- broadcast.propagateAjax( $(this).attr('href').substr(1) );
- return false;
+
+ $('#secondNavBar').trigger('piwikSwitchPage', this);
+ $('#secondNavBar').removeClass('open fadeInLeft');
+
+ if (!$('#content.admin').size()) {
+ broadcast.propagateAjax( $(this).attr('href').substr(1) );
+
+ return false;
+ }
+
+ var href = $(this).attr('href');
+ return !!href;
+ },
+
+ isAdmin: function () {
+ return !!$('#content.admin').size();
},
init: function () {
- this.menuNode = $('.Menu--dashboard');
+ this.menuNode = $('#secondNavBar');
- this.menuNode.find("li:has(ul),li#Searchmenu").hover(this.overMainLI, this.outMainLI);
- this.menuNode.find("li:has(ul),li#Searchmenu").focusin(this.overMainLI);
+ // add id to all li menu to support menu identification.
+ // for all sub menu we want to have a unique id based on their module and action
+ // for main menu we want to add just the module as its id.
+ this.menuNode.find('li').each(function () {
+ var $this = $(this);
+ var link = $this.find('a');
- this.menuNode.find('a.menuItem').click(this.onItemClick);
+ var main_menu = $this.parent().hasClass('navbar') ? true : false;
- menu.prototype.adaptSubMenuHeight();
+ if (!link) {
+ return;
+ }
+
+ var href = link.attr('href');
+ if (!href) {
+ if (main_menu && !$this.find('li').length) {
+ $this.hide(); // no link and no child menu items -> hide it
+ }
+ return;
+ }
+ var url = href.substr(1);
+
+ var module = broadcast.getValueFromUrl('module', url);
+ var action = broadcast.getValueFromUrl('action', url);
+
+ var moduleId = broadcast.getValueFromUrl("idGoal", url) || broadcast.getValueFromUrl("idDashboard", url);
+
+ if (main_menu) {
+ $this.attr({id: module});
+ }
+ // if there's a idGoal or idDashboard, use this in the ID
+ else if (moduleId != '') {
+ $(this).attr({id: module + '_' + action + '_' + moduleId});
+ }
+ else {
+ $(this).attr({id: module + '_' + action});
+ }
+ });
+
+ this.menuNode.find('a.item').click(this.onItemClick);
+
+ var self = this;
+ $('#header .toggle-second-menu').click(function () {
+ self.menuNode.toggleClass('open fadeInLeft');
+ });
},
activateMenu: function (module, action, params) {
@@ -63,13 +93,17 @@ menu.prototype =
params.module = module;
params.action = action;
- this.menuNode.find('li').removeClass('sfHover').removeClass('sfActive');
+ this.menuNode.find('li').removeClass('sfActive');
+
+ var isAdmin = this.isAdmin();
+
var $activeLink = this.menuNode.find('a').filter(function () {
var url = $(this).attr('href');
if (!url) {
return false;
}
+ var found = false;
for (var key in params) {
if (!params.hasOwnProperty(key)
|| !params[key]
@@ -77,17 +111,27 @@ menu.prototype =
continue;
}
- var actual = broadcast.getValueFromHash(key, url);
+ var actual;
+
+ if (isAdmin) {
+ actual = broadcast.getValueFromUrl(key, url);
+ } else {
+ actual = broadcast.getValueFromHash(key, url);
+ }
+
if (actual != params[key]) {
return false;
}
+
+ found = true;
+ // at least one param must match. Otherwise all menu items might be highlighted if params[key] = null;
}
- return true;
+ return found;
});
- $activeLink.closest('li').addClass('sfHover');
- $activeLink.closest('li.menuTab').addClass('sfActive').addClass('sfHover');
+ $activeLink.closest('li').addClass('sfActive');
+ $activeLink.closest('li.menuTab').addClass('sfActive');
},
// getting the right li is a little tricky since goals uses idGoal, and overview is index.
@@ -108,7 +152,7 @@ menu.prototype =
loadFirstSection: function () {
if (broadcast.isHashExists() == false) {
- $('li:first a:first', this.menuNode).click().addClass('sfHover').addClass('sfActive');
+ $('li:first a:first', this.menuNode).click().addClass('sfActive');
}
}
-};
+}; \ No newline at end of file
diff --git a/plugins/CoreHome/javascripts/menu_init.js b/plugins/CoreHome/javascripts/menu_init.js
index 490c859185..88a3fc21ad 100644
--- a/plugins/CoreHome/javascripts/menu_init.js
+++ b/plugins/CoreHome/javascripts/menu_init.js
@@ -1,14 +1,23 @@
$(function () {
- var isPageHasMenu = $('.Menu--dashboard').size();
+ var isPageHasMenu = $('#secondNavBar').size();
var isPageIsAdmin = $('#content.admin').size();
+
if (isPageHasMenu) {
piwikMenu = new menu();
piwikMenu.init();
- piwikMenu.loadFirstSection();
+ if (isPageIsAdmin) {
+ piwikMenu.activateMenu(broadcast.getValueFromUrl('module'), broadcast.getValueFromUrl('action'), '');
+ } else {
+ piwikMenu.loadFirstSection();
+ }
+ } else if (!isPageIsAdmin) {
+ // eg multisites
+ initTopControls();
}
if(isPageIsAdmin) {
- // don't use broadcast in admin pages
+ // don't use broadcast in admin page
+ initTopControls();
return;
}
if(isPageHasMenu) {
diff --git a/plugins/CoreHome/javascripts/top_controls.js b/plugins/CoreHome/javascripts/top_controls.js
index 62ce3cecca..21947ca813 100644
--- a/plugins/CoreHome/javascripts/top_controls.js
+++ b/plugins/CoreHome/javascripts/top_controls.js
@@ -5,6 +5,24 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
function initTopControls() {
+ function getOverlap(element1, element2)
+ {
+ if (!element1 || !element1.getBoundingClientRect || !element2 || !element2.getBoundingClientRect) {
+ return 0;
+ }
+
+ var rect1 = element1.getBoundingClientRect();
+ var rect2 = element2.getBoundingClientRect();
+
+ var doOverlap = !(rect1.right < rect2.left || rect1.left > rect2.right);
+
+ if (doOverlap) {
+ return rect1.left - rect2.right;
+ }
+
+ return 0;
+ }
+
var $topControlsContainer = $('.top_controls'),
left = 0;
@@ -17,11 +35,19 @@ function initTopControls() {
$control.css('left', left);
- if (!$.contains($topControlsContainer[0], this)) {
- $control.detach().appendTo($topControlsContainer);
- }
-
left += $control.outerWidth(true);
});
+
+ var header = $('#header_message.isPiwikDemo');
+ if (header.length) {
+ // make sure isPiwikDemo message is always fully visible, move it to the right if needed
+ var lastSelector = $('.top_controls .piwikTopControl:last');
+
+ var overlap = getOverlap(header[0], lastSelector[0]);
+ if (header[0] !== lastSelector[0] && overlap !== 0) {
+ header.css('right', (Math.abs(overlap) + 18) * -1);
+ }
+ }
+
}
} \ No newline at end of file
diff --git a/plugins/CoreHome/lang/en.json b/plugins/CoreHome/lang/en.json
index a6bab4a544..300c6fe15b 100644
--- a/plugins/CoreHome/lang/en.json
+++ b/plugins/CoreHome/lang/en.json
@@ -48,6 +48,8 @@
"YouAreUsingTheLatestVersion": "You are using the latest version of Piwik!",
"ClickRowToExpandOrContract": "Click this row to expand or contract the subtable.",
"UndoPivotBySubtable": "This report has been pivoted %s Undo pivot",
- "PivotBySubtable": "This report is not pivoted %s Pivot by %s"
+ "PivotBySubtable": "This report is not pivoted %s Pivot by %s",
+ "QuickAccessTitle": "Search for menu entries, segments and websites. Shortcut: Press 'f' to search.",
+ "Segments": "Segments"
}
}
diff --git a/plugins/CoreHome/stylesheets/coreHome.less b/plugins/CoreHome/stylesheets/coreHome.less
index f9659cb85b..2e0277acf9 100644
--- a/plugins/CoreHome/stylesheets/coreHome.less
+++ b/plugins/CoreHome/stylesheets/coreHome.less
@@ -1,8 +1,7 @@
.home {
h2 {
font-size: 18px;
- padding: 12px 0 7px 0;
- clear: both;
+ padding: 16px 0 16px 0;
border: none;
margin: 0;
}
@@ -18,21 +17,19 @@
}
}
-.nav_sep {
- height: 39px;
- border-radius: 0 4px 0 0;
- border: 1px solid #DDD;
-}
-
-.pageWrap {
- margin-top: 15px;
- font-size: 13px;
-}
-
/* Content */
#content.home {
- padding-top: 5px;
font-size: 14px;
+ display: inline-block;
+ width: 100%;
+
+ > h2:first-child {
+ padding-top: 7px;
+ }
+}
+
+#content.admin {
+ display: inline-block;
}
/* 2 columns reports */
@@ -203,10 +200,6 @@ a.Piwik_Popover_Error_Back {
margin: 10px auto 5px !important;
}
-.header_short #updateCheckLinkContainer .icon {
- display: none;
-}
-
.header_full #updateCheckLinkContainer {
margin-top: -2px;
}
@@ -222,39 +215,6 @@ a.Piwik_Popover_Error_Back {
width: 160px;
}
-#updateCheckLinkContainer {
- opacity: 0.7;
-}
-
-#updateCheckLinkContainer:hover {
- opacity: 1;
-}
-
-#updateCheckLinkContainer {
- float: right;
- cursor: pointer;
-}
-
-#updateCheckLinkContainer>* {
- vertical-align: middle;
-}
-
-#header_message #checkForUpdates {
- font-size: 10px;
- line-height: 16px;
- display: inline-block;
- vertical-align: middle;
- text-transform: uppercase;
-}
-
-#header_message #checkForUpdates {
- text-decoration: none;
-}
-
-#header_message #checkForUpdates:hover {
- text-decoration: underline;
-}
-
/* Used to link within content text, without adding visual clutter */
.linkContent { color:#333; text-decoration:none}
.linkContent:hover { text-decoration:underline;}
diff --git a/plugins/CoreHome/stylesheets/dataTable/_dataTable.less b/plugins/CoreHome/stylesheets/dataTable/_dataTable.less
index 3544f17723..4b5f8321b2 100644
--- a/plugins/CoreHome/stylesheets/dataTable/_dataTable.less
+++ b/plugins/CoreHome/stylesheets/dataTable/_dataTable.less
@@ -168,7 +168,7 @@ div.dataTable, div.dataTable > .dataTableWrapper {
color: #888;
text-align: left;
margin: 10px;
- margin-left: 12px;
+ margin-left: 1px;
}
.dataTablePages {
@@ -593,7 +593,7 @@ tr td.label img.plusMinus {
.pk-emptyDataTable {
padding-top: 20px;
padding-bottom: 10px;
- padding-left: 11px;
+ padding-left: 1px;
}
.widget .pk-emptyDataTable {
diff --git a/plugins/CoreHome/stylesheets/jquery.ui.autocomplete.css b/plugins/CoreHome/stylesheets/jquery.ui.autocomplete.css
index c3077b7b5f..8bac824f1c 100644
--- a/plugins/CoreHome/stylesheets/jquery.ui.autocomplete.css
+++ b/plugins/CoreHome/stylesheets/jquery.ui.autocomplete.css
@@ -59,7 +59,7 @@
}
.ui-corner-all {
- border-radius: 4px;
+ border-radius: 0;
}
.ui-menu .ui-menu-item a.ui-state-focus {
diff --git a/plugins/CoreHome/stylesheets/layout.less b/plugins/CoreHome/stylesheets/layout.less
new file mode 100644
index 0000000000..649c2ece47
--- /dev/null
+++ b/plugins/CoreHome/stylesheets/layout.less
@@ -0,0 +1,387 @@
+ #header {
+ padding: 0 15px;
+ background-color: @theme-color-background-base;
+ height: 50px;
+
+ /* Clear fix */
+ &:after {
+ display: table;
+ clear: both;
+ content: "";
+ }
+
+ .icon-menu-hamburger {
+ display: none;
+ }
+
+ #logo {
+ }
+
+ #topRightBar {
+ li {
+ display: inline-block;
+ }
+
+ .topBarElem {
+ color: @theme-color-text;
+ text-decoration: none;
+ padding: 14px 12px;
+ display: inline-block;
+ height: 100%;
+ transition: background-color 150ms linear;
+
+ &:hover {
+ background-color: @theme-color-menu-contrast-background;
+ }
+
+ &.active {
+ color: @theme-color-brand;
+ }
+
+ .menuDropdown {
+ color: @theme-color-text;
+ .title:after {
+ color: @theme-color-text;
+ border-top-color: @theme-color-text;
+ }
+ }
+ }
+
+ .navbar-right {
+ height: 48px;
+ position: absolute;
+ right: 10px;
+ font-size: 13px;
+ }
+ }
+}
+
+ .navbar {
+ a {
+ text-decoration: none;
+ &:hover, &:focus, &:active {
+ text-decoration: none;
+ }
+ }
+ }
+
+ // start #secondNavBar fadeInLeft animation
+ @-webkit-keyframes fadeInLeft {
+ 0% {
+ opacity: 0;
+ -webkit-transform: translateX(-20px);
+ }
+ 100% {
+ opacity: 1;
+ -webkit-transform: translateX(0);
+ }
+ }
+ @keyframes fadeInLeft {
+ 0% {
+ opacity: 0;
+ transform: translateX(-20px);
+ }
+ 100% {
+ opacity: 1;
+ transform: translateX(0);
+ }
+ }
+ // end #secondNavBar fadeInLeft animation
+
+#root {
+
+ .pageWrap {
+ padding-left: 18px;
+ padding-right: 15px;
+ }
+
+ #secondNavBar + .pageWrap {
+ margin-left: 224px;
+ }
+
+ #root>.top_controls {
+ margin-left:15px;
+ margin-right:15px;
+ }
+
+ @media all and (max-width: 749px) {
+ .pageWrap {
+ margin-left: 0 !important;
+ }
+
+ #header {
+ min-height: 50px;
+ height: auto;
+ }
+
+ #topRightBar {
+ .navbar-right {
+ text-align: left;
+ margin-left: 2px;
+ display: inline-block;
+ position: relative;
+ height: auto;
+ min-height: 48px;
+ }
+ }
+
+ #navbar-collapse1 {
+ margin-left: 45px;
+ }
+
+ #secondNavBar {
+ z-index: 9999;
+ position: absolute;
+ border-right: 1px solid @theme-color-background-tinyContrast;
+ border-top: 1px solid @theme-color-background-tinyContrast;
+ -webkit-box-shadow: 4px 4px 18px 1px rgba(0,0,0,0.75);
+ -moz-box-shadow: 4px 4px 18px 1px rgba(0,0,0,0.75);
+ box-shadow: 4px 4px 18px 1px rgba(0,0,0,0.75);
+ -webkit-animation-duration: 0.3s;
+ animation-duration: 0.3s;
+ -webkit-animation-fill-mode: both;
+ animation-fill-mode: both;
+ -webkit-animation-timing-function: linear;
+ animation-timing-function: linear;
+
+ display: none;
+ &.open {
+ display: block;
+ -webkit-animation-name: fadeInLeft;
+ animation-name: fadeInLeft;
+ }
+
+ #search {
+ display: none;
+ }
+ }
+
+
+ .top_controls {
+ height: auto;
+ }
+
+ .top_controls .piwikTopControl {
+ position: static !important;
+ margin: 0 0 10px;
+ float: none;
+ }
+
+ .icon-menu-hamburger {
+ padding: 10px 10px 10px;
+ display: inline-block;
+ float: left;
+ cursor: pointer;
+ font-size: 23px;
+ }
+
+ #logo {
+ display: none;
+ }
+
+ }
+
+ #ajaxLoadingDiv {
+ margin-top: 10px;
+ }
+
+ #secondNavBar {
+ width: 224px;
+ float:left;
+
+ #search {
+ padding: 8px 0 13px 8px;
+ height: 61px;
+
+ .quick-access {
+ z-index: 1000;
+ position: absolute;
+ width: 216px;
+ input {
+ height: 33px;
+ font-size: 11px;
+ padding: 10px 12px 10px 10px;
+ }
+ }
+ }
+
+ .navbar {
+ background-color: @theme-color-menu-contrast-background;
+ border-bottom: 1px solid @theme-color-menu-contrast-background;
+
+ .menu-icon {
+ padding-right: 13px;
+ }
+
+ > li {
+ display: inline-block;
+ width: 100%;
+ .border-radius(0px);
+ border: 0;
+ background: none;
+
+ .item {
+ display: inline-block;
+ width: 100%;
+ font-family: Verdana, sans-serif;
+ .font-default(13px, 21px);
+ padding: 12px 21px 12px 19px;
+ color: @theme-color-menu-contrast-text;
+ decoration: none !important;
+ word-break: break-word;
+
+ &:hover, &:focus {
+ decoration: none !important;
+ }
+ }
+
+ > .item {
+ cursor: default;
+ font-weight: bold;
+ &:hover {
+ text-decoration: none;
+ }
+ }
+
+ > ul {
+
+ li {
+ .item {
+ .font-default(13px, 16px);
+ padding: 11px 22px 11px 45px;
+ decoration: none;
+ transition: background-color 200ms linear;
+ &:hover {
+ text-decoration: none;
+ color: @theme-color-menu-contrast-textActive;
+ }
+ }
+
+ &.sfActive {
+ .item {
+ background-color: @theme-color-background-base;
+ decoration: none;
+ }
+ }
+ }
+ }
+ }
+
+
+ .menuDropdown {
+
+ .items {
+ width: 224px;
+ box-shadow: 0 1px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12);
+
+ .search {
+ margin: 15px 16px 10px 17px;
+ }
+
+ .item {
+ padding: 10px 16px 10px !important;
+ min-height: 25px;
+ height: auto;
+ }
+ }
+
+ .title {
+ color: @theme-color-menu-contrast-text;
+ display: block;
+ padding: 15px 22px 11px 45px;
+ font-size: 13px;
+ font-weight: normal;
+
+ &:hover {
+ color: @theme-color-menu-contrast-textActive;
+ }
+
+ &:after {
+ color: @theme-color-menu-contrast-text;
+ border-top: 5px solid @theme-color-menu-contrast-text;
+ top: 20px;
+ right: 3px;
+ }
+ }
+ }
+ }
+
+ &.Menu--dashboard .navbar > li {
+ > ul {
+ display: none;
+
+ @media all and (max-width: 749px) {
+ display: block;
+ }
+ }
+
+ > .item {
+ cursor: pointer;
+ &:hover {
+ color: @theme-color-menu-contrast-textActive;
+ }
+ }
+
+ &.sfActive {
+ ul {
+ display: block;
+ }
+
+ .icon-arrow-right:before {
+ content: "\e63b";
+ }
+ }
+ }
+
+ &.Menu--admin .navbar > li {
+ > .item {
+ padding: 14px 21px 6px 19px;
+ }
+ .item .icon-arrow-right:before {
+ content: "\e63b";
+ }
+ }
+ }
+}
+
+#root {
+ .top_controls {
+ .piwikTopControl {
+ margin-top: 8px;
+ margin-bottom: 8px;
+ }
+ }
+}
+
+#root, #standalone {
+ .top_controls {
+ min-height: 51px;
+ position: relative;
+ background-color: @theme-color-background-base;
+ height: auto;
+ margin-bottom: 10px;
+
+ .piwikTopControl {
+ display: inline-block;
+ float: none;
+ position: absolute;
+ margin-right: 18px;
+ vertical-align: top;
+ font-size: 11px;
+ }
+ }
+
+ .borderedControl {
+ background-color: @theme-color-background-base;
+ border: 1px solid @theme-color-background-tinyContrast;
+ transition: box-shadow 150ms linear;
+ &.expanded,
+ &:hover {
+ box-shadow: 0 1px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12);
+ }
+ }
+}
+
+.widgetize {
+ width: auto;
+}
diff --git a/plugins/CoreHome/stylesheets/menu.less b/plugins/CoreHome/stylesheets/menu.less
deleted file mode 100644
index 76c8b90238..0000000000
--- a/plugins/CoreHome/stylesheets/menu.less
+++ /dev/null
@@ -1,177 +0,0 @@
-.Menu--dashboard {
- position: relative;
-
- .menuDropdown {
-
- .items {
- width: 250px;
-
- .search {
- margin: 15px 16px 10px 17px;
- }
-
- .item {
- padding: 10px 16px 4px !important;
- min-height: 25px;
- height: auto;
- }
- }
-
- .title {
- color: @theme-color-menu-contrast-text;
- display: block;
- padding: 15px 22px 11px;
- font-size: 15px;
- font-weight: normal;
-
- &:hover {
- color: @theme-color-menu-contrast-textActive;
- }
-
- &:after {
- color: @theme-color-menu-contrast-text;
- border-top: 5px solid @theme-color-menu-contrast-text;
- top: 20px;
- right: 3px;
- }
- }
- }
-}
-
-.Menu--dashboard > .Menu-tabList {
- line-height: 1;
- display: table; // The nav has the height og his children
- margin-bottom: -1px; // Allow tabs to merge with the submenu
-}
-
-.Menu--dashboard > .Menu-tabList ul {
- background: @theme-color-background-base; /*IE6 needs this*/
- float: left;
- position: relative;
-}
-
-/* LEVEL1 NORMAL */
-.Menu--dashboard > .Menu-tabList > li {
- background: #f1f1f1;
- float: left;
- list-style: none;
- z-index: 49;
- margin-right: -1px;
- border: 1px solid #ddd;
- border-bottom: 0;
- border-radius: 4px 4px 0 0;
-}
-
-.Menu--dashboard > .Menu-tabList a {
- color: @theme-color-text-light;
- font-size: 18px;
- display: block;
- float: left;
- padding: 8px 27px 0;
- height: 50px;
- text-decoration: none;
- font-weight: normal;
-}
-
-/* LEVEL1 HOVER */
-.Menu--dashboard > .Menu-tabList > li:hover,
-.Menu--dashboard > .Menu-tabList > li.sfHover {
- background: @theme-color-background-base;
-}
-
-.Menu--dashboard > .Menu-tabList > li:hover > a,
-.Menu--dashboard > .Menu-tabList > li.sfHover > a,
-.Menu--dashboard > .Menu-tabList > li.sfActive > a,
-.Menu--dashboard > .Menu-tabList a:hover {
- color: @theme-color-link;
-}
-
-.Menu--dashboard > .Menu-tabList > li:hover > a {
- text-decoration: underline;
-}
-
-.Menu--dashboard > .Menu-tabList > li.sfHover > a {
- border-bottom: 1px solid #fff;
-}
-
-/* LEVEL2 NORMAL */
-.Menu--dashboard > .Menu-tabList > li ul {
- padding: 9px 0 5px 0;
- left: 0;
- top: -999em;
- position: absolute;
- min-height: 25px;
- width: 100%;
- background: none;
-}
-
-.Menu--dashboard > .Menu-tabList > li li {
- float: left;
- background: none;
- border: 0;
- text-align: center;
-}
-
-.Menu--dashboard > .Menu-tabList > li li > a {
- padding: 5px 15px;
- font-size: 14px;
- border: 0;
- float: none;
- display: inline-block;
- height: auto;
- background: none;
- color: @theme-color-text-light;
- text-decoration: none;
-}
-
-/* LEVEL2 HOVER */
-.Menu--dashboard > .Menu-tabList > li.sfHover ul,
-.Menu--dashboard > .Menu-tabList > li:hover ul {
- z-index: 130;
- top: 100%;
- opacity: 1;
- -webkit-transition: opacity 300ms ease-out 10ms; /* property duration timing-function delay */
- -moz-transition: opacity 300ms ease-out 10ms;
- -o-transition: opacity 300ms ease-out 10ms;
- transition: opacity 300ms ease-out 10ms;
-}
-
-/* for screen readers */
-.Menu--dashboard a span.hidden {
- height: 1px;
- width: 1px;
- position: absolute;
- overflow: hidden;
- top: 0;
-}
-
-
-.Menu--dashboard > .Menu-tabList > li li:hover > a,
-.Menu--dashboard > .Menu-tabList > li li.sfHover > a {
- color: @theme-color-link;
-}
-
-.Menu--dashboard > .Menu-tabList > li li.sfHover > a {
- font-weight: bold;
- text-decoration: none !important;
-}
-
-@media all and (max-width: 949px) {
- .nav {
- clear: right;
- }
-}
-
-@media all and (max-width: 749px) {
- .Menu--dashboard > .Menu-tabList a {
- padding-left: 8px;
- padding-right: 8px;
- }
-}
-
-@media all and (max-width: 549px) {
- .Menu--dashboard > ul.Menu-tabList > li.sfHover > a,
- .Menu--dashboard > ul.Menu-tabList > li.sfActive.sfHover > a {
- border-bottom: 0;
- }
-} \ No newline at end of file
diff --git a/plugins/CoreHome/stylesheets/notification.less b/plugins/CoreHome/stylesheets/notification.less
index 36f7085f6f..cab47a40a5 100644
--- a/plugins/CoreHome/stylesheets/notification.less
+++ b/plugins/CoreHome/stylesheets/notification.less
@@ -1,8 +1,5 @@
#content.admin #notificationContainer {
- width: 750px;
- display: table-header-group; /* no overlap with About Piwik box */
-
.notification {
- margin: 10px;
+ margin: 0 0 10px 0;
}
} \ No newline at end of file
diff --git a/plugins/CoreHome/stylesheets/zen-mode.less b/plugins/CoreHome/stylesheets/zen-mode.less
index 124c3395ff..0b9f619ea7 100644
--- a/plugins/CoreHome/stylesheets/zen-mode.less
+++ b/plugins/CoreHome/stylesheets/zen-mode.less
@@ -82,13 +82,19 @@
}
h2 {
+ padding-left: 0;
+ font-size: 21px;
+ padding: 16px 0 12px 0;
+ }
+}
+
+#root #dashboard .widget {
+ h2 {
padding-left: 10px;
- font-size: 24px;
}
}
.widget {
-
h2:nth-of-type(n+2) {
padding-top: 40px!important;
margin-top: 0!important;
diff --git a/plugins/CoreHome/templates/ReportsByDimension/_reportsByDimension.twig b/plugins/CoreHome/templates/ReportsByDimension/_reportsByDimension.twig
index 57ec8279d5..6ce760af1d 100644
--- a/plugins/CoreHome/templates/ReportsByDimension/_reportsByDimension.twig
+++ b/plugins/CoreHome/templates/ReportsByDimension/_reportsByDimension.twig
@@ -17,7 +17,7 @@
{% endfor %}
</div>
- <div style="float:left;max-width:900px;">
+ <div style="float:left;max-width:730px;">
<div class="loadingPiwik" style="display:none;">
<img src="plugins/Morpheus/images/loading-blue.gif" alt=""/>{{ 'General_LoadingData'|translate }}
</div>
diff --git a/plugins/CoreHome/templates/_headerMessage.twig b/plugins/CoreHome/templates/_headerMessage.twig
index c1d81b5cb0..bb4f8e7607 100644
--- a/plugins/CoreHome/templates/_headerMessage.twig
+++ b/plugins/CoreHome/templates/_headerMessage.twig
@@ -1,47 +1,59 @@
{# testing, remove test_ from var names #}
{% set test_latest_version_available="4.0.0" %}
{% set test_piwikUrl='http://demo.piwik.org/' %}
-{% set isPiwikDemo %}{{ piwikUrl == 'http://demo.piwik.org/' or piwikUrl == 'https://demo.piwik.org/'}}{% endset %}
+{% set isPiwikDemo %}{{ piwikUrl == 'http://demo.piwik.org/' or piwikUrl == 'https://demo.piwik.org/' }}{% endset %}
{% set updateCheck %}
-<div id="updateCheckLinkContainer">
- <span class='loadingPiwik' style="display:none;"><img src='plugins/Morpheus/images/loading-blue.gif'/></span>
- <span class="icon icon-reload"></span>
- <a href="#" id="checkForUpdates"><em>{{ 'CoreHome_CheckForUpdates'|translate }}</em></a>
-</div>
+ <span id="updateCheckLinkContainer">
+ {{ 'CoreHome_CheckForUpdates'|translate }}
+ <span class="icon icon-fixed icon-reload"></span>
+ </span>
{% endset %}
{% if isPiwikDemo or (latest_version_available and hasSomeViewAccess and not isUserIsAnonymous) or (isSuperUser and adminMenu is defined and adminMenu) %}
-<span id="header_message" class="{% if isPiwikDemo or not latest_version_available %}header_info{% else %}header_alert{% endif %}">
- <span class="header_short">
+<div piwik-expand-on-hover
+ id="header_message"
+ class="piwikSelector borderedControl {% if isPiwikDemo or not latest_version_available %}header_info{% else %}{% endif %} {% if isPiwikDemo %}isPiwikDemo{% else %}piwikTopControl{% endif %} {% if latest_version_available %}update_available{% endif %}"
+ >
+
+ <a class="title" href="#">
{% if isPiwikDemo %}
{{ 'General_YouAreViewingDemoShortMessage'|translate }}
{% elseif latest_version_available %}
{{ 'General_NewUpdatePiwikX'|translate(latest_version_available) }}
+ <span class="icon-warning"></span>
{% elseif isSuperUser and adminMenu is defined and adminMenu %}
{{ updateCheck|raw }}
{% endif %}
- </span>
+ </a>
- <span class="header_full">
+ <div class="dropdown">
{% if isPiwikDemo %}
- {{ 'General_YouAreViewingDemoShortMessage'|translate }}
- <br />
{{ 'General_DownloadFullVersion'|translate("<a href='http://piwik.org/'>","</a>","<a href='http://piwik.org'>piwik.org</a>")|raw }}
<br/>
+ {% if isSuperUser and adminMenu is defined and adminMenu %}
+ <br/>
+ {% endif %}
{% endif %}
{% if latest_version_available and isSuperUser %}
{{ 'General_PiwikXIsAvailablePleaseUpdateNow'|translate(latest_version_available,"<br /><a href='index.php?module=CoreUpdater&amp;action=newVersionAvailable'>","</a>","<a href='?module=Proxy&amp;action=redirect&amp;url=http://piwik.org/changelog/' target='_blank'>","</a>")|raw }}
+ <br />
{% elseif latest_version_available and not isPiwikDemo and hasSomeViewAccess and not isUserIsAnonymous %}
{% set updateSubject = 'General_NewUpdatePiwikX'|translate(latest_version_available)|e('url') %}
{{ 'General_PiwikXIsAvailablePleaseNotifyPiwikAdmin'|translate("<a href='?module=Proxy&action=redirect&url=http://piwik.org/' target='_blank'>Piwik</a> <a href='?module=Proxy&action=redirect&url=http://piwik.org/changelog/' target='_blank'>" ~ latest_version_available ~ "</a>", "<a href='mailto:" ~ superUserEmails ~ "?subject=" ~ updateSubject ~ "'>", "</a>")|raw }}
- {% endif %}
- {% if isSuperUser and adminMenu is defined and adminMenu %}
<br />
+ {% endif %}
+
+ {% if isPiwikDemo and isSuperUser and adminMenu is defined and adminMenu %}
+ <br/>
{{ updateCheck|raw }}
+ <br/>
+ <br/>
{% endif %}
- <br />
+
{{ 'General_YouAreCurrentlyUsing'|translate(piwik_version) }}
- </span>
-</span>
+ </div>
+</div>
+
+<div style="clear:right"></div>
{% endif %}
diff --git a/plugins/CoreHome/templates/_indexContent.twig b/plugins/CoreHome/templates/_indexContent.twig
deleted file mode 100644
index 46d2f13579..0000000000
--- a/plugins/CoreHome/templates/_indexContent.twig
+++ /dev/null
@@ -1,19 +0,0 @@
-{% import 'ajaxMacros.twig' as ajax %}
-<div class="pageWrap container-fluid">
-<a name="main"></a>
- {% include "@CoreHome/_notifications.twig" %}
- <div class="top_controls">
- {% include "@CoreHome/_periodSelect.twig" %}
- {{ postEvent("Template.nextToCalendar") }}
- {% render dashboardSettingsControl %}
- {% include "@CoreHome/_headerMessage.twig" %}
- {{ ajax.requestErrorDiv(emailSuperUser|default('')) }}
- </div>
-
- {{ ajax.loadingDiv() }}
-
- <div id="content" class="home">
- {% if content %}{{ content }}{% endif %}
- </div>
- <div class="clear"></div>
-</div>
diff --git a/plugins/CoreHome/templates/_menu.twig b/plugins/CoreHome/templates/_menu.twig
index f4bfd7d902..81cb0f9a9f 100644
--- a/plugins/CoreHome/templates/_menu.twig
+++ b/plugins/CoreHome/templates/_menu.twig
@@ -1,19 +1,19 @@
-{% macro submenuItem(name, url) %}
+{% macro submenuItem(name, url, anchorlink) %}
{% if name|slice(0,1) != '_' %}
<li>
- <a class="menuItem" href='#{{ url|urlRewriteWithParameters|slice(1) }}'>
+ <a class="item" href="{% if anchorlink %}#{% else %}index.php?{% endif %}{{ url|urlRewriteWithParameters|slice(1) }}">
{{ name|translate }}
</a>
</li>
{% endif %}
{% endmacro %}
-{% macro groupedItem(name, group) %}
+{% macro groupedItem(name, group, anchorlink) %}
<li>
<div piwik-menudropdown show-search="true" menu-title="{{ name|translate|e('html_attr') }}">
{% for item in group.getItems %}
<a class="item menuItem"
- href='#?{{ item.url|urlRewriteWithParameters|slice(1) }}'
+ href='{% if anchorlink %}#?{% else %}index.php?{% endif %}{{ item.url|urlRewriteWithParameters|slice(1) }}'
{% if item.tooltip %}title="{{ item.tooltip|e('html_attr') }}"{% endif %}>
{{ item.name|translate }}
</a>
@@ -34,33 +34,32 @@
{%- endif %}
{%- endmacro %}
-<div class="Menu--dashboard">
-
- <ul class="Menu-tabList">
- {% for level1,level2 in menu %}
- <li id="{% if level2._url is defined %}{{ _self.getId(level2._url) }}{% endif %}" class="menuTab">
- <a class="menuItem" {% if level2._url is defined %}href="#{{ _self.getFirstUrl(level2._url) }}"{% endif %}>
- {{ level1|translate }}
- <span class="hidden">
- {{ 'CoreHome_Menu'|translate }}
- </span>
- </a>
- <ul>
- {% for name,urlParameters in level2 %}
- {% if urlParameters._url is defined and urlParameters._url is not iterable %}
- {{ _self.groupedItem(name,urlParameters._url) }}
- {% elseif name|slice(0,1) != '_' %}
- {{ _self.submenuItem(name,urlParameters._url) }}
- {% endif %}
- {% endfor %}
-
- </ul>
- </li>
- {% endfor %}
- <li id="Searchmenu">
- <span piwik-quick-access></span>
- </li>
- </ul>
+{% macro menu(menu, anchorlink, cssClass) %}
+ <div id="secondNavBar" class="{{ cssClass }}">
+ <div id="search">
+ <div piwik-quick-access class="borderedControl"></div>
+ </div>
+ <ul class="navbar">
+ {% for level1,level2 in menu %}
+ <li id="{% if level2._url is defined and level2._url is not empty %}{{ _self.getId(level2._url) }}{% endif %}" class="menuTab">
-</div>
-<div class="nav_sep"></div>
+ <a class="item" {% if level2._url is defined and level2._url is not empty %}href="{% if anchorlink %}#{% else %}index.php?{% endif %}{{ _self.getFirstUrl(level2._url) }}"{% endif %}>
+ <span class="menu-icon {{ level2._icon|default('icon-arrow-right') }}"></span>{{ level1|translate }}
+ <span class="hidden">
+ {{ 'CoreHome_Menu'|translate }}
+ </span>
+ </a>
+ <ul>
+ {% for name,urlParameters in level2 %}
+ {% if urlParameters._url is defined and urlParameters._url is not iterable %}
+ {{ _self.groupedItem(name,urlParameters._url, anchorlink) }}
+ {% elseif name|slice(0,1) != '_' %}
+ {{ _self.submenuItem(name,urlParameters._url, anchorlink) }}
+ {% endif %}
+ {% endfor %}
+ </ul>
+ </li>
+ {% endfor %}
+ </ul>
+ </div>
+{% endmacro %}
diff --git a/plugins/CoreHome/templates/_periodSelect.twig b/plugins/CoreHome/templates/_periodSelect.twig
index c99f463eca..67b30183d3 100644
--- a/plugins/CoreHome/templates/_periodSelect.twig
+++ b/plugins/CoreHome/templates/_periodSelect.twig
@@ -1,7 +1,9 @@
-<div id="periodString" class="piwikTopControl periodSelector">
- <div id="date">{{ 'General_DateRange'|translate }} <strong>{{ prettyDate }}</strong></div>
- <div class="calendar-icon"></div>
- <div id="periodMore">
+<div id="periodString" piwik-expand-on-click class="piwikTopControl piwikSelector borderedControl periodSelector">
+ <a id="date" class="title" title="{{ 'General_ChooseDate'|translate|e('html_attr') }}">
+ <span class="icon icon-calendar"></span>
+ {{ prettyDate }}
+ </a>
+ <div id="periodMore" class="dropdown">
<div class="period-date">
<div id="datepicker"></div>
</div>
diff --git a/plugins/CoreHome/templates/_siteSelectHeader.twig b/plugins/CoreHome/templates/_siteSelectHeader.twig
index 547f2e4129..7353e2e07a 100644
--- a/plugins/CoreHome/templates/_siteSelectHeader.twig
+++ b/plugins/CoreHome/templates/_siteSelectHeader.twig
@@ -1,5 +1,3 @@
-<div class="top_bar_sites_selector {% if currentModule == 'CoreHome' %}sites_selector_in_dashboard{% endif %}">
- <label>{{ 'General_Website'|translate }}</label>
+<div class="top_bar_sites_selector piwikTopControl">
<div piwik-siteselector class="sites_autocomplete"></div>
-
</div> \ No newline at end of file
diff --git a/plugins/CoreHome/templates/_topBar.twig b/plugins/CoreHome/templates/_topBar.twig
index 41bd5da7a1..e69e9c1978 100644
--- a/plugins/CoreHome/templates/_topBar.twig
+++ b/plugins/CoreHome/templates/_topBar.twig
@@ -1,4 +1,34 @@
{{ postEvent("Template.beforeTopBar", userAlias, userLogin, topMenu, userMenu) }}
-<div id="topBars">
- {% include "@CoreHome/_topBarTopMenu.twig" %}
-</div>
+<ul class="navbar-right">
+
+ {% macro menuItemLabel(label, icon) %}
+ {% if icon is defined and icon and icon starts with 'icon-' %}
+ <span class="{{ icon|striptags }}"></span>
+ {% else %}
+ {{ label|translate }}
+ {% endif %}
+ {% endmacro %}
+
+ {% macro topMenuItem(label, menu, currentModule, currentAction) %}
+ {% if menu._html is defined %}
+ {{ menu._html|raw }}
+ {% else %}
+ <a {% if menu._tooltip is defined %}title="{{ menu._tooltip }}"{% endif %}
+ class="topBarElem {% if (menu._url.module == currentModule and (menu._url.action is empty or menu._url.action == currentAction)) %}active{% endif %}"
+ id="topmenu-{{ menu._url.module|lower }}"
+ href="index.php{{ menu._url|urlRewriteWithParameters }}">{{ _self.menuItemLabel(label, menu._icon) }}</a>
+ {% endif %}
+ {% endmacro %}
+
+ {% if topMenuModule is not defined %}
+ {% set topMenuModule = currentModule %}
+ {% set topMenuAction = currentAction %}
+ {% endif %}
+
+ {% spaceless %}
+ {% for label,menu in topMenu %}
+ <li>{{ _self.topMenuItem(label, menu, topMenuModule, topMenuAction) }}</li>
+ {% endfor %}
+ {% endspaceless %}
+
+</ul> \ No newline at end of file
diff --git a/plugins/CoreHome/templates/_topBarTopMenu.twig b/plugins/CoreHome/templates/_topBarTopMenu.twig
deleted file mode 100644
index 459ccb611e..0000000000
--- a/plugins/CoreHome/templates/_topBarTopMenu.twig
+++ /dev/null
@@ -1,37 +0,0 @@
-<div id="topRightBar">
-
- {% macro topMenuItem(label, menu, currentModule, currentAction) %}
- {% if menu._html is defined %}
- {{ menu._html|raw }}
- {% elseif (menu._url.module == currentModule and (menu._url.action is empty or menu._url.action == currentAction)) %}
- <span class="topBarElem topBarElemActive"><strong>{{ label|translate }}</strong></span>
- {% else %}
- <span class="topBarElem" {% if menu._tooltip is defined %}title="{{ menu._tooltip }}"{% endif %}>
- <a id="topmenu-{{ menu._url.module|lower }}" href="index.php{{ menu._url|urlRewriteWithParameters }}">{{ label|translate }}</a>
- </span>
- {% endif %}
- {% endmacro %}
-
- {% macro userMenuItem(label, menu, currentModule, currentAction) %}
-
- <a class="item {% if (menu._url.module == currentModule and (menu._url.action is empty or menu._url.action == currentAction)) %}active{% endif %}"
- href="index.php{{ menu._url|urlRewriteWithParameters }}"
- id="usermenu-{{ menu._url.module|lower }}-{{ menu._url.action|default('index')|lower }}"
- {% if menu._tooltip is defined %}title="{{ menu._tooltip }}"{% endif %}
- >{{ label|translate }}</a>
-
- {% endmacro %}
-
- {% if topMenuModule is not defined %}
- {% set topMenuModule = currentModule %}
- {% set topMenuAction = currentAction %}
- {% endif %}
-
- {% for label,menu in topMenu %}
- {% if not loop.first %}
- |
- {% endif %}
- {{ _self.topMenuItem(label, menu, topMenuModule, topMenuAction) }}
- {% endfor %}
-
-</div>
diff --git a/plugins/CoreHome/templates/_topScreen.twig b/plugins/CoreHome/templates/_topScreen.twig
index 2aebf1254e..805619814c 100644
--- a/plugins/CoreHome/templates/_topScreen.twig
+++ b/plugins/CoreHome/templates/_topScreen.twig
@@ -1,5 +1,15 @@
-<div id="header">
- <a href='#main' tabindex="0" class="accessibility-skip-to-content">{{'CoreHome_SkipToContent'|translate}}</a>
- {% include "@CoreHome/_logo.twig" %}
- {% include "@CoreHome/_topBar.twig" %}
-</div>
+<div id="header" class="container-fluid">
+ <a href="#main" tabindex="0" class="accessibility-skip-to-content">{{'CoreHome_SkipToContent'|translate}}</a>
+ <div id="topRightBar" class="navbar row">
+ <div class="navbar-header col-md-3">
+ <span class="toggle-second-menu icon-menu-hamburger"></span>
+ {% include "@CoreHome/_logo.twig" %}
+
+ <!-- we need to put button to toggle nav for responsiveness here -->
+
+ </div>
+ <div class="collapse navbar-collapse col-md-9" id="navbar-collapse1">
+ {% include "@CoreHome/_topBar.twig" %}
+ </div>
+ </div>
+</div> \ No newline at end of file
diff --git a/plugins/CoreHome/templates/_uiControl.twig b/plugins/CoreHome/templates/_uiControl.twig
index 856f1afac0..3be1e17be5 100644
--- a/plugins/CoreHome/templates/_uiControl.twig
+++ b/plugins/CoreHome/templates/_uiControl.twig
@@ -1,4 +1,5 @@
<div class="{{ cssIdentifier }} {{ cssClass }}"
+ piwik-expand-on-click
data-props="{{ clientSideProperties|json_encode }}"
data-params="{{ clientSideParameters|json_encode }}">
{% render implView with implOverride %}
diff --git a/plugins/CoreHome/templates/_userMenu.twig b/plugins/CoreHome/templates/_userMenu.twig
deleted file mode 100644
index 67076af755..0000000000
--- a/plugins/CoreHome/templates/_userMenu.twig
+++ /dev/null
@@ -1,3 +0,0 @@
-{% import '@CoreHome/macros.twig' as corehome %}
-
-{{ corehome.sidebarMenu(userMenu, currentModule, currentAction) }} \ No newline at end of file
diff --git a/plugins/CoreHome/templates/getDefaultIndexView.twig b/plugins/CoreHome/templates/getDefaultIndexView.twig
index 7b46ca3f76..a09030ff3d 100644
--- a/plugins/CoreHome/templates/getDefaultIndexView.twig
+++ b/plugins/CoreHome/templates/getDefaultIndexView.twig
@@ -1,14 +1,20 @@
{% extends "dashboard.twig" %}
-{% block notification %}{% endblock %}
-{% block content %}
-
-{% include "@CoreHome/_siteSelectHeader.twig" %}
+{% import 'ajaxMacros.twig' as ajax %}
-{% if (menu is defined and menu) %}
- {% include "@CoreHome/_menu.twig" %}
-{% endif %}
+{% block topcontrols %}
+ {% include "@CoreHome/_siteSelectHeader.twig" %}
+ {% include "@CoreHome/_periodSelect.twig" %}
+ {{ postEvent("Template.nextToCalendar") }}
+ {% render dashboardSettingsControl %}
+ {% include "@CoreHome/_headerMessage.twig" %}
+{% endblock %}
-{% include "@CoreHome/_indexContent.twig" %}
+{% block content %}
+ {{ ajax.requestErrorDiv(emailSuperUser|default('')) }}
+ {{ ajax.loadingDiv() }}
+ <div id="content" class="home">
+ {% if content %}{{ content }}{% endif %}
+ </div>
{% endblock %}
diff --git a/plugins/CoreHome/templates/macros.twig b/plugins/CoreHome/templates/macros.twig
deleted file mode 100644
index 0563856856..0000000000
--- a/plugins/CoreHome/templates/macros.twig
+++ /dev/null
@@ -1,26 +0,0 @@
-{% macro sidebarMenu(sidebarMenu, currentModule, currentAction) %}
- {% if sidebarMenu|length > 1 %}
- <div class="Menu Menu--admin">
- <ul class="Menu-tabList">
- {% for name,submenu in sidebarMenu %}
- {% if submenu._hasSubmenu %}
- <li>
- <span>{{ name|translate }}</span>
- <ul>
- {% for sname,url in submenu %}
- {% if sname|slice(0,1) != '_' %}
- <li>
- <a href='index.php{{ url._url|urlRewriteWithParameters }}'
- target="_self"
- {% if url._url.module == currentModule and (url._url.action is empty or url._url.action == currentAction) %}class='active'{% endif %}>{{ sname|translate }}</a>
- </li>
- {% endif %}
- {% endfor %}
- </ul>
- </li>
- {% endif %}
- {% endfor %}
- </ul>
- </div>
- {% endif %}
-{% endmacro %}
diff --git a/plugins/CorePluginsAdmin/Menu.php b/plugins/CorePluginsAdmin/Menu.php
index 97ec818a59..415ace73a6 100644
--- a/plugins/CorePluginsAdmin/Menu.php
+++ b/plugins/CorePluginsAdmin/Menu.php
@@ -49,7 +49,7 @@ class Menu extends \Piwik\Plugin\Menu
if (Piwik::hasUserSuperUserAccess() && CorePluginsAdmin::isMarketplaceEnabled()) {
$menu->addManageItem('CorePluginsAdmin_Marketplace',
- $this->urlForAction('browsePlugins', array('activated' => '')),
+ $this->urlForAction('marketplace', array('activated' => '', 'mode' => 'admin')),
$order = 12);
}
}
@@ -66,7 +66,7 @@ class Menu extends \Piwik\Plugin\Menu
{
if ($this->isAllowedToSeeMarketPlace()) {
$menu->addPlatformItem('CorePluginsAdmin_Marketplace',
- $this->urlForAction('userBrowsePlugins', array('activated' => '')),
+ $this->urlForAction('marketplace', array('activated' => '', 'mode' => 'user')),
$order = 5);
}
}
diff --git a/plugins/CoreVisualizations/javascripts/jqplot.js b/plugins/CoreVisualizations/javascripts/jqplot.js
index 5392dc986c..f6914c57be 100644
--- a/plugins/CoreVisualizations/javascripts/jqplot.js
+++ b/plugins/CoreVisualizations/javascripts/jqplot.js
@@ -384,7 +384,7 @@
// TODO: this code destroys plots when a page is switched. there must be a better way of managing memory.
if (typeof $.jqplot.visiblePlots == 'undefined') {
$.jqplot.visiblePlots = [];
- $('.nav').on('piwikSwitchPage', function () {
+ $('#secondNavBar').on('piwikSwitchPage', function () {
for (var i = 0; i < $.jqplot.visiblePlots.length; i++) {
if ($.jqplot.visiblePlots[i] == null) {
continue;
diff --git a/plugins/Dashboard/Dashboard.php b/plugins/Dashboard/Dashboard.php
index 9ccbb822e4..35b94743a3 100644
--- a/plugins/Dashboard/Dashboard.php
+++ b/plugins/Dashboard/Dashboard.php
@@ -240,6 +240,7 @@ class Dashboard extends \Piwik\Plugin
$translationKeys[] = 'Dashboard_LoadingWidget';
$translationKeys[] = 'Dashboard_WidgetNotFound';
$translationKeys[] = 'Dashboard_DashboardCopied';
+ $translationKeys[] = 'Dashboard_Dashboard';
$translationKeys[] = 'General_Close';
$translationKeys[] = 'General_Refresh';
}
diff --git a/plugins/Dashboard/DashboardManagerControl.php b/plugins/Dashboard/DashboardManagerControl.php
index fb119e0083..df573903b3 100644
--- a/plugins/Dashboard/DashboardManagerControl.php
+++ b/plugins/Dashboard/DashboardManagerControl.php
@@ -20,7 +20,7 @@ class DashboardManagerControl extends DashboardSettingsControlBase
parent::__construct();
$this->jsClass = "DashboardManagerControl";
- $this->cssIdentifier = "dashboard-manager";
+ $this->cssIdentifier = "dashboard-manager piwikSelector";
$this->addDashboardActions();
$this->addGeneralActions();
diff --git a/plugins/Dashboard/DashboardSettingsControlBase.php b/plugins/Dashboard/DashboardSettingsControlBase.php
index 7275224082..dadd780f18 100644
--- a/plugins/Dashboard/DashboardSettingsControlBase.php
+++ b/plugins/Dashboard/DashboardSettingsControlBase.php
@@ -23,7 +23,7 @@ abstract class DashboardSettingsControlBase extends UIControl
{
parent::__construct();
- $this->cssClass = "piwikTopControl dashboardSettings";
+ $this->cssClass = "borderedControl piwikTopControl dashboardSettings";
$this->dashboardActions = array();
$this->generalActions = array();
}
diff --git a/plugins/Dashboard/Menu.php b/plugins/Dashboard/Menu.php
index f90c117e10..250807eca5 100644
--- a/plugins/Dashboard/Menu.php
+++ b/plugins/Dashboard/Menu.php
@@ -23,20 +23,31 @@ class Menu extends \Piwik\Plugin\Menu
{
$menu->addItem('Dashboard_Dashboard', '', $this->urlForAction('embeddedIndex', array('idDashboard' => 1)), 5);
- if (!Piwik::isUserIsAnonymous()) {
+ if (Piwik::isUserIsAnonymous()) {
+ $this->addDefaultDashboard($menu);
+ } else {
$login = Piwik::getCurrentUserLogin();
$dashboard = new Dashboard();
$dashboards = $dashboard->getAllDashboards($login);
- $pos = 0;
- foreach ($dashboards as $dashboard) {
- $menu->addItem('Dashboard_Dashboard', $dashboard['name'], $this->urlForAction('embeddedIndex', array('idDashboard' => $dashboard['iddashboard'])), $pos);
- $pos++;
+ if (empty($dashboards)) {
+ $this->addDefaultDashboard($menu);
+ } else {
+ $pos = 0;
+ foreach ($dashboards as $dashboard) {
+ $menu->addItem('Dashboard_Dashboard', $dashboard['name'], $this->urlForAction('embeddedIndex', array('idDashboard' => $dashboard['iddashboard'])), $pos);
+ $pos++;
+ }
}
}
}
+ private function addDefaultDashboard(MenuReporting $menu)
+ {
+ $menu->addItem('Dashboard_Dashboard', 'Dashboard_Dashboard', $this->urlForAction('embeddedIndex', array('idDashboard' => 1)));
+ }
+
public function configureTopMenu(MenuTop $menu)
{
$userPreferences = new UserPreferences();
diff --git a/plugins/Dashboard/javascripts/dashboard.js b/plugins/Dashboard/javascripts/dashboard.js
index 238aca5197..4253069723 100644
--- a/plugins/Dashboard/javascripts/dashboard.js
+++ b/plugins/Dashboard/javascripts/dashboard.js
@@ -11,9 +11,9 @@ function initDashboard(dashboardId, dashboardLayout) {
initTopControls();
// Embed dashboard
- if (!$('#topBars').length) {
+ if (!$('#header .navbar-right').length) {
$('.dashboardSettings').after($('#Dashboard'));
- $('#Dashboard_embeddedIndex_' + dashboardId).addClass('sfHover');
+ $('#Dashboard_embeddedIndex_' + dashboardId).addClass('sfActive');
}
widgetsHelper.getAvailableWidgets();
@@ -168,7 +168,7 @@ function copyDashboardToUser() {
// on menu item click, trigger action event on this
var self = this;
this.$element.on('click', 'ul.submenu li[data-action]', function (e) {
- self.$element.toggleClass('visible');
+ self.$element.toggleClass('expanded');
$(self).trigger($(this).attr('data-action'));
});
@@ -176,7 +176,7 @@ function copyDashboardToUser() {
// open manager on open
this.$element.on('click', function (e) {
if ($(e.target).is('.dashboardSettings,.dashboardSettings>span')) {
- self.$element.toggleClass('visible');
+ self.$element.toggleClass('expanded');
// fix position
self.$element
@@ -193,7 +193,7 @@ function copyDashboardToUser() {
&& !$(e.target).is('.dashboardSettings')
) {
self.$element.widgetPreview('reset');
- self.$element.removeClass('visible');
+ self.$element.removeClass('expanded');
}
};
@@ -206,7 +206,7 @@ function copyDashboardToUser() {
},
onSelect: function (widgetUniqueId) {
var widget = widgetsHelper.getWidgetObjectFromUniqueId(widgetUniqueId);
- self.$element.removeClass('visible');
+ self.$element.removeClass('expanded');
self.widgetSelected(widget);
},
@@ -287,7 +287,7 @@ function copyDashboardToUser() {
},
hide: function () {
- this.$element.removeClass('visible');
+ this.$element.removeClass('expanded');
},
isWidgetAvailable: function (widgetUniqueId) {
diff --git a/plugins/Dashboard/javascripts/dashboardObject.js b/plugins/Dashboard/javascripts/dashboardObject.js
index 7808d22c11..4c45d5a888 100644
--- a/plugins/Dashboard/javascripts/dashboardObject.js
+++ b/plugins/Dashboard/javascripts/dashboardObject.js
@@ -477,24 +477,26 @@
return $(this).attr('id').indexOf('Dashboard_embeddedIndex') == 0;
}).remove();
+ if (dashboards.length === 0) {
+ dashboards = [{iddashboard: 1, name: _pk_translate('Dashboard_Dashboard')}];
+ }
+
if (dashboards.length > 1
|| dashboardMenuListItems.length >= 1
) {
var items = [];
for (var i = 0; i < dashboards.length; i++) {
- var $link = $('<a/>').attr('data-idDashboard', dashboards[i].iddashboard).text(dashboards[i].name);
+ var $link = $('<a/>').attr('data-idDashboard', dashboards[i].iddashboard).text(dashboards[i].name).addClass('item title');
var $li = $('<li/>').attr('id', 'Dashboard_embeddedIndex_' + dashboards[i].iddashboard)
.addClass('dashboardMenuItem').append($link);
items.push($li);
if (dashboards[i].iddashboard == dashboardId) {
dashboardName = dashboards[i].name;
- $li.addClass('sfHover');
+ $li.addClass('sfActive');
}
}
dashboardMenuList.prepend(items);
- } else {
- dashboardMenuList.hide();
}
dashboardMenuList.find('a[data-idDashboard]').click(function (e) {
@@ -505,13 +507,13 @@
if (typeof piwikMenu != 'undefined') {
piwikMenu.activateMenu('Dashboard', 'embeddedIndex');
}
- $('#Dashboard ul li').removeClass('sfHover');
+ $('#Dashboard ul li').removeClass('sfActive');
if ($(dashboardElement).length) {
$(dashboardElement).dashboard('loadDashboard', idDashboard);
} else {
broadcast.propagateAjax('module=Dashboard&action=embeddedIndex&idDashboard=' + idDashboard);
}
- $(this).closest('li').addClass('sfHover');
+ $(this).closest('li').addClass('sfActive');
});
};
diff --git a/plugins/Dashboard/javascripts/widgetMenu.js b/plugins/Dashboard/javascripts/widgetMenu.js
index 6d58415cb9..66e033cf8e 100644
--- a/plugins/Dashboard/javascripts/widgetMenu.js
+++ b/plugins/Dashboard/javascripts/widgetMenu.js
@@ -227,7 +227,12 @@ widgetsHelper.loadWidgetAjax = function (widgetUniqueId, widgetParameters, onWid
if ($('.' + settings.categorylistClass + ' .' + settings.choosenClass, widgetPreview).length) {
var position = $('.' + settings.categorylistClass + ' .' + settings.choosenClass, widgetPreview).position().top -
- $('.' + settings.categorylistClass, widgetPreview).position().top;
+ $('.' + settings.categorylistClass, widgetPreview).position().top +
+ $('.dashboard-manager .addWidget').outerHeight();
+
+ if (!$('#content.admin').length) {
+ position += 10; // + padding defined in dashboard view
+ }
$('.' + settings.widgetlistClass, widgetPreview).css('top', position);
$('.' + settings.widgetlistClass, widgetPreview).css('marginBottom', position);
@@ -281,6 +286,7 @@ widgetsHelper.loadWidgetAjax = function (widgetUniqueId, widgetParameters, onWid
$('li:not(.' + settings.unavailableClass + ')', widgetList).on('click', function () {
if (!$('.widgetLoading', widgetPreview).length) {
settings.onSelect($(this).attr('uniqueid'));
+ $(widgetPreview).closest('.dashboard-manager').removeClass('expanded');
if (settings.resetOnSelect) {
resetWidgetPreview(widgetPreview);
}
@@ -341,6 +347,7 @@ widgetsHelper.loadWidgetAjax = function (widgetUniqueId, widgetParameters, onWid
settings.onPreviewLoaded(widgetUniqueId, widgetElement);
$('.' + settings.widgetpreviewClass + ' .widgetTop', widgetPreview).on('click', function () {
settings.onSelect(widgetUniqueId);
+ $(widgetPreview).closest('.dashboard-manager').removeClass('expanded');
if (settings.resetOnSelect) {
resetWidgetPreview(widgetPreview);
}
diff --git a/plugins/Dashboard/stylesheets/dashboard.less b/plugins/Dashboard/stylesheets/dashboard.less
index fad10183e7..39ad2e3ed7 100644
--- a/plugins/Dashboard/stylesheets/dashboard.less
+++ b/plugins/Dashboard/stylesheets/dashboard.less
@@ -1,40 +1,21 @@
#dashboard {
- margin: 0 -7px;
+ margin: 0 -6px;
}
-#root>.top_controls {
- margin-left:15px;
- margin-right:15px;
+#standalone #dashboard {
+ margin: -10px -6px 0;
}
-.top_controls {
- position: relative;
- height: 32px;
- clear: left;
-}
-
-@media all and (max-width: 749px) {
- .top_controls {
- height: auto;
- }
- .top_controls #periodString,
- .top_controls .dashboardSettings,
- .top_controls .segmentEditorPanel {
- position: static !important;
- margin: 0 0 10px;
- float: none;
- }
-}
#dashboard {
.col {
min-height: 100px;
// Customize Bootstrap gutter between columns
- padding-right: 7px;
- padding-left: 7px;
+ padding-right: 6px;
+ padding-left: 6px;
>.sortable {
- padding: 5px 0 10px 0;
+ padding: 5px 0 8px 0;
}
}
}
@@ -152,10 +133,8 @@
z-index: 120;
background: #f7f7f7;
border: 1px solid #e4e5e4;
- padding: 5px 10px 6px 10px;
border-radius: 4px;
color: @theme-color-text-light;
- font-size: 14px;
cursor: pointer;
overflow: hidden;
}
@@ -165,9 +144,9 @@
border-color: #a9a399;
}
-.dashboardSettings.visible {
+.dashboardSettings.expanded {
z-index: 1020; /* More than .jqplot-seriespicker-popover (1010) */
- min-width: 700px;
+ min-width: 800px;
}
.dashboardSettings > span {
@@ -182,10 +161,9 @@
float: left;
}
-.dashboardSettings.visible ul.submenu {
+.dashboardSettings.expanded ul.submenu {
display: block;
list-style: square outside none;
- margin-left: 15px;
}
.dashboardSettings > ul.submenu > li {
@@ -328,7 +306,6 @@ div.widgetpreview-preview {
min-height: 0;
height: auto;
margin-right: 10px;
- min-width: 180px;
}
.dashboardSettings .submenu {
@@ -372,8 +349,8 @@ div.widgetpreview-preview {
display: none;
}
-.dashboardSettings.visible .widgetpreview-widgetlist,
-.dashboardSettings.visible .widgetpreview-preview {
+.dashboardSettings.expanded .widgetpreview-widgetlist,
+.dashboardSettings.expanded .widgetpreview-preview {
display: block;
}
@@ -416,7 +393,7 @@ div.widgetpreview-preview {
}
#dashboardWidgetsArea {
- margin-top: 5px;
+ margin-top: -5px;
}
@media all and (max-width: 749px) {
diff --git a/plugins/Dashboard/stylesheets/standalone.css b/plugins/Dashboard/stylesheets/standalone.css
index 5a2b0d90d9..292d3e63c0 100644
--- a/plugins/Dashboard/stylesheets/standalone.css
+++ b/plugins/Dashboard/stylesheets/standalone.css
@@ -45,17 +45,10 @@ body {
}
#Dashboard > ul > li:hover,
-#Dashboard > ul > li:hover a,
-#Dashboard > ul > li.sfHover,
-#Dashboard > ul > li.sfHover a {
+#Dashboard > ul > li:hover a {
color: #e87500;
}
-#Dashboard > ul > li.sfHover,
-#Dashboard > ul > li.sfHover a {
- font-weight: bold;
-}
-
.top_controls > #Dashboard,
.top_controls > #periodString,
.top_controls > .dashboardSettings {
diff --git a/plugins/Dashboard/stylesheets/widget.less b/plugins/Dashboard/stylesheets/widget.less
index a06564f033..558da41ab9 100644
--- a/plugins/Dashboard/stylesheets/widget.less
+++ b/plugins/Dashboard/stylesheets/widget.less
@@ -16,7 +16,7 @@
font-weight: normal;
font-size: 15px;
margin: 0;
- color: #0D0D0D;
+ color: @theme-color-text;
text-shadow: none;
padding: 15px 15px 10px 12px;
}
diff --git a/plugins/Dashboard/templates/_dashboardSettings.twig b/plugins/Dashboard/templates/_dashboardSettings.twig
index dc05a6dae1..b82e913743 100644
--- a/plugins/Dashboard/templates/_dashboardSettings.twig
+++ b/plugins/Dashboard/templates/_dashboardSettings.twig
@@ -1,12 +1,12 @@
-<span>{{ 'Dashboard_Dashboard'|translate }}</span>
-<ul class="submenu">
+<a class="title" title="{{ 'Dashboard_ManageDashboard'|translate|e('html_attr') }}"><span class="icon icon-arrow-bottom"></span>{{ 'Dashboard_Dashboard'|translate }} </a>
+<ul class="dropdown submenu">
<li>
- <div class="addWidget">{{ 'Dashboard_AddAWidget'|translate }} &darr;</div>
+ <div class="addWidget">{{ 'Dashboard_AddAWidget'|translate }}</div>
<ul class="widgetpreview-categorylist"></ul>
</li>
{% if dashboardActions|length > 0 %}
<li>
- <div class="manageDashboard">{{ 'Dashboard_ManageDashboard'|translate }} &darr;</div>
+ <div class="manageDashboard">{{ 'Dashboard_ManageDashboard'|translate }}</div>
<ul>
{% for action, title in dashboardActions %}
<li data-action="{{ action }}">{{ title|translate }}</li>
diff --git a/plugins/Dashboard/templates/index.twig b/plugins/Dashboard/templates/index.twig
index 0a8831fe3f..ddaac2428c 100644
--- a/plugins/Dashboard/templates/index.twig
+++ b/plugins/Dashboard/templates/index.twig
@@ -3,11 +3,12 @@
{% include "@CoreHome/_periodSelect.twig" %}
{{ postEvent("Template.nextToCalendar") }}
{% render dashboardSettingsControl %}
- <div id="Dashboard" class="piwikTopControl">
+ <div id="Dashboard" class="piwikTopControl borderedControl piwikSelector">
<ul>
{% for dashboard in dashboards %}
<li class="dashboardMenuItem" id="Dashboard_embeddedIndex_{{ dashboard.iddashboard }}">
- <a href="javascript:$('#dashboardWidgetsArea').dashboard('loadDashboard', {{ dashboard.iddashboard }});">{{ dashboard.name|escape }}</a>
+ <a href="javascript:$('#dashboardWidgetsArea').dashboard('loadDashboard', {{ dashboard.iddashboard }});"
+ class="title">{{ dashboard.name|escape }}</a>
</li>
{% endfor %}
</ul>
diff --git a/plugins/ExamplePlugin/tests/UI/expected-ui-screenshots/SimpleUITest_simplePage.png b/plugins/ExamplePlugin/tests/UI/expected-ui-screenshots/SimpleUITest_simplePage.png
index abda1cb320..34830ea4e9 100644
--- a/plugins/ExamplePlugin/tests/UI/expected-ui-screenshots/SimpleUITest_simplePage.png
+++ b/plugins/ExamplePlugin/tests/UI/expected-ui-screenshots/SimpleUITest_simplePage.png
Binary files differ
diff --git a/plugins/ExamplePlugin/tests/UI/expected-ui-screenshots/SimpleUITest_simplePagePartial.png b/plugins/ExamplePlugin/tests/UI/expected-ui-screenshots/SimpleUITest_simplePagePartial.png
index 3543e6596a..e64af9b12d 100644
--- a/plugins/ExamplePlugin/tests/UI/expected-ui-screenshots/SimpleUITest_simplePagePartial.png
+++ b/plugins/ExamplePlugin/tests/UI/expected-ui-screenshots/SimpleUITest_simplePagePartial.png
Binary files differ
diff --git a/plugins/Goals/templates/manageGoals.twig b/plugins/Goals/templates/manageGoals.twig
index 4e3a4ce855..72124faf72 100644
--- a/plugins/Goals/templates/manageGoals.twig
+++ b/plugins/Goals/templates/manageGoals.twig
@@ -2,6 +2,10 @@
{% set title %}{{ 'Goals_ManageGoals'|translate }}{% endset %}
+{% block topcontrols %}
+ {% include "@CoreHome/_siteSelectHeader.twig" %}
+{% endblock %}
+
{% block content %}
<h2 piwik-enriched-headline>
@@ -20,8 +24,6 @@
{{ title }}
</h2>
- {% include "@CoreHome/_siteSelectHeader.twig" %}
-
{% include "@Goals/_addEditGoal.twig" %}
<style type="text/css">
diff --git a/plugins/ImageGraph/templates/testAllSizes.twig b/plugins/ImageGraph/templates/testAllSizes.twig
index c00c023d09..c4df9672ec 100644
--- a/plugins/ImageGraph/templates/testAllSizes.twig
+++ b/plugins/ImageGraph/templates/testAllSizes.twig
@@ -1,15 +1,15 @@
{% extends 'dashboard.twig' %}
+{% block topcontrols %}
+ {% include '@CoreHome/_periodSelect.twig' %}
+{% endblock %}
+
{% block content %}
{% set showSitesSelection=true %}
<div>
<h2>{{ 'ImageGraph_ImageGraph'|translate }} ::: {{ siteName }}</h2>
- <div class="top_controls">
- {% include '@CoreHome/_periodSelect.twig' %}
- </div>
-
<div class="entityContainer" style="width:100%;">
<div class="entityAddContainer">
<table class="dataTable entityTable">
diff --git a/plugins/Installation/stylesheets/installation.css b/plugins/Installation/stylesheets/installation.css
index 5621ae98df..feb21be950 100644
--- a/plugins/Installation/stylesheets/installation.css
+++ b/plugins/Installation/stylesheets/installation.css
@@ -4,7 +4,7 @@ body {
/* Header */
.header {
- padding: 50px 0 12px;
+ padding: 50px 0 22px;
margin-bottom: 40px;
border-bottom: solid 1px #ccc;
}
@@ -20,7 +20,7 @@ body {
}
.language-selector {
float: left;
- margin-left: 15px;
+ margin-left: 20px;
margin-top: 10px;
}
.installation-progress {
diff --git a/plugins/LeftMenu/API.php b/plugins/LeftMenu/API.php
deleted file mode 100644
index 3d0d38b646..0000000000
--- a/plugins/LeftMenu/API.php
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-/**
- * Piwik - free/libre analytics platform
- *
- * @link http://piwik.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- *
- */
-namespace Piwik\Plugins\LeftMenu;
-
-/**
- * API for plugin LeftMenu
- *
- * @method static \Piwik\Plugins\LeftMenu\API getInstance()
- */
-class API extends \Piwik\Plugin\API
-{
- /**
- * Returns true if the left menu is enabled for the current user.
- *
- * @return bool
- */
- public function isEnabled()
- {
- $settings = new Settings('LeftMenu');
- $default = $settings->globalEnabled->getValue();
-
- if (!$settings->userEnabled->isReadableByCurrentUser()) {
- return $default;
- }
-
- $user = $settings->userEnabled->getValue();
-
- if (empty($user) || $user === 'system') {
- return $default;
- }
-
- if ($user === 'no') {
- return false;
- }
-
- return true;
- }
-}
diff --git a/plugins/LeftMenu/LeftMenu.php b/plugins/LeftMenu/LeftMenu.php
deleted file mode 100755
index 522965e6b8..0000000000
--- a/plugins/LeftMenu/LeftMenu.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-/**
- * Piwik - free/libre analytics platform
- *
- * @link http://piwik.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- *
- */
-
-namespace Piwik\Plugins\LeftMenu;
-
-class LeftMenu extends \Piwik\Plugin
-{
- public function registerEvents()
- {
- return array(
- 'AssetManager.getStylesheetFiles' => array('function' => 'getStylesheetFiles', 'after' => true),
- 'Template.bodyClass' => 'addClassToBody'
- );
- }
-
- public function addClassToBody(&$str, $layout)
- {
- if (API::getInstance()->isEnabled() && 'dashboard' === $layout) {
- $str .= ' leftMenuPlugin';
- }
- }
-
- public function getStylesheetFiles(&$stylesheets)
- {
- $stylesheets[] = "plugins/LeftMenu/stylesheets/theme.less";
- }
-
-}
-
diff --git a/plugins/LeftMenu/Settings.php b/plugins/LeftMenu/Settings.php
deleted file mode 100644
index b22c1bc40a..0000000000
--- a/plugins/LeftMenu/Settings.php
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-/**
- * Piwik - free/libre analytics platform
- *
- * @link http://piwik.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- *
- */
-namespace Piwik\Plugins\LeftMenu;
-
-use Piwik\Piwik;
-use Piwik\Settings\SystemSetting;
-use Piwik\Settings\UserSetting;
-
-/**
- * Defines Settings for LeftMenu.
- */
-class Settings extends \Piwik\Plugin\Settings
-{
- /** @var SystemSetting */
- public $globalEnabled;
-
- /** @var UserSetting */
- public $userEnabled;
-
- protected function init()
- {
- $this->setIntroduction($this->t('SettingsIntroduction'));
-
- $this->createGlobalEnabledSetting();
-
- $this->createUserEnabledSetting();
- }
-
- private function createGlobalEnabledSetting()
- {
- $this->globalEnabled = new SystemSetting('globalEnabled', $this->t('GlobalSettingTitle'));
- $this->globalEnabled->type = static::TYPE_BOOL;
- $this->globalEnabled->inlineHelp = $this->t('GlobalSettingDescription') . ' ' . $this->t('GlobalSettingInlineHelp');
- $this->globalEnabled->defaultValue = false;
- $this->globalEnabled->readableByCurrentUser = true;
-
- $this->addSetting($this->globalEnabled);
- }
-
- private function createUserEnabledSetting()
- {
- $this->userEnabled = new UserSetting('userEnabled', $this->t('UserSettingTitle'));
- $this->userEnabled->type = static::TYPE_STRING;
- $this->userEnabled->uiControlType = static::CONTROL_RADIO;
- $this->userEnabled->defaultValue = 'system';
- $this->userEnabled->inlineHelp = $this->t('UserSettingInlineHelp');
- $this->userEnabled->availableValues = array(
- 'system' => Piwik::translate('General_Default'),
- 'yes' => Piwik::translate('General_Yes'),
- 'no' => Piwik::translate('General_No')
- );
-
- $this->addSetting($this->userEnabled);
- }
-
- private function t($key)
- {
- return Piwik::translate('LeftMenu_' . $key);
- }
-
-}
diff --git a/plugins/LeftMenu/lang/bg.json b/plugins/LeftMenu/lang/bg.json
deleted file mode 100644
index 4c5cc8fc36..0000000000
--- a/plugins/LeftMenu/lang/bg.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "LeftMenu": {
- "UserSettingTitle": "Активиране на лявото меню за отчет"
- }
-} \ No newline at end of file
diff --git a/plugins/LeftMenu/lang/cs.json b/plugins/LeftMenu/lang/cs.json
deleted file mode 100644
index e15938a574..0000000000
--- a/plugins/LeftMenu/lang/cs.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "LeftMenu": {
- "PluginDescription": "Umístit menu nástěnky nalevo.",
- "SettingsIntroduction": "Zásuvný modul levé menu přesune menu hlášení na levou stranu (je-li povolen). To je především užitečné na velkých displejích.",
- "GlobalSettingTitle": "Levé menu je ve výchozím stavu povoleno",
- "GlobalSettingDescription": "Definuje systémovou výchozí hodnotu pro všechny uživatele.",
- "GlobalSettingInlineHelp": "Uživatelé si mohou zakázat\/povolit levé menu nezávisle na systémové výchozí hodnotě.",
- "UserSettingTitle": "Povolit levé menu hlášení",
- "UserSettingInlineHelp": "Toto povolí nebo zakáže levé menu jen pro vás bez ohledu na jiné uživatele. Super uživatel může nastavit výchozí systémovou hodnotu."
- }
-} \ No newline at end of file
diff --git a/plugins/LeftMenu/lang/da.json b/plugins/LeftMenu/lang/da.json
deleted file mode 100644
index 27da2b1651..0000000000
--- a/plugins/LeftMenu/lang/da.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "LeftMenu": {
- "SettingsIntroduction": "Venstre menu udvidelsen vil flytte rapportmenuen fra toppen til venstre, hvis aktiveret. Dette er især nyttigt for store skærme.",
- "GlobalSettingTitle": "Venstre menu aktiveret som standard",
- "GlobalSettingDescription": "Definerer systemets standard indstillinger for alle brugerne.",
- "GlobalSettingInlineHelp": "Brugerne er i stand til at aktivere\/deaktivere venstremenuen uafhængigt af systemets standard indstillinger.",
- "UserSettingTitle": "Aktiver rapportmenu til venstre",
- "UserSettingInlineHelp": "Dette vil kun aktivere eller deaktivere venstre menuen for dig og påvirker ikke andre brugere. En superbruger kan ændre standardindstillingen for alle brugere."
- }
-} \ No newline at end of file
diff --git a/plugins/LeftMenu/lang/de.json b/plugins/LeftMenu/lang/de.json
deleted file mode 100644
index 997daaca28..0000000000
--- a/plugins/LeftMenu/lang/de.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "LeftMenu": {
- "PluginDescription": "Platziert das Dashboardmenü auf die linke Seite",
- "SettingsIntroduction": "Das LeftMenu Plug-In verschiebt die Menüs für die Reporte auf die linke Seite. Dies ist für umfangreiche Reporte hilfreich.",
- "GlobalSettingTitle": "LeftMenu aktiviert als Voreinstellung",
- "GlobalSettingDescription": "Legt die Standardeinstellung für alle Benutzer fest.",
- "GlobalSettingInlineHelp": "Die Benutzer können es unabhängig von der Vorgabe aktivieren\/deaktivieren.",
- "UserSettingTitle": "LeftMenu aktiviert",
- "UserSettingInlineHelp": "Legt die Einstellung für den aktuellen Benutzer fest, ob LeftMenu aktiviert oder deaktiviert sein soll. Ein Administrator kann die Standardeinstellung für alle Benutzer festlegen."
- }
-} \ No newline at end of file
diff --git a/plugins/LeftMenu/lang/el.json b/plugins/LeftMenu/lang/el.json
deleted file mode 100644
index e8ef94446e..0000000000
--- a/plugins/LeftMenu/lang/el.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "LeftMenu": {
- "PluginDescription": "Τοποθέτηση του μενού του πίνακα ελέγχου στα αριστερά.",
- "SettingsIntroduction": "Το πρόσθετο για το αριστερό μενού θα μετακινήσει το μενού αναφορών από την κορυφή προς τα αριστερά αν ενεργοποιηθεί. Αυτό είναι ιδιαίτερα χρήσιμο για μεγάλες οθόνες.",
- "GlobalSettingTitle": "Το αριστερό μενού είναι εξ' ορισμού ενεργοποιημένο.",
- "GlobalSettingDescription": "Ορίζει την προεπιλογή για όλους τους χρήστες.",
- "GlobalSettingInlineHelp": "Οι χρήστες μπορούν να απενεργοποιούν\/ενεργοποιούν το αριστερό μενού ανεξάρτητα από την προεπιλεγμένη ρύθμιση του συστήματος.",
- "UserSettingTitle": "Ενεργοποίηση του αριστερού μενού αναφορών",
- "UserSettingInlineHelp": "Αυτό θα ενεργοποιήσει ή απενεργοποιήσει το αριστερό μενού μόνο για εσάς και δε θα επηρεάσει άλλους χρήστες. Ένας Υπερχρήστης μπορεί να αλλάξει την προκαθορισμένη ρύθμιση για όλους τους χρήστες."
- }
-} \ No newline at end of file
diff --git a/plugins/LeftMenu/lang/en.json b/plugins/LeftMenu/lang/en.json
deleted file mode 100644
index 2869b86479..0000000000
--- a/plugins/LeftMenu/lang/en.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "LeftMenu": {
- "PluginDescription": "Position the dashboard menu to the left.",
- "SettingsIntroduction": "The left menu plugin will move the reporting menu from the top to the left if enabled. This is especially useful for large displays.",
- "GlobalSettingTitle": "Left menu enabled by default",
- "GlobalSettingDescription": "Defines the system default for all of your users.",
- "GlobalSettingInlineHelp": "Users are able to disable/enable the left menu independent of the system default.",
- "UserSettingTitle": "Enable left reporting menu",
- "UserSettingInlineHelp": "This will enable or disable the left menu only for you and not affect any other users. A Super User can change the default for all users."
- }
-} \ No newline at end of file
diff --git a/plugins/LeftMenu/lang/es.json b/plugins/LeftMenu/lang/es.json
deleted file mode 100644
index 66a3ed43f7..0000000000
--- a/plugins/LeftMenu/lang/es.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "LeftMenu": {
- "PluginDescription": "Ubicar el menú del tablero a la izquierda.",
- "SettingsIntroduction": "El menú izquierdo del complemento moverá el menú de información desde la parte superior a la izquierda si es habilitado. Especialmente útil para pantallas grandes.",
- "GlobalSettingTitle": "Menú izquierdo activado por defecto",
- "GlobalSettingDescription": "Define el sistema predeterminado para todos sus usuarios.",
- "GlobalSettingInlineHelp": "Los usuarios están habilitados a habilitar\/deshabilitar el menú izquierdo independientemente del sistema predeterminado.",
- "UserSettingTitle": "Habilitar menú izquierdo de información",
- "UserSettingInlineHelp": "Esto habilitará o deshabilitará el menú izquierdo solo para usted y no afectará a ningún otro usuario. Un Super Usuario puede cambiar el modo predeterminado para todos los demás usuarios."
- }
-} \ No newline at end of file
diff --git a/plugins/LeftMenu/lang/fi.json b/plugins/LeftMenu/lang/fi.json
deleted file mode 100644
index d2007c8cf4..0000000000
--- a/plugins/LeftMenu/lang/fi.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "LeftMenu": {
- "GlobalSettingTitle": "Vasen valikko oletuksena käytössä",
- "GlobalSettingDescription": "Määrittää järjestelmän oletusasetuksen kaikille käyttäjille.",
- "GlobalSettingInlineHelp": "Käyttäjät voivat poistaa käytöstä\/ottaa käyttöön vasemman valikon riippumatta järjestelmän oletusasetuksesta.",
- "UserSettingTitle": "Ota vasen raportointivalikko käyttöön"
- }
-} \ No newline at end of file
diff --git a/plugins/LeftMenu/lang/fr.json b/plugins/LeftMenu/lang/fr.json
deleted file mode 100644
index 52b8c6b0b8..0000000000
--- a/plugins/LeftMenu/lang/fr.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "LeftMenu": {
- "PluginDescription": "Positionne le menu du tableau de bord sur la gauche.",
- "SettingsIntroduction": "Le composant de menu à gauche va déplacer le menu de rapport d'en haut vers la gauche s'il est activé. C'est particulièrement utile pour les affichages larges.",
- "GlobalSettingTitle": "Menu de gauche activé par défaut",
- "GlobalSettingDescription": "Définit les valeurs système par défaut pour tous les utilisateurs.",
- "GlobalSettingInlineHelp": "Les utilisateurs peuvent activer\/désactiver le menu de gauche indépendant des valeurs par défaut du système.",
- "UserSettingTitle": "Activer le menu de rapport de gauche",
- "UserSettingInlineHelp": "Cela va activer ou désactiver le menu de gauche pour vous uniquement et ne pas affecter les autres utilisateurs. Un super utilisateur peut modifier le paramètre par défaut pour tous les utilisateurs."
- }
-} \ No newline at end of file
diff --git a/plugins/LeftMenu/lang/hi.json b/plugins/LeftMenu/lang/hi.json
deleted file mode 100644
index b45521c7e6..0000000000
--- a/plugins/LeftMenu/lang/hi.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "LeftMenu": {
- "PluginDescription": "बाईं ओर डैशबोर्ड मेनू स्थिति।",
- "SettingsIntroduction": "अगर सक्रिय बाएँ मेनू प्लगइन बाईं ओर ऊपर से रिपोर्टिंग मेनू कदम होगा। इस बड़े डिस्प्ले के लिए विशेष रूप से उपयोगी है।",
- "GlobalSettingTitle": "डिफ़ॉल्ट रूप से सक्षम बाएँ मेनू",
- "GlobalSettingDescription": "आपके सभी उपयोगकर्ताओं के लिए सिस्टम मूलभूत को परिभाषित करता है।",
- "GlobalSettingInlineHelp": "उपयोगकर्ता निष्क्रिय \/ सिस्टम डिफ़ॉल्ट के बाईं ओर मेनू स्वतंत्र सक्षम करने में सक्षम हैं।",
- "UserSettingTitle": "छोड़ दिया रिपोर्टिंग मेनू सक्षम करें",
- "UserSettingInlineHelp": "इस सक्षम है या केवल आप के लिए छोड़ दिया मेनू को अक्षम और किसी भी अन्य उपयोगकर्ताओं को प्रभावित नहीं करेगा । एक सुपर उपयोगकर्ता सभी उपयोगकर्ताओं के लिए डिफ़ॉल्ट बदल सकते हैं।"
- }
-} \ No newline at end of file
diff --git a/plugins/LeftMenu/lang/it.json b/plugins/LeftMenu/lang/it.json
deleted file mode 100644
index 844623abbc..0000000000
--- a/plugins/LeftMenu/lang/it.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "LeftMenu": {
- "PluginDescription": "Posiziona il menù dashboard sulla sinistra.",
- "SettingsIntroduction": "Il plugin menù di sinistra sposta il menu di segnalazione dalla parte superiore a sinistra, se abilitato. Ciò è particolarmente utile per i display di grandi dimensioni.",
- "GlobalSettingTitle": "Il menù di sinistra è abilitato di default",
- "GlobalSettingDescription": "Definisce le impostazioni predefinite di sistema per tutti gli utenti.",
- "GlobalSettingInlineHelp": "Gli utenti possono disabilitare o abilitare il menù di sinistra indipendentemente dalle impostazioni predefinite del sistema.",
- "UserSettingTitle": "Abilita il menù di segnalazione di sinistra",
- "UserSettingInlineHelp": "Questo abilita o disabilita il menù di sinistra solo per te e non ha effetto per gli altri utenti. Un Super User può cambiare per tutti gli utenti le impostazioni predefinite."
- }
-} \ No newline at end of file
diff --git a/plugins/LeftMenu/lang/ja.json b/plugins/LeftMenu/lang/ja.json
deleted file mode 100644
index 6d4e82e5ec..0000000000
--- a/plugins/LeftMenu/lang/ja.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "LeftMenu": {
- "SettingsIntroduction": "左メニューのプラグインは、有効化されている場合、レポートメニューをトップから左に移動します。この移動は、特に大きなディスプレイをお使いの場合、便利です。",
- "GlobalSettingTitle": "デフォルトにより有効化された左メニュー",
- "GlobalSettingDescription": "全サイトユーザーのためのシステムデフォルトを定義",
- "GlobalSettingInlineHelp": "ユーザーは、システムデフォルトの左メニューの独立を無効 \/ 有効にすることができます。",
- "UserSettingTitle": "左のレポートメニューを有効にする",
- "UserSettingInlineHelp": "これは、左メニューをあなたのためだけに有効または無効にし、他のユーザーには影響しません。スーパーユーザーは、全てのユーザーに対するデフォルト設定を変更できます。"
- }
-} \ No newline at end of file
diff --git a/plugins/LeftMenu/lang/nl.json b/plugins/LeftMenu/lang/nl.json
deleted file mode 100644
index f3dcf078a8..0000000000
--- a/plugins/LeftMenu/lang/nl.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "LeftMenu": {
- "PluginDescription": "Plaats het dashboard menu aan de linkerzijde",
- "SettingsIntroduction": "De linkermenu plugin verplaatst indien ingeschakeld het menu van bovenaan de pagina naar links. Deze optie is vooral handig bij het gebruik van een groot scherm.",
- "GlobalSettingTitle": "Linker menu standaard ingeschakeld",
- "GlobalSettingDescription": "Definieert het systeem standaard voor al uw gebruikers.",
- "GlobalSettingInlineHelp": "De gebruikers hebben de mogelijkheid om het linkermenu in of uit te schakelen los van de algemene instellingen.",
- "UserSettingTitle": "Schakel het linker menu in.",
- "UserSettingInlineHelp": "Dit zal het linkermenu alleen voor u en niet voor andere gebruikers inschakelen. Een Super User kan de standaard instelling voor alle gebruikers aanpassen."
- }
-} \ No newline at end of file
diff --git a/plugins/LeftMenu/lang/pl.json b/plugins/LeftMenu/lang/pl.json
deleted file mode 100644
index c75b2ea5d8..0000000000
--- a/plugins/LeftMenu/lang/pl.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "LeftMenu": {
- "GlobalSettingTitle": "Menu po lewej stronie domyślnie włączone",
- "GlobalSettingDescription": "Definiuje domyślne systemu dla wszystkich użytkowników."
- }
-} \ No newline at end of file
diff --git a/plugins/LeftMenu/lang/pt-br.json b/plugins/LeftMenu/lang/pt-br.json
deleted file mode 100644
index 69c7444974..0000000000
--- a/plugins/LeftMenu/lang/pt-br.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "LeftMenu": {
- "PluginDescription": "Posiciona o menu do painel de controle à esquerda.",
- "SettingsIntroduction": "O plugin de menu lateral irá mover o menu de relatórios do topo para a esquerda, se habilitado. Isto é útil especialmente para telas de grandes proporções.",
- "GlobalSettingTitle": "Menu lateral habilitado por padrão",
- "GlobalSettingDescription": "Define o padrão do sistema para todos os usuários.",
- "GlobalSettingInlineHelp": "Usuários podem habilitar ou desabilitar o menu lateral independentemente do padrão do sistema.",
- "UserSettingTitle": "Habilitar o menu lateral de relatórios",
- "UserSettingInlineHelp": "Isto irá habilitar ou desabilitar o menu lateral apenas para você, sem afetar nenhum outro usuário. Um superusuário poderá alterar o padrão para todos os usuários."
- }
-} \ No newline at end of file
diff --git a/plugins/LeftMenu/lang/pt.json b/plugins/LeftMenu/lang/pt.json
deleted file mode 100644
index 787044a2ec..0000000000
--- a/plugins/LeftMenu/lang/pt.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "LeftMenu": {
- "PluginDescription": "Posiçionar o painel do menu na esquerda.",
- "SettingsIntroduction": "O plugin menu à esquerda irá mover o menu dos relatórios do topo à esquerda se estiver ativado. Isto é especialmente útil para grandes ecrãs.",
- "GlobalSettingTitle": "Menu esquerdo ativo por padrão.",
- "GlobalSettingDescription": "Definição do sistema padrão para todos os usuários.",
- "GlobalSettingInlineHelp": "Os utilizadores são capazes de ativar ou desativar o menu na esquerda independentemente da preferência padrão do sistema.",
- "UserSettingTitle": "Ative o menu relatório na esquerda.",
- "UserSettingInlineHelp": "Isso irá ativar ou desativar o menu à esquerda apenas para ti e não afecta quaisquer outros utilizadores. Um super user pode alterar o padrão para todos os utilizadores."
- }
-} \ No newline at end of file
diff --git a/plugins/LeftMenu/lang/ro.json b/plugins/LeftMenu/lang/ro.json
deleted file mode 100644
index fa63c4cac6..0000000000
--- a/plugins/LeftMenu/lang/ro.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "LeftMenu": {
- "SettingsIntroduction": "Modulul meniului din stânga va muta meniul de raportare din partea de sus în partea stângă dacă este activat. Acesta este folositor în special în cazul ecranelor mari.",
- "GlobalSettingTitle": "Meniul din stânnga este activat implicit",
- "GlobalSettingDescription": "Definește valoarea implicită pentru toți utilizatorii.",
- "GlobalSettingInlineHelp": "Utilizatorii pot dezactiva\/activa meniul din stânga independet de valoare implicită.",
- "UserSettingTitle": "Activează meniul de raportare din stânga",
- "UserSettingInlineHelp": "Acesta va activa sau dezactiva meniul din stânga doar pentru dumneavoastra și nu va afecta alți utilizatori. Un Super Utilizator va putea schimba modul implicit pentru toți utilizatorii."
- }
-} \ No newline at end of file
diff --git a/plugins/LeftMenu/lang/ru.json b/plugins/LeftMenu/lang/ru.json
deleted file mode 100644
index e0d825348b..0000000000
--- a/plugins/LeftMenu/lang/ru.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "LeftMenu": {
- "SettingsIntroduction": "Если включить плагин LeftMenu, он переместит главное меню сверху налево. Это будет удобно для больших экранов.",
- "GlobalSettingTitle": "Левое меню включено поумолчанию",
- "GlobalSettingDescription": "Определяет значение по умолчанию для всех пользователей.",
- "GlobalSettingInlineHelp": "Пользователи имеют возможность отключить\/включить левое меню независимо от значения по умолчанию.",
- "UserSettingInlineHelp": "Это включает или отключает левое меню только для вас и не влияет на других пользователей. Суперпользователь может изменить настройки по умолчанию для всех пользователей."
- }
-} \ No newline at end of file
diff --git a/plugins/LeftMenu/lang/sr.json b/plugins/LeftMenu/lang/sr.json
deleted file mode 100644
index e2aaa6bbc1..0000000000
--- a/plugins/LeftMenu/lang/sr.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "LeftMenu": {
- "PluginDescription": "Postavi meni za konzolu na levu stranu.",
- "SettingsIntroduction": "Dodatak za levi meni će pomeriti meni za izveštaje sa vrha na levu stranu. Ovo je praktično od velikih monitora.",
- "GlobalSettingTitle": "Levi meni je podrazumevano uključen",
- "GlobalSettingDescription": "Postavljanje podrazumevanih vrednosti za sve korisnike.",
- "GlobalSettingInlineHelp": "Korisnici mogu da uključuju i isključuju levi meni nezavisno od podrazumevanih sistemskih podešavanja.",
- "UserSettingTitle": "Omogući meni sa leve strane",
- "UserSettingInlineHelp": "Ova opcija će uključiti ili isključiti meni sa leve strane samo za vas a ne i za ostale korisnike. Superkorisnik može da promeni podrazumevane vrednosti za sve korisnike."
- }
-} \ No newline at end of file
diff --git a/plugins/LeftMenu/lang/sv.json b/plugins/LeftMenu/lang/sv.json
deleted file mode 100644
index aeaa07d522..0000000000
--- a/plugins/LeftMenu/lang/sv.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "LeftMenu": {
- "PluginDescription": "Placera menyn till vänster.",
- "SettingsIntroduction": "Tillägget för vänstermeny kommer, ifall det är aktiverat, flytta rapportmenyn till den vänstra sidan. Detta är speciellt användbart för större skärmar.",
- "GlobalSettingTitle": "Vänster meny aktiverad som standard",
- "GlobalSettingDescription": "Definierar systemets standardinställning för alla dina användare.",
- "GlobalSettingInlineHelp": "Användare har möjlighet att aktivera\/deaktivera vänstermenyn oavhängigt systeminställningarna.",
- "UserSettingTitle": "Aktivera vänster rapporteringsmeny",
- "UserSettingInlineHelp": "Detta kommer aktivera\/deaktivera för dig utan att påverka andra användare. En Super User kan ändra inställningen för samtliga användare."
- }
-} \ No newline at end of file
diff --git a/plugins/LeftMenu/lang/tl.json b/plugins/LeftMenu/lang/tl.json
deleted file mode 100644
index 2a6a0045b6..0000000000
--- a/plugins/LeftMenu/lang/tl.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "LeftMenu": {
- "SettingsIntroduction": "Ang kaliwang menu na may plugin ay pwedeng ilipat ang menu kung saan makikita ang ulat mula sa taas papunta sa kaliwa kung ito ay gumagana. Ito ay lalong mapapakinabangan sa malalaking display.",
- "GlobalSettingTitle": "Ang kaliwa menu ay gumagana bilang default",
- "GlobalSettingDescription": "Tinutukoy ang default system para sa lahat ng iyong mga user.",
- "GlobalSettingInlineHelp": "Ang user ay maari makapag pagana o hindi makapag pagana ng menu sa kaliwa na independent sa system default.",
- "UserSettingTitle": "Pagahanin ang kaliwang menu na pang ulat",
- "UserSettingInlineHelp": "Ang menu sa kaliwa ay pwede mong paganahin o wag paganahin at hindi maapektuhan ang ibang mga user. Ang Super User ay pwedeng baguhin ang lahat pangunahing pagpipilian sa lahat ng users."
- }
-} \ No newline at end of file
diff --git a/plugins/LeftMenu/lang/tr.json b/plugins/LeftMenu/lang/tr.json
deleted file mode 100644
index ab8dbb51d8..0000000000
--- a/plugins/LeftMenu/lang/tr.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "LeftMenu": {
- "UserSettingTitle": "Sol raporlama menüsünü etkinleştir"
- }
-} \ No newline at end of file
diff --git a/plugins/LeftMenu/lang/zh-cn.json b/plugins/LeftMenu/lang/zh-cn.json
deleted file mode 100644
index fef3e18afd..0000000000
--- a/plugins/LeftMenu/lang/zh-cn.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "LeftMenu": {
- "GlobalSettingTitle": "左菜单默认打开",
- "UserSettingTitle": "开启左边的报表菜单"
- }
-} \ No newline at end of file
diff --git a/plugins/LeftMenu/stylesheets/theme.less b/plugins/LeftMenu/stylesheets/theme.less
deleted file mode 100644
index 6c15ee301e..0000000000
--- a/plugins/LeftMenu/stylesheets/theme.less
+++ /dev/null
@@ -1,150 +0,0 @@
-.leftMenuPlugin {
-
- #container {
- clear: left;
- }
-
- #root .Menu--dashboard {
- border: 0px;
-
- > .Menu-tabList {
- margin-left: 5px;
- margin-bottom: 0;
- margin-top: 0.1em;
- border: 1px solid @theme-color-background-lowContrast;
- }
-
- > li {
- border-bottom: 1px solid @theme-color-background-lowContrast;
- }
- }
-
- #content.home {
- padding-top: 15px;
- display:inline-block;
- width:100%;
- }
-
- .Menu--dashboard {
- padding: 0;
- float: left;
- width: 240px;
- padding-top: 24px;
- clear: left;
-
- > .Menu-tabList {
- -moz-background-size: 5px 100%;
- background-size: 5px 100%;
- background-position: 0 0, 100% 0;
- background-repeat: no-repeat;
-
- > li {
- > ul {
- min-height: 0;
- max-height: 0;
- padding: 0;
- overflow: hidden;
- position: static;
- float: none;
- }
-
- > span,
- > a {
- display: block;
- padding: 5px 10px;
- font-size: 18px;
- line-height: 24px;
- text-decoration: none;
- float: none;
- }
- }
-
- > .sfActive > ul {
- padding-bottom: 5px;
- max-height: 500px; /* That's a hack for CSS transitions */
- }
-
- li {
- list-style: none;
- margin: 0;
- float: none;
- border: 0;
- border-radius: 0;
- background: transparent;
-
- a:hover {
- text-decoration: underline;
- }
-
- li {
- float: none;
- text-align: left;
-
- a {
- text-decoration: none;
- padding: 0.6em 0.9em;
- font: 14px Arial, Helvetica, sans-serif;
- display: block;
-
- &.current {
- background: #defdbb;
- }
-
- &:link,
- &:visited {
- text-decoration: none;
- }
- }
-
- }
- }
-
- a {
- height: auto;
- }
-
- > .sfActive > a,
- > li > a:hover {
- background: #f1f1f1;
- }
-
- > .sfActive .sfHover > a {
- font-weight: bold;
- }
- }
- }
-
- .top_controls {
- clear: none;
- left: 34px;
- }
-
- .nav_sep {
- display: none;
- }
-
- .top_bar_sites_selector {
- float: left;
- }
-
- .pageWrap {
- margin-left: 240px;
- margin-top: 0;
- max-height: none;
- }
-
- .widget:first-child {
- margin-top: 0;
- }
-
- .sites_selector_in_dashboard {
- margin-top: 0px;
- margin-left: 5px;
- }
-
- .sites_autocomplete .custom_select_main_link {
- padding-top: 7px;
- padding-bottom: 7px;
- }
-
-}
diff --git a/plugins/LeftMenu/tests/Integration/APITest.php b/plugins/LeftMenu/tests/Integration/APITest.php
deleted file mode 100644
index c536165905..0000000000
--- a/plugins/LeftMenu/tests/Integration/APITest.php
+++ /dev/null
@@ -1,149 +0,0 @@
-<?php
-/**
- * Piwik - free/libre analytics platform
- *
- * @link http://piwik.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */
-
-namespace Piwik\Plugins\LeftMenu\tests\Integration;
-
-use Piwik\Plugins\LeftMenu\API;
-use Piwik\Plugins\LeftMenu\Settings;
-use Piwik\Tests\Framework\Mock\FakeAccess;
-use Piwik\Tests\Framework\TestCase\IntegrationTestCase;
-
-/**
- * @group LeftMenu
- * @group APITest
- * @group Plugins
- */
-class APITest extends IntegrationTestCase
-{
- /**
- * @var API
- */
- private $api;
-
- /**
- * @var Settings
- */
- private $settings;
-
- public function setUp()
- {
- parent::setUp();
-
- $this->api = API::getInstance();
- $this->createSettings();
- }
-
- public function test_isEnabled_shouldReturnFalse_ByDefault()
- {
- $this->assertLeftMenuIsDisabled();
-
- $this->setUser();
- $this->assertLeftMenuIsDisabled();
-
- $this->setSuperUser();
- $this->assertLeftMenuIsDisabled();
- }
-
- public function test_isEnabled_shouldReturnTrue_IfEnabledSystemWideAndNoUserPreference()
- {
- $this->enableLeftMenuForAll();
-
- $this->assertLeftMenuIsEnabled();
-
- $this->setUser();
- $this->assertLeftMenuIsEnabled();
-
- $this->setAnonymous();
- $this->assertLeftMenuIsEnabled();
- }
-
- public function test_isEnabled_AUserPreferenceShouldOverwriteASystemPreference_DefaultDisabled()
- {
- $this->assertLeftMenuIsDisabled();
-
- $this->setUser();
- $this->setUserSettingValue('yes');
-
- $this->assertLeftMenuIsEnabled();
-
- $this->setAnonymous();
- $this->assertLeftMenuIsDisabled();
- }
-
- public function test_isEnabled_AUserPreferenceShouldOverwriteASystemPreference_DefaultEnabled()
- {
- $this->enableLeftMenuForAll();
-
- $this->assertLeftMenuIsEnabled();
-
- $this->setUser();
- $this->setUserSettingValue('no');
-
- $this->assertLeftMenuIsDisabled();
-
- $this->setAnonymous();
- $this->assertLeftMenuIsEnabled();
- }
-
- private function assertLeftMenuIsEnabled()
- {
- $this->assertTrue($this->api->isEnabled());
- }
-
- private function assertLeftMenuIsDisabled()
- {
- $this->assertFalse($this->api->isEnabled());
- }
-
- private function setSuperUser()
- {
- FakeAccess::$superUser = true;
- FakeAccess::$superUserLogin = 'superUserLogin';
-
- $this->createSettings();
- }
-
- private function setAnonymous()
- {
- FakeAccess::clearAccess();
- $this->createSettings();
- }
-
- private function setUser()
- {
- FakeAccess::$idSitesView = array(1);
- FakeAccess::$identity = 'userLogin';
-
- $this->createSettings();
- }
-
- private function enableLeftMenuForAll()
- {
- $this->setSuperUser();
- $this->settings->globalEnabled->setValue(true);
- $this->settings->save();
- }
-
- private function createSettings()
- {
- $this->settings = new Settings('LeftMenu');
- }
-
- private function setUserSettingValue($value)
- {
- $this->settings->userEnabled->setValue($value);
- $this->settings->save();
- }
-
- public function provideContainerConfig()
- {
- return array(
- 'Piwik\Access' => new FakeAccess()
- );
- }
-}
diff --git a/plugins/Morpheus/Menu.php b/plugins/Morpheus/Menu.php
index 740263e381..2ba349a302 100644
--- a/plugins/Morpheus/Menu.php
+++ b/plugins/Morpheus/Menu.php
@@ -10,6 +10,7 @@ namespace Piwik\Plugins\Morpheus;
use Piwik\Development;
use Piwik\Menu\MenuAdmin;
+use Piwik\Menu\MenuReporting;
use Piwik\Menu\MenuUser;
use Piwik\Piwik;
@@ -17,14 +18,35 @@ class Menu extends \Piwik\Plugin\Menu
{
public function configureAdminMenu(MenuAdmin $menu)
{
+ $menu->registerMenuIcon('CoreAdminHome_MenuDevelopment', 'icon-admin-development');
+ $menu->registerMenuIcon('CoreAdminHome_MenuDiagnostic', 'icon-admin-diagnostic');
+ $menu->registerMenuIcon('CorePluginsAdmin_MenuPlatform', 'icon-admin-platform');
+ $menu->registerMenuIcon('General_Settings', 'icon-admin-settings');
+ $menu->registerMenuIcon('CoreAdminHome_Administration', 'icon-admin-administration');
+
if (Development::isEnabled() && Piwik::isUserHasSomeAdminAccess()) {
$menu->addDevelopmentItem('UI Demo', $this->urlForAction('demo'));
}
}
+
public function configureUserMenu(MenuUser $menu)
{
+ $menu->registerMenuIcon('UsersManager_MenuPersonal', 'icon-user-personal');
+ $menu->registerMenuIcon('CoreAdminHome_MenuManage', 'icon-user-manage');
+ $menu->registerMenuIcon('CorePluginsAdmin_MenuPlatform', 'icon-user-platform');
+
if (Development::isEnabled() && Piwik::isUserHasSomeAdminAccess()) {
$menu->addPlatformItem('UI Demo', $this->urlForAction('demo'), $order = 15);
}
}
+
+ public function configureReportingMenu(MenuReporting $menu)
+ {
+ $menu->registerMenuIcon('General_Visitors', 'icon-reporting-visitors');
+ $menu->registerMenuIcon('General_Actions', 'icon-reporting-actions');
+ $menu->registerMenuIcon('Referrers_Referrers', 'icon-reporting-referer');
+ $menu->registerMenuIcon('Goals_Goals', 'icon-reporting-goal');
+ $menu->registerMenuIcon('Goals_Ecommerce', 'icon-reporting-ecommerce');
+ $menu->registerMenuIcon('Dashboard_Dashboard', 'icon-reporting-dashboard');
+ }
}
diff --git a/plugins/Morpheus/fonts/piwik.eot b/plugins/Morpheus/fonts/piwik.eot
index bd41afad9e..3bda40841a 100644..100755
--- a/plugins/Morpheus/fonts/piwik.eot
+++ b/plugins/Morpheus/fonts/piwik.eot
Binary files differ
diff --git a/plugins/Morpheus/fonts/piwik.ttf b/plugins/Morpheus/fonts/piwik.ttf
index c81d69e10c..7887145303 100644..100755
--- a/plugins/Morpheus/fonts/piwik.ttf
+++ b/plugins/Morpheus/fonts/piwik.ttf
Binary files differ
diff --git a/plugins/Morpheus/images/logo.svg b/plugins/Morpheus/images/logo.svg
index d288e2072e..8c0be81ce9 100644
--- a/plugins/Morpheus/images/logo.svg
+++ b/plugins/Morpheus/images/logo.svg
@@ -3,22 +3,22 @@
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="170.666px" height="45.704px" viewBox="0 0 170.666 45.704" enable-background="new 0 0 170.666 45.704"
xml:space="preserve">
-<path fill="#D42A1F" d="M106.995,1.016c-2.57-0.739-5.251,0.751-5.987,3.329l-5.532,19.351L89.943,4.345
+<path fill="#d4291f" d="M106.995,1.016c-2.57-0.739-5.251,0.751-5.987,3.329l-5.532,19.351L89.943,4.345
c-0.592-2.071-2.441-3.417-4.477-3.492c-0.103-0.009-0.203-0.004-0.306-0.007c-0.102,0.003-0.203-0.003-0.306,0.007
c-2.036,0.075-3.885,1.421-4.477,3.492l-5.509,19.27l-5.509-19.27c-0.737-2.578-3.418-4.068-5.987-3.329
c-2.57,0.739-4.056,3.428-3.319,6.005l10.075,35.24c0.583,2.038,2.384,3.376,4.382,3.49c0.121,0.011,0.239,0.006,0.359,0.008
c0.12-0.002,0.238,0.004,0.359-0.008c1.998-0.114,3.799-1.451,4.382-3.49l5.551-19.416l5.551,19.416
c0.588,2.056,2.416,3.398,4.434,3.491c0.111,0.01,0.219,0.005,0.33,0.007c0.11-0.003,0.219,0.003,0.33-0.007
c2.019-0.093,3.846-1.435,4.434-3.491l10.075-35.24C111.05,4.444,109.564,1.756,106.995,1.016z"/>
-<path fill="#D42A1F" d="M116.502,40.44c0,2.972,2.35,5.322,5.322,5.322c2.972,0,5.322-2.35,5.322-5.322V6.147
+<path fill="#d4291f" d="M116.502,40.44c0,2.972,2.35,5.322,5.322,5.322c2.972,0,5.322-2.35,5.322-5.322V6.147
c0-2.972-2.35-5.322-5.322-5.322c-2.972,0-5.322,2.35-5.322,5.322V40.44z"/>
-<path fill="#D42A1F" d="M43.334,40.457c0,2.972,2.35,5.322,5.322,5.322c2.972,0,5.322-2.35,5.322-5.322V6.164
+<path fill="#d4291f" d="M43.334,40.457c0,2.972,2.35,5.322,5.322,5.322c2.972,0,5.322-2.35,5.322-5.322V6.164
c0-2.972-2.35-5.322-5.322-5.322c-2.972,0-5.322,2.35-5.322,5.322V40.457z"/>
-<path fill="#D42A1F" d="M155.406,23.156l13.779-13.779c1.974-1.974,1.974-5.097,0-7.071c-1.974-1.974-5.097-1.974-7.071,0
+<path fill="#d4291f" d="M155.406,23.156l13.779-13.779c1.974-1.974,1.974-5.097,0-7.071c-1.974-1.974-5.097-1.974-7.071,0
l-16.448,16.448V6.147c0-2.972-2.35-5.322-5.322-5.322c-2.972,0-5.322,2.35-5.322,5.322V40.44c0,2.972,2.35,5.322,5.322,5.322
c2.972,0,5.322-2.35,5.322-5.322v-7.544l2.669-2.669l13.618,13.857c1.957,1.992,5.079,2.019,7.071,0.062
c1.992-1.957,2.019-5.079,0.062-7.071L155.406,23.156z"/>
-<path fill="#D42A1F" d="M37.292,16.816c0-8.58-6.787-15.557-15.283-15.9l0.007-0.033H5.322C2.35,0.883,0,3.233,0,6.205v34.177
+<path fill="#d4291f" d="M37.292,16.816c0-8.58-6.787-15.557-15.283-15.9l0.007-0.033H5.322C2.35,0.883,0,3.233,0,6.205v34.177
c0,2.972,2.35,5.322,5.322,5.322c2.972,0,5.322-2.35,5.322-5.322v-7.63h11.371l-0.007-0.036
C30.505,32.372,37.292,25.396,37.292,16.816z M20.296,23.284l0-0.002h-9.651V10.491h9.464c3.535,0,6.401,2.866,6.401,6.401
C26.51,20.364,23.744,23.184,20.296,23.284z"/>
diff --git a/plugins/Morpheus/images/signout.png b/plugins/Morpheus/images/signout.png
new file mode 100644
index 0000000000..2d377ddf98
--- /dev/null
+++ b/plugins/Morpheus/images/signout.png
Binary files differ
diff --git a/plugins/Morpheus/javascripts/piwikHelper.js b/plugins/Morpheus/javascripts/piwikHelper.js
index 163ea90160..f833b9e15f 100644
--- a/plugins/Morpheus/javascripts/piwikHelper.js
+++ b/plugins/Morpheus/javascripts/piwikHelper.js
@@ -125,6 +125,10 @@ var piwikHelper = {
compileAngularComponents: function (selector) {
var $element = $(selector);
+ if (!$element.length) {
+ return;
+ }
+
angular.element(document).injector().invoke(function($compile) {
var scope = angular.element($element).scope();
$compile($element)(scope);
@@ -132,6 +136,18 @@ var piwikHelper = {
},
/**
+ * Detection works currently only for directives defining an isolated scope. Functionality might need to be
+ * extended if needed. Under circumstances you might call this method before calling compileAngularComponents()
+ * to avoid compiling the same element twice.
+ * @param selector
+ */
+ isAlreadyCompiledAngularComponent: function (selector) {
+ var $element = $(selector);
+
+ return ($element.length && $element.hasClass('ng-isolate-scope'));
+ },
+
+ /**
* Displays a Modal dialog. Text will be taken from the DOM node domSelector.
* Given callback handles will be mapped to the buttons having a role attriute
*
diff --git a/plugins/Morpheus/stylesheets/base/colors.less b/plugins/Morpheus/stylesheets/base/colors.less
index 21ac03438d..89ec7ff92d 100644
--- a/plugins/Morpheus/stylesheets/base/colors.less
+++ b/plugins/Morpheus/stylesheets/base/colors.less
@@ -42,4 +42,3 @@
Qualitative data color series inspired from colorbrewer2.org/
next ones could be: #cab2d6 #ffff99 # #b2df8a
*/
-
diff --git a/plugins/Morpheus/stylesheets/base/icons.css b/plugins/Morpheus/stylesheets/base/icons.css
index 3424d8a655..d11c5592e3 100644
--- a/plugins/Morpheus/stylesheets/base/icons.css
+++ b/plugins/Morpheus/stylesheets/base/icons.css
@@ -26,27 +26,15 @@
.icon-alien:before {
content: "\e600";
}
-.icon-add:before {
- content: "\e630";
-}
.icon-annotation:before {
content: "\e601";
}
-.icon-arrow-bottom:before {
- content: "\e63b";
-}
-.icon-arrow-collapsed:before {
- content: "\e60b";
-}
.icon-arrow-left:before {
content: "\e602";
}
.icon-arrow-right:before {
content: "\e603";
}
-.icon-arrow-top:before {
- content: "\e63a";
-}
.icon-business:before {
content: "\e604";
}
@@ -56,24 +44,30 @@
.icon-chart-bar:before {
content: "\e606";
}
-.icon-chart-line:before {
- content: "\e608";
-}
.icon-chart-line-details:before {
content: "\e607";
}
+.icon-chart-line:before {
+ content: "\e608";
+}
.icon-chart-pie:before {
content: "\e609";
}
.icon-close:before {
content: "\e60a";
}
-.icon-code:before {
- content: "\e620";
+.icon-arrow-collapsed:before {
+ content: "\e60b";
}
.icon-configure:before {
content: "\e60c";
}
+.icon-datepicker-arr-l:before {
+ content: "\e60d";
+}
+.icon-datepicker-arr-r:before {
+ content: "\e60e";
+}
.icon-delete:before {
content: "\e60f";
}
@@ -92,9 +86,6 @@
.icon-ecommerce-order:before {
content: "\e614";
}
-.icon-edit:before {
- content: "\e622";
-}
.icon-email:before {
content: "\e615";
}
@@ -110,26 +101,32 @@
.icon-finance:before {
content: "\e619";
}
-.icon-folder:before {
- content: "\e61b";
-}
.icon-folder-charts:before {
content: "\e61a";
}
+.icon-folder:before {
+ content: "\e61b";
+}
.icon-fullscreen:before {
content: "\e61c";
}
.icon-goal:before {
content: "\e61d";
}
+.icon-help-alt:before {
+ content: "\e61e";
+}
.icon-help:before {
content: "\e61f";
}
-.icon-help-alt:before {
- content: "\e61e";
+.icon-code:before {
+ content: "\e620";
}
-.icon-hide:before {
- content: "\e638";
+.icon-warning:before {
+ content: "\e621";
+}
+.icon-edit:before {
+ content: "\e622";
}
.icon-image:before {
content: "\e623";
@@ -140,13 +137,13 @@
.icon-insights:before {
content: "\e625";
}
-.icon-locked:before {
- content: "\e627";
-}
.icon-locked-2:before {
content: "\e626";
}
.icon-locked-3:before {
+ content: "\e627";
+}
+.icon-locked:before {
content: "\e628";
}
.icon-locked-4:before {
@@ -170,12 +167,12 @@
.icon-open-source:before {
content: "\e62f";
}
-.icon-play:before {
- content: "\e643";
-}
.icon-plus:before {
content: "\e630";
}
+.icon-add:before {
+ content: "\e630";
+}
.icon-puzzle:before {
content: "\e631";
}
@@ -191,48 +188,115 @@
.icon-segment:before {
content: "\e635";
}
-.icon-server:before {
- content: "\e637";
+.icon-users:before {
+ content: "\e635";
}
.icon-server-alt:before {
content: "\e636";
}
+.icon-server:before {
+ content: "\e637";
+}
+.icon-hide:before {
+ content: "\e638";
+}
.icon-show:before {
content: "\e639";
}
+.icon-arrow-top:before {
+ content: "\e63a";
+}
+.icon-arrow-bottom:before {
+ content: "\e63b";
+}
.icon-star:before {
content: "\e63c";
}
.icon-success:before {
content: "\e63d";
}
-.icon-table:before {
- content: "\e63f";
-}
.icon-table-more:before {
content: "\e63e";
}
+.icon-table:before {
+ content: "\e63f";
+}
.icon-tag-cloud:before {
content: "\e640";
}
-.icon-user:before {
- content: "\e642";
-}
.icon-user-add:before {
content: "\e641";
}
-.icon-users:before {
- content: "\e635";
+.icon-user:before {
+ content: "\e642";
+}
+.icon-play:before {
+ content: "\e643";
}
.icon-visitor-profile:before {
content: "\e644";
}
-.icon-warning:before {
- content: "\e621";
-}
.icon-zoom-in:before {
content: "\e645";
}
.icon-zoom-out:before {
content: "\e646";
}
+.icon-sign-out:before {
+ content: "\e647";
+}
+.icon-sign-in:before {
+ content: "\e648";
+}
+.icon-menu-hamburger:before {
+ content: "\e649";
+}
+.icon-more-horiz:before {
+ content: "\e64a";
+}
+.icon-more-verti:before {
+ content: "\e64b";
+}
+.icon-admin-administration:before {
+ content: "\e64c";
+}
+.icon-admin-development:before {
+ content: "\e64d";
+}
+.icon-admin-diagnostic:before {
+ content: "\e64e";
+}
+.icon-admin-platform:before {
+ content: "\e64f";
+}
+.icon-admin-settings:before {
+ content: "\e650";
+}
+.icon-reporting-actions:before {
+ content: "\e651";
+}
+.icon-reporting-dashboard:before {
+ content: "\e652";
+}
+.icon-reporting-ecommerce:before {
+ content: "\e653";
+}
+.icon-reporting-goal:before {
+ content: "\e654";
+}
+.icon-reporting-referer:before {
+ content: "\e655";
+}
+.icon-reporting-visitors:before {
+ content: "\e656";
+}
+.icon-user-manage:before {
+ content: "\e657";
+}
+.icon-user-personal:before {
+ content: "\e658";
+}
+.icon-user-platform:before {
+ content: "\e659";
+}
+
diff --git a/plugins/Morpheus/stylesheets/base/mixins.less b/plugins/Morpheus/stylesheets/base/mixins.less
index 88ac7d0c4d..f772e6f2aa 100644
--- a/plugins/Morpheus/stylesheets/base/mixins.less
+++ b/plugins/Morpheus/stylesheets/base/mixins.less
@@ -3,7 +3,7 @@
&:after {
content: "";
display: table;
- clear: both;
+ clear: right;
}
&:before {
content: "";
diff --git a/plugins/Morpheus/stylesheets/general/_admin.less b/plugins/Morpheus/stylesheets/general/_admin.less
index 1f81d7797f..c0f34c5e2d 100644
--- a/plugins/Morpheus/stylesheets/general/_admin.less
+++ b/plugins/Morpheus/stylesheets/general/_admin.less
@@ -1,39 +1,3 @@
-.Menu--admin {
- .Menu-tabList {
- .border-radius(0px);
- border-color: @theme-color-background-lowContrast;
- background-image: none;
- padding-left: 0;
- border-top: 0;
- > li:first-child span {
- border-bottom: 3px solid @theme-color-brand;
- }
- > li {
- padding-bottom: 0px;
- > span {
- color: @theme-color-text;
- .font-default(18px, 26px);
- border-top: 1px solid @theme-color-background-lowContrast;
- border-bottom: 1px solid @theme-color-background-lowContrast;
- padding: 12px 15px;
- }
- ul {
- background-color: @theme-color-menu-contrast-background;
-
- li {
- a {
- color: @theme-color-text-lighter !important;
- padding: 0.8em 1.1em;
- &:hover {
- color: @theme-color-text;
- text-decoration: none;
- }
- }
- }
- }
- }
- }
-}
.ui-state-highlight {
border-color: @color-silver-l80 !important;
@@ -52,26 +16,12 @@
cursor: pointer;
min-height: 30px;
}
-
- .sites_autocomplete {
- position: static !important;
- }
}
.sites_autocomplete {
vertical-align: middle;
}
-#loadingError {
- color: @theme-color-brand;
- font-weight: normal;
-}
-
-.sites_autocomplete .custom_select .custom_select_block .custom_select_container .custom_select_ul_list {
- margin-top: 5px;
- padding-bottom: 0;
-}
-
.adminTable a {
color: @theme-color-link;
}
diff --git a/plugins/Morpheus/stylesheets/general/_forms.less b/plugins/Morpheus/stylesheets/general/_forms.less
index 49c5358f1d..dcbe261807 100644
--- a/plugins/Morpheus/stylesheets/general/_forms.less
+++ b/plugins/Morpheus/stylesheets/general/_forms.less
@@ -139,6 +139,7 @@ select {
}
.top_bar_sites_selector {
+ z-index: 143;
.sites_autocomplete .custom_select {
z-index: 139;
}
@@ -148,30 +149,6 @@ select {
input {
min-height: 0;
}
- .custom_select {
- border-color: @theme-color-background-lowContrast;
- .border-radius(0px);
- background: @theme-color-background-base;
- padding: 0;
- color: @theme-color-text;
- text-transform: uppercase;
- .font-default(10px, 12px);
- min-height: 30px;
- .box-sizing(border-box);
- a {
- color: @theme-color-text;
- &:hover {
- text-decoration: none;
- }
- }
- .custom_select_block {
- .custom_select_container {
- .custom_select_ul_list {
- margin-top: 20px;
- }
- }
- }
- }
}
.ajaxError {
@@ -184,19 +161,6 @@ select {
font-weight: normal;
}
-.sites_autocomplete--dropdown {
- .custom_select_main_link:not(.loading):before {
- color: @theme-color-brand;
- font-size: 0.7em;
- top: 4px;
- right: 10px;
- content: '';
- border-left: 4px solid transparent;
- border-right: 4px solid transparent;
- border-top: 5px solid @theme-color-brand;
- }
-}
-
.limitSelection {
> ul {
position: relative;
diff --git a/plugins/Morpheus/stylesheets/ieonly.css b/plugins/Morpheus/stylesheets/ieonly.css
index 234631ce71..45523c856a 100644
--- a/plugins/Morpheus/stylesheets/ieonly.css
+++ b/plugins/Morpheus/stylesheets/ieonly.css
@@ -11,14 +11,10 @@
overflow: hidden;
}
-#topBars {
+#topLeftBar {
z-index: 300!important;
}
-.sites_autocomplete, .sites_autocomplete .custom_select {
- z-index: 200!important;
-}
-
.submit {
height: 30px;
}
diff --git a/plugins/Morpheus/stylesheets/main.less b/plugins/Morpheus/stylesheets/main.less
index 699fb1d159..d1ffac5d52 100644
--- a/plugins/Morpheus/stylesheets/main.less
+++ b/plugins/Morpheus/stylesheets/main.less
@@ -72,110 +72,6 @@ table.entityTable tr td a:hover {
#root {
margin: 0 0 100px 0;
padding: 0;
-
- #header {
- margin: 0 15px;
- #topBars {
- a {
- color: @theme-color-link;
- text-decoration: none;
- }
- }
-
- .topBarElem {
- padding: 0 3px;
- color: @theme-color-text-lighter;
- strong {
- font-weight: normal;
- color: @theme-color-text;
- }
- }
- }
-
- .top_bar_sites_selector {
- margin-right: 10px;
- label {
- padding-top: 9px;
- .font-default(13px, 15px);
- }
- }
-
- .Menu--dashboard {
- border-top: 1px solid @theme-color-background-lowContrast;
- border-bottom: 0px;
- > .Menu-tabList {
- margin: 0;
- a {
- .font-default(18px, 22px);
- padding: 14px 28px 11px;
- }
- > li {
- .border-radius(0px);
- border: 0;
- background: none;
- border-right: 1px solid @theme-color-background-lowContrast;
- margin-bottom: -1px;
- border-bottom: 0px;
-
- > ul {
- li {
- a {
- color: @theme-color-menu-contrast-text;
- .font-default(15px, 18px);
- padding: 14px 22px 11px;
- }
-
- &:hover,
- &.sfHover {
- a {
- color: @theme-color-menu-contrast-textActive;
- font-weight: normal;
- }
-
- }
- }
- }
-
- &.sfActive {
- > a {
- color: @theme-color-text;
- text-decoration: none;
- position: relative;
- &:after {
- content: '';
- position: absolute;
- bottom: -3px;
- left: 0;
- width: 100%;
- height: 4px;
- background: @theme-color-brand;
- }
- }
-
- }
-
- &.sfHover {
- > a {
- border: 0;
- text-decoration: none;
- color: @theme-color-text;
- }
- }
- }
- }
- }
-
- .nav_sep {
- background: @theme-color-menu-contrast-background;
- min-height: 57px;
- .border-radius(0px);
- border-color: @theme-color-background-lowContrast !important;
- border-top: 0px !important;
- border-right: 0px !important;
- border-left: 0px !important;
- box-shadow: inset 0 2px 4px #d8d8d8;
- }
-
.widgetize {
width: auto;
}
@@ -186,9 +82,7 @@ table.entityTable tr td a:hover {
border: 1px solid @theme-color-background-lowContrast;
background: @theme-color-background-base;
z-index: 10;
- padding: 8px 10px 8px 10px;
.border-radius(0px);
- .font-default(10px, 12px);
> span {
position: relative;
background: none;
@@ -197,15 +91,16 @@ table.entityTable tr td a:hover {
content: '';
border-left: 4px solid transparent;
border-right: 4px solid transparent;
- border-top: 5px solid @theme-color-brand;
+ border-top: 5px solid @color-silver-l20;
position: absolute;
top: 3px;
- right: 0;
+ right: 7px;
}
}
ul.submenu {
margin-left: 0;
+ padding-right: 0;
li {
list-style-type: none;
> div {
@@ -236,24 +131,15 @@ table.entityTable tr td a:hover {
.segmentEditorPanel {
border: 1px solid @theme-color-background-lowContrast;
background: @theme-color-background-base;
- padding: 8px 10px 8px 10px;
.border-radius(0px);
- .segmentationTitle {
- background: url(plugins/Morpheus/images/segment-users.png) no-repeat right 0;
- text-transform: uppercase;
- .font-default(10px, 12px);
- position: relative;
- }
.dropdown-body {
background:@theme-color-background-base;
- padding:0 10px;
+ padding: 8px 19px 0;
.border-radius(0px);
- border: 1px solid @color-silver-l80;
border-top-width: 0px;
}
&:hover .dropdown-body {
background:@theme-color-background-base;
- border-color: @color-silver-l80;
}
.segmentationContainer {
> span > strong {
@@ -299,32 +185,37 @@ table.entityTable tr td a:hover {
/* Iframed Embed dashboard style */
#standalone {
- #Dashboard:hover ul {
- background: #f1f0eb;
- border-color: #a9a399;
- }
-
#Dashboard {
- ul {
+ position: relative;
- background: @theme-color-background-base;
- border: 1px solid @color-silver-l80;
- padding: 8px 10px 8px 10px;
+ &:hover ul {
+ background-color: @theme-color-background-base;
+ }
+ ul {
+ padding: 0 19px;
color: @theme-color-text-light;
- height: 30px;
+ min-height: 33px;
line-height:0.5em;
.border-radius(0px);
+ border: 0;
+ background-color: @theme-color-background-base;
+ }
+ > ul > li {
+ white-space: nowrap;
+ margin-right: 0px;
+ a {
+ padding-left: 0;
+ }
+ &.sfActive {
+ a {
+ color: @theme-color-menu-contrast-textActive;
+ }
+ }
}
> ul > li:hover,
- > ul > li:hover a,
- > ul > li.sfHover,
- > ul > li.sfHover a {
+ > ul > li:hover a {
color: @theme-color-brand;
}
- > ul > li.sfHover,
- > ul > li.sfHover a {
- font-weight: normal;
- }
}
}
@@ -865,7 +756,7 @@ div.sparkline {
#piwik-promo-share {
border: 0px;
- background: #f2f2f2;
+ background: @theme-color-background-tinyContrast;
.font-default(10px, 16px);
}
@@ -877,15 +768,11 @@ tr:hover #token_auth {
background: #FFFFF7;
}
-// previous style overrides
-#header_message a {
+#header_message .dropdown a,
+#header_message #updateCheckLinkContainer:hover {
text-decoration: underline;
}
-#header_message a:hover {
- text-decoration: none;
-}
-
#multisites table.dataTable {
tfoot tr:hover td {
background: @theme-color-background-base;
diff --git a/plugins/Morpheus/stylesheets/theme.less b/plugins/Morpheus/stylesheets/theme.less
index 371b501830..97eb216d2f 100644
--- a/plugins/Morpheus/stylesheets/theme.less
+++ b/plugins/Morpheus/stylesheets/theme.less
@@ -12,8 +12,8 @@
@theme-color-link: @color-blue-piwik;
@theme-color-base-series: #ee3024;
-@theme-color-menu-contrast-text: @theme-color-text-lighter;
-@theme-color-menu-contrast-textActive: @theme-color-text;
+@theme-color-menu-contrast-text: @theme-color-text;
+@theme-color-menu-contrast-textActive: @theme-color-brand;
@theme-color-menu-contrast-background: @theme-color-background-tinyContrast;
@theme-color-widget-title-text: @theme-color-text;
diff --git a/plugins/Morpheus/stylesheets/ui/_components.less b/plugins/Morpheus/stylesheets/ui/_components.less
index e9e9b8bc46..630fda6fa6 100644
--- a/plugins/Morpheus/stylesheets/ui/_components.less
+++ b/plugins/Morpheus/stylesheets/ui/_components.less
@@ -45,20 +45,15 @@
.segment-element {
background: @color-white;
border-color: @color-silver-l80;
+ line-height: 1.33;
.segment-add-row {
.border-radius(5px);
}
- .segment-nav {
- h4.visits {
- background: url('plugins/Morpheus/images/segment-users.png') no-repeat 3px 0px;
- }
- }
-
.custom_select_search {
input {
- margin-top: -10px;
+ margin-top: 1px;
}
}
@@ -96,13 +91,13 @@
li {
padding: 3px 0;
&:hover {
- background: #f2f2f2;
+ background: @theme-color-background-tinyContrast;
border: 0;
padding: 4px 0 3px;
a {
border: 0;
- background-color: #f2f2f2;
+ background-color: @theme-color-background-tinyContrast;
padding-right: 15px;
}
@@ -129,11 +124,13 @@
}
a.dropdown {
+ display: inline;
color: @theme-color-text;
background: url('plugins/Morpheus/images/sort_subtable_desc.png') 100% -2px no-repeat;
&.ui-autocomplete-input {
background-position: 100% -2px;
}
+ .font-default(10px, 12px);
}
}
.segment-footer {
@@ -155,25 +152,12 @@
}
#periodString {
- border: 1px solid @theme-color-background-lowContrast;
- .border-radius(0px);
- background: @theme-color-background-base;
- &:hover {
- background: @theme-color-background-base;
- border-color: @color-silver-l80;
- }
-
select {
min-height: 0;
background-position: 140%;
padding-left: 5px;
}
- .calendar-icon {
- width: 17px;
- height: 17px;
- }
-
label.selected-period-label {
text-decoration: none !important;
}
@@ -191,34 +175,17 @@
}
}
}
-
- #date {
- .border-radius(0px);
- padding: 8px 10px;
- color: @theme-color-text-lighter;
- text-transform: uppercase;
- .font-default(10px, 12px);
-
- strong {
- color: @theme-color-text;
-
- }
- }
}
#header_message {
- border: 1px solid @theme-color-background-lowContrast;
- padding: 8px 10px 8px 10px;
height: auto;
- background: @theme-color-background-base;
.border-radius(0px);
- .header_short {
- .font-default(10px, 12px);
- text-transform: uppercase;
- }
- .header_full {
- .font-default(12px, 18px);
+ &.isPiwikDemo {
+ text-align: right;
+ position: absolute;
+ right: 0;
+ top: 8px;
}
}
@@ -235,7 +202,7 @@
.loadingPiwikBelow,
.loadingPiwik {
- .font-default(10px, 12px);
+ .font-default(13px, 13px);
color: @color-silver-l60;
font-weight: normal;
}
@@ -256,7 +223,7 @@
.border-radius(6px);
h2 {
- background: #f2f2f2;
+ background: @theme-color-background-tinyContrast;
border-bottom: 1px solid @color-gray;
padding: 11px 15px 10px;
}
diff --git a/plugins/Morpheus/stylesheets/uibase/_header.less b/plugins/Morpheus/stylesheets/uibase/_header.less
index b96b1b467a..25ba8be9ff 100644
--- a/plugins/Morpheus/stylesheets/uibase/_header.less
+++ b/plugins/Morpheus/stylesheets/uibase/_header.less
@@ -1,24 +1,14 @@
-#header {
- min-height: 60px;
-}
-
-/* Clear fix */
-#header:after {
- display: table;
- clear: both;
- content: "";
-}
#root {
#logo {
- padding: 5px 0 0;
+ padding: 9px 0 0 4px;
float: left;
}
#logo {
img.default-piwik-logo {
width: 82px;
- margin-top: 14px;
+ margin-top: 8px;
}
img {
@@ -53,23 +43,3 @@
padding: 15px;
clear: both;
}
-
-#topBars {
- right: 0px;
- position: absolute;
- padding-left: 110px;
- color: #acacac;
- margin: 4px 10px 8px;
- font-size: 13px;
- z-index: 140;
-}
-
-#topRightBar {
- margin-bottom: 4px;
- float: right;
-}
-
-.topBarElem {
- padding: 0 5px;
- display: inline-block;
-}
diff --git a/plugins/Morpheus/stylesheets/uibase/_headerMessage.less b/plugins/Morpheus/stylesheets/uibase/_headerMessage.less
index 41cdc726b9..1922c721a8 100644
--- a/plugins/Morpheus/stylesheets/uibase/_headerMessage.less
+++ b/plugins/Morpheus/stylesheets/uibase/_headerMessage.less
@@ -2,15 +2,21 @@
#header_message {
z-index: 0;
cursor: default;
- position: absolute;
- right: 0px;
+ float: right;
overflow: hidden;
display: block;
height: 20px;
- line-height: 20px;
- padding: 5px 8px 5px 38px;
font-size: 14px;
border-radius: 4px;
+
+ &.update_available .title {
+ color: #CA8100;
+ font-weight: bold;
+ }
+
+ .icon-warning {
+ padding-left: 2px;
+ }
}
#header_message:hover,
@@ -44,24 +50,6 @@
line-height: 1.7em;
}
-/* Orange alerts box */
-.header_alert {
- background: #FFFDF7 url(plugins/Morpheus/images/ico_alert.png) no-repeat 7px 4px;
- border: 1px solid #FF7F00;
- font-weight: bold;
-}
-
-.header_alert,
-.header_alert a {
- color: #FF7F00;
-}
-
-/* Blue info box */
-.header_info {
- background: #FAFAFA url(plugins/Morpheus/images/ico_info.png) no-repeat 7px 4px;
- border: 1px solid #CBD9EB;
-}
-
.header_info, .header_info a {
color: @theme-color-text-light;
}
diff --git a/plugins/Morpheus/stylesheets/uibase/_languageSelect.less b/plugins/Morpheus/stylesheets/uibase/_languageSelect.less
index 032516350e..d0a0add9ce 100644
--- a/plugins/Morpheus/stylesheets/uibase/_languageSelect.less
+++ b/plugins/Morpheus/stylesheets/uibase/_languageSelect.less
@@ -4,4 +4,17 @@
.items {
margin-left: -50px;
}
+}
+
+#topRightBar .navbar-right .languageSelection {
+ // make padding of language selection clickable
+ margin: -14px -12px;
+
+ .title {
+ padding: 14px 12px;
+ &:after {
+ top: 19px;
+ right: -3px;
+ }
+ }
} \ No newline at end of file
diff --git a/plugins/Morpheus/stylesheets/uibase/_loading.less b/plugins/Morpheus/stylesheets/uibase/_loading.less
index e68d0f0a69..e57e3d0a6d 100644
--- a/plugins/Morpheus/stylesheets/uibase/_loading.less
+++ b/plugins/Morpheus/stylesheets/uibase/_loading.less
@@ -9,17 +9,16 @@
}
.loadingSegment {
- color: grey;
- font-size: 10pt;
+ color: @color-silver-l60;
+ font-size: 13px;
margin-left: 28px;
display:none;
}
#loadingError {
- font-weight: bold;
- font-size: 1.1em;
- color: #F88D22;
- padding: 0.5em;
+ font-size: 15px;
+ padding: 8px 0;
display: none;
- padding-top: 40px;
+ color: @theme-color-brand;
+ font-weight: normal;
} \ No newline at end of file
diff --git a/plugins/Morpheus/stylesheets/uibase/_periodSelect.less b/plugins/Morpheus/stylesheets/uibase/_periodSelect.less
index 767a2a70a1..83c21f7999 100644
--- a/plugins/Morpheus/stylesheets/uibase/_periodSelect.less
+++ b/plugins/Morpheus/stylesheets/uibase/_periodSelect.less
@@ -3,8 +3,6 @@
color: @theme-color-text-light;
font-size: 14px;
border: 1px solid #e4e5e4;
- padding: 5px 30px 6px 10px;
- border-radius: 4px;
float: left;
margin-right: 10px;
position: absolute;
@@ -22,23 +20,12 @@
height: 15px;
display:inline-block;
position:absolute;
- right:9px;
- top:7px;
+ right: 19px;
+ top: 9px;
background: url("plugins/Morpheus/images/icon-calendar.gif") no-repeat scroll;
cursor:pointer;
}
-#periodString #date{
- cursor:pointer;
- padding:5px 10px 6px 10px;
- margin:-5px -10px -6px -10px;
-}
-
-#periodString #date img {
- vertical-align: middle;
- margin: 0 0 0 6px;
-}
-
#periodString strong {
color: #255792;
}
@@ -49,8 +36,6 @@
}
#periodMore {
- padding: 6px 0 0 0;
- display: none;
overflow: hidden;
}
@@ -62,7 +47,7 @@
#periodString .period-type {
float: left;
- padding: 0 20px 0 0;
+ padding: 0;
}
#periodString .period-type label {
diff --git a/plugins/Morpheus/templates/admin.twig b/plugins/Morpheus/templates/admin.twig
index c51e3d378c..7ebadaad09 100644
--- a/plugins/Morpheus/templates/admin.twig
+++ b/plugins/Morpheus/templates/admin.twig
@@ -22,27 +22,37 @@
{{ ajax.requestErrorDiv(emailSuperUser|default('')) }}
{{ postEvent("Template.beforeContent", "admin", currentModule) }}
- <div id="container">
+ <div class="page">
{% if showMenu is not defined or showMenu %}
- {% include "@CoreAdminHome/_menu.twig" %}
+ {% import '@CoreHome/_menu.twig' as menu %}
+ {{ menu.menu(adminMenu, false, 'Menu--admin') }}
{% endif %}
- <div id="content" class="admin">
+ <div class="pageWrap">
- {% include "@CoreHome/_headerMessage.twig" %}
- {% include "@CoreHome/_notifications.twig" %}
+ <div class="top_controls">
+ {% block topcontrols %}
+ {% endblock %}
- <div class="ui-confirm" id="alert">
- <h2></h2>
- <input role="no" type="button" value="{{ 'General_Ok'|translate }}"/>
+ {% include "@CoreHome/_headerMessage.twig" %}
</div>
- {% include "@CoreHome/_warningInvalidHost.twig" %}
+ <div class="admin" id="content">
+ {% include "@CoreHome/_notifications.twig" %}
+ {% include "@CoreHome/_warningInvalidHost.twig" %}
- {% block content %}
- {% endblock %}
+ <div class="ui-confirm" id="alert">
+ <h2></h2>
+ <input role="no" type="button" value="{{ 'General_Ok'|translate }}"/>
+ </div>
+ {% block content %}
+ {% endblock %}
+
+ </div>
</div>
</div>
+
+
{% endblock %}
diff --git a/plugins/Morpheus/templates/dashboard.twig b/plugins/Morpheus/templates/dashboard.twig
index 08230e0e9b..afccc7bd4c 100644
--- a/plugins/Morpheus/templates/dashboard.twig
+++ b/plugins/Morpheus/templates/dashboard.twig
@@ -23,10 +23,6 @@
{% include "@CoreHome/_warningInvalidHost.twig" %}
{% include "@CoreHome/_topScreen.twig" %}
- {% block notification %}
- {% include "@CoreHome/_notifications.twig" %}
- {% endblock %}
-
<div class="ui-confirm" id="alert">
<h2></h2>
<input role="yes" type="button" value="{{ 'General_Ok'|translate }}"/>
@@ -34,6 +30,31 @@
{{ postEvent("Template.beforeContent", "dashboard", currentModule) }}
- {% block content %}
- {% endblock %}
+ <div class="page">
+
+ {% if (menu is defined and menu) %}
+ {% import '@CoreHome/_menu.twig' as menuMacro %}
+ {{ menuMacro.menu(menu, true, 'Menu--dashboard') }}
+ {% endif %}
+
+ <div class="pageWrap">
+
+ <a name="main"></a>
+
+ <div class="top_controls">
+ {% block topcontrols %}
+ {% endblock %}
+ </div>
+
+ {% block notification %}
+ {% include "@CoreHome/_notifications.twig" %}
+ {% endblock %}
+
+ {% block content %}
+ {% endblock %}
+
+ <div class="clear"></div>
+ </div>
+
+ </div>
{% endblock %}
diff --git a/plugins/Morpheus/templates/demo.twig b/plugins/Morpheus/templates/demo.twig
index 0995add8c3..51cdc9e86f 100644
--- a/plugins/Morpheus/templates/demo.twig
+++ b/plugins/Morpheus/templates/demo.twig
@@ -497,6 +497,9 @@
'show',
'hide',
'search',
+ 'menu-hamburger',
+ 'more-horiz',
+ 'more-verti'
],
'Window-Widget': [
'minimise',
@@ -570,6 +573,8 @@
'server-alt',
'tag-cloud',
'play',
+ 'sign-in',
+ 'sign-out'
],
};
diff --git a/plugins/Morpheus/templates/user.twig b/plugins/Morpheus/templates/user.twig
index 416f12e116..d69823db39 100644
--- a/plugins/Morpheus/templates/user.twig
+++ b/plugins/Morpheus/templates/user.twig
@@ -6,7 +6,7 @@
{% block body %}
{% if userIsAnonymous %}
- {% set topMenuModule = 'Feedback' %}
+ {% set topMenuModule = 'ScheduledReports' %}
{% set topMenuAction = 'index' %}
{% else %}
{% if currentModule != 'Feedback' %}
@@ -24,24 +24,33 @@
{{ ajax.requestErrorDiv(emailSuperUser|default('')) }}
{{ postEvent("Template.beforeContent", "user", currentModule) }}
- <div id="container">
+ <div class="page">
{% if showMenu is not defined or showMenu %}
- {% include "@CoreHome/_userMenu.twig" %}
+ {% import '@CoreHome/_menu.twig' as menu %}
+ {{ menu.menu(userMenu, false, 'Menu--admin') }}
{% endif %}
- <div id="content" class="admin user">
+ <div class="pageWrap">
- {% include "@CoreHome/_notifications.twig" %}
-
- <div class="ui-confirm" id="alert">
- <h2></h2>
- <input role="no" type="button" value="{{ 'General_Ok'|translate }}"/>
+ <div class="top_controls">
+ {% block topcontrols %}
+ {% endblock %}
</div>
- {% block content %}
- {% endblock %}
+ <div id="content" class="admin user">
+
+ {% include "@CoreHome/_notifications.twig" %}
+
+ <div class="ui-confirm" id="alert">
+ <h2></h2>
+ <input role="no" type="button" value="{{ 'General_Ok'|translate }}"/>
+ </div>
+ {% block content %}
+ {% endblock %}
+
+ </div>
</div>
</div>
{% endblock %}
diff --git a/plugins/MultiSites/angularjs/dashboard/dashboard.directive.less b/plugins/MultiSites/angularjs/dashboard/dashboard.directive.less
index 99683c088f..a200b3d626 100644
--- a/plugins/MultiSites/angularjs/dashboard/dashboard.directive.less
+++ b/plugins/MultiSites/angularjs/dashboard/dashboard.directive.less
@@ -3,6 +3,12 @@
font-size: 15px;
}
+.widget {
+ #multisites {
+ padding: 15px;
+ }
+}
+
#multisites {
border: 0;
padding: 0 15px;
@@ -10,6 +16,7 @@
h2 {
border-bottom: 0px;
+ font-size: 24px;
}
.notification-error {
@@ -79,10 +86,6 @@
}
}
- .top_controls {
- height: 10px;
- }
-
th:first-child {
text-align:left;
}
diff --git a/plugins/MultiSites/templates/getSitesInfo.twig b/plugins/MultiSites/templates/getSitesInfo.twig
index d1bdb81df0..cca348dfec 100644
--- a/plugins/MultiSites/templates/getSitesInfo.twig
+++ b/plugins/MultiSites/templates/getSitesInfo.twig
@@ -1,14 +1,17 @@
{% extends isWidgetized ? 'empty.twig' : 'dashboard.twig' %}
+{% block topcontrols %}
+ {% if not isWidgetized %}
+ <div class="top_controls">
+ {% include "@CoreHome/_periodSelect.twig" %}
+ {% include "@CoreHome/_headerMessage.twig" %}
+ </div>
+ {% endif %}
+{% endblock %}
+
{% block content %}
-{% if not isWidgetized %}
- <div class="top_controls">
- {% include "@CoreHome/_periodSelect.twig" %}
- {% include "@CoreHome/_headerMessage.twig" %}
- </div>
-{% endif %}
+<div class="container" id="multisites">
-<div class="pageWrap container" id="multisites">
<div id="main">
<div piwik-multisites-dashboard
display-revenue-column="{% if displayRevenueColumn %}true{% else %}false{%endif%}"
diff --git a/plugins/Overlay/stylesheets/overlay.css b/plugins/Overlay/stylesheets/overlay.css
index d3db1a5126..4e30660775 100644
--- a/plugins/Overlay/stylesheets/overlay.css
+++ b/plugins/Overlay/stylesheets/overlay.css
@@ -23,7 +23,7 @@ a#overlayTitle {
font-size: 12px;
text-decoration: none;
color: #4d4d4d;
- margin-left: 15px;
+ margin-left: 10px;
}
a#overlayTitle .icon-help {
margin-left: 4px;
@@ -146,10 +146,16 @@ body .ui-tooltip.overlayTooltip {
font-weight: bold;
}
-#topBars {
+.navbar .navbar-right {
+ display: none;
+}
+
+.top_controls {
display: none;
}
.overlay-sidebar-container {
width: 220px;
+ margin-left: -16px;
+ margin-top: 10px;
}
diff --git a/plugins/ScheduledReports/templates/index.twig b/plugins/ScheduledReports/templates/index.twig
index 65ba2ba53a..542fab8e70 100644
--- a/plugins/ScheduledReports/templates/index.twig
+++ b/plugins/ScheduledReports/templates/index.twig
@@ -1,19 +1,17 @@
{% extends 'user.twig' %}
-
{% set title %}{{ 'ScheduledReports_PersonalEmailReports'|translate }}{% endset %}
+{% block topcontrols %}
+ {% include "@CoreHome/_siteSelectHeader.twig" %}
+ {% include "@CoreHome/_periodSelect.twig" %}
+{% endblock %}
+
{% block content %}
<div class="emailReports">
<h2 piwik-enriched-headline help-url="http://piwik.org/docs/email-reports/">{{ title }}</h2>
- {% include "@CoreHome/_siteSelectHeader.twig" %}
-
- <div class="top_controls">
- {% include "@CoreHome/_periodSelect.twig" %}
- </div>
-
<span id="reportSentSuccess"></span>
<span id="reportUpdatedSuccess"></span>
diff --git a/plugins/SegmentEditor/SegmentSelectorControl.php b/plugins/SegmentEditor/SegmentSelectorControl.php
index 4e88d2191f..e37354e1cd 100644
--- a/plugins/SegmentEditor/SegmentSelectorControl.php
+++ b/plugins/SegmentEditor/SegmentSelectorControl.php
@@ -31,7 +31,7 @@ class SegmentSelectorControl extends UIControl
$this->jsClass = "SegmentSelectorControl";
$this->cssIdentifier = "segmentEditorPanel";
- $this->cssClass = "piwikTopControl";
+ $this->cssClass = "piwikTopControl borderedControl piwikSelector";
$this->idSite = $idSite ?: Common::getRequestVar('idSite', false, 'int');
diff --git a/plugins/SegmentEditor/javascripts/Segmentation.js b/plugins/SegmentEditor/javascripts/Segmentation.js
index f8def3655c..ee1c4b532a 100644
--- a/plugins/SegmentEditor/javascripts/Segmentation.js
+++ b/plugins/SegmentEditor/javascripts/Segmentation.js
@@ -210,7 +210,7 @@ Segmentation = (function($) {
if(!$.browser.mozilla) {
checkSelected = encodeURIComponent(checkSelected);
}
-
+
if( checkSelected == self.currentSegmentStr){
injClass = 'class="segmentSelected"';
}
@@ -258,7 +258,7 @@ Segmentation = (function($) {
var closeAllOpenLists = function() {
$(".segmentationContainer", self.target).each(function() {
- if($(this).closest('.segmentEditorPanel').hasClass("visible"))
+ if($(this).closest('.segmentEditorPanel').hasClass("expanded"))
$(this).trigger("click");
});
};
@@ -370,7 +370,7 @@ Segmentation = (function($) {
var bindEvents = function () {
self.target.on('click', '.segmentationContainer', function (e) {
// hide all other modals connected with this widget
- if (self.content.closest('.segmentEditorPanel').hasClass("visible")) {
+ if (self.content.closest('.segmentEditorPanel').hasClass("expanded")) {
if ($(e.target).hasClass("jspDrag") === true
|| $(e.target).hasClass("segmentFilterContainer") === true
|| $(e.target).parents().hasClass("segmentFilterContainer") === true
@@ -378,12 +378,12 @@ Segmentation = (function($) {
e.stopPropagation();
} else {
self.jscroll.destroy();
- self.target.closest('.segmentEditorPanel').removeClass('visible');
+ self.target.closest('.segmentEditorPanel').removeClass('expanded');
}
} else {
// for each visible segmentationContainer -> trigger click event to close and kill scrollpane - very important !
closeAllOpenLists();
- self.target.closest('.segmentEditorPanel').addClass('visible');
+ self.target.closest('.segmentEditorPanel').addClass('expanded');
self.target.find('.segmentFilter').val(self.translations['General_Search']).trigger('keyup');
self.jscroll = self.target.find(".segmentList").jScrollPane({
autoReinitialise: true,
@@ -1250,7 +1250,7 @@ $(document).ready(function() {
}
if ($(e.target).closest('.segmentListContainer').length === 0
- && self.$element.hasClass("visible")
+ && self.$element.hasClass("expanded")
) {
$(".segmentationContainer", self.$element).trigger("click");
}
@@ -1258,8 +1258,6 @@ $(document).ready(function() {
$('body').on('mouseup', this.onMouseUp);
- // re-initialize top controls since the size of the control is not the same after it's
- // initialized.
initTopControls();
};
diff --git a/plugins/SegmentEditor/stylesheets/segmentation.less b/plugins/SegmentEditor/stylesheets/segmentation.less
index 0109d11836..125a0c9f56 100644
--- a/plugins/SegmentEditor/stylesheets/segmentation.less
+++ b/plugins/SegmentEditor/stylesheets/segmentation.less
@@ -131,11 +131,6 @@ div.scrollable {
padding: 0 0 8px 0;
}
-.segment-element .segment-nav h4.visits {
- padding-left: 28px;
- background: url(plugins/SegmentEditor/images/icon-users.png) 0 0 no-repeat;
-}
-
.segment-element .segment-nav h4 a {
color: #255792;
text-decoration: none;
@@ -403,7 +398,7 @@ div.scrollable {
.segment-element .segment-footer {
background: #eae8e3;
- border-top: 1px solid #a9a399;
+ border-top: 1px solid @theme-color-background-tinyContrast;
text-align: right;
padding: 7px 10px;
margin: 0 -4px -6px -4px;
@@ -430,11 +425,14 @@ div.scrollable {
z-index: 121; /* Should be bigger than 'Dashboard widget selector' (z-index: 120) */
background: #f7f7f7;
border: 1px solid #e4e5e4;
- padding: 5px 10px 6px 10px;
margin-right: 10px;
border-radius: 4px;
color: @theme-color-text-light;
font-size: 14px;
+
+ .segmentListContainer {
+ line-height: 14px;
+ }
}
.top_controls .segmentEditorPanel {
@@ -486,7 +484,6 @@ div.scrollable {
.segmentationContainer ul.submenu {
padding-top: 5px;
display: none;
- float: left;
margin-bottom: 5px;
}
@@ -501,54 +498,53 @@ div.scrollable {
height: 16px;
}
-.segmentEditorPanel.visible .segmentationContainer {
- width: 200px;
+.segmentEditorPanel.expanded .segmentationContainer {
+ width: 240px;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
-.segmentEditorPanel.visible ul.submenu {
- display: block;
+.segmentEditorPanel.expanded ul.submenu {
+ display: inline-block;
list-style: none;
}
.segmentFilterContainer {
- margin-left: -10px;
- margin-right: -10px;
margin-bottom: 10px;
+ display: inline-block;
}
-.segmentEditorPanel.visible .segmentFilterContainer > input[type="text"] {
- font-size: 13px;
- width: 100%;
+.segmentEditorPanel.expanded .segmentFilterContainer > input[type="text"] {
+ font-size: 11px;
+ width: 200px;
padding: 0;
- border: 1px solid #ccc;
- border-width: 1px 0;
+ border: 1px solid #d0d0d0;
+ border-width: 1px;
color: #999;
- padding: 11px 32px 11px 12px;
+ padding: 7px 10px 7px 10px;
}
-.segmentEditorPanel.visible .segmentFilterContainer > span {
+.segmentEditorPanel.expanded .segmentFilterContainer > span {
position: absolute;
width: 13px;
height: 13px;
- right: 12px;
- top: 16px;
+ right: 23px;
+ top: 48px;
cursor: pointer;
}
-.segmentEditorPanel.visible .segmentFilterContainer:hover > span {
+.segmentEditorPanel.expanded .segmentFilterContainer:hover > span {
background: url(plugins/SegmentEditor/images/reset_search.png);
}
-.segmentEditorPanel.visible .filterNoResults {
+.segmentEditorPanel.expanded .filterNoResults {
font-style: italic;
}
-.segmentEditorPanel.visible .add_new_segment {
+.segmentEditorPanel.expanded .add_new_segment {
clear: both;
float: right;
- margin: 12px 0 10px;
+ margin: 12px 9px 10px 0;
}
.segmentationContainer > ul.submenu > li {
@@ -557,14 +553,6 @@ div.scrollable {
cursor: pointer;
}
-span.segmentationTitle {
- background: url(plugins/Morpheus/images/sort_subtable_desc.png) no-repeat right 0;
- padding-right: 20px;
- min-width: 180px;
- display: block;
- cursor: pointer;
-}
-
.segmentList {
max-height: 300px;
margin-top: 5px;
@@ -668,28 +656,26 @@ a.metric_category {
z-index: 1000 !important;
}
+.ui-autocomplete.ui-menu.ui-widget {
+ box-shadow: 0 1px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.2), 0 1px 5px 0 rgba(0,0,0,0.12);
+}
+
@media all and (max-width: 749px) {
span.segmentationTitle,
- .segmentEditorPanel.visible .segmentationContainer {
+ .segmentEditorPanel.expanded .segmentationContainer {
width: auto;
}
}
.dropdown-body {
- position: absolute;
- top: 100%;
- left: -1px;
background-color: #f7f7f7;
- padding: 0px 10px;
- border: 1px solid #e4e5e4;
border-top-width: 0px;
display: none;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
}
-.segmentEditorPanel.visible .dropdown-body {
- display: block;
+.segmentEditorPanel.expanded .dropdown-body {
border-top-left-radius: 0;
border-top-right-radius: 0;
}
@@ -699,7 +685,7 @@ a.metric_category {
background: #f1f0eb
}
-.segmentEditorPanel.visible {
+.segmentEditorPanel.expanded {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
@@ -711,7 +697,8 @@ a.metric_category {
.available_segments {
display: inline-block;
- width: 160px;
+ width: 150px;
+ padding-left: 5px;
}
.segmentationTitle,
@@ -722,7 +709,6 @@ a.metric_category {
white-space: nowrap;
}
-.segmentationTitle,
.segment-element .segment-nav a.dropdown {
max-width: 180px;
}
@@ -731,8 +717,18 @@ a.metric_category {
max-width: 145px;
}
-.segmentEditorPanel.visible .segmentationTitle {
- max-width: 200px;
+.segmentEditorPanel .segmentationTitle {
+ text-overflow: ellipsis;
+ display: inline-block;
+ max-width: 170px;
+}
+
+.segmentEditorPanel a.title {
+ padding-bottom: 8px;
+}
+
+.segmentEditorPanel.expanded .segmentationTitle {
+ max-width: 180px;
overflow: visible; /* restore default */
white-space: normal; /* restore default */
}
diff --git a/plugins/SegmentEditor/templates/_segmentSelector.twig b/plugins/SegmentEditor/templates/_segmentSelector.twig
index d9d9f3fb9d..7a8019d37e 100644
--- a/plugins/SegmentEditor/templates/_segmentSelector.twig
+++ b/plugins/SegmentEditor/templates/_segmentSelector.twig
@@ -1,7 +1,7 @@
<div class="SegmentEditor" style="display:none;">
- <div class="segmentationContainer listHtml">
- <span class="segmentationTitle"></span>
- <div class="dropdown-body">
+ <div class="segmentationContainer listHtml" title="{{ 'SegmentEditor_ChooseASegment'|translate|e('html_attr') }}">
+ <a class="title"><span class="icon icon-segment"></span><span class="segmentationTitle"></span></a>
+ <div class="dropdown dropdown-body">
<div class="segmentFilterContainer">
<input class="segmentFilter" type="text" value="{{ 'General_Search'|translate }}"/>
<span/>
@@ -86,9 +86,10 @@
<a href="#">+ {{ 'SegmentEditor_AddANDorORCondition'|translate(andCondition)|raw }}</a>
</div>
</div>
- <div class="segment-element">
+ <div class="segment-element borderedControl expanded">
<div class="segment-nav">
- <h4 class="visits"><span class="available_segments"><strong>
+ <h4 class="visits">
+ <span class="icon-segment"></span><span class="available_segments"><strong>
<select class="available_segments_select"></select>
</strong></span></h4>
<div class="scrollable">
diff --git a/plugins/SitesManager/stylesheets/SitesManager.less b/plugins/SitesManager/stylesheets/SitesManager.less
index 41d1035bb1..cd3a43f7c8 100644
--- a/plugins/SitesManager/stylesheets/SitesManager.less
+++ b/plugins/SitesManager/stylesheets/SitesManager.less
@@ -104,9 +104,8 @@ td.editable-site-field:hover {
}
.site-without-data {
- padding: 15px;
h2 {
- border-bottom: 1px solid #ccc;
+ border-bottom: 1px solid @theme-color-background-tinyContrast;
margin: 25px 0;
padding: 0 0 5px 0;
font-size: 24px;
diff --git a/plugins/SitesManager/templates/siteWithoutData.twig b/plugins/SitesManager/templates/siteWithoutData.twig
index 20b6326644..eafb7a287f 100644
--- a/plugins/SitesManager/templates/siteWithoutData.twig
+++ b/plugins/SitesManager/templates/siteWithoutData.twig
@@ -2,9 +2,11 @@
{% block notification %}{% endblock %}
-{% block content %}
-
+{% block topcontrols %}
{% include "@CoreHome/_siteSelectHeader.twig" %}
+{% endblock %}
+
+{% block content %}
<div class="site-without-data">
diff --git a/plugins/UserCountryMap/javascripts/realtime-map.js b/plugins/UserCountryMap/javascripts/realtime-map.js
index 6096ce3786..f73259c5e7 100644
--- a/plugins/UserCountryMap/javascripts/realtime-map.js
+++ b/plugins/UserCountryMap/javascripts/realtime-map.js
@@ -57,11 +57,14 @@
},
_initStandaloneMap: function () {
- $('.top_controls').hide();
- $('.Menu--dashboard').on('piwikSwitchPage', function (event, item) {
- var clickedMenuIsNotMap = ($(item).attr('href').indexOf('module=UserCountryMap&action=realtimeWorldMap') == -1);
+ $('#periodString').hide();
+ initTopControls();
+ $('#secondNavBar').on('piwikSwitchPage', function (event, item) {
+ var href = $(item).attr('href');
+ var clickedMenuIsNotMap = (href.indexOf('module=UserCountryMap&action=realtimeWorldMap') == -1);
if (clickedMenuIsNotMap) {
- $('.top_controls').show();
+ $('#periodString').show();
+ initTopControls();
}
});
$('.realTimeMap_overlay').css('top', '0px');
diff --git a/plugins/UserCountryMap/stylesheets/realtime-map.less b/plugins/UserCountryMap/stylesheets/realtime-map.less
index c6c98ffda5..b6dbd8a65b 100644
--- a/plugins/UserCountryMap/stylesheets/realtime-map.less
+++ b/plugins/UserCountryMap/stylesheets/realtime-map.less
@@ -13,6 +13,10 @@
filter: alpha(opacity=3);
}
+.RealTimeMap:focus {
+ outline: none;
+}
+
.RealTimeMap-black {
position: absolute;
right: 0;
diff --git a/plugins/UsersManager/templates/index.twig b/plugins/UsersManager/templates/index.twig
index 8c48ad2f33..e2fb24dc9a 100644
--- a/plugins/UsersManager/templates/index.twig
+++ b/plugins/UsersManager/templates/index.twig
@@ -10,8 +10,6 @@
<section class="sites_selector_container">
<p>{{ 'UsersManager_MainDescription'|translate }}</p>
- <div class="sites_selector_title">{{ 'SitesManager_Sites'|translate }}:</div>
-
{% set applyAllSitesText %}
<strong>{{ 'UsersManager_ApplyToAllWebsites'|translate }}</strong>
{% endset %}
diff --git a/plugins/UsersManager/templates/userSettings.twig b/plugins/UsersManager/templates/userSettings.twig
index b202407a07..57e04dff85 100644
--- a/plugins/UsersManager/templates/userSettings.twig
+++ b/plugins/UsersManager/templates/userSettings.twig
@@ -64,7 +64,7 @@
show-all-sites-item="false"
showselectedsite="true"
id="defaultReportSiteSelector"
- style="position: relative"></div>
+ ></div>
</div>
<div class="form-group">
diff --git a/plugins/Widgetize/Menu.php b/plugins/Widgetize/Menu.php
index f796faf57e..850df3e2da 100644
--- a/plugins/Widgetize/Menu.php
+++ b/plugins/Widgetize/Menu.php
@@ -18,7 +18,6 @@ class Menu extends \Piwik\Plugin\Menu
$tooltip = Piwik::translate('Widgetize_TopLinkTooltip');
$urlParams = $this->urlForAction('index', array('segment' => false));
- $menu->addPlatformItem(null, $urlParams, 50, $tooltip);
$menu->addPlatformItem('General_Widgets', $urlParams, 5, $tooltip);
}
diff --git a/plugins/Widgetize/templates/index.twig b/plugins/Widgetize/templates/index.twig
index 49a2b5f6c1..800c5cafd7 100644
--- a/plugins/Widgetize/templates/index.twig
+++ b/plugins/Widgetize/templates/index.twig
@@ -2,6 +2,11 @@
{% set title %}{{ 'General_Widgets'|translate }}{% endset %}
+{% block topcontrols %}
+ {% include "@CoreHome/_siteSelectHeader.twig" %}
+ {% include "@CoreHome/_periodSelect.twig" %}
+{% endblock %}
+
{% block content %}
<div>
@@ -30,8 +35,6 @@
<h2 piwik-enriched-headline>{{ title }}</h2>
-{% include "@CoreHome/_siteSelectHeader.twig" %}
-
<div class="widgetize">
<p>With Piwik, you can export your Web Analytics reports on your blog, website, or intranet dashboard... in one click.
@@ -59,10 +62,6 @@
<h2>Widgetize reports</h2>
<p>Select a report, and copy paste in your page the embed code below the widget:
- <div class="top_controls">
- {% include "@CoreHome/_periodSelect.twig" %}
- </div>
-
<div id="widgetPreview"></div>
<div id='iframeDivToExport' style='display:none;'></div>
diff --git a/plugins/ZenMode/ZenMode.php b/plugins/ZenMode/ZenMode.php
deleted file mode 100644
index bbacb157c3..0000000000
--- a/plugins/ZenMode/ZenMode.php
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-/**
- * Piwik - free/libre analytics platform
- *
- * @link http://piwik.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- *
- */
-namespace Piwik\Plugins\ZenMode;
-
-/**
- */
-class ZenMode extends \Piwik\Plugin
-{
- /**
- * @see Piwik\Plugin::registerEvents
- */
- public function registerEvents()
- {
- return array(
- 'AssetManager.getJavaScriptFiles' => 'getJsFiles',
- 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles',
- 'Translate.getClientSideTranslationKeys' => 'getClientSideTranslationKeys'
- );
- }
-
- public function getClientSideTranslationKeys(&$translations)
- {
- $translations[] = 'SitesManager_Sites';
- $translations[] = 'General_Reports';
- $translations[] = 'MultiSites_LoadingWebsites';
- $translations[] = 'ZenMode_SearchForAnything';
- $translations[] = 'ZenMode_QuickAccessTitle';
- $translations[] = 'ZenMode_HowToSearch';
- $translations[] = 'ZenMode_HowToToggleZenMode';
- $translations[] = 'ZenMode_Activated';
- }
-
- public function getJsFiles(&$jsFiles)
- {
- $jsFiles[] = "plugins/ZenMode/javascripts/zen-mode.js";
- $jsFiles[] = "plugins/ZenMode/angularjs/quick-access/quick-access.directive.js";
- $jsFiles[] = "plugins/ZenMode/angularjs/zen-mode/zen-mode-switcher.directive.js";
- }
-
- public function getStylesheetFiles(&$stylesheets)
- {
- $stylesheets[] = "plugins/ZenMode/angularjs/quick-access/quick-access.directive.less";
- $stylesheets[] = "plugins/ZenMode/angularjs/zen-mode/zen-mode.less";
- }
-}
diff --git a/plugins/ZenMode/angularjs/quick-access/quick-access.directive.html b/plugins/ZenMode/angularjs/quick-access/quick-access.directive.html
deleted file mode 100644
index efc284d9da..0000000000
--- a/plugins/ZenMode/angularjs/quick-access/quick-access.directive.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<div class="quick-access" title="{{ 'ZenMode_QuickAccessTitle' | translate }}">
- <input ng-keydown="onKeypress($event)"
- ng-change="search(search.term)"
- ng-model="search.term"
- type="text"
- placeholder="{{ 'ZenMode_SearchForAnything' | translate }}"/>
- <ul ng-show="search.term">
- <li class="quick-access-category"
- ng-click="search('menuCategory')">Menu</li>
- <li class="no-result"
- ng-hide="menuItems | length">---</li>
- <li class="result"
- ng-class="{selected: $index == search.index}"
- ng-click="selectMenuItem(entry.index)"
- ng-mouseenter="search.index=$index"
- ng-repeat="entry in menuItems"><a>{{ entry.name | trim }}</a></li>
-
- <li class="quick-access-category"
- ng-click="search('reportCategory')">{{ 'General_Reports' | translate }}</li>
- <li class="no-result"
- ng-hide="reportEntries | length">---</li>
- <li class="result"
- ng-class="{selected: ((menuItems | length) + $index) == search.index}"
- ng-mouseenter="search.index=((menuItems | length) + $index)"
- ng-click="selectMenuItem(report.index)"
- ng-repeat="report in reportEntries"><a>{{ report.name | trim }}</a></li>
-
- <li class="quick-access-category"
- ng-click="search('%')">{{ 'SitesManager_Sites' | translate }}</li>
- <li class="no-result"
- ng-hide="(sitesModel.sites | length) || sitesModel.isLoading">---</li>
- <li class="no-result"
- ng-show="sitesModel.isLoading">{{ 'MultiSites_LoadingWebsites' | translate }}</li>
- <li class="result"
- ng-show="!sitesModel.isLoading"
- ng-mouseenter="search.index=((menuItems | length) + $index + (reportEntries | length))"
- ng-class="{selected: ((menuItems | length) + $index + (reportEntries | length)) == search.index}"
- ng-click="selectSite(site.idsite)"
- ng-repeat="site in sitesModel.sites"><a>{{ site.name | trim }}</a></li>
- </ul>
-</div> \ No newline at end of file
diff --git a/plugins/ZenMode/angularjs/quick-access/quick-access.directive.js b/plugins/ZenMode/angularjs/quick-access/quick-access.directive.js
deleted file mode 100644
index c05fb5fbbc..0000000000
--- a/plugins/ZenMode/angularjs/quick-access/quick-access.directive.js
+++ /dev/null
@@ -1,140 +0,0 @@
-/*!
- * Piwik - free/libre analytics platform
- *
- * @link http://piwik.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */
-
-/**
- * Usage:
- * <div piwik-dialog="showDialog">...</div>
- * Will show dialog once showDialog evaluates to true.
- *
- * Will execute the "executeMyFunction" function in the current scope once the yes button is pressed.
- */
-(function () {
- angular.module('piwikApp').directive('piwikQuickAccess', QuickAccessDirective);
-
- QuickAccessDirective.$inject = ['$rootElement', '$timeout', '$filter', 'siteSelectorModel', 'piwik'];
-
- function QuickAccessDirective ($rootElement, $timeout, $filter, siteSelectorModel, piwik) {
-
- return {
- restrict: 'A',
- replace: true,
- scope: {},
- templateUrl: 'plugins/ZenMode/angularjs/quick-access/quick-access.directive.html?cb=' + piwik.cacheBuster,
- link: function (scope, element, attrs) {
-
- var menuIndex = -1;
- var menuItems = [];
- var reportEntries = [];
-
- scope.reportEntries = [];
- scope.menuItems = [];
- scope.sitesModel = siteSelectorModel;
-
- function getMenuItems()
- {
- if (menuItems && menuItems.length) {
- return menuItems;
- }
-
- $rootElement.find('#topRightBar .topBarElem a').each(function (index, element) {
- menuItems.push({name: $(element).text(), index: ++menuIndex, category: 'menuCategory'});
- $(element).attr('quick_access', menuIndex);
- });
-
- return menuItems;
- }
-
- function getReportEntries()
- {
- if (reportEntries && reportEntries.length) {
- return reportEntries;
- }
-
- $rootElement.find('.Menu-tabList a').each(function (index, element) {
- reportEntries.push({name: $(element).text(), category: 'reportCategory', index: ++menuIndex});
- $(element).attr('quick_access', menuIndex);
- });
-
- return reportEntries;
- }
-
- function highlightPreviousItem()
- {
- if (0 >= (scope.search.index - 1)) {
- scope.search.index = 0;
- } else {
- scope.search.index--;
- }
- }
-
- function highlightNextItem()
- {
- var numTotal = element.find('li.result').length;
-
- if (numTotal <= (scope.search.index + 1)) {
- scope.search.index = numTotal - 1;
- } else {
- scope.search.index++;
- }
- }
-
- function executeMenuItem()
- {
- var results = element.find('li.result');
- if (results && results.length && results[scope.search.index]) {
- var selectedMenuElement = $(results[scope.search.index]);
- $timeout(function () {
- selectedMenuElement.click();
- }, 20);
- }
- }
-
- scope.onKeypress = function (event) {
-
- if (38 == event.which) {
- highlightPreviousItem();
- event.preventDefault();
- } else if (40 == event.which) {
- highlightNextItem();
- event.preventDefault();
- } else if (13 == event.which) {
- executeMenuItem();
- }
- };
-
- scope.search = function (searchTerm) {
- this.search.index = 0;
-
- this.menuItems = $filter('filter')(getMenuItems(), searchTerm);
- this.reportEntries = $filter('filter')(getReportEntries(), searchTerm);
- this.sitesModel.searchSite(searchTerm);
- };
-
- scope.selectSite = function (idsite) {
- this.sitesModel.loadSite(idsite);
- };
-
- scope.selectMenuItem = function (index) {
- var target = $rootElement.find('[quick_access=' + index + ']');
-
- if (target && target.length && target[0]) {
- var actualTarget = target[0];
-
- var href = $(actualTarget).attr('href');
-
- if (href && href.length > 10) {
- actualTarget.click();
- } else {
- $(actualTarget).click();
- }
- }
- };
-
- }
- };
- }
-})(); \ No newline at end of file
diff --git a/plugins/ZenMode/angularjs/quick-access/quick-access.directive.less b/plugins/ZenMode/angularjs/quick-access/quick-access.directive.less
deleted file mode 100644
index 52d29dafa9..0000000000
--- a/plugins/ZenMode/angularjs/quick-access/quick-access.directive.less
+++ /dev/null
@@ -1,20 +0,0 @@
-.quick-access {
- .selected {
- background-color: #f2f2f2 !important;
- }
- .quick-access-category {
- text-align: left !important;
- font-size: 14px;
- padding: 5px;
- cursor: pointer;
- }
- .result {
- cursor: pointer;
- }
- .quick-access-category:hover {
- background: none !important;
- }
- .no-result {
- padding-left: 27px;
- }
-} \ No newline at end of file
diff --git a/plugins/ZenMode/angularjs/zen-mode/zen-mode-switcher.directive.js b/plugins/ZenMode/angularjs/zen-mode/zen-mode-switcher.directive.js
deleted file mode 100644
index 36ac43a39a..0000000000
--- a/plugins/ZenMode/angularjs/zen-mode/zen-mode-switcher.directive.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/*!
- * Piwik - free/libre analytics platform
- *
- * @link http://piwik.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */
-
-/**
- * Usage:
- * <div piwik-zen-mode-switcher>...</div>
- * Will toggle the zen mode on click on this element.
- */
-(function () {
- angular.module('piwikApp').directive('piwikZenModeSwitcher', piwikZenModeSwitcher);
-
- piwikZenModeSwitcher.$inject = ['$rootElement', '$filter'];
-
- function piwikZenModeSwitcher($rootElement, $filter) {
-
- function showZenModeIsActivatedNotification() {
- var howToSearch = $filter('translate')('ZenMode_HowToSearch');
- var howToToggle = $filter('translate')('ZenMode_HowToToggleZenMode');
- var activated = $filter('translate')('ZenMode_Activated');
-
- var message = '<ul><li>' + howToSearch + '</li><li>' + howToToggle + '</li></ul>';
-
- var UI = require('piwik/UI');
- var notification = new UI.Notification();
- notification.show(message, {
- title: activated,
- context: 'info',
- id: 'ZenMode_EnabledInfo'
- });
- }
-
- return {
- restrict: 'A',
- compile: function (element, attrs) {
-
- element.on('click', function() {
- $rootElement.trigger('zen-mode-toggle', {});
-
- if ($rootElement.hasClass('zenMode')) {
- showZenModeIsActivatedNotification();
- }
- });
-
- return function () {
- };
- }
- };
-
- }
-})(); \ No newline at end of file
diff --git a/plugins/ZenMode/angularjs/zen-mode/zen-mode.less b/plugins/ZenMode/angularjs/zen-mode/zen-mode.less
deleted file mode 100644
index d637f20241..0000000000
--- a/plugins/ZenMode/angularjs/zen-mode/zen-mode.less
+++ /dev/null
@@ -1,93 +0,0 @@
-.deactivateZenMode {
- float:right;
- margin-right: 13px;
- margin-top: 4px;
- display: none;
- img {
- width: 16px;
- height: 16px;
- }
-}
-
-.activateZenMode {
- img {
- margin-top: -3px;
- margin-bottom: -3px;
- width: 16px;
- height: 16px;
- }
-}
-
-.Menu--dashboard #Searchmenu {
- display: none;
-}
-
-.zenMode {
-
- #header {
- display: none;
- }
-
- .Menu--dashboard {
- border-bottom: 1px solid @theme-color-background-lowContrast !important;
-
- #Searchmenu {
- display: block;
- }
- }
-
- .quick-access {
- display: inline-block;
- color: #999;
- padding: 8px 20px 7px 20px;
- input {
- border:0px;
- border-bottom: 1px solid #CCC;
- font-size: 11px !important;
- }
- }
-
- .deactivateZenMode {
- display: block;
- }
-
- .activateZenMode {
- display: none;
- }
-
- .nav_sep {
- display: none;
- }
-
- /* MENU LEVEL2 HOVER */
- .Menu--dashboard > .Menu-tabList > li li {
- float: none;
- text-align: left;
- }
-
- .Menu--dashboard > .Menu-tabList > li li:hover {
- background-color: #f2f2f2;
- }
-
- .Menu--dashboard > .Menu-tabList > li ul {
- display: none;
- }
-
- .Menu--dashboard > .Menu-tabList > li.sfHover ul,
- .Menu--dashboard > .Menu-tabList > li:hover ul {
- display: none;
- z-index: 150;
- background-color: @theme-color-background-base;
- width: auto;
- border: 1px solid #D9D9D9;
- padding-top: 0px;
- border-top: 4px solid #D3291F;
- }
-
- #root .sites_selector_in_dashboard {
- margin-top:0px;
- margin-right: 0px;
- display: none;
- }
-
-}
diff --git a/plugins/ZenMode/javascripts/zen-mode.js b/plugins/ZenMode/javascripts/zen-mode.js
deleted file mode 100644
index bc2a793942..0000000000
--- a/plugins/ZenMode/javascripts/zen-mode.js
+++ /dev/null
@@ -1,138 +0,0 @@
-/*!
- * Piwik - free/libre analytics platform
- *
- * @link http://piwik.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */
-
-$(document).ready(function () {
-
- if (!isDashboard()) {
- return;
- }
-
- var addedElement = $('#topRightBar').append(
- ' | <span class="topBarElem activateZenMode" piwik-zen-mode-switcher>'
- + '<img src="plugins/CoreHome/images/navigation_expand.png">'
- + ' </span>'
- );
-
- piwikHelper.compileAngularComponents(addedElement);
-
- addedElement = $('.Menu--dashboard').prepend(
- '<span piwik-zen-mode-switcher class="deactivateZenMode">'
- + '<img src="plugins/CoreHome/images/navigation_collapse.png" >'
- + '</span>');
-
- piwikHelper.compileAngularComponents(addedElement);
-
- angular.element(document).injector().invoke(handleZenMode);
-
- function handleZenMode ($rootElement, $cookies) {
-
- var zenMode = !!parseInt($cookies.zenMode, 10);
-
- $rootElement.on('zen-mode-toggle', toggleZenMode);
-
- function toggleZenMode()
- {
- zenMode = !zenMode;
-
- updateZenMode();
- }
-
- function updateZenMode()
- {
- $cookies.zenMode = zenMode ? '1' : '0';
-
- if (zenMode) {
- $rootElement.addClass('zenMode');
- initMenu();
- } else {
- $rootElement.removeClass('zenMode');
- uninitMenu();
- }
-
- resetSubmenu();
- }
-
- if (zenMode) {
- updateZenMode();
- }
-
- Mousetrap.bind('alt+z', function() {
- toggleZenMode();
- });
-
- Mousetrap.bind('alt+f', function(event) {
- if (event.preventDefault) {
- event.preventDefault();
- } else {
- event.returnValue = false; // IE
- }
-
- $('.quick-access input').focus();
- });
- }
-
- function isDashboard()
- {
- return !!$('.Menu--dashboard').length;
- }
-
- function initMenu () {
- var menuNode = $('.Menu--dashboard');
- menuNode.on('piwikSwitchPage', resetSubmenu);
- menuNode.on('mouseenter', 'li:has(ul)', overMainLI);
- menuNode.on('mouseleave', 'li:has(ul)', outMainLI);
-
- $('#Searchmenu').on('keydown focus', '.quick-access input', showQuickAccessMenu);
- $('#Searchmenu').on('blur', '.quick-access input', hideQuickAccessMenu);
- }
-
- function uninitMenu () {
- var menuNode = $('.Menu--dashboard');
- menuNode.off('piwikSwitchPage', resetSubmenu);
- menuNode.off('mouseenter', 'li:has(ul)', overMainLI);
- menuNode.off('mouseleave', 'li:has(ul)', outMainLI);
-
- $('#Searchmenu').off('keydown focus', '.quick-access input', showQuickAccessMenu);
- $('#Searchmenu').off('blur', '.quick-access input', hideQuickAccessMenu);
- menu.prototype.adaptSubMenuHeight();
- }
-
- function overMainLI () {
- var $this = $(this);
- var position = $this.position();
- var width = $this.width();
- var height = $this.height();
-
- $this.find('ul').css({
- left: position.left + 'px',
- display: 'block',
- minWidth: width + 'px',
- position: 'absolute',
- top: (position.top + height) + 'px',
- maxHeight: 'none'
- });
- }
-
- function outMainLI () {
- $(this).find('ul').css({left: '', display: '', minWidth: '', position: '', top: '', maxHeight: ''});
- }
-
- function resetSubmenu()
- {
- $('.Menu--dashboard').find('li:has(ul)').mouseleave();
- }
-
- function showQuickAccessMenu() {
- resetSubmenu();
- $('#Searchmenu').mouseenter();
- }
-
- function hideQuickAccessMenu() {
- $('#Searchmenu').mouseleave();
- }
-});
-
diff --git a/plugins/ZenMode/lang/cs.json b/plugins/ZenMode/lang/cs.json
deleted file mode 100644
index 9ff86d3615..0000000000
--- a/plugins/ZenMode/lang/cs.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "ZenMode": {
- "PluginDescription": "Nebuďte rušeni. Zen režim věci zjednoduší. Je dostupný přes ikonu v pravém horním rohu obrazovky.",
- "SearchForAnything": "Hledat cokoliv",
- "QuickAccessTitle": "Hledat hlášení, webové stránky nebo položky menu",
- "HowToSearch": "Pokud chcete najít hlášení nebo položky menu, použijte vyhledávací pole v pravé horní části, nebo stiskněte 'alt+f'.",
- "HowToToggleZenMode": "Pokud chcete přepnout zen režim, použijte šipku v pravé horní oblasti, nebo stiskněte 'alt+z'.",
- "Activated": "Zen režim aktivován"
- }
-} \ No newline at end of file
diff --git a/plugins/ZenMode/lang/da.json b/plugins/ZenMode/lang/da.json
deleted file mode 100644
index 8275461eaf..0000000000
--- a/plugins/ZenMode/lang/da.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "ZenMode": {
- "SearchForAnything": "Søg efter alt",
- "QuickAccessTitle": "Søg efter menupunkter, rapporter og hjemmesider",
- "HowToSearch": "For at søge efter menupunkter, rapporter eller hjemmesider bruge søgefeltet øverst til højre, eller tryk på 'alt+f'.",
- "HowToToggleZenMode": "Forlad eller kom i Zen-tilstand ved at klikke på pilen øverst til højre, eller tryk på 'alt+z'.",
- "Activated": "Zen-tilstand aktiveret"
- }
-} \ No newline at end of file
diff --git a/plugins/ZenMode/lang/de.json b/plugins/ZenMode/lang/de.json
deleted file mode 100644
index 24ffa53ade..0000000000
--- a/plugins/ZenMode/lang/de.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "ZenMode": {
- "PluginDescription": "Bleiben Sie \"Zen\" mit Piwik. Der \"Zen-Modus\" hält die Dinge einfach. Er ist verfügbar über das Icon am rechten, oberen Ende des Bildschirms.",
- "SearchForAnything": "Nach etwas suchen",
- "QuickAccessTitle": "Nach Menüeinträgen, Berichten oder Websites suchen",
- "HowToSearch": "Um nach Menüeinträgen, Berichten oder Websites zu suchen, das Suchfeld oben benutzen oder Alt+f drücken.",
- "HowToToggleZenMode": "Auf den oberen rechten Pfeil klicken um den Zen Modus zu verlassen oder Alt+t drücken.",
- "Activated": "Zen Modus aktiviert"
- }
-} \ No newline at end of file
diff --git a/plugins/ZenMode/lang/el.json b/plugins/ZenMode/lang/el.json
deleted file mode 100644
index 5a29f9805a..0000000000
--- a/plugins/ZenMode/lang/el.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "ZenMode": {
- "PluginDescription": "Μείνετε στο Zen με το Piwik. Η κατάσταση Zen τηρεί τα πράματα σε απλή κατάσταση. Είναι διαθέσιμη ως εικονίδιο πάνω δεξιά στην οθόνη.",
- "SearchForAnything": "Αναζήτηση για όλα",
- "QuickAccessTitle": "Αναζήτηση για καταχωρήσεις μενού, αναφορές και ιστοτόπους",
- "HowToSearch": "Για να αναζητήσετε σε καταχωρήσεις μενού, αναφορές ή ιστοτόπους χρησιμοποιείστε το πλαίσιο αναζήτηση πάνω δεξιά ή πατήστε 'Alt+F'.",
- "HowToToggleZenMode": "Για να βγείτε ή μεταβείτε σε κατάσταση Zen, πατήστε στο βέλος πάνω δεξιά ή πατήστε 'Alt+Z'.",
- "Activated": "Η κατάσταση Zen ενεργοποιήθηκε"
- }
-} \ No newline at end of file
diff --git a/plugins/ZenMode/lang/en.json b/plugins/ZenMode/lang/en.json
deleted file mode 100755
index 4a3aa78ee8..0000000000
--- a/plugins/ZenMode/lang/en.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "ZenMode": {
- "PluginDescription": "Stay Zen with Piwik. Zen mode keeps things simple. It is available via the icon in the top right of the screen.",
- "SearchForAnything": "Search for anything",
- "QuickAccessTitle": "Search for menu entries, reports and websites",
- "HowToSearch": "To search for menu items, reports or websites use the search box on the top right or press 'alt+f'.",
- "HowToToggleZenMode": "To leave or enter the zen mode click the arrow on the top right or press 'alt+z'.",
- "Activated": "Zen mode activated"
- }
-} \ No newline at end of file
diff --git a/plugins/ZenMode/lang/es.json b/plugins/ZenMode/lang/es.json
deleted file mode 100644
index 27fcf38a62..0000000000
--- a/plugins/ZenMode/lang/es.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "ZenMode": {
- "PluginDescription": "Permanecer Zen con Piwik. El modo Zen mantiene las cosas simples. Está disponible vía el icono en el extremo superior derecho de la pantalla.",
- "SearchForAnything": "Buscar lo que quiera",
- "QuickAccessTitle": "Buscar entradas de menú, reportes y sitios de internet",
- "HowToSearch": "Para buscar entradas de menú, reportes o sitios de internet utilice la caja de búsqueda en la parte superior derecha o presione 'alt+f'.",
- "HowToToggleZenMode": "Para salir o ingresar al modo Zen haga clic en la flecha en la parte superior derecha o presione 'alt+z'.",
- "Activated": "Modo Zen activado"
- }
-} \ No newline at end of file
diff --git a/plugins/ZenMode/lang/fa.json b/plugins/ZenMode/lang/fa.json
deleted file mode 100644
index d221d07b56..0000000000
--- a/plugins/ZenMode/lang/fa.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "ZenMode": {
- "SearchForAnything": "جستجوی همه"
- }
-} \ No newline at end of file
diff --git a/plugins/ZenMode/lang/fr.json b/plugins/ZenMode/lang/fr.json
deleted file mode 100644
index bd8c99350c..0000000000
--- a/plugins/ZenMode/lang/fr.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "ZenMode": {
- "PluginDescription": "Restez zen avec Piwik. Le mode zen conserve les choses simples. Il est disponible via l'icône en haut à droite de l'écran.",
- "SearchForAnything": "Rechercher tout",
- "QuickAccessTitle": "Rechercher des éléments du menu, rapports et sites web",
- "HowToSearch": "Pour rechercher des éléments du menu, rapports ou sites web utilisez la barre de recherche en haut à droite ou pressez 'alt+f'.",
- "HowToToggleZenMode": "Pour quitter ou entrer en mode zen cliquez sur la flèche dans le coin supérieur droit ou pressez 'alt+z'.",
- "Activated": "Mode zen activé"
- }
-} \ No newline at end of file
diff --git a/plugins/ZenMode/lang/hi.json b/plugins/ZenMode/lang/hi.json
deleted file mode 100644
index 44ac4ac168..0000000000
--- a/plugins/ZenMode/lang/hi.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "ZenMode": {
- "PluginDescription": "Piwik साथ जेन रहें। ज़ेन मोड सरल बातें करती रहती है। यह स्क्रीन के ऊपर सही में आइकन के माध्यम से उपलब्ध है।",
- "SearchForAnything": "कुछ के लिए खोज",
- "QuickAccessTitle": "मेनू प्रविष्टियों, रिपोर्टों और वेबसाइटों के लिए खोज",
- "Activated": "ज़ेन मोड सक्रिय"
- }
-} \ No newline at end of file
diff --git a/plugins/ZenMode/lang/it.json b/plugins/ZenMode/lang/it.json
deleted file mode 100644
index cb5bcb5295..0000000000
--- a/plugins/ZenMode/lang/it.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "ZenMode": {
- "PluginDescription": "Sii Zen con Piwik. La modalità Zen rende le cose facili. È disponibile tramite l'icona che si trova nell'angolo in alto a destra dello schermo.",
- "SearchForAnything": "Cerca tutto",
- "QuickAccessTitle": "Ricerca elementi di menù, report e siti web",
- "HowToSearch": "Per ricercare elementi di menù, report o siti web utilizza la casella di ricerca in alto a destra o premi 'alt+f'.",
- "HowToToggleZenMode": "Per lasciare la modalità Zen o entrarvi, clicca sulla freccia in alto a destra o premi 'alt+z'.",
- "Activated": "Modalità Zen attivata"
- }
-} \ No newline at end of file
diff --git a/plugins/ZenMode/lang/ja.json b/plugins/ZenMode/lang/ja.json
deleted file mode 100644
index 3bc49cdb1e..0000000000
--- a/plugins/ZenMode/lang/ja.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "ZenMode": {
- "SearchForAnything": "なんでも検索",
- "QuickAccessTitle": "メニューエントリー、レポート、ウェブサイトを検索",
- "HowToSearch": "メニュー項目やレポート、ウェブサイトをお探しの場合、右上の検索ボックスをご利用になるか、キーボードの 'alt+f' を押してください。",
- "HowToToggleZenMode": "禅モードを切り替えるには、右上の矢印をクリックするか、キーボードの 'alt+z' を押してください。",
- "Activated": "禅モードを有効化"
- }
-} \ No newline at end of file
diff --git a/plugins/ZenMode/lang/nb.json b/plugins/ZenMode/lang/nb.json
deleted file mode 100644
index 0b5c865c5e..0000000000
--- a/plugins/ZenMode/lang/nb.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "ZenMode": {
- "SearchForAnything": "Søk etter noe",
- "Activated": "Zen-modus aktivert"
- }
-} \ No newline at end of file
diff --git a/plugins/ZenMode/lang/nl.json b/plugins/ZenMode/lang/nl.json
deleted file mode 100644
index 930411c0ed..0000000000
--- a/plugins/ZenMode/lang/nl.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "ZenMode": {
- "PluginDescription": "Blijf zen met Piwik. Zen mode houdt de dingen eenvoudig. Het is beschikbaar via het icoon in de rechterbovenhoek van het scherm.",
- "SearchForAnything": "Zoeken op alles",
- "QuickAccessTitle": "Zoeken op menu-items, rapporten en websites",
- "HowToSearch": "Om te zoeken op menu-items, rapporten of websites gebruik het zoekvak rechtsboven of druk op 'alt+f'.",
- "HowToToggleZenMode": "Om de zen-modus te betreden of verlaten klik op pijl rechtsboven of druk 'alt+z'.",
- "Activated": "Zen-modus geactiveerd"
- }
-} \ No newline at end of file
diff --git a/plugins/ZenMode/lang/pl.json b/plugins/ZenMode/lang/pl.json
deleted file mode 100644
index d638e2b004..0000000000
--- a/plugins/ZenMode/lang/pl.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "ZenMode": {
- "SearchForAnything": "Szukaj czegokolwiek",
- "QuickAccessTitle": "Szukaj wpisów w menu, raportów i stron.",
- "HowToToggleZenMode": "Aby wyjść albo wejść do trybu Zen należy kliknąć strzałkę w górnym prawym rogu albo wcisnąć 'alt+z'.",
- "Activated": "Tryb Zen został aktywowany"
- }
-} \ No newline at end of file
diff --git a/plugins/ZenMode/lang/pt-br.json b/plugins/ZenMode/lang/pt-br.json
deleted file mode 100644
index 640da2c93b..0000000000
--- a/plugins/ZenMode/lang/pt-br.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "ZenMode": {
- "PluginDescription": "Fique Zen com Piwik. O modo Zen mantém as coisas simples. Está disponível através do ícone no canto superior direito da tela.",
- "SearchForAnything": "Buscar por qualquer coisa",
- "QuickAccessTitle": "Pesquisar por entradas do menu, relatórios e websites",
- "HowToSearch": "Para procurar itens do menu, relatórios ou sites utilize a caixa de pesquisa no canto superior direito ou pressione 'alt+f'.",
- "HowToToggleZenMode": "Para sair ou entrar no modo zen clique na seta no canto superior direito ou pressione 'alt+z'.",
- "Activated": "Modo Zen ativado"
- }
-} \ No newline at end of file
diff --git a/plugins/ZenMode/lang/ro.json b/plugins/ZenMode/lang/ro.json
deleted file mode 100644
index 495fd70b9e..0000000000
--- a/plugins/ZenMode/lang/ro.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "ZenMode": {
- "SearchForAnything": "Caută orice",
- "QuickAccessTitle": "Caută elemente de meniu, rapoarte şi site-uri",
- "HowToSearch": "Pentru a căuta elemente de meniu, rapoarte sau site-uri, foloseşte cutia de căutare din dreapta sus sau apasă 'alt+f'.",
- "HowToToggleZenMode": "Pentru a intra sau a părăsi modul zen, dă click pe săgeata din dreapta sus sau apasă 'alt+z'.",
- "Activated": "Modul Zen a fost activat"
- }
-} \ No newline at end of file
diff --git a/plugins/ZenMode/lang/ru.json b/plugins/ZenMode/lang/ru.json
deleted file mode 100644
index 68799e808c..0000000000
--- a/plugins/ZenMode/lang/ru.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "ZenMode": {
- "SearchForAnything": "Поиск везде",
- "QuickAccessTitle": "Поиск по пунктам меню, отчетам и сайтам",
- "HowToSearch": "Для поиска элементов меню, отчетов и веб-сайтов используйте окно поиска в правом верхнем углу или нажмите \"alt+f\"",
- "HowToToggleZenMode": "Чтобы выйти или войти в Дзен режим нажмите на стрелку в правом верхнем углу или нажмите \"alt+z\".",
- "Activated": "Активирован Дзен режим"
- }
-} \ No newline at end of file
diff --git a/plugins/ZenMode/lang/sr.json b/plugins/ZenMode/lang/sr.json
deleted file mode 100644
index 4f73c1cf1a..0000000000
--- a/plugins/ZenMode/lang/sr.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "ZenMode": {
- "PluginDescription": "Budite u Zenu sa Pivikom. Zen mod čini stvari jednostavnim. Možete ga omogućiti preko sličice u gornjem desnom uglu ekrana.",
- "SearchForAnything": "Pretraži sve",
- "QuickAccessTitle": "Pretraživanje stavki menija, izveštaja i sajtova",
- "HowToSearch": "Ukoliko želite da pretražujete stavke menija, izveštaje ili sajtove, upotrebite polje za pretraživanje u gornjem desnom uglu ili pritisnite Alt + f.",
- "HowToToggleZenMode": "Ukoliko želite da napustite ili ponovo aktivirate zen mod, kliknite na strelicu u gornjem desnom uglu ili pritisnite Alt + z.",
- "Activated": "Zen mod aktiviran"
- }
-} \ No newline at end of file
diff --git a/plugins/ZenMode/lang/sv.json b/plugins/ZenMode/lang/sv.json
deleted file mode 100644
index d42ff6428e..0000000000
--- a/plugins/ZenMode/lang/sv.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "ZenMode": {
- "SearchForAnything": "Sök efter vad som helst",
- "QuickAccessTitle": "Sök efter meny-poster, rapporter och webbplatser",
- "HowToSearch": "För att söka efter meny-poster, rapporter eller webbplatser - använd sökfältet uppe till höger eller tryck 'alt+f'.",
- "HowToToggleZenMode": "För att gå i\/ur zen mode, klicka på pilen uppe till höger eller tryck 'alt+z'.",
- "Activated": "Zen mode aktiverat"
- }
-} \ No newline at end of file
diff --git a/plugins/ZenMode/lang/ta.json b/plugins/ZenMode/lang/ta.json
deleted file mode 100644
index c9c6a76d75..0000000000
--- a/plugins/ZenMode/lang/ta.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "ZenMode": {
- "SearchForAnything": "எதைபற்றியும் தேடு",
- "Activated": "ஜென் நிலை செயற்பாட்டில் உள்ளது"
- }
-} \ No newline at end of file
diff --git a/plugins/ZenMode/lang/tl.json b/plugins/ZenMode/lang/tl.json
deleted file mode 100644
index 7f738608d1..0000000000
--- a/plugins/ZenMode/lang/tl.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "ZenMode": {
- "SearchForAnything": "Paghahanap sa kahit ano",
- "QuickAccessTitle": "Maghanap ng mga entry ng menu mga ulat at mga website.",
- "HowToSearch": "Para maghanap ng items sa menu ulat o websites gamitin ang search box sa kanang tuktok o pindutin ang 'alt+f'.",
- "HowToToggleZenMode": "Upang umalis o ipasok ang Zen mode i-click ang arrow sa kanang tuktok o pindutin ang 'alt + z'.",
- "Activated": "Ang Zen mode ay na activate"
- }
-} \ No newline at end of file
diff --git a/tests/UI/specs/DashboardManager_spec.js b/tests/UI/specs/DashboardManager_spec.js
index 9ada832b83..3dcd33f5ab 100644
--- a/tests/UI/specs/DashboardManager_spec.js
+++ b/tests/UI/specs/DashboardManager_spec.js
@@ -22,7 +22,7 @@ describe("DashboardManager", function () {
it("should expand when clicked", function (done) {
expect.screenshot("expanded").to.be.captureSelector(selectorToCapture, function (page) {
- page.click('.dashboard-manager');
+ page.click('.dashboard-manager .title');
}, done);
});
diff --git a/tests/UI/specs/Dashboard_spec.js b/tests/UI/specs/Dashboard_spec.js
index e6918417d4..f17e9f4258 100644
--- a/tests/UI/specs/Dashboard_spec.js
+++ b/tests/UI/specs/Dashboard_spec.js
@@ -84,7 +84,7 @@ describe("Dashboard", function () {
});
it("should refresh widget when widget refresh icon clicked", function (done) {
- expect.screenshot("widget_move").to.be.capture("widget_refresh", function (page) {
+ expect.screenshot("widget_move_refresh").to.be.capture(function (page) {
page.mouseMove('.widgetTop');
page.click('.button#refresh');
page.mouseMove('.dashboard-manager'); // let widget top hide again
@@ -99,7 +99,7 @@ describe("Dashboard", function () {
});
it("should unminimise widget when widget maximise icon is clicked after being minimised", function (done) {
- expect.screenshot("widget_move").to.be.capture("widget_unminimised", function (page) {
+ expect.screenshot("widget_move_unminimised").to.be.capture(function (page) {
page.mouseMove('.widgetTop');
page.click('.button#maximise');
page.mouseMove('.dashboard-manager'); // let widget top hide again
@@ -114,7 +114,7 @@ describe("Dashboard", function () {
});
it("should close maximise dialog when minimise icon is clicked", function (done) {
- expect.screenshot("widget_move").to.be.capture("widget_unmaximise", function (page) {
+ expect.screenshot("widget_move_unmaximise").to.be.capture(function (page) {
page.mouseMove('.widgetTop');
page.click('.button#minimise');
page.mouseMove('.dashboard-manager'); // let widget top hide again
@@ -123,7 +123,7 @@ describe("Dashboard", function () {
it("should add a widget when a widget is selected in the dashboard manager", function (done) {
expect.screenshot("widget_add_widget").to.be.capture(function (page) {
- page.click('.dashboard-manager');
+ page.click('.dashboard-manager .title');
page.mouseMove('.widgetpreview-categorylist>li:contains(Live!)'); // have to mouse move twice... otherwise Live! will just be highlighted
page.mouseMove('.widgetpreview-categorylist>li:contains(Visits Summary)');
@@ -135,7 +135,7 @@ describe("Dashboard", function () {
});
it("should remove widget when remove widget icon is clicked", function (done) {
- expect.screenshot("widget_move").to.be.capture("widget_removed", function (page) {
+ expect.screenshot("widget_move_removed").to.be.capture(function (page) {
page.mouseMove('#widgetVisitTimegetVisitInformationPerLocalTime .widgetTop');
page.click('#widgetVisitTimegetVisitInformationPerLocalTime .button#close');
page.click('.ui-dialog button>span:contains(Yes)');
@@ -145,7 +145,7 @@ describe("Dashboard", function () {
it("should change dashboard layout when new layout is selected", function (done) {
expect.screenshot("change_layout").to.be.capture(function (page) {
- page.click('.dashboard-manager');
+ page.click('.dashboard-manager .title');
page.click('li[data-action=showChangeDashboardLayoutDialog]');
page.click('div[layout=50-50]');
page.click('.ui-dialog button>span:contains(Save)', 3000);
@@ -154,7 +154,7 @@ describe("Dashboard", function () {
it("should rename dashboard when dashboard rename process completed", function (done) {
expect.screenshot("rename").to.be.capture(function (page) {
- page.click('.dashboard-manager');
+ page.click('.dashboard-manager .title');
page.click('li[data-action=renameDashboard]');
page.evaluate(function () {
$('#newDashboardName:visible').val('newname'); // don't use sendKeys or click, since in this test it appears to trigger a seg fault on travis
@@ -165,7 +165,7 @@ describe("Dashboard", function () {
it("should copy dashboard successfully when copy dashboard process completed", function (done) {
expect.screenshot("copied").to.be.capture(function (page) {
- page.click('.dashboard-manager');
+ page.click('.dashboard-manager .title');
page.click('li[data-action=copyDashboardToUser]');
page.evaluate(function () {
$('#copyDashboardName').val('');
@@ -182,7 +182,7 @@ describe("Dashboard", function () {
it("should reset dashboard when reset dashboard process completed", function (done) {
expect.screenshot("reset").to.be.capture(function (page) {
- page.click('.dashboard-manager');
+ page.click('.dashboard-manager .title');
page.click('li[data-action=resetDashboard]');
page.click('.ui-dialog button>span:contains(Yes)', 10000);
page.mouseMove('.dashboard-manager');
@@ -191,7 +191,7 @@ describe("Dashboard", function () {
it("should remove dashboard when remove dashboard process completed", function (done) {
expect.screenshot("removed").to.be.capture(function (page) {
- page.click('.dashboard-manager');
+ page.click('.dashboard-manager .title');
page.click('li[data-action=removeDashboard]');
page.click('.ui-dialog[aria-describedby=removeDashboardConfirm] button>span:contains(Yes)');
page.mouseMove('.dashboard-manager');
@@ -204,7 +204,7 @@ describe("Dashboard", function () {
it("should not fail when default widget selection changed", function (done) {
expect.screenshot("default_widget_selection_changed").to.be.capture(function (page) {
page.load(url);
- page.click('.dashboard-manager');
+ page.click('.dashboard-manager .title');
page.click('li[data-action=setAsDefaultWidgets]');
page.click('.ui-dialog button>span:contains(Yes)');
}, done);
@@ -212,7 +212,7 @@ describe("Dashboard", function () {
it("should create new dashboard with new default widget selection when create dashboard process completed", function (done) {
expect.screenshot("create_new").to.be.capture(function (page) {
- page.click('.dashboard-manager');
+ page.click('.dashboard-manager .title');
page.click('li[data-action=createDashboard]');
page.sendKeys('#createDashboardName', 'newdash2');
page.click('.ui-dialog[aria-describedby=createDashboardConfirm] button>span:contains(Yes)');
diff --git a/tests/UI/specs/EmptySite_spec.js b/tests/UI/specs/EmptySite_spec.js
index 704bda8721..31b8524d6f 100644
--- a/tests/UI/specs/EmptySite_spec.js
+++ b/tests/UI/specs/EmptySite_spec.js
@@ -15,7 +15,7 @@ describe("EmptySite", function () {
it('should show the tracking code if the website has no recorded data', function (done) {
var urlToTest = "?" + generalParams + "&module=CoreHome&action=index";
- expect.screenshot('emptySiteDashboard').to.be.captureSelector('.site-without-data', function (page) {
+ expect.screenshot('emptySiteDashboard').to.be.captureSelector('.page', function (page) {
page.load(urlToTest);
}, done);
});
diff --git a/tests/UI/specs/Login_spec.js b/tests/UI/specs/Login_spec.js
index c58dd5fc53..ed4ad31ba3 100644
--- a/tests/UI/specs/Login_spec.js
+++ b/tests/UI/specs/Login_spec.js
@@ -49,7 +49,7 @@ describe("Login", function () {
it("should redirect to login when logout link clicked", function (done) {
expect.screenshot("login_form").to.be.capture("logout_form", function (page) {
- page.click("#topBars a:contains(Sign out)");
+ page.click("#topRightBar .icon-sign-out");
}, done);
});
@@ -89,7 +89,7 @@ describe("Login", function () {
it("should login successfully when formless login used", function (done) {
expect.page("").contains('#dashboard', 'formless_login', function (page) {
- page.click("#topBars a:contains(Sign out)");
+ page.click("#topRightBar .icon-sign-out");
page.load(formlessLoginUrl);
}, done);
});
diff --git a/tests/UI/specs/MeasurableManager_spec.js b/tests/UI/specs/MeasurableManager_spec.js
index 539576a7c1..691af5c436 100644
--- a/tests/UI/specs/MeasurableManager_spec.js
+++ b/tests/UI/specs/MeasurableManager_spec.js
@@ -31,7 +31,7 @@ describe("MeasurableManager", function () {
});
it("should use measurable wording in menu", function (done) {
- var selector = '.Menu-tabList *:contains(Administration):first';
+ var selector = '#secondNavBar li:contains(Administration):first';
expect.screenshot('measurable_menu_item').to.be.captureSelector(selector, function (page) {
}, done);
diff --git a/tests/UI/specs/Menus_spec.js b/tests/UI/specs/Menus_spec.js
index d3fe6720c0..3124766e79 100644
--- a/tests/UI/specs/Menus_spec.js
+++ b/tests/UI/specs/Menus_spec.js
@@ -14,48 +14,55 @@ describe("Menus", function () {
urlBase = 'module=CoreHome&action=index&' + generalParams
;
+ function openMenuItem(page, menuItem)
+ {
+ page.click('#secondNavBar .navbar a:contains('+ menuItem + ')');
+ }
+
// main menu tests
it('should load the main reporting menu correctly', function (done) {
- expect.screenshot('mainmenu_loaded').to.be.captureSelector('.Menu--dashboard,.nav_sep', function (page) {
+ expect.screenshot('mainmenu_loaded').to.be.captureSelector('#secondNavBar', function (page) {
page.load("?" + urlBase + "#" + generalParams + "&module=Actions&action=menuGetPageUrls");
}, done);
});
it('should change the menu when a upper menu item is clicked in the main menu', function (done) {
- expect.screenshot('mainmenu_upper_clicked').to.be.captureSelector('.Menu--dashboard,.nav_sep', function (page) {
- page.click('.Menu-tabList > li:eq(1) > a');
+ expect.screenshot('mainmenu_upper_clicked').to.be.captureSelector('#secondNavBar', function (page) {
+ page.click('#secondNavBar .navbar > li:eq(1) > a');
}, done);
});
it('should change the menu when a lower menu item is clicked in the main menu', function (done) {
- expect.screenshot('mainmenu_lower_clicked').to.be.captureSelector('.Menu--dashboard,.nav_sep', function (page) {
- page.click('.Menu-tabList > li:eq(1) > ul > li:eq(1) > a');
+ expect.screenshot('mainmenu_lower_clicked').to.be.captureSelector('#secondNavBar', function (page) {
+ page.click('#secondNavBar .navbar > li:eq(1) > ul > li:eq(1) > a');
}, done);
});
// user menu tests
it('should load the user reporting menu correctly', function (done) {
- expect.screenshot('user_loaded').to.be.captureSelector('.Menu--admin', function (page) {
+ expect.screenshot('user_loaded').to.be.captureSelector('#secondNavBar', function (page) {
page.load("?" + generalParams + "&module=UsersManager&action=userSettings");
}, done);
});
it('should change the user page correctly when a user menu item is clicked', function (done) {
- expect.screenshot('user_changed').to.be.captureSelector('.Menu--admin', function (page) {
- page.click('.Menu--admin a:contains(API)');
+ expect.screenshot('user_changed').to.be.captureSelector('#secondNavBar', function (page) {
+ openMenuItem(page, 'Platform');
+ openMenuItem(page, 'API');
}, done);
});
// admin menu tests
it('should load the admin reporting menu correctly', function (done) {
- expect.screenshot('admin_loaded').to.be.captureSelector('.Menu--admin', function (page) {
+ expect.screenshot('admin_loaded').to.be.captureSelector('#secondNavBar', function (page) {
page.load("?" + generalParams + "&module=CoreAdminHome&action=generalSettings");
}, done);
});
it('should change the admin page correctly when an admin menu item is clicked', function (done) {
- expect.screenshot('admin_changed').to.be.captureSelector('.Menu--admin', function (page) {
- page.click('.Menu--admin a:contains(Websites)');
+ expect.screenshot('admin_changed').to.be.captureSelector('#secondNavBar', function (page) {
+ openMenuItem(page, 'Administration');
+ openMenuItem(page, 'Websites');
}, done);
});
}); \ No newline at end of file
diff --git a/tests/UI/specs/MultiSites_spec.js b/tests/UI/specs/MultiSites_spec.js
index bab72a1d77..6037a196ef 100644
--- a/tests/UI/specs/MultiSites_spec.js
+++ b/tests/UI/specs/MultiSites_spec.js
@@ -11,7 +11,7 @@ describe("MultiSitesTest", function () {
this.timeout(0);
var generalParams = 'idSite=1&period=year&date=2012-08-09';
- var selector = '.pageWrap,.expandDataTableFooterDrawer';
+ var selector = '#multisites,.expandDataTableFooterDrawer';
var createdSiteId = null;
diff --git a/tests/UI/specs/QuickAccess_spec.js b/tests/UI/specs/QuickAccess_spec.js
new file mode 100644
index 0000000000..75879d2729
--- /dev/null
+++ b/tests/UI/specs/QuickAccess_spec.js
@@ -0,0 +1,75 @@
+/*!
+ * Piwik - free/libre analytics platform
+ *
+ * ActionsDataTable screenshot tests.
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+describe("QuickAccess", function () {
+ var selectorToCapture = "#search,.quick-access";
+
+ this.timeout(0);
+
+ var url = "?module=CoreHome&action=index&idSite=1&period=year&date=2012-08-09";
+
+ function enterSearchTerm(page, searchTermToAdd)
+ {
+ page.sendKeys("#search input", searchTermToAdd);
+ }
+
+ function captureSelector(screenshotName, done, selector, callback)
+ {
+ expect.screenshot(screenshotName).to.be.captureSelector(selector, callback, done);
+ }
+
+ function capture(screenshotName, done, callback)
+ {
+ captureSelector(screenshotName, done, selectorToCapture, callback);
+ }
+
+ it("should be displayed", function (done) {
+ capture('initially', done, function (page) {
+ page.load(url);
+ });
+ });
+
+ it("should search for something and update view", function (done) {
+ capture('search_1', done, function (page) {
+ enterSearchTerm(page, 'b');
+ });
+ });
+
+ it("should search again when typing another letter", function (done) {
+ capture('search_2', done, function (page) {
+ enterSearchTerm(page, 'a');
+ });
+ });
+
+ it("should show message if no results", function (done) {
+ capture('search_no_result', done, function (page) {
+ enterSearchTerm(page, 'x');
+ });
+ });
+
+ it("should be possible to activate via shortcut", function (done) {
+ capture('shortcut', done, function (page) {
+ page.load(url);
+ page.sendKeys("body", 'f');
+ });
+ });
+
+ it("should search for websites", function (done) {
+ capture('search_sites', done, function (page) {
+ enterSearchTerm(page, 'si');
+ });
+ });
+
+ it("clicking on a category should show all items that belong to that category", function (done) {
+ capture('search_category', done, function (page) {
+ page.click('.quick-access-category:first');
+ });
+ });
+
+});
diff --git a/tests/UI/specs/SegmentSelectorEditor_spec.js b/tests/UI/specs/SegmentSelectorEditor_spec.js
index 01066c3bbf..f936162841 100644
--- a/tests/UI/specs/SegmentSelectorEditor_spec.js
+++ b/tests/UI/specs/SegmentSelectorEditor_spec.js
@@ -22,13 +22,13 @@ describe("SegmentSelectorEditorTest", function () {
it("should open selector when control clicked", function (done) {
expect.screenshot("1_selector_open").to.be.captureSelector(selectorsToCapture, function (page) {
- page.click('.segmentationContainer');
+ page.click('.segmentationContainer .title');
}, done);
});
it("should open segment editor when edit link clicked for existing segment", function (done) {
expect.screenshot("2_segment_editor_update").to.be.captureSelector(selectorsToCapture, function (page) {
- page.click('.segmentList .editSegment');
+ page.click('.segmentList .editSegment:first');
}, done);
});
@@ -65,7 +65,7 @@ describe("SegmentSelectorEditorTest", function () {
it("should open blank segment editor when create new segment link is clicked", function (done) {
expect.screenshot("8_segment_editor_create").to.be.captureSelector(selectorsToCapture, function (page) {
- page.click('.segmentationContainer');
+ page.click('.segmentationContainer .title');
page.click('.add_new_segment');
}, done);
});
@@ -120,7 +120,7 @@ describe("SegmentSelectorEditorTest", function () {
it("should show the new segment after page reload", function (done) {
expect.screenshot("saved").to.be.captureSelector("saved_reload", selectorsToCapture, function (page) {
page.reload();
- page.click('.segmentationContainer');
+ page.click('.segmentationContainer .title');
}, done);
});
@@ -158,7 +158,7 @@ describe("SegmentSelectorEditorTest", function () {
it("should show the updated segment after page reload", function (done) {
expect.screenshot("updated").to.be.captureSelector("updated_reload", selectorsToCapture, function (page) {
page.reload();
- page.click('.segmentationContainer');
+ page.click('.segmentationContainer .title');
}, done);
});
@@ -178,14 +178,14 @@ describe("SegmentSelectorEditorTest", function () {
expect.screenshot('deleted').to.be.captureSelector(selectorsToCapture + ',.ui-dialog', function (page) {
page.click('.ui-dialog button>span:contains(Yes):visible');
- page.click('.segmentationContainer');
+ page.click('.segmentationContainer .title');
}, done);
});
it("should not show the deleted segment after page reload", function (done) {
expect.screenshot('deleted').to.be.captureSelector('deleted_reload', selectorsToCapture, function (page) {
page.reload();
- page.click('.segmentationContainer');
+ page.click('.segmentationContainer .title');
}, done);
});
}); \ No newline at end of file
diff --git a/tests/UI/specs/SiteSelector_spec.js b/tests/UI/specs/SiteSelector_spec.js
index 71ae799558..08bd950a77 100644
--- a/tests/UI/specs/SiteSelector_spec.js
+++ b/tests/UI/specs/SiteSelector_spec.js
@@ -22,7 +22,7 @@ describe("SiteSelector", function () {
it("should display expanded when clicked", function (done) {
expect.screenshot("expanded").to.be.captureSelector(selectorToCapture, function (page) {
- page.click('.sites_autocomplete');
+ page.click('.sites_autocomplete .title');
}, done);
});
diff --git a/tests/UI/specs/UIIntegration_spec.js b/tests/UI/specs/UIIntegration_spec.js
index 76b521567f..ab5a5ec6aa 100644
--- a/tests/UI/specs/UIIntegration_spec.js
+++ b/tests/UI/specs/UIIntegration_spec.js
@@ -237,13 +237,13 @@ describe("UIIntegrationTest", function () { // TODO: Rename to Piwik?
// goals pages
it('should load the goals > ecommerce page correctly', function (done) {
- expect.screenshot('goals_ecommerce').to.be.captureSelector('.pageWrap,.expandDataTableFooterDrawer', function (page) {
+ expect.screenshot('goals_ecommerce').to.be.captureSelector('.pageWrap,.expandDataTableFooterDrawer,.dataTable', function (page) {
page.load("?" + urlBase + "#" + generalParams + "&module=Ecommerce&action=ecommerceReport&idGoal=ecommerceOrder");
}, done);
});
it('should load the goals > overview page correctly', function (done) {
- expect.screenshot('goals_overview').to.be.captureSelector('.pageWrap,.expandDataTableFooterDrawer', function (page) {
+ expect.screenshot('goals_overview').to.be.captureSelector('.pageWrap,.expandDataTableFooterDrawer,.dataTable', function (page) {
page.load( "?" + urlBase + "#" + generalParams + "&module=Goals&action=index");
}, done);
});
@@ -256,7 +256,7 @@ describe("UIIntegrationTest", function () { // TODO: Rename to Piwik?
});
it('should load the goals > single goal page correctly', function (done) {
- expect.screenshot('goals_individual_goal').to.be.captureSelector('.pageWrap,.expandDataTableFooterDrawer', function (page) {
+ expect.screenshot('goals_individual_goal').to.be.captureSelector('.pageWrap,.expandDataTableFooterDrawer,.dataTable', function (page) {
page.load("?" + urlBase + "#" + generalParams + "&module=Goals&action=goalReport&idGoal=1");
}, done);
});
@@ -349,7 +349,7 @@ describe("UIIntegrationTest", function () { // TODO: Rename to Piwik?
// Ecommerce
it('should load the ecommerce overview page', function (done) {
- expect.screenshot('ecommerce_overview').to.be.captureSelector('.pageWrap,.expandDataTableFooterDrawer', function (page) {
+ expect.screenshot('ecommerce_overview').to.be.captureSelector('.pageWrap,.expandDataTableFooterDrawer,.dataTable', function (page) {
page.load("?" + urlBase + "#" + generalParams + "&module=Ecommerce&action=ecommerceReport&idGoal=ecommerceOrder");
}, done);
});
@@ -361,20 +361,20 @@ describe("UIIntegrationTest", function () { // TODO: Rename to Piwik?
});
it('should load the ecommerce products page', function (done) {
- expect.screenshot('ecommerce_products').to.be.captureSelector('.pageWrap,.expandDataTableFooterDrawer', function (page) {
+ expect.screenshot('ecommerce_products').to.be.captureSelector('.pageWrap,.expandDataTableFooterDrawer,.dataTable', function (page) {
page.load("?" + urlBase + "#" + generalParams + "&module=Ecommerce&action=products&idGoal=ecommerceOrder");
}, done);
});
it('should load the ecommerce sales page', function (done) {
- expect.screenshot('ecommerce_sales').to.be.captureSelector('.pageWrap,.expandDataTableFooterDrawer', function (page) {
+ expect.screenshot('ecommerce_sales').to.be.captureSelector('.pageWrap,.expandDataTableFooterDrawer,.dataTable', function (page) {
page.load("?" + urlBase + "#" + generalParams + "&module=Ecommerce&action=sales&idGoal=ecommerceOrder");
}, done);
});
// Admin user settings (plugins not displayed)
it('should load the Manage > Websites admin page correctly', function (done) {
- expect.screenshot('admin_manage_websites').to.be.captureSelector('#content', function (page) {
+ expect.screenshot('admin_manage_websites').to.be.captureSelector('.pageWrap', function (page) {
page.load("?" + generalParams + "&module=SitesManager&action=index");
page.evaluate(function () {
$('.form-help:contains(UTC time is)').hide();
@@ -383,7 +383,7 @@ describe("UIIntegrationTest", function () { // TODO: Rename to Piwik?
});
it('should load the Manage > Users admin page correctly', function (done) {
- expect.screenshot('admin_manage_users').to.be.captureSelector('#content', function (page) {
+ expect.screenshot('admin_manage_users').to.be.captureSelector('.pageWrap', function (page) {
page.load("?" + generalParams + "&module=UsersManager&action=index");
// remove token auth which can be random
@@ -399,25 +399,25 @@ describe("UIIntegrationTest", function () { // TODO: Rename to Piwik?
});
it('should load the user settings admin page correctly', function (done) {
- expect.screenshot('admin_user_settings').to.be.captureSelector('#content', function (page) {
+ expect.screenshot('admin_user_settings').to.be.captureSelector('.pageWrap', function (page) {
page.load("?" + generalParams + "&module=UsersManager&action=userSettings");
}, done);
});
it('should load the Manage > Tracking Code admin page correctly', function (done) {
- expect.screenshot('admin_manage_tracking_code').to.be.captureSelector('#content', function (page) {
+ expect.screenshot('admin_manage_tracking_code').to.be.captureSelector('.pageWrap', function (page) {
page.load("?" + generalParams + "&module=CoreAdminHome&action=trackingCodeGenerator");
}, done);
});
it('should load the Settings > General Settings admin page correctly', function (done) {
- expect.screenshot('admin_settings_general').to.be.captureSelector('#content', function (page) {
+ expect.screenshot('admin_settings_general').to.be.captureSelector('.pageWrap', function (page) {
page.load("?" + generalParams + "&module=CoreAdminHome&action=generalSettings");
}, done);
});
it('should load the Settings > Privacy admin page correctly', function (done) {
- expect.screenshot('admin_privacy_settings').to.be.captureSelector('#content,.ui-inline-help', function (page) {
+ expect.screenshot('admin_privacy_settings').to.be.captureSelector('.pageWrap,.ui-inline-help', function (page) {
page.load("?" + generalParams + "&module=PrivacyManager&action=privacySettings");
}, done);
});
@@ -429,43 +429,43 @@ describe("UIIntegrationTest", function () { // TODO: Rename to Piwik?
});
it('should load the Settings > Mobile Messaging admin page correctly', function (done) {
- expect.screenshot('admin_settings_mobilemessaging').to.be.captureSelector('#content', function (page) {
+ expect.screenshot('admin_settings_mobilemessaging').to.be.captureSelector('.pageWrap', function (page) {
page.load("?" + generalParams + "&module=MobileMessaging&action=index");
}, done);
});
it('should load the Settings > Mobile Messaging user page correctly', function (done) {
- expect.screenshot('user_settings_mobilemessaging').to.be.captureSelector('#content', function (page) {
+ expect.screenshot('user_settings_mobilemessaging').to.be.captureSelector('.pageWrap', function (page) {
page.load("?" + generalParams + "&module=MobileMessaging&action=userSettings");
}, done);
});
it('should load the themes admin page correctly', function (done) {
- expect.screenshot('admin_themes').to.be.captureSelector('#content', function (page) {
+ expect.screenshot('admin_themes').to.be.captureSelector('.pageWrap', function (page) {
page.load("?" + generalParams + "&module=CorePluginsAdmin&action=themes");
}, done);
});
it('should load the plugins admin page correctly', function (done) {
- expect.screenshot('admin_plugins').to.be.captureSelector('#content', function (page) {
+ expect.screenshot('admin_plugins').to.be.captureSelector('.pageWrap', function (page) {
page.load("?" + generalParams + "&module=CorePluginsAdmin&action=plugins");
}, done);
});
it('should load the plugin settings admin page correctly', function (done) {
- expect.screenshot('admin_plugin_settings').to.be.captureSelector('#content', function (page) {
+ expect.screenshot('admin_plugin_settings').to.be.captureSelector('.pageWrap', function (page) {
page.load("?" + generalParams + "&module=CoreAdminHome&action=adminPluginSettings");
}, done);
});
it('should load the plugin settings user page correctly', function (done) {
- expect.screenshot('user_plugin_settings').to.be.captureSelector('#content', function (page) {
+ expect.screenshot('user_plugin_settings').to.be.captureSelector('.pageWrap', function (page) {
page.load("?" + generalParams + "&module=CoreAdminHome&action=userPluginSettings");
}, done);
});
it('should load the Settings > Visitor Generator admin page correctly', function (done) {
- expect.screenshot('admin_visitor_generator').to.be.captureSelector('#content', function (page) {
+ expect.screenshot('admin_visitor_generator').to.be.captureSelector('.pageWrap', function (page) {
page.load("?" + generalParams + "&module=VisitorGenerator&action=index");
page.evaluate(function () {
@@ -477,7 +477,7 @@ describe("UIIntegrationTest", function () { // TODO: Rename to Piwik?
// Notifications
it('should load the notifications page correctly', function (done) {
- expect.screenshot('notifications').to.be.captureSelector('#content', function (page) {
+ expect.screenshot('notifications').to.be.captureSelector('.pageWrap', function (page) {
page.load("?" + generalParams + "&module=ExampleUI&action=notifications&idSite=1&period=day&date=yesterday");
page.evaluate(function () {
$('#header').hide();
@@ -517,20 +517,20 @@ describe("UIIntegrationTest", function () { // TODO: Rename to Piwik?
// CustomAlerts plugin TODO: move to CustomAlerts plugin
it('should load the custom alerts list correctly', function (done) {
- expect.screenshot('customalerts_list').to.be.captureSelector('#content', function (page) {
+ expect.screenshot('customalerts_list').to.be.captureSelector('.pageWrap', function (page) {
page.load("?" + generalParams + "&module=CustomAlerts&action=index&idSite=1&period=day&date=yesterday&tests_hide_piwik_version=1");
}, done);
});
it('should load the triggered custom alerts list correctly', function (done) {
- expect.screenshot('customalerts_list_triggered').to.be.captureSelector('#content', function (page) {
+ expect.screenshot('customalerts_list_triggered').to.be.captureSelector('.pageWrap', function (page) {
page.load("?" + generalParams + "&module=CustomAlerts&action=historyTriggeredAlerts&idSite=1&period=day&date=yesterday&tests_hide_piwik_version=1");
}, done);
});
// top bar pages
it('should load the widgets listing page correctly', function (done) {
- expect.screenshot('widgets_listing').to.be.captureSelector('#content', function (page) {
+ expect.screenshot('widgets_listing').to.be.captureSelector('.pageWrap', function (page) {
page.load("?" + generalParams + "&module=Widgetize&action=index");
page.mouseMove('.widgetpreview-categorylist>li:contains(Visits Summary)');
page.mouseMove('li[uniqueid=widgetVisitsSummarygetEvolutionGraphcolumnsArray]');
@@ -538,7 +538,7 @@ describe("UIIntegrationTest", function () { // TODO: Rename to Piwik?
});
it('should load the API listing page correctly', function (done) {
- expect.screenshot('api_listing').to.be.captureSelector('#content', function (page) {
+ expect.screenshot('api_listing').to.be.captureSelector('.pageWrap', function (page) {
page.load("?" + generalParams + "&module=API&action=listAllAPI");
page.evaluate(function () { // remove token_auth since it can change on each test run
$('span#token_auth>strong').text('dummytokenauth');
@@ -547,7 +547,7 @@ describe("UIIntegrationTest", function () { // TODO: Rename to Piwik?
});
it('should load the email reports page correctly', function (done) {
- expect.screenshot('email_reports').to.be.captureSelector('#content', function (page) {
+ expect.screenshot('email_reports').to.be.captureSelector('.pageWrap', function (page) {
page.load("?" + generalParams + "&module=ScheduledReports&action=index");
page.evaluate(function () {
$('#header').hide();
@@ -556,7 +556,7 @@ describe("UIIntegrationTest", function () { // TODO: Rename to Piwik?
});
it('should load the feedback form when the feedback form link is clicked', function (done) {
- expect.screenshot('feedback_form').to.be.captureSelector('#content', function (page) {
+ expect.screenshot('feedback_form').to.be.captureSelector('.pageWrap', function (page) {
page.load("?" + generalParams + "&module=Feedback&action=index");
@@ -577,11 +577,8 @@ describe("UIIntegrationTest", function () { // TODO: Rename to Piwik?
it('should reload to the correct date when a date range is selected in the period selector', function (done) {
expect.screenshot('period_select_date_range_click').to.be.capture(function (page) {
page.load("?" + urlBase + "#" + generalParams + "&module=VisitTime&action=index");
- page.evaluate(function () {
- $(document).ready(function () {
- $('#date').click();
- });
- });
+ page.wait(1000);
+ page.click('#date.title');
// we need to make sure there to wait for a bit till date is opened and period selected
page.click('#period_id_range');
page.evaluate(function () {
diff --git a/tests/lib/screenshot-testing/support/page-renderer.js b/tests/lib/screenshot-testing/support/page-renderer.js
index 3a0ef301d0..c3486ddae5 100644
--- a/tests/lib/screenshot-testing/support/page-renderer.js
+++ b/tests/lib/screenshot-testing/support/page-renderer.js
@@ -137,6 +137,8 @@ PageRenderer.prototype._sendMouseEvent = function (type, pos, callback) {
PageRenderer.prototype._click = function (selector, modifiers, callback) {
var position = this._getPosition(selector);
+ this._makeSurePositionIsInViewPort(position.x, position.y);
+
if (modifiers.length) {
var self = this;
modifiers = modifiers.reduce(function (previous, mStr) {
@@ -152,6 +154,46 @@ PageRenderer.prototype._click = function (selector, modifiers, callback) {
callback();
};
+PageRenderer.prototype._makeSurePositionIsInViewPort = function (width, height) {
+
+ var currentWidth = this._getViewportWidth();
+ var currentHeight = this._getViewportHeight();
+
+ var update = false;
+
+ if (width && width > 0 && width >= currentWidth) {
+ currentWidth = width + 50;
+ update = true;
+ }
+
+ if (height && height > 0 && height >= currentHeight) {
+ currentHeight = height + 50;
+ update = true;
+ }
+
+ if (update) {
+ this._setCorrectViewportSize({width: currentWidth, height: currentHeight});
+ }
+};
+
+PageRenderer.prototype._getViewportWidth = function () {
+ var width = 1350;
+ if (this._viewportSizeOverride && this._viewportSizeOverride.width) {
+ width = this._viewportSizeOverride.width;
+ }
+
+ return width;
+};
+
+PageRenderer.prototype._getViewportHeight = function () {
+ var height = 768;
+ if (this._viewportSizeOverride && this._viewportSizeOverride.height) {
+ height = this._viewportSizeOverride.height;
+ }
+
+ return height;
+};
+
PageRenderer.prototype._keypress = function (keys, callback) {
this.webpage.sendEvent('keypress', keys);
@@ -574,8 +616,10 @@ PageRenderer.prototype._waitForNextEvent = function (events, callback, i, waitTi
}, waitTime);
};
-PageRenderer.prototype._setCorrectViewportSize = function () {
- var viewportSize = this._viewportSizeOverride || {width:1350, height:768};
+PageRenderer.prototype._setCorrectViewportSize = function (viewportSize) {
+ if (!viewportSize) {
+ viewportSize = {width: this._getViewportWidth(), height: this._getViewportHeight()};
+ }
this.webpage.viewportSize = viewportSize;
var height = Math.max(viewportSize.height, this.webpage.evaluate(function() {
diff --git a/tests/resources/screenshot-override/override.css b/tests/resources/screenshot-override/override.css
index 9616c5acb8..f74ae3545f 100644
--- a/tests/resources/screenshot-override/override.css
+++ b/tests/resources/screenshot-override/override.css
@@ -1,5 +1,5 @@
-#header_message>.header_short {
- display:none;
+#header_message>.title {
+ visibility: hidden;
}
.visitor-profile-widget-link>strong {