Browse Source

lu basic table canClick by item; allowed brackdrop click on error dialog

tags/0.1.4^0
Robin Thoni 9 years ago
parent
commit
1b0928f10f
4 changed files with 6 additions and 6 deletions
  1. 1
    1
      dist/luticate-utils.min.js
  2. 3
    3
      src/lubasictable.js
  3. 1
    1
      src/luedittable.js
  4. 1
    1
      src/modals/dialogerrorhelper.js

+ 1
- 1
dist/luticate-utils.min.js
File diff suppressed because it is too large
View File


+ 3
- 3
src/lubasictable.js View File

@@ -50,7 +50,7 @@ angular.module('luticateUtils')
50 50
                         }
51 51
                     }
52 52
                     if ($scope.tableOptions.canClick == null) {
53
-                        $scope.tableOptions.canClick = function()
53
+                        $scope.tableOptions.canClick = function(item)
54 54
                         {
55 55
                             return false;
56 56
                         }
@@ -64,7 +64,7 @@ angular.module('luticateUtils')
64 64
                     var onItemClicked = $scope.tableOptions.onItemClicked;
65 65
                     $scope.tableOptions.onItemClicked = function(item)
66 66
                     {
67
-                        if ($scope.tableOptions.canClick()){
67
+                        if ($scope.tableOptions.canClick(item)){
68 68
                             onItemClicked(item);
69 69
                         }
70 70
                     };
@@ -187,7 +187,7 @@ angular.module('luticateUtils').run(['$templateCache', function($templateCache)
187 187
 '</tr>' +
188 188
 '</thead>' +
189 189
 '<tbody>' +
190
-'<tr ng-repeat="item in items.Data" ng-style="{\'cursor\': tableOptions.canClick() ? \'pointer\' : \'\'}" ng-click="onItemClicked(item)">' +
190
+'<tr ng-repeat="item in items.Data" ng-style="{\'cursor\': tableOptions.canClick(item) ? \'pointer\' : \'\'}" ng-click="onItemClicked(item)">' +
191 191
 '    <td ng-show="tableOptions.canCheck()">' +
192 192
 '    <input name="tableOptions.checkedItems[]" type="checkbox" ng-checked="isItemChecked(item)"' +
193 193
  '   ng-click="$event.stopPropagation();toggleCheckedItem(item)" >' +

+ 1
- 1
src/luedittable.js View File

@@ -77,7 +77,7 @@ angular.module('luticateUtils')
77 77
                     }
78 78
                     if (typeof $scope.tableOptions.canEdit == 'string') {
79 79
                         var permEdit = $scope.tableOptions.canEdit;
80
-                        $scope.tableOptions.canEdit = function()
80
+                        $scope.tableOptions.canEdit = function(item)
81 81
                         {
82 82
                             return luticateAuthCache.hasEffectivePermission(permEdit);
83 83
                         }

+ 1
- 1
src/modals/dialogerrorhelper.js View File

@@ -23,7 +23,7 @@
23 23
             luticateDialogErrorHelper.errorDialog = function(data)
24 24
             {
25 25
                 var message = luticateDialogErrorHelper.errorMessage(data);
26
-                return dialogs.create('/luticateUtils/dialogerror.html', 'luticateDialogError', {message: message, data: data}, {keyboard: false, backdrop: 'static'});
26
+                return dialogs.create('/luticateUtils/dialogerror.html', 'luticateDialogError', {message: message, data: data}, {});
27 27
             };
28 28
 
29 29
             return luticateDialogErrorHelper;

Loading…
Cancel
Save