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

Fix inlinejs from select2 widgets in a toggleable layout

    XMLWordPrintable

    Details

    • Tags:
    • Backlog priority:
      600
    • Team:
      AT
    • Sprint:
      nxAT Sprint 8.2.2, nxAT Sprint 8.2.3, nxAT Sprint 8.2.4, nxAT Sprint 8.3.1, nxAT Sprint 8.3.2, nxAT Sprint 8.4.2, nxAT Sprint 8.4.1, nxAT Sprint 8.4.5
    • Story Points:
      3

      Description

      For a suggestion widget using a custom inline formatter such as

            <widget name="source" type="select2Widget">
              <labels>
                <label mode="any">Source</label>
              </labels>
              <translated>false</translated>
              <fields>
                <field>dc:source</field>
              </fields>
              <properties widgetMode="edit">
                <property name="minChars">3</property>
                <property name="inlinejs">function aDummyFormatter(doc) {
        var markup = '&lt;b&gt;' + doc.title + '&lt;/b&gt;';
        return markup;
      }</property>
                <property name="documentSchemas">dublincore</property>
                <property name="suggestionFormatter">aDummyFormatter</property>
                <property name="pageProviderName">default_document_suggestion</property>
                <property name="operationId">Repository.PageProvider</property>
              </properties>
            </widget>
      

      (see attached studio project)

      When switching to edit mode, the formatter is not defined when the select2 widget is initialized.

      Uncaught ReferenceError: aDummyFormatter is not defined
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 week
                  1w