Browse Source

finished lubasictable

tags/0.1.0
Robin Thoni 9 years ago
parent
commit
2a62c5e1da
1 changed files with 19 additions and 2 deletions
  1. 19
    2
      src/lubasictable.js

+ 19
- 2
src/lubasictable.js View File

@@ -16,6 +16,23 @@ angular.module('luticateUtils')
16 16
                     $scope.pages = [];
17 17
 
18 18
                     $scope.tableOptions = $scope.options();
19
+                    if ($scope.tableOptions.tableName == null) {
20
+                        $scope.tableOptions.tableName = $scope.$id;
21
+                    }
22
+                    if (typeof $scope.tableOptions.luBusy == 'string') {
23
+                        $scope.tableOptions.luBusy = {
24
+                            group: $scope.tableOptions.luBusy,
25
+                            templateLoader: "luticate-loader.html",
26
+                            templateError: "luticate-error.html"
27
+                        };
28
+                    }
29
+                    if ($scope.tableOptions.luBusy == null) {
30
+                        $scope.tableOptions.luBusy = {
31
+                            group:  'luBasicTableItemList_' + $scope.$id,
32
+                            templateLoader: "luticate-loader.html",
33
+                            templateError: "luticate-error.html"
34
+                        };
35
+                    }
19 36
                     if ($scope.tableOptions.page == null) {
20 37
                         $scope.tableOptions.page = 0;
21 38
                     }
@@ -57,7 +74,7 @@ angular.module('luticateUtils')
57 74
 
58 75
                         var promiseLoadItems = {
59 76
                             id: "promiseLoadItems",
60
-                            groups: ['itemList']
77
+                            groups: [$scope.tableOptions.luBusy.group]
61 78
                         };
62 79
                         $scope.tableOptions.getLoadPagePromise(page, $scope.tableOptions.perPage, promiseLoadItems)
63 80
                             .then(function (items) {
@@ -117,7 +134,7 @@ angular.module('luticateUtils')
117 134
 
118 135
 angular.module('luticateUtils').run(['$templateCache', function($templateCache)
119 136
 {
120
-    $templateCache.put('/luticate/lubasictable.html', '<div lu-busy="itemList">' +
137
+    $templateCache.put('/luticate/lubasictable.html', '<div lu-busy="tableOptions.luBusy">' +
121 138
 '        <table class="col-sm-12 table table-hover">' +
122 139
 '    <thead>' +
123 140
 '    <tr>' +

Loading…
Cancel
Save