import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.KeyCodes;
+import com.google.gwt.user.client.Command;
+import com.google.gwt.user.client.Cookies;
import com.google.gwt.user.client.Event.NativePreviewEvent;
+import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.FileUpload;
@Override
public void onSubmit(@SuppressWarnings("unused") SubmitEvent event) {
auth.setValue(app.getToken()); //This is done here because the app object is not available in the constructor
+ Cookies.setCookie("X-Auth-Token", app.getToken(), null, Window.Location.getHostName(), app.getApiPath(), false);
}
});
form.addSubmitCompleteHandler(new SubmitCompleteHandler() {
GWT.log(results, null);
app.displayError(results);
}
- app.updateFolder(folder, true, null);
+ if (app.getSelectedTree().equals(app.getFolderTreeView()))
+ app.updateFolder(folder, true, new Command() {
+
+ @Override
+ public void execute() {
+ app.updateStatistics();
+ }
+ });
+ else
+ app.updateOtherSharedFolder(folder, true);
hide();
}
});
return;
}
final String fname = getFilename(upload.getFilename());
- String apath = app.getApiPath() + app.getUsername() + folder.getUri() + "/" + fname;
+ String apath = app.getApiPath() + folder.getOwner() + folder.getUri() + "/" + fname;
form.setAction(apath);
submit.setEnabled(false);
upload.setVisible(false);