avoid scroll for long document titles, closes #3140

This commit is contained in:
j 2023-07-08 19:30:11 +05:30
parent 6e8a338f8a
commit 1175e5d5bf
2 changed files with 12 additions and 5 deletions

View file

@ -3,6 +3,13 @@
pandora.ui.deleteDocumentDialog = function(files, callback) { pandora.ui.deleteDocumentDialog = function(files, callback) {
var string = Ox._(files.length == 1 ? 'Document' : 'Documents'), var string = Ox._(files.length == 1 ? 'Document' : 'Documents'),
$content = Ox.Element().html(
files.length == 1
? Ox._('Are you sure you want to delete the document "{0}"?', [files[0].title + '.' + files[0].extension])
: Ox._('Are you sure you want to delete {0} documents?', [files.length])
).css({
overflow: 'hidden',
}),
that = pandora.ui.iconDialog({ that = pandora.ui.iconDialog({
buttons: [ buttons: [
@ -28,15 +35,12 @@ pandora.ui.deleteDocumentDialog = function(files, callback) {
} }
}) })
], ],
content: files.length == 1 content: $content,
? Ox._('Are you sure you want to delete the document "{0}"?', [files[0].title + '.' + files[0].extension])
: Ox._('Are you sure you want to delete {0} documents?', [files.length]),
keys: {enter: 'delete', escape: 'keep'}, keys: {enter: 'delete', escape: 'keep'},
title: files.length == 1 title: files.length == 1
? Ox._('Delete {0}', [string]) ? Ox._('Delete {0}', [string])
: Ox._('Delete {0} Documents', [files.length]) : Ox._('Delete {0} Documents', [files.length])
}); });
return that; return that;
}; };

View file

@ -18,7 +18,10 @@ pandora.ui.uploadDocumentDialog = function(options, callback) {
$errorDialog, $errorDialog,
$content = Ox.Element().css({margin: '16px'}), $content = Ox.Element().css({
margin: '16px',
overflow: 'hidden'
}),
$text = $('<div>') $text = $('<div>')
.html(Ox._('Uploading {0}', [files[0].name])) .html(Ox._('Uploading {0}', [files[0].name]))