openannotation / annotator

Annotation tools for the web. Select text, images, or (nearly) anything else, and add your notes.
http://annotatorjs.org
Other
2.69k stars 533 forks source link

Unable Edit or Delete the Annotations - Page getting refreshed. #625

Open natarajan050190 opened 8 years ago

natarajan050190 commented 8 years ago

Unable Edit or Delete the Annotations - Page getting refreshed. When click on the edit or delete icon the page getting refreshed unable to do any actions.

tilgovi commented 8 years ago

Can you share anything about how we can reproduce this?

AbuQasem commented 7 years ago

I have same issue, once I click on edit or delete the page get refreshed, I used code below

$('#divContent-@Model.ID').annotator() .annotator('addPlugin', 'Markdown') .annotator('addPlugin', 'Tags') .annotator('addPlugin', 'Touch', { force: true, useHighlighter: false }) .annotator('addPlugin', 'Store' , { prefix: '@URL' + 'api', annotationData: { 'ResourceId': '@Model.ID', 'ProfileId': '@currentProfile.ID', 'uri': window.location.href, 'annotator_schema_version': 'v1.0' },

                             loadFromSearch: {
                                 'limit': 20,
                                 'resourceId': 'ID'
                             },
                             showViewPermissionsCheckbox: false,
                             showEditPermissionsCheckbox: false,
                             urls: {
                                 create: '/Annotation',
                                 update: '/Annotation/:id',
                                 destroy: '/Annotation/:id',
                                 search: '/Annotation'
                             }
                         });
zuilafeng commented 6 years ago

Viewer.prototype.onEditClick,Viewer.prototype.onDeleteClick,add event.defaultDefault() in annotator.min.js