mirror of
https://github.com/ONLYOFFICE/document-server-integration.git
synced 2026-02-10 18:05:10 +08:00
feat(php): convert button
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
- csharp-mvc: converting function on index page
|
||||
- java: converting function on index page
|
||||
- java-spring: converting function on index page
|
||||
- php: converting function on index page
|
||||
- editing by default
|
||||
- change reference source
|
||||
- filename in editor page title
|
||||
|
||||
@ -42,10 +42,14 @@
|
||||
}
|
||||
|
||||
.tableHeaderCellViewers {
|
||||
width: 29%;
|
||||
width: 18%;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.tableHeaderCellAction {
|
||||
width: 23%;
|
||||
}
|
||||
|
||||
.tableHeaderCellDownload {
|
||||
width: 21%;
|
||||
padding-right: 18px;
|
||||
@ -220,7 +224,7 @@
|
||||
}
|
||||
|
||||
.tableHeaderCellFileName {
|
||||
width: 16%;
|
||||
width: 9%;
|
||||
}
|
||||
|
||||
.tableHeaderCellEditors {
|
||||
@ -229,7 +233,12 @@
|
||||
|
||||
.tableHeaderCellViewers {
|
||||
text-align: right;
|
||||
width: 37%;
|
||||
width: 9%;
|
||||
}
|
||||
|
||||
.tableHeaderCellAction{
|
||||
width: 11%;
|
||||
padding-right: 82px;
|
||||
}
|
||||
|
||||
.tableHeaderCellDownload {
|
||||
@ -244,19 +253,24 @@
|
||||
}
|
||||
|
||||
.tableHeaderCellEditors {
|
||||
width: 26%;
|
||||
width: 15%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.tableHeaderCellFileName {
|
||||
width: 17%;
|
||||
width: 28%;
|
||||
}
|
||||
|
||||
.tableHeaderCellViewers {
|
||||
width: 27%;
|
||||
width: 6%;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.tableHeaderCellAction{
|
||||
width: 18%;
|
||||
padding-right: 54px;
|
||||
}
|
||||
|
||||
.tableHeaderCellDownload {
|
||||
padding-right: 18px;
|
||||
width: 20%;
|
||||
@ -277,12 +291,17 @@
|
||||
|
||||
.tableRow td:first-child {
|
||||
flex-grow: 0;
|
||||
width: 15%;
|
||||
width: 25%;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.contentCells-icon {
|
||||
width: 3%;
|
||||
}
|
||||
|
||||
.firstContentCellViewers {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 890px) and (min-width: 769px ) {
|
||||
@ -290,7 +309,7 @@
|
||||
width: 20%;
|
||||
}
|
||||
.contentCells-shift {
|
||||
padding-right: 28px;
|
||||
padding-right: 27px;
|
||||
}
|
||||
|
||||
.main-panel {
|
||||
@ -323,11 +342,16 @@
|
||||
|
||||
.tableHeaderCellEditors {
|
||||
text-align: left;
|
||||
width: 31%;
|
||||
width: 1%;
|
||||
}
|
||||
|
||||
.tableHeaderCellViewers {
|
||||
width: 18%;
|
||||
width: 19%;
|
||||
}
|
||||
|
||||
.tableHeaderCellAction {
|
||||
width: 19%;
|
||||
padding-right: 45px;
|
||||
}
|
||||
}
|
||||
|
||||
@ -431,8 +455,8 @@
|
||||
|
||||
.downloadContentCellShift {
|
||||
max-width: 7%;
|
||||
margin-right: -11px;
|
||||
margin-left: auto;
|
||||
margin-right: 24px;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.contentCells-icon {
|
||||
@ -440,13 +464,13 @@
|
||||
}
|
||||
|
||||
.tableRow td:last-child {
|
||||
width: 12%;
|
||||
padding-right: 40px;
|
||||
width: 7%;
|
||||
padding-right: 0px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.contentCells-shift {
|
||||
padding-right: 35px;
|
||||
padding-right: 0px;
|
||||
}
|
||||
|
||||
.downloadContentCellShift:after {
|
||||
@ -532,6 +556,15 @@
|
||||
height: 56px;
|
||||
margin-bottom: 24px !important;
|
||||
}
|
||||
.button.hoar{
|
||||
width: 18%;
|
||||
height: 27px;
|
||||
margin-bottom: 7px !important;
|
||||
}
|
||||
.button.converting{
|
||||
width: 126px;
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 560px) and (min-width: 510px) {
|
||||
@ -540,7 +573,7 @@
|
||||
}
|
||||
|
||||
.downloadContentCellShift {
|
||||
padding-right: 45px;
|
||||
padding-right: 16px;
|
||||
max-width: 4%;
|
||||
}
|
||||
}
|
||||
@ -560,7 +593,7 @@
|
||||
|
||||
.downloadContentCellShift {
|
||||
max-width: 6%;
|
||||
padding-right: 37px;
|
||||
padding-right: 6px;
|
||||
}
|
||||
|
||||
.firstContentCellShift {
|
||||
@ -586,12 +619,12 @@
|
||||
|
||||
.downloadContentCellShift {
|
||||
max-width: 3%;
|
||||
padding-right: 37px;
|
||||
padding-right: 0px;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.firstContentCellShift {
|
||||
margin-left: 1px;
|
||||
margin-left: 2px;
|
||||
flex-basis: 14%;
|
||||
}
|
||||
|
||||
@ -621,7 +654,7 @@
|
||||
|
||||
.downloadContentCellShift {
|
||||
max-width: 4%;
|
||||
margin-right: -18px;
|
||||
margin-right: 18px;
|
||||
margin-left: -1px;
|
||||
}
|
||||
|
||||
@ -630,7 +663,7 @@
|
||||
}
|
||||
|
||||
.contentCells-icon{
|
||||
width: 10%;
|
||||
width: 12%;
|
||||
}
|
||||
footer table td {
|
||||
margin: 0;
|
||||
|
||||
@ -237,6 +237,52 @@ label .checkbox {
|
||||
color: #FF6F3D;
|
||||
}
|
||||
|
||||
.button.converting {
|
||||
margin-top: -20px;
|
||||
padding: 16px 16px;
|
||||
}
|
||||
|
||||
.button.converting.wide {
|
||||
padding: 16px 29px;
|
||||
}
|
||||
|
||||
.button.hoar {
|
||||
background: #EFEFEF;
|
||||
border: 1px solid #EFEFEF;
|
||||
margin-right: 7px;
|
||||
margin-bottom: 7px;
|
||||
width: 13%;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.button.hoar.disable {
|
||||
opacity: 30%;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.button.hoar:not(.disable):hover {
|
||||
background: #FF6F3D;
|
||||
border: 1px solid #FF6F3D;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.button.hoar.orange {
|
||||
background: #FF6F3D;
|
||||
border: 1px solid #FF6F3D;
|
||||
color: #FFFFFF;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.button.hoar.orange.disable {
|
||||
background: #444444;
|
||||
border: 1px solid #444444;
|
||||
color: #FFFFFF;
|
||||
cursor: default;
|
||||
opacity: 100%;
|
||||
}
|
||||
|
||||
.button.file-type {
|
||||
font-size: 11px;
|
||||
color: #FFFFFF;
|
||||
@ -379,6 +425,32 @@ label .checkbox {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#convertingProgress {
|
||||
color: #333333;
|
||||
display: none;
|
||||
font-size: 12px;
|
||||
margin: 30px 35px;
|
||||
}
|
||||
|
||||
#convertingProgress .convertFileName{
|
||||
background-position: left center;
|
||||
background-repeat: no-repeat;
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
line-height: 160%;
|
||||
overflow: hidden;
|
||||
padding-left: 28px;
|
||||
margin-bottom: 16px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#convertingProgress .describeUpload {
|
||||
line-height: 150%;
|
||||
letter-spacing: -0.02em;
|
||||
padding: 16px 0;
|
||||
}
|
||||
|
||||
.error-message {
|
||||
background: url("/assets/images/error.svg") no-repeat scroll 4px 10px;
|
||||
color: #CB0000;
|
||||
@ -400,6 +472,10 @@ label .checkbox {
|
||||
padding-left: 35px;
|
||||
}
|
||||
|
||||
.waiting {
|
||||
opacity: 30%;
|
||||
}
|
||||
|
||||
.current {
|
||||
background-image: url("/assets/images/loader16.gif");
|
||||
}
|
||||
@ -412,6 +488,12 @@ label .checkbox {
|
||||
background-image: url("/assets/images/notdone.svg");
|
||||
}
|
||||
|
||||
.convertPercent {
|
||||
color: #FF6F3D;
|
||||
font-weight: 700;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.step-descr {
|
||||
display: block;
|
||||
margin-left: 35px;
|
||||
@ -419,6 +501,10 @@ label .checkbox {
|
||||
line-height: 188%;
|
||||
}
|
||||
|
||||
.step-descr.disable {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.progress-descr {
|
||||
letter-spacing: -0.02em;
|
||||
line-height: 150%;
|
||||
@ -521,21 +607,25 @@ footer table tr td:first-child {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.convertFileName.word,
|
||||
.stored-edit.word,
|
||||
.uploadFileName.word {
|
||||
background-image: url("/assets/images/icon_docx.svg");
|
||||
}
|
||||
|
||||
.convertFileName.cell,
|
||||
.stored-edit.cell,
|
||||
.uploadFileName.cell {
|
||||
background-image: url("/assets/images/icon_xlsx.svg");
|
||||
}
|
||||
|
||||
.convertFileName.slide,
|
||||
.stored-edit.slide,
|
||||
.uploadFileName.slide {
|
||||
background-image: url("/assets/images/icon_pptx.svg");
|
||||
}
|
||||
|
||||
.convertFileName.pdf,
|
||||
.stored-edit.pdf,
|
||||
.uploadFileName.pdf {
|
||||
background-image: url("/assets/images/icon_pdf.svg");
|
||||
@ -594,6 +684,11 @@ footer table tr td:first-child {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.convertTable {
|
||||
margin-top: 10px;
|
||||
margin-left: 35px;
|
||||
}
|
||||
|
||||
.tableRow {
|
||||
background: transparent;
|
||||
-moz-transition: all 0.2s ease-in-out;
|
||||
@ -640,6 +735,12 @@ footer table tr td:first-child {
|
||||
width: 11%;
|
||||
}
|
||||
|
||||
.tableHeaderCellAction{
|
||||
width: 13%;
|
||||
text-align: right;
|
||||
padding-right: 88px;
|
||||
}
|
||||
|
||||
.tableHeaderCellDownload{
|
||||
width: 13%;
|
||||
text-align: right;
|
||||
@ -664,7 +765,7 @@ footer table tr td:first-child {
|
||||
}
|
||||
|
||||
.contentCells-shift {
|
||||
padding-right: 44px;
|
||||
padding-right: 43px;
|
||||
}
|
||||
|
||||
.contentCells-icon {
|
||||
@ -728,7 +829,7 @@ footer table tr td:first-child {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.icon-delete {
|
||||
.icon-action {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@ -807,6 +908,13 @@ html {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.typeButtonsRow {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: row;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.tableRow td:first-child {
|
||||
display: flex;
|
||||
@ -815,11 +923,11 @@ html {
|
||||
}
|
||||
|
||||
.tableHeaderCellFileName {
|
||||
width: 30%;
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.tableHeaderCellEditors {
|
||||
width: 28%;
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.tableHeaderCellViewers {
|
||||
|
||||
4
web/documentserver-example/php/assets/images/convert.svg
Normal file
4
web/documentserver-example/php/assets/images/convert.svg
Normal file
@ -0,0 +1,4 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.4285 13C14.4102 13 14 13 14 13.5V15H6C5.44772 15 5 15.4477 5 16V17C5 17.5523 5.44771 18 6 18H14V19.5C14 20 14.3816 20 14.4285 20C14.6359 20 15.0099 19.9113 15.2172 19.7363L18.6207 17.0833C19.1264 16.6566 19.1264 16.3434 18.6207 15.9167L15.2172 13.2637C15.0099 13.0887 14.6359 13 14.4285 13Z" fill="#444444"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.5715 4C9.58984 4 10 4 10 4.50002V6H18C18.5523 6 19 6.44772 19 7V8C19 8.55228 18.5523 9 18 9H10V10.5C10 11 9.61841 11 9.57151 11C9.36409 11 8.99012 10.9113 8.78279 10.7363L5.37934 8.08333C4.87356 7.65662 4.87356 7.34338 5.37934 6.91667L8.78279 4.26366C8.99012 4.08874 9.36409 4 9.5715 4Z" fill="#444444"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 821 B |
@ -309,6 +309,134 @@ if (typeof jQuery != "undefined") {
|
||||
jq("#embeddedView").attr("src", url);
|
||||
});
|
||||
|
||||
jq(document).on("click", "#beginEditConverted:not(.disable)", function () {
|
||||
var fileId = encodeURIComponent(jq('#hiddenFileName').attr("data"));
|
||||
var url = "editor?fileID=" + fileId + "&user=" + user;
|
||||
window.open(url, "_blank");
|
||||
jq('#hiddenFileName').val("");
|
||||
jq.unblockUI();
|
||||
document.location.reload();
|
||||
});
|
||||
|
||||
jq(document).on("click", "#beginViewConverted:not(.disable)", function () {
|
||||
var fileId = encodeURIComponent(jq('#hiddenFileName').attr("data"));
|
||||
var url = "editor?action=view&fileID=" + fileId + "&user=" + user;
|
||||
window.open(url, "_blank");
|
||||
jq('#hiddenFileName').val("");
|
||||
jq.unblockUI();
|
||||
document.location.reload();
|
||||
});
|
||||
|
||||
jq(document).on("click", "#downloadConverted:not(.disable)", function () {
|
||||
var fileId = jq('#hiddenFileName').attr("data");
|
||||
if (jq("#downloadConverted").attr("data") == "fromConverter") window.location.assign(fileId);
|
||||
else window.open("download?fileName=" + encodeURIComponent(fileId), "_blank");
|
||||
});
|
||||
|
||||
jq(document).on("click", ".convert-file", function () {
|
||||
const currentElement = jq(this);
|
||||
var fileName = currentElement.attr("data");
|
||||
var type = currentElement.attr("data-type");
|
||||
|
||||
jq.blockUI({
|
||||
theme: true,
|
||||
title: "Converting file" + "<div class=\"dialog-close\"></div>",
|
||||
message: jq("#convertingProgress"),
|
||||
overlayCSS: { "background-color": "#aaa" },
|
||||
themedCSS: { width: "539px", top: "20%", left: "50%", marginLeft: "-269px" }
|
||||
});
|
||||
|
||||
jq("#convertFileName").text(decodeURIComponent(fileName));
|
||||
jq("#convertFileName").removeClass("word slide cell");
|
||||
jq("#convertFileName").addClass(type);
|
||||
jq("#convTypes").empty();
|
||||
|
||||
let format = formatManager.findByExtension(fileName.split('.').pop());
|
||||
if (format) {
|
||||
format.convert.forEach(ext => {
|
||||
jq("#convTypes").append(jq(`<td name="convertingTypeButton" id="wordTo${ext}" class="button hoar" data="${ext}">${ext}</td>`));
|
||||
});
|
||||
}
|
||||
|
||||
jq("#hiddenFileName").val(fileName);
|
||||
jq("#convertStep1").addClass("done");
|
||||
jq("#convertStep2").addClass("waiting");
|
||||
});
|
||||
|
||||
jq(document).on("click", "td[name='convertingTypeButton']:not(.disable, .orange)", function () {
|
||||
const currentElement = jq(this);
|
||||
let id = currentElement[0].id;
|
||||
let fileExt = jq(`#${id}`).attr("data");
|
||||
jq(`#${id}`).addClass("orange");
|
||||
jq("td[name='convertingTypeButton']").addClass("disable");
|
||||
jq("#convertStep2").removeClass("waiting").removeClass("done").addClass("current");
|
||||
jq("#convertStep2").text('2. File conversion');
|
||||
jq("#convert-descr").removeClass("disable");
|
||||
jq("#convertPercent").text("0 %");
|
||||
jq("#hiddenFileName").attr("placeholder",fileExt);
|
||||
jq("#downloadConverted").addClass("disable");
|
||||
jq("#beginEditConverted").addClass("disable");
|
||||
jq("#beginViewConverted").addClass("disable");
|
||||
mustReload = true;
|
||||
|
||||
convertFile();
|
||||
});
|
||||
|
||||
function convertFile (filePass) {
|
||||
let fileName = decodeURIComponent(jq("#hiddenFileName").val());
|
||||
let fileExt = jq("#hiddenFileName").attr("placeholder");
|
||||
|
||||
filePass = filePass ? filePass : null;
|
||||
if (timer != null) {
|
||||
clearTimeout(timer);
|
||||
}
|
||||
timer = setTimeout(function () {
|
||||
jq.ajax({
|
||||
async: true,
|
||||
contentType: "text/xml",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: JSON.stringify({filename: fileName, filePass: filePass, lang: language, fileExt: fileExt, keepOriginal: true}),
|
||||
url: "convert?user=" + user,
|
||||
complete: function (data) {
|
||||
try {
|
||||
var response = jq.parseJSON(data.responseText);
|
||||
} catch (e) {
|
||||
response = { error: e };
|
||||
}
|
||||
if (!response.filename && !response.step && response.error) {
|
||||
jq("#convertStep2").removeClass("current").addClass("error");
|
||||
jq("#convertStep2").text(`2. File conversion to ${fileExt}`);
|
||||
jq("#convert-error").removeClass("hidden");
|
||||
jq("#convert-error").text(`${response.error}`);
|
||||
jq("td[name='convertingTypeButton']").removeClass("disable orange");
|
||||
return;
|
||||
}
|
||||
if (response.step != undefined && response.step != 100) {
|
||||
jq("#convertPercent").text(`${response.step} %`);
|
||||
convertFile();
|
||||
} else {
|
||||
jq("#convertPercent").text(`${response.step} %`);
|
||||
jq("#convertStep2").removeClass("current").addClass("done");
|
||||
jq("#convertStep2").text(`2. File conversion to ${fileExt}`);
|
||||
jq("#downloadConverted").removeClass("disable");
|
||||
if (response.error !== "FileTypeIsNotSupported") {
|
||||
jq("#hiddenFileName").attr("data",response.filename);
|
||||
jq("#beginEditConverted").removeClass("disable");
|
||||
jq("#beginViewConverted").removeClass("disable");
|
||||
jq("#downloadConverted").attr("data","fromStorage");
|
||||
} else {
|
||||
let newFilename = fileName.split('.').slice(0,-1).join('.')
|
||||
jq("#hiddenFileName").attr("data",response.filename.split("&filename=download").join(`&filename=${newFilename}`));
|
||||
jq("#downloadConverted").attr("data","fromConverter");
|
||||
}
|
||||
jq("td[name='convertingTypeButton']").removeClass("disable orange");
|
||||
}
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
jq(document).on("click", ".reload-page", function () {
|
||||
setTimeout(function () { document.location.reload(true); }, 1000);
|
||||
return true;
|
||||
|
||||
@ -229,11 +229,12 @@ function convert()
|
||||
$extension = mb_strtolower(pathinfo($fileName, PATHINFO_EXTENSION));
|
||||
$internalExtension = "ooxml";
|
||||
$conversionExtension = $post['fileExt'] ?? $internalExtension;
|
||||
$keepOriginal = $post['keepOriginal'] ?? false;
|
||||
|
||||
// check if the file with such an extension can be converted
|
||||
if (in_array($extension, $formatManager->convertibleExtensions()) &&
|
||||
$internalExtension != "") {
|
||||
$fileUri = $post["fileUri"];
|
||||
if ((in_array($extension, $formatManager->convertibleExtensions()) &&
|
||||
$internalExtension != "") || $conversionExtension != "ooxml") {
|
||||
$fileUri = $post["fileUri"] ?? null;
|
||||
if ($fileUri == null || $fileUri == "") {
|
||||
$fileUri = serverPath(true) . '/'
|
||||
. "download"
|
||||
@ -265,6 +266,13 @@ function convert()
|
||||
return $result;
|
||||
}
|
||||
|
||||
if (!in_array($convertedData["fileType"], $formatManager->viewableExtensions())) {
|
||||
$result["step"] = $convertedData["percent"];
|
||||
$result["filename"] = $newFileUri;
|
||||
$result["error"] = 'FileTypeIsNotSupported';
|
||||
return $result;
|
||||
}
|
||||
|
||||
// get file name without extension
|
||||
$baseNameWithoutExt = mb_substr($fileName, 0, mb_strlen($fileName) - mb_strlen($extension) - 1);
|
||||
|
||||
@ -280,12 +288,15 @@ function convert()
|
||||
$user = $userList->getUser($_GET["user"]);
|
||||
createMeta($newFileName, $user->id, $user->name); // and create meta data for this file
|
||||
|
||||
// delete the original file and its history
|
||||
$stPath = getStoragePath($fileName);
|
||||
unlink($stPath);
|
||||
delTree(getHistoryDir($stPath));
|
||||
if (!$keepOriginal) {
|
||||
// delete the original file and its history
|
||||
$stPath = getStoragePath($fileName);
|
||||
unlink($stPath);
|
||||
delTree(getHistoryDir($stPath));
|
||||
}
|
||||
|
||||
$fileName = $newFileName;
|
||||
$result['step'] = 100;
|
||||
}
|
||||
|
||||
$result["filename"] = $fileName;
|
||||
|
||||
@ -195,7 +195,7 @@ function getDocumentType($filename)
|
||||
}
|
||||
}
|
||||
|
||||
return "word";
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -138,14 +138,22 @@ class IndexStoredListView extends View
|
||||
' <a href="editor?fileID='.urlencode($storeFile->name).'&user='.htmlentities($user).
|
||||
$directUrlArg.'&action=embedded&type=embedded" target="_blank">'.
|
||||
' <img src="assets/images/embeded.svg" alt="Open in embedded mode"'.
|
||||
' title="Open in embedded mode" /></a>'.
|
||||
' <td class="contentCells contentCells-icon contentCells-shift downloadContentCellShift">'.
|
||||
' title="Open in embedded mode" /></a>';
|
||||
if ($storeFile->documentType != null) {
|
||||
$layout .= '<td class="contentCells contentCells-icon">'.
|
||||
'<a class="convert-file" data="'.$storeFile->name.'" data-type="'.$storeFile->documentType.'">'.
|
||||
'<img class="icon-action" src="assets/images/convert.svg" alt="Convert" title="Convert" />'.
|
||||
'</a></td>';
|
||||
} else {
|
||||
$layout .= '<td class="contentCells contentCells-icon downloadContentCellShift"></td>';
|
||||
}
|
||||
$layout .= ' <td class="contentCells contentCells-icon downloadContentCellShift">'.
|
||||
'<a href="download?fileName='.urlencode($storeFile->name).'">'.
|
||||
' <img class="icon-download" src="assets/images/download.svg" alt="Download" title="Download"'.
|
||||
' /></a></td>'.
|
||||
'<td class="contentCells contentCells-icon contentCells-shift">'.
|
||||
' <a class="delete-file" data="'.$storeFile->name.'">'.
|
||||
' <img class="icon-delete" src="assets/images/delete.svg" alt="Delete" title="Delete" /></a>'.
|
||||
' <img class="icon-action" src="assets/images/delete.svg" alt="Delete" title="Delete" /></a>'.
|
||||
'</td></tr>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -211,6 +211,32 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="convertingProgress">
|
||||
<div id="convertingSteps">
|
||||
<span id="convertFileName" class="convertFileName"></span>
|
||||
<span id="convertStep1" class="step">1. Select a format file to convert</span>
|
||||
<span class="step-descr">The converting speed depends on file size and additional elements it contains.</span>
|
||||
<table cellspacing="0" cellpadding="0" width="100%" class="convertTable">
|
||||
<tbody>
|
||||
<tr class="typeButtonsRow" id="convTypes"></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br />
|
||||
<span id="convertStep2" class="step">2. File conversion</span>
|
||||
<span class="step-descr disable" id="convert-descr">The file is converted <div class="convertPercent" id="convertPercent">0 %</div></span>
|
||||
<span class="step-error hidden" id="convert-error"></span>
|
||||
<div class="describeUpload">Note the speed of all operations depends on your connection quality and server location.</div>
|
||||
<input type="hidden" name="hiddenFileName" id="hiddenFileName" />
|
||||
</div>
|
||||
<br />
|
||||
<div class="buttonsMobile">
|
||||
<div id="downloadConverted" class="button converting orange disable">DOWNLOAD</div>
|
||||
<div id="beginViewConverted" class="button converting wide gray disable">VIEW</div>
|
||||
<div id="beginEditConverted" class="button converting wide gray disable">EDIT</div>
|
||||
<div id="cancelEdit" class="button converting gray">CANCEL</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span id="loadScripts" data-docs="{dataDocs}"></span>
|
||||
|
||||
<footer>
|
||||
|
||||
@ -20,11 +20,8 @@
|
||||
<td class="tableHeaderCell tableHeaderCellViewers">
|
||||
Viewers
|
||||
</td>
|
||||
<td class="tableHeaderCell tableHeaderCellDownload">
|
||||
Download
|
||||
</td>
|
||||
<td class="tableHeaderCell tableHeaderCellRemove">
|
||||
Remove
|
||||
<td class="tableHeaderCell tableHeaderCellAction">
|
||||
Action
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
Reference in New Issue
Block a user