Drag and drop libraries

There are a lot of excellent drag and drop Javascript/DHTML libraries available out there.
http://script.aculo.us/
http://www.walterzorn.com/dragdrop/dragdrop_e.htm
http://www.youngpup.net/2001/domdrag/tutorial
http://tool-man.org/examples/sorting.html
The quality of the libraries is exceptional, very clean code, very re-usable, modular, object-oriented, follows Javascript best-practices. Above all, very easy to plug in to your own applications, regardless of the web development infrastructure used. Hats off to those Javascript wizards.
Maybe I am not creative enough, but other than the "Wow, cool" factor, what practical use is there for drag-and-drop in a real-world application that cannot be done using other, more traditional means?
[BTW, I searched a lot but couldnt really find any good examples of re-ordering table columns using drag and drop. Can someone point me to a few?]
A few uses I could think of (some of them already covered in the examples above) are
1. Re-ordering a list of things
2. Adding items to a shopping cart by dragging them into a cart icon
3. Deleting things by dragging them into a trashcan icon (like in Windows)
What else? It just seems like a answer looking for a question.
Comments welcome.
Thanks

Again, very easy.
Load the libraries in the page header
<script language="JavaScript" type="text/javascript" src="http://tool-man.org/source/org/tool-man/core.js"></script>
<script language="JavaScript" type="text/javascript" src="http://tool-man.org/source/org/tool-man/events.js"></script>
<script language="JavaScript" type="text/javascript" src="http://tool-man.org/source/org/tool-man/css.js"></script>
<script language="JavaScript" type="text/javascript" src="http://tool-man.org/source/org/tool-man/coordinates.js"></script>
<script language="JavaScript" type="text/javascript" src="http://tool-man.org/source/org/tool-man/drag.js"></script>
<script language="JavaScript" type="text/javascript" src="http://tool-man.org/source/org/tool-man/dragsort.js"></script>
<script language="JavaScript" type="text/javascript" src="http://tool-man.org/source/org/tool-man/cookies.js"></script>
<script type="text/javascript">
function verticalOnly(item)
item.toolManDragGroup.verticalOnly()
}Tim's library only had draggable lists (HTML UL tag), I had to modify it to add support for table rows/columns. Modify his makeListSortable method to add
                var isList = (list.nodeName=="UL")
                var isTable = (list.nodeName=="TABLE")
                var isCell  = (list.nodeName=="TH")
                if (isList) var items = list.getElementsByTagName("li")
                if (isTable) var items = list.getElementsByTagName("tr")
                if (isCell) var items = list.parentNode.getElementsByTagName("th")To make rows draggable, add the following in the report region footer
<script type="text/javascript">
var l_cell=document.getElementById('EMPNO')
var l_table=html_CascadeUpTill(l_cell,'TABLE')
var dragsort=ToolMan.dragsort()
dragsort.makeListSortable(l_table,verticalOnly)
</script>To make columns sortable is a little more involved since HTML table columns are not really a "node", they are a collection and each cell in the collection has to be moved.
Add the following to the page header
function va_GetCellIndex(p_cell)
  var table=html_CascadeUpTill(p_cell,'TABLE')
  var row=table.rows[0]
  var cells=row.cells
  var j=cells.length
  while (j--) if (cells[j]==p_cell) return j;
  return null;
function va_MoveBefore(item1,item2)
  var item1_idx=va_GetCellIndex(item1)
  var item2_idx=va_GetCellIndex(item2)
  var table=html_CascadeUpTill(item1,'TABLE')
  var j=table.rows.length;
  while (j--) {
     var row=table.rows[j];
     var x=row.removeChild(row.cells[item1_idx])
     row.insertBefore(x,row.cells[item2_idx])
ToolMan._helpers.moveBefore = function(item1,item2) {
  if (item1.nodeName == "TH") {
    va_MoveBefore(item1,item2)
    return
  var parent = item1.parentNode
  parent.removeChild(item1)
  parent.insertBefore(item1, item2)Finally, to make the columns draggable add the following to the region footer,
<script type="text/javascript">
var l_cell=document.getElementById('EMPNO')
var dragsort=ToolMan.dragsort()
dragsort.makeListSortable(l_cell)
</script>I also made the column headings show a different cursor to provide a visual cue that the columns can be dragged by adding this in the region header
<style type="text/css">
th.t10ReportHeader {
cursor:pointer;cursor:move;
</style>Hope this helps.

Similar Messages

  • How do I create a text style in CC libraries? Every time I drag and drop text into library form Photoshop or illustrator it turns it into a graphic.

    How do I create a text style in CC libraries? Every time I drag and drop text into library form Photoshop or illustrator it turns it into a graphic.
    If I select the text layer and click the text style button in the library it just creates a new text style for Myriad Pro 12pt - I'm not using that anywhere in my document.
    Can anyone help? Seems like a bug to me as I'm trying what the video tutorials are saying.
    Thanks

    I realize AI is an illustration program.
    Do you realize it is an object-based vector-based program? Do you know the difference between raster-based and vector-based content?
    My question seems to be all over the forum but no one has been able to answer other than exporting to these file formats, which make text look awful and of no use....
    And yet everyone else in the world makes proper web images every day using a plethora of programs, including these...go figure.
    Am I missing something?
    Yep. Pretty much.
    Hello Adobe! People use transparency on website logos.
    Hello, cocteau! What you're calling "transparency" is inherent to object-based vector artwork. But web browsers don't support object-based vector artwork, except via file formats like Flash and SVG, or by viewing as a PDF in a plug-in version of Reader. Raster imaging in general only supports "transparency" by either indexing a specific color (i.e.; "don't display this color", as in GIF) or including an alpha channel (i.e.; "blend all the pixels with existing pixels, based on values from this extra channel", as in PNG). It's all in the raster file format you use, cocteau; it has little-to-nothing to do specifically with Adobe software. Such things are among the most basic matters understood by someone doing web design.
    When I export an eps from .ai file, and open the eps in photoshop,...I save as a gif for the web, it goes back to the original problem...creates jagged text. I"m giving up on this garbage...Thanks a lot adobe! Lower the price of this software if this is all that can be done.
    Once it leaves Photoshop (or Illustrator, or whatever) as a non-proprietary raster image format, it's all about what the format can do re "transparency". You can do this stuff with most any graphics program. You should read about basic web design and the differences between raster and vector content, rather than rant.
    JET

  • Drag-and-drop of files into libraries is now buggy

    When dragging song files from the finder and dropping them into an iTunes Playlist, the transfer would typically begin within a couple of seconds. Now it is highly inconsistent, sometimes taking minutes or simply not happening.
    For years I've kept my song files on an external drive with no difficulty, but with the latest iTunes and Lion the drag-and-drop bug is persistent.
    Before coming to this forum I dragged some newly minted MP3 files from my iMac internal to an existing iTunes Playlist. It now sits in limbo, with the files appearing in gray in the Playlist, but not being transferred. I shall have to quit iTunes and try again. This never happened before the latest software updates.
    When this happens it is also necessary for force quit iTunes some of the time.

    The title says "libraries" but I means Playlists, of course.

  • Drag and drop between libraries...

    Can I drag and drop songs from one iTunes library to another? I have one main library that I don't want to change, but I would like to put some of those songs on my kids iPods (I've created separate libraries for each of them). Is this possible? TIA.

    Hold down the Shift key as you launch iTunes, that lets you create a new library -- just pick a different folder location for the other library. If you do this, keep in mind the following:
    1- iTunes will remember which library you last booted from and will (by default) start up with that library until you change to a different library. If you change to a different library, iTunes will default to that one until you change it again.
    2- To change to a different library, exit iTunes and hold the Shift key as you re-launch iTunes. At the prompt, instead of creating a new library just select "Choose library" and navigate to where you saved the .itl file of the other library.
    3- Be careful auto-syncing separate iPods to separate libraries. If you accidentally sync your daughter's iPod to your son's library, her iPod will be erased and your son's library will be loaded onto it. Always boot up the correct library before auto-syncing iPods.
    4- As an alternative, keep one iTunes library and separate the music using playlists, then set each iPod to sync only to selected playlists. That way you don't have to remember to toggle between iTunes libraries.

  • How do I import music using homeshare with iTunes 11...I can see the shared libraries but I can't drag and drop and there is no import button.  Thanks!

    How do I import music using homeshare with iTunes 11...I can see the shared libraries but I can't drag and drop and there is no import button.  Thanks!

    Yes, that appears how Mavericks works right now. However, you can open the Address Panel, select all your contacts, then click the To (or CC, or Bcc) buttons to move the selection to the address field.
    If it is not already in the Toolbar, right-click on the Toolbar and select Customize Toolbar…
    Then, drag the address panel up to wherever you want it.
    You may also want to add it to the New Message window in the same way.

  • Drag and drop no longer between shared libraries after updating to itunes 10.5.

    Used to be able to open up and drag and drop from one computer to another using home sharing. No longer works. Any ideas?

    same here except i have windows vista and its my new iphone 4s.  it freezes on the backing up phase.

  • I have multiple libraries how can I drag and drop songs from either

    I have 3 PCs that are all authorized to play my music.  I have different music on different machines that I have downloaded from various places and or ripped from my own cds.  I can from my home PC drag and drop music and movies to my iPhone.  But on my work PC say if I download a new Album (not from itunes) and it is in my library, I want to be able to just drag it onto my iPhone so that I can listen to it at the gym.  When I do I see a small red circle with the red slash through it and i cant copy it.  I am tired of synching and want to be able to drag and drop from any of my PCs..  is this possible?

    My mistake totally!!! I confused a new playlist folder with a new playlist.
    Just wanted to pass that along.

  • Flash drag and drop not working on Firefox for android browser

    Drag and drop functionality is not working using Firefox Browser for Android on tablet. We tested with flash action script 2.0 & 3.0 content, both have same issue. Specs of the tab and OS are as follows.
    Android - Kitkat 4.4.2
    Tab models - Lenovo A7600H and Samsung Tab4 T531
    Please refer to a previous case raised on the same issue here at this link (Case 1029615) - https://support.mozilla.org/en-US/questions/1029615
    Additionally, we observed that the object on which Drag and Drop event was triggered, is moving little bit when we double tap.
    Does Firefox provide any libraries to support Drag and Drop functionality on Flash? We are using Geekoview api to execute flash content in our app. Will the same support be provided in Geekoview as well?
    Are there other folks facing the same issue? Is there a solution or workaround to get this feature running?

    Flash on Android is no longer supported by Adobe. While Firefox does support basic functionality we mainly focus on legacy video applications. You may run into issues with Flash and Geckoview. I doubt we have any resources to support that configuration.

  • Drag and drop a URL from IE's address bar

    I have a Processing application written (by others) that uses [Andreas Schlagel's sDrop library|http://www.sojamo.de/libraries/drop/] to accept URLs dragged and dropped from the users' browsers' address bar. The application works fine for Chrome and for Firefox and for old versions of IE but not for IE 9 or IE 10. I'm investigating how to fix this.
    In the sDrop library [the Java code to handle the drop|http://code.google.com/p/sojamo/source/browse/trunk/src/sojamo/drop/DropHandler.java] uses the Java class DataFlavor which in turn defines a number of flavours:
    imageFlavor
    javaFileListFlavor
    javaSerializedObjectMimeType
    plainTextFlavor (deprecated)
    stringFlavor
    Over on StackOverflow one questioner enumerates the data formats offered by the different browsers when they drop and for IE he lists:
    UntrustedDragDrop
    msSourceUrl
    FileGroupDescriptor
    FileGroupDescriptorW
    FileContents
    UniformResourceLocator
    Effects: Link
    The URL format does not seem to match the DataFlavors given by the class. Is this where the two additional DataFlavors, javaJVMLocalObjectMimeType and javaRemoteObjectMimeType come into there own? If so, then can someone point me at any samples, examples, tutorials, or code snippets where a Java application is the successful drop target for a URL dragged from IE's address bar?

    Dragging an URL '''OR''' the 'favicon' does '''NOT''' work when you want to drag this to a sub 'folder' in your bookmarks. e.g. I drag an URL or favicon to Bookmarks, I have a sub-folder called 'Recipes' where I want to drop the dragged object. I position the mouse over 'Recipes' and the sub-menu appears. I move the dragged object to drop this on the recipe list in the sub-menu and the sub-menu simply disappears. Equally, I CAN drop this on the top level BM menu but it does not drop in the place needed (I want this (e.g.) NOT at the bottom but two up from there. What happens is that the dropped URL appears to locate it self in a random position. Easy to replicate by dragging the same URL to the BM menu and it drops wherever it feels like. FF team have clearly failed to do some basic testing on this and there are many (correction MANY) other annoying things like this that show there has been poor or insufficient testing. I have been a fan of FF for a long time and recommended it to others. Now I cannot do this with confidence and am seriously thinking of switching back to an old version. However, I might simply go to Chrome. Are you listening FF team? A simple look at the forums will show the groundswell of annoyed people. You have altered the way many things work, seemingly focusing on prettifying things rather than ensuring stability and ensuring basic features continue to work...

  • I no longer have iTunes library.xml on my PC but I have all of my songs.  How do I download them to my iPhone - it won't allow me to drag and drop though my PC recognizes the device.

    My PC has all of my iTunes and it recognizes my iPhone 4 device but I cannot drag and drop the songs.  How do I copy the songs to my new iPhone without having to re-purchase everything?  Unfortunately, It appears I no longer have iTunes Music Library.xml on my PC.

    My husband and I are using the same iTunes account on all mac & pc computers, but the libraries are different on each machine.  We always manually manage our music (no auto sync).  iTunes is up to date on the PCs.  My husband uses our joint iTunes account on his pc, but once again, has a different collection in his library from those on the other machines.  He can't load any music from his PC to his iphone 4.  I can load music from my mac library to my iphone 4s, but cannot load from my pc library to my iphone 4s.  How can I switch my main library that it syncs with from the mac to the pc?
    Thanks

  • Why can I drag and drop from Photos to Pages, but not to Microsoft Word 2011

    I'm unable, under OS X 10.10.3, to drag and drop pictures from Photo into Word for Mac 2011.  I can paste from Photos into Pages.  How can I add Word to the list of programs that can take pasted photos pasted from Photos

    Drag and Drop support is done programmatically as part of the application design. There is no user settable configuration, or list of programs that you can add Word too. Apple has supported drag and drop in Pages for a long time, and from iPhoto or Aperture picture libraries. Microsoft chose another path.
    I don't have Office for Mac 2011, but I can state that Word 15.8.1 in Office for Mac 2015 Preview does not accept drag/drop of images from Photos either. It compensates by offering Insert ▸ Pictures ▸ Photo Browser… and when selected, displays an image panel not unlike Pages offers when clicking images from its Toolbar. At the top of this Word Preview panel is the Photos logo. It is from this Photos browser panel, that Word Preview accepts drag/drop of images. It may be that way in Word in Office for Mac 2011 too.

  • ITunes 11.1 and iOS 7.0.3 won't allow me to drag-and-drop videos onto my iPad?

    I finally updated my iPad 2 (16 GB; Wi-Fi) with the new iOS 7 update (7.0.3), and now it won't let me drag-and-drop items from my iTunes library anymore. It starts to, it seems.  iTunes says "Preparing to sync" and then that just disappears, and nothing else happens.
    Just the other night, I drag-and-dropped some songs onto my iPad (since my iPhone wasn't allowing me to, so I added them to my iPad instead; I'm getting a new iPod touch soon anyways, so this is only temporary), and it worked just fine.  This was before I updated my iOS 7 (iTunes was already at 11.1).
    I've restarted iTunes...many times...
    I've restarted my iPad...many, many times...
    I've restarted the PC...again...
    Checked my storage space; I have plenty for these six videos I want to add on here...
    I have had this iPad set on "manually manage" since I bought it.  It has never known any different.  I've manually synced movies from my old MacBook (backlight dead, and it's not worth the money I'd have to pay to replace it, since this is the second-to-last MacBook Apple made, so it isn't worth much anymore; and this MacBook still has Mac OSX 10.5, so iTunes 11 won't even work with it, so I haven't synced anything from it in MONTHS...), and to my last PC laptop (charging port is broken, so it won't charge even though it works fine when the battery is full; unfortunately, I haven't gotten around to ordering the new part yet).  I've only added three songs from this "new PC" that I'm borrowing.  To my knowledge, it doesn't matter how many different libraries you "sync" to a "manually managed" device, right?  Besides, I just synced music from this third library last week!! 
    What I just don't understand is why it let me the other day, and now it won't.
    And before I updated tonight, my PC didn't even recognize my iPad.  So I pretty much HAD to install that iOS 7 update that had been in my Settings since it came out.
    What is going on? I'm kind of sick of this...the only option it seems is to just completely sync to this one computer, but I'll lose pretty much everything except the few songs I put on here, and my videos.  I have pictures and apps and notes/documents that I DO NOT want to lose.
    Any suggestions?

    Oh, also want to add that the PC I'm currently using is:
    Windows Vista Home Premium Service Pack 2
    My other PC was:
    Windows 7 Ultimate
    My MacBook is:
    Max OSX 10.5.something (the last update available for it. .8 maybe? haha)
    Not sure if this stuff is important, but I thought I'd add it.

  • How do I drag and drop files in iTunes 12?  I don't see my other computers in the side bar only playlist?

    I upgraded to Itunes 12 and now cannot drag and drop my movies & music files between my shared computers?  The side bar option, which only appears under the Playlist tab does not show my other shared devices where I used to simply drag files over and drop them on them to transfer.  I have 2 IMACs and a macbook pro that i like to keep hard copies of my music and video libraries on.  Anyone know how I can get my shared computer to show up on the side bar so I can drag and drop like I've been doing for the last 5 years?

    Thank you Peter.  Mine is more about creating playlist on my iMac and then wanting to drop it it on to my macbook pro for tailgating and family events, instead of recreating.  That doesn't seem like something that should bother apple as I already have the music and I am not going to go purchase it again off iTunes if this is what they are thinking.  I think this is about limiting our ability to share music and movies.   

  • Drag and drop imported photos in iPhoto '09 causes duplication of old existing photos and loss if new photos

    Good Afternoon All,
    I'd be grateful for any help with the following problem.
         After importing about 30 photos from my camera into iPhoto '09 (version 8.1.2), I selected the first group of 10 and dragged and dropped them into an existing album in my iPhoto library.        I repeated this process with another  group of photos , dropping them into a different existing album. Again, I repeated this process with the last remaining photos from the original imported group of 30.
          This is exactly the same process I have used successfully on many previous occasions when adding to my iPhoto library of 6000+ photos.
           However when I later opened each of the 3 existing albums to check on the 30 new photos none of these new photos were visible.     Instead each of the three albums now contained between 5 and 15 duplicates of old photos from different and unrelated albums in addition to their normal content.       These duplicates were not present before I imported the 30 new photos.    I then opened every Album in my entire library of 6000+ photos  without finding any sign of the 30 new photos.   These 30 photos have also disappeared from "Last Import" which now shows a blank page with 0 imports.
         I still have the 30 new photos saved on my camera and could import them again. My concern is that with my very limited diagnostic skills re. my iMac OS X (10.6.8) I may aggravate the problem
    Thank you

    Morning Terence
                             Thank you for your suggestion. When I held the Option Key and opened iPhoto the resulting menu showed 2 libraries , "iPhoto Library" and "iPhoto Library (default )". 
         I then recalled that 12 months ago I had created this duplicate library when attempting to recover some lost photos.    On opening each of these two libraries in turn, I notice that they are not identical.  Rather than create another new library, I imported some new photos into "iPhoto Library "  and was then able to drag and drop successfully into this library.    When I tried to do the same with "iPhoto Library (default )"  all the problems originally described re-occured.
         Having found the problem is in the Default library I would now like to move some photos from it into "iPhoto Library" and then remove the Default Library.
         Could you recommend how best to do this or is it not a good idea?
    Regards.....Gilvin

  • I can't drag and drop my songs from mp3 rocket to my iphone?

    i have my mp3 rocket account linked to my itunes account and some songs get put onto my phone, but some dont. i can't drag and drop and if i try to rename it with correct characters, nothing happens. the mp3 rocket folder is in music under shared libraries and they look like albums with a musical note in the middle. i tried unchecking and checking them again but nothing happens. i've restarted my computer. and i added those songs to "what's new" but i still cant add them to my phone...
    can someone please help?? thank you

    Select the first column before the track title.

Maybe you are looking for