-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deposits-ui: disable publish button on files #1690
deposits-ui: disable publish button on files #1690
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor naming stuff, otherwise 🔥
angular.module('invenioRecords') | ||
.filter('fieldtitle', fieldtitle) | ||
.filter('notIn', notIn) | ||
.filter('formatGrant', formatGrant) | ||
.filter('limitToEllipsis', limitToEllipsis) | ||
.filter('striptags', striptags) | ||
.filter('stable', stable); | ||
.filter('stable', stable) | ||
.filter('check_all_files_uploaded',check_all_files_uploaded); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.filter('check_all_files_uploaded',check_all_files_uploaded); | |
.filter('checkAllFilesUploaded', check_all_files_uploaded); |
<li> | ||
<button | ||
class="btn btn-primary" | ||
data-toggle="modal" | ||
data-target="#warningModal" | ||
ng-hide="recordsVM.invenioRecordsArgs.templateParams.is_published" | ||
ng-disabled="depositionForm.$invalid || depositionForm.$dirty || recordsVM.invenioRecordsLoading" | ||
ng-attr-title="{{(depositionForm.$invalid || depositionForm.$dirty || recordsVM.invenioRecordsLoading) && 'You need to save your deposit first' || 'Publish the record'}}"> | ||
ng-disabled="depositionForm.$invalid || depositionForm.$dirty || recordsVM.invenioRecordsLoading || (filesVM.files | check_all_files_uploaded) || filesVM.files.length == 0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ng-disabled="depositionForm.$invalid || depositionForm.$dirty || recordsVM.invenioRecordsLoading || (filesVM.files | check_all_files_uploaded) || filesVM.files.length == 0" | |
ng-disabled="depositionForm.$invalid || depositionForm.$dirty || recordsVM.invenioRecordsLoading || (filesVM.files | checkAllFilesUploaded) || filesVM.files.length == 0" |
ng-attr-title="{{(depositionForm.$invalid || depositionForm.$dirty || recordsVM.invenioRecordsLoading) && 'You need to save your deposit first' || 'Publish the record'}}"> | ||
ng-disabled="depositionForm.$invalid || depositionForm.$dirty || recordsVM.invenioRecordsLoading || (filesVM.files | check_all_files_uploaded) || filesVM.files.length == 0" | ||
ng-attr-title="{{(depositionForm.$invalid || depositionForm.$dirty || recordsVM.invenioRecordsLoading) && 'You need to save your deposit first' | ||
|| (filesVM.files | check_all_files_uploaded) && 'There are pending files to be uploaded' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|| (filesVM.files | check_all_files_uploaded) && 'There are pending files to be uploaded' | |
|| (filesVM.files | checkAllFilesUploaded) && 'There are pending files to be uploaded' |
* Disable the publish button and display appropriate message in the case of selected but not uploaded files or if no selected files are present. (closes zenodo#1412)
ad54373
to
5b6bb45
Compare
message in the case of selected but not uploaded files
or if no selected files are present. (closes deposit-ui: more intutitve file upload indicators #1412)