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
                         }
50
                         }
51
                     }
51
                     }
52
                     if ($scope.tableOptions.canClick == null) {
52
                     if ($scope.tableOptions.canClick == null) {
53
-                        $scope.tableOptions.canClick = function()
53
+                        $scope.tableOptions.canClick = function(item)
54
                         {
54
                         {
55
                             return false;
55
                             return false;
56
                         }
56
                         }
64
                     var onItemClicked = $scope.tableOptions.onItemClicked;
64
                     var onItemClicked = $scope.tableOptions.onItemClicked;
65
                     $scope.tableOptions.onItemClicked = function(item)
65
                     $scope.tableOptions.onItemClicked = function(item)
66
                     {
66
                     {
67
-                        if ($scope.tableOptions.canClick()){
67
+                        if ($scope.tableOptions.canClick(item)){
68
                             onItemClicked(item);
68
                             onItemClicked(item);
69
                         }
69
                         }
70
                     };
70
                     };
187
 '</tr>' +
187
 '</tr>' +
188
 '</thead>' +
188
 '</thead>' +
189
 '<tbody>' +
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
 '    <td ng-show="tableOptions.canCheck()">' +
191
 '    <td ng-show="tableOptions.canCheck()">' +
192
 '    <input name="tableOptions.checkedItems[]" type="checkbox" ng-checked="isItemChecked(item)"' +
192
 '    <input name="tableOptions.checkedItems[]" type="checkbox" ng-checked="isItemChecked(item)"' +
193
  '   ng-click="$event.stopPropagation();toggleCheckedItem(item)" >' +
193
  '   ng-click="$event.stopPropagation();toggleCheckedItem(item)" >' +

+ 1
- 1
src/luedittable.js View File

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

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

23
             luticateDialogErrorHelper.errorDialog = function(data)
23
             luticateDialogErrorHelper.errorDialog = function(data)
24
             {
24
             {
25
                 var message = luticateDialogErrorHelper.errorMessage(data);
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
             return luticateDialogErrorHelper;
29
             return luticateDialogErrorHelper;

Loading…
Cancel
Save