diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2015-10-30 23:09:19 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2015-11-04 23:02:09 +0300 |
commit | 89eb98b2fdaf3fa72a4a038daa050764f904ecc6 (patch) | |
tree | 2780a76f14724cb5546cfce657ede275d6ab3b85 /plugins/CoreHome | |
parent | 71c972da727f1f97c5fc13eb491daa77ff516de6 (diff) |
added screen to see custom variable usages
Diffstat (limited to 'plugins/CoreHome')
-rw-r--r-- | plugins/CoreHome/CoreHome.php | 1 | ||||
-rw-r--r-- | plugins/CoreHome/angularjs/common/filters/ucfirst.js | 21 |
2 files changed, 22 insertions, 0 deletions
diff --git a/plugins/CoreHome/CoreHome.php b/plugins/CoreHome/CoreHome.php index f2d788cd54..7cf82cfd3b 100644 --- a/plugins/CoreHome/CoreHome.php +++ b/plugins/CoreHome/CoreHome.php @@ -134,6 +134,7 @@ class CoreHome extends \Piwik\Plugin $jsFiles[] = "plugins/CoreHome/angularjs/common/filters/trim.js"; $jsFiles[] = "plugins/CoreHome/angularjs/common/filters/pretty-url.js"; $jsFiles[] = "plugins/CoreHome/angularjs/common/filters/htmldecode.js"; + $jsFiles[] = "plugins/CoreHome/angularjs/common/filters/ucfirst.js"; $jsFiles[] = "plugins/CoreHome/angularjs/common/directives/directive.module.js"; $jsFiles[] = "plugins/CoreHome/angularjs/common/directives/autocomplete-matched.js"; diff --git a/plugins/CoreHome/angularjs/common/filters/ucfirst.js b/plugins/CoreHome/angularjs/common/filters/ucfirst.js new file mode 100644 index 0000000000..34b3460be8 --- /dev/null +++ b/plugins/CoreHome/angularjs/common/filters/ucfirst.js @@ -0,0 +1,21 @@ +/*! + * 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.filter').filter('ucfirst', ucfirst); + + function ucfirst() { + + return function(value) { + if (!value) { + return value; + } + + var firstLetter = (value + '').charAt(0).toUpperCase(); + return firstLetter + value.substr(1); + }; + } +})(); |