1. 13 Jul, 2022 2 commits
    • Jérome Perrin's avatar
      ERP5TypeLiveTestCase: close request at the end of each test · 44f5269a
      Jérome Perrin authored
      This is supposed to fix "Should not load state for ${oid of a skin} when
      the connection is closed" sometimes happening with live tests (especially
      when the test self.publish and the developer access the site while the
      test is suspended on a debugger breakpoint).
      
      The object accessed after the connection is closed was a skin (python
      script, sometimes page template or form) that was cached in SKINDATA.
      The mechanism to prune entries from the cache uses REQUEST.hold API
      which expects that REQUEST.close is called on request, but because
      requests were not closed at the end of the request, it happened that
      the cache was reused from another connection.
      
      This change to close the requests, like ERP5TypeTestCase is doing in
      tearDown (the actual close is done by Testing.ZopeTestCase.connections).
      
      By closing requests at the end of tests, we also have to change so that
      at the beginning of the test we initialize the request, by using the same
      setSite and setupCurrentSkin that are done in ERP5TypeTestCase.
      44f5269a
    • Jérome Perrin's avatar
      accounting: fix grouping dialog loosing section category on next page · 0d8242de
      Jérome Perrin authored
      In xhtml_style, just after clicking next or previous page in the listbox
      buttons, the values selected in 'Section Category' and 'Section Category
      Strict' were not used, because they were used from request and not from
      as normal script parameters.
      
      This fixes only the xhtml_style version, ERP5JS has another problem that
      dialog fields values are reset when going to next page, so it would also
      need this problem to be fixed.
      0d8242de
  2. 12 Jul, 2022 1 commit
  3. 07 Jul, 2022 2 commits
  4. 01 Jul, 2022 1 commit
  5. 27 Jun, 2022 1 commit
  6. 24 Jun, 2022 1 commit
  7. 23 Jun, 2022 2 commits
  8. 22 Jun, 2022 3 commits
  9. 21 Jun, 2022 4 commits
  10. 20 Jun, 2022 2 commits
  11. 15 Jun, 2022 10 commits
  12. 14 Jun, 2022 4 commits
  13. 13 Jun, 2022 7 commits
    • Jérome Perrin's avatar
      dms: disable open button in PDF viewer · c54c4bc0
      Jérome Perrin authored
      It does not make any sense to open PDF files from this gadget.
      
      Also remove duplicate line with documentProperties
      c54c4bc0
    • Jérome Perrin's avatar
      dms: support password protected PDFs in viewer · 407b7727
      Jérome Perrin authored
      This is intended to store sensitive documents that users will only
      be able to view from ERP5, but not to easily print or download.
      
      To use this, some customization is needed. First, PDF needs to be
      saved with a password. Then, PDF_getContentPassword type based method
      needs to be customized to return the password.
      
      When using this, we use different password for each document, by
      deriving a password from a master key using document properties (such
      as document reference for example)
      407b7727
    • Jérome Perrin's avatar
      core,dms,xhtml_syle: support language in editor gadgets (CKEditor and pdf.js) · b266ef47
      Jérome Perrin authored
      A new option render option, "language" is passed to the gadget. It is
      a two letter code as used by Localier.
      
      Both CKEditor and pdf.js have support for translations and already
      include translations for many languages. Before this change, they were
      auto detecting the browser language and displaying in the browser
      language, ignoring the language that was selected in ERP5. With this
      change, they use the language selected in ERP5.
      
      For CKEditor, we need to set the language only it is actually supported,
      otherwise CKEditor crash. pdf.js does not this, but we had to call
      ourselves initialize - which is probably better, because it was a promise
      not awaited.
      b266ef47
    • Jérome Perrin's avatar
      dms: no need to remove <base> in PDF viewer · 6dccfa3b
      Jérome Perrin authored
      I'm not sure what was the problem from this comment, but we render
      the gadget in an iframe so there's no need to change the DOM like this.
      Probably this was a problem in early versions when it was in the same
      page.
      6dccfa3b
    • Jérome Perrin's avatar
      dms: support a few more locales in PDF viewer · 23597a79
      Jérome Perrin authored
      also change the content type in so that they are exported as text in
      business template
      23597a79
    • Jérome Perrin's avatar
      dms: use ?format= URL for PDF viewer · 59f626ae
      Jérome Perrin authored
      This is the URL to download, it currently does not support range
      requests, but it sets cache headers properly, unlike /getData which
      is an accessor
      59f626ae
    • Jérome Perrin's avatar
      dms: display drawing preview as PDF · 5fbe1a48
      Jérome Perrin authored
      For drawings the layout is usually important, but HTML preview do
      not preserve layout correctly. Use PDF instead, which keeps layout
      5fbe1a48