From 2afe896284b0ab57764cbed6c0756678c84be2e1 Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Wed, 4 Feb 2015 21:57:26 +0100 Subject: [PATCH] release version 0.6.0 --- bower.json | 2 +- dist/angular-dashboard-framework.min.js | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bower.json b/bower.json index 6619b4b1..96ff6ec0 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "angular-dashboard-framework", - "version": "0.6.0-SNAPSHOT", + "version": "0.6.0", "main": [ "dist/angular-dashboard-framework.min.js", "dist/angular-dashboard-framework.min.css" diff --git a/dist/angular-dashboard-framework.min.js b/dist/angular-dashboard-framework.min.js index c36decff..5edeab24 100644 --- a/dist/angular-dashboard-framework.min.js +++ b/dist/angular-dashboard-framework.min.js @@ -1,2 +1,2 @@ -/*! angular-dashboard-framework 0.5.1 (2015-01-28) */ -"use strict";angular.module("adf",["adf.provider","ui.bootstrap","ui.sortable"]).value("adfTemplatePath","../src/templates/").value("rowTemplate",'').value("columnTemplate",'').value("adfVersion","0.5.1"),angular.module("adf").directive("adfDashboardColumn",["$compile","adfTemplatePath","rowTemplate",function(a,b,c){function d(a){switch(null!==a?a.toLowerCase():null){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case null:return!1;default:return Boolean(a)}}return{restrict:"E",replace:!0,scope:{column:"=",editMode:"@",sortableOptions:"="},templateUrl:b+"dashboard-column.html",link:function(b,e,f){f.$observe("editMode",function(a){b.editMode=d(a)}),angular.isDefined(b.column.rows)&&angular.isArray(b.column.rows)&&a(c)(b,function(a){e.append(a)})}}}]),angular.module("adf").directive("adfDashboard",["$rootScope","$log","$modal","dashboard","adfTemplatePath",function(a,b,c,d,e){function f(a,b){if(a.widgets&&a.widgets.length>0)for(var c=a.widgets.shift();c;)b.widgets.push(c),c=a.widgets.shift()}function g(a,b,c){return c=c||0,angular.isDefined(a.rows)&&angular.forEach(a.rows,function(a){angular.forEach(a.columns,function(a){a.widgets||(a.widgets=[]),angular.isDefined(b[c])&&(f(b[c],a),c++),c=g(a,b,c)})}),c}function h(a,b){return b=b||[],angular.isDefined(a.rows)&&angular.forEach(a.rows,function(a){angular.forEach(a.columns,function(a){b.push(a),h(a,b)})}),b}function i(a,b){var c=h(a),d=0;for(a.rows=angular.copy(b.rows);d{}',d='
\n
\n loading ...\n
\n
';this.widget=function(b,c){var d=angular.extend({reload:!1},c);if(d.edit){var e={reload:!0};angular.extend(e,d.edit),d.edit=e}return a[b]=d,this},this.structure=function(a,c){return b[a]=c,this},this.messageTemplate=function(a){return c=a,this},this.loadingTemplate=function(a){return d=a,this},this.$get=function(){return{widgets:a,structures:b,messageTemplate:c,loadingTemplate:d}}}),angular.module("adf").directive("adfDashboardRow",["$compile","adfTemplatePath","columnTemplate",function(a,b,c){function d(a){switch(null!==a?a.toLowerCase():null){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case null:return!1;default:return Boolean(a)}}return{restrict:"E",replace:!0,scope:{row:"=",editMode:"@",sortableOptions:"="},templateUrl:b+"dashboard-row.html",link:function(b,e,f){f.$observe("editMode",function(a){b.editMode=d(a)}),angular.isDefined(b.row.columns)&&angular.isArray(b.row.columns)&&a(c)(b,function(a){e.append(a)})}}}]),angular.module("adf").directive("adfWidgetContent",["$log","$q","$sce","$http","$templateCache","$compile","$controller","$injector","dashboard",function(a,b,c,d,e,f,g,h,i){function j(a){var f=b.defer();if(a.template)f.resolve(a.template);else if(a.templateUrl){var g=c.getTrustedResourceUrl(a.templateUrl);d.get(g,{cache:e}).success(function(a){f.resolve(a)}).error(function(){f.reject("could not load template")})}return f.promise}function k(c,d){var e=c.model,k=c.content;d.html(i.loadingTemplate);var l=c.$new();e.config||(e.config={}),l.config=e.config;var m={$scope:l,widget:e,config:e.config},n={};n.$tpl=j(k),k.resolve&&angular.forEach(k.resolve,function(a,b){n[b]=angular.isString(a)?h.get(a):h.invoke(a,a,m)}),b.all(n).then(function(a){angular.extend(a,m);var b=a.$tpl;if(d.html(b),k.controller){var c=g(k.controller,a);k.controllerAs&&(l[k.controllerAs]=c),d.children().data("$ngControllerController",c)}f(d.contents())(l)},function(b){var c="Could not resolve all promises";b&&(c+=": "+b),a.warn(c),d.html(i.messageTemplate.replace(/{}/g,c))})}return{replace:!0,restrict:"EA",transclude:!1,scope:{model:"=",content:"="},link:function(a,b){k(a,b),a.$on("widgetConfigChanged",function(){k(a,b)}),a.$on("widgetReload",function(){k(a,b)})}}}]),angular.module("adf").directive("adfWidget",["$log","$modal","dashboard","adfTemplatePath",function(a,b,c,d){function e(a){switch(angular.isDefined(a)?a.toLowerCase():null){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case null:return!1;default:return Boolean(a)}}function f(b,d,f){var g=b.definition;if(g){var h=c.widgets[g.type];if(h){g.title||(g.title=h.title),f.$observe("editMode",function(a){b.editMode=e(a)}),b.widget=angular.copy(h);var i=g.config;i?angular.isString(i)&&(i=angular.fromJson(i)):i={},b.config=i,b.collapsible=e(b.collapsible),b.isCollapsed=!1}else a.warn("could not find widget "+g.type)}else a.debug("definition not specified, widget was probably removed")}function g(c,e){var f=c.definition;f?(c.close=function(){var a=c.col;if(a){var b=a.widgets.indexOf(f);b>=0&&a.widgets.splice(b,1)}e.remove()},c.reload=function(){c.$broadcast("widgetReload")},c.edit=function(){var a=c.$new(),e={scope:a,templateUrl:d+"widget-edit.html"},f=b.open(e);a.closeDialog=function(){f.close(),a.$destroy();var b=c.widget;b.edit&&b.edit.reload&&c.$broadcast("widgetConfigChanged")}}):a.debug("widget not found")}return{replace:!0,restrict:"EA",transclude:!1,templateUrl:d+"widget.html",scope:{definition:"=",col:"=column",editMode:"@",collapsible:"="},compile:function(){return{pre:f,post:g}}}}]),angular.module("adf").run(["$templateCache",function(a){a.put("../src/templates/dashboard-column.html",'
'),a.put("../src/templates/dashboard-edit.html",''),a.put("../src/templates/dashboard-row.html",'
'),a.put("../src/templates/dashboard.html",'

{{model.title}}

'),a.put("../src/templates/widget-add.html",''),a.put("../src/templates/widget-edit.html",''),a.put("../src/templates/widget.html",'

{{definition.title}}

')}]); \ No newline at end of file +/*! angular-dashboard-framework 0.6.0 (2015-02-04) */ +"use strict";angular.module("adf",["adf.provider","ui.bootstrap","ui.sortable"]).value("adfTemplatePath","../src/templates/").value("rowTemplate",'').value("columnTemplate",'').value("adfVersion","0.6.0"),angular.module("adf").directive("adfDashboardColumn",["$compile","adfTemplatePath","rowTemplate",function(a,b,c){function d(a){switch(null!==a?a.toLowerCase():null){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case null:return!1;default:return Boolean(a)}}return{restrict:"E",replace:!0,scope:{column:"=",editMode:"@",sortableOptions:"="},templateUrl:b+"dashboard-column.html",link:function(b,e,f){f.$observe("editMode",function(a){b.editMode=d(a)}),angular.isDefined(b.column.rows)&&angular.isArray(b.column.rows)&&a(c)(b,function(a){e.append(a)})}}}]),angular.module("adf").directive("adfDashboard",["$rootScope","$log","$modal","dashboard","adfTemplatePath",function(a,b,c,d,e){function f(a,b){if(a.widgets&&a.widgets.length>0)for(var c=a.widgets.shift();c;)b.widgets.push(c),c=a.widgets.shift()}function g(a,b,c){return c=c||0,angular.isDefined(a.rows)&&angular.forEach(a.rows,function(a){angular.forEach(a.columns,function(a){a.widgets||(a.widgets=[]),angular.isDefined(b[c])&&(f(b[c],a),c++),c=g(a,b,c)})}),c}function h(a,b){return b=b||[],angular.isDefined(a.rows)&&angular.forEach(a.rows,function(a){angular.forEach(a.columns,function(a){b.push(a),h(a,b)})}),b}function i(a,b){var c=h(a),d=0;for(a.rows=angular.copy(b.rows);d{}',e='
\n
\n loading ...\n
\n
';this.widget=function(b,c){var d=angular.extend({reload:!1},c);if(d.edit){var e={reload:!0};angular.extend(e,d.edit),d.edit=e}return a[b]=d,this},this.widgetsPath=function(a){return b=a,this},this.structure=function(a,b){return c[a]=b,this},this.messageTemplate=function(a){return d=a,this},this.loadingTemplate=function(a){return e=a,this},this.$get=function(){return{widgets:a,widgetsPath:b,structures:c,messageTemplate:d,loadingTemplate:e}}}),angular.module("adf").directive("adfDashboardRow",["$compile","adfTemplatePath","columnTemplate",function(a,b,c){function d(a){switch(null!==a?a.toLowerCase():null){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case null:return!1;default:return Boolean(a)}}return{restrict:"E",replace:!0,scope:{row:"=",editMode:"@",sortableOptions:"="},templateUrl:b+"dashboard-row.html",link:function(b,e,f){f.$observe("editMode",function(a){b.editMode=d(a)}),angular.isDefined(b.row.columns)&&angular.isArray(b.row.columns)&&a(c)(b,function(a){e.append(a)})}}}]),angular.module("adf").directive("adfWidgetContent",["$log","$q","$sce","$http","$templateCache","$compile","$controller","$injector","dashboard",function(a,b,c,d,e,f,g,h,i){function j(a){return a.replace("{widgetsPath}",i.widgetsPath)}function k(a){var f=b.defer();if(a.template)f.resolve(a.template);else if(a.templateUrl){var g=e.get(a.templateUrl);if(g)f.resolve(g);else{var h=c.getTrustedResourceUrl(j(a.templateUrl));d.get(h).success(function(b){e.put(a.templateUrl,b),f.resolve(b)}).error(function(){f.reject("could not load template")})}}return f.promise}function l(c,d,e){var j=c.model,l=c.content;d.html(i.loadingTemplate);var m=c.$new();j.config||(j.config={}),m.config=j.config;var n={$scope:m,widget:j,config:j.config},o={};return o.$tpl=k(l),l.resolve&&angular.forEach(l.resolve,function(a,b){o[b]=angular.isString(a)?h.get(a):h.invoke(a,a,n)}),b.all(o).then(function(a){angular.extend(a,n);var b=a.$tpl;if(d.html(b),l.controller){var c=g(l.controller,a);l.controllerAs&&(m[l.controllerAs]=c),d.children().data("$ngControllerController",c)}f(d.contents())(m)},function(b){var c="Could not resolve all promises";b&&(c+=": "+b),a.warn(c),d.html(i.messageTemplate.replace(/{}/g,c))}),e&&e.$destroy(),m}return{replace:!0,restrict:"EA",transclude:!1,scope:{model:"=",content:"="},link:function(a,b){var c=l(a,b,null);a.$on("widgetConfigChanged",function(){c=l(a,b,c)}),a.$on("widgetReload",function(){c=l(a,b,c)})}}}]),angular.module("adf").directive("adfWidget",["$log","$modal","dashboard","adfTemplatePath",function(a,b,c,d){function e(a){switch(angular.isDefined(a)?a.toLowerCase():null){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case null:return!1;default:return Boolean(a)}}function f(b,d,f){var g=b.definition;if(g){var h=c.widgets[g.type];if(h){g.title||(g.title=h.title),f.$observe("editMode",function(a){b.editMode=e(a)}),b.widget=angular.copy(h);var i=g.config;i?angular.isString(i)&&(i=angular.fromJson(i)):i={},b.config=i,b.collapsible=e(b.collapsible),b.isCollapsed=!1}else a.warn("could not find widget "+g.type)}else a.debug("definition not specified, widget was probably removed")}function g(c,e){var f=c.definition;f?(c.close=function(){var a=c.col;if(a){var b=a.widgets.indexOf(f);b>=0&&a.widgets.splice(b,1)}e.remove()},c.reload=function(){c.$broadcast("widgetReload")},c.edit=function(){var a=c.$new(),e={scope:a,templateUrl:d+"widget-edit.html"},f=b.open(e);a.closeDialog=function(){f.close(),a.$destroy();var b=c.widget;b.edit&&b.edit.reload&&c.$broadcast("widgetConfigChanged")}}):a.debug("widget not found")}return{replace:!0,restrict:"EA",transclude:!1,templateUrl:d+"widget.html",scope:{definition:"=",col:"=column",editMode:"@",collapsible:"="},compile:function(){return{pre:f,post:g}}}}]),angular.module("adf").run(["$templateCache",function(a){a.put("../src/templates/dashboard-column.html",'
'),a.put("../src/templates/dashboard-edit.html",''),a.put("../src/templates/dashboard-row.html",'
'),a.put("../src/templates/dashboard.html",'

{{model.title}}

'),a.put("../src/templates/widget-add.html",''),a.put("../src/templates/widget-edit.html",''),a.put("../src/templates/widget.html",'

{{definition.title}}

')}]); \ No newline at end of file diff --git a/package.json b/package.json index b8330423..b1ece2d3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angular-dashboard-framework", - "version": "0.6.0-SNAPSHOT", + "version": "0.6.0", "devDependencies": { "grunt": "^0.4.5", "grunt-angular-templates": "~0.5.7",