nodejs: comment only mode

This commit is contained in:
Sergey Linnik
2017-06-28 18:09:17 +03:00
parent 25e0d5692f
commit a17b419791
5 changed files with 10 additions and 2 deletions

View File

@ -597,6 +597,7 @@ app.get("/editor", function (req, res) {
callbackUrl: docManager.getCallback(fileName),
isEdit: canEdit && mode == "edit",
review: mode == "edit" || mode == "review",
comment: mode == "edit" || mode == "comment",
mode: canEdit && mode != "view" ? "edit" : "view",
canBackToFolder: type != "embedded",
backUrl: docManager.getServerUrl(),

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 B

After

Width:  |  Height:  |  Size: 145 B

View File

@ -13,6 +13,7 @@
"created": "<%- file.created %>"
},
"permissions": {
"comment": <%- editor.comment %>,
"download": true,
"edit": <%- editor.isEdit %>,
"review": <%- editor.review %>

View File

@ -130,7 +130,7 @@
<thead>
<tr class="tableHeader">
<td class="tableHeaderCell tableHeaderCellFileName">Filename</td>
<td colspan="3" class="tableHeaderCell contentCells-shift">Editors</td>
<td colspan="4" class="tableHeaderCell contentCells-shift">Editors</td>
<td colspan="3" class="tableHeaderCell">Viewers</td>
</tr>
</thead>
@ -153,12 +153,18 @@
<a href="editor?type=mobile&mode=edit&fileName=<%= encodeURIComponent(storedFiles[i].name) + params %>" target="_blank">
<img src="images/mobile-24.png" alt="Open in editor for mobile devices" title="Open in editor for mobile devices" /></a>
</td>
<td class="contentCells contentCells-shift contentCells-icon">
<td class="contentCells contentCells-icon">
<% if (storedFiles[i].documentType == "text") { %>
<a href="editor?type=desktop&mode=review&fileName=<%= encodeURIComponent(storedFiles[i].name) + params %>" target="_blank">
<img src="images/review-24.png" alt="Open in editor for review" title="Open in editor for review" /></a>
<% } %>
</td>
<td class="contentCells contentCells-shift contentCells-icon">
<% if (storedFiles[i].documentType == "text") { %>
<a href="editor?type=desktop&mode=comment&fileName=<%= encodeURIComponent(storedFiles[i].name) + params %>" target="_blank">
<img src="images/comment-24.png" alt="Open in editor for comment" title="Open in editor for comment" /></a>
<% } %>
</td>
<td class="contentCells contentCells-icon">
<a href="editor?type=desktop&mode=view&fileName=<%= encodeURIComponent(storedFiles[i].name) + params %>" target="_blank">
<img src="images/desktop-24.png" alt="Open in viewer for full size screens" title="Open in viewer for full size screens" /></a>