Compare commits

..

3 commits

Author SHA1 Message Date
j
3f0e08a142 keep transcribing taks status 2025-01-25 10:28:53 +05:30
j
d7fbea4a20 avoid loop while selecting multiple annotations 2025-01-25 10:25:06 +05:30
j
c391d7f4fa better delete anntoation dialog 2025-01-25 10:24:24 +05:30
3 changed files with 18 additions and 6 deletions

View file

@ -88,6 +88,9 @@ class Task(models.Model):
except Item.DoesNotExist:
return False
if self.status == 'transcribing':
return False
if self.item.files.filter(wanted=True, available=False).count():
status = 'pending'
elif self.item.files.filter(uploading=True).count():

View file

@ -481,12 +481,16 @@ pandora.ui.editor = function(data) {
pandora._dontSelectResult = false;
function confirmDeleteDialog(options, callback) {
const subject = options.items.length == 1 ? Ox._('annotation') : Ox._('annotations')
const title = Ox.getObjectById(
pandora.site.layers,
getAnnotationById(options.items[0]).layer
).item
const subject = options.items.length == 1 ? title : title + 's'
const $dialog = pandora.ui.iconDialog({
buttons: [
Ox.Button({
id: 'cancel',
title: Ox._('Cancel')
title: Ox._('Keep {0}', [Ox._(subject)])
})
.bindEvent({
click: function() {
@ -495,7 +499,7 @@ pandora.ui.editor = function(data) {
}),
Ox.Button({
id: 'delete',
title: Ox._('Delete')
title: Ox._('Delete {0}', [Ox._(subject)])
})
.bindEvent({
click: function() {
@ -505,13 +509,13 @@ pandora.ui.editor = function(data) {
})
],
content: Ox._(
'Are you sure you want delete {0} {1}',
[options.items.length, subject]
'Are you sure you want delete {0} {1}?<br><br>All data will be removed.',
[options.items.length, Ox._(subject.toLowerCase())]
),
height: 96,
keys: {enter: 'delete', escape: 'cancel'},
title: Ox._(
'Delete {0} {1}', [options.items.length, subject]
'Delete {0}', [Ox._(subject)]
)
});
$dialog.open()

View file

@ -202,6 +202,11 @@ pandora.ui.item = function() {
}
});
}
// avoid loop while selecting multiple annotations
if (options.selected == '' && Ox.isArray(pandora.$ui[pandora.user.ui.itemView].options('selected'))) {
delete options.selected
}
console.log("!! video points update", pandora.user.ui.itemView, options)
pandora.$ui[pandora.user.ui.itemView].options(options);
}
}