Search Results

Search found 43406 results on 1737 pages for 'drag and drop files'.

Page 6/1737 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Preventing click event with jQuery drag and drop

    - by Sasha Yanovets
    I have an elements on page that are draggabe with jQuery. These elements have click event wich navigates to another page (ordinary links for example). What is the best way to prevent click from firing on dropping such element, while allowing clicking it in not drag and drop state? I have this problem with sortable elements, but think it is good to have solution for general drag and drop. I've solved the problem for myself. After that found that same solution exists for Scriptaculous, but maybe someone have a better way to achieve that.

    Read the article

  • how can i get list of created and deleted files on the server?

    - by max
    i have a image sharing website , users log and upload image last night i've lost about 30 newly-consecutive uploaded images ... i mean they have been uploaded ... apparently ... they are in the database but the actual image on the server is gone ! error log doesn't show anything ... so i thought my best option is to check list of created and deleted files ... if there is any ! is there a log file for created and deleted files on the server ? i'm using directadmin

    Read the article

  • WebBrowser control HTMLDocument automate selecting option drop-down

    - by CWinKY
    I'm trying to automate in a WinForm using a WebBrowser control to navigate and pull report info from a website. You can enter values in textboxes and invoke the click events for buttons and links, but I have not figured out how select a option drop-down .... in a automated way. Anybody recommend how to select a item from a drop-down, given this html example: <SELECT id="term_id" size="1" name="p_term_in"><option value="">Select Another Term<option value="201050">Summer 2010<option value="201010">Spring 2010<option value="200980">Fall 2009</SELECT> For others that can learn from entering values to textboxes and invoking click events here's how you do it: webBrowser1.Document.GetElementById("<HTML ELEMENT NAME>").SetAttribute("value", "THE NAME"); Invoke button or hyperlink click: webBrowser1.Document.GetElementById("<BUTTON>").InvokeMember("click"); So I've solved entering values and invoking click, but I have not solved selecting a drop-down value.

    Read the article

  • DROP TABLE fails for temp table

    - by StarBright
    I have a client application that creates a temp table, the performs a bulk insert into the temp table, then executes some SQL using the table before deleting it. Pseudo-code: open connection begin transaction CREATE TABLE #Temp ([Id] AS int) bulk insert 500 rows into #Temp UPDATE [OtherTable] SET [Status]=0 WHERE [Id] IN (SELECT [Id] FROM #Temp) AND [Group]=1 DELETE FROM #Temp WHERE [Id] IN (SELECT [Id] FROM [OtherTable] WHERE [Group]=1) INSERT INTO [OtherTable] ([Group], [Id]) SELECT 1 as [Group], [DocIden] FROM #Temp DROP TABLE #Temp COMMIT TRANSACTION CLOSE CONNECTION This is failing with an error on the DROP statement: Cannot drop the table '#Temp', because it does not exist or you do not have permission. I can't imagine how this failure could occur without something else going on first, but I don't see any other failures occurring before this. Is there anything that I'm missing that could be causing this to happen?

    Read the article

  • php multiple select drop down

    - by Chocho
    here is my mysql and php code layout: -i have 3 tables -tableA stores unique "person" information -tableB stores unique "places" information -tableC stores not unique information about a person and places they have "beenTo". here is how i layed out my form: -one big form to insert into "person" tableA; "beenTo" tableC in the form, a person mulitple selects "places" which get inserted into "beenTo" my question is, when i am editing a "person" how do i display what the user has already selected to appear on my multiple select options drop down menu? my drop down menu at the moment query "places" table and displays it in a multiple select drop down menu. its easier when a person have beenTo one place, the problem arrises when there is more than one "beenTo" places? any ideas. thanks

    Read the article

  • Dojo DnD: how to access newly copied node on onDndDrop event?

    - by toshinao
    Hi. I am working on code like the following. 01: var c1 = new dojo.dnd.Source('container1', {copyOnly:true}); // container1 is a div 02: var c2 = new dojo.dnd.Source('container2'); // container2 is a div 03: var list = []; 04: for (var i = 0; i < 3; i++) { list.push( dojo.create('div') ); } 05: c1.insertNodes(false, list); 06: 07: function checkDndCopy(nodes, target){ 08: dojo.forEach(nodes, function(node){ alert(node.id); } ); 09: } 10: dojo.subscribe("/dnd/drop", function(){ 11: var mgr = dojo.dnd.manager(); 12: checkDndCopy(mgr.nodes, mgr.target); 13: }); The nodes inserted to the c1 at line 05 have id of "dojoUnique1, donoUnique2, dojoUnique3". On a event of drag and drop a node from c1 to c2, a onDndDrop event is fired and the subscribe method defined in line10-13 is invoked. I expected that newly copied node appears in the nodes (for example) at line 08. But this is not true. When dojoUnique1 is target of drag and drop, nodes at line 08 contains only dojoUnique1. I want to modify some attributes of newly copied nodes on the event of onDndDrop. Please let me know how such a thing is realized.

    Read the article

  • Hidden files in Nautilus after extracting ISO

    - by Luis Alvarado
    I need to first point to the image below to explain a bit about what I find weird here: I extracted the informacion from an ISO I from Nautilus I could only see two folders but from the terminal I can see the rest of the files and folders. This folders do not have the . character in from of them to hide them from plain sight. When I try to "Show hidden files" in Nautilus, Nautilus closes itself. It does not show the hidden folders or files. Somehow they are hidden without using the normal dot in the beginning of the name. The have my user permission but no way of seeing them from Nautilus. I can interact with them but the fact that they appear hidden when I can see them inside the ISO and after extracting them they disappear is what confuses me. What permission or setting makes this folders appear hidden and does not let Nautilus show them and like I said before, trying to show them with the "Show hidden files" option crashes Nautilus and exits it. Forcing me to have to open Nautilus again from the Launcher.

    Read the article

  • How to organize music files?

    - by newbie
    I'm trying to re-organize my music files. I copied them from my iPod before it died, so they have funky names, like DGEDH.mp3. I tried using a Windows utility to rename them from their ID3 tags, but it didn't work very well--it created a bunch of folders (one for each album in theory, but more like 7 or 8 in reality) and renamed the files with non-English characters. Most of the files are MP3s, but there's at least one or two other file types as well. I'd like to copy them to a new folder and try a Ubuntu utility to rename and re-organize them. In Windows, this would be straightforward--I'd use the Search function (with no file name specified) to list all of the files in the main folder and its subfolders, then drag and drop them to the new folder. What's the easiest way to accomplish the same thing in Ubuntu? The GUI search doesn't seem to accept wildcard characters, and I don't remember all of the file types I have, so it's not as simple as searching for "mp3". Many thanks!

    Read the article

  • Vbscript - Checking each subfolder for files and copy files

    - by Kenny Bones
    I'm trying to get this script to work. It's basically supposed to mirror two sets of folders and make sure they are exactly the same. If a folder is missing, the folder and it's content should be copied. Then the script should compare the DateModified attribute and only copy the files if the source file is newer than the destination file. I'm trying to get together a script that does exactly that. And so far I've been able to check all subfolder if they exist and then create them if they don't. Then I've been able to scan the top source folder for it's files and copy them if they don't exist or if the DateModified attribute is newer on the source file. What remains is basically scanning each subfolder for its files and copy them if they don't exist or if the DateModified stamp is newer. Here's the code: Dim strSourceFolder, strDestFolder strSourceFolder = "c:\users\vegsan\desktop\Source\" strDestFolder = "c:\users\vegsan\desktop\Dest\" Set fso = CreateObject("Scripting.FileSystemObject") Set objTopFolder = fso.GetFolder(strSourceFolder) Set colTopFiles = objTopFolder.Files 'Check to see if subfolders actually exist. Create if they don't Set objColFolders = objTopFolder.SubFolders For Each subFolder in objColFolders CheckFolder subFolder, strSourceFolder, strDestFolder Next ' Check all files in first top folder For Each objFile in colTopFiles CheckFiles objFile, strSourceFolder, strDestFolder Next Sub CheckFolder (strSubFolder, strSourceFolder, strDestFolder) Set fso = CreateObject("Scripting.FileSystemObject") Dim folderName, aSplit aSplit = Split (strSubFolder, "\") UBound (aSplit) If UBound (aSplit) > 1 Then folderName = aSplit(UBound(aSplit)) folderName = strDestFolder & folderName End if If Not fso.FolderExists(folderName) Then fso.CreateFolder(folderName) End if End Sub Sub CheckFiles (file, SourceFolder, DestFolder) Set fso = CreateObject("Scripting.FileSystemObject") Dim DateModified DateModified = file.DateLastModified ReplaceIfNewer file, DateMofidied, SourceFolder, DestFolder End Sub Sub ReplaceIfNewer (sourceFile, DateModified, SourceFolder, DestFolder) Const OVERWRITE_EXISTING = True Dim fso, objFolder, colFiles, sourceFileName, destFileName Dim DestDateModified, objDestFile Set fso = CreateObject("Scripting.FileSystemObject") sourceFileName = fso.GetFileName(sourceFile) destFileName = DestFolder & sourceFileName if Not fso.FileExists(destFileName) Then fso.CopyFile sourceFile, destFileName End if if fso.FileExists(destFileName) Then Set objDestFile = fso.GetFile(destFileName) DestDateModified = objDestFile.DateLastModified if DateModified <> DestDateModified Then fso.CopyFile sourceFile, destFileName End if End if End Sub

    Read the article

  • Use Dojo Drag and Drop together with Dojo Moveable

    - by Select0r
    Hi, I'm using Dojo.dnd to transfer items between to areas. The problem is: the items will snap into place once I drop them, but I'd like to have them stay where I drop them, but only for one area. Here's a little code to explain this better: <div id="dropZone" class="dropZone"> <div id="itemNodes"></div> <div id="targetZone" dojoType="dojo.dnd.Source"></div> </div> "dropZone" is a DIV that contains two dojo.dnd.Source-areas, "itemNodes" (created programmatically) and "targetZone". Items (DIVs with images) should be dragged from a simple list out of "itemNodes" into "targetZone" and stay where they are dropped. As soon as they are dragged out of "targetZone" they should snap back to the list inside "itemNodes". Here's the code I use to create the items: var nodelist = new dojo.dnd.Source("itemNodes"); {Smarty-Loop} nodelist.insertNodes(false, ['<img class="dragItem" src="{$items->info.itemtext}" alt="{$items->info.itemtext}" border="0" />']); {/Smarty-Loop} But this way I just have two lists of items, the items dropped into "targetZone" won't stay where I dropped them. I've tried a loop dojo.query(".dojoDndItem").forEach(function(node) to grab all items and change them to a "moveable"-type: using dojo.dnd.move.constrainedMoveable will change the items so they can always be moved around (even in "itemNodes") using dojo.dnd.move.boxConstrainedMoveable and defining the "box" to the borders of "targetZone" makes it possible to just move the items around inside "targetZone", but as soon as I drop them, I can't grab and move them back out So here's the question: is it possible to create two dnd.Sources where I can move items back and forth and let the items be "moveable" only in one of the sources?Or is there a workaround like making the items moveable and if they're not dropped into "targetZone" they'll be moved back to the list in "itemNodes" automatically? Once the page is submitted, I have to save the position of every item that has been placed into "targetZone". (The next step will be positioning the items inside "targetZone" on page load if the grid has already been filled before, but I'd be happy to just get the thing working in the first place.) Any hint is appreciated. Greetings, Select0r

    Read the article

  • md5hash performance with big files for check copy files in shared folder

    - by alhambraeidos
    Hi all, My app Windows forms .NET in Win XP copy files pdfs in shared network folder in a server win 2003. Admin user in Win2003 detects some corrupt files pdfs, in that shared folder. I want check if a fileis copied right in shared folder Andre Krijen says me the best way is to create a MD5Hash of original file. When the file is copied, verify the MD5Hash file of the copied one with the original one. I have big pdf files. apply md5 hash about big file, any performance problem ?? If I only check (without generate md5 hash) Length of files (original and copied) ?? Thanks in advanced.

    Read the article

  • Memory Leak with Swing Drag and Drop

    - by tom
    I have a JFrame that accepts top-level drops of files. However after a drop has occurred, references to the frame are held indefinitely inside some Swing internal classes. I believe that disposing of the frame should release all of its resources, so what am I doing wrong? Example import java.awt.datatransfer.DataFlavor; import java.io.File; import java.util.List; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.TransferHandler; public class DnDLeakTester extends JFrame { public static void main(String[] args) { new DnDLeakTester(); //Prevent main from returning or the jvm will exit while (true) { try { Thread.sleep(10000); } catch (InterruptedException e) { } } } public DnDLeakTester() { super("I'm leaky"); add(new JLabel("Drop stuff here")); setTransferHandler(new TransferHandler() { @Override public boolean canImport(final TransferSupport support) { return (support.isDrop() && support .isDataFlavorSupported(DataFlavor.javaFileListFlavor)); } @Override public boolean importData(final TransferSupport support) { if (!canImport(support)) { return false; } try { final List<File> files = (List<File>) support.getTransferable().getTransferData(DataFlavor.javaFileListFlavor); for (final File f : files) { System.out.println(f.getName()); } } catch (Exception e) { e.printStackTrace(); } return true; } }); setDefaultCloseOperation(DISPOSE_ON_CLOSE); pack(); setVisible(true); } } To reproduce, run the code and drop some files on the frame. Close the frame so it's disposed of. To verify the leak I take a heap dump using JConsole and analyse it with the Eclipse Memory Analysis tool. It shows that sun.awt.AppContext is holding a reference to the frame through its hashmap. It looks like TransferSupport is at fault. What am I doing wrong? Should I be asking the DnD support code to clean itself up somehow? I'm running JDK 1.6 update 19.

    Read the article

  • HTML 5 drag-drop into wysiwyg editor in Firefox

    - by einarq
    I have a wysiwyg editor using the HTML 5 drag-drop api to allow the user to place widgets within the page they are editing. When the OnDrop event fires, I prevent the default event, and insert some html within the editor that represents the widget they inserted. I use execCommand("inserthtml", false, html) for this in Firefox. This works fine in IE, but in Firefox the html is not placed in the location where it was dropped. It always gets placed in the location where the previous selection was, which leads me to believe that cancelling the OnDrop event to override the default drop also cancels the selection change. Any ideas on how to solve this? Thanks!

    Read the article

  • Solving the context menu problem with drag and drop in trees

    - by Frank Nimphius
    Normal 0 false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} The following drag-and-drop problem has been reported on OTN: An ADF Faces tree component is configured with a af:collectionDropTarget tag to handle drop events. The same tree component also has a context menu defined that is shown when users select the tree with the right mouse button. The problem now was - and I could reproduce this - that the context menu stopped working after the first time the tree handled a drop event. The drag and drop use case is to associate employees from a table to a department in the tree using drag and drop. The drop handler code in the managed bean looked up the tree node that received the drop event to determine the department ID to assign to the employee. For this code similar to the one shown below was used List dropRowKey = (List) dropEvent.getDropSite(); //if no dropsite then drop area was not a data area if(dropRowKey == null){    return DnDAction.NONE; }                tree.setRowKey(dropRowKey); JUCtrlHierNodeBinding dropNode = (JUCtrlHierNodeBinding) tree.getRowData(); Normal 0 false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} Normal 0 false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} So what happens in this code? The drop event contains the dropSite reference, which is the row key of the tree node that received the drop event. The code then sets the key to the tree in a call to getRowDate() returns the node information for the drop target (the department). This however causes the tree state to go out of synch with its model (ADF tree binding), which is known to cause issues. In this use case the issue caused by this is that the context menu no longer shows up. To fix the problem, the code needs to be changes to read the current row key from the key, then perform the drop operation and at the end set the origin (or model) row key back //memorize current row key Object currentRowKey = tree.getRowKey();        List dropRowKey = (List) dropEvent.getDropSite(); //if no dropsite then drop area was not a data area if(dropRowKey == null){   return DnDAction.NONE;   }              tree.setRowKey(dropRowKey); JUCtrlHierNodeBinding dropNode = (JUCtrlHierNodeBinding) tree.getRowData(); ... do your stuff here .... //set current row key back tree.setRowKey(currentRowKey); AdfFacesContext.getCurrentInstance().addPartialTarget(tree); Node the code line that sets the row key back to its original value.

    Read the article

  • How to Use Offline Files in Windows to Cache Your Networked Files Offline

    - by Taylor Gibb
    The problem with storing all your files on a file server or networked machine is that when you leave the network, how are you going to access your files? Instead of using a VPN or Dropbox, you can use the Offline Files feature built into Windows. Note: You should probably not be using this guide to make your 2 terabyte movie collection available offline—while it may work, it is not recommended just because the Offline Files feature isn’t made for storing massive amounts of data offline. How to Use Offline Files in Windows to Cache Your Networked Files Offline How to See What Web Sites Your Computer is Secretly Connecting To HTG Explains: When Do You Need to Update Your Drivers?

    Read the article

  • certain files not syncing

    - by Josh
    I have UbuntuOne set up to sync a one folder with a number of subfolders. For some reason some of the subfolders have stopped syncing. Within one subfolder with 6 subfolders in it, some are showing up empty (they shouldn't be) and some are showing up with only some of the files they should contain. I have synced recently, and newer files are showing up in other subfolders. There's just some problem with these particular folders. They are not especially big nor do they have especially big files in them. Thoughts?

    Read the article

  • How to extract file paths out of drag and drop event?

    - by trismarck
    I have this application that lists files in a WindowsForms listbox (NET framework). The application does not support the copy operation if multiple files are selected in the listbox, but at the same time, the application supports 'drag and drop' event for multiple files (allows dragging the files 'out of the application'). How can I extract the paths of the files 'dragged out of the application'? (i.e. I drop the files on some program / script that shows me the paths / saves the paths to a txt file).

    Read the article

  • Ubuntu One lost most of my files!

    - by Max
    I keep in my UbuntuOne the source code of my projects as a back up. In the past it worked and I never had problem. It happened that I had to change the hard disk of my laptop and I installed a fresh Ubuntu 12.10 in the new one. First time I connected with UbuntuOne it downloaded my files, but when I went to see my projects almost all my c++ source code files were missing!!!... I tried to check if I still have them on UbuntuOne by accessing from the web but nothing... my work is lost forever. I don't know who to ask for help? Is there a way to get back my precious files? Honestly I can't trust this service any more, I'm very disappointed. (edit: thanks God I found a back up in one of my external hard disks. I won't trust Ubuntu One any more, it's buggy and quite slow. )

    Read the article

  • How to use drag and drop within a UIScrollView

    - by user249488
    I am trying to drag and drop UIViews within a UIScrollView. I'd like the UIScrollView to scroll if I drag a UIView so that it intersects the top or bottom of the ScrollView. If it touches the top, it should scroll up. If it touches the bottom, it should scroll down. Once the UIView is moved such that it is no longer intersecting the top or bottom, the scrolling should stop. The first approach I tried was to start an NSTimer whenever I detected that the UIView intersected with the top or bottom of the scrollview. The timer would scroll the UIScrollView bit by bit until it was invalidated. This resulted in very jerky scrolling, since there is no way to predict when the timers will fire. My current approach is to simply scroll all the way to the top or bottom of the ScrollView, like this: [UIView beginAnimations:nil context:NULL]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; [UIView setAnimationDuration:1.0]; [self.parentScrollview setContentOffset:newOffset animated:NO]; [UIView commitAnimations]; In order to stop scrolling, I try to determine the position of the touch in the touchesMoved: delegate, and use that to calculate the contentOffset to use for the scrollView. The problem is, when I try to get the location in the view via [[touches anyObject] locationInView:self], I get the final end location, rather than the current location. I'm guessing that's because the contentOffset on the scrollView is set immediately. Is there a way to get the actual location of a touch in a situation like this? Or any other way to set the contentOffset when I interrupt the scrolling animation?

    Read the article

  • NSCollectionView subclass doesn't call drawRect during drag session despite setNeedsDisplay

    - by Alain Vitry
    Greetings, I am puzzled as to how and when drawRect is supposed to be called in a NSCollectionView subclass. I implement drag and drop operation in order to move NSCollectionViewItems within the collection, and would like to draw a visual indication of where the drop would end. The subclass does not call drawRect during the drag session. (It does during scroll) Is this the intended operation ? Any hint on how to implement this behavior properly are welcome. A full xcode project of the following code is available at: http://babouk.ovh.org/dload/MyCollectionView.zip Best regards Code sample: @interface CollectionViewAppDelegate : NSObject <NSApplicationDelegate> { NSWindow *window; NSMutableArray *collectionContent; } /* properties declaration */ /* KVC compliance declarations */ @end @interface MyCollectionView : NSCollectionView @end @interface ItemModel { NSString *name; } @property (copy) NSString *name; @end @implementation MyCollectionView - (void)drawRect:(NSRect)rect { NSLog(@"DrawRect"); } - (void)mouseDragged:(NSEvent *)aEvent { NSPoint localPoint = [self convertPoint:[aEvent locationInWindow] fromView:nil]; [self dragImage:[NSImage imageNamed:@"Move.png"] at:localPoint offset:NSZeroSize event:aEvent pasteboard:nil source:self slideBack:NO]; } - (BOOL)prepareForDragOperation:(id < NSDraggingInfo >)sender { return YES; } - (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender { return NSDragOperationEvery; } - (NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)sender { [self setNeedsDisplay:YES]; return NSDragOperationEvery; } - (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)isLocal { return NSDragOperationEvery; } - (void)mouseDown:(NSEvent *)theEvent { } @end @implementation CollectionViewAppDelegate @synthesize window, collectionContent, collectionView; - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { NSMutableArray *data = [[NSMutableArray alloc] init]; /* Fill in data */ [self setCollectionContent:data]; [data release]; } /* dealloc */ /* KVC implementation */ @end @implementation ItemModel @synthesize name; /* dealloc */ @end

    Read the article

  • jQuery Drag/Drop problem: mousemove Event not binding for some elements

    - by saturdayplace
    Using the latest jQuery/UI that are hosted at Google. I've got the following markup: <ul id="tree"> <li><a href="1/">One</a></li> <li><a href="2/">Two</a></li> </ul> And the following javascript: $(document).ready(function(){ // Droppable callbacks function dragOver(overEvent, ui_object) { $(this).mousemove(function(moveEvent){ console.log("moved over", this); }); } function drop_deactivate() { $(this).unbind(); } function drag_out() { $(this).unbind(); } // Actual dragging $("#treeContainer li").draggable({ revert: true, revertDuration: 0 }); // Actuall dropping $("a").droppable({ tolerance: "pointer", over: dragOver, deactivate: drop_deactivate, out: drag_out }); }); If I drag the first li down over the second, the mousemove function fires (and firebug logs the output). But if I drag the second li up over the first, the mousemove function doesn't fire. You can see this live at http://jsbin.com/ivala. Is there a reason for this? Should I be trapping the mousemove event in some other way? Edit: It appears as thought the mousemove() event isn't binding for earlier elements than the one currently being dragged (should be bound upon their mouseover).

    Read the article

  • Drag-n-Drop on contentEditable elements

    - by Raybiez
    There are numerous WYSIWYG editors available on the internet, but I'm yet to find one that implements some form of drag-n-drop implementation. It is easy to create one's own editor, but I want to the user to be able to drag elements (ie. tokens) from outside the editable area and have them drop it at a location of their choice inside the editable area. It is easy to inject html at a specific location of an editable element, but how do one determine where the caret should be when the user is dragging a DIV over some element in the editable area. To better illustrate what I'm trying to explain, see the following scenario. The editable area (either an IFRAME in edit mode or a DIV with its contentEditable attribute set to true) already contains the following text: "Dear , please take note of ...." The user now drags an element representing some token from a list of elements, over the editable area, moving the cursor over the text until the caret appear just before the comma (,) in the text as shown above. When the user releases the mouse button at that location, HTML will be injected which could result in something like this: "Dear {UserFirstName}, please take note of ...". I do not know if anyone has ever done anything similar to this, or at least know of how one would go about doing this using JavaScript. Any help will be greatly appreciated.

    Read the article

  • Cocoa NSOutlineView and Drag-and-Drop

    - by bobthecoder
    I recently started another thread without an account, so I'm reposting the question here with an account so I can edit current links to the program so other users can follow this. I have also updated the code below. Here is my original question: I read the other post here on Outlineviews and DND, but I can't get my program to work. At the bottom of this post is a link to a zip of my project. Its very basic with only an outlineview and button. I want it to receive text files being dropped on it, but something is wrong with my code or connections. I tried following Apple's example code of their NSOutline Drag and Drop, but I'm missing something. 1 difference is my program is a document based program and their example isn't. I set the File's Owner to receive delegate actions, since that's where my code to handle drag and drop is, as well as a button action. Its probably a simple mistake, so could someone please look at it and tell me what I'm doing wrong? Here is a link to the file: http://dl.dropbox.com/u/7195844/OutlineDragDrop1.zip

    Read the article

  • drag and drop with jquery and php

    - by robertdd
    hy, i have a php array with the name of some images! i list all the images use this: $files = $_SESSION['files']; $imgid = $_POST['id']; if ($files){ foreach($files as $image ): print '<li id="liupimages">'."\n"; print '<a href="uploads/'.$image.'"><img id="'.$imgid.'" alt="'.$image.'" src="uploads/'.$image.'"></a>'."\n"; print "</li>\n"; endforeach; print <<<JS <script> $(".thumbs li a").click(function(){ var largePath = $(this).attr("href"); $('.thumbs li').removeClass('thumbac'); $(this).parent().addClass('thumbac'); $("#largeImg").hide() .attr({ src: largePath }) .load(function() { $(this).show(); }); return false; }); </script> JS; } i use jquery-ui to drag and drop images using this function: $(function() { $("#upimagesQueue").sortable({ opacity: 0.6, cursor: 'move', update: function() { //?? } }); }); after i drag and drop one image i want to be able to update the php array to! how to do this?

    Read the article

  • jquery ui drag and drop showing feedback

    - by sea_1987
    Hi there, I have some drag and drop functionality on my website, I am wanting to hightlight the area that is droppable with a chage in border color when the draggable element is clicked/starting to be dragged. If the click/or drag stops I want the border of the droppable element to change back to its origianl state, I currently have this code, but it does not work very well. $(".drag_check").draggable({helper:"clone", opacity:"0.5"}); $(".drag_check").mousedown(function() { $('.searchPage').css("border", "solid 3px #00FF66").fadeIn(1000); }); $(".drag_check").mouseup(function(){ $('.searchPage').css("border", "solid 3px #E2E5F1").fadeIn(1000); }) $(".searchPage").droppable({ accept:".drag_check", hoverClass: "dropHover", drop: function(ev, ui) { var droppedItem = ui.draggable.children(); cv_file = ui.draggable.map(function() {//map the names and values of each of the selected checkboxes into array return ui.draggable.children().attr('name')+"="+ui.draggable.children().attr('value'); }).get(); var link = ui.draggable.children().attr('name').substr(ui.draggable.children().attr('name').indexOf("[")+1, ui.draggable.children().attr('name').lastIndexOf("]")-8) $.ajax({ type:"POST", url:"/search", data:ui.draggable.children().attr('name')+"="+ui.draggable.children().val()+"&save=Save CVs", success:function(){ window.alert(cv_file+"&save=Save CVs"); $('.shortList').append('<li><span class="inp_bg"><input type="checkbox" name="remove_cv'+link+'" value="Y" /></span><a href="/cv/'+link+'/">'+link+'</a></li>'); $('.searchPage').css("border", "solid 3px #E2E5F1").fadeIn(1000); }, error:function() { alert("Somthing has gone wrong"); } }); } });

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >