When the callback is
executed, all that??™s left to do is clean up the variables defining the clipboard so that it??™s empty
and prepared to accept another item, and also a call to directoryClicked() is required so that
the directory tree is updated appropriately, since the item copied or cut may have been a
directory.
If you??™d like Fileman to work a little more like Windows Explorer, you might consider getting rid of the four
lines of code that clear the clipboard. This will allow you to paste a copied item as many times as you??™d like.
I like the idea of not being able to accidentally create numerous copies of something just because my hand
twitches a bit hitting the Paste button, but you may not be quite as spastic as me!
doDelete() Method
The doDelete() method is called to delete the currently selected file or directory in the file
grid. Its code is as follows:
this.doDelete = function(inSelectedDirectory, inSelectedItem) {
// Only do something if both a directory and an item in the grid are
// selected.
if (inSelectedDirectory == null || inSelectedItem == null ||
inSelectedDirectory == "" || inSelectedItem == "") {
alert("Please select a file or directory to delete");
return;
}
// Get fully qualified name of selected item.
Pages:
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548