drag-and-drop

Downloading multiple files with data-downloadurl

牧云@^-^@ 提交于 2019-12-08 08:57:27
问题 I was looking over this case study on HTML5 drag-and-drop file download using data-downloadurl. I have a working model of this method that can download a file retrieved from the server on drop, but I am wondering if there is a way to set the data-downloadurl to download multiple files at once. What I was thinking is something like a comma-separated list of urls like: data-downloadurl="{$item.mime}:{$item.name}:{$item.url}, {$item2.mime}:{item2.name"}:{item2.url} but I know this doesn't work.

How to define a Uniform Type Identifier in a plist file?

折月煮酒 提交于 2019-12-08 08:57:24
问题 My application uses the following NSApplicationDelegate function. - (void)application:(NSApplication*)sender openFiles:(NSArray*)filenames; I want to use this function to enable the user to drag and drop image files onto the application icon in the dock. How do I have to define certain file types in my plist file to restrict them to be images? I found out the structure has to look something like this. // plist file contents taken from Preview.app [...] <key>CFBundleDocumentTypes</key> <array>

Drag button between panels in wxPython

Deadly 提交于 2019-12-08 08:43:23
问题 Does anyone know of an example where it is shown how to drag a button from one panel to another in wxPython? I have created a bitmap button in a panel, and I would like to be able to drag it to a different panel and drop I there. I haven't found any examples using buttons, just text and files. I am using the latest version of Python and wxPython. 回答1: If you want to graphically represent the drag, one good way to do this is to create a borderless Frame that follows the mouse during a drag.

Drag and drop in AngularJS

為{幸葍}努か 提交于 2019-12-08 08:37:00
问题 I am trying to implement Drag and Drop using c0deformer's jQuery UI implementation (see here: http://codef0rmer.github.io/angular-dragdrop/#/) The dragging part works fine, but I can't seem to get the functionality I am after in terms of the drop. In this application, I want to be able to drop the draggable items anywhere within a target div, i.e., I don't want the destination scope to be limited to a list-type structure (or a set of repeated divs). Mainly this is because the user will be

Knockout sortable drag and drop from outside

五迷三道 提交于 2019-12-08 08:34:46
问题 maybe someone can help me. I got a large view in a webapp. There is a list of products on the left and a list of categories on the right side. The products should be dragged inside the categories. The list of products was an observableArray. Now we got performance problems (especially on IE) when the list has more than 1000 entries. So cause the products itself does not change, we took them out of the knockout binding, concat them in a string and append only one node. Now of course, the

Protractor. How to do a drag and drop action?

回眸只為那壹抹淺笑 提交于 2019-12-08 08:32:40
问题 I am currently writing a protractor test and I need to drag a drop some elements... Basically the other developers at the time used angular drag and drop to implement this functionality. I have been searching for a couple of hours but I haven't figured out yet how to get through it. This is the element I am trying to drag. Actually, there are 4 draggable elements and I want to drag the last one on the first one in order to make first the last one: this.draggableFields = element.all(by.css(

SWT Drag to Explorer (Windows) or Finder (OS X)

≯℡__Kan透↙ 提交于 2019-12-08 08:30:23
问题 I've got an SWT application with a bunch of graphical elements. I'd like for the user to be able to drag an element to their Desktop / Windows Explorer / OS X Finder. When they drop the element, I need the path that they dropped it to, so that I can create a file in that location which represents the element. I don't think I can use a FileTransfer , because there is no source file. There is a source object which can create a file, but only once it knows where to put it. Inlined below is a

Drag and Drop an email attachment into a javafx 8 application

China☆狼群 提交于 2019-12-08 08:12:40
问题 I am trying to implement a requirement to drag and drop documents attached in an email into a JavaFX 8 application running on jdk 8b45. I am able to drag and drop from any folder on my computer but not from an email attachment. // MY VBOX WHERE I WANT TO DROP FILES INTO VBox bkgrndDocsVBox = new VBox(10.0); bkgrndDocsVBox.setPadding(new Insets(15, 10, 5, 10)); bkgrndDocsVBox.setStyle("-fx-border-color: transparent;"); bkgrndDocsVBox.setOnDragOver((final DragEvent event) -> { mouseDragOver

jquery ui How to get a id of a draggable item when i click on the droppable item

徘徊边缘 提交于 2019-12-08 08:01:15
问题 i've tried for several days and i can't get it work. I want to get the id of div ( ui-widget-content ) that is the draggable item, when i dropped and click on the div ( ui-widget-header ) that is the dropped item but i can't get it work. <script> $(document).ready(function () { $("#j1, #j2, #j3, #j4, #j5, #j6").draggable(); $("#p1, #p2, #p3, #p4, #p5, #p6").droppable({ hoverClass: 'ui-state-hover', helper: 'clone', cursor: 'move', drop: function (event, ui) { $(this).addClass('ui-state

JQuery Drag and Drop Count Content of Drop Area?

╄→гoц情女王★ 提交于 2019-12-08 07:53:23
问题 Im working on a Jquery project in which the user can drag a 'pill' into a 'cup' and then the amount of pills in the cup can be displayed however ive got a problem with once the pill is in the cup if the user moves the pill it counts it as being dropped again. How do i get the draggable(pill) to be counted once when dropped in the droppable(cup). Is it a case of a for/if loop of storing an array or attaching an identifier to each pill? here is some of my code html <div id="PillSpace"> <div