diff options
Diffstat (limited to 'plugins/CoreHome/angularjs/widget-container/widgetcontainer.directive.js')
-rw-r--r-- | plugins/CoreHome/angularjs/widget-container/widgetcontainer.directive.js | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/plugins/CoreHome/angularjs/widget-container/widgetcontainer.directive.js b/plugins/CoreHome/angularjs/widget-container/widgetcontainer.directive.js index c378637c71..5533b962ec 100644 --- a/plugins/CoreHome/angularjs/widget-container/widgetcontainer.directive.js +++ b/plugins/CoreHome/angularjs/widget-container/widgetcontainer.directive.js @@ -26,7 +26,22 @@ scope: { container: '=piwikWidgetContainer' }, - templateUrl: 'plugins/CoreHome/angularjs/widget-container/widgetcontainer.directive.html?cb=' + piwik.cacheBuster + templateUrl: 'plugins/CoreHome/angularjs/widget-container/widgetcontainer.directive.html?cb=' + piwik.cacheBuster, + compile: function (element, attrs) { + + return function (scope, element, attrs, ngModel) { + scope.$watch('container', function (container) { + if (container && container.widgets && container.widgets[0] && container.widgets[0].parameters) { + var isWidgetized = container.widgets[0].parameters.widget == '1'; + + if (isWidgetized) { + container.widgets[0].parameters.showtitle = '0'; + } + + } + }); + } + } }; } })();
\ No newline at end of file |