update Piwik to version 2.16 (fixes #91)
This commit is contained in:
parent
296343bf3b
commit
d885a4baa9
5833 changed files with 418860 additions and 226988 deletions
|
|
@ -1,23 +0,0 @@
|
|||
/*!
|
||||
* 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);
|
||||
$scope.ratingDone = true;
|
||||
// alert($filter('translate')('Feedback_ThankYou'));
|
||||
};
|
||||
});
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
/*!
|
||||
* 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'
|
||||
};
|
||||
});
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
/*!
|
||||
* 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;
|
||||
});
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
/*!
|
||||
* 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').factory('rateFeatureModel', rateFeatureModel);
|
||||
|
||||
rateFeatureModel.$inject = ['piwikApi'];
|
||||
|
||||
function rateFeatureModel(piwikApi) {
|
||||
|
||||
return {
|
||||
sendFeedbackForFeature: sendFeedbackForFeature
|
||||
};
|
||||
|
||||
function sendFeedbackForFeature (featureName, like, message) {
|
||||
return piwikApi.fetch({
|
||||
method: 'Feedback.sendFeedbackForFeature',
|
||||
featureName: featureName,
|
||||
like: like ? '1' : '0',
|
||||
message: message + ''
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
})();
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
/*!
|
||||
* 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('RateFeatureController', RateFeatureController);
|
||||
|
||||
RateFeatureController.$inject = ['$scope', 'rateFeatureModel'];
|
||||
|
||||
function RateFeatureController($scope, model){
|
||||
|
||||
var vm = this;
|
||||
vm.title = $scope.title;
|
||||
vm.dislikeFeature = dislikeFeature;
|
||||
vm.likeFeature = likeFeature;
|
||||
vm.sendFeedback = sendFeedback;
|
||||
|
||||
function dislikeFeature () {
|
||||
vm.like = false;
|
||||
}
|
||||
|
||||
function likeFeature () {
|
||||
vm.like = true;
|
||||
}
|
||||
|
||||
function sendFeedback (message) {
|
||||
model.sendFeedbackForFeature(vm.title, vm.like, message);
|
||||
vm.ratingDone = true;
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
|
@ -1,23 +1,23 @@
|
|||
<div title="{{ 'Feedback_RateFeatureTitle'|translate:title }}" class="ratefeature">
|
||||
<div title="{{ 'Feedback_RateFeatureTitle'|translate:rateFeature.title }}" class="ratefeature">
|
||||
|
||||
<div class="iconContainer"
|
||||
ng-mouseenter="view.expanded=true;"
|
||||
ng-mouseleave="view.expanded=false">
|
||||
|
||||
<img ng-click="likeFeature();view.showFeedbackForm=true;"
|
||||
<img ng-click="rateFeature.likeFeature();view.showFeedbackForm=true;"
|
||||
class="like-icon"
|
||||
src="plugins/Feedback/angularjs/ratefeature/thumbs-up.png"/>
|
||||
|
||||
<img ng-click="dislikeFeature();view.showFeedbackForm=true;"
|
||||
<img ng-click="rateFeature.dislikeFeature();view.showFeedbackForm=true;"
|
||||
class="dislike-icon"
|
||||
ng-show="view.expanded"
|
||||
src="plugins/Feedback/angularjs/ratefeature/thumbs-down.png"/>
|
||||
</div>
|
||||
|
||||
<div class="ui-confirm ratefeatureDialog" piwik-dialog="view.showFeedbackForm" yes="sendFeedback(view.feedbackMessage)">
|
||||
<div class="ui-confirm ratefeatureDialog" piwik-dialog="view.showFeedbackForm" yes="rateFeature.sendFeedback(view.feedbackMessage)">
|
||||
<h2>{{ 'Feedback_RateFeatureThankYouTitle'|translate:title }}</h2>
|
||||
<p ng-if="like">{{ 'Feedback_RateFeatureLeaveMessageLike'|translate }}</p>
|
||||
<p ng-if="!like">{{ 'Feedback_RateFeatureLeaveMessageDislike'|translate }}</p>
|
||||
<p ng-if="rateFeature.like">{{ 'Feedback_RateFeatureLeaveMessageLike'|translate }}</p>
|
||||
<p ng-if="!rateFeature.like">{{ 'Feedback_RateFeatureLeaveMessageDislike'|translate }}</p>
|
||||
<br />
|
||||
|
||||
<div class="messageContainer">
|
||||
|
|
@ -29,8 +29,8 @@
|
|||
value="{{ 'Feedback_SendFeedback'|translate }}" role="yes"/>
|
||||
</div>
|
||||
|
||||
<div class="ui-confirm ratefeatureDialog" piwik-dialog="ratingDone" yes="">
|
||||
<h2>{{ 'Feedback_ThankYou'|translate:title }}</h2>
|
||||
<div class="ui-confirm ratefeatureDialog" piwik-dialog="rateFeature.ratingDone" yes="">
|
||||
<h2>{{ 'Feedback_ThankYou'|translate:rateFeature.title }}</h2>
|
||||
|
||||
<input type="button" value="{{ 'General_Ok'|translate }}" role="yes"/>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
/*!
|
||||
* 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-rate-feature title="My Feature Name">
|
||||
*/
|
||||
(function () {
|
||||
angular.module('piwikApp').directive('piwikRateFeature', piwikRateFeature);
|
||||
|
||||
piwikRateFeature.$inject = ['piwik'];
|
||||
|
||||
function piwikRateFeature(piwik){
|
||||
|
||||
return {
|
||||
restrict: 'A',
|
||||
scope: {
|
||||
title: '@'
|
||||
},
|
||||
templateUrl: 'plugins/Feedback/angularjs/ratefeature/ratefeature.directive.html?cb=' + piwik.cacheBuster,
|
||||
controller: 'RateFeatureController',
|
||||
controllerAs: 'rateFeature',
|
||||
};
|
||||
}
|
||||
})();
|
||||
Loading…
Add table
Add a link
Reference in a new issue