1. 25 Dec, 2023 3 commits
    • Jérome Perrin's avatar
      core: fix error when downloading when mimetypes_registry only defines globs · 16869f9a
      Jérome Perrin authored
      DownloadableMixin uses mimetypes_registry to guess an extension from
      the mimetype, but this was wrong when the entry in mimetype only defines
      globs, an error like this was raised:
      
            Module erp5.component.mixin.erp5_version.DownloadableMixin, line 143, in index_html
              output_format = mimetype_object.globs.strip('*.')
          AttributeError: 'list' object has no attribute 'strip'
      
      Also blindly apply the same fix in OOoTemplate, as it used the same
      problematic pattern.
      16869f9a
    • Jérome Perrin's avatar
      core: drop text/comma-separated-values mime type · 263873cf
      Jérome Perrin authored
      we use to have two entries for csv:
      
        - text/comma-separated-values
           - mimes: ["text/comma-separated-values"]
           - extensions: ["csv"]
           - globs: []
        - CSV document
           - mimes: ["text/csv", "text/x-comma-separated-values", "text/x-csv"]
           - extensions: []
           - globs: [".csv"]
      
      but text/comma-separated-values does not really exist, rfc4180 recommends
      text/csv.
      
      The problem with this configuration is that when ERP5 picks a mime type
      for csv extension, it uses text/comma-separated-values, as this one has
      extensions set.
      
      Change the configuration to delete "text/comma-separated-values" and keep
      everything in "CSV document":
      
        - CSV document
           - mimes: ["text/csv", "text/x-comma-separated-values", "text/x-csv", "text/comma-separated-values"]
           - extensions: ["csv"]
           - globs: [".csv"]
      263873cf
    • Jérome Perrin's avatar
      dms: fix hidden buttons on PDF preview · 3b91fe33
      Jérome Perrin authored
      Instead of disabling in javascript, which cause the button to be visible
      for a few milliseconds, disable directly in the HTML file.
      
      Do not hide "document properties", because it can be useful and it does
      not hurt and "edit images" because we don't hide the buttons to edit
      annotations either, so this is consistent.
      3b91fe33
  2. 22 Dec, 2023 2 commits
  3. 15 Dec, 2023 2 commits
  4. 14 Dec, 2023 4 commits
  5. 13 Dec, 2023 1 commit
  6. 12 Dec, 2023 3 commits
  7. 06 Dec, 2023 2 commits
  8. 05 Dec, 2023 2 commits
  9. 04 Dec, 2023 2 commits
  10. 01 Dec, 2023 3 commits
  11. 30 Nov, 2023 3 commits
  12. 29 Nov, 2023 1 commit
  13. 28 Nov, 2023 12 commits