diff --git a/src/scripts/provider.js b/src/scripts/provider.js index f4df91d6..0d28e960 100644 --- a/src/scripts/provider.js +++ b/src/scripts/provider.js @@ -67,6 +67,7 @@ angular.module('adf.provider', []) * if passed as a string. * - `controllerAs` - `{string=}` - A controller alias name. If present the controller will be * published to scope under the `controllerAs` name. + * - `frameless` - `{boolean=}` - false if the widget should be shown in frameless mode. The default is false. * - `template` - `{string=|function()=}` - html template as a string. * - `templateUrl` - `{string=}` - path to an html template. * - `reload` - `{boolean=}` - true if the widget could be reloaded. The default is false. @@ -94,7 +95,7 @@ angular.module('adf.provider', []) * @returns {Object} self */ this.widget = function(name, widget){ - var w = angular.extend({reload: false}, widget); + var w = angular.extend({reload: false, frameless: false}, widget); if ( w.edit ){ var edit = {reload: true}; angular.extend(edit, w.edit); diff --git a/src/scripts/widget.js b/src/scripts/widget.js index f6abc588..03a4a2d2 100644 --- a/src/scripts/widget.js +++ b/src/scripts/widget.js @@ -41,6 +41,10 @@ angular.module('adf') definition.titleTemplateUrl = adfTemplatePath + 'widget-title.html'; } + if (!definition.titleTemplateUrl) { + definition.frameless = w.frameless; + } + // set id for sortable if (!definition.wid) { definition.wid = dashboard.id(); diff --git a/src/templates/widget.html b/src/templates/widget.html index 4711a00c..e6bbe75c 100644 --- a/src/templates/widget.html +++ b/src/templates/widget.html @@ -1,8 +1,8 @@ -
-
+
+
-
+