filemanager: Select entry on context menu button clicked
This commit is contained in:
@@ -362,7 +362,7 @@
|
||||
<td style="width: 80px" class="elide-table-cell" ng-mousedown="select($event, entry)" ng-dblclick="open(entry)">{{ entry.size | prettyByteSize }}</td>
|
||||
<td style="width:100px" class="elide-table-cell" ng-mousedown="select($event, entry)" ng-dblclick="open(entry)">{{ entry.uid | prettyOwner }}</td>
|
||||
<td style="width: 45px; padding: 7px;">
|
||||
<button type="button" class="btn btn-xs btn-default context-menu-action" context-menu="menuOptions" model="entry" context-menu-on="click"><i class="fas fa-ellipsis-h"></i></button>
|
||||
<button type="button" class="btn btn-xs btn-default context-menu-action" context-menu="menuOptions" model="entry" context-menu-on="click" ng-click="onEntryContextMenu($event, entry)"><i class="fas fa-ellipsis-h"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -423,6 +423,11 @@ app.controller('FileManagerController', ['$scope', '$translate', '$timeout', 'Cl
|
||||
}
|
||||
};
|
||||
|
||||
$scope.onEntryContextMenu = function ($event, entry) {
|
||||
if ($scope.selected.indexOf(entry) !== -1) return;
|
||||
$scope.selected.push(entry);
|
||||
};
|
||||
|
||||
$scope.actionCut = function () {
|
||||
$scope.clipboard = $scope.selected.slice();
|
||||
$scope.clipboard.forEach(function (entry) {
|
||||
|
||||
Reference in New Issue
Block a user