1. 26 Dec, 2023 2 commits
    • Jérome Perrin's avatar
      core: fix error when downloading when mimetypes_registry only defines globs · 5ea313bb
      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.
      5ea313bb
    • Jérome Perrin's avatar
      core: drop text/comma-separated-values mime type · 7e35d0e7
      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"]
      7e35d0e7
  2. 25 Dec, 2023 1 commit
    • 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
  3. 22 Dec, 2023 2 commits
  4. 15 Dec, 2023 2 commits
  5. 14 Dec, 2023 4 commits
  6. 13 Dec, 2023 1 commit
  7. 12 Dec, 2023 3 commits
  8. 06 Dec, 2023 2 commits
  9. 05 Dec, 2023 2 commits
  10. 04 Dec, 2023 2 commits
  11. 01 Dec, 2023 3 commits
  12. 30 Nov, 2023 3 commits
  13. 29 Nov, 2023 1 commit
  14. 28 Nov, 2023 12 commits