Revision 51fb1e9b
b/gss/src/gr/ebs/gss/client/FileMenu.java | ||
---|---|---|
41 | 41 |
public class FileMenu extends PopupPanel implements ClickListener { |
42 | 42 |
|
43 | 43 |
/** |
44 |
* The path info portion of the URL that provides the file download service. |
|
45 |
*/ |
|
46 |
static final String FILE_DOWNLOAD_PATH = "/gss/fileDownload"; |
|
47 |
|
|
48 |
/** |
|
49 | 44 |
* The widget's images. |
50 | 45 |
*/ |
51 | 46 |
private final Images images; |
... | ... | |
87 | 82 |
super(true); |
88 | 83 |
setAnimationEnabled(true); |
89 | 84 |
images = _images; |
90 |
// createMenu(); |
|
91 | 85 |
add(contextMenu); |
92 | 86 |
|
93 | 87 |
} |
94 | 88 |
|
95 |
/* |
|
96 |
* (non-Javadoc) |
|
97 |
* |
|
98 |
* @see com.google.gwt.user.client.ui.ClickListener#onClick(com.google.gwt.user.client.ui.Widget) |
|
99 |
*/ |
|
100 | 89 |
public void onClick(final Widget sender) { |
101 | 90 |
final FileMenu menu = new FileMenu(images); |
102 | 91 |
final int left = sender.getAbsoluteLeft(); |
b/gss/src/gr/ebs/gss/client/FolderContextMenu.java | ||
---|---|---|
30 | 30 |
import gr.ebs.gss.client.commands.UploadFileCommand; |
31 | 31 |
import gr.ebs.gss.client.rest.resource.OtherUserResource; |
32 | 32 |
|
33 |
import com.google.gwt.user.client.Command; |
|
34 |
import com.google.gwt.user.client.Window; |
|
35 | 33 |
import com.google.gwt.user.client.ui.MenuBar; |
36 | 34 |
import com.google.gwt.user.client.ui.MenuItem; |
37 | 35 |
import com.google.gwt.user.client.ui.PopupPanel; |
... | ... | |
66 | 64 |
setAnimationEnabled(true); |
67 | 65 |
images = newImages; |
68 | 66 |
|
69 |
// A dummy command that we will execute from unimplemented leaves. |
|
70 |
final Command cmd = new Command() { |
|
71 |
|
|
72 |
public void execute() { |
|
73 |
hide(); |
|
74 |
Window.alert("You selected a menu item!"); |
|
75 |
} |
|
76 |
}; |
|
77 | 67 |
pasteItem = new MenuItem("<span>" + newImages.paste().getHTML() + " Paste</span>", true, new PasteCommand(this)); |
78 | 68 |
final MenuBar contextMenu = new MenuBar(true); |
79 | 69 |
final Folders folders = GSS.get().getFolders(); |
... | ... | |
140 | 130 |
//contextMenu.addItem("<span>" + newImages.delete().getHTML() + " Delete</span>", true, new DeleteCommand(this, newImages)); |
141 | 131 |
contextMenu.addItem("<span>" + newImages.viewText().getHTML() + " Properties</span>", true, new PropertiesCommand(this, newImages, 0)); |
142 | 132 |
} |
143 |
|
|
144 |
|
|
145 | 133 |
add(contextMenu); |
146 | 134 |
if (GSS.get().getClipboard().hasFolderOrFileItem()) |
147 | 135 |
pasteItem.setVisible(true); |
... | ... | |
149 | 137 |
pasteItem.setVisible(false); |
150 | 138 |
} |
151 | 139 |
|
152 |
|
|
153 |
|
|
154 |
|
|
155 | 140 |
} |
Also available in: Unified diff