Revision 749068ba src/gr/grnet/pithos/web/client/FilePropertiesDialog.java
b/src/gr/grnet/pithos/web/client/FilePropertiesDialog.java | ||
---|---|---|
38 | 38 |
import gr.grnet.pithos.web.client.foldertree.File; |
39 | 39 |
import gr.grnet.pithos.web.client.foldertree.Resource; |
40 | 40 |
import gr.grnet.pithos.web.client.rest.PostCommand; |
41 |
import gr.grnet.pithos.web.client.rest.PostRequest; |
|
42 | 41 |
import gr.grnet.pithos.web.client.rest.PutRequest; |
43 | 42 |
import gr.grnet.pithos.web.client.rest.RestException; |
44 |
import gr.grnet.pithos.web.client.rest.resource.FileResource; |
|
45 |
import gr.grnet.pithos.web.client.rest.resource.GroupResource; |
|
46 |
import gr.grnet.pithos.web.client.rest.resource.PermissionHolder; |
|
47 |
|
|
48 |
import java.util.Iterator; |
|
49 |
import java.util.List; |
|
50 |
import java.util.Set; |
|
51 | 43 |
|
52 | 44 |
import com.google.gwt.core.client.GWT; |
53 |
import com.google.gwt.event.dom.client.ChangeEvent; |
|
54 |
import com.google.gwt.event.dom.client.ChangeHandler; |
|
55 | 45 |
import com.google.gwt.event.dom.client.ClickEvent; |
56 | 46 |
import com.google.gwt.event.dom.client.ClickHandler; |
57 | 47 |
import com.google.gwt.i18n.client.DateTimeFormat; |
58 |
import com.google.gwt.json.client.JSONArray; |
|
59 | 48 |
import com.google.gwt.json.client.JSONBoolean; |
60 | 49 |
import com.google.gwt.json.client.JSONObject; |
61 |
import com.google.gwt.json.client.JSONString; |
|
62 | 50 |
import com.google.gwt.resources.client.ClientBundle; |
63 | 51 |
import com.google.gwt.resources.client.ImageResource; |
64 | 52 |
import com.google.gwt.user.client.Command; |
65 | 53 |
import com.google.gwt.user.client.DeferredCommand; |
66 |
import com.google.gwt.user.client.ui.AbstractImagePrototype; |
|
67 | 54 |
import com.google.gwt.user.client.ui.Button; |
68 | 55 |
import com.google.gwt.user.client.ui.CheckBox; |
69 | 56 |
import com.google.gwt.user.client.ui.DecoratedTabPanel; |
... | ... | |
71 | 58 |
import com.google.gwt.user.client.ui.FlexTable; |
72 | 59 |
import com.google.gwt.user.client.ui.FlowPanel; |
73 | 60 |
import com.google.gwt.user.client.ui.FocusPanel; |
74 |
import com.google.gwt.user.client.ui.HTML; |
|
75 | 61 |
import com.google.gwt.user.client.ui.HasHorizontalAlignment; |
76 | 62 |
import com.google.gwt.user.client.ui.HorizontalPanel; |
77 |
import com.google.gwt.user.client.ui.Label; |
|
78 | 63 |
import com.google.gwt.user.client.ui.TextBox; |
79 | 64 |
import com.google.gwt.user.client.ui.VerticalPanel; |
80 | 65 |
|
... | ... | |
120 | 105 |
|
121 | 106 |
private String userFullName; |
122 | 107 |
|
123 |
private GSS app;
|
|
108 |
private Pithos app;
|
|
124 | 109 |
|
125 | 110 |
/** |
126 | 111 |
* The widget's constructor. |
127 | 112 |
*/ |
128 |
public FilePropertiesDialog(GSS _app, File _file) {
|
|
113 |
public FilePropertiesDialog(Pithos _app, File _file) {
|
|
129 | 114 |
app = _app; |
130 | 115 |
file = _file; |
131 | 116 |
|
... | ... | |
326 | 311 |
// path.addClickHandler(new ClickHandler() { |
327 | 312 |
// @Override |
328 | 313 |
// public void onClick(ClickEvent event) { |
329 |
// GSS.enableIESelection();
|
|
314 |
// Pithos.enableIESelection();
|
|
330 | 315 |
// ((TextBox) event.getSource()).selectAll(); |
331 |
// GSS.preventIESelection();
|
|
316 |
// Pithos.preventIESelection();
|
|
332 | 317 |
// } |
333 | 318 |
// }); |
334 | 319 |
// path.setText(file.getUri()); |
... | ... | |
412 | 397 |
// json.put("versioned", JSONBoolean.getInstance(versioned.getValue())); |
413 | 398 |
//only update the read for all perm if the user is the owner |
414 | 399 |
// if (readForAll.getValue() != file.isReadForAll()) |
415 |
// if (file.getOwner().equals(GSS.get().getCurrentUserResource().getUsername()))
|
|
400 |
// if (file.getOwner().equals(Pithos.get().getCurrentUserResource().getUsername()))
|
|
416 | 401 |
// json.put("readForAll", JSONBoolean.getInstance(readForAll.getValue())); |
417 | 402 |
// int i = 0; |
418 | 403 |
// if (permList.hasChanges()) { |
... | ... | |
489 | 474 |
if (t instanceof RestException) { |
490 | 475 |
int statusCode = ((RestException) t).getHttpStatusCode(); |
491 | 476 |
if (statusCode == 405) |
492 |
GSS.get().displayError("You don't have the necessary permissions");
|
|
477 |
Pithos.get().displayError("You don't have the necessary permissions");
|
|
493 | 478 |
else if (statusCode == 404) |
494 |
GSS.get().displayError("User in permissions does not exist");
|
|
479 |
Pithos.get().displayError("User in permissions does not exist");
|
|
495 | 480 |
else if (statusCode == 409) |
496 |
GSS.get().displayError("A folder with the same name already exists");
|
|
481 |
Pithos.get().displayError("A folder with the same name already exists");
|
|
497 | 482 |
else if (statusCode == 413) |
498 |
GSS.get().displayError("Your quota has been exceeded");
|
|
483 |
Pithos.get().displayError("Your quota has been exceeded");
|
|
499 | 484 |
else |
500 |
GSS.get().displayError("Unable to modify file:" + ((RestException) t).getHttpStatusText());
|
|
485 |
Pithos.get().displayError("Unable to modify file:" + ((RestException) t).getHttpStatusText());
|
|
501 | 486 |
} else |
502 |
GSS.get().displayError("System error moifying file:" + t.getMessage());
|
|
487 |
Pithos.get().displayError("System error moifying file:" + t.getMessage());
|
|
503 | 488 |
} |
504 | 489 |
}; |
505 | 490 |
DeferredCommand.addCommand(cf); |
... | ... | |
513 | 498 |
|
514 | 499 |
@Override |
515 | 500 |
public void onComplete() { |
516 |
GSS.get().getTreeView().refreshCurrentNode(false);
|
|
501 |
Pithos.get().getTreeView().refreshCurrentNode(false);
|
|
517 | 502 |
} |
518 | 503 |
|
519 | 504 |
@Override |
... | ... | |
522 | 507 |
if (t instanceof RestException) { |
523 | 508 |
int statusCode = ((RestException) t).getHttpStatusCode(); |
524 | 509 |
if (statusCode == 405) |
525 |
GSS.get().displayError("You don't have the necessary permissions");
|
|
510 |
Pithos.get().displayError("You don't have the necessary permissions");
|
|
526 | 511 |
else if (statusCode == 404) |
527 |
GSS.get().displayError("User in permissions does not exist");
|
|
512 |
Pithos.get().displayError("User in permissions does not exist");
|
|
528 | 513 |
else if (statusCode == 409) |
529 |
GSS.get().displayError("A folder with the same name already exists");
|
|
514 |
Pithos.get().displayError("A folder with the same name already exists");
|
|
530 | 515 |
else if (statusCode == 413) |
531 |
GSS.get().displayError("Your quota has been exceeded");
|
|
516 |
Pithos.get().displayError("Your quota has been exceeded");
|
|
532 | 517 |
else |
533 |
GSS.get().displayError("Unable to modify file:" + ((RestException) t).getHttpStatusText());
|
|
518 |
Pithos.get().displayError("Unable to modify file:" + ((RestException) t).getHttpStatusText());
|
|
534 | 519 |
} else |
535 |
GSS.get().displayError("System error moifying file:" + t.getMessage());
|
|
520 |
Pithos.get().displayError("System error moifying file:" + t.getMessage());
|
|
536 | 521 |
} |
537 | 522 |
}; |
538 | 523 |
DeferredCommand.addCommand(cf); |
Also available in: Unified diff