Revision 9326b841 src/gr/grnet/pithos/web/client/ToolsMenu.java

b/src/gr/grnet/pithos/web/client/ToolsMenu.java
56 56

  
57 57
import java.util.List;
58 58

  
59
import com.google.gwt.resources.client.ImageResource;
60
import com.google.gwt.resources.client.ClientBundle.Source;
59 61
import com.google.gwt.user.client.Command;
60 62
import com.google.gwt.user.client.Window;
61 63
import com.google.gwt.user.client.ui.AbstractImagePrototype;
......
166 168
				        if (delete != null)
167 169
				        	contextMenu.addItem(delete);
168 170
				
169
				        MenuItem properties = null;
170
				        if (files != null && files.size() == 1)
171
				        	properties = new MenuItem("<span>" + AbstractImagePrototype.create(newImages.viewText()).getHTML() + "&nbsp;File properties</span>", true, new PropertiesCommand(app, this, files, 0));
171
				        if (files != null && files.size() == 1) {
172
				        	contextMenu.addItem(new MenuItem("<span>" + AbstractImagePrototype.create(newImages.viewText()).getHTML() + "&nbsp;File properties</span>", true, new PropertiesCommand(app, this, files, PropertiesCommand.PROPERTIES)));
173
				        	contextMenu.addItem(new MenuItem("<span>" + AbstractImagePrototype.create(newImages.group()).getHTML() + "&nbsp;Sharing</span>", true, new PropertiesCommand(app, this, files, PropertiesCommand.PERMISSIONS)));
174
				        	contextMenu.addItem(new MenuItem("<span>" + AbstractImagePrototype.create(newImages.versions()).getHTML() + "&nbsp;Versions</span>", true, new PropertiesCommand(app, this, files, PropertiesCommand.VERSIONS)));
175
				        }
172 176
				        else if (!folder.isContainer())
173
				        	properties = new MenuItem("<span id = 'folderContextMenu.properties'>" + AbstractImagePrototype.create(newImages.viewText()).getHTML() + "&nbsp;Folder properties</span>", true, new PropertiesCommand(app, this, folder, 0));
174
				        if (properties != null)
175
				        	contextMenu.addItem(properties);
177
				        	contextMenu.addItem(new MenuItem("<span id = 'folderContextMenu.properties'>" + AbstractImagePrototype.create(newImages.viewText()).getHTML() + "&nbsp;Folder properties</span>", true, new PropertiesCommand(app, this, folder, 0)));
176 178
				    }
177 179
			        if (files != null && !files.isEmpty()) {
178 180
					    contextMenu.addItem(new MenuItem("<span>" + AbstractImagePrototype.create(newImages.download()).getHTML() + "&nbsp;Download</span>", true, new Command() {

Also available in: Unified diff