diff options
56 files changed, 516 insertions, 58 deletions
diff --git a/lang/en.json b/lang/en.json index 6033abdc4e..4b3ff4324f 100644 --- a/lang/en.json +++ b/lang/en.json @@ -650,7 +650,8 @@ "ReportGeneratedOn": "Report generated on %s", "ReportGeneratedXAgo": "Report generated %s ago", "MakeOneTimeDonation": "Make a one time donation, instead.", - "TableNoData": "No data for this table." + "TableNoData": "No data for this table.", + "ExternalHelp": "Help (opens in new tab)" }, "PrivacyManager": { "TeaserHeadline": "Privacy Settings", @@ -945,6 +946,10 @@ "ManuallySendEmailTo": "Please manually send your message to", "MessageSent": "Your message was sent to the Piwik team.", "ThankYou": "Thank you for helping us to make Piwik better!", + "RateFeatureTitle": "Do you like the '%s' feature? Please rate and leave a comment", + "RateFeatureThankYouTitle": "Thank you for rating the '%s' feature!", + "RateFeatureLeaveMessageLike": "We are glad you like it! Please let us know what you like the most or if you miss a feature.", + "RateFeatureLeaveMessageDislike": "We are sorry to hear! Please let us know what you don't like or which feature you miss so we can improve.", "ThePiwikTeam": "The Piwik Team", "ExceptionBodyLength": "Message must be at least %s characters long.", "ExceptionNoUrls": "The message cannot contain a URL, to avoid spam messages.", diff --git a/plugins/Actions/templates/indexSiteSearch.twig b/plugins/Actions/templates/indexSiteSearch.twig index 2b9ea3afbc..7d6093c6ac 100644 --- a/plugins/Actions/templates/indexSiteSearch.twig +++ b/plugins/Actions/templates/indexSiteSearch.twig @@ -1,17 +1,17 @@ <div id='leftcolumn'> - <h2>{{ 'Actions_WidgetSearchKeywords'|translate }}</h2> + <h2 piwik-enriched-headline>{{ 'Actions_WidgetSearchKeywords'|translate }}</h2> {{ keywords|raw }} - <h2>{{ 'Actions_WidgetSearchNoResultKeywords'|translate }}</h2> + <h2 piwik-enriched-headline>{{ 'Actions_WidgetSearchNoResultKeywords'|translate }}</h2> {{ noResultKeywords|raw }} {% if categories is defined %} - <h2>{{ 'Actions_WidgetSearchCategories'|translate }}</h2> + <h2 piwik-enriched-headline>{{ 'Actions_WidgetSearchCategories'|translate }}</h2> {{ categories|raw }} {% endif %} </div> <div id='rightcolumn'> - <h2>{{ 'Actions_WidgetPageUrlsFollowingSearch'|translate }}</h2> + <h2 piwik-enriched-headline>{{ 'Actions_WidgetPageUrlsFollowingSearch'|translate }}</h2> {{ pagesUrlsFollowingSiteSearch|raw }} </div> diff --git a/plugins/CoreHome/CoreHome.php b/plugins/CoreHome/CoreHome.php index 5e0fa821ef..e2fd3b3062 100644 --- a/plugins/CoreHome/CoreHome.php +++ b/plugins/CoreHome/CoreHome.php @@ -54,6 +54,7 @@ class CoreHome extends \Piwik\Plugin $stylesheets[] = "plugins/CoreHome/stylesheets/color_manager.css"; $stylesheets[] = "plugins/CoreHome/stylesheets/sparklineColors.less"; $stylesheets[] = "plugins/CoreHome/stylesheets/notification.less"; + $stylesheets[] = "plugins/CoreHome/angularjs/enrichedheadline/enrichedheadline.less"; } public function getJsFiles(&$jsFiles) @@ -109,6 +110,7 @@ class CoreHome extends \Piwik\Plugin $jsFiles[] = "plugins/CoreHome/angularjs/common/directives/ignore-click.js"; $jsFiles[] = "plugins/CoreHome/angularjs/common/directives/onenter.js"; $jsFiles[] = "plugins/CoreHome/angularjs/common/directives/focusif.js"; + $jsFiles[] = "plugins/CoreHome/angularjs/common/directives/dialog.js"; $jsFiles[] = "plugins/CoreHome/angularjs/piwikApp.js"; $jsFiles[] = "plugins/CoreHome/angularjs/anchorLinkFix.js"; @@ -116,6 +118,8 @@ class CoreHome extends \Piwik\Plugin $jsFiles[] = "plugins/CoreHome/angularjs/siteselector/siteselector-model.js"; $jsFiles[] = "plugins/CoreHome/angularjs/siteselector/siteselector-controller.js"; $jsFiles[] = "plugins/CoreHome/angularjs/siteselector/siteselector-directive.js"; + + $jsFiles[] = "plugins/CoreHome/angularjs/enrichedheadline/enrichedheadline-directive.js"; } public function getClientSideTranslationKeys(&$translationKeys) @@ -135,6 +139,7 @@ class CoreHome extends \Piwik\Plugin $translationKeys[] = 'CoreHome_PageOf'; $translationKeys[] = 'CoreHome_FlattenDataTable'; $translationKeys[] = 'CoreHome_UnFlattenDataTable'; + $translationKeys[] = 'CoreHome_ExternalHelp'; $translationKeys[] = 'SitesManager_NotFound'; $translationKeys[] = 'Annotations_ViewAndAddAnnotations'; $translationKeys[] = 'General_RowEvolutionRowActionTooltipTitle'; @@ -190,5 +195,7 @@ class CoreHome extends \Piwik\Plugin $translationKeys[] = 'General_DaySa'; $translationKeys[] = 'General_DaySu'; $translationKeys[] = 'General_Search'; + $translationKeys[] = 'General_MoreDetails'; + $translationKeys[] = 'General_Help'; } } diff --git a/plugins/CoreHome/angularjs/common/directives/dialog.js b/plugins/CoreHome/angularjs/common/directives/dialog.js new file mode 100644 index 0000000000..08d166a911 --- /dev/null +++ b/plugins/CoreHome/angularjs/common/directives/dialog.js @@ -0,0 +1,41 @@ +/*! + * Piwik - Web Analytics + * + * @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. + * + * <div piwik-dialog="showDialog" yes="executeMyFunction();"> + * ... <input type="button" role="yes" value="button"> + * </div> + * Will execute the "executeMyFunction" function in the current scope once the yes button is pressed. + */ +angular.module('piwikApp.directive').directive('piwikDialog', function(piwik) { + + return { + restrict: 'A', + link: function(scope, element, attrs) { + + element.css('display', 'none'); + + element.on( "dialogclose", function() { + scope.$eval(attrs.piwikDialog+'=false'); + }); + + scope.$watch(attrs.piwikDialog, function(newValue, oldValue) { + if (newValue) { + piwik.helper.modalConfirm(element, {yes: function() { + if (attrs.yes) { + scope.$eval(attrs.yes); + } + }}); + } + }); + } + } +});
\ No newline at end of file diff --git a/plugins/CoreHome/angularjs/enrichedheadline/enrichedheadline-directive.js b/plugins/CoreHome/angularjs/enrichedheadline/enrichedheadline-directive.js new file mode 100644 index 0000000000..2444de9682 --- /dev/null +++ b/plugins/CoreHome/angularjs/enrichedheadline/enrichedheadline-directive.js @@ -0,0 +1,64 @@ +/*! + * Piwik - Web Analytics + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */ + +/** + * Usage: + * + * <h2 piwik-enriched-headline>All Websites Dashboard</h2> + * -> uses "All Websites Dashboard" as featurename + * + * <h2 piwik-enriched-headline feature-name="All Websites Dashboard">All Websites Dashboard (Total: 309 Visits)</h2> + * -> custom featurename + * + * <h2 piwik-enriched-headline help-url="http://piwik.org/guide">All Websites Dashboard</h2> + * -> shows help icon and links to external url + * + * <h2 piwik-enriched-headline>All Websites Dashboard + * <div class="inlineHelp>My <strong>inline help</strong></div> + * </h2> + * -> shows help icon to display inline help on click. Note: You can combine inlinehelp and help-url + */ +angular.module('piwikApp').directive('piwikEnrichedHeadline', function($document, piwik, $filter){ + var defaults = { + helpUrl: '' + }; + + return { + transclude: true, + restrict: 'A', + scope: { + helpUrl: '@', + featureName: '@' + }, + templateUrl: 'plugins/CoreHome/angularjs/enrichedheadline/enrichedheadline.html?cb=' + piwik.cacheBuster, + compile: function (element, attrs) { + + for (var index in defaults) { + if (!attrs[index]) { attrs[index] = defaults[index]; } + } + + return function (scope, element, attrs) { + + var helpNode = $('[ng-transclude] .inlineHelp', element); + + if ((!helpNode || !helpNode.length) && element.next()) { + // hack for reports :( + helpNode = element.next().find('.reportDocumentation'); + } + + if (helpNode && helpNode.length) { + scope.inlineHelp = helpNode.html(); + helpNode.remove(); + } + + if (!attrs.featureName) { + attrs.featureName = $.trim(element.text()); + } + } + } + } +});
\ No newline at end of file diff --git a/plugins/CoreHome/angularjs/enrichedheadline/enrichedheadline.html b/plugins/CoreHome/angularjs/enrichedheadline/enrichedheadline.html new file mode 100644 index 0000000000..53f04ecac1 --- /dev/null +++ b/plugins/CoreHome/angularjs/enrichedheadline/enrichedheadline.html @@ -0,0 +1,29 @@ +<div class="enrichedHeadline" + ng-mouseenter="view.showIcons=true" ng-mouseleave="view.showIcons=false"> + <span ng-transclude></span> + + <span ng-show="view.showIcons"> + <a ng-if="helpUrl && !inlineHelp" + target="_blank" + href="{{ helpUrl }}" + title="{{ 'CoreHome_ExternalHelp'|translate }}" + class="helpIcon"></a> + + <a ng-if="inlineHelp" + title="{{ 'General_Help'|translate }}" + ng-click="view.showInlineHelp=!view.showInlineHelp" + class="helpIcon"></a> + + <div class="ratingIcons" + piwik-rate-feature + title="{{ featureName }}"></div> + </span> + + <div class="inlineHelp" ng-show="view.showIcons && view.showInlineHelp"> + <div ng-bind-html="inlineHelp"></div> + <a ng-if="helpUrl" + target="_blank" + href="{{ helpUrl }}" + class="readMore">{{ 'General_MoreDetails'|translate }}</a> + </div> +</div>
\ No newline at end of file diff --git a/plugins/CoreHome/angularjs/enrichedheadline/enrichedheadline.less b/plugins/CoreHome/angularjs/enrichedheadline/enrichedheadline.less new file mode 100644 index 0000000000..52fa7d0074 --- /dev/null +++ b/plugins/CoreHome/angularjs/enrichedheadline/enrichedheadline.less @@ -0,0 +1,42 @@ +.inlineHelp { + display: none; +} + +.enrichedHeadline { + .inlineHelp { + display:block; + background: #F7F7F7; + font-size: 12px; + font-weight: normal; + border: 1px solid #E4E5E4; + margin: 10px 0 10px 0; + padding: 10px; + border-radius: 4px; + max-width: 500px; + + .readMore { + margin-top: 10px; + display: inline-block; + font-weight: bold; + } + } + + .ratingIcons { + display:inline-block; + vertical-align: bottom; + } + + .helpIcon:hover { + opacity: 0.9; + } + + .helpIcon { + cursor: pointer; + display:inline-block; + margin: 4px 0 0 4px; + width: 16px; + opacity: 0.3; + height: 16px; + background: url(plugins/CoreHome/angularjs/enrichedheadline/help.png) no-repeat; + } +}
\ No newline at end of file diff --git a/plugins/CoreHome/angularjs/enrichedheadline/help.png b/plugins/CoreHome/angularjs/enrichedheadline/help.png Binary files differnew file mode 100644 index 0000000000..b18fa0aa61 --- /dev/null +++ b/plugins/CoreHome/angularjs/enrichedheadline/help.png diff --git a/plugins/CoreHome/angularjs/siteselector/siteselector-model.js b/plugins/CoreHome/angularjs/siteselector/siteselector-model.js index d89d895c04..15db8e0770 100644 --- a/plugins/CoreHome/angularjs/siteselector/siteselector-model.js +++ b/plugins/CoreHome/angularjs/siteselector/siteselector-model.js @@ -1,3 +1,9 @@ +/*! + * Piwik - Web Analytics + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */ angular.module('piwikApp').factory('siteSelectorModel', function (piwikApi, $filter) { diff --git a/plugins/CoreHome/javascripts/broadcast.js b/plugins/CoreHome/javascripts/broadcast.js index 80fbf71e79..3e02f4f3e4 100644 --- a/plugins/CoreHome/javascripts/broadcast.js +++ b/plugins/CoreHome/javascripts/broadcast.js @@ -428,6 +428,8 @@ var broadcast = { $(broadcast).trigger('locationChangeSuccess', {element: $('#content'), content: content}); piwikHelper.hideAjaxLoading(); broadcast.lastUrlRequested = null; + + piwikHelper.compileAngularComponents('#content'); } initTopControls(); diff --git a/plugins/CoreHome/javascripts/dataTable.js b/plugins/CoreHome/javascripts/dataTable.js index 7bff4aad32..0c7cc5f104 100644 --- a/plugins/CoreHome/javascripts/dataTable.js +++ b/plugins/CoreHome/javascripts/dataTable.js @@ -1403,6 +1403,7 @@ $.extend(DataTable.prototype, UIControl.prototype, { // documentation for report handleReportDocumentation: function (domElem) { + // don't display report documentation in dashboard if ($('#dashboard').size() > 0 // or in Widgetize screen @@ -1412,6 +1413,13 @@ $.extend(DataTable.prototype, UIControl.prototype, { ) { return; } + + var prev = domElem.prev(); + if (prev && prev.length && prev.attr('piwik-enriched-headline') === '') { + // help is covered by piwik-enriched-headline + return; + } + domElem = $(domElem); var doc = domElem.find('.reportDocumentation'); diff --git a/plugins/CoreHome/templates/_singleReport.twig b/plugins/CoreHome/templates/_singleReport.twig index f6ad622f21..6d6ab8a4e6 100644 --- a/plugins/CoreHome/templates/_singleReport.twig +++ b/plugins/CoreHome/templates/_singleReport.twig @@ -1,2 +1,2 @@ -<h2>{{ title }}</h2> +<h2 piwik-enriched-headline>{{ title }}</h2> {{ report|raw }}
\ No newline at end of file diff --git a/plugins/CorePluginsAdmin/templates/browsePlugins.twig b/plugins/CorePluginsAdmin/templates/browsePlugins.twig index 2f543ed15d..63845bf73d 100644 --- a/plugins/CorePluginsAdmin/templates/browsePlugins.twig +++ b/plugins/CorePluginsAdmin/templates/browsePlugins.twig @@ -5,7 +5,9 @@ <div class="pluginslistActionBar"> - <h2>{{ 'CorePluginsAdmin_TeaserExtendPiwikByPlugin'|translate }}</h2> + <h2 piwik-enriched-headline + feature-name="{{ 'CorePluginsAdmin_Marketplace'|translate }}" + >{{ 'CorePluginsAdmin_TeaserExtendPiwikByPlugin'|translate }}</h2> <div class="infoBox"> {{ 'CorePluginsAdmin_BeCarefulUsingPlugins'|translate }} diff --git a/plugins/CorePluginsAdmin/templates/browseThemes.twig b/plugins/CorePluginsAdmin/templates/browseThemes.twig index a445467a11..2f834247a0 100644 --- a/plugins/CorePluginsAdmin/templates/browseThemes.twig +++ b/plugins/CorePluginsAdmin/templates/browseThemes.twig @@ -4,7 +4,9 @@ <div class="pluginslistActionBar"> - <h2>{{ 'CorePluginsAdmin_TeaserExtendPiwikByTheme'|translate }}</h2> + <h2 piwik-enriched-headline + feature-name="{{ 'CorePluginsAdmin_Marketplace'|translate }}" + >{{ 'CorePluginsAdmin_TeaserExtendPiwikByTheme'|translate }}</h2> <div class="infoBox"> {{ 'CorePluginsAdmin_BeCarefulUsingThemes'|translate }} diff --git a/plugins/CorePluginsAdmin/templates/extend.twig b/plugins/CorePluginsAdmin/templates/extend.twig index 4b04fa588f..b95b6018c8 100644 --- a/plugins/CorePluginsAdmin/templates/extend.twig +++ b/plugins/CorePluginsAdmin/templates/extend.twig @@ -22,7 +22,9 @@ <div class="introduction"> - <h2>{{ 'CorePluginsAdmin_TeaserExtendPiwik'|translate }}</h2> + <h2 piwik-enriched-headline + feature-name="{{ 'CorePluginsAdmin_Marketplace'|translate }}" + >{{ 'CorePluginsAdmin_TeaserExtendPiwik'|translate }}</h2> <p>{{ 'CorePluginsAdmin_DownloadAndInstallPluginsFromMarketplace'|translate("<a href='?module=Proxy&action=redirect&url=http://plugins.piwik.org/' target='_blank'>", "</a>")|raw }}</p> diff --git a/plugins/CorePluginsAdmin/templates/plugins.twig b/plugins/CorePluginsAdmin/templates/plugins.twig index 18732a7a5f..4eeb7ee032 100644 --- a/plugins/CorePluginsAdmin/templates/plugins.twig +++ b/plugins/CorePluginsAdmin/templates/plugins.twig @@ -13,7 +13,7 @@ {{ plugins.tablePluginUpdates(pluginsHavingUpdate, updateNonce, activateNonce, 0) }} {% endif %} - <h2>{{ 'CorePluginsAdmin_PluginsManagement'|translate }}</h2> + <h2 piwik-enriched-headline>{{ 'CorePluginsAdmin_PluginsManagement'|translate }}</h2> <p>{{ 'CorePluginsAdmin_MainDescription'|translate }} diff --git a/plugins/CorePluginsAdmin/templates/themes.twig b/plugins/CorePluginsAdmin/templates/themes.twig index 2f117dfcf1..5ac8ff6d9a 100644 --- a/plugins/CorePluginsAdmin/templates/themes.twig +++ b/plugins/CorePluginsAdmin/templates/themes.twig @@ -13,7 +13,7 @@ {{ plugins.tablePluginUpdates(pluginsHavingUpdate, updateNonce, true) }} {% endif %} - <h2>{{ 'CorePluginsAdmin_ThemesManagement'|translate }}</h2> + <h2 piwik-enriched-headline>{{ 'CorePluginsAdmin_ThemesManagement'|translate }}</h2> <p>{{ 'CorePluginsAdmin_ThemesDescription'|translate }} {% if otherUsersCount > 0 %} diff --git a/plugins/CustomAlerts b/plugins/CustomAlerts -Subproject 64842d455200860bf6fb09183a165e691ea47c6 +Subproject c9edd879003ca7a9f75d81fe07ec6ff0c2340f9 diff --git a/plugins/DevicesDetection/templates/index.twig b/plugins/DevicesDetection/templates/index.twig index 5c41f889a9..3391ed5f36 100644 --- a/plugins/DevicesDetection/templates/index.twig +++ b/plugins/DevicesDetection/templates/index.twig @@ -1,15 +1,15 @@ <div id='leftcolumn'> - <h2>{{ "DevicesDetection_DeviceType"|translate }}</h2> + <h2 piwik-enriched-headline>{{ "DevicesDetection_DeviceType"|translate }}</h2> {{ deviceTypes | raw}} - <h2>{{ "DevicesDetection_DeviceBrand"|translate }}</h2> + <h2 piwik-enriched-headline>{{ "DevicesDetection_DeviceBrand"|translate }}</h2> {{ deviceBrands | raw }} - <h2>{{ "DevicesDetection_DeviceModel"|translate }}</h2> + <h2 piwik-enriched-headline>{{ "DevicesDetection_DeviceModel"|translate }}</h2> {{ deviceModels | raw }} </div> <div id='rightcolumn'> - <h2>{{ "DevicesDetection_OperatingSystemFamilies"|translate }}</h2> + <h2 piwik-enriched-headline>{{ "DevicesDetection_OperatingSystemFamilies"|translate }}</h2> {{ osReport | raw}} - <h2>{{ "UserSettings_BrowserFamilies"|translate }}</h2> + <h2 piwik-enriched-headline>{{ "UserSettings_BrowserFamilies"|translate }}</h2> {{ browserReport | raw }} </div> diff --git a/plugins/Feedback/API.php b/plugins/Feedback/API.php new file mode 100644 index 0000000000..96ae313d6d --- /dev/null +++ b/plugins/Feedback/API.php @@ -0,0 +1,73 @@ +<?php +/** + * Piwik - Open source web analytics + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + * + */ +namespace Piwik\Plugins\Feedback; +use Piwik\Common; +use Piwik\Config; +use Piwik\IP; +use Piwik\Mail; +use Piwik\Piwik; +use Piwik\Url; +use Piwik\Version; + +/** + * API for plugin Feedback + * + * @method static \Piwik\Plugins\Feedback\API getInstance() + */ +class API extends \Piwik\Plugin\API +{ + public function sendFeedbackForFeature($featureName, $like, $message) + { + Piwik::checkUserIsNotAnonymous(); + Piwik::checkUserHasSomeViewAccess(); + + $translationKeyForFeature = $this->findTranslationKeyForFeatureName($featureName); + + if (empty($translationKeyForFeature)) { + $translationKeyForFeature = $featureName; + } + + $likeText = 'Yes'; + if (empty($like)) { + $likeText = 'No'; + } + + $body = sprintf("Feature: %s\nLike: %s\nFeedback:\n%s\n", $translationKeyForFeature, $likeText, $message); + + $this->sendMail($featureName, $body); + } + + private function sendMail($name, $body) + { + $feedbackEmailAddress = Config::getInstance()->General['feedback_email_address']; + + $subject = '[ Feedback Feature - Piwik ] ' . $name; + $body = Common::unsanitizeInputValue($body) . "\n" + . 'Piwik ' . Version::VERSION . "\n" + . 'IP: ' . IP::getIpFromHeader() . "\n" + . 'URL: ' . Url::getReferrer() . "\n"; + + $mail = new Mail(); + $mail->setFrom(Piwik::getCurrentUserEmail()); + $mail->addTo($feedbackEmailAddress, 'Piwik Team'); + $mail->setSubject($subject); + $mail->setBodyText($body); + @$mail->send(); + } + + private function findTranslationKeyForFeatureName($featureName) + { + foreach ($GLOBALS['Piwik_translations'] as $key => $translations) { + $possibleKey = array_search($featureName, $translations); + if (!empty($possibleKey)) { + return $key . '_' . $possibleKey; + } + } + } +} diff --git a/plugins/Feedback/Feedback.php b/plugins/Feedback/Feedback.php index 82fa716d26..6d6969f548 100644 --- a/plugins/Feedback/Feedback.php +++ b/plugins/Feedback/Feedback.php @@ -45,15 +45,27 @@ class Feedback extends \Piwik\Plugin public function getStylesheetFiles(&$stylesheets) { $stylesheets[] = "plugins/Feedback/stylesheets/feedback.less"; + + $stylesheets[] = "plugins/Feedback/angularjs/ratefeature/ratefeature.less"; } public function getJsFiles(&$jsFiles) { $jsFiles[] = "plugins/Feedback/javascripts/feedback.js"; + + $jsFiles[] = "plugins/Feedback/angularjs/ratefeature/ratefeature-model.js"; + $jsFiles[] = "plugins/Feedback/angularjs/ratefeature/ratefeature-controller.js"; + $jsFiles[] = "plugins/Feedback/angularjs/ratefeature/ratefeature-directive.js"; } public function getClientSideTranslationKeys(&$translationKeys) { $translationKeys[] = 'General_Loading'; + $translationKeys[] = 'Feedback_ThankYou'; + $translationKeys[] = 'Feedback_RateFeatureTitle'; + $translationKeys[] = 'Feedback_RateFeatureThankYouTitle'; + $translationKeys[] = 'Feedback_RateFeatureLeaveMessageLike'; + $translationKeys[] = 'Feedback_RateFeatureLeaveMessageDislike'; + $translationKeys[] = 'Feedback_SendFeedback'; } } diff --git a/plugins/Feedback/angularjs/ratefeature/icon_license b/plugins/Feedback/angularjs/ratefeature/icon_license new file mode 100644 index 0000000000..78a631917a --- /dev/null +++ b/plugins/Feedback/angularjs/ratefeature/icon_license @@ -0,0 +1,7 @@ +thumbs-up.png +https://www.iconfinder.com/icons/83403/thumbs_up_icon#size=32 +Creative Commons (Attribution-Share Alike 3.0 Unported) + +thumbs-down.png +https://www.iconfinder.com/icons/83402/down_thumbs_icon#size=32 +Creative Commons (Attribution-Share Alike 3.0 Unported)
\ No newline at end of file diff --git a/plugins/Feedback/angularjs/ratefeature/ratefeature-controller.js b/plugins/Feedback/angularjs/ratefeature/ratefeature-controller.js new file mode 100644 index 0000000000..b68602fad7 --- /dev/null +++ b/plugins/Feedback/angularjs/ratefeature/ratefeature-controller.js @@ -0,0 +1,22 @@ +/*! + * Piwik - Web Analytics + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */ + +angular.module('piwikApp').controller('RateFeatureController', function($scope, rateFeatureModel, $filter){ + + $scope.dislikeFeature = function () { + $scope.like = false; + }; + + $scope.likeFeature = function () { + $scope.like = true; + }; + + $scope.sendFeedback = function (message) { + rateFeatureModel.sendFeedbackForFeature($scope.title, $scope.like, message); + alert($filter('translate')('Feedback_ThankYou')); + }; +}); diff --git a/plugins/Feedback/angularjs/ratefeature/ratefeature-directive.js b/plugins/Feedback/angularjs/ratefeature/ratefeature-directive.js new file mode 100644 index 0000000000..0aa902bea6 --- /dev/null +++ b/plugins/Feedback/angularjs/ratefeature/ratefeature-directive.js @@ -0,0 +1,22 @@ +/*! + * Piwik - Web Analytics + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */ + +/** + * Usage: + * <div piwik-rate-feature title="My Feature Name"> + */ +angular.module('piwikApp').directive('piwikRateFeature', function($document, piwik, $filter){ + + return { + restrict: 'A', + scope: { + title: '@' + }, + templateUrl: 'plugins/Feedback/angularjs/ratefeature/ratefeature.html?cb=' + piwik.cacheBuster, + controller: 'RateFeatureController' + } +});
\ No newline at end of file diff --git a/plugins/Feedback/angularjs/ratefeature/ratefeature-model.js b/plugins/Feedback/angularjs/ratefeature/ratefeature-model.js new file mode 100644 index 0000000000..c724cbc810 --- /dev/null +++ b/plugins/Feedback/angularjs/ratefeature/ratefeature-model.js @@ -0,0 +1,22 @@ +/*! + * Piwik - Web Analytics + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */ + +angular.module('piwikApp').factory('rateFeatureModel', function (piwikApi) { + + var model = {}; + + model.sendFeedbackForFeature = function (featureName, like, message) { + return piwikApi.fetch({ + method: 'Feedback.sendFeedbackForFeature', + featureName: featureName, + like: like ? '1' : '0', + message: message + '' + }); + }; + + return model; +}); diff --git a/plugins/Feedback/angularjs/ratefeature/ratefeature.html b/plugins/Feedback/angularjs/ratefeature/ratefeature.html new file mode 100644 index 0000000000..bdfec8e301 --- /dev/null +++ b/plugins/Feedback/angularjs/ratefeature/ratefeature.html @@ -0,0 +1,31 @@ +<div title="{{ 'Feedback_RateFeatureTitle'|translate:title }}" class="ratefeature"> + + <div class="iconContainer" + ng-mouseenter="view.expanded=true;" + ng-mouseleave="view.expanded=false"> + + <img ng-click="likeFeature();view.showFeedbackForm=true;" + class="like-icon" + src="plugins/Feedback/angularjs/ratefeature/thumbs-up.png"/> + + <img ng-click="dislikeFeature();view.showFeedbackForm=true;" + class="dislike-icon" + ng-show="view.expanded" + src="plugins/Feedback/angularjs/ratefeature/thumbs-down.png"/> + </div> + + <div class="ratefeatureDialog" piwik-dialog="view.showFeedbackForm" yes="sendFeedback(view.feedbackMessage)"> + <h1>{{ 'Feedback_RateFeatureThankYouTitle'|translate:title }}</h1> + + <p ng-if="like">{{ 'Feedback_RateFeatureLeaveMessageLike'|translate }}</p> + <p ng-if="!like">{{ 'Feedback_RateFeatureLeaveMessageDislike'|translate }}</p> + <br /> + + <div class="messageContainer"> + <textarea ng-model="view.feedbackMessage"></textarea> + </div> + + <input type="button" value="{{ 'Feedback_SendFeedback'|translate }}" role="yes"/> + </div> + +</div>
\ No newline at end of file diff --git a/plugins/Feedback/angularjs/ratefeature/ratefeature.less b/plugins/Feedback/angularjs/ratefeature/ratefeature.less new file mode 100644 index 0000000000..4c55214456 --- /dev/null +++ b/plugins/Feedback/angularjs/ratefeature/ratefeature.less @@ -0,0 +1,31 @@ +.ratefeatureDialog { + .messageContainer { + text-align: center; + } + + textarea { + width: 100%; + height: 80px; + } +} + +.ratefeature { + + font-size: 1px; + + .iconContainer { + display: inline-block; + } + + .dislike-icon, + .like-icon { + opacity: 0.2; + width:24px; + height:24px; + cursor: pointer; + + &:hover { + opacity: 0.9; + } + } +}
\ No newline at end of file diff --git a/plugins/Feedback/angularjs/ratefeature/thumbs-down.png b/plugins/Feedback/angularjs/ratefeature/thumbs-down.png Binary files differnew file mode 100644 index 0000000000..c9ce204822 --- /dev/null +++ b/plugins/Feedback/angularjs/ratefeature/thumbs-down.png diff --git a/plugins/Feedback/angularjs/ratefeature/thumbs-up.png b/plugins/Feedback/angularjs/ratefeature/thumbs-up.png Binary files differnew file mode 100644 index 0000000000..a94421bafe --- /dev/null +++ b/plugins/Feedback/angularjs/ratefeature/thumbs-up.png diff --git a/plugins/Goals/templates/_addEditGoal.twig b/plugins/Goals/templates/_addEditGoal.twig index 41f094163f..c8feb87bc5 100644 --- a/plugins/Goals/templates/_addEditGoal.twig +++ b/plugins/Goals/templates/_addEditGoal.twig @@ -1,5 +1,5 @@ {% if onlyShowAddNewGoal is defined %} - <h2>{{ 'Goals_AddNewGoal'|translate }}</h2> + <h2 piwik-enriched-headline>{{ 'Goals_AddNewGoal'|translate }}</h2> <p>{{ 'Goals_NewGoalIntro'|translate }}</p> <p>{{ 'Goals_NewGoalDescription'|translate }} {{ 'Goals_NewWhatDoYouWantUsersToDo'|translate }} @@ -8,7 +8,7 @@ </p> {% else %} <div class="clear"></div> - <h2>{{ 'Goals_GoalsManagement'|translate }}</h2> + <h2 piwik-enriched-headline>{{ 'Goals_GoalsManagement'|translate }}</h2> <div class="entityList"> <ul class='listCircle'> <li><a onclick='' name='linkAddNewGoal'>{{ 'Goals_CreateNewGOal'|translate }}</a></li> diff --git a/plugins/Goals/templates/_titleAndEvolutionGraph.twig b/plugins/Goals/templates/_titleAndEvolutionGraph.twig index c19f253e4a..d3a1d304da 100644 --- a/plugins/Goals/templates/_titleAndEvolutionGraph.twig +++ b/plugins/Goals/templates/_titleAndEvolutionGraph.twig @@ -1,7 +1,7 @@ <span data-graph-id="{{ nameGraphEvolution }}"></span> {% if displayFullReport %} - <h2>{% if goalName is defined %}{{ 'Goals_GoalX'|translate(goalName)|raw }}{% else %}{{ 'Goals_GoalsOverview'|translate }}{% endif %}</h2> + <h2 piwik-enriched-headline>{% if goalName is defined %}{{ 'Goals_GoalX'|translate(goalName)|raw }}{% else %}{{ 'Goals_GoalsOverview'|translate }}{% endif %}</h2> {% endif %} {{ graphEvolution|raw }} diff --git a/plugins/Installation/templates/systemCheckPage.twig b/plugins/Installation/templates/systemCheckPage.twig index eea9ca86b9..f6533496d0 100755 --- a/plugins/Installation/templates/systemCheckPage.twig +++ b/plugins/Installation/templates/systemCheckPage.twig @@ -2,7 +2,7 @@ {% block content %} {% if isSuperUser %} - <h2>{{ 'Installation_SystemCheck'|translate }}</h2> + <h2 piwik-enriched-headline>{{ 'Installation_SystemCheck'|translate }}</h2> <p style="margin-left:1em;"> {% if infos.has_errors %} <img src="plugins/Zeitgeist/images/error.png"/> diff --git a/plugins/MobileMessaging/templates/index.twig b/plugins/MobileMessaging/templates/index.twig index 082c9e4f3c..7b643b1d14 100644 --- a/plugins/MobileMessaging/templates/index.twig +++ b/plugins/MobileMessaging/templates/index.twig @@ -2,7 +2,9 @@ {% block content %} {% if accountManagedByCurrentUser %} - <h2>{{ 'MobileMessaging_Settings_SMSAPIAccount'|translate }}</h2> + <h2 piwik-enriched-headline + feature-name="{{ 'MobileMessaging_SettingsMenu'|translate }}" + >{{ 'MobileMessaging_Settings_SMSAPIAccount'|translate }}</h2> {% if credentialSupplied %} {{ 'MobileMessaging_Settings_CredentialProvided'|translate(provider) }} {{ creditLeft }} diff --git a/plugins/MultiSites/angularjs/dashboard/dashboard.html b/plugins/MultiSites/angularjs/dashboard/dashboard.html index 0eba760b98..6c1074b336 100644 --- a/plugins/MultiSites/angularjs/dashboard/dashboard.html +++ b/plugins/MultiSites/angularjs/dashboard/dashboard.html @@ -1,5 +1,7 @@ <div> - <h2> + <h2 piwik-enriched-headline + help-url="http://piwik.org/docs/manage-websites/#all-websites-dashboard" + feature-name="{{ 'General_AllWebsitesDashboard'|translate }}"> {{ 'General_AllWebsitesDashboard'|translate }} <span class='smallTitle' title="{{ 'General_EvolutionSummaryGeneric'|translate:('General_NVisits'|translate:model.totalVisits):date:model.lastVisits:model.lastVisitsDate:(model.totalVisits|evolution:model.lastVisits)}}" diff --git a/plugins/PrivacyManager/templates/privacySettings.twig b/plugins/PrivacyManager/templates/privacySettings.twig index 89ed7c0d61..2fec22eb68 100644 --- a/plugins/PrivacyManager/templates/privacySettings.twig +++ b/plugins/PrivacyManager/templates/privacySettings.twig @@ -3,7 +3,8 @@ {% block content %} {% import 'macros.twig' as piwik %} {% if isSuperUser %} - <h2>{{ 'PrivacyManager_TeaserHeadline'|translate }}</h2> + <h2 piwik-enriched-headline + help-url="http://piwik.org/docs/privacy/">{{ 'PrivacyManager_TeaserHeadline'|translate }}</h2> <p>{{ 'PrivacyManager_Teaser'|translate('<a href="#anonymizeIPAnchor">',"</a>",'<a href="#deleteLogsAnchor">',"</a>",'<a href="#optOutAnchor">',"</a>")|raw }} {{'PrivacyManager_SeeAlsoOurOfficialGuidePrivacy'|translate('<strong><a href="http://piwik.org/privacy/" target="_blank">','</a></strong>')|raw }}</p> <h2 id="anonymizeIPAnchor">{{ 'PrivacyManager_UseAnonymizeIp'|translate }}</h2> diff --git a/plugins/Referrers/templates/getSearchEnginesAndKeywords.twig b/plugins/Referrers/templates/getSearchEnginesAndKeywords.twig index c24463ba7d..ce2f5f2e8d 100644 --- a/plugins/Referrers/templates/getSearchEnginesAndKeywords.twig +++ b/plugins/Referrers/templates/getSearchEnginesAndKeywords.twig @@ -1,9 +1,9 @@ <div id='leftcolumn'> - <h2>{{ 'Referrers_Keywords'|translate }}</h2> + <h2 piwik-enriched-headline>{{ 'Referrers_Keywords'|translate }}</h2> {{ keywords|raw }} </div> <div id='rightcolumn'> - <h2>{{ 'Referrers_SearchEngines'|translate }}</h2> + <h2 piwik-enriched-headline>{{ 'Referrers_SearchEngines'|translate }}</h2> {{ searchEngines|raw }} </div> diff --git a/plugins/Referrers/templates/index.twig b/plugins/Referrers/templates/index.twig index 8f0272fe58..6a5db26270 100644 --- a/plugins/Referrers/templates/index.twig +++ b/plugins/Referrers/templates/index.twig @@ -1,9 +1,10 @@ -<h2 data-graph-id="{{ nameGraphEvolutionReferrers }}">{{ 'General_EvolutionOverPeriod'|translate }}</h2> +<h2 piwik-enriched-headline + data-graph-id="{{ nameGraphEvolutionReferrers }}">{{ 'General_EvolutionOverPeriod'|translate }}</h2> {{ graphEvolutionReferrers|raw }} <br/> <div id='leftcolumn' style="position:relative;"> - <h2>{{ 'Referrers_Type'|translate }}</h2> + <h2 piwik-enriched-headline>{{ 'Referrers_Type'|translate }}</h2> <div id='leftcolumn'> <div class="sparkline">{{ sparkline(urlSparklineDirectEntry) }} @@ -103,14 +104,14 @@ </div> <div id='rightcolumn'> - <h2>{{ 'Referrers_DetailsByReferrerType'|translate }}</h2> + <h2 piwik-enriched-headline>{{ 'Referrers_DetailsByReferrerType'|translate }}</h2> {{ dataTableReferrerType|raw }} </div> <div style="clear:both;"></div> {% if totalVisits > 0 %} - <h2>{{ 'Referrers_ReferrersOverview'|translate }}</h2> + <h2 piwik-enriched-headline>{{ 'Referrers_ReferrersOverview'|translate }}</h2> {{ referrersReportsByDimension|raw }} {% endif %} diff --git a/plugins/Referrers/templates/indexWebsites.twig b/plugins/Referrers/templates/indexWebsites.twig index 10a844eeb5..adfea9d6e1 100644 --- a/plugins/Referrers/templates/indexWebsites.twig +++ b/plugins/Referrers/templates/indexWebsites.twig @@ -1,9 +1,9 @@ <div id='leftcolumn'> - <h2>{{ 'Referrers_Websites'|translate }}</h2> + <h2 piwik-enriched-headline>{{ 'Referrers_Websites'|translate }}</h2> {{ websites|raw }} </div> <div id='rightcolumn'> - <h2>{{ 'Referrers_Socials'|translate }}</h2> + <h2 piwik-enriched-headline>{{ 'Referrers_Socials'|translate }}</h2> {{ socials|raw }} </div> diff --git a/plugins/ScheduledReports/templates/index.twig b/plugins/ScheduledReports/templates/index.twig index 3e41ac0147..b8ccecf53a 100644 --- a/plugins/ScheduledReports/templates/index.twig +++ b/plugins/ScheduledReports/templates/index.twig @@ -9,7 +9,8 @@ </div> <div class="centerLargeDiv"> - <h2>{{ 'ScheduledReports_ManageEmailReports'|translate }}</h2> + <h2 piwik-enriched-headline + help-url="http://piwik.org/docs/email-reports/">{{ 'ScheduledReports_ManageEmailReports'|translate }}</h2> <span id="reportSentSuccess"></span> <span id="reportUpdatedSuccess"></span> diff --git a/plugins/SecurityInfo b/plugins/SecurityInfo -Subproject f9aabdf4a4112b3c0505257978435dcee403947 +Subproject cd98a60c785ce56b45e4d142e9af3a470619a60 diff --git a/plugins/SegmentEditor/javascripts/Segmentation.js b/plugins/SegmentEditor/javascripts/Segmentation.js index 17f15637ff..5d843e6fcf 100644 --- a/plugins/SegmentEditor/javascripts/Segmentation.js +++ b/plugins/SegmentEditor/javascripts/Segmentation.js @@ -842,6 +842,7 @@ Segmentation = (function($) { self.target.closest('.segmentEditorPanel').addClass('editing'); + piwikHelper.compileAngularComponents(self.target); }; var closeForm = function () { diff --git a/plugins/SegmentEditor/templates/_segmentSelector.twig b/plugins/SegmentEditor/templates/_segmentSelector.twig index 22ebb8fd10..f83e738867 100644 --- a/plugins/SegmentEditor/templates/_segmentSelector.twig +++ b/plugins/SegmentEditor/templates/_segmentSelector.twig @@ -1,7 +1,6 @@ <div class="SegmentEditor" style="display:none;"> <div class="segmentationContainer listHtml"> <span class="segmentationTitle"></span> - <div class="dropdown-body"> <ul class="submenu"> <li>{{ 'SegmentEditor_SelectSegmentOfVisitors'|translate }} @@ -11,6 +10,7 @@ </div> </li> </ul> + {% if authorizedToCreateSegments %} <a class="add_new_segment">{{ 'SegmentEditor_AddNewSegment'|translate }}</a> {% else %} @@ -131,6 +131,7 @@ <h3>{{ 'General_Name'|translate }}: <span class="segmentName"></span> <a class="editSegmentName" href="#">{{ 'General_Edit'|translate|lower }}</a></h3> </div> <div class="segment-footer"> + <div piwik-rate-feature title="'Segment Editor'" style="display:inline-block;float: left;margin-top: 2px;margin-right: 10px;"></div> <span class="segmentFooterNote">The Segment Editor was <a class='crowdfundingLink' href='http://crowdfunding.piwik.org/custom-segments-editor/' target='_blank'>crowdfunded</a> with the awesome support of 80 companies and Piwik users worldwide!</span> <a class="delete" href="#">{{ 'General_Delete'|translate }}</a> <a class="close" href="#">{{ 'General_Close'|translate }}</a> diff --git a/plugins/SitesManager/templates/index.twig b/plugins/SitesManager/templates/index.twig index 3298488964..dcf73012b3 100644 --- a/plugins/SitesManager/templates/index.twig +++ b/plugins/SitesManager/templates/index.twig @@ -104,7 +104,7 @@ }); </script> - <h2>{{ 'SitesManager_WebsitesManagement'|translate }}</h2> + <h2 piwik-enriched-headline>{{ 'SitesManager_WebsitesManagement'|translate }}</h2> <p>{{ 'SitesManager_MainDescription'|translate }} {{ 'SitesManager_YouCurrentlyHaveAccessToNWebsites'|translate("<strong>" ~ adminSitesCount ~ "</strong>")|raw }} {% if isSuperUser %} diff --git a/plugins/TasksTimetable b/plugins/TasksTimetable -Subproject 72dd8092a95621026ad85d29b79c0283ed18fc0 +Subproject f6e252d5dc5e3cf004263f7450c2ca55bd2c5a7 diff --git a/plugins/TreemapVisualization b/plugins/TreemapVisualization -Subproject 19978cb7cd926ec0fba111ce257b8f0450f34ce +Subproject 2cb15300a88f7ff2a1fc27ef633a1a1f4d5fef0 diff --git a/plugins/UserCountry/templates/adminIndex.twig b/plugins/UserCountry/templates/adminIndex.twig index 2192f3fc91..5ea5459f7f 100755 --- a/plugins/UserCountry/templates/adminIndex.twig +++ b/plugins/UserCountry/templates/adminIndex.twig @@ -3,7 +3,9 @@ {% block content %} {% import 'macros.twig' as piwik %} -<h2 id="location-providers">{{ 'UserCountry_Geolocation'|translate }}</h2> +<h2 piwik-enriched-headline + help-url="http://piwik.org/docs/geo-locate/" + id="location-providers">{{ 'UserCountry_Geolocation'|translate }}</h2> <div style="width:900px;"> diff --git a/plugins/UserCountry/templates/index.twig b/plugins/UserCountry/templates/index.twig index c6e211de18..72d49613eb 100644 --- a/plugins/UserCountry/templates/index.twig +++ b/plugins/UserCountry/templates/index.twig @@ -1,7 +1,7 @@ <div id="leftcolumn"> {{ postEvent("Template.leftColumnUserCountry") }} - <h2>{{ 'UserCountry_Continent'|translate }}</h2> + <h2 piwik-enriched-headline>{{ 'UserCountry_Continent'|translate }}</h2> {{ dataTableContinent|raw }} <div class="sparkline"> @@ -14,13 +14,13 @@ </div> <div id="rightcolumn"> - <h2>{{ 'UserCountry_Country'|translate }}</h2> + <h2 piwik-enriched-headline>{{ 'UserCountry_Country'|translate }}</h2> {{ dataTableCountry|raw }} - <h2>{{ 'UserCountry_Region'|translate }}</h2> + <h2 piwik-enriched-headline>{{ 'UserCountry_Region'|translate }}</h2> {{ dataTableRegion|raw }} - <h2>{{ 'UserCountry_City'|translate }}</h2> + <h2 piwik-enriched-headline>{{ 'UserCountry_City'|translate }}</h2> {{ dataTableCity|raw }} </div> diff --git a/plugins/UserSettings/templates/index.twig b/plugins/UserSettings/templates/index.twig index ec55faccbc..7835908e5c 100644 --- a/plugins/UserSettings/templates/index.twig +++ b/plugins/UserSettings/templates/index.twig @@ -1,27 +1,27 @@ <div id='leftcolumn'> - <h2>{{ 'UserSettings_BrowserFamilies'|translate }}</h2> + <h2 piwik-enriched-headline>{{ 'UserSettings_BrowserFamilies'|translate }}</h2> {{ dataTableBrowserType|raw }} - <h2>{{ 'UserSettings_Browsers'|translate }}</h2> + <h2 piwik-enriched-headline>{{ 'UserSettings_Browsers'|translate }}</h2> {{ dataTableBrowser|raw }} - <h2>{{ 'General_Plugins'|translate }}</h2> + <h2 piwik-enriched-headline>{{ 'General_Plugins'|translate }}</h2> {{ dataTablePlugin|raw }} </div> <div id='rightcolumn'> - <h2>{{ 'UserSettings_Configurations'|translate }}</h2> + <h2 piwik-enriched-headline>{{ 'UserSettings_Configurations'|translate }}</h2> {{ dataTableConfiguration|raw }} - <h2>{{ 'UserSettings_OperatingSystems'|translate }}</h2> + <h2 piwik-enriched-headline>{{ 'UserSettings_OperatingSystems'|translate }}</h2> {{ dataTableOS|raw }} - <h2>{{ 'UserSettings_Resolutions'|translate }}</h2> + <h2 piwik-enriched-headline>{{ 'UserSettings_Resolutions'|translate }}</h2> {{ dataTableResolution|raw }} - <h2>{{ 'UserSettings_MobileVsDesktop'|translate }}</h2> + <h2 piwik-enriched-headline>{{ 'UserSettings_MobileVsDesktop'|translate }}</h2> {{ dataTableMobileVsDesktop|raw }} - <h2>{{ 'UserSettings_BrowserLanguage'|translate }}</h2> + <h2 piwik-enriched-headline>{{ 'UserSettings_BrowserLanguage'|translate }}</h2> {{ dataTableBrowserLanguage|raw }} </div> diff --git a/plugins/UsersManager/templates/index.twig b/plugins/UsersManager/templates/index.twig index b97ff19647..45fdeeeb40 100644 --- a/plugins/UsersManager/templates/index.twig +++ b/plugins/UsersManager/templates/index.twig @@ -2,7 +2,8 @@ {% block content %} -<h2>{{ 'UsersManager_ManageAccess'|translate }}</h2> +<h2 piwik-enriched-headline + help-url="http://piwik.org/docs/manage-users/">{{ 'UsersManager_ManageAccess'|translate }}</h2> <div id="sites" class="usersManager"> <section class="sites_selector_container"> <p>{{ 'UsersManager_MainDescription'|translate }}</p> diff --git a/plugins/UsersManager/templates/userSettings.twig b/plugins/UsersManager/templates/userSettings.twig index d98de49b94..397f31e46e 100644 --- a/plugins/UsersManager/templates/userSettings.twig +++ b/plugins/UsersManager/templates/userSettings.twig @@ -1,10 +1,9 @@ {% extends 'admin.twig' %} {% block content %} -<h2>{{ 'UsersManager_MenuUserSettings'|translate }}</h2> +<h2 piwik-enriched-headline>{{ 'UsersManager_MenuUserSettings'|translate }}</h2> <br/> - <div class="ui-confirm" id="confirmPasswordChange"> <h2>{{ 'UsersManager_ChangePasswordConfirm'|translate }}</h2> <input role="yes" type="button" value="{{ 'General_Yes'|translate }}"/> diff --git a/plugins/VisitFrequency/templates/index.twig b/plugins/VisitFrequency/templates/index.twig index 52b70bb55a..6abd255b17 100644 --- a/plugins/VisitFrequency/templates/index.twig +++ b/plugins/VisitFrequency/templates/index.twig @@ -1,6 +1,6 @@ {{ postEvent("Template.headerVisitsFrequency") }} -<h2 data-graph-id="VisitFrequency.getEvolutionGraph">{{ 'VisitFrequency_ColumnReturningVisits'|translate }}</h2> +<h2 piwik-enriched-headline data-graph-id="VisitFrequency.getEvolutionGraph">{{ 'VisitFrequency_ColumnReturningVisits'|translate }}</h2> {{ graphEvolutionVisitFrequency|raw }} <br/> diff --git a/plugins/VisitTime/templates/index.twig b/plugins/VisitTime/templates/index.twig index bb41160beb..c0c2a85feb 100644 --- a/plugins/VisitTime/templates/index.twig +++ b/plugins/VisitTime/templates/index.twig @@ -1,9 +1,9 @@ <div id='leftcolumn'> - <h2>{{ 'VisitTime_LocalTime'|translate }}</h2> + <h2 piwik-enriched-headline>{{ 'VisitTime_LocalTime'|translate }}</h2> {{ dataTableVisitInformationPerLocalTime|raw }} </div> <div id='rightcolumn'> - <h2>{{ 'VisitTime_ServerTime'|translate }}</h2> + <h2 piwik-enriched-headline>{{ 'VisitTime_ServerTime'|translate }}</h2> {{ dataTableVisitInformationPerServerTime|raw }} </div> diff --git a/plugins/VisitorGenerator b/plugins/VisitorGenerator -Subproject db86db1894afdfead40dea154f8eb3a4295346d +Subproject 29ccce979f1bfc7df8595d1b2aac41157114144 diff --git a/plugins/VisitorInterest/templates/index.twig b/plugins/VisitorInterest/templates/index.twig index c2c143f135..359d43608f 100644 --- a/plugins/VisitorInterest/templates/index.twig +++ b/plugins/VisitorInterest/templates/index.twig @@ -1,11 +1,11 @@ -<h2>{{ 'VisitorInterest_VisitsPerDuration'|translate }}</h2> +<h2 piwik-enriched-headline>{{ 'VisitorInterest_VisitsPerDuration'|translate }}</h2> {{ dataTableNumberOfVisitsPerVisitDuration|raw }} -<h2>{{ 'VisitorInterest_VisitsPerNbOfPages'|translate }}</h2> +<h2 piwik-enriched-headline>{{ 'VisitorInterest_VisitsPerNbOfPages'|translate }}</h2> {{ dataTableNumberOfVisitsPerPage|raw }} -<h2>{{ 'VisitorInterest_visitsByVisitCount'|translate }}</h2> +<h2 piwik-enriched-headline>{{ 'VisitorInterest_visitsByVisitCount'|translate }}</h2> {{ dataTableNumberOfVisitsByVisitNum|raw }} -<h2>{{ 'VisitorInterest_VisitsByDaysSinceLast'|translate }}</h2> +<h2 piwik-enriched-headline>{{ 'VisitorInterest_VisitsByDaysSinceLast'|translate }}</h2> {{ dataTableNumberOfVisitsByDaysSinceLast|raw }} diff --git a/plugins/VisitsSummary/templates/index.twig b/plugins/VisitsSummary/templates/index.twig index f1a6cb08ac..76fb54c4a9 100644 --- a/plugins/VisitsSummary/templates/index.twig +++ b/plugins/VisitsSummary/templates/index.twig @@ -1,5 +1,7 @@ {# This graphId must be unique for this report #} -<h2 data-graph-id="VisitsSummary.getEvolutionGraph">{{ 'General_EvolutionOverPeriod'|translate }}</h2> +<h2 piwik-enriched-headline + data-graph-id="VisitsSummary.getEvolutionGraph" + >{{ 'General_EvolutionOverPeriod'|translate }}</h2> {{ graphEvolutionVisitsSummary|raw }} diff --git a/plugins/Zeitgeist/javascripts/piwikHelper.js b/plugins/Zeitgeist/javascripts/piwikHelper.js index cf65620566..0fc1f732af 100644 --- a/plugins/Zeitgeist/javascripts/piwikHelper.js +++ b/plugins/Zeitgeist/javascripts/piwikHelper.js @@ -111,6 +111,21 @@ var piwikHelper = { }, /** + * As we still have a lot of old jQuery code and copy html from node to node we sometimes have to trigger the + * compiling of angular components manually. + * + * @param selector + */ + compileAngularComponents: function (selector) { + var $element = $(selector); + + angular.element(document).injector().invoke(function($compile) { + var scope = angular.element($element).scope(); + $compile($element)(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 * |