Revision 3586ad5e src/gr/grnet/pithos/web/client/ToolsMenu.java
b/src/gr/grnet/pithos/web/client/ToolsMenu.java | ||
---|---|---|
105 | 105 |
if (!folder.isInTrash()) { |
106 | 106 |
if (canWrite) { |
107 | 107 |
|
108 |
if (isFolderTreeSelected) { |
|
108 |
if (isFolderTreeSelected || isMysharedTreeSelected) {
|
|
109 | 109 |
MenuItem cut = null; |
110 | 110 |
if (files != null && !files.isEmpty()) { |
111 | 111 |
cut = new MenuItem("<span>" + AbstractImagePrototype.create(newImages.cut()).getHTML() + " Cut files</span>", true, new CutCommand(app, this, files)); |
... | ... | |
120 | 120 |
} |
121 | 121 |
} |
122 | 122 |
|
123 |
if (!isMysharedTreeSelected) { |
|
124 |
MenuItem copy = null; |
|
125 |
if (files != null && !files.isEmpty()) |
|
126 |
copy = new MenuItem("<span>" + AbstractImagePrototype.create(newImages.copy()).getHTML() + " Copy files</span>", true, new CopyCommand(app, this, files)); |
|
127 |
else if (isFolderTreeSelected && !folder.isContainer()) |
|
128 |
copy = new MenuItem("<span>" + AbstractImagePrototype.create(newImages.copy()).getHTML() + " Copy folder</span>", true, new CopyCommand(app, this, folder)); |
|
129 |
if (copy != null) { |
|
130 |
contextMenu.addItem(copy); |
|
131 |
empty = false; |
|
132 |
} |
|
123 |
MenuItem copy = null; |
|
124 |
if (files != null && !files.isEmpty()) |
|
125 |
copy = new MenuItem("<span>" + AbstractImagePrototype.create(newImages.copy()).getHTML() + " Copy files</span>", true, new CopyCommand(app, this, files)); |
|
126 |
else if (isFolderTreeSelected && !folder.isContainer()) |
|
127 |
copy = new MenuItem("<span>" + AbstractImagePrototype.create(newImages.copy()).getHTML() + " Copy folder</span>", true, new CopyCommand(app, this, folder)); |
|
128 |
if (copy != null) { |
|
129 |
contextMenu.addItem(copy); |
|
130 |
empty = false; |
|
133 | 131 |
} |
134 | 132 |
|
135 | 133 |
if (canWrite) { |
... | ... | |
154 | 152 |
} |
155 | 153 |
} |
156 | 154 |
|
157 |
if (isFolderTreeSelected) { |
|
155 |
if (isFolderTreeSelected || isMysharedTreeSelected) {
|
|
158 | 156 |
MenuItem moveToTrash = null; |
159 | 157 |
if (files != null && !files.isEmpty()) { |
160 | 158 |
moveToTrash = new MenuItem("<span>" + AbstractImagePrototype.create(newImages.emptyTrash()).getHTML() + " Move files to Trash</span>", true, new ToTrashCommand(app, this, files)); |
... | ... | |
183 | 181 |
contextMenu.addItem(new MenuItem("<span>" + AbstractImagePrototype.create(newImages.viewText()).getHTML() + " File properties</span>", true, new PropertiesCommand(app, this, files, PropertiesCommand.PROPERTIES))); |
184 | 182 |
contextMenu.addItem(new MenuItem("<span>" + AbstractImagePrototype.create(newImages.group()).getHTML() + " Sharing</span>", true, new PropertiesCommand(app, this, files, PropertiesCommand.PERMISSIONS))); |
185 | 183 |
contextMenu.addItem(new MenuItem("<span>" + AbstractImagePrototype.create(newImages.internet()).getHTML() + " Publish</span>", true, new PropertiesCommand(app, this, files, PropertiesCommand.PUBLISH))); |
186 |
if (!isMysharedTreeSelected) |
|
187 |
contextMenu.addItem(new MenuItem("<span>" + AbstractImagePrototype.create(newImages.versions()).getHTML() + " Versions</span>", true, new PropertiesCommand(app, this, files, PropertiesCommand.VERSIONS))); |
|
184 |
contextMenu.addItem(new MenuItem("<span>" + AbstractImagePrototype.create(newImages.versions()).getHTML() + " Versions</span>", true, new PropertiesCommand(app, this, files, PropertiesCommand.VERSIONS))); |
|
188 | 185 |
empty = false; |
189 | 186 |
} |
190 | 187 |
else if (!folder.isContainer()) { |
Also available in: Unified diff