mirror of
https://github.com/sismics/docs.git
synced 2024-11-25 15:17:57 +01:00
#230: Add a check all/none button on "quick upload"
This commit is contained in:
parent
748659e78e
commit
dd1c06013b
@ -98,6 +98,13 @@ angular.module('docs').controller('DocumentDefault', function ($scope, $rootScop
|
||||
return _.where($scope.files, { checked: true });
|
||||
};
|
||||
|
||||
// Change checked status
|
||||
$scope.changeChecked = function (checked) {
|
||||
_.each($scope.files, function (file) {
|
||||
file.checked = checked;
|
||||
})
|
||||
};
|
||||
|
||||
// Add a document with checked files
|
||||
$scope.addDocument = function () {
|
||||
$state.go('document.add', { files: _.pluck($scope.checkedFiles(), 'id') });
|
||||
|
@ -173,7 +173,9 @@
|
||||
"footer_sismics": "Crafted with <span class=\"fas fa-heart\"></span> by <a href=\"https://www.sismics.com\" target=\"_blank\">Sismics</a>",
|
||||
"api_documentation": "API Documentation",
|
||||
"feedback": "Give us a feedback",
|
||||
"workflow_document_list": "Documents assigned to you"
|
||||
"workflow_document_list": "Documents assigned to you",
|
||||
"select_all": "Select all",
|
||||
"select_none": "Select none"
|
||||
},
|
||||
"pdf": {
|
||||
"export_title": "Export to PDF",
|
||||
|
@ -1,7 +1,14 @@
|
||||
<div class="well well-3d" style="background-color: #f6f9fc">
|
||||
<div class="pull-right" ng-show="files.length > 0">
|
||||
<a href class="btn btn-default" ng-init="selectAll = true" ng-click="changeChecked(selectAll); selectAll = !selectAll">
|
||||
<span class="far" ng-class="{ 'fa-check-square': selectAll, 'fa-square': !selectAll }"></span>
|
||||
{{ selectAll ? 'document.default.select_all' : 'document.default.select_none' | translate }}
|
||||
</a>
|
||||
</div>
|
||||
<h3 class="well-3d-header text-muted">
|
||||
{{ 'document.default.quick_upload' | translate }}
|
||||
</h3>
|
||||
|
||||
<div class="row upload-zone"
|
||||
ngf-drop="fileDropped($files)"
|
||||
ngf-drag-over-class="'bg-success'"
|
||||
|
Loading…
Reference in New Issue
Block a user