tsgrp / OpenAnnotate

TSG's Browser-based Annotation Tool
8 stars 4 forks source link

Clear All Button Clears One Section at a Time in Edit Pages Mode #816

Closed mdworwa closed 4 years ago

mdworwa commented 4 years ago

The Clear All button in Edit Pages mode can be found in the Sections sidebar. Once you click the button, it asks the user whether they are sure they want to clear all sections. After clicking yes, one section is removed and the pages are listed under Unsectioned. The user has to keep clicking yes to clear all of the sections.

The button should clear all sections after clicking yes, not one at a time.

clearAllPage

ghost commented 4 years ago

Completed in OA Revision #7092

SECTION MODE: CLEAR ALL BUTTON FIX - this commit fixes a "Clear All" button deleting one section at a time instead of all together. The problem occurred because collection models were accessed in the middle of the removing process by calling "showHidePage" trigger. The trigger is now being called after all sections are removed inside the "Clear All" button handler.

CRs: mbrouillette, dvora