• Romain Courteaud's avatar
    [erp5_web_renderjs_ui] Rewrite the URL navigation handling · 89ef7b43
    Romain Courteaud authored
    Stop using the patched renderJS version which forces to use a fix URL pattern (#a=b&c=d).
    Instead, the URL logic was moved to the router gadget which becomes responsible to build and parse URL.
    
    This will allow applications to support their own URL pattern (HTML5 pushState for example).
    
    In case of the ERP5 JS UI, it provides now a stateful URL building (next URL depends on the current one).
    
    This is used to support browser side "selection" (ie, stored query parameters), needed to support pagination from one document to another.
    Example:
      * go to a module
      * filter with a search
      * click on the first document line and review it
      * click on the "next" icon, to directly see the second document without going back to the list
    
    Stateful URL are also used to provides a "global" navigation history on the browser side.
      Example:
       * go to a module
       * click on the first document (A) and review it
       * use a jump button to go to a linked document (B) and review it
       * click on the "back" button to go back to A
       * click on the "back" button to go back to the module
    Please note that this history works even if you open a new tab, as it is persistent in IndexedDB.
    TODO: it will be required to clean IndexedDB from time to time to not fill it
    
    The current URL patterns are:
      #/jio_key?a=b&c=d (used to display an ERP5 document)
      #!command?a=b&c=d (used to apply some operations on the URL)
    89ef7b43
rjs_gadget_erp5_pt_form_view_js.xml 13.3 KB