From a9c8e66d14899796e786e643d434daf6f16cf062 Mon Sep 17 00:00:00 2001 From: Adam Wagner Date: Thu, 9 Feb 2017 07:52:15 +0100 Subject: HTML5 Drag and Drop Support (#8264) * Add DragSource Extension (#8169) * Add DropTarget Extension (#8170) * Add DragStart Event to DragSource Extension (#8171) * Make DataTransfer.dropEffect configurable (#8174) * Make DragSource.dataTransfer data configurable (#8172) * Add server-side Event for drop (#8177) * Added license headers * Extract handler methods, move DropEvent and DropListener to new file, move enums to top * Replaced LinkedHashMap with Map and added List to preserve order of data * Add API for adding a JS acceptance criteria for dragover and drop (#8178, #8179) * Make DragSource Extension extendable (#8175) * Make DropTarget Extension extendable (#8176) * Added javadoc to protected methods * Moved EffectAllowed to shared so that it could be used in shared state directly * Moved DropEffect to separate file, some review fixes and javadoc * Added list to DropTargetRpc to preserve order of data * Remove event listeners on unregister * Changed method names set/getData() to more descriptive set/getTransferData() * Add server side dragStart event (#8171) * Add style to prevent text selection to allow drag * Remove target indicator style on drop * Add client side dragend event listener for drag source * Add server side dragend listener. Attach client side listener only when server side listener added. * Add drag source information to server side dragstart and dragend events. * Fixed some issues addressed in review * Trigger server side dragstart only when there is a listener attached * Criteria script can be set as null to clear * Use Js Interop instead of JSNI for handling event listeners * Use elemental package instead of Js Interop for handling event listeners * Add missing javadoc for public methods * Add default value "uninitialized" to effectAllowed parameter * Simple test UI for HTML5 DnD functionality (#8395) * Add javadoc and other minor changes --- themes/src/main/themes/VAADIN/themes/valo/shared/_global.scss | 2 ++ themes/src/main/themes/VAADIN/themes/valo/shared/_overlay.scss | 6 ++++++ 2 files changed, 8 insertions(+) (limited to 'themes/src') diff --git a/themes/src/main/themes/VAADIN/themes/valo/shared/_global.scss b/themes/src/main/themes/VAADIN/themes/valo/shared/_global.scss index 3c4761ad32..441e073dcf 100644 --- a/themes/src/main/themes/VAADIN/themes/valo/shared/_global.scss +++ b/themes/src/main/themes/VAADIN/themes/valo/shared/_global.scss @@ -345,6 +345,8 @@ $valo-shared-pathPrefix: null; @include valo-drag-element; + @include valo-draggable; + @include valo-tooltip; @include valo-contextmenu; diff --git a/themes/src/main/themes/VAADIN/themes/valo/shared/_overlay.scss b/themes/src/main/themes/VAADIN/themes/valo/shared/_overlay.scss index 1c6f0c6fbc..5b44e94cac 100644 --- a/themes/src/main/themes/VAADIN/themes/valo/shared/_overlay.scss +++ b/themes/src/main/themes/VAADIN/themes/valo/shared/_overlay.scss @@ -275,6 +275,12 @@ $v-selection-item-selection-color: $v-selection-color !default; } } +@mixin valo-draggable { + .v-draggable { + user-select: none !important; + } +} + /** * Outputs the styles for generic dragging ghost elements. * -- cgit v1.2.3