stable
Clone or download
This approach brings a few advantages: * It makes sure that two different instances of the app do not interact together, the events are kept within the app. This might becomes handy if the document application needs to be put in a widget. * IE11 is reported by both MDN and Can I Use as not supporting CustomEvent constructor [0][1]. * The events can be observed from the Vue dev tools. It was one of the migration path proposed by the Vue team when `$dispatch` and `$broadcast` were removed from Vue [2]. No functionnal change. Part of story #12456: Cut/Copy/paste items [0] https://github.com/mdn/browser-compat-data/blob/65740c63cb8c861f4511f29b3fa3cb75365f6878/api/CustomEvent.json#L113 [1] https://github.com/Fyrd/caniuse/blob/cdb9d8788bfd147b86bbd1abe3ba3198a2d284ef/features-json/customevent.json#L358 [2] https://vuejs.org/v2/guide/migration.html#dispatch-and-broadcast-replaced Change-Id: I282157bfb6988d4a4e9afbef22fef0e9fd308cd2
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/document/scripts/document/components/Folder/ActionsButton/NewItemButton.vue | +4 | −6 | Go to diff View file |
M | plugins/document/scripts/document/components/Folder/ActionsButton/NewItemVersionButton.spec.js | +22 | −18 | Go to diff View file |
M | plugins/document/scripts/document/components/Folder/ActionsButton/NewItemVersionButton.vue | +5 | −6 | Go to diff View file |
M | plugins/document/scripts/document/components/Folder/ActionsDropDown/CopyItem.spec.js | +14 | −9 | Go to diff View file |
M | plugins/document/scripts/document/components/Folder/ActionsDropDown/CopyItem.vue | +2 | −1 | Go to diff View file |
M | plugins/document/scripts/document/components/Folder/ActionsDropDown/DropdownButton.vue | +9 | −6 | Go to diff View file |
M | plugins/document/scripts/document/components/Folder/ActionsDropDown/DropdownMenu.spec.js | +12 | −4 | Go to diff View file |
M | plugins/document/scripts/document/components/Folder/ActionsDropDown/DropdownMenu.vue | +4 | −5 | Go to diff View file |
M | plugins/document/scripts/document/components/Folder/ActionsDropDown/DropdownMenuCurrentFolder.vue | +3 | −5 | Go to diff View file |
M | plugins/document/scripts/document/components/Folder/ActionsDropDown/DropdownMenuForItemQuickLook.spec.js | +19 | −9 | Go to diff View file |
M | plugins/document/scripts/document/components/Folder/ActionsDropDown/DropdownMenuForItemQuickLook.vue | +3 | −10 | Go to diff View file |
M | plugins/document/scripts/document/components/Folder/ActionsDropDown/PasteItem.spec.js | +14 | −9 | Go to diff View file |
M | plugins/document/scripts/document/components/Folder/ActionsDropDown/PasteItem.vue | +2 | −1 | Go to diff View file |
M | plugins/document/scripts/document/components/Folder/ActionsQuickLookButton/QuickLookDeleteButton.spec.js | +15 | −5 | Go to diff View file |
M | plugins/document/scripts/document/components/Folder/ActionsQuickLookButton/QuickLookDeleteButton.vue | +5 | −5 | Go to diff View file |
M | plugins/document/scripts/document/components/Folder/FolderContentRow.vue | +4 | −7 | Go to diff View file |
M | plugins/document/scripts/document/components/Folder/FolderHeader.vue | +10 | −26 | Go to diff View file |
M | plugins/document/scripts/document/components/Folder/ModalNewItem/NewFolderModal.vue | +7 | −8 | Go to diff View file |
M | plugins/document/scripts/document/components/Folder/ModalNewItem/NewItemModal.vue | +8 | −9 | Go to diff View file |
M | plugins/document/scripts/document/components/Folder/ModalNewItem/UnderTheFoldNotification.vue | +6 | −5 | Go to diff View file |
M | plugins/document/scripts/document/components/Folder/QuickLook/QuickLookFolder.vue | +3 | −6 | Go to diff View file |
A | plugins/document/scripts/document/helpers/event-bus.js | +21 | −0 | Go to diff View file |