diff --git a/bower.json b/bower.json index 69f0b24..3701a7f 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "angular-footable", - "version": "0.0.2", + "version": "0.0.3", "homepage": "https://github.com/ziscloud/angular-footable", "authors": [ "Tony Wang " diff --git a/dist/angular-footable.js b/dist/angular-footable.js index f4c2a73..7e04f52 100755 --- a/dist/angular-footable.js +++ b/dist/angular-footable.js @@ -37,21 +37,21 @@ angular var tableOpts = { 'event-filtering': null }; + $timeout(function(){ + angular.extend( + tableOpts, + footable.options + ); - angular.extend( - tableOpts, - footable.options - ); + angular.extend( + tableOpts, + extractSpecOpts(tableOpts, attrs) + ); - angular.extend( - tableOpts, - extractSpecOpts(tableOpts, attrs) - ); - - var tableObj = element.footable(tableOpts); - - bindEventHandler(tableObj, scope, attrs); + var tableObj = element.footable(tableOpts); + bindEventHandler(tableObj, scope, attrs); + },1000); scope.$watch(function() {return attrs.loadWhen; }, function(){ $timeout(function(){ element.trigger('footable_redraw'); diff --git a/dist/angular-footable.min.js b/dist/angular-footable.min.js index a26a327..41c1465 100755 --- a/dist/angular-footable.min.js +++ b/dist/angular-footable.min.js @@ -1 +1 @@ -"use strict";angular.module("ui.footable",[]).directive("footable",["$timeout",function(n){var e={beforeFiltering:"footable_filtering"},i=function(n,i){var t,r={};for(t in n)"filter"===t||angular.isUndefined(e[t])||angular.isFunction(scope.$eval(i[t]))||(r[t]=i[t]);return r},t=function(n,i,t){var r;for(r in t)if("filter"!==r&&!angular.isUndefined(e[r])){var a=e[r];angular.isFunction(i.$eval(t[r]))&&n.bind(a,i.$eval(t[r]))}};return{restrict:"C",link:function(e,r,a){var o={"event-filtering":null};angular.extend(o,footable.options),angular.extend(o,i(o,a));var l=r.footable(o);t(l,e,a),e.$watch(function(){return a.loadWhen},function(){n(function(){r.trigger("footable_redraw")})})}}}]); \ No newline at end of file +"use strict";angular.module("ui.footable",[]).directive("footable",["$timeout",function(n){var e={beforeFiltering:"footable_filtering"},i=function(n,i){var t,r={};for(t in n)"filter"===t||angular.isUndefined(e[t])||angular.isFunction(scope.$eval(i[t]))||(r[t]=i[t]);return r},t=function(n,i,t){var r;for(r in t)if("filter"!==r&&!angular.isUndefined(e[r])){var a=e[r];angular.isFunction(i.$eval(t[r]))&&n.bind(a,i.$eval(t[r]))}};return{restrict:"C",link:function(e,r,a){var o={"event-filtering":null};n(function(){angular.extend(o,footable.options),angular.extend(o,i(o,a));var n=r.footable(o);t(n,e,a)},1e3),e.$watch(function(){return a.loadWhen},function(){n(function(){r.trigger("footable_redraw")})})}}}]); \ No newline at end of file diff --git a/package.json b/package.json index 506d0ce..f702516 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angular-footable", - "version": "0.0.2", + "version": "0.0.3", "description": "Angular derictive for FooTable", "main": "dist/angular-footable.js", "directories": { diff --git a/src/angular-footable.js b/src/angular-footable.js index f4c2a73..7e04f52 100644 --- a/src/angular-footable.js +++ b/src/angular-footable.js @@ -37,21 +37,21 @@ angular var tableOpts = { 'event-filtering': null }; + $timeout(function(){ + angular.extend( + tableOpts, + footable.options + ); - angular.extend( - tableOpts, - footable.options - ); + angular.extend( + tableOpts, + extractSpecOpts(tableOpts, attrs) + ); - angular.extend( - tableOpts, - extractSpecOpts(tableOpts, attrs) - ); - - var tableObj = element.footable(tableOpts); - - bindEventHandler(tableObj, scope, attrs); + var tableObj = element.footable(tableOpts); + bindEventHandler(tableObj, scope, attrs); + },1000); scope.$watch(function() {return attrs.loadWhen; }, function(){ $timeout(function(){ element.trigger('footable_redraw');