// not using comments for now
commentLabel.setVisible(false);
commentTextArea_.setVisible(false);
previewButton_ = new ThemedButton("Preview");
previewButton_.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event)
{
htmlGenerator_.generateRPubsHtml(
titleTextBox_.getText().trim(),
commentTextArea_.getText().trim(),
new CommandWithArg<String>() {
@Override
public void execute(String rpubsFile)
{
globalDisplay_.showHtmlFile(rpubsFile);
}
});
}
});
addLeftButton(previewButton_);
}
HTML warningLabel = new HTML(
"<strong>IMPORTANT: All documents published to RPubs are " +
"publicly visible.</strong> You should " +
"only publish documents that you wish to share publicly.");
warningLabel.addStyleName(styles.warningLabel());
verticalPanel.add(warningLabel);
ThemedButton cancelButton = createCancelButton(new Operation() {
@Override
public void execute()
{
// if an upload is in progress then terminate it
if (uploadInProgress_)
{
server_.rpubsTerminateUpload(contextId_,
new VoidServerRequestCallback());
if (uploadProgressWindow_ != null)
uploadProgressWindow_.close();
}
}
});
continueButton_ = new ThemedButton("Publish", new ClickHandler() {
@Override
public void onClick(ClickEvent event)
{
performUpload(false);
}
});
updateButton_ = new ThemedButton("Update Existing", new ClickHandler()
{
@Override
public void onClick(ClickEvent event)
{
performUpload(true);
}
});
createButton_ = new ThemedButton("Create New", new ClickHandler()
{
@Override
public void onClick(ClickEvent event)
{
performUpload(false);