mirror of
https://github.com/silverstripe/silverstripe-dms
synced 2024-10-22 14:05:56 +02:00
BUGFIX: fixing duplicate adding of documents in the "add documents" panel
This commit is contained in:
parent
b05cb59646
commit
ea9a0639e4
@ -51,9 +51,10 @@
|
||||
$(this).closest('.document-add-existing').selectdocument(ui.item.value, ui.item.label);
|
||||
} else {
|
||||
$(this).closest('.document-add-existing').adddocument(ui.item.value);
|
||||
$(this).val('');
|
||||
}
|
||||
|
||||
$(this).val('');
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -94,16 +95,15 @@
|
||||
var document_id = this.data('document-id');
|
||||
var dae = this.closest('.document-add-existing');
|
||||
|
||||
$(this).closest('.document-add-existing').adddocument(document_id);
|
||||
$(this).closest('.document-list').hide();
|
||||
$(this).closest('.document-add-existing').find('input.document-autocomplete').prop('disabled', false);
|
||||
|
||||
if (dae.hasClass('link-editor-context')) {
|
||||
dae.selectdocument(document_id, this.text());
|
||||
} else {
|
||||
dae.adddocument(document_id);
|
||||
}
|
||||
|
||||
$(this).closest('.document-list').hide();
|
||||
$(this).closest('.document-add-existing').find('input.document-autocomplete').prop('disabled', false);
|
||||
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user