|
|
|
@ -31,8 +31,10 @@ import com.google.gwt.core.client.GWT;
|
|
|
|
|
import com.google.gwt.dom.client.Style.Float;
|
|
|
|
|
import com.google.gwt.event.dom.client.ClickEvent;
|
|
|
|
|
import com.google.gwt.event.dom.client.ClickHandler;
|
|
|
|
|
import com.google.gwt.http.client.URL;
|
|
|
|
|
import com.google.gwt.i18n.client.DateTimeFormat;
|
|
|
|
|
import com.google.gwt.i18n.client.NumberFormat;
|
|
|
|
|
import com.google.gwt.safehtml.shared.UriUtils;
|
|
|
|
|
import com.google.gwt.uibinder.client.UiBinder;
|
|
|
|
|
import com.google.gwt.uibinder.client.UiField;
|
|
|
|
|
import com.google.gwt.user.client.Command;
|
|
|
|
@ -91,6 +93,9 @@ public class DialogGetInfoBootstrap extends Composite {
|
|
|
|
|
@UiField
|
|
|
|
|
HTMLPanel htmlPanelImagePreview;
|
|
|
|
|
|
|
|
|
|
@UiField
|
|
|
|
|
HTMLPanel htmlPanelFilePreview;
|
|
|
|
|
|
|
|
|
|
@UiField
|
|
|
|
|
HTML txtName;
|
|
|
|
|
|
|
|
|
@ -320,10 +325,11 @@ public class DialogGetInfoBootstrap extends Composite {
|
|
|
|
|
if (typeEnum.equals(GXTFolderItemTypeEnum.GCUBE_ITEM)) {
|
|
|
|
|
loadGcubeItemProperties();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
if(typeEnum.equals(GXTFolderItemTypeEnum.EXTERNAL_PDF_FILE) ||
|
|
|
|
|
typeEnum.equals(GXTFolderItemTypeEnum.PDF_DOCUMENT)) {
|
|
|
|
|
typeEnum.equals(GXTFolderItemTypeEnum.PDF_DOCUMENT) ||
|
|
|
|
|
typeEnum.equals(GXTFolderItemTypeEnum.EXTERNAL_FILE)) {
|
|
|
|
|
|
|
|
|
|
GWT.log("The file is a PDF");
|
|
|
|
|
|
|
|
|
@ -339,36 +345,17 @@ public class DialogGetInfoBootstrap extends Composite {
|
|
|
|
|
GWT.log("The PublicLink link is: "+result);
|
|
|
|
|
|
|
|
|
|
if(result!=null) {
|
|
|
|
|
|
|
|
|
|
// String pdfPreview = "<object "
|
|
|
|
|
// + "width=\"300\" "
|
|
|
|
|
// + "height=\"300\" "
|
|
|
|
|
// + "type=\"application/pdf\" "
|
|
|
|
|
// + "data=\""+result.getCompleteURL()+"?#zoom=85&scrollbar=0&toolbar=0&navpanes=0\">"
|
|
|
|
|
// + "<p>This browser does not support PDFs</p>"
|
|
|
|
|
// + "</object>";
|
|
|
|
|
//
|
|
|
|
|
// String pdfPreview = "<iframe "
|
|
|
|
|
// + "src=\"http://docs.google.com/gview?url="+result.getCompleteURL()+"&embedded=true\" "
|
|
|
|
|
// + "style=\"width:90%; max-height:400px;\" frameborder=\"0\"></iframe>";
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
String pdfPreview = "<object data=\""+result.getCompleteURL()+"\" type=\"application/pdf\" width=\"250\" height=\"300\">"
|
|
|
|
|
+ "<iframe src=\""+result.getCompleteURL()+"\" style=\"border: none;\" width=\"100%\" height=\"100%\">"
|
|
|
|
|
+ "This browser does not support PDFs. Please download the PDF to view it: "
|
|
|
|
|
+ "<a href=\""+result.getCompleteURL()+"\">Download PDF</a></iframe>"
|
|
|
|
|
+ "</object>";
|
|
|
|
|
//
|
|
|
|
|
String pdfPreview = "<object data=\""+result.getCompleteURL()+"\" type=\"application/pdf\" width=\"100%\" height=\"100%\">"</object>";
|
|
|
|
|
String pdfPreview = "<iframe frameBorder=\"0\" class=\"my-preview-doc\" "
|
|
|
|
|
+ "src=\"https://docs.google.com/viewer?url="+URL.encode(result.getCompleteURL())+"&embedded=true\">"
|
|
|
|
|
+ "</iframe>";
|
|
|
|
|
|
|
|
|
|
//pdfPreview = "<embed src=\""+result.getCompleteURL()+"\" type=\"application/pdf\" width=\"100%\" height=\"100%\">";
|
|
|
|
|
|
|
|
|
|
htmlPanelImagePreview.add(new HTML(pdfPreview));
|
|
|
|
|
htmlPanelImagePreview.setVisible(true);
|
|
|
|
|
htmlPanelFilePreview.add(new HTML(pdfPreview));
|
|
|
|
|
htmlPanelFilePreview.setVisible(true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}*/
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
addHandlers();
|
|
|
|
|