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

b/src/gr/grnet/pithos/web/client/commands/PropertiesCommand.java
34 34
 */
35 35
package gr.grnet.pithos.web.client.commands;
36 36

  
37
import gr.grnet.pithos.web.client.FileContextMenu;
37
import gr.grnet.pithos.web.client.FilePermissionsDialog;
38 38
import gr.grnet.pithos.web.client.FilePropertiesDialog;
39
import gr.grnet.pithos.web.client.FileVersionsDialog;
39 40
import gr.grnet.pithos.web.client.FilesPropertiesDialog;
40 41
import gr.grnet.pithos.web.client.FolderPropertiesDialog;
41 42
import gr.grnet.pithos.web.client.Pithos;
......
54 55
 */
55 56
public class PropertiesCommand implements Command {
56 57

  
58
	public static final int PROPERTIES = 0;
59
	public static final int PERMISSIONS = 1;
60
	public static final int VERSIONS = 2;
61

  
57 62
	private PopupPanel containerPanel;
58 63

  
59 64
	private int tabToShow = 0;
......
64 69

  
65 70
	/**
66 71
	 * @param _containerPanel
67
	 * @param _newImages the images of all the possible delete dialogs
68 72
	 * @param _tab the tab to switch to
69 73
	 */
70 74
	public PropertiesCommand(Pithos _app, PopupPanel _containerPanel, Object _resource, int _tab) {
......
90 94
			List<File> files = (List<File>) resource;
91 95
            if (files.size() > 1) {
92 96
                FilesPropertiesDialog dlg = new FilesPropertiesDialog(app, files);
93
                dlg.selectTab(tabToShow);
94 97
                dlg.center();
95 98
            }
96 99
            else {
97
                FilePropertiesDialog dlg = new FilePropertiesDialog(app, files.get(0));
98
                dlg.selectTab(tabToShow);
99
                dlg.center();
100
            	switch (tabToShow) {
101
					case PROPERTIES:
102
		                FilePropertiesDialog dlg = new FilePropertiesDialog(app, files.get(0));
103
		                dlg.center();
104
						break;
105
					case PERMISSIONS:
106
		                FilePermissionsDialog dlg1 = new FilePermissionsDialog(app, files.get(0));
107
		                dlg1.center();
108
						break;
109
					case VERSIONS:
110
		                FileVersionsDialog dlg2 = new FileVersionsDialog(app, files.get(0));
111
		                dlg2.center();
112
						break;
113
					default:
114
						break;
115
				}
100 116
            }
101 117
        }
102 118
	}

Also available in: Unified diff