-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10974 from piwik/3.x-dev
Release Piwik 3.0.0-rc1
- Loading branch information
Showing
37 changed files
with
555 additions
and
271 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
plugins/CoreHome/angularjs/common/directives/show-sensitive-data.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/*! | ||
* Piwik - free/libre analytics platform | ||
* | ||
* @link http://piwik.org | ||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later | ||
*/ | ||
|
||
/** | ||
* Handles visibility of sensitive data. By default data will be shown replaced with stars (*) | ||
* On click on the element the full data will be shown | ||
* | ||
* Configuration attributes: | ||
* data-show-characters number of characters to show in clear text (defaults to 6) | ||
* data-click-element-selector selector for element that will show the full data on click (defaults to element) | ||
* | ||
* Example: | ||
* <div piwik-show-sensitive-date="some text"></div> | ||
*/ | ||
(function () { | ||
angular.module('piwikApp.directive').directive('piwikShowSensitiveData', piwikShowSensitiveData); | ||
|
||
function piwikShowSensitiveData(){ | ||
return { | ||
restrict: 'A', | ||
link: function(scope, element, attr) { | ||
|
||
var sensitiveData = attr.piwikShowSensitiveData || attr.text(); | ||
var showCharacters = attr.showCharacters || 6; | ||
var clickElement = attr.clickElementSelector || element; | ||
|
||
var protectedData = ''; | ||
if (showCharacters > 0) { | ||
protectedData += sensitiveData.substr(0, showCharacters); | ||
} | ||
protectedData += sensitiveData.substr(showCharacters).replace(/./g, '*'); | ||
element.html(protectedData); | ||
|
||
function onClickHandler(event) { | ||
element.html(sensitiveData); | ||
$(clickElement).css({ | ||
cursor: '' | ||
}); | ||
$(clickElement).tooltip("destroy"); | ||
} | ||
|
||
$(clickElement).tooltip({ | ||
content: _pk_translate('CoreHome_ClickToSeeFullInformation'), | ||
items: '*', | ||
track: true | ||
}); | ||
|
||
$(clickElement).one('click', onClickHandler); | ||
$(clickElement).css({ | ||
cursor: 'pointer' | ||
}) | ||
} | ||
}; | ||
} | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule CustomAlerts
updated
from 49ae45 to 8c861c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?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\Marketplace\Widgets; | ||
|
||
use Piwik\Common; | ||
use Piwik\Piwik; | ||
use Piwik\Plugin; | ||
use Piwik\Plugins\Marketplace\Api\Client; | ||
use Piwik\Plugins\Marketplace\Input\PurchaseType; | ||
use Piwik\Plugins\Marketplace\Input\Sort; | ||
use Piwik\Widget\Widget; | ||
use Piwik\Widget\WidgetConfig; | ||
|
||
class GetPremiumFeatures extends Widget | ||
{ | ||
/** | ||
* @var Client | ||
*/ | ||
private $marketplaceApiClient; | ||
|
||
public function __construct(Client $marketplaceApiClient) | ||
{ | ||
$this->marketplaceApiClient = $marketplaceApiClient; | ||
} | ||
|
||
public static function configure(WidgetConfig $config) | ||
{ | ||
$config->setCategoryId('About Piwik'); | ||
$config->setName(Piwik::translate('Marketplace_PaidPlugins')); | ||
$config->setOrder(20); | ||
} | ||
|
||
public function render() | ||
{ | ||
$template = 'getPremiumFeatures'; | ||
|
||
$plugins = $this->marketplaceApiClient->searchForPlugins('', '', Sort::METHOD_LAST_UPDATED, PurchaseType::TYPE_PAID); | ||
|
||
if (empty($plugins)) { | ||
$plugins = array(); | ||
} else { | ||
$plugins = array_splice($plugins, 0, 20); | ||
} | ||
|
||
return $this->renderTemplate($template, array( | ||
'plugins' => $plugins | ||
)); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<div class="getNewPlugins getPremiumFeatures widgetBody"> | ||
<div class="row"> | ||
{% for plugin in plugins %} | ||
<div class="col s12 m4"> | ||
|
||
<h3 class="pluginName" piwik-plugin-name="{{ plugin.name|e('html_attr') }}">{{ plugin.displayName }}</h3> | ||
<span class="pluginBody"> | ||
{{ plugin.description }} | ||
<br /> | ||
<a href="javascript:;" class="pluginMoreDetails" piwik-plugin-name="{{ plugin.name|e('html_attr') }}">{{ 'General_MoreDetails'|translate }}</a> | ||
</span> | ||
</div> | ||
{% if loop.index % 3 == 0 %} | ||
</div><div class="row"> | ||
{% endif %} | ||
{% endfor %} | ||
</div> | ||
|
||
<div class="widgetBody"> | ||
<a href="{{ linkTo({'module': 'Marketplace', 'action': 'overview', 'show': 'premium'}) }}" | ||
>{{ 'CorePluginsAdmin_ViewAllMarketplacePlugins'|translate }}</a> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.