Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-25284

Make clipboard action availability overridable

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 9.10
    • Fix Version/s: 9.10-HF12, 10.2
    • Component/s: Web UI

      Description

      https://github.com/nuxeo/nuxeo-web-ui/blob/9.10/elements/nuxeo-document-actions/nuxeo-clipboard-toggle-button.html#L82 hardcodes the fact that the action is available for document not having the NotCollectionMember facet which is structurally not a requirement (the clipboard is is implemented client side and leverages the browser's localstorage).

      Some people may, therefore, override the action availability.

      We should use a nuxeo-filter in https://github.com/nuxeo/nuxeo-web-ui/blob/9.10/elements/nuxeo-web-ui-bundle.html#L236 such as:

      <nuxeo-slot-content name="clipboardToggleDocumentAction" slot="DOCUMENT_ACTIONS" order="60">
        <template>
          <nuxeo-filter document="[[document]]" expression="document.facets.indexOf('NotCollectionMember') === -1">
            <template>
               <nuxeo-clipboard-toggle-button document="[[document]]" clipboard="[[clipboard]]"></nuxeo-clipboard-toggle-button>
            </template>
          </nuxeo-filter>
          <nuxeo-clipboard-toggle-button document="[[document]]" clipboard="[[clipboard]]"></nuxeo-clipboard-toggle-button>
        </template>
      </nuxeo-slot-content>
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours
                  4h