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:
Diffstat (limited to 'plugins/CoreHome/templates/widgetContainer.twig')
-rwxr-xr-xplugins/CoreHome/templates/widgetContainer.twig18
1 files changed, 18 insertions, 0 deletions
diff --git a/plugins/CoreHome/templates/widgetContainer.twig b/plugins/CoreHome/templates/widgetContainer.twig
new file mode 100755
index 0000000000..b3eda12997
--- /dev/null
+++ b/plugins/CoreHome/templates/widgetContainer.twig
@@ -0,0 +1,18 @@
+<div>
+ <div piwik-widget
+ containerid="{{ containerId|e('html_attr') }}"
+ widgetized="{% if isWidgetized %}true{% else %}false{% endif %}"></div>
+
+ <script type="text/javascript">
+ $(function () {
+
+ var piwikWidget = $('[piwik-widget][containerid={{ containerId|e('js') }}]');
+
+ angular.element(document).injector().invoke(function($compile) {
+ var scope = angular.element(piwikWidget).scope();
+ $compile(piwikWidget)(scope.$new());
+ });
+
+ });
+ </script>
+</div> \ No newline at end of file