Table animated
diff --git a/views/ngXosLib/gulp/ngXosHelpers.js b/views/ngXosLib/gulp/ngXosHelpers.js
index 6fabcda..157ab67 100644
--- a/views/ngXosLib/gulp/ngXosHelpers.js
+++ b/views/ngXosLib/gulp/ngXosHelpers.js
@@ -14,7 +14,7 @@
module.exports = function(options){
gulp.task('style', function(){
- return gulp.src(`${options.xosHelperSource}**/*.scss`)
+ return gulp.src(`${options.xosHelperSource}styles/main.scss`)
.pipe(sourcemaps.init())
.pipe(sass().on('error', sass.logError))
.pipe(rename('xosNgLib.css'))
diff --git a/views/ngXosLib/xosHelpers/src/styles/main.scss b/views/ngXosLib/xosHelpers/src/styles/main.scss
index a5ddae2..eb51d7a 100644
--- a/views/ngXosLib/xosHelpers/src/styles/main.scss
+++ b/views/ngXosLib/xosHelpers/src/styles/main.scss
@@ -1 +1,3 @@
@import './animations.scss';
+
+@import '../ui_components/dumbComponents/table/table.scss';
\ No newline at end of file
diff --git a/views/ngXosLib/xosHelpers/src/ui_components/dumbComponents/table/table.component.js b/views/ngXosLib/xosHelpers/src/ui_components/dumbComponents/table/table.component.js
index 02ce30c..539b1ee 100644
--- a/views/ngXosLib/xosHelpers/src/ui_components/dumbComponents/table/table.component.js
+++ b/views/ngXosLib/xosHelpers/src/ui_components/dumbComponents/table/table.component.js
@@ -196,7 +196,7 @@
ng-model="vm.query"/>
</div>
</div>
- <table ng-class="vm.classes" ng-show="vm.data.length > 0">
+ <table ng-class="vm.classes" ng-hide="vm.data.length == 0">
<thead>
<tr>
<th ng-repeat="col in vm.columns">
diff --git a/views/ngXosLib/xosHelpers/src/ui_components/dumbComponents/table/table.scss b/views/ngXosLib/xosHelpers/src/ui_components/dumbComponents/table/table.scss
index 91786b1..ee27104 100644
--- a/views/ngXosLib/xosHelpers/src/ui_components/dumbComponents/table/table.scss
+++ b/views/ngXosLib/xosHelpers/src/ui_components/dumbComponents/table/table.scss
@@ -1,3 +1,24 @@
+@import '../../../styles/animations.scss';
+
xos-table {
- background: red;
+
+ tr.ng-move,
+ tr.ng-enter,
+ tr.ng-leave {
+ transition:all linear 0.5s;
+ }
+
+ tr.ng-leave.ng-leave-active,
+ tr.ng-move,
+ tr.ng-enter {
+ opacity:0;
+ animation: 0.5s slideOutRight ease-in-out;
+ }
+
+ tr.ng-leave,
+ tr.ng-move.ng-move-active,
+ tr.ng-enter.ng-enter-active {
+ opacity:1;
+ animation: 0.5s slideInRight ease-in-out;
+ }
}
\ No newline at end of file
diff --git a/views/ngXosLib/xosHelpers/src/xosHelpers.module.js b/views/ngXosLib/xosHelpers/src/xosHelpers.module.js
index 49e2a9e..b74ddf9 100644
--- a/views/ngXosLib/xosHelpers/src/xosHelpers.module.js
+++ b/views/ngXosLib/xosHelpers/src/xosHelpers.module.js
@@ -22,6 +22,7 @@
.module('xos.helpers', [
'ngCookies',
'ngResource',
+ 'ngAnimate',
'bugSnag',
'xos.uiComponents',
])
diff --git a/views/ngXosViews/sampleView/bower.json b/views/ngXosViews/sampleView/bower.json
index 625ae53..bb1b04d 100644
--- a/views/ngXosViews/sampleView/bower.json
+++ b/views/ngXosViews/sampleView/bower.json
@@ -20,6 +20,7 @@
"jquery": "2.1.4",
"angular-mocks": "1.4.7",
"angular": "1.4.7",
+ "angular-animate": "1.4.7",
"angular-ui-router": "0.2.15",
"angular-cookies": "1.4.7",
"angular-resource": "1.4.7",
diff --git a/views/ngXosViews/sampleView/gulp/server.js b/views/ngXosViews/sampleView/gulp/server.js
index 22d5666..bc8e9c0 100644
--- a/views/ngXosViews/sampleView/gulp/server.js
+++ b/views/ngXosViews/sampleView/gulp/server.js
@@ -87,7 +87,10 @@
browserSync.reload();
});
- gulp.watch(options.helpers + 'ngXosHelpers.js', function(){
+ gulp.watch([
+ options.helpers + 'ngXosHelpers.js',
+ options.static + '../../static/xosNgLib.css'
+ ], function(){
browserSync.reload();
});
diff --git a/views/ngXosViews/sampleView/src/index.html b/views/ngXosViews/sampleView/src/index.html
index 66f9535..c6c90d9 100644
--- a/views/ngXosViews/sampleView/src/index.html
+++ b/views/ngXosViews/sampleView/src/index.html
@@ -15,6 +15,7 @@
<script src="vendor/jquery/dist/jquery.js"></script>
<script src="vendor/angular/angular.js"></script>
<script src="vendor/angular-mocks/angular-mocks.js"></script>
+<script src="vendor/angular-animate/angular-animate.js"></script>
<script src="vendor/angular-ui-router/release/angular-ui-router.js"></script>
<script src="vendor/angular-cookies/angular-cookies.js"></script>
<script src="vendor/angular-resource/angular-resource.js"></script>
diff --git a/views/ngXosViews/sampleView/src/js/main.js b/views/ngXosViews/sampleView/src/js/main.js
index 153d6f2..3cad7f4 100644
--- a/views/ngXosViews/sampleView/src/js/main.js
+++ b/views/ngXosViews/sampleView/src/js/main.js
@@ -23,7 +23,7 @@
bindToController: true,
controllerAs: 'vm',
templateUrl: 'templates/users-list.tpl.html',
- controller: function(Users){
+ controller: function(Users, _){
this.tableConfig = {
columns: [
@@ -47,6 +47,7 @@
icon: 'remove',
cb: (user) => {
console.log(user);
+ // _.remove(this.users, {id: user.id});
},
color: 'red'
}
@@ -54,7 +55,7 @@
filter: 'field',
order: true,
pagination: {
- pageSize: 3
+ pageSize: 10
}
};