Uploaded image for project: 'Nuxeo Elements'
  1. Nuxeo Elements
  2. ELEMENTS-736

Allow to customize date format in Web UI

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.3.3
    • Component/s: UI
    • Release Notes Summary:
      The date format is customizable in WebUI.
    • Tags:
    • Backlog priority:
      700
    • Upgrade notes:
      Hide

      You can now globally change date (time) format by contributing:

        <require>org.nuxeo.web.ui.properties.contrib</require>
        <extension target="org.nuxeo.runtime.ConfigurationService" point="configuration">
          <property name="org.nuxeo.web.ui.dateFormat">MMMM D, YYYY</property>
          <property name="org.nuxeo.web.ui.dateTimeFormat">MMMM D, YYYY HH:mm</property>
        </extension>
      
      Show
      You can now globally change date (time) format by contributing: <require>org.nuxeo.web.ui.properties.contrib</require> <extension target= "org.nuxeo.runtime.ConfigurationService" point= "configuration" > <property name= "org.nuxeo.web.ui.dateFormat" >MMMM D, YYYY</property> <property name= "org.nuxeo.web.ui.dateTimeFormat" >MMMM D, YYYY HH:mm</property> </extension>
    • Sprint:
      nxGang Sprint 10.3.4
    • Story Points:
      2

      Description

      It is not possible to easily change globally the date format.

      One needs to override each element that includes nuxeo-date using the format property and/or the tooltipFormat:
      https://github.com/nuxeo/nuxeo-ui-elements/blob/maintenance-2.2.x/widgets/nuxeo-date.html#L61
      This means at least the following elements should be overriden:

      FrantzMBP:nuxeo-web-ui ffischer$ find . -name "*.html" -type f | xargs grep -F 'nuxeo-date ' 2>/dev/null | cut -d ':' -f 1 | sort -u
      ./elements/nuxeo-admin/nuxeo-audit.html
      ./elements/nuxeo-cloud-services/nuxeo-cloud-tokens.html
      ./elements/nuxeo-collections/nuxeo-collections.html
      ./elements/nuxeo-document-activity/nuxeo-document-activity.html
      ./elements/nuxeo-document-history/nuxeo-document-history.html
      ./elements/nuxeo-document-info-bar/nuxeo-document-info-bar.html
      ./elements/nuxeo-document-info/nuxeo-document-info.html
      ./elements/nuxeo-home.html
      ./elements/nuxeo-results/nuxeo-default-results.html
      ./elements/nuxeo-results/nuxeo-document-content.html
      ./elements/nuxeo-tasks.html
      ./elements/nuxeo-tasks/nuxeo-tasks-list.html
      ./elements/search/default/nuxeo-default-search-results.html
      ./elements/search/expired/nuxeo-expired-search-results.html
      ./elements/search/nxql/nuxeo-nxql-search-results.html
      ./elements/workflow/nuxeo-document-task.html
      

      And on top of that any element using them will need to be overriden and so on and so on.

      Doing this would prevent customer from benefiting from hotfixes and is very heavy.

      Expected behavior: have a mechanism similar to the slots or some kind of variable but something very light to change the date format and the tooltip too.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                5 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 - 5 hours
                  5h

                    PagerDuty

                    Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.