浏览代码

[core] Add the document copy action to the right click context menu in the left assist panel

This adds the "copy" action to the context menu for documents listed in the left assist panel.
Johan Åhlén 1 年之前
父节点
当前提交
d742b42c8f
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      desktop/core/src/desktop/js/ko/components/assist/ko.assistDocumentsPanel.js

+ 5 - 2
desktop/core/src/desktop/js/ko/components/assist/ko.assistDocumentsPanel.js

@@ -42,10 +42,13 @@ const TEMPLATE = `
       'Show details'
     )}</a></li>
     <li><a href="javascript: void(0);" data-bind="click: open"><i class="fa fa-fw fa-edit"></i> ${I18n(
-      'Open document'
+      'Open'
+    )}</a></li>
+    <li><a href="javascript: void(0);" data-bind="click: function() { $data.selected(true); $data.parent.copy() }"><i class="fa fa-fw fa-files-o"></i> ${I18n(
+  'Copy'
     )}</a></li>
     <li><a href="javascript: void(0);" data-bind="click: function() { $data.selected(true); huePubSub.publish('doc.show.delete.modal', $data.parent); }"><i class="fa fa-fw fa-trash-o"></i> ${I18n(
-      'Delete document'
+      'Delete'
     )}</a></li>
     <!-- /ko -->
     <!-- ko if: $containerContext.sharingEnabled -->