mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-26 05:49:22 +00:00
Added PDF support
This commit is contained in:
parent
6f3bfaff1e
commit
2fc57b40ab
@ -19,4 +19,8 @@
|
||||
.post .post-video {
|
||||
max-width: 100%;
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
.post .post-pdf {
|
||||
text-align: center;
|
||||
}
|
@ -124,6 +124,38 @@ ComunicWeb.components.posts.ui = {
|
||||
|
||||
}
|
||||
|
||||
//In case of PDF
|
||||
else if(infos.kind == "pdf"){
|
||||
|
||||
//Create PDF button
|
||||
var buttonContainer = createElem2({
|
||||
appendTo: postRoot,
|
||||
type: "div",
|
||||
class: "post-pdf",
|
||||
});
|
||||
|
||||
var button = createElem2({
|
||||
appendTo: buttonContainer,
|
||||
type: "a",
|
||||
class: "btn btn-app",
|
||||
href: infos.file_path_url,
|
||||
});
|
||||
button.target = "_blank";
|
||||
|
||||
createElem2({
|
||||
appendTo: button,
|
||||
type: "i",
|
||||
class: "fa fa-file-pdf-o"
|
||||
});
|
||||
|
||||
createElem2({
|
||||
appendTo: button,
|
||||
type: "span",
|
||||
innerHTML: "PDF"
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
//Log error
|
||||
ComunicWeb.debug.logMessage("Not implemented kind of post: " + infos.kind);
|
||||
|
Loading…
Reference in New Issue
Block a user