WriteOn / WriteOnApp

On a mission to create the world's finest writing experience.
https://writeon.io
Apache License 2.0
1 stars 0 forks source link

Removing sync locations from multiple stories in same session doesn't work #35

Open thinq4yourself opened 9 years ago

thinq4yourself commented 9 years ago

dialogManageSynchronization.js has an annoying bug here:

$("#confirmDelete").on('show.bs.modal', function(event) {    // wire up the OK button to dismiss the modal when shown
            $(".confirm-delete-button").on("click", function(e) {
                var $removeButtonElt = $(event.relatedTarget);
                var syncAttributes = fileDesc.syncLocations[$removeButtonElt.data('syncIndex')];
                fileDesc.removeSyncLocation(syncAttributes);
                eventMgr.onSyncRemoved(fileDesc, syncAttributes);
                $("#confirmDelete").modal('hide');     // dismiss the dialog
            });
        });

When you delete from one story, all works fine. When you open another story and try to delete a sync location, the syncAttributes var seems to be empty, or nonworking, and requirejs will throw an error in console but not let the user know why they can't delete it.