Kaynağa Gözat

finished lubasictable

tags/0.1.0
Robin Thoni 8 yıl önce
ebeveyn
işleme
2a62c5e1da
1 değiştirilmiş dosya ile 19 ekleme ve 2 silme
  1. 19
    2
      src/lubasictable.js

+ 19
- 2
src/lubasictable.js Dosyayı Görüntüle

16
                     $scope.pages = [];
16
                     $scope.pages = [];
17
 
17
 
18
                     $scope.tableOptions = $scope.options();
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
                     if ($scope.tableOptions.page == null) {
36
                     if ($scope.tableOptions.page == null) {
20
                         $scope.tableOptions.page = 0;
37
                         $scope.tableOptions.page = 0;
21
                     }
38
                     }
57
 
74
 
58
                         var promiseLoadItems = {
75
                         var promiseLoadItems = {
59
                             id: "promiseLoadItems",
76
                             id: "promiseLoadItems",
60
-                            groups: ['itemList']
77
+                            groups: [$scope.tableOptions.luBusy.group]
61
                         };
78
                         };
62
                         $scope.tableOptions.getLoadPagePromise(page, $scope.tableOptions.perPage, promiseLoadItems)
79
                         $scope.tableOptions.getLoadPagePromise(page, $scope.tableOptions.perPage, promiseLoadItems)
63
                             .then(function (items) {
80
                             .then(function (items) {
117
 
134
 
118
 angular.module('luticateUtils').run(['$templateCache', function($templateCache)
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
 '        <table class="col-sm-12 table table-hover">' +
138
 '        <table class="col-sm-12 table table-hover">' +
122
 '    <thead>' +
139
 '    <thead>' +
123
 '    <tr>' +
140
 '    <tr>' +

Loading…
İptal
Kaydet