- 02 Mar, 2020 25 commits
-
-
Romain Courteaud authored
-
Romain Courteaud authored
* use precache manifest * launcher interface is now checked
-
Romain Courteaud authored
Fetch usage can be bypassed to do not use service worker when not needed. As appcache has been dropped on Firefox, this change will improve the speed on Firefox. No change is expected on Chrome/Safari. Replace Base_getListFileFromAppcache with Base_getTranslationSourceFileList. Collect a list of files from service worker code. Use cache.add because safari does not support cache.addAll. Don't give request object itself to cache.match. Firefox's Cache Storage does not work properly when VARY contains Accept-Language. Give URL string instead, then cache.match works on both Firefox and Chrome. Stop calling skipWaiting() and clients.claim() for the new service worker. To preserve the consistency of code and data, let the new service worker wait until all tabs and windows of the old version are closed. New client can use the latest cache without waiting for the new service worker to be activated. And once client was associated with a cache, client keeps using the same cache. Fix translation script. Get service worker filename from layout property. Don't hardcode it. Fix service worker. Don't hardcode the special cache name. The name must be different per web site, else if the same service worker code is used by multiple web sites in ERP5 web site module, service worker does not work correctly. Add more comments because service worker is unstable and hard to use safely. If service worker failed to install cache, unregister this service worker explicitly. Update service worker code. Client_id is null when it is the first request, in other words if request is navigate mode. Since major web browsers already implement client_id, if client_is is null, let's use the latest cache and don't get cache_key from CACHE_MAP and erp5js_cache. service worker document may not exist duplicate files by adding language prefix experiment base tag on launcher use relative url with .. to fetch gadgets Drop base tag, because it will probably break all erp5js forks, which hardcode url strings remove all hardcoded precache requirement fetch the wallpaper from the base url remove all clientIds handling Waiting for all clients to be closed before activating the new service worker is not usable, as it will lead to user keeping the old code. Drop the logic for now. Fetch the list of precache url dynamically in order to decouple the worker code from the list of files. Calculate dynamically the list of files from a python script, depending on the web site configuration. Update the service worker as soon as the web site modification date changes. This (I hope) will simplify ERP5 upgrade handling. allow to extend the list of precache urls do not hammer zope during installation erp5_web_renderjs_ui: browser send GMT suffix * reload the page only if there is no notification * delay the sw installation * do not reload after first worker installation * embed the dependency list in the worker code * global are deleted when the worker is stopped, which make the current fetch code less interesting... * automatically handle service worker update and page refresh * ensure that user automatically uses the latest code without manually refreshing the page. * catch worker registration error * catch worker update error erp5_web_renderjs_ui: precache: missing dependencies + json export
-
Romain Courteaud authored
See nexedi/erp5@2e3f7a8a
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
Use the precache script to get the list of gadgets. Ensure to also check the launcher gadget. Report subgadget service error.
-
Romain Courteaud authored
-
Romain Courteaud authored
Replace it by domsugar. This speed up gadget class generation (handlebars template parsing is slow).
-
Romain Courteaud authored
This attribute is only needed for the translateHTML method. There is no reason for it to be kept in the final DOM HTML.
-
Romain Courteaud authored
Add service worker precache script.
-
Romain Courteaud authored
Add service worker precache script
-
Romain Courteaud authored
renderJS now correctly handles relative URL.
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Valentin Benozillo authored
-
Vincent Pelletier authored
There are 2 shemes for VIRTUAL_URL_PARTS: - 2-tuple with SERVER_URL and subpath - 3-tuple with SERVER_URL, vh path and subpath This code only supported the 2-tuple version, add support for the 3-tuple version.
-
- 28 Feb, 2020 3 commits
-
-
Georgios Dagkakis authored
-
Vincent Pelletier authored
Make ERP5Type.Base and ERP5.ERP5Site inherit from it.
-
Vincent Pelletier authored
Allows Base to consistently override methods which are also overridden in CMF where CMF implementation does not propagate the call to other superclasses (ex: __before_publishing_traverse__ as of CMFCore-2.2.10). Also allows simplifying several inheritance fixups. Also, use super() instead of explicit resolution to Base. Also: testBusinessTemplate: drop dead monkey-patch. _getCopy is called during BusinessTemplate installation, but not the one on this class. Which prevents reordering class inheritance between SimpleItem and copy support classes. So this is dead code which is not even explaining what it is trying to do (ex: what document should it really not be called on ? what effect of this method is undesired ? why is the method attached to this class ? why is the cleanup restoring the original method, when this class does not have this method to begin with but it merely gets it from its superclasses which are re-inherited from by documents hence overriding it anyway ?, and it is getting in the way of reordering class inheritance so it goes away. Also: ERP5Type.patches.CMFBTreeFolder: Fold patch onto ERP5Type.Core.Folder. All ERP5UI-visible (hence needing to call allowedContentTypes) BTReeFolder2 instances should already inherit ERP5Type.Core.Folder, removing the need for this monkey-patch.
-
- 27 Feb, 2020 5 commits
-
-
Georgios Dagkakis authored
-
Valentin Benozillo authored
-
Valentin Benozillo authored
-
Valentin Benozillo authored
-
Valentin Benozillo authored
-
- 26 Feb, 2020 5 commits
-
-
Xiaowu Zhang authored
-
Xiaowu Zhang authored
-
Xiaowu Zhang authored
1. allow user to define custom value in dialog 2. fix rounding issue for total value 3. improve view
-
Jérome Perrin authored
The category titles were missing /reviewed-on nexedi/erp5!1065
-
Jérome Perrin authored
In https://www.associations.gouv.fr/IMG/pdf/reglt_2018-06_association.pdf ( from 2018 and applicable currently), it's written "870 dons en nature" and "875 Bénévolat". Eventhough in other documents from this official web site, it's still the opposite: * https://www.associations.gouv.fr/IMG/pdf/plan_comptable_assoc.pdf (from 2004) have in page 9: > Répartition par nature de ressources > > 870 – Bénévolat > > 871 – Prestations en nature > > 875 – Dons en nature * https://www.associations.gouv.fr/IMG/pdf/benevolat_valorisation_comptable2011.pdf page 8: > ➛ au crédit du compte « 870. Bénévolat », la contribution ; Most of google searches yield "875 dons en nature" / "870 Bénévolat", but let's follow this newer document. /reviewed-on nexedi/erp5!1064
-
- 25 Feb, 2020 2 commits
-
-
Jérome Perrin authored
Add missing ones from RÈGLEMENT N° 2018-06 du 5 décembre 2018 LIVRE III – TENUE, STRUCTURE ET FONCTIONNEMENT DES COMPTES Titre II – Nomenclature des comptes Art. 320-2 /reviewed-on nexedi/erp5!1060
-
Jérome Perrin authored
Example configuration: from `portal_activities/manageLoadBalancing`: ![image](/uploads/11e614bf8723e3cb81c7bac714a383b7/image.png) in preferences: ![image](/uploads/9f8691ac140aab45904b98ce46aa11b4/image.png) This way when users request lots of reports we always have at least one activity node to process other activities. ( document_conversion is a fictional example at this point ) /reviewed-on nexedi/erp5!1057
-