diff --git a/bt5/erp5_officejs_afs_directory/ExtensionTemplateItem/portal_components/extension.erp5.AfsOpenHub.py b/bt5/erp5_officejs_afs_directory/ExtensionTemplateItem/portal_components/extension.erp5.AfsOpenHub.py deleted file mode 100644 index 588341fd5e47a228c9430d5cf687f0bb74b1a7f5..0000000000000000000000000000000000000000 --- a/bt5/erp5_officejs_afs_directory/ExtensionTemplateItem/portal_components/extension.erp5.AfsOpenHub.py +++ /dev/null @@ -1,40 +0,0 @@ -import urllib2 -import json - -github_list_url = "https://api.github.com/repos/Nexedi/awesome-free-software/contents/?ref=master" -openhub_key = "1afe873fd46de2cd79292e00728883e727926a513fbf15f86c62821ba296139b" - -def getLatestAnalysesAsXml(url): - if url == None: - raise Exception("No url parameter provided.") - - url = url.replace("/languages_summary", ".xml").replace("/p/", "/projects/").replace(" ", "") - response = urllib2.urlopen(url + "?api_key=" + openhub_key) - return response.read() - -def isValidProfileUrl(url): - return url is not None and url is not "" and "hub" in url - -def getOpenHubUrlList(): - item_list = urllib2.urlopen(github_list_url) - json_list = json.loads(item_list.read()) - request_list = [] - - for element in json_list: - if ".json" in element.title: - publisher_profile_request = urllib2.urlopen(element.download_url) - publisher_profile = json.loads(publisher_profile_request.read()) - publisher_software_list = publisher_profile.free_software_list - if len(publisher_software_list): - for software in publisher_software_list: - software_profile_url = software.source_code_profile - if isValidProfileUrl(software_profile_url): - if software_profile_url not in request_list: - request_list.append(software_profile_url) - return request_list - -def fetchOpenHubProfileListAsXml(): - request_list = getOpenHubUrlList() - return request_list - - \ No newline at end of file diff --git a/bt5/erp5_officejs_afs_directory/ExtensionTemplateItem/portal_components/extension.erp5.AfsOpenHub.xml b/bt5/erp5_officejs_afs_directory/ExtensionTemplateItem/portal_components/extension.erp5.AfsOpenHub.xml deleted file mode 100644 index ec0fe039dd4537f2c0c3b4982f1713a88f73a93e..0000000000000000000000000000000000000000 --- a/bt5/erp5_officejs_afs_directory/ExtensionTemplateItem/portal_components/extension.erp5.AfsOpenHub.xml +++ /dev/null @@ -1,121 +0,0 @@ -<?xml version="1.0"?> -<ZopeData> - <record id="1" aka="AAAAAAAAAAE="> - <pickle> - <global name="Extension Component" module="erp5.portal_type"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>_recorded_property_dict</string> </key> - <value> - <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> - </value> - </item> - <item> - <key> <string>default_reference</string> </key> - <value> <string>AfsOpenHub</string> </value> - </item> - <item> - <key> <string>description</string> </key> - <value> <string>methods for retrieving software profiles on openhub</string> </value> - </item> - <item> - <key> <string>id</string> </key> - <value> <string>extension.erp5.AfsOpenHub</string> </value> - </item> - <item> - <key> <string>portal_type</string> </key> - <value> <string>Extension Component</string> </value> - </item> - <item> - <key> <string>sid</string> </key> - <value> - <none/> - </value> - </item> - <item> - <key> <string>text_content_error_message</string> </key> - <value> - <tuple/> - </value> - </item> - <item> - <key> <string>text_content_warning_message</string> </key> - <value> - <tuple/> - </value> - </item> - <item> - <key> <string>version</string> </key> - <value> <string>erp5</string> </value> - </item> - <item> - <key> <string>workflow_history</string> </key> - <value> - <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> - </value> - </item> - </dictionary> - </pickle> - </record> - <record id="2" aka="AAAAAAAAAAI="> - <pickle> - <global name="PersistentMapping" module="Persistence.mapping"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>data</string> </key> - <value> - <dictionary/> - </value> - </item> - </dictionary> - </pickle> - </record> - <record id="3" aka="AAAAAAAAAAM="> - <pickle> - <global name="PersistentMapping" module="Persistence.mapping"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>data</string> </key> - <value> - <dictionary> - <item> - <key> <string>component_validation_workflow</string> </key> - <value> - <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent> - </value> - </item> - </dictionary> - </value> - </item> - </dictionary> - </pickle> - </record> - <record id="4" aka="AAAAAAAAAAQ="> - <pickle> - <global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/> - </pickle> - <pickle> - <tuple> - <none/> - <list> - <dictionary> - <item> - <key> <string>action</string> </key> - <value> <string>validate</string> </value> - </item> - <item> - <key> <string>validation_state</string> </key> - <value> <string>validated</string> </value> - </item> - </dictionary> - </list> - </tuple> - </pickle> - </record> -</ZopeData> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/image_module/gadget_erp5_afs_camera_png.png b/bt5/erp5_officejs_afs_directory/PathTemplateItem/image_module/gadget_erp5_afs_camera_png.png new file mode 100644 index 0000000000000000000000000000000000000000..50ffee6aa30733fa80f053a5d8d84505ae17a719 Binary files /dev/null and b/bt5/erp5_officejs_afs_directory/PathTemplateItem/image_module/gadget_erp5_afs_camera_png.png differ diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_converter_storage_js.xml b/bt5/erp5_officejs_afs_directory/PathTemplateItem/image_module/gadget_erp5_afs_camera_png.xml similarity index 72% rename from bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_converter_storage_js.xml rename to bt5/erp5_officejs_afs_directory/PathTemplateItem/image_module/gadget_erp5_afs_camera_png.xml index f0945ee6c0fe0b2caa478a8e91d1ae33483ad015..de8957683a5287af026fa25ad9ced068a2d1ec6e 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_converter_storage_js.xml +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/image_module/gadget_erp5_afs_camera_png.xml @@ -2,7 +2,7 @@ <ZopeData> <record id="1" aka="AAAAAAAAAAE="> <pickle> - <global name="Web Script" module="erp5.portal_type"/> + <global name="Image" module="erp5.portal_type"/> </pickle> <pickle> <dictionary> @@ -64,22 +64,52 @@ </value> </item> <item> - <key> <string>content_md5</string> </key> + <key> <string>_count</string> </key> <value> - <none/> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>_mt_index</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> </value> </item> + <item> + <key> <string>_tree</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent> + </value> + </item> + <item> + <key> <string>content_md5</string> </key> + <value> <string>bd1ecafea5249017c0e36104ec9aa556</string> </value> + </item> + <item> + <key> <string>content_type</string> </key> + <value> <string>image/png</string> </value> + </item> <item> <key> <string>default_reference</string> </key> - <value> <string>gadget_erp5_afs_converter_storage.js</string> </value> + <value> <string>gadget_erp5_afs_camera.png</string> </value> </item> <item> <key> <string>description</string> </key> - <value> <string>Custom AFS converter storage</string> </value> + <value> + <none/> + </value> + </item> + <item> + <key> <string>filename</string> </key> + <value> <string>afs_camera.png</string> </value> + </item> + <item> + <key> <string>height</string> </key> + <value> <int>150</int> </value> </item> <item> <key> <string>id</string> </key> - <value> <string>gadget_erp5_afs_converter_storage_js</string> </value> + <value> <string>gadget_erp5_afs_camera_png</string> </value> </item> <item> <key> <string>language</string> </key> @@ -87,7 +117,7 @@ </item> <item> <key> <string>portal_type</string> </key> - <value> <string>Web Script</string> </value> + <value> <string>Image</string> </value> </item> <item> <key> <string>short_title</string> </key> @@ -97,22 +127,48 @@ </item> <item> <key> <string>title</string> </key> - <value> <string>Gadget AFS Converter Storage</string> </value> + <value> <string>AFS Camera</string> </value> </item> <item> <key> <string>version</string> </key> <value> <string>001</string> </value> </item> + <item> + <key> <string>width</string> </key> + <value> <int>200</int> </value> + </item> <item> <key> <string>workflow_history</string> </key> <value> - <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent> </value> </item> </dictionary> </pickle> </record> <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <global name="Length" module="BTrees.Length"/> + </pickle> + <pickle> <int>0</int> </pickle> + </record> + <record id="3" aka="AAAAAAAAAAM="> + <pickle> + <global name="OOBTree" module="BTrees.OOBTree"/> + </pickle> + <pickle> + <none/> + </pickle> + </record> + <record id="4" aka="AAAAAAAAAAQ="> + <pickle> + <global name="OOBTree" module="BTrees.OOBTree"/> + </pickle> + <pickle> + <none/> + </pickle> + </record> + <record id="5" aka="AAAAAAAAAAU="> <pickle> <global name="PersistentMapping" module="Persistence.mapping"/> </pickle> @@ -125,19 +181,13 @@ <item> <key> <string>document_publication_workflow</string> </key> <value> - <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent> </value> </item> <item> <key> <string>edit_workflow</string> </key> <value> - <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent> - </value> - </item> - <item> - <key> <string>processing_status_workflow</string> </key> - <value> - <persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAc=</string> </persistent> </value> </item> </dictionary> @@ -146,7 +196,7 @@ </dictionary> </pickle> </record> - <record id="3" aka="AAAAAAAAAAM="> + <record id="6" aka="AAAAAAAAAAY="> <pickle> <global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/> </pickle> @@ -161,7 +211,7 @@ </item> <item> <key> <string>actor</string> </key> - <value> <string>3</string> </value> + <value> <string>zope</string> </value> </item> <item> <key> <string>comment</string> </key> @@ -183,7 +233,7 @@ </tuple> <state> <tuple> - <float>1498657793.17</float> + <float>1496061557.92</float> <string>UTC</string> </tuple> </state> @@ -199,7 +249,7 @@ </tuple> </pickle> </record> - <record id="4" aka="AAAAAAAAAAQ="> + <record id="7" aka="AAAAAAAAAAc="> <pickle> <global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/> </pickle> @@ -214,7 +264,7 @@ </item> <item> <key> <string>actor</string> </key> - <value> <string>3</string> </value> + <value> <string>zope</string> </value> </item> <item> <key> <string>comment</string> </key> @@ -228,7 +278,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>960.25923.56736.46438</string> </value> + <value> <string>959.45174.56579.19421</string> </value> </item> <item> <key> <string>state</string> </key> @@ -246,64 +296,7 @@ </tuple> <state> <tuple> - <float>1498838738.54</float> - <string>UTC</string> - </tuple> - </state> - </object> - </value> - </item> - </dictionary> - </list> - </tuple> - </pickle> - </record> - <record id="5" aka="AAAAAAAAAAU="> - <pickle> - <global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/> - </pickle> - <pickle> - <tuple> - <none/> - <list> - <dictionary> - <item> - <key> <string>action</string> </key> - <value> <string>detect_converted_file</string> </value> - </item> - <item> - <key> <string>actor</string> </key> - <value> <string>3</string> </value> - </item> - <item> - <key> <string>comment</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>error_message</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>external_processing_state</string> </key> - <value> <string>converted</string> </value> - </item> - <item> - <key> <string>serial</string> </key> - <value> <string>0.0.0.0</string> </value> - </item> - <item> - <key> <string>time</string> </key> - <value> - <object> - <klass> - <global name="DateTime" module="DateTime.DateTime"/> - </klass> - <tuple> - <none/> - </tuple> - <state> - <tuple> - <float>1498657059.06</float> + <float>1496061545.81</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/image_module/gadget_erp5_afs_logo_png.png b/bt5/erp5_officejs_afs_directory/PathTemplateItem/image_module/gadget_erp5_afs_logo_png.png new file mode 100644 index 0000000000000000000000000000000000000000..b6e1f42b3b069fcf34747742832aefb5503f8192 Binary files /dev/null and b/bt5/erp5_officejs_afs_directory/PathTemplateItem/image_module/gadget_erp5_afs_logo_png.png differ diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_site_module/afs/hateoas/connection.xml b/bt5/erp5_officejs_afs_directory/PathTemplateItem/image_module/gadget_erp5_afs_logo_png.xml similarity index 55% rename from bt5/erp5_officejs_afs_directory/PathTemplateItem/web_site_module/afs/hateoas/connection.xml rename to bt5/erp5_officejs_afs_directory/PathTemplateItem/image_module/gadget_erp5_afs_logo_png.xml index f435b811f5a6bb7dc497eadaa912a9f31dedd2e4..52a295c55657abaf61d54c16d0fa51cea388bbeb 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_site_module/afs/hateoas/connection.xml +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/image_module/gadget_erp5_afs_logo_png.xml @@ -2,30 +2,36 @@ <ZopeData> <record id="1" aka="AAAAAAAAAAE="> <pickle> - <global name="Web Section" module="erp5.portal_type"/> + <global name="Image" module="erp5.portal_type"/> </pickle> <pickle> <dictionary> <item> - <key> <string>_Add_portal_content_Permission</string> </key> + <key> <string>_Access_contents_information_Permission</string> </key> <value> <tuple> + <string>Anonymous</string> + <string>Assignee</string> <string>Assignor</string> + <string>Associate</string> + <string>Auditor</string> <string>Manager</string> + <string>Owner</string> </tuple> </value> </item> <item> - <key> <string>_Add_portal_folders_Permission</string> </key> + <key> <string>_Add_portal_content_Permission</string> </key> <value> <tuple> + <string>Assignee</string> <string>Assignor</string> <string>Manager</string> </tuple> </value> </item> <item> - <key> <string>_Copy_or_Move_Permission</string> </key> + <key> <string>_Change_local_roles_Permission</string> </key> <value> <tuple> <string>Assignor</string> @@ -34,111 +40,58 @@ </value> </item> <item> - <key> <string>_Delete_objects_Permission</string> </key> + <key> <string>_Modify_portal_content_Permission</string> </key> <value> <tuple> + <string>Assignee</string> <string>Assignor</string> <string>Manager</string> </tuple> </value> </item> <item> - <key> <string>_Modify_portal_content_Permission</string> </key> + <key> <string>_View_Permission</string> </key> <value> <tuple> + <string>Anonymous</string> <string>Assignee</string> <string>Assignor</string> + <string>Associate</string> + <string>Auditor</string> <string>Manager</string> <string>Owner</string> </tuple> </value> </item> <item> - <key> <string>__before_publishing_traverse__</string> </key> + <key> <string>_count</string> </key> <value> - <object> - <klass> - <global name="MultiHook" module="ZPublisher.BeforeTraverse"/> - </klass> - <tuple/> - <state> - <dictionary> - <item> - <key> <string>_defined_in_class</string> </key> - <value> <int>1</int> </value> - </item> - <item> - <key> <string>_hookname</string> </key> - <value> <string>__before_publishing_traverse__</string> </value> - </item> - <item> - <key> <string>_list</string> </key> - <value> - <list> - <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> - </list> - </value> - </item> - <item> - <key> <string>_prior</string> </key> - <value> - <none/> - </value> - </item> - </dictionary> - </state> - </object> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> </value> </item> <item> - <key> <string>__before_traverse__</string> </key> - <value> - <dictionary> - <item> - <key> - <tuple> - <int>99</int> - <string>ERP5 Web Section/connection</string> - </tuple> - </key> - <value> - <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> - </value> - </item> - </dictionary> - </value> - </item> - <item> - <key> <string>_identity_criterion</string> </key> + <key> <string>_mt_index</string> </key> <value> <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> </value> </item> <item> - <key> <string>_range_criterion</string> </key> + <key> <string>_tree</string> </key> <value> <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent> </value> </item> <item> - <key> <string>categories</string> </key> - <value> - <tuple> - <string>caching_policy/no-cache</string> - </tuple> - </value> + <key> <string>content_md5</string> </key> + <value> <string>85b2e0cef64f374f3540fca9e446fb3e</string> </value> </item> <item> - <key> <string>container_layout</string> </key> - <value> <string>WebSection_renderDefaultPageAsGadget</string> </value> + <key> <string>content_type</string> </key> + <value> <string>image/png</string> </value> </item> <item> - <key> <string>content_layout</string> </key> - <value> <string>WebSection_renderDefaultPageAsGadget</string> </value> - </item> - <item> - <key> <string>custom_render_method_id</string> </key> - <value> <string>WebSection_renderDefaultPageAsGadget</string> </value> + <key> <string>default_reference</string> </key> + <value> <string>gadget_erp5_afs_logo.png</string> </value> </item> <item> <key> <string>description</string> </key> @@ -147,20 +100,24 @@ </value> </item> <item> - <key> <string>empty_criterion_valid</string> </key> - <value> <int>0</int> </value> + <key> <string>filename</string> </key> + <value> <string>afs_logo.png</string> </value> + </item> + <item> + <key> <string>height</string> </key> + <value> <int>150</int> </value> </item> <item> <key> <string>id</string> </key> - <value> <string>connection</string> </value> + <value> <string>gadget_erp5_afs_logo_png</string> </value> </item> <item> - <key> <string>layout_configuration_form_id</string> </key> - <value> <string>WebSection_viewRenderJSPreference</string> </value> + <key> <string>language</string> </key> + <value> <string>en</string> </value> </item> <item> <key> <string>portal_type</string> </key> - <value> <string>Web Section</string> </value> + <value> <string>Image</string> </value> </item> <item> <key> <string>short_title</string> </key> @@ -169,16 +126,16 @@ </value> </item> <item> - <key> <string>skin_selection_name</string> </key> - <value> <string>RJS</string> </value> + <key> <string>title</string> </key> + <value> <string>AFS Logo</string> </value> </item> <item> - <key> <string>title</string> </key> - <value> <string>Connection</string> </value> + <key> <string>version</string> </key> + <value> <string>001</string> </value> </item> <item> - <key> <string>visible</string> </key> - <value> <int>0</int> </value> + <key> <string>width</string> </key> + <value> <int>300</int> </value> </item> <item> <key> <string>workflow_history</string> </key> @@ -191,40 +148,24 @@ </record> <record id="2" aka="AAAAAAAAAAI="> <pickle> - <global name="WebSectionTraversalHook" module="Products.ERP5.Document.WebSection"/> - </pickle> - <pickle> - <dictionary/> + <global name="Length" module="BTrees.Length"/> </pickle> + <pickle> <int>0</int> </pickle> </record> <record id="3" aka="AAAAAAAAAAM="> <pickle> - <global name="PersistentMapping" module="Persistence.mapping"/> + <global name="OOBTree" module="BTrees.OOBTree"/> </pickle> <pickle> - <dictionary> - <item> - <key> <string>data</string> </key> - <value> - <dictionary/> - </value> - </item> - </dictionary> + <none/> </pickle> </record> <record id="4" aka="AAAAAAAAAAQ="> <pickle> - <global name="PersistentMapping" module="Persistence.mapping"/> + <global name="OOBTree" module="BTrees.OOBTree"/> </pickle> <pickle> - <dictionary> - <item> - <key> <string>data</string> </key> - <value> - <dictionary/> - </value> - </item> - </dictionary> + <none/> </pickle> </record> <record id="5" aka="AAAAAAAAAAU="> @@ -238,7 +179,7 @@ <value> <dictionary> <item> - <key> <string>category_publication_workflow</string> </key> + <key> <string>document_publication_workflow</string> </key> <value> <persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent> </value> @@ -266,9 +207,7 @@ <dictionary> <item> <key> <string>action</string> </key> - <value> - <none/> - </value> + <value> <string>publish_alive</string> </value> </item> <item> <key> <string>actor</string> </key> @@ -294,7 +233,7 @@ </tuple> <state> <tuple> - <float>1472632323.87</float> + <float>1496062819.91</float> <string>UTC</string> </tuple> </state> @@ -303,7 +242,7 @@ </item> <item> <key> <string>validation_state</string> </key> - <value> <string>embedded</string> </value> + <value> <string>published_alive</string> </value> </item> </dictionary> </list> @@ -330,7 +269,7 @@ <item> <key> <string>comment</string> </key> <value> - <persistent> <string encoding="base64">AAAAAAAAAAg=</string> </persistent> + <none/> </value> </item> <item> @@ -339,7 +278,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>0.0.0.0</string> </value> + <value> <string>959.45196.21805.13124</string> </value> </item> <item> <key> <string>state</string> </key> @@ -357,7 +296,7 @@ </tuple> <state> <tuple> - <float>1472632323.88</float> + <float>1496062840.28</float> <string>UTC</string> </tuple> </state> @@ -369,36 +308,4 @@ </tuple> </pickle> </record> - <record id="8" aka="AAAAAAAAAAg="> - <pickle> - <global name="Message" module="Products.ERP5Type.Message"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>default</string> </key> - <value> <string>Object copied from ${source_item}</string> </value> - </item> - <item> - <key> <string>domain</string> </key> - <value> <string>erp5_ui</string> </value> - </item> - <item> - <key> <string>mapping</string> </key> - <value> - <dictionary> - <item> - <key> <string>source_item</string> </key> - <value> <string>/erp5/web_site_module/renderjs_runner</string> </value> - </item> - </dictionary> - </value> - </item> - <item> - <key> <string>message</string> </key> - <value> <string>Object copied from ${source_item}</string> </value> - </item> - </dictionary> - </pickle> - </record> </ZopeData> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_appcache.xml b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_appcache.xml index 909b284d16b28e263abefe9d5edffe6c50465006..92cb26d6367d3499e75a99fa3f0992bfde6cd8cf 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_appcache.xml +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_appcache.xml @@ -103,97 +103,40 @@ </item> <item> <key> <string>text_content</string> </key> - <value> <string>CACHE MANIFEST\n -# generated on Wed, 28 Jun 2017 15:50:00 GMT .\n + <value> <string encoding="cdata"><![CDATA[ + +CACHE MANIFEST\n +# generated on Mon, 30 May 2017 10:00:00 GMT\n # images/ajax-loader.gif\n CACHE:\n +font-awesome/font-awesome-webfont.eot?v=4.6.3\n +font-awesome/font-awesome-webfont.eot?#iefix&v=4.6.3\n +font-awesome/font-awesome-webfont.woff?v=4.6.3\n +font-awesome/font-awesome-webfont.ttf?v=4.6.3\n +font-awesome/font-awesome-webfont.svg?v=4.6.3#fontawesomeregular\n +favicon.ico\n +gadget_erp5_afs_camera.png?format=png\n +gadget_erp5_afs_logo.png?format=png\n URI.js\n erp5_launcher_nojqm.js\n gadget_erp5_nojqm.css\n gadget_erp5_editor_panel.html\n gadget_erp5_editor_panel.js\n -gadget_erp5_field_checkbox.html\n -gadget_erp5_field_checkbox.js\n -gadget_erp5_field_datetime.html\n -gadget_erp5_field_datetime.js\n -gadget_erp5_field_email.html\n -gadget_erp5_field_email.js\n -gadget_erp5_field_file.html\n -gadget_erp5_field_file.js\n -gadget_erp5_field_float.html\n -gadget_erp5_field_float.js\n -gadget_erp5_field_gadget.html\n -gadget_erp5_field_gadget.js\n -gadget_erp5_field_image.html\n -gadget_erp5_field_image.js\n -gadget_erp5_field_integer.html\n -gadget_erp5_field_integer.js\n -gadget_erp5_field_list.html\n -gadget_erp5_field_list.js\n gadget_erp5_field_listbox.html\n gadget_erp5_field_listbox.js\n -gadget_erp5_field_multicheckbox.html\n -gadget_erp5_field_multicheckbox.js\n -gadget_erp5_field_multilist.html\n -gadget_erp5_field_multilist.js\n -gadget_erp5_field_multirelationstring.html\n -gadget_erp5_field_multirelationstring.js\n -gadget_erp5_field_radio.html\n -gadget_erp5_field_radio.js\n -gadget_erp5_field_readonly.html\n -gadget_erp5_field_readonly.js\n -gadget_erp5_field_relationstring.html\n -gadget_erp5_field_relationstring.js\n -gadget_erp5_field_string.html\n -gadget_erp5_field_string.js\n -gadget_erp5_field_password.html\n -gadget_erp5_field_password.js\n -gadget_erp5_field_textarea.html\n -gadget_erp5_field_textarea.js\n gadget_erp5_form.html\n gadget_erp5_form.js\n gadget_erp5_header.html\n gadget_erp5_header.js\n -gadget_erp5_jio.html\n -gadget_erp5_jio.js\n -gadget_erp5_page_action.html\n -gadget_erp5_page_action.js\n -gadget_erp5_page_form.html\n -gadget_erp5_page_form.js\n -gadget_erp5_page_front.html\n -gadget_erp5_page_front.js\n -gadget_erp5_page_history.html\n -gadget_erp5_page_history.js\n -gadget_erp5_page_jump.html\n -gadget_erp5_page_jump.js\n -gadget_erp5_page_logout.html\n -gadget_erp5_page_logout.js\n -gadget_erp5_page_preference.html\n -gadget_erp5_page_preference.js\n -gadget_erp5_page_relation_search.html\n -gadget_erp5_page_relation_search.js\n -gadget_erp5_page_search.html\n -gadget_erp5_page_search.js\n -gadget_erp5_page_tab.html\n -gadget_erp5_page_tab.js\n -gadget_erp5_page_worklist.html\n -gadget_erp5_page_worklist.js\n -gadget_erp5_panel.html\n -gadget_erp5_panel.js\n -gadget_erp5_pt_form_dialog.html\n -gadget_erp5_pt_form_dialog.js\n +gadget_erp5_global.js\n +gadget_erp5_label_field.html\n +gadget_erp5_label_field.js\n +gadget_erp5_notification.html\n +gadget_erp5_notification.js\n gadget_erp5_pt_form_list.html\n gadget_erp5_pt_form_list.js\n -gadget_erp5_pt_form_view.html\n -gadget_erp5_pt_form_view.js\n -gadget_erp5_pt_form_view_editable.html\n -gadget_erp5_pt_form_view_editable.js\n -gadget_erp5_pt_report_view.html\n -gadget_erp5_pt_report_view.js\n gadget_erp5_router.html\n gadget_erp5_router.js\n -gadget_erp5_relation_input.html\n -gadget_erp5_relation_input.js\n gadget_erp5_search_editor.html\n gadget_erp5_search_editor.js\n gadget_erp5_searchfield.html\n @@ -201,7 +144,8 @@ gadget_erp5_searchfield.js\n gadget_erp5_sort_editor.html\n gadget_erp5_sort_editor.js\n gadget_global.js\n -gadget_erp5_global.js\n +gadget_html5_input.html\n +gadget_html5_input.js\n gadget_jio.html\n gadget_jio.js\n gadget_translation.html\n @@ -213,34 +157,35 @@ renderjs.js\n rsvp.js\n # CUSTOM AFS files\n gadget_erp5_page_afs_success_case.html\n -gadget_erp5_page_afs_publisher.js\n +gadget_erp5_page_afs_success_case.js\n gadget_erp5_page_afs_publisher.html\n +gadget_erp5_page_afs_publisher.js\n gadget_erp5_page_afs_success_case_list.html\n gadget_erp5_page_afs_success_case_list.js\n -gadget_erp5_page_afs_software_list.html\n -gadget_erp5_page_afs_software_list.js\n +gadget_erp5_page_afs_publisher_list.html\n +gadget_erp5_page_afs_publisher_list.js\n +gadget_erp5_page_afs_publisher_statistic.html\n +gadget_erp5_page_afs_publisher_statistic.js\n +gadget_erp5_page_afs_unsplash.html\n +gadget_erp5_page_afs_unsplash.js\n gadget_erp5_page_afs_software.html\n +gadget_erp5_page_afs_software.js\n gadget_erp5_page_afs_directory.html\n gadget_erp5_page_afs_directory.js\n gadget_erp5_afs_jio.html\n +gadget_erp5_afs_jio.js\n gadget_erp5_afs_panel.html\n gadget_erp5_afs_panel.js\n gadget_erp5_afs_router.html\n gadget_erp5_afs_router.js\n -gadget_erp5_afs_jio.js\n -gadget_erp5_page_afs_success_case.js\n -gadget_erp5_page_afs_publisher_list.html\n -gadget_erp5_page_afs_publisher_list.js\n gadget_erp5_afs.css\n -gadget_erp5_afs_publisher_storage.js\n -gadget_erp5_afs_converter_storage.js\n -gadget_erp5_page_afs_software.js\n -gadget_erp5_page_afs_unsplash.js\n -gadget_erp5_page_afs_unsplash.html\n -gadget_erp5_page_afs_publisher_statistic.js\n -gadget_erp5_page_afs_publisher_statistic.html\n +gadget_erp5_afs_storage.js\n +gadget_erp5_page_afs_software_list.html\n +gadget_erp5_page_afs_software_list.js\n NETWORK:\n -*</string> </value> +* + +]]></string> </value> </item> <item> <key> <string>title</string> </key> @@ -361,7 +306,7 @@ NETWORK:\n </item> <item> <key> <string>actor</string> </key> - <value> <string>3</string> </value> + <value> <string>zope</string> </value> </item> <item> <key> <string>comment</string> </key> @@ -375,7 +320,7 @@ NETWORK:\n </item> <item> <key> <string>serial</string> </key> - <value> <string>960.20037.12063.10137</string> </value> + <value> <string>959.46970.48446.4744</string> </value> </item> <item> <key> <string>state</string> </key> @@ -393,7 +338,7 @@ NETWORK:\n </tuple> <state> <tuple> - <float>1498657850.06</float> + <float>1496169745.29</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_converter_storage_js.js b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_converter_storage_js.js deleted file mode 100644 index 9a39e21515655632071eff48baec20405b9cf954..0000000000000000000000000000000000000000 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_converter_storage_js.js +++ /dev/null @@ -1,267 +0,0 @@ -/*jslint indent: 2, nomen: true, maxlen: 80*/ -/*global window, jIO, RSVP, DOMParser, Object */ -(function (window, jIO, RSVP, DOMParser, Object) { - "use strict"; - - // XXX Bad proxy! - var LOC = 'https://softinst56769.host.vifib.net/erp5/web_site_module/afs/', - ID_LOC = "https://raw.githubusercontent.com/", - ID_PATH = "Nexedi/awesome-free-software/master/", - FETCH = "Software_getAnalysis?url=", - PARSER = new DOMParser(); - - function garble(str) { - return window.encodeURIComponent(str.replace(/ /g, "-")); - } - - function isArray(value) { - return Object.prototype.toString.call(value) === '[object Array]'; - } - - function isValidCase(success_case) { - return ( - success_case !== "N/A" && - success_case.title !== "" && - success_case.title !== "N/A" - ); - } - - // only called on repair, convert publisher storage content into records - // of publishers, software and success cases - function convertDataSet(storage, result_list) { - var response = []; - - if (result_list.length === 0) { - return response; - } - - return new RSVP.Queue() - .push(function () { - return RSVP.all(result_list.map(function (item) { - return storage.get(item.id); - })); - }) - .push(function (publisher_list) { - var publisher, - software_list, - software, - success_case_list, - success_case, - i, - j, - k; - - for (i = 0; i < publisher_list.length; i += 1) { - publisher = publisher_list[i]; - - // XXX parallel promises? title is too unreliable as id - publisher.item_id = result_list[i].id.split("/").pop().split(".")[0]; - - // add publisher id - response.push({ - "id": garble(publisher.item_id), - "value": {} - }); - software_list = publisher.free_software_list; - if (isArray(software_list)) { - for (j = 0; j < software_list.length; j += 1) { - software = software_list[j]; - - // add software id - response.push({ - id: garble(publisher.item_id) + "/" + garble(software.title), - value: {} - }); - success_case_list = software.success_case_list; - if (isArray(success_case_list)) { - for (k = 0; k < success_case_list.length; k += 1) { - success_case = success_case_list[k]; - if (isValidCase(success_case)) { - - // add case id - response.push({ - id: garble(publisher.item_id) + "/" + - garble(software.title) + "/" + - garble(success_case.title), - value: {} - }); - } - } - } - } - } - } - return response; - }); - } - - function retrieveOpenHubAnalysisTotalLines(software) { - return new RSVP.Queue() - .push(function () { - return jIO.util.ajax({ - type: "GET", - url: LOC + FETCH + software.source_code_profile, - dataType: "text" - }); - }) - .push(function (data) { - var response = data.target.response || data.target.responseText; - return PARSER.parseFromString(response, "text/xml") - .getElementsByTagName("total_code_lines")[0].childNodes[0].nodeValue; - }); - } - - function isValidProfileUrl(url) { - return url && url !== "" && url.indexOf("hub") > -1; - } - - function isInt(value) { - return !isNaN(value) && (function (x) { - if ((x | 0) === x) { - return x; - } - return 0; - })(parseFloat(value)); - } - - function totalLines(arr) { - return arr.reduce(function (running_total, line) { - return running_total += isInt(line); - }, 0); - } - - function retrieveTotalLinesFromPublisher(publisher) { - var unique_software_list = []; - return new RSVP.Queue() - .push(function () { - return RSVP.all(publisher.free_software_list.map(function (software) { - var profile_url = software.source_code_profile; - if (isValidProfileUrl(profile_url)) { - if (unique_software_list.indexOf(profile_url) === -1) { - unique_software_list.push(profile_url); - return retrieveOpenHubAnalysisTotalLines(software); - } - } - }).filter(Boolean)); - }) - .push(function (line_list) { - return totalLines(line_list); - }); - } - - function retrieveSuccessCaseFromSoftware(publisher, path_list) { - return publisher.free_software_list.reduce(function (response, software) { - var software_title = garble(software.title); - if (software_title === path_list[1]) { - if (isArray(software.success_case_list)) { - return software.success_case_list.reduce(function (response, item) { - var case_title = garble(item.title); - if (case_title === path_list[2]) { - item.portal_type = "success_case"; - item.software = software.title; - item.software_website = software.website; - item.publisher = software.publisher; - item.publisher_website = software.website; - item.category_list = software.category_list; - item.uid = case_title; - return item; - } - return response; - }); - } - } - return response; - }, undefined); - } - - function retrieveSoftwareFromPublisher(publisher, path_list) { - return publisher.free_software_list.reduce(function (response, software) { - var software_title = garble(software.title); - if (software_title === path_list[1]) { - software.portal_type = "software"; - software.publisher = publisher.title; - software.publisher_website = publisher.website; - software.uid = garble(publisher.title) + "/" + software_title; - return software; - } - return response; - }, undefined); - } - - // find and assemble single object from publisher entries - function convertDataItem(storage, id) { - var path_list = id.split("/"), - path_len = path_list.length, - publisher; - - return new RSVP.Queue() - .push(function () { - return new RSVP.Queue() - .push(function () { - return storage.get(ID_LOC + ID_PATH + path_list[0] + ".json"); - }) - .push(function (result) { - if (path_len === 1) { - return RSVP.all([ - result, - retrieveTotalLinesFromPublisher(result) - ]); - } - return [result]; - }); - }) - .push(function (result_list) { - var response; - - publisher = result_list[0]; - publisher.portal_type = "publisher"; - publisher.uid = garble(publisher.title); - publisher.total_lines = result_list[1] || 0; - - if (path_len === 1) { - response = publisher; - } else if (path_len === 2) { - response = retrieveSoftwareFromPublisher(publisher, path_list); - } else if (path_len === 3) { - response = retrieveSuccessCaseFromSoftware(publisher, path_list); - } - return response; - }) - .push(null, function (error) { - console.log(error); - throw error; - }); - } - - function ConverterStorage(spec) { - this._sub_storage = jIO.createJIO(spec.sub_storage); - } - - ConverterStorage.prototype.get = function (id) { - return convertDataItem(this._sub_storage, id); - }; - - ConverterStorage.prototype.repair = function () { - return this._sub_storage.repair.apply(this._sub_storage, arguments); - }; - - ConverterStorage.prototype.hasCapacity = function (name) { - return (name === "list"); - }; - - ConverterStorage.prototype.buildQuery = function () { - var storage = this._sub_storage, - argument_list = arguments; - - return new RSVP.Queue() - .push(function () { - return storage.buildQuery.apply(storage, argument_list); - }) - .push(function (result) { - return convertDataSet(storage, result); - }); - }; - - jIO.addStorage('converter_storage', ConverterStorage); - -}(window, jIO, RSVP, DOMParser, Object)); diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_css.css b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_css.css index 1783ee663762b8df09edf4aa73b170ed64a89f08..69e65526fad939451606e2d6281819881b8efe56 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_css.css +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_css.css @@ -273,34 +273,6 @@ } } -/* - ------------------------------------------------------------------------- - ------------------------- OPENHUB ATTRIBUTION --------------------------- - ------------------------------------------------------------------------- -*/ -div[data-gadget-scope='panel'] ul li a:first-child:nth-last-child(2) { - display: inline-block; - width: 62%; - vertical-align: middle; -} -div[data-gadget-scope='panel'] ul li a:first-child:nth-last-child(2) ~ a { - display: inline-block; - width: 33%; - vertical-align: middle; - margin: 0; - padding: 0; -} -div[data-gadget-scope='panel'] ul li a:first-child:nth-last-child(2) ~ a img { - height: 100%; - width: 80px; - margin: 0; - padding: 0; -} -div[data-gadget-scope='panel'] ul li a:first-child:nth-last-child(2) ~ a:hover, -div[data-gadget-scope='panel'] ul li a:first-child:nth-last-child(2) ~ a:active { - background-color: inherit; -} - /* ------------------------------------------------------------------------- -------------------------- UNSPLASH BANNER ------------------------------ @@ -322,7 +294,7 @@ div[data-gadget-scope='panel'] ul li a:first-child:nth-last-child(2) ~ a:active .ui-banner-section img { /* max-height: 100%; */ max-width: 100%; - width: 100%; + width: auto; height: auto; position: absolute; top: 0; @@ -336,13 +308,13 @@ div[data-gadget-scope='panel'] ul li a:first-child:nth-last-child(2) ~ a:active .ui-banner-section span { position: absolute; bottom: 0; - right: 2em; + right: 0; color: white; font-size: small; padding: 0 .5em .25em 0; } .ui-banner-section span a { - color: #fff; + color: rgb(153, 153, 153); } .ui-banner-section h1 { position: absolute; diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_css.xml b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_css.xml index 1dc4eb927232c129ba556ee51deba97294df0516..4105c0d69cea7950ce2e41a80cc4798f6771db29 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_css.xml +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_css.xml @@ -234,7 +234,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>960.20124.44127.50739</string> </value> + <value> <string>959.36825.37639.35106</string> </value> </item> <item> <key> <string>state</string> </key> @@ -252,7 +252,7 @@ </tuple> <state> <tuple> - <float>1498491332.93</float> + <float>1495561064.3</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_jio_html.html b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_jio_html.html index 1b33972c625fc4683dd6ad80ebf143baba810b3e..13b960dc0ca299ba73d3fdc5c3546baf8abdcdbb 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_jio_html.html +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_jio_html.html @@ -1,17 +1,19 @@ <!Doctype html> <html> <head> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Jio Gadget</title> - <script src="rsvp.js"></script> - <script src="renderjs.js"></script> - <script src="jiodev.js"></script> + <!-- renderjs --> + <script src="rsvp.js" type="text/javascript"></script> + <script src="renderjs.js" type="text/javascript"></script> + + <script src="jiodev.js" type="text/javascript"></script> + + <script src="gadget_erp5_afs_storage.js" type="text/javascript"></script> + <script src="gadget_erp5_afs_jio.js" type="text/javascript"></script> - <script src="gadget_erp5_afs_publisher_storage.js"></script> - <script src="gadget_erp5_afs_converter_storage.js"></script> - <script src="gadget_erp5_afs_jio.js"></script> </head> <body> <div data-gadget-url='gadget_jio.html' data-gadget-scope='jio'></div> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_jio_html.xml b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_jio_html.xml index 4ecf1ef210f0805d74baf60e70e95348fa398676..bc1e8f8cb13fdf42e74bd4256569a09e5d03db93 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_jio_html.xml +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_jio_html.xml @@ -232,7 +232,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>960.24363.10114.40618</string> </value> + <value> <string>959.35277.2835.34423</string> </value> </item> <item> <key> <string>state</string> </key> @@ -250,7 +250,7 @@ </tuple> <state> <tuple> - <float>1498744996.96</float> + <float>1495467687.67</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_jio_js.js b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_jio_js.js index b7940cd7d63e9d400fee2dfc1907ca2ea1b9bd61..e4d5e7c52b28182691dba17d168ebc5c7028305a 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_jio_js.js +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_jio_js.js @@ -1,34 +1,60 @@ -/*global window, rJS */ -/*jslint indent: 2, nomen: true, maxlen: 80*/ -(function (window, rJS) { +/*global window, rJS, RSVP, + jIO, DOMParser */ +/*jslint indent: 2, maxerr: 3, nomen: true */ +(function (window, rJS, RSVP) { "use strict"; - ///////////////////////////////////////////////////////////////// - // some methods - ///////////////////////////////////////////////////////////////// + var DIRTY_OLOH_LOOKUP_UNTIL_API_WORKS = { + "https://www.openhub.net/p/alfresco/analyses/latest/languages_summary": 62894263, + "https://www.openhub.net/p/swift-lang/analyses/latest/languages_summary": 755449, + "https://www.openhub.net/p/bluemind/analyses/latest/languages_summary": 857795, + "https://www.openhub.net/p/drupalcommerce/analyses/latest/languages_summary": 49743, + "https://www.openhub.net/p/obm/analyses/latest/languages_summary": 363914, + "https://www.openhub.net/p/linshare/analyses/latest/languages_summary": 185407, + "https://www.openhub.net/p/linid-directory-manager/analyses/latest/languages_summary": 725443, + "https://www.openhub.net/p/openpaas/analyses/latest/languages_summary": 228875, + "https://www.openhub.net/p/magento/analyses/latest/languages_summary": 13507099, + "https://www.openhub.net/p/mariadb/analyses/latest/languages_summary": 3163137, + "https://www.openhub.net/p/vscode/analyses/latest/languages_summary": 106972, + "https://www.openhub.net/p/mongodb/analyses/latest/languages_summary": 1734408, + "https://www.openhub.net/p/erp5/analyses/latest/languages_summary": 11685522, + "https://www.openhub.net/p/SlapOS/analyses/latest/languages_summary": 583328, + "https://www.openhub.net/p/wendelin/analyses/latest/languages_summary": 123904, + "https://www.openhub.net/p/renderjs/analyses/latest/languages_summary": 52261, + "https://www.openhub.net/p/odoo/analyses/latest/languages_summary": 2492373, + "https://www.openhub.net/p/mondrian/analyses/latest/languages_summary": 1319124, + "https://www.openhub.net/p/PrestaShop/analyses/latest/languages_summary": 539680, + "https://www.openhub.net/p/symfony/analyses/latest/languages_summary": 1480506, + "https://www.openhub.net/p/php-twig/analyses/latest/languages_summary": 22572, + "https://www.openhub.net/p/fabpots_Silex/analyses/latest/languages_summary": 11586, + "https://www.openhub.net/p/talend-studio/analyses/latest/languages_summary": 287512, + "https://www.openhub.net/p/xwiki/analyses/latest/languages_summary": 7909332 + }; - // XXX: the two methods below should be inside jiodev + // XXX... lord have mercy function mockupQueryParam(param, select_list) { - var wild_param = param.replace(/[()]/g, "%").replace(/ /g, ''); - return ' (' + select_list.map(function (key) { - return key + ':"' + wild_param + '"'; - }).join(' OR ') + ')'; + var wild_param = param.replace(/[()]/g, "%").replace(/ /g, ''), + return_list = [], + len, + i; + for (i = 0, len = select_list.length; i < len; i += 1) { + return_list.push(select_list[i] + ':"' + wild_param + '"'); + } + return ' (' + return_list.join(' OR ') + ')'; } - function pimpQuery(option_dict) { - var query_param_list = option_dict.query.split("AND"), - query = option_dict.query, - key_list = option_dict.select_list || [], + // XXX... lord, I need more mercy + function updateQuery(query, select_list) { + var query_param_list = query.split("AND"), param, len, i; - for (i = 0, len = query_param_list.length; i < len; i += 1) { param = query_param_list[i]; // search if (param.split(":").length !== 2) { - return query.replace(param, mockupQueryParam(param, key_list)); + return query.replace(param, mockupQueryParam(param, select_list)); } // hide rows @@ -39,73 +65,275 @@ return query; } + function createDataSheets(gadget) { + gadget.jio_allDocs = gadget.state_parameter_dict.jio_storage.allDocs; + gadget.jio_get = gadget.state_parameter_dict.jio_storage.get; + gadget.jio_put = gadget.state_parameter_dict.jio_storage.put; + + return gadget.jio_allDocs() + + ///////////////////////////////////////////////////////////////// + // Make Publisher datasheets + ///////////////////////////////////////////////////////////////// + .push(function (data) { + var uid = 0, + publisher_id_list, + promise_list; +/* + function isReplicate(el) { + return (el.id.indexOf("_replicate_") < 0); + } +*/ + function setPortalTypeOnPublisher(el) { + return gadget.jio_get(el.id) + .push(function (publisher_object) { + publisher_object.portal_type = "publisher"; + + //publisher_object.url = publisher_object.website; + uid += 1; + publisher_object.uid = uid.toString(); + + return gadget.jio_put(publisher_object.uid, publisher_object); + }); + } + + publisher_id_list = data.data.rows; + promise_list = publisher_id_list.map(setPortalTypeOnPublisher); + + return RSVP.all(promise_list); + }) + .push(function () { + return gadget.jio_allDocs({ + select_list: ['title', 'free_software_list', 'website', 'lines'], + query: 'portal_type: "publisher"' + }); + }) + ///////////////////////////////////////////////////////////////// + // Create Statistic Sheets + ///////////////////////////////////////////////////////////////// + .push(function (result_list) { + var publisher_list = result_list.data.rows, + statistic_list = [], + i_len = publisher_list.length, + i; + + // OPENHUB LOOKUP? + // curl https://www.openhub.net/projects/{project_id}/analyses/latest.xml + + function createStatisticSheet(my_publisher_row) { + var software_list = my_publisher_row.value.free_software_list, + j_len = software_list.length, + profile_url, + software_analysis, + software_analysis_list = [], + j; + + for (j = 0; j < j_len; j += 1) { + profile_url = software_list[j].source_code_profile; + if (profile_url && profile_url !== "") { + + // more yuck + software_analysis = DIRTY_OLOH_LOOKUP_UNTIL_API_WORKS[profile_url]; + delete DIRTY_OLOH_LOOKUP_UNTIL_API_WORKS[profile_url]; + //software_analysis = jIO.util.ajax({ + // type: "GET", + // "url": profile_url.replace("/languages_summary", ".xml") + //}); + // prevent multiple entries into calculation + } + software_analysis_list.push(software_analysis || 0); + } + + return new RSVP.Queue() + .push(function () { + return RSVP.all(software_analysis_list); + }) + .push(function (my_stat_list) { + var line_total = 0, + k_len = my_stat_list.length, + k; + for (k = 0; k < k_len; k += 1) { + if (my_stat_list[k]) { + // xml = parser.parseFromString(my_stat_list[k],"text/xml"); + //line_total += xml.getElementsByTagName("total_code_lines")[0] + // .childNodes[0].nodeValue; + line_total += my_stat_list[k]; + } + } + // actually we need to store this... + return new RSVP.Queue() + .push(function () { + return gadget.jio_get(my_publisher_row.id); + }) + .push(function (my_publisher) { + my_publisher.lines = line_total; + // my_publisher_row.value.lines = line_total.toString(); + return gadget.jio_put(my_publisher.uid, my_publisher); + }); + }); + } + + for (i = 0; i < i_len; i += 1) { + statistic_list.push(createStatisticSheet(publisher_list[i])); + } + + return new RSVP.Queue() + .push(function () { + return RSVP.all(statistic_list); + }) + .push(function () { + return result_list; + }); + }) + ///////////////////////////////////////////////////////////////// + // Make Software datasheets + ///////////////////////////////////////////////////////////////// + .push(function (publisher_list) { + var uid = 2000, + save_software_promise_list, + publishers, + promise_list; + + function saveSoftwareListFromPublisher(j) { + var publisher = j.value.title, + software_list = j.value.free_software_list, + website = j.value.website; + + function saveSoftwareDocument(software) { + software.portal_type = "software"; + software.publisher = publisher; + software.publisher_website = website; + uid += 1; + software.uid = uid.toString(); + + return gadget.jio_put(software.uid, software); + } + + save_software_promise_list = software_list.map(saveSoftwareDocument); + + return RSVP.all(save_software_promise_list); + } + + publishers = publisher_list.data.rows; + promise_list = publishers.map(saveSoftwareListFromPublisher); + + return RSVP.all(promise_list); + }) + .push(function () { + return gadget.jio_allDocs({ + select_list: [ + 'title', + 'website', + 'success_case_list', + 'publisher', + 'category_list' + ], + query: 'portal_type: "software"' + }); + }) + ///////////////////////////////////////////////////////////////// + // Make Success Case datasheets + ///////////////////////////////////////////////////////////////// + .push(function (software_list) { + var uid = 3000, + softwares, + promise_list; + + function saveSuccessCaseListFromSoftware(softwareObject) { + var software = softwareObject.value, + publisher = softwareObject.value.publisher, + website = softwareObject.value.website, + success_case_list = softwareObject.value.success_case_list, + save_success_case_promise_list; + + function isValid(success_case) { + return (success_case !== "N/A" && + success_case.title !== "" && + success_case.title !== "N/A"); + } + + function addProperties(success_case) { + success_case.portal_type = "success_case"; + success_case.software = software.title; + success_case.software_website = software.website; + success_case.publisher = publisher; + success_case.publisher_website = website; + success_case.category_list = software.category_list; + uid += 1; + success_case.uid = uid.toString(); + return gadget.jio_put(success_case.uid, success_case); + } + + save_success_case_promise_list = + success_case_list.filter(isValid) + .map(addProperties); + + return RSVP.all(save_success_case_promise_list); + } + + softwares = software_list.data.rows.filter(function (sw) { + return (sw.value.success_case_list !== "N/A"); + }); + promise_list = softwares.map(saveSuccessCaseListFromSoftware); + + return RSVP.all(promise_list); +/* + }) + .push(undefined, function (error) { + console.log(error); +*/ + }); + } + rJS(window) - ///////////////////////////////////////////////////////////////// - // ready - ///////////////////////////////////////////////////////////////// .ready(function (gadget) { - - // not so nice... return gadget.getDeclaredGadget('jio') .push(function (jio_gadget) { - gadget.state_parameter_dict = {"jio_storage": jio_gadget}; + // Initialize the gadget local parameters + gadget.state_parameter_dict = {jio_storage: jio_gadget}; }); }) - ///////////////////////////////////////////////////////////////// - // acquired methods - ///////////////////////////////////////////////////////////////// .declareAcquiredMethod('getSetting', 'getSetting') .declareAcquiredMethod('redirect', 'redirect') .declareAcquiredMethod('getUrlFor', 'getUrlFor') - ///////////////////////////////////////////////////////////////// - // declared methods - ///////////////////////////////////////////////////////////////// .declareMethod('createJio', function () { var gadget = this; - - gadget.state_parameter_dict.jio_storage.createJio({ - "type": "replicate", - "check_local_modification": false, - "check_local_creation": false, - "check_local_deletion": false, - "local_sub_storage": { - "type": "query", - "sub_storage": {type: "memory"} - }, - "remote_sub_storage": { - "type": "query", - "sub_storage": { - "type": "converter_storage", - "sub_storage": { - "type": "replicate", - "check_local_modification": false, - "check_local_creation": false, - "check_local_deletion": false, - "local_sub_storage": { - "type": "query", - "sub_storage": {type: "memory"} - }, - "remote_sub_storage": { - "type": "query", - "sub_storage": { - type: "publisher_storage", - url: "/" - } + return new RSVP.Queue() + .push(function () { + return gadget.state_parameter_dict.jio_storage.createJio({ + check_local_modification: false, + check_local_creation: false, + check_local_deletion: false, + parallel_operation_amount: 100, + type: "replicate", + local_sub_storage : { + type: "query", + sub_storage: { + type: "memory" + } + }, + remote_sub_storage : { + type: "query", + sub_storage: { + type: "publisher_storage", + url: "/" } } - } - } - }); - return gadget.state_parameter_dict.jio_storage.repair(); + }) + .push(function () { + return gadget.state_parameter_dict.jio_storage.repair(); + }) + .push(function () { + return createDataSheets(gadget); + }); + }); }) .declareMethod('allDocs', function (option_dict) { - if (option_dict && option_dict.query) { - option_dict.query = pimpQuery(option_dict); - } + option_dict.query = updateQuery(option_dict.query, option_dict.select_list); return this.state_parameter_dict.jio_storage.allDocs(option_dict); }) .declareMethod('getAttachment', function (id, view) { @@ -120,5 +348,4 @@ .declareMethod('repair', function () { return this.state_parameter_dict.jio_storage.repair(); }); - -}(window, rJS)); +}(window, rJS, RSVP)); \ No newline at end of file diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_jio_js.xml b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_jio_js.xml index c805edf88fd827980d732797e84f669c74eb60da..f198efe724e8e340a5aeb30cbb1e7309c6df8ba5 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_jio_js.xml +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_jio_js.xml @@ -97,7 +97,7 @@ </item> <item> <key> <string>title</string> </key> - <value> <string>Gadget AFS JIO JS</string> </value> + <value> <string>Gadget AFS Storage JS</string> </value> </item> <item> <key> <string>version</string> </key> @@ -214,7 +214,7 @@ </item> <item> <key> <string>actor</string> </key> - <value> <string>3</string> </value> + <value> <string>zope</string> </value> </item> <item> <key> <string>comment</string> </key> @@ -228,7 +228,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>960.24361.33104.43502</string> </value> + <value> <string>959.45138.58632.4420</string> </value> </item> <item> <key> <string>state</string> </key> @@ -246,7 +246,7 @@ </tuple> <state> <tuple> - <float>1498810373.32</float> + <float>1496066128.63</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_panel_html.html b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_panel_html.html index e706b777961116928ca86dfd85ba28f0d5a7c60c..29cb283286645442801c916d649f3f9682193045 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_panel_html.html +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_panel_html.html @@ -1,16 +1,15 @@ <!Doctype html> <html> <head> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Panel</title> - <script src="rsvp.js"></script> - <script src="renderjs.js"></script> - <script src="handlebars.js"></script> - <script src="gadget_global.js"></script> - - <script src="gadget_erp5_afs_panel.js" type="text/javascript"></script> + <!-- renderjs --> + <script src="rsvp.js" type="text/javascript"></script> + <script src="renderjs.js" type="text/javascript"></script> + <script src="handlebars.js" type="text/javascript"></script> + <script src="gadget_global.js" type="text/javascript"></script> <script id="panel-template-header" type="text/x-handlebars-template"> <div data-role="header" class="ui-bar-inherit"> @@ -20,7 +19,7 @@ </div> </div> <div class="panel_img"> - <img class="ui-title" alt="AFS" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACWCAYAAABkW7XSAAAZbElEQVR4Xu1de/h21Zi+7xJDJYzOR2lSSCpCxUwoQ0mlIhqdjHOpTDUlRcVIOVQMmhw6Mo6FDiiXKTklIZKkA8ZxGqKMMuN23bW+5vvq977vXmvv/e693/d5rqurP77nWevZ91q/+917redAhAQCgUAgMBAEOBA/w81AIBAIBBCEFZsgEAgEBoNAENZgliocDQQCgSCs2AOBQCAwGASCsAazVOFoIBAIBGHFHggEAoHBIBCENZilCkcDgUAgCCv2QCAQCAwGgSCswSxVOBoIBAJBWLEHAoFAYDAIBGENZqnC0UAgEAjCij0QCAQCg0EgCGswSxWOBgKBQBBW7IFAIBAYDAJBWINZqnA0EAgEgrBiDwQCgcBgEAjCGsxShaOBQCAQhBV7IBAIBAaDQBDWYJYqHA0EAoEgrNgDgcAUEJC0LIDHA9gcwN8AWAfAWgBWAPCA9J8A3AHgT+n/vwPw3wBuBvBfAG4CcAOA6wF8n+QvpuB6r6YIwqq4HJLeD2DvxdQPIXl8RfNQm0MEJD0cwM4AdkpEtXTDMPwngCsAfAnA+SS/1/D4vRsuCKvCkkhaDsDPAfj/i+Q7JDeu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JcrNA1slwwrkQOJlkpzScIqwTeO6tcbJXegncE4OT1acnVAN4P4LRZiFovAa0vhOW2VY4qLpEbc85tSiaYto2kfWp8flxXtf14KrNbUhv+mqEn0Taxpulz8SkAtkn5f67iuUwTY6cxfDblDIYL/N+8vU0thGMvCKvBBY6hAoHOEEhllH1A/6h0UL+2A3rTf2424rdm34K7v6bjBn1Z5P+7NI3PoPzfjwF8D4DPdH8064fouYsVhJWLWOgHAoFAZwgEYXUGfUwcCAQCuQgEYeUiFvqBQCDQGQJBWJ1BHxMHAoFALgJBWLmIhX4gEAh0hkAQVmfQx8SBQCCQi0AQVi5ioR8IBAKdIRCE1Rn0MXEgEAjkIhCElYtY6AcCgUBnCARhdQZ9TBwIBAK5CARh5SIW+oFAINAZAkFYnUEfEwcCgUAuAkFYuYiFfiAQCHSGQBBWZ9DHxIFAIJCLQBBWLmKhHwgEAp0hEITVGfQxcSAQCOQiEISVi1joBwKBQGcIBGF1Bn1MHAgEArkIBGHlIhb6gUAg0BkCQVidQR8TBwKBQC4CfwF3/pAPM93hZgAAAABJRU5ErkJggg==" /> + <img class="ui-title" alt="AFS" src="gadget_erp5_afs_logo.png?format=png" /> </div> <!--div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-right"> <div class="ui-controlgroup-controls"> @@ -34,10 +33,7 @@ <div class="ui-content"> <ul data-role="listview" class="ui-listview" data-enhanced="true"> <li class="ui-first-child"><a href="{{directory_href}}" class="ui-btn ui-btn-icon-left ui-icon-table" data-i18n="Directory" accesskey="d">Directory</a></li> - <li> - <a href="{{publisher_statistic_href}}" class="ui.btn ui-btn-icon-left ui-icon-trophy" data-i18n="Statistics" accesskey="t">Statistics</a> - <a href ="https://www.openhub.net"><img src="https://www.openhub.net/images/badges/mini.gif" /></a> - </li> + <li><a href="{{publisher_statistic_href}}" class="ui.btn ui-btn-icon-left ui-icon-trophy" data-i18n="Statistics" accesskey="t">Statistics</a></li> <li><a href="{{publisher_href}}" class="ui-btn ui-btn-icon-left ui-icon-university" data-i18n="Publishers" accesskey="a">Publishers</a></li> <li><a href="{{software_href}}" class="ui-btn ui-btn-icon-left ui-icon-cube" data-i18n="Software Products" accesskey="p">Software Products</a></li> <li class="ui-last-child"><a href="{{success_case_href}}" class="ui-btn ui-btn-icon-left ui-icon-book" data-i18n="Success Cases" accesskey="s">Success Cases</a></li> @@ -70,6 +66,10 @@ </ul> </div> </script> + + <!-- custom script --> + <script src="gadget_erp5_afs_panel.js" type="text/javascript"></script> + </head> <body> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_panel_html.xml b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_panel_html.xml index 327fb04aaef4a82e9e29c21efda1b414800f0017..5f93587e70507a821c01ee29c01186019b3c4cd3 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_panel_html.xml +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_panel_html.xml @@ -218,7 +218,7 @@ </item> <item> <key> <string>actor</string> </key> - <value> <string>3</string> </value> + <value> <string>zope</string> </value> </item> <item> <key> <string>comment</string> </key> @@ -232,7 +232,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>960.20109.14881.10990</string> </value> + <value> <string>959.46970.48446.4744</string> </value> </item> <item> <key> <string>state</string> </key> @@ -250,7 +250,7 @@ </tuple> <state> <tuple> - <float>1498657650.64</float> + <float>1496169827.24</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_panel_js.js b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_panel_js.js index f0f5aa58c4a07e32630ded9960d3ce2e0442885e..54a68a94c727efa99af942e387291cc92d778ff3 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_panel_js.js +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_panel_js.js @@ -1,55 +1,32 @@ -/*jslint indent: 2, nomen: true, maxlen: 80*/ -/*global window, Node, rJS, Handlebars, RSVP, loopEventListener */ -(function (window, Node, rJS, Handlebars, RSVP, loopEventListener) { +/*jslint nomen: true, indent: 2, maxerr: 3 */ +/*global document, window, rJS, Handlebars, RSVP, loopEventListener, Node */ +(function (document, window, rJS, Handlebars, RSVP, loopEventListener, Node) { "use strict"; ///////////////////////////////////////////////////////////////// - // some variables + // temlates ///////////////////////////////////////////////////////////////// + // Precompile templates while loading the first gadget instance var gadget_klass = rJS(window), source_header = gadget_klass.__template_element - .getElementById("panel-template-header").innerHTML, + .getElementById("panel-template-header") + .innerHTML, panel_template_header = Handlebars.compile(source_header), source_body = gadget_klass.__template_element - .getElementById("panel-template-body").innerHTML, + .getElementById("panel-template-body") + .innerHTML, panel_template_body = Handlebars.compile(source_body); - ///////////////////////////////////////////////////////////////// - // some methods - ///////////////////////////////////////////////////////////////// - function getUrlDict(param) { - return {command: 'display', options: {page: param}}; - } - gadget_klass - - ///////////////////////////////////////////////////////////////// - // state - ///////////////////////////////////////////////////////////////// .setState({ visible: false, desktop: false }) - .onStateChange(function (modification_dict) { - var gadget = this; - - if (modification_dict.hasOwnProperty("visible")) { - if (gadget.state.visible) { - if (!gadget.element.classList.contains('visible')) { - gadget.element.classList.toggle('visible'); - } - } else { - if (gadget.element.classList.contains('visible')) { - gadget.element.classList.remove('visible'); - } - } - } - }) - ////////////////////////////////////////////// - // acquired methods + // acquired method ////////////////////////////////////////////// + .declareAcquiredMethod("translateHtml", "translateHtml") .declareAcquiredMethod("getUrlFor", "getUrlFor") ///////////////////////////////////////////////////////////////// @@ -60,7 +37,6 @@ visible: !this.state.visible }); }) - .declareMethod('close', function () { return this.changeState({ visible: false @@ -68,69 +44,82 @@ }) .declareMethod('render', function () { - var gadget = this; + var g = this; return new RSVP.Queue() .push(function () { return RSVP.all([ - gadget.getUrlFor(getUrlDict("afs_directory")), - gadget.getUrlFor(getUrlDict("afs_publisher_statistic")), - gadget.getUrlFor(getUrlDict("afs_publisher_list")), - gadget.getUrlFor(getUrlDict("afs_software_list")), - gadget.getUrlFor(getUrlDict("afs_success_case_list")) + g.getUrlFor({command: 'display', options: {page: "afs_directory"}}), + g.getUrlFor({command: 'display', options: {page: "afs_publisher_statistic"}}), + g.getUrlFor({command: 'display', options: {page: "afs_publisher_list"}}), + g.getUrlFor({command: 'display', options: {page: "afs_software_list"}}), + g.getUrlFor({command: 'display', options: {page: "afs_success_case_list"}}) ]); }) - .push(function (result_list) { - var content = panel_template_header(); - - content += panel_template_body({ - "directory_href": result_list[0], - "publisher_statistic_href": result_list[1], - "publisher_href": result_list[2], - "software_href": result_list[3], - "success_case_href": result_list[4] - }); - - gadget.element.querySelector("div").innerHTML = content; + .push(function (all_result) { + + // XXX: Customize panel header! + var tmp = panel_template_header() + + panel_template_body({ + "directory_href": all_result[0], + "publisher_statistic_href": all_result[1], + "publisher_href": all_result[2], + "software_href": all_result[3], + "success_case_href": all_result[4] + }); + g.element.querySelector("div").innerHTML = tmp; }); }) + + .onStateChange(function (modification_dict) { + if (modification_dict.hasOwnProperty("visible")) { + if (this.state.visible) { + if (!this.element.classList.contains('visible')) { + this.element.classList.toggle('visible'); + } + } else { + if (this.element.classList.contains('visible')) { + this.element.classList.remove('visible'); + } + } + } + }) + ///////////////////////////////////////////////////////////////// - // declared jobs + // declared services ///////////////////////////////////////////////////////////////// - .declareJob('listenResize', function () { + .onEvent('click', function (evt) { + if ((evt.target.nodeType === Node.ELEMENT_NODE) && + (evt.target.tagName === 'BUTTON')) { + return this.toggle(); + } + }, false, false) - // resize should be only trigger after the render method as displaying - // the panel rely on external gadget (for translation for example) + .declareJob('listenResize', function () { + // resize should be only trigger after the render method + // as displaying the panel rely on external gadget (for translation for example) var result, event, context = this; - function extractSizeAndDispatch() { if (window.matchMedia("(min-width: 85em)").matches) { - return context.changeState({desktop: true}); + return context.changeState({ + desktop: true + }); } - return context.changeState({desktop: false}); + return context.changeState({ + desktop: false + }); } result = loopEventListener(window, 'resize', false, extractSizeAndDispatch); - event = window.document.createEvent("Event"); + event = document.createEvent("Event"); event.initEvent('resize', true, true); window.dispatchEvent(event); return result; }) - ///////////////////////////////////////////////////////////////// - // event handlers - ///////////////////////////////////////////////////////////////// - .onEvent('click', function (evt) { - if ((evt.target.nodeType === Node.ELEMENT_NODE) && - (evt.target.tagName === 'BUTTON')) { - return this.toggle(); - } - }, false, false) - .onEvent('blur', function (evt) { - // XXX Horrible hack to clear the search when focus is lost // This does not follow renderJS design, as a gadget should not touch // another gadget content @@ -139,4 +128,9 @@ } }, true, false); -}(window, Node, rJS, Handlebars, RSVP, loopEventListener)); +}(document, window, rJS, Handlebars, RSVP, loopEventListener, Node)); + + + + + diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_panel_js.xml b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_panel_js.xml index f60dc346e1a7a4c52117fc7b3c0199d4acbe644b..113ca6ff40e42dd25aa704668490be722d1f9195 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_panel_js.xml +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_panel_js.xml @@ -214,7 +214,7 @@ </item> <item> <key> <string>actor</string> </key> - <value> <string>3</string> </value> + <value> <string>zope</string> </value> </item> <item> <key> <string>comment</string> </key> @@ -228,7 +228,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>960.22813.18734.54818</string> </value> + <value> <string>959.45262.19816.34594</string> </value> </item> <item> <key> <string>state</string> </key> @@ -246,7 +246,7 @@ </tuple> <state> <tuple> - <float>1498652069.39</float> + <float>1496066838.57</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_publisher_storage_js.js b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_publisher_storage_js.js deleted file mode 100644 index b4008890a4fa82a39b2e0920dd95267cd425c20c..0000000000000000000000000000000000000000 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_publisher_storage_js.js +++ /dev/null @@ -1,73 +0,0 @@ -/*jslint indent: 2, nomen: true, maxlen: 80*/ -/*global jIO, RSVP, JSON */ -(function (jIO, RSVP, JSON) { - "use strict"; - - var HREF = 'https://api.github.com/repos/', - USER = 'Nexedi', - REPO = 'awesome-free-software', - BRANCH = '/contents/?ref=master'; - - function fetchUrl(option_dict) { - return new RSVP.Queue() - .push(function () { - return jIO.util.ajax(option_dict); - }) - .push(function (data) { - return JSON.parse(data.target.response || data.target.responseText); - }); - } - - function PublisherStorage(spec) { - this._href = spec.href || HREF; - this._user = spec.user || USER; - this._repo = spec.repo || REPO; - this._branch = spec.branch || BRANCH; - this._url = this._href + this._user + '/' + this._repo + this._branch; - } - - PublisherStorage.prototype.get = function (id) { - return new RSVP.Queue() - .push(function () { - return fetchUrl({type: "GET", url: id, dataType: "text"}); - }) - .push(undefined, function (error) { - if ((error.target !== undefined) && (error.target.status === 404)) { - throw new jIO.util.jIOError("Cannot find document", 404); - } - throw error; - }); - }; - - PublisherStorage.prototype.hasCapacity = function (name) { - return (name === "list"); - }; - - PublisherStorage.prototype.buildQuery = function () { - var url = this._url; - return new RSVP.Queue() - .push(function () { - return fetchUrl({"type": "GET", "url": url}); - }) - .push(function (data_list) { - var result_list = [], - len = data_list.length, - data_entry, - i; - - for (i = 0; i < len; i += 1) { - data_entry = data_list[i]; - if (data_entry.path.indexOf(".json") > -1) { - result_list.push({ - id: data_entry.download_url, - value: {} - }); - } - } - return result_list; - }); - }; - - jIO.addStorage('publisher_storage', PublisherStorage); - -}(jIO, RSVP, JSON)); diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_router_html.html b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_router_html.html index fcd61e772b5a2de6a11bc3e20c3dd857a3fb21f7..6c3112ab161b371de93d6d4ae1e9faeaeff783ca 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_router_html.html +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_router_html.html @@ -1,10 +1,11 @@ <!Doctype html> <html> <head> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Router Gadget</title> + <!-- renderjs --> <script src="rsvp.js" type="text/javascript"></script> <script src="renderjs.js" type="text/javascript"></script> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_router_html.xml b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_router_html.xml index 15d68f28b88d94f99b851f3f9d13ac2e90601c34..8f9a2c55fddfa7db0d6c0321bc256142a225497a 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_router_html.xml +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_router_html.xml @@ -238,7 +238,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>959.35277.15921.2798</string> </value> + <value> <string>953.59501.33025.63675</string> </value> </item> <item> <key> <string>state</string> </key> @@ -256,7 +256,7 @@ </tuple> <state> <tuple> - <float>1498657663.98</float> + <float>1495467674.51</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_router_js.js b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_router_js.js index bda4191110feacce7293c06bd22c80541f778a3e..d46305efb40458d161ceee35f088d1f558ebcf41 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_router_js.js +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_router_js.js @@ -1,9 +1,17 @@ -/*jslint indent: 2, nomen: true, maxlen: 80*/ +/*jslint nomen: true, indent: 2, maxerr: 3 */ /*global window, rJS */ (function (window, rJS) { "use strict"; rJS(window) + /* + .ready(function (g) { + return g.getDeclaredGadget("router") + .push(function (my_default_router) { + return my_default_router.start(); + }); + }) + */ ///////////////////////////////////////////////////////////////// // declared methods @@ -54,4 +62,4 @@ }); }); -}(window, rJS)); +}(window, rJS)); \ No newline at end of file diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_router_js.xml b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_router_js.xml index 346424c7640dec373af6597c0a69d90c90f7afa2..569b22dde4502bd375451044f21b5a7bd0cafb85 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_router_js.xml +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_router_js.xml @@ -220,7 +220,7 @@ </item> <item> <key> <string>actor</string> </key> - <value> <string>3</string> </value> + <value> <string>zope</string> </value> </item> <item> <key> <string>comment</string> </key> @@ -234,7 +234,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>960.22683.21993.61064</string> </value> + <value> <string>959.45017.10197.48298</string> </value> </item> <item> <key> <string>state</string> </key> @@ -252,7 +252,7 @@ </tuple> <state> <tuple> - <float>1498644239.26</float> + <float>1496066978.7</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_storage_js.js b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_storage_js.js new file mode 100644 index 0000000000000000000000000000000000000000..e77f928bb514a0046a9e707b2f4e3aeb82c50585 --- /dev/null +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_storage_js.js @@ -0,0 +1,73 @@ +/*jslint indent: 2, nomen: true, maxlen: 120*/ +/*global jIO, RSVP, JSON */ +(function (jIO, RSVP, JSON) { + "use strict"; + + function PublisherStorage(spec) { + + // NOTE: requires Website Layout Configuration CSP modification + // => connect-src 'self' https://raw.githubusercontent.com https://api.github.com data:; + + //https://api.github.com/repos/Nexedi/awesome-free-software + //https://api.github.com/repos/Nexedi/awesome-free-software/contents/?ref=master + //https://api.github.com/repos/Nexedi/awesome-free-software/contents/alfresco.json + //https://raw.githubusercontent.com/Nexedi/awesome-free-software/master/alfresco.json + + this._href = spec.href || 'https://api.github.com/repos/'; + this._user = spec.user || 'Nexedi'; + this._repo = spec.repo || 'awesome-free-software'; + } + + PublisherStorage.prototype.get = function (id) { + return new RSVP.Queue() + .push(function () { + return jIO.util.ajax({type: "GET", url: id, dataType: "text"}); + }) + .push( + function (response) { + return JSON.parse(response.target.response || response.target.responseText); + }, + function (error) { + if ((error.target !== undefined) && + (error.target.status === 404)) { + throw new jIO.util.jIOError("Cannot find document", 404); + } + throw error; + } + ); + }; + + PublisherStorage.prototype.hasCapacity = function (name) { + return (name === "list"); + }; + + PublisherStorage.prototype.buildQuery = function () { + var url = this._href + this._user + '/' + this._repo + '/contents/?ref=master'; + + return new RSVP.Queue() + .push(function () { + return jIO.util.ajax({"type": "GET", "url": url}); + }) + .push(function (data) { + var data_list = JSON.parse(data.target.response || data.target.responseText), + result_list = [], + data_entry, + len, + i; + + for (i = 0, len = data_list.length; i < len; i += 1) { + data_entry = data_list[i]; + if (data_entry.path.indexOf(".json") > -1) { + result_list.push({ + id: data_entry.download_url, + value: {} + }); + } + } + return result_list; + }); + }; + + jIO.addStorage('publisher_storage', PublisherStorage); + +}(jIO, RSVP, JSON)); \ No newline at end of file diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_publisher_storage_js.xml b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_storage_js.xml similarity index 95% rename from bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_publisher_storage_js.xml rename to bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_storage_js.xml index f76a5867e0477937d225492155c3e2cf09871dc7..d55278fa6ea3bbfbb25b680fd7cf82a452ebefde 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_publisher_storage_js.xml +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_storage_js.xml @@ -71,15 +71,15 @@ </item> <item> <key> <string>default_reference</string> </key> - <value> <string>gadget_erp5_afs_publisher_storage.js</string> </value> + <value> <string>gadget_erp5_afs_storage.js</string> </value> </item> <item> <key> <string>description</string> </key> - <value> <string>Custom AFS publisher storage</string> </value> + <value> <string>Custom AFS storage</string> </value> </item> <item> <key> <string>id</string> </key> - <value> <string>gadget_erp5_afs_publisher_storage_js</string> </value> + <value> <string>gadget_erp5_afs_storage_js</string> </value> </item> <item> <key> <string>language</string> </key> @@ -97,7 +97,7 @@ </item> <item> <key> <string>title</string> </key> - <value> <string>Gadget AFS Publisher Storage</string> </value> + <value> <string>Gadget AFS Storage</string> </value> </item> <item> <key> <string>version</string> </key> @@ -214,7 +214,7 @@ </item> <item> <key> <string>actor</string> </key> - <value> <string>3</string> </value> + <value> <string>zope</string> </value> </item> <item> <key> <string>comment</string> </key> @@ -228,7 +228,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>960.24382.2075.20667</string> </value> + <value> <string>959.45095.9318.10888</string> </value> </item> <item> <key> <string>state</string> </key> @@ -246,7 +246,7 @@ </tuple> <state> <tuple> - <float>1498746700.08</float> + <float>1496056764.06</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_directory_html.html b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_directory_html.html index 3c502826f03319ba93106d5d3c23f18219ec698d..4aca32d72c10fe2e047bb008d47052086c66a50b 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_directory_html.html +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_directory_html.html @@ -1,18 +1,23 @@ <!Doctype html> <html> <head> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Free Software Publisher Directory</title> <link rel="stylesheet" href="gadget_erp5_afs.css" type="text/css" /> + <!-- renderjs --> <script src="rsvp.js" type="text/javascript"></script> <script src="renderjs.js" type="text/javascript"></script> <script src="handlebars.js" type="text/javascript"></script> + <!-- custom script --> + <script src="gadget_global.js" type="text/javascript"></script> + <script src="gadget_erp5_page_afs_directory.js" type="text/javascript"></script> + <!-- templates --> <script id="frontpage-template" type="text/x-handlebars-template"> <ul class="grid-items"> @@ -28,8 +33,8 @@ <section class="ui-content-section ui-body-c"> <h1>{{category}}</h1> <ul> - {{#each software_list}} - <li><a href="{{href}}">{{title}}</a></li> + {{#each softwares}} + <li><a href="{{value.href}}">{{value.title}}</a></li> {{/each}} </ul> </section> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_directory_html.xml b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_directory_html.xml index 4c402481c6e150dd660738b8c8439e009f9ac975..a495403e5fd98013f915d760361b5f001706e52a 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_directory_html.xml +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_directory_html.xml @@ -218,7 +218,7 @@ </item> <item> <key> <string>actor</string> </key> - <value> <string>3</string> </value> + <value> <string>zope</string> </value> </item> <item> <key> <string>comment</string> </key> @@ -232,7 +232,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>960.20029.51205.49066</string> </value> + <value> <string>959.46970.48446.4744</string> </value> </item> <item> <key> <string>state</string> </key> @@ -250,7 +250,7 @@ </tuple> <state> <tuple> - <float>1498657596.37</float> + <float>1496169875.85</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_directory_js.js b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_directory_js.js index 3361d7e4cc94d36729fdcd9d6a1603991ac0d0cf..4942f44f4996a73363b0546f96ea7618d8b92e62 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_directory_js.js +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_directory_js.js @@ -1,28 +1,20 @@ -/*global window, rJS, RSVP, Handlebars, jIO, document */ -/*jslint indent: 2, nomen: true, maxlen: 80*/ -(function (window, rJS, RSVP, Handlebars, document) { - "use strict"; +/*global window, rJS, RSVP, Handlebars, URI, console, jIO, document */ +/*jslint nomen: true, indent: 2, maxerr: 3 */ - ///////////////////////////////////////////////////////////////// - // some varables - ///////////////////////////////////////////////////////////////// - var VIEW = "?page=afs_software&view=view", +(function (window, rJS, RSVP, Handlebars, URI, document) { + "use strict"; - gadget_klass = rJS(window), + var gadget_klass = rJS(window), templater = gadget_klass.__template_element, - source = templater.getElementById("frontpage-template").innerHTML, + source = templater.getElementById("frontpage-template") + .innerHTML, template = Handlebars.compile(source); - Handlebars.registerPartial( "list-partial", templater.getElementById("list-partial").innerHTML ); gadget_klass - - ///////////////////////////////////////////////////////////////// - // acquired methods - ///////////////////////////////////////////////////////////////// .declareAcquiredMethod("updateHeader", "updateHeader") .declareAcquiredMethod("jio_allDocs", "jio_allDocs") @@ -31,7 +23,9 @@ ///////////////////////////////////////////////////////////////// .declareMethod("render", function () { var gadget = this, - grid = gadget.element.querySelector('.ui-masonry-container'); + masonry_container = gadget.element.querySelector( + '.ui-masonry-container' + ); return new RSVP.Queue() .push(function () { @@ -42,64 +36,67 @@ }) ]); }) - .push(function (result_list) { - return result_list[0].render(); + .push(function (my_response_list) { + return RSVP.all([ + gadget.jio_allDocs({ + select_list: ['category_list'], + query: 'portal_type:"software"' + }), + my_response_list[0].render() + ]); }) - .push(function (html_content) { - var banner = document.createRange() - .createContextualFragment(html_content || ""); + .push(function (my_response_list) { + var softwares = my_response_list[0].data.rows, + obj, - gadget.element.insertBefore(banner, grid); - return gadget.jio_allDocs({ - select_list: ['category_list', 'title', 'publisher'], - query: 'portal_type:"software"' - }); - }) - .push(function (result_list) { - var software_list = result_list.data.rows, - global_category_list = [], - config; + // get categories and flatten array of category arrays + categories = softwares + .map((obj) => obj.value.category_list) + .reduce((cur, prev) => cur.concat(prev)), + + // remove duplicates (case sensitive!) + unique_categories = Array.from(new Set(categories)), + + // kudos: https://davidwalsh.name/convert-html-stings-dom-nodes + banner = document.createRange() + .createContextualFragment(my_response_list[1] || ""); - // list of unique list of categories - if (software_list.length > 0) { - global_category_list = software_list.reduce(function (list, dict) { - var software = dict.value; - if (software.category_list.length > 0) { - software.category_list.map(function (category) { - if (list.indexOf(category) === -1) { - list.push(category); - } - }); - } - return list; - }, []); - } + gadget.element.insertBefore(banner, masonry_container); - // populate list with software - config = global_category_list.reduce(function (result, category) { - var category_entry = {"category": category, "software_list": []}, - len = software_list.length, - match_list, - software, - i; + return RSVP.all(unique_categories); + }) + .push(function (categories) { + var softwares_by_category = categories.map(function (category) { + return gadget.jio_allDocs({ + select_list: [ + 'title', + 'publisher', + 'logo' + ], + query: 'category_list:"%' + category + '%" AND portal_type:"software"' + }) + .push(function (softwares) { + softwares.data.rows.map(function (sw) { + // XXX hardcoded page and view + sw.value.href = "#/" + sw.id + "?page=afs_software&view=view"; + }); + return { + category: category, + softwares: softwares.data.rows + }; + }); + }); + + return RSVP.all(softwares_by_category); + }) + .push(function (result) { + var content; - for (i = 0; i < len; i += 1) { - software = software_list[i].value; - match_list = software.category_list; - if (match_list && match_list.length > 0) { - if (match_list.indexOf(category) > -1) { - category_entry.software_list.push({ - "title": software.title, - "href": "#/" + software_list[i].id + VIEW - }); - } - } - } - result.push(category_entry); - return result; - }, []); + // reverse sort categories by number of softwares + result.sort( (a, b) => b.softwares.length - a.softwares.length ); - grid.innerHTML = template(config); + content = template(result); + masonry_container.innerHTML = content; }); }); -}(window, rJS, RSVP, Handlebars, document)); +}(window, rJS, RSVP, Handlebars, URI, document)); diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_directory_js.xml b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_directory_js.xml index 97f89d840524ef9a64f8e8d5c77bc3bd234bb5d6..a44b54d11d6eb6a9bb1d9631294cefeb96ce5347 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_directory_js.xml +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_directory_js.xml @@ -214,7 +214,7 @@ </item> <item> <key> <string>actor</string> </key> - <value> <string>3</string> </value> + <value> <string>zope</string> </value> </item> <item> <key> <string>comment</string> </key> @@ -228,7 +228,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>960.25451.60616.27306</string> </value> + <value> <string>959.46981.52420.64187</string> </value> </item> <item> <key> <string>state</string> </key> @@ -246,7 +246,7 @@ </tuple> <state> <tuple> - <float>1498812651.17</float> + <float>1496170069.03</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_html.html b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_html.html index ab104b8b0905f31b64b57d3c01789acd00124019..32bb980f8c4874cd60ab8fef0553271d36f0115b 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_html.html +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_html.html @@ -1,155 +1,154 @@ <!Doctype html> <html> <head> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>Publisher</title> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>Publisher</title> + <script src="rsvp.js"></script> + <script src="renderjs.js"></script> + <script src="handlebars.js"></script> - <link rel="stylesheet" type="text/css" href="gadget_erp5_afs.css" /> - - <script src="rsvp.js"></script> - <script src="renderjs.js"></script> - <script src="handlebars.js"></script> + <link rel="stylesheet" type="text/css" href="gadget_erp5_afs.css" /> + + <script src="gadget_erp5_page_afs_publisher.js"></script> + + <script id="display-template" type="text/x-handlebars-template"> + <section class="ui-grid-container ui-responsive"> + <ul class="grid-elements custom-software-profile"> + <li> + {{#if logo}} + <div class="custom-software-profile-image-wrapper"><a href="{{website}}"><img src="{{logo}}" alt></a></div> + {{/if}} + </li> + <li> + <h1>{{title}}</h1> + {{#if wikipedia_description}} + <p>{{wikipedia_description}}</p> + {{/if}} + <br/> + {{#if wikipedia_url}} + <p><a href="{{wikipedia_url}}" class="">Read more on Wikipedia</a></p> + {{/if}} + <ul> + <li>Founded: {{founded_year}}</li> + <li>Country: {{country}}</li> + <li>Website: <a href="{{website}}">{{website}}</a></li> + <li>Presence: {{#each presence}}{{this}} {{/each}} + </li> + </ul> + </li> + </ul> - <script src="gadget_erp5_page_afs_publisher.js"></script> + <section class="ui-content-header-plain ui-bar-c"> + <h2>Free software Solutions</h2> + </section> - <script id="display-template" type="text/x-handlebars-template"> - <section class="ui-grid-container ui-responsive"> - <ul class="grid-elements custom-software-profile"> + <ul class="grid-items custom-software-list"> + {{#each free_software_list}} <li> - {{#if logo}} - <div class="custom-software-profile-image-wrapper"><a href="{{website}}"><img src="{{logo}}" alt></a></div> - {{/if}} - </li> - <li> - <h1>{{title}}</h1> - {{#if wikipedia_description}} - <p>{{wikipedia_description}}</p> - {{/if}} - <br/> - {{#if wikipedia_url}} - <p><a href="{{wikipedia_url}}" class="">Read more on Wikipedia</a></p> - {{/if}} - <ul> - <li>Founded: {{founded_year}}</li> - <li>Country: {{country}}</li> - <li>Website: <a href="{{website}}">{{website}}</a></li> - <li>Presence: {{#each presence}}{{this}} {{/each}} - </li> - </ul> - </li> - </ul> - - <section class="ui-content-header-plain ui-bar-c"> - <h2>Free software Solutions</h2> - </section> - - <ul class="grid-items custom-software-list"> - {{#each free_software_list}} + <ul class="custom-software-profile"> <li> - <ul class="custom-software-profile"> - <li> - {{#if logo}} - <div class="custom-software-profile-image-wrapper"><a href="{{website}}"><img src="{{logo}}" alt></a></div> - {{else}} - <div> </div> - {{/if}} + {{#if logo}} + <div class="custom-software-profile-image-wrapper"><a href="{{website}}"><img src="{{logo}}" alt></a></div> + {{else}} + <div> </div> + {{/if}} + </li> + <li> + <h1>{{title}}</h1> + {{#if wikipedia_description}} + <p>{{wikipedia_description}}</p> + <br/> + {{/if}} + {{#if wikipedia_url}} + <p><a href="{{wikipedia_url}}" class="">Read more on Wikipedia</a></p> + <br/> + {{/if}} + <div> + <ul class="custom-success-story-category-list"><lh>Categories:</lh> + {{#each category_list}} + <li>{{this}}</li> + {{/each}} + </ul> + </div> + <table class="custom-link-table"> + <tbody> + <tr> + <td>Publisher Site</td> + <td><a href="{{publisher_website}}">{{publisher}}</a></td> + </tr> + <tr> + <td>Product Site</td> + <td><a href="{{website}}">{{title}}</a></td> + </tr> + <tr> + <td>Source Code</td> + <td> + {{#if source_code_download}} + <a href="{{source_code_download}}">Download</a> + {{else}} + <a class="ui-disabled" href="">Download</a> + {{/if}} + / + {{#if source_code_profile}} + <a href="{{source_code_profile}}">Profile</a> + {{else}} + <a class="ui-disabled" href="">Profile</a> + {{/if}} + </td> + </tr> + <tr> + <td>Free Software Commercial Support</td> + <td> + {{#if commercial_support}} + <a href="{{commercial_support}}"> Yes</a> + {{#if commercial_support_description}} + <abbr title="{{commercial_support_description}}">(?)</abbr> + {{/if}} + {{else}} + No + {{/if}} + </td> + </tr> + </tbody> + </table> </li> - <li> - <h1>{{title}}</h1> - {{#if wikipedia_description}} - <p>{{wikipedia_description}}</p> - <br/> - {{/if}} - {{#if wikipedia_url}} - <p><a href="{{wikipedia_url}}" class="">Read more on Wikipedia</a></p> - <br/> - {{/if}} - <div> - <ul class="custom-success-story-category-list"><lh>Categories:</lh> - {{#each category_list}} + </ul> + <section class="ui-content-header-plain ui-bar-c"> + <h3>Success Stories</h3> + </section> + {{#if success_case_list}} + <ul class="grid-items custom-success-story-list"> + {{#each success_case_list}} + <li> + {{#if image}} + <div class="custom-success-story-image-wrapper {{image_class}}"><a href="{{url}}"><img src="{{image}}" alt></a></div> + {{else}} + <div> </div> + {{/if}} + <p class="custom-success-story-title">{{title}}</a></p> + <p class="custom-success-story-description">{{description}} <a href="{{url}}">Read more</a></p> + <p>Industry: {{industry}}</p> + <ul class="custom-success-story-category-list"><lh>Categories:</lh> + {{#each ../category_list}} <li>{{this}}</li> {{/each}} </ul> - </div> - <table class="custom-link-table"> - <tbody> - <tr> - <td>Publisher Site</td> - <td><a href="{{publisher_website}}">{{publisher}}</a></td> - </tr> - <tr> - <td>Product Site</td> - <td><a href="{{website}}">{{title}}</a></td> - </tr> - <tr> - <td>Source Code</td> - <td> - {{#if source_code_download}} - <a href="{{source_code_download}}">Download</a> - {{else}} - <a class="ui-disabled" href="">Download</a> - {{/if}} - / - {{#if source_code_profile}} - <a href="{{source_code_profile}}">Profile</a> - {{else}} - <a class="ui-disabled" href="">Profile</a> - {{/if}} - </td> - </tr> - <tr> - <td>Free Software Commercial Support</td> - <td> - {{#if commercial_support}} - <a href="{{commercial_support}}"> Yes</a> - {{#if commercial_support_description}} - <abbr title="{{commercial_support_description}}">(?)</abbr> - {{/if}} - {{else}} - No - {{/if}} - </td> - </tr> - </tbody> - </table> - </li> + <p class="custom-success-story-client">Customer: <span>{{customer}}</span></p> + <p>Country: {{country}}</p> + <p>Language: {{language}}</p> + </li> + {{/each}} </ul> - <section class="ui-content-header-plain ui-bar-c"> - <h3>Success Stories</h3> - </section> - {{#if success_case_list}} - <ul class="grid-items custom-success-story-list"> - {{#each success_case_list}} - <li> - {{#if image}} - <div class="custom-success-story-image-wrapper {{image_class}}"><a href="{{url}}"><img src="{{image}}" alt></a></div> - {{else}} - <div> </div> - {{/if}} - <p class="custom-success-story-title">{{title}}</a></p> - <p class="custom-success-story-description">{{description}} <a href="{{url}}">Read more</a></p> - <p>Industry: {{industry}}</p> - <ul class="custom-success-story-category-list"><lh>Categories:</lh> - {{#each ../category_list}} - <li>{{this}}</li> - {{/each}} - </ul> - <p class="custom-success-story-client">Customer: <span>{{customer}}</span></p> - <p>Country: {{country}}</p> - <p>Language: {{language}}</p> - </li> - {{/each}} - </ul> - {{/if}} - </li> - - {{/each}} - </ul> - </section> - </script> + {{/if}} + </li> + + {{/each}} + </ul> + </section> + </script> </head> <body> <article class="display-widget ui-content"></article> </body> -</html> +</html> \ No newline at end of file diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_html.xml b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_html.xml index 58090ed4ef323661a0d59b96b2daef040df885c5..4c14c464b4e07165f94adb917ab6a120251442c4 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_html.xml +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_html.xml @@ -232,7 +232,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>959.35276.32069.1399</string> </value> + <value> <string>954.58644.17552.59852</string> </value> </item> <item> <key> <string>state</string> </key> @@ -250,7 +250,7 @@ </tuple> <state> <tuple> - <float>1498657508.03</float> + <float>1495467629.29</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_js.js b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_js.js index 46da1500c03c12889bc3b811dcf25bfb75ee3293..ed9754e42fecba7a88b651f91fff5d3d71c541b2 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_js.js +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_js.js @@ -1,140 +1,32 @@ /*globals window, RSVP, rJS, Handlebars, jIO*/ -/*jslint indent: 2, nomen: true, maxlen: 80*/ +/*jslint indent: 2, nomen: true, maxlen: 100*/ (function (window, RSVP, rJS, Handlebars, jIO) { "use strict"; - ///////////////////////////////////////////////////////////////// - // some parameters - ///////////////////////////////////////////////////////////////// - var PLACEHOLDER = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAACWCA" + - "YAAACb3McZAAANRUlEQVR4Xu2dB1cbOReGBaGEEloCGEglYVPI7v7/37GFEBJS6SmUUG3Cnn" + - "cSnU+fMuMyHln3jl+d42MHezTSe/XkSiPpqufq6urKMFEBKpCqQA8BYcugAtkKEBC2DipQRw" + - "ECwuZBBQgI2wAVyKcAPUg+3XhVlyhAQLrE0KxmPgUISD7deFWXKEBAusTQrGY+BQhIPt14VZ" + - "coQEC6xNCsZj4FCEg+3XhVlyhAQLrE0KxmPgUISD7deFWXKEBASmroz5+/mLOzs+C1m5ycMM" + - "PDw8HvE+sGBCSW8oHv++bNO3NwcBj4LsbcvXvbTE1NBr9PrBsQkFjKB74vASlGYAJSjI7ici" + - "EgxZiEgBSjo7hcCEgxJiEgxegoLhcCUoxJCEgxOorLhYAUYxICUoyO4nIhIMWYhIAUo6O4XA" + - "hIMSYhIMXoKC4XAlKMSQhIM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BAqLdgix/UAUISFB5mbl2BQiIdg" + - "uy/EEV+A9Em3PVuGWDlwAAAABJRU5ErkJggg==", - - // https://en.wikipedia.org/api/rest_v1 - only works in for english - WIKIPEDIA_URL = 'https://en.wikipedia.org/api/rest_v1/page/summary/', - NEXEDI_CONTACT_URL = 'https://www.nexedi.com/contact', - STR = "", - NA = "N/A", - - gadget_klass = rJS(window), + var gadget_klass = rJS(window), templater = gadget_klass.__template_element, display_widget_table = Handlebars.compile( templater.getElementById("display-template").innerHTML ); - ///////////////////////////////////////////////////////////////// - // some methods - ///////////////////////////////////////////////////////////////// function clean(case_list) { var i, len, entry; for (i = 0, len = case_list.length; i < len; i += 1) { entry = case_list[i]; - if (entry.image === NA || entry.image === STR) { - entry.image = PLACEHOLDER; + if (entry.image === "N/A" || entry.image === "") { + entry.image = 'gadget_erp5_afs_camera.png?format=png'; entry.image_class = "custom-placeholder"; } } return case_list; } - function isNoValidSuccessCaseList(case_list) { - return (case_list.length === 0 || case_list === NA || - case_list[0].title === NA || case_list[0].title === STR); - } - - function fetchWikiProfile(url) { - return new RSVP.Queue() - .push(function () { - return jIO.util.ajax({ - type: "GET", - headers: {"api-user-agent": NEXEDI_CONTACT_URL}, - url: WIKIPEDIA_URL + url.split("/").pop() - }); - }) - .push(function (data) { - var response = data.target.response || data.target.responseText; - return JSON.parse(response).extract; - }) - .push(undefined, function () { - return undefined; - }); - } - rJS(window) - - ///////////////////////////////////////////////////////////////// - // acquired methods - ///////////////////////////////////////////////////////////////// .declareAcquiredMethod('updateHeader', 'updateHeader') .declareAcquiredMethod('jio_get', 'jio_get') - ///////////////////////////////////////////////////////////////// - // declared methods - ///////////////////////////////////////////////////////////////// .declareMethod('render', function (options) { var gadget = this; @@ -143,26 +35,46 @@ return gadget.jio_get(options.jio_key); }) .push(function (publisher) { - var wiki_list = []; + // https://en.wikipedia.org/api/rest_v1/ + // only works in for english + var wikipedia_api_url = + 'https://en.wikipedia.org/api/rest_v1/page/summary/', + wiki_list = []; publisher.free_software_list.map(function (software) { - - // cleanup and retrive wikipedia data - if (software.commercial_support === NA) { + if (software.commercial_support === "N/A") { delete software.commercial_support; } - if (software.logo === NA || software.logo === STR) { - software.logo = PLACEHOLDER; + if (software.logo === "N/A" || software.logo === "") { + software.logo = 'gadget_erp5_afs_camera.png?format=png'; } - if (isNoValidSuccessCaseList(software.success_case_list)) { + if (software.success_case_list.length === 0 || + software.success_case_list === "N/A" || + software.success_case_list[0].title === "N/A" || + software.success_case_list[0].title === "") { delete software.success_case_list; } else { software.success_case_list = clean(software.success_case_list); } - if (software.wikipedia_url === NA) { + if (software.wikipedia_url === "N/A") { delete software.wikipedia_url; } else { - wiki_list.push(fetchWikiProfile(software.wikipedia_url)); + wiki_list.push( + new RSVP.Queue() + .push(function () { + return jIO.util.ajax({ + type: "GET", + headers: {"api-user-agent": "https://www.nexedi.com/contact"}, + url: wikipedia_api_url + software.wikipedia_url.split("/").pop() + }); + }) + .push(function (my_content) { + var response = my_content.target.response || my_content.target.responseText; + return JSON.parse(response).extract; + }, function () { + return undefined; + }) + ); } }); @@ -170,26 +82,23 @@ .push(function () { return RSVP.all(wiki_list); }) - .push(function (data_list) { - var len = publisher.free_software_list.length, - i; - - if (data_list && data_list.length > 0) { - for (i = 0; i < len; i += 1) { + .push(function (my_wiki_list) { + var i, len; + if (my_wiki_list && my_wiki_list.length > 0) { + for (i = 0, len = publisher.free_software_list.length; i < len; i += 1) { if (publisher.free_software_list[i].wikipedia_url) { - publisher.free_software_list[i].wikipedia_description = - data_list[i]; + publisher.free_software_list[i].wikipedia_description = my_wiki_list[i]; } } } return publisher; }); }) - .push(function (publisher) { + .push(function (my_publisher) { gadget.element.querySelector(".display-widget") - .innerHTML = display_widget_table(publisher); + .innerHTML = display_widget_table(my_publisher); - return gadget.updateHeader({page_title: publisher.title}); + return gadget.updateHeader({page_title: my_publisher.title}); }); }); }(window, RSVP, rJS, Handlebars, jIO)); diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_js.xml b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_js.xml index 37647f5386e9746fe8d16ea1629240eb608cf2fb..64a58e798d689c64ccc885e0af8118af9e502a00 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_js.xml +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_js.xml @@ -214,7 +214,7 @@ </item> <item> <key> <string>actor</string> </key> - <value> <string>3</string> </value> + <value> <string>zope</string> </value> </item> <item> <key> <string>comment</string> </key> @@ -228,7 +228,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>960.22633.10127.42069</string> </value> + <value> <string>959.45186.37882.22272</string> </value> </item> <item> <key> <string>state</string> </key> @@ -246,7 +246,7 @@ </tuple> <state> <tuple> - <float>1498641220.3</float> + <float>1496067089.61</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_list_html.html b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_list_html.html index e5a5135188f863ddbdbbb78b1e9d7bb6729d431b..6da344ff04ac16254550e67a5b9822a3955b6153 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_list_html.html +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_list_html.html @@ -1,8 +1,8 @@ <!Doctype html> <html> <head> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Success Stories</title> <link rel="stylesheet" href="gadget_erp5_afs.css" /> @@ -11,6 +11,9 @@ <script src="renderjs.js" type="text/javascript"></script> <script src="handlebars.js" type="text/javascript"></script> + + <!-- custom script --> + <script src="gadget_global.js" type="text/javascript"></script> <script src="gadget_erp5_page_afs_publisher_list.js" type="text/javascript"></script> </head> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_list_html.xml b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_list_html.xml index 2cf7c6bf402d54dfca525d36eb66d9f1d112b5db..74a37535072bfaa6776cdcdffb399c382c88525e 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_list_html.xml +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_list_html.xml @@ -232,7 +232,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>959.35277.24112.56320</string> </value> + <value> <string>959.35275.11438.17476</string> </value> </item> <item> <key> <string>state</string> </key> @@ -250,7 +250,7 @@ </tuple> <state> <tuple> - <float>1498657681.41</float> + <float>1495467682.0</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_list_js.js b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_list_js.js index 6de54080e95c8328c0da499bb1ec1c389dccd3e6..540803f005b9e87073ef1bd9f5ddd7a4baff1239 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_list_js.js +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_list_js.js @@ -1,91 +1,88 @@ /*globals window, RSVP, rJS*/ /*jslint indent: 2, nomen: true, maxlen: 80*/ + (function (window, RSVP, rJS) { "use strict"; - - ///////////////////////////////////////////////////////////////// - // some parameters - ///////////////////////////////////////////////////////////////// - var STR = "", - QUERY = 'urn:jio:allDocs?query=' + 'portal_type:' + '"publisher"', - SORT = 'field_listbox_sort_list:json', - COLUMN_LIST = [ - ['title', 'Title'], - ['country', 'Country'], - ['founded_year', 'Founded'], - ['presence', 'Presence'] - ]; - rJS(window) - - ///////////////////////////////////////////////////////////////// - // acquired methods - ///////////////////////////////////////////////////////////////// + .declareAcquiredMethod("translate", "translate") + .declareAcquiredMethod("getUrlFor", "getUrlFor") .declareAcquiredMethod("getUrlParameter", "getUrlParameter") .declareAcquiredMethod("updateHeader", "updateHeader") - - ///////////////////////////////////////////////////////////////// - // published methods - ///////////////////////////////////////////////////////////////// + .declareAcquiredMethod("jio_allDocs", "jio_allDocs") .allowPublicAcquisition('updateHeader', function () { return; }) - .allowPublicAcquisition('getUrlParameter', function (argument_list) { return this.getUrlParameter(argument_list) .push(function (result) { - if ((result === undefined) && (argument_list[0] === SORT)) { + if ((result === undefined) && + (argument_list[0] === 'field_listbox_sort_list:json')) { return [['title', 'ascending']]; } return result; }); }) - ///////////////////////////////////////////////////////////////// - // declared methods - ///////////////////////////////////////////////////////////////// .declareMethod("render", function () { var gadget = this; return new RSVP.Queue() .push(function () { - return RSVP.all([ - gadget.updateHeader({page_title: "Publisher List"}), - gadget.getDeclaredGadget("form_list") - ]); + return gadget.updateHeader({ + page_title: "Publisher List" + }); + }) + .push(function () { + return gadget.getDeclaredGadget("form_list"); }) - .push(function (result_list) { - return result_list[1].render({ - erp5_document: { - "_embedded": { - "_view": { - "listbox": { - "column_list": COLUMN_LIST, - "show_anchor": 0, - "default_params": {}, - "editable": 0, - "key": "field_listbox", - "lines": 20, - "list_method": "portal_catalog", - "query": QUERY, - "portal_type": [], - "search_column_list": COLUMN_LIST, - "sort_column_list": COLUMN_LIST, - "sort_on": ["title", "ascending"], - "title": "Documents", - "type": "ListBox" - } + .push(function (form_gadget) { + var column_list = [ + //['logo', 'Logo'], + ['title', 'Title'], + ['country', 'Country'], + ['founded_year', 'Founded'], + ['presence', 'Presence'] + ]; + + return form_gadget.render({ + erp5_document: {"_embedded": {"_view": { + "listbox": { + "column_list": column_list, + "show_anchor": 0, + "default_params": {}, + "editable": 0, + "key": "field_listbox", + "lines": 20, + "list_method": "portal_catalog", + "query": 'urn:jio:allDocs?query=' + 'portal_type:' + + '"publisher"', + "portal_type": [], + "search_column_list": column_list, + "sort_column_list": column_list, + "sort_on": ["title", "ascending"], + "title": "Documents", + "type": "ListBox" + } + }}, + "_links": { + "type": { + // form_list display portal_type in header + name: "" } + } }, - "_links": {"type": {name: STR}} - }, form_definition: { group_list: [ - ["bottom", [["listbox"]]], - ["hidden", ["listbox_modification_date"]] + [ + "bottom", + [["listbox"]] + ], + [ + "hidden", + ["listbox_modification_date"] + ] ] } }); }); }); - -}(window, RSVP, rJS)); +}(window, RSVP, rJS)); \ No newline at end of file diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_list_js.xml b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_list_js.xml index 5a5fa789d2bb41e9cdda5f363893b806be3ade77..ca93dce0adb335234c35edb2e2329555f692affd 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_list_js.xml +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_list_js.xml @@ -214,7 +214,7 @@ </item> <item> <key> <string>actor</string> </key> - <value> <string>3</string> </value> + <value> <string>zope</string> </value> </item> <item> <key> <string>comment</string> </key> @@ -228,7 +228,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>960.22649.27783.51</string> </value> + <value> <string>959.45151.41449.24985</string> </value> </item> <item> <key> <string>state</string> </key> @@ -246,7 +246,7 @@ </tuple> <state> <tuple> - <float>1498642539.62</float> + <float>1496067110.92</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_statistic_html.html b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_statistic_html.html index 7294a0ee393327710ba8f802d563e64d57780a03..16f433ec2743eac67845474e274a80358406ef2e 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_statistic_html.html +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_statistic_html.html @@ -4,12 +4,15 @@ <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Free Software Publisher Statistics</title> + <link rel="stylesheet" href="gadget_erp5_afs.css" /> <script src="rsvp.js"></script> <script src="renderjs.js"></script> + <script src="gadget_global.js"></script> <script src="gadget_erp5_page_afs_publisher_statistic.js"></script> + </head> <body> <div data-gadget-url="gadget_erp5_pt_form_list.html" diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_statistic_html.xml b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_statistic_html.xml index 4062eaf3b89302a1ce9fba22cb91e631bb0087aa..20a483e9894606a3f28f8e030eb362dda10820d7 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_statistic_html.xml +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_statistic_html.xml @@ -232,7 +232,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>960.22902.49514.45755</string> </value> + <value> <string>959.36392.63010.46540</string> </value> </item> <item> <key> <string>state</string> </key> @@ -250,7 +250,7 @@ </tuple> <state> <tuple> - <float>1498657408.74</float> + <float>1496073513.05</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_statistic_js.js b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_statistic_js.js index 632bbcc4af95c4ca060828fc48bee319a1b36de1..21419ac9ca317efdc8a4d7a6203c55d4119b8630 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_statistic_js.js +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_statistic_js.js @@ -3,32 +3,23 @@ (function (window, RSVP, rJS) { "use strict"; - ///////////////////////////////////////////////////////////////// - // some parameters - ///////////////////////////////////////////////////////////////// - var STR = "", - QUERY = 'urn:jio:allDocs?query=' + 'portal_type:"publisher"', - SORT = 'field_listbox_sort_list:json', - COLUMN_LIST = [ - ['title', 'Title'], - ['country', 'Country'], - ['total_lines', 'Total Lines of Code'] - ], - SORT_LIST = [ - ['total_lines', 'Total Lines of Code'] - ]; + var SORT_STRING = 'field_listbox_sort_list:json'; rJS(window) + .ready(function (g) { + g.props = {}; + return g.getElement() + .push(function (element) { + g.props.element = element; + }); + }) - ///////////////////////////////////////////////////////////////// - // acquired methods - ///////////////////////////////////////////////////////////////// + .declareAcquiredMethod("translate", "translate") + .declareAcquiredMethod("getUrlFor", "getUrlFor") .declareAcquiredMethod("getUrlParameter", "getUrlParameter") .declareAcquiredMethod("updateHeader", "updateHeader") + .declareAcquiredMethod("jio_allDocs", "jio_allDocs") - ///////////////////////////////////////////////////////////////// - // published methods - ///////////////////////////////////////////////////////////////// .allowPublicAcquisition('updateHeader', function () { return; }) @@ -36,50 +27,60 @@ .allowPublicAcquisition('getUrlParameter', function (argument_list) { return this.getUrlParameter(argument_list) .push(function (result) { - if ((result === undefined) && (argument_list[0] === SORT)) { - return [['title', 'ascending']]; + if ((result === undefined) && (argument_list[0] === SORT_STRING)) { + return [['lines', 'descending']]; } return result; }); }) - ///////////////////////////////////////////////////////////////// - // declared methods - ///////////////////////////////////////////////////////////////// .declareMethod("render", function () { var gadget = this; return new RSVP.Queue() .push(function () { - return RSVP.all([ - gadget.updateHeader({page_title: "Statistics"}), - gadget.getDeclaredGadget("form_list") - ]); + return gadget.updateHeader({ + page_title: "Statistics" + }); }) - .push(function (result_list) { - return result_list[1].render({ - erp5_document: { - "_embedded": { - "_view": { - "listbox": { - "column_list": COLUMN_LIST, - "show_anchor": 0, - "default_params": {}, - "editable": 0, - "key": "field_listbox", - "lines": 20, - "list_method": "portal_catalog", - "query": QUERY, - "portal_type": [], - "search_column_list": COLUMN_LIST, - "sort_column_list": SORT_LIST, - "sort_on": ["total_lines", "descending"], - "title": "Documents", - "type": "ListBox" - } + .push(function () { + return gadget.getDeclaredGadget("form_list"); + }) + .push(function (form_gadget) { + var column_list = [ + ['title', 'Title'], + ['country', 'Country'], + ['lines', 'Total Lines of Code'] + ], + sort_column_list = [ + ['lines', 'Total Lines of Code'] + ]; + + return form_gadget.render({ + erp5_document: {"_embedded": {"_view": { + "listbox": { + "column_list": column_list, + "show_anchor": 0, + "default_params": {}, + "editable": 0, + "key": "field_listbox", + "lines": 20, + "list_method": "portal_catalog", + "query": 'urn:jio:allDocs?query=' + 'portal_type:"publisher"', + "portal_type": [], + "search_column_list": column_list, + "sort_column_list": sort_column_list, + "sort_on": ["lines", "descending"], + "title": "Documents", + "type": "ListBox" + } + }}, + "_links": { + "type": { + // form_list display portal_type in header + name: "" } + } }, - "_links": {"type": {name: STR}} - }, form_definition: { group_list: [ ["bottom", [["listbox"]]], @@ -89,5 +90,4 @@ }); }); }); - }(window, RSVP, rJS)); diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_statistic_js.xml b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_statistic_js.xml index e67ac91c68c6364d0d56464be1db069633596a19..8aba02a17a38413b5b02cb5f31e78dd5c2a38b1a 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_statistic_js.xml +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_statistic_js.xml @@ -228,7 +228,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>960.20090.53630.24883</string> </value> + <value> <string>959.45388.59712.6178</string> </value> </item> <item> <key> <string>state</string> </key> @@ -246,7 +246,7 @@ </tuple> <state> <tuple> - <float>1498643289.79</float> + <float>1496074387.69</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_software_html.html b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_software_html.html index 92c2a0cfd0b0f96dfacee7ed340f025f26cbf03e..10a718339f052f427b2849ec2afadd923ce6e069 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_software_html.html +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_software_html.html @@ -1,143 +1,143 @@ <!Doctype html> <html> <head> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>Success Story List</title> - - <link type="text/css" rel="stylesheet" href="gadget_erp5_afs.css" /> - - <script src="rsvp.js"></script> - <script src="renderjs.js"></script> - <script src="handlebars.js"></script> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>Success Story List</title> - <script src="gadget_erp5_page_afs_software.js"></script> - - <script id="display-template" type="text/x-handlebars-template"> - <section class="ui-grid-container ui-responsive"> - <ul class="grid-elements custom-software-profile"> - <li> - {{#if logo}} - <div class="custom-software-profile-image-wrapper"><a href="{{website}}"><img src="{{logo}}"></a></div> - {{/if}} - </li> - <li> - <h1>{{title}}</h1> - {{#if wikipedia_description}} - <p>{{wikipedia_description}}</p> - <br/> - {{/if}} - {{#if wikipedia_url}} - <p><a href="{{wikipedia_url}}" class="">Read more on Wikipedia</a></p> - {{/if}} - </li> - </ul> + <link type="text/css" rel="stylesheet" href="gadget_erp5_afs.css" /> + + <script src="rsvp.js"></script> + <script src="renderjs.js"></script> + <script src="handlebars.js"></script> + + <script src="gadget_erp5_page_afs_software.js"></script> + + <script id="display-template" type="text/x-handlebars-template"> + <section class="ui-grid-container ui-responsive"> + <ul class="grid-elements custom-software-profile"> + <li> + {{#if logo}} + <div class="custom-software-profile-image-wrapper"><a href="{{website}}"><img src="{{logo}}"></a></div> + {{/if}} + </li> + <li> + <h1>{{title}}</h1> + {{#if wikipedia_description}} + <p>{{wikipedia_description}}</p> + <br/> + {{/if}} + {{#if wikipedia_url}} + <p><a href="{{wikipedia_url}}" class="">Read more on Wikipedia</a></p> + {{/if}} + </li> + </ul> + - + <section class="ui-content-header-plain ui-bar-c"> + <h3>Software Spec</h3> + </section> + <table class="custom-link-table"> + <tbody> + <tr> + <td>Publisher Site</td> + <td><a href="{{publisher_website}}">{{publisher}}</a></td> + </tr> + <tr> + <td>Product Site</td> + <td><a href="{{website}}">{{title}}</a></td> + </tr> + <tr> + <td>Source Code</td> + <td> + {{#if source_code_download}} + <a href="{{source_code_download}}">Download</a> + {{else}} + <a class="ui-disabled" href="">Download</a> + {{/if}} + / + {{#if source_code_profile}} + <a href="{{source_code_profile}}">Profile</a> + {{else}} + <a class="ui-disabled" href="">Profile</a> + {{/if}} + </td> + </tr> + <tr> + <td>Free Software Commercial Support</td> + <td> + {{#if commercial_support}} + <a href="{{commercial_support}}"> Yes</a> + {{#if commercial_support_description}} + <abbr title="{{commercial_support_description}}">(?)</abbr> + {{/if}} + {{else}} + No + {{/if}} + </td> + </tr> + </tbody> + </table> + + {{#if success_case_list}} <section class="ui-content-header-plain ui-bar-c"> - <h3>Software Spec</h3> + <h3>Success Stories</h3> </section> - <table class="custom-link-table"> - <tbody> - <tr> - <td>Publisher Site</td> - <td><a href="{{publisher_website}}">{{publisher}}</a></td> - </tr> - <tr> - <td>Product Site</td> - <td><a href="{{website}}">{{title}}</a></td> - </tr> - <tr> - <td>Source Code</td> - <td> - {{#if source_code_download}} - <a href="{{source_code_download}}">Download</a> - {{else}} - <a class="ui-disabled" href="">Download</a> - {{/if}} - / - {{#if source_code_profile}} - <a href="{{source_code_profile}}">Profile</a> - {{else}} - <a class="ui-disabled" href="">Profile</a> - {{/if}} - </td> - </tr> - <tr> - <td>Free Software Commercial Support</td> - <td> - {{#if commercial_support}} - <a href="{{commercial_support}}"> Yes</a> - {{#if commercial_support_description}} - <abbr title="{{commercial_support_description}}">(?)</abbr> - {{/if}} - {{else}} - No - {{/if}} - </td> - </tr> - </tbody> - </table> - - {{#if success_case_list}} - <section class="ui-content-header-plain ui-bar-c"> - <h3>Success Stories</h3> - </section> - <ul class="grid-items custom-success-story-list"> - {{#each success_case_list}} - <li> - {{#if image}} - <div class="custom-success-story-image-wrapper {{image_class}}"><a href="{{url}}"><img src="{{image}}" alt></a></div> - {{else}} - <div> </div> - {{/if}} - <p class="custom-success-story-title">{{title}}</a></p> - <p class="custom-success-story-description">{{description}} <a href="{{url}}">Read more</a></p> - <table class="custom-link-table"> - <tbody> - <tr> - <td>Categories</td> - <td> - <ul class="custom-success-story-category-list"> - {{#each ../category_list}} - <li>{{this}}</li> - {{/each}} - </ul> - </td> - </tr> - <tr> - <td class="custom-success-story-client">Customer</td> - <td><b>{{customer}}</b></td> - </tr> - <tr> - <td>Industry</td> - <td>{{industry}}</td> - </tr> - <tr> - <td>Country</td> - <td>{{country}}</td> - </tr> - <tr> - <td>Language</td> - <td>{{language}}</td> - </tr> - <tr> - <td>Product Site</td> - <td><a href="{{software_website}}">{{software}}</a></td> - </tr> - <tr> - <td>Publisher Site</td> - <td><a href="{{publisher_website}}">{{publisher}}</a></td> - </tr> - </tbody> - </table> - </li> - {{/each}} - </ul> - {{/if}} - </section> - - </script> + <ul class="grid-items custom-success-story-list"> + {{#each success_case_list}} + <li> + {{#if image}} + <div class="custom-success-story-image-wrapper {{image_class}}"><a href="{{url}}"><img src="{{image}}" alt></a></div> + {{else}} + <div> </div> + {{/if}} + <p class="custom-success-story-title">{{title}}</a></p> + <p class="custom-success-story-description">{{description}} <a href="{{url}}">Read more</a></p> + <table class="custom-link-table"> + <tbody> + <tr> + <td>Categories</td> + <td> + <ul class="custom-success-story-category-list"> + {{#each ../category_list}} + <li>{{this}}</li> + {{/each}} + </ul> + </td> + </tr> + <tr> + <td class="custom-success-story-client">Customer</td> + <td><b>{{customer}}</b></td> + </tr> + <tr> + <td>Industry</td> + <td>{{industry}}</td> + </tr> + <tr> + <td>Country</td> + <td>{{country}}</td> + </tr> + <tr> + <td>Language</td> + <td>{{language}}</td> + </tr> + <tr> + <td>Product Site</td> + <td><a href="{{software_website}}">{{software}}</a></td> + </tr> + <tr> + <td>Publisher Site</td> + <td><a href="{{publisher_website}}">{{publisher}}</a></td> + </tr> + </tbody> + </table> + </li> + {{/each}} + </ul> + {{/if}} + </section> + + </script> </head> <body> <div class="display-widget"></div> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_software_html.xml b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_software_html.xml index fc6deed07bcbe6d7ce6953f3d0ea914e53c2760d..a251a58e27e577a34496cce9dfc4ce795823894c 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_software_html.xml +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_software_html.xml @@ -232,7 +232,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>959.35276.53022.61934</string> </value> + <value> <string>955.20609.15320.31283</string> </value> </item> <item> <key> <string>state</string> </key> @@ -250,7 +250,7 @@ </tuple> <state> <tuple> - <float>1498657572.87</float> + <float>1495467648.49</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_software_js.js b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_software_js.js index c19a29883b8e386498813668019e67d47a03eae3..671ebe74cc053ff65ee27519ee1fbeb074d6f13f 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_software_js.js +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_software_js.js @@ -1,146 +1,37 @@ /*globals window, RSVP, rJS, Handlebars, jIO*/ -/*jslint indent: 2, nomen: true, maxlen: 80*/ +/*jslint indent: 2, nomen: true, maxlen: 100*/ (function (window, RSVP, rJS, Handlebars, jIO) { "use strict"; - ///////////////////////////////////////////////////////////////// - // some parameters - ///////////////////////////////////////////////////////////////// - var PLACEHOLDER = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAACWCA" + - "YAAACb3McZAAANRUlEQVR4Xu2dB1cbOReGBaGEEloCGEglYVPI7v7/37GFEBJS6SmUUG3Cnn" + - "cSnU+fMuMyHln3jl+d42MHezTSe/XkSiPpqufq6urKMFEBKpCqQA8BYcugAtkKEBC2DipQRw" + - "ECwuZBBQgI2wAVyKcAPUg+3XhVlyhAQLrE0KxmPgUISD7deFWXKEBAusTQrGY+BQhIPt14VZ" + - "coQEC6xNCsZj4FCEg+3XhVlyhAQLrE0KxmPgUISD7deFWXKEBASmroz5+/mLOzs+C1m5ycMM" + - "PDw8HvE+sGBCSW8oHv++bNO3NwcBj4LsbcvXvbTE1NBr9PrBsQkFjKB74vASlGYAJSjI7ici" + - "EgxZiEgBSjo7hcCEgxJiEgxegoLhcCUoxJCEgxOorLhYAUYxICUoyO4nIhIMWYhIAUo6O4XA" + - "hIMSYhIMXoKC4XAlKMSQhIMTqKy4WAFGOSUgNyeXlpqtWq6cbQeBsbm+bbt+NiWkmdXDiTHl" + - "zi4m4AGPb3D5LX6emZ+f79e3GZM6dUBW7cGDXz83NmaOh6KRUqhQcBGFtbO+bLl6+lNJKGSo" + - "2N3TCzs9NmZGREQ3GbLqN6QLBqdWNji96iaZOH/SE8yv37d821a9fC3qhDuasGZHt7x2xv73" + - "ZIKt6mWQWGh4fMw4cPSgGJWkA2N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/c7AiILCL80aYBYOLDhyoJhP9t3XO" + - "d2vQjIzzFEmscAGP7Ljkns77O6WrKbT/lLV69rBRhcMNx/W3DSPEkM1aJ7ENcToNG7XgMBGX" + - "xA0rwIxx4xmk79e6YB4noNC4V9xxmN+N71JO5TrVhPtKIB4nev/K6VhaMeJGnzI/KaSneWqB" + - "lAAAVePiS+F4nZzRIHiOsxAIcPStY4hIN0WSC6//v7Yw8XCAuICwoBceYurBdwB+YWkixA8L" + - "0di3AMIgsMf5LPHXTbLhQBacJmrXSx3G5WvSdZHIs0IXzgn/gz6O7jXX8MkuY93CdcXT0GsY" + - "05a5DuQoHPdgDvzonwUW/g1p4z+3pzIGlexB2wu/MiBOTnIkS/m+XC4I5JfO9hl6D4a7ly2p" + - "WXFaBA2hos281yG7//FMv1HGlLUAooWq4sog3S3e6QCwg+uxODWZOFjRYv5lKDFxWiQDPdLP" + - "eRrg8HJwp/mqHeOizXW6R5DgJSSFsOkkkWIGmehEtNGpigESTu0yp39pxzIEHadqGZZo1FXF" + - "D8z1ysmGKCLEhcOFyPkQUH50IKbd+5M8sah6Qtbc9a8u4/Ls5dmDYvjDoGsWX3B9k+AD4c/v" + - "ilTQ14eUAFXC+C2/hPptKgkQJHUt4rIf/tpj2JSgPFhcP/HNDOzDqnAvW8SRowkuAQBUiWN8" + - "nyFkK4ztlsuu+yLFAsJK4isRYmpllFjAdxC+c3/kb/7r7mprPGfsNv9G8JtRQJSD1Ymv1Ogr" + - "gsw/8UyPIKkryFGg9Sr2Gxa6UbO+lA+OqK9yC6mwNLr10BAqLdgix/UAUISFB5mbl2BQiIdg" + - "uy/EEV+A9Em3PVuGWDlwAAAABJRU5ErkJggg==", - - // https://en.wikipedia.org/api/rest_v1 - only works in for english - WIKIPEDIA_URL = 'https://en.wikipedia.org/api/rest_v1/page/summary/', - NEXEDI_CONTACT_URL = 'https://www.nexedi.com/contact', - STR = "", - NA = "N/A", - - gadget_klass = rJS(window), + var gadget_klass = rJS(window), templater = gadget_klass.__template_element, display_widget_table = Handlebars.compile( templater.getElementById("display-template").innerHTML ); - ///////////////////////////////////////////////////////////////// - // some methods - ///////////////////////////////////////////////////////////////// - function clean(software) { - var case_list = software.success_case_list, - len = case_list.length, - success_case, - i; - - for (i = 0; i < len; i += 1) { - success_case = case_list[i]; - if (success_case.image === NA || success_case.image === STR) { - success_case.image = PLACEHOLDER; - success_case.image_class = "custom-placeholder"; + function clean(case_list, software_website, software_title, publisher_website, publisher_title) { + var emptry_string = "", + i, + len, + entry; + for (i = 0, len = case_list.length; i < len; i += 1) { + entry = case_list[i]; + if (entry.image === "N/A" || entry.image === "") { + entry.image = 'gadget_erp5_afs_camera.png?format=png'; + entry.image_class = "custom-placeholder"; } - success_case.software_website = software.website || STR; - success_case.software = software.title || STR; - success_case.publisher_website = software.publisher_website || STR; - success_case.publisher = software.publisher || STR; + entry.software_website = software_website || emptry_string; + entry.software = software_title || emptry_string; + entry.publisher_website = publisher_website || emptry_string; + entry.publisher = publisher_title || emptry_string; } return case_list; } - function isNoValidSuccessCaseList(case_list) { - return (case_list.length === 0 || case_list === NA || - case_list[0].title === NA || case_list[0].title === STR); - } - - function fetchWikiProfile(url) { - return new RSVP.Queue() - .push(function () { - return jIO.util.ajax({ - type: "GET", - headers: {"api-user-agent": NEXEDI_CONTACT_URL}, - url: WIKIPEDIA_URL + url.split("/").pop() - }); - }) - .push(function (data) { - var response = data.target.response || data.target.responseText; - return JSON.parse(response).extract; - }) - .push(undefined, function () { - return undefined; - }); - } - rJS(window) - - ///////////////////////////////////////////////////////////////// - // acquired methods - ///////////////////////////////////////////////////////////////// .declareAcquiredMethod('updateHeader', 'updateHeader') .declareAcquiredMethod('jio_get', 'jio_get') - ///////////////////////////////////////////////////////////////// - // declared methods - ///////////////////////////////////////////////////////////////// .declareMethod('render', function (options) { var gadget = this; @@ -149,37 +40,61 @@ return gadget.jio_get(options.jio_key); }) .push(function (software) { - var queue = new RSVP.Queue(); - // cleanup and retrieve wikipedia data - if (software.logo === NA || software.logo === STR) { - software.logo = PLACEHOLDER; + // https://en.wikipedia.org/api/rest_v1/ + // only works in for english + var wikipedia_api_url = 'https://en.wikipedia.org/api/rest_v1/page/summary/'; + + if (software.logo === "N/A" || software.logo === "") { + software.logo = 'gadget_erp5_afs_camera.png?format=png'; } - if (software.commercial_support === NA) { + if (software.commercial_support === "N/A") { delete software.commercial_support; } - if (isNoValidSuccessCaseList(software.success_case_list)) { + if (software.success_case_list.length === 0 || + software.success_case_list === "N/A" || + software.success_case_list[0].title === "N/A" || + software.success_case_list[0].title === "") { delete software.success_case_list; } else { - software.success_case_list = clean(software); + software.success_case_list = clean( + software.success_case_list, + software.website, + software.title, + software.publisher_website, + software.publisher + ); } - if (software.wikipedia_url === NA) { + if (software.wikipedia_url === "N/A") { delete software.wikipedia_url; - } else { - queue.push(fetchWikiProfile(software.wikipedia_url)); + return software; } - return queue - .push(function (wikipedia_content) { - if (wikipedia_content) { - software.wikipedia_description = wikipedia_content; - } - gadget.element.querySelector(".display-widget") - .innerHTML = display_widget_table(software); - - return gadget.updateHeader({page_title: software.title}); + return new RSVP.Queue() + .push(function () { + return jIO.util.ajax({ + type: "GET", + headers: {"api-user-agent": "https://www.nexedi.com/contact"}, + url: wikipedia_api_url + software.wikipedia_url.split("/").pop() + }); + }) + .push(function (my_content) { + var response = my_content.target.response || my_content.target.responseText; + software.wikipedia_description = JSON.parse(response).extract; + return software; + }, function () { + // console.log(my_error) + // 404 or not allowed, swallow + return software; }); + + }) + .push(function (my_software) { + gadget.element.querySelector(".display-widget") + .innerHTML = display_widget_table(my_software); + + return gadget.updateHeader({page_title: my_software.title}); }); }); - }(window, RSVP, rJS, Handlebars, jIO)); + diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_software_js.xml b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_software_js.xml index 1094e1ac58af805f73b9c33e06e7622178585b26..5ab67421d6a918211216d1616a940d0ae59270c7 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_software_js.xml +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_software_js.xml @@ -214,7 +214,7 @@ </item> <item> <key> <string>actor</string> </key> - <value> <string>3</string> </value> + <value> <string>zope</string> </value> </item> <item> <key> <string>comment</string> </key> @@ -228,7 +228,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>960.22629.43878.37017</string> </value> + <value> <string>959.45186.59501.25241</string> </value> </item> <item> <key> <string>state</string> </key> @@ -246,7 +246,7 @@ </tuple> <state> <tuple> - <float>1498641074.59</float> + <float>1496067144.61</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_software_list_html.html b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_software_list_html.html index f1ec1edb3e4c2ad5d0597e8c01cd7e10100c1224..e2ffe39dddb66334be4f2709fc43682a551781a2 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_software_list_html.html +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_software_list_html.html @@ -1,8 +1,8 @@ <!Doctype html> <html> <head> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Software</title> <link rel="stylesheet" href="gadget_erp5_afs.css" /> @@ -11,6 +11,9 @@ <script src="renderjs.js" type="text/javascript"></script> <script src="handlebars.js" type="text/javascript"></script> + + <!-- custom script --> + <script src="gadget_global.js" type="text/javascript"></script> <script src="gadget_erp5_page_afs_software_list.js" type="text/javascript"></script> </head> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_software_list_html.xml b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_software_list_html.xml index f277f7cc22c1740bed3c2e6887b1f31b0c6a5480..2b6234f7dd01dd3e3637c20c0c591bda3a2b5f69 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_software_list_html.xml +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_software_list_html.xml @@ -232,7 +232,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>959.35276.45558.8891</string> </value> + <value> <string>959.35275.22570.50176</string> </value> </item> <item> <key> <string>state</string> </key> @@ -250,7 +250,7 @@ </tuple> <state> <tuple> - <float>1498657545.3</float> + <float>1495467641.69</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_software_list_js.js b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_software_list_js.js index 2833cb70ecbfbc337c445187f8dd02c69c7b4455..d414dd5c3e93fff0b129ee25bc0ff2a4fd520a0f 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_software_list_js.js +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_software_list_js.js @@ -1,90 +1,86 @@ /*globals window, RSVP, rJS*/ /*jslint indent: 2, nomen: true, maxlen: 80*/ + (function (window, RSVP, rJS) { "use strict"; - - ///////////////////////////////////////////////////////////////// - // some parameters - ///////////////////////////////////////////////////////////////// - var STR = "", - QUERY = 'urn:jio:allDocs?query=portal_type:"software"', - SORT = 'field_listbox_sort_list:json', - COLUMN_LIST = [ - ['title', 'Title'], - ['publisher', 'Publisher'], - ['category_list', 'Category'] - ]; - rJS(window) - - ///////////////////////////////////////////////////////////////// - // acquired methods - ///////////////////////////////////////////////////////////////// + .declareAcquiredMethod("translate", "translate") + .declareAcquiredMethod("getUrlFor", "getUrlFor") .declareAcquiredMethod("getUrlParameter", "getUrlParameter") .declareAcquiredMethod("updateHeader", "updateHeader") - - ///////////////////////////////////////////////////////////////// - // published methods - ///////////////////////////////////////////////////////////////// + .declareAcquiredMethod("jio_allDocs", "jio_allDocs") .allowPublicAcquisition('updateHeader', function () { return; }) - .allowPublicAcquisition('getUrlParameter', function (argument_list) { return this.getUrlParameter(argument_list) .push(function (result) { - if ((result === undefined) && (argument_list[0] === SORT)) { + if ((result === undefined) && + (argument_list[0] === 'field_listbox_sort_list:json')) { return [['title', 'ascending']]; } return result; }); }) - ///////////////////////////////////////////////////////////////// - // declared methods - ///////////////////////////////////////////////////////////////// .declareMethod("render", function () { var gadget = this; return new RSVP.Queue() .push(function () { - return RSVP.all([ - gadget.updateHeader({page_title: "Software List"}), - gadget.getDeclaredGadget("form_list") - ]); + return gadget.updateHeader({ + page_title: "Software List" + }); + }) + .push(function () { + return gadget.getDeclaredGadget("form_list"); }) - .push(function (result_list) { - return result_list[1].render({ - erp5_document: { - "_embedded": { - "_view": { - "listbox": { - "column_list": COLUMN_LIST, - "show_anchor": 0, - "default_params": {}, - "editable": 0, - "key": "field_listbox", - "lines": 20, - "list_method": "portal_catalog", - "query": QUERY, - "portal_type": [], - "search_column_list": COLUMN_LIST, - "sort_column_list": COLUMN_LIST, - "title": "Documents", - "type": "ListBox" - } + .push(function (form_gadget) { + var column_list = [ + //['logo', 'Logo'], + ['title', 'Title'], + ['publisher', 'Publisher'], + ['category_list', 'Category'] + ]; + + return form_gadget.render({ + erp5_document: {"_embedded": {"_view": { + "listbox": { + "column_list": column_list, + "show_anchor": 0, + "default_params": {}, + "editable": 0, + "key": "field_listbox", + "lines": 20, + "list_method": "portal_catalog", + "query": 'urn:jio:allDocs?query=' + 'portal_type:' + + '"software"', + "portal_type": [], + "search_column_list": column_list, + "sort_column_list": column_list, + "title": "Documents", + "type": "ListBox" + } + }}, + "_links": { + "type": { + // form_list display portal_type in header + name: "" } + } }, - "_links": {"type": {name: STR}} - }, form_definition: { group_list: [ - ["bottom", [["listbox"]]], - ["hidden", ["listbox_modification_date"]] + [ + "bottom", + [["listbox"]] + ], + [ + "hidden", + ["listbox_modification_date"] + ] ] } }); }); }); - }(window, RSVP, rJS)); - diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_software_list_js.xml b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_software_list_js.xml index 4819fa67b6883f8b5b91bc8a0545f9d1acb68fdb..c0cff1caeaf87eb3e1ab2046fefe4e3d00815487 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_software_list_js.xml +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_software_list_js.xml @@ -214,7 +214,7 @@ </item> <item> <key> <string>actor</string> </key> - <value> <string>3</string> </value> + <value> <string>zope</string> </value> </item> <item> <key> <string>comment</string> </key> @@ -228,7 +228,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>960.22662.39286.38860</string> </value> + <value> <string>959.45114.42947.5734</string> </value> </item> <item> <key> <string>state</string> </key> @@ -246,7 +246,7 @@ </tuple> <state> <tuple> - <float>1498643008.6</float> + <float>1496067168.05</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_success_case_html.html b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_success_case_html.html index aa8d4934373d8397778679c4531471551a38f4b0..c978f08e3a67963be3e3a80532f7f0247c3ec969 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_success_case_html.html +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_success_case_html.html @@ -1,71 +1,71 @@ <!Doctype html> <html> <head> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>Success Story</title> - - <link type="text/css" rel="stylesheet" href="gadget_erp5_afs.css" /> - - <script src="rsvp.js"></script> - <script src="renderjs.js"></script> - <script src="handlebars.js"></script> - - <script src="gadget_erp5_page_afs_success_case.js"></script> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>Success Story</title> - <script id="display-template" type="text/x-handlebars-template"> - <section class="ui-grid-container ui-responsive"> - <h1>{{title}}</h1> - {{#if image}} - <div class="custom-success-story-image-wrapper {{image_class}}"><a href="{{url}}"><img src="{{image}}" alt></a></div> - {{else}} - <div> </div> - {{/if}} - <p class="custom-success-story-description">{{description}} <a href="{{url}}">Read More</a></p> + <script src="rsvp.js"></script> + <script src="renderjs.js"></script> + <script src="handlebars.js"></script> - <table class="custom-link-table"> - <tbody> - <tr> - <td>Categories</td> - <td> - <ul class="custom-success-story-category-list"> - {{#each category_list}} - <li>{{this}}</li> - {{/each}} - </ul> - </td> - </tr> - <tr> - <td class="custom-success-story-client">Customer</td> - <td><b>{{customer}}</b></td> - </tr> - <tr> - <td>Industry</td> - <td>{{industry}}</td> - </tr> - <tr> - <td>Country</td> - <td>{{country}}</td> - </tr> - <tr> - <td>Language</td> - <td>{{language}}</td> - </tr> - <tr> - <td>Product Site</td> - <td><a href="{{software_website}}">{{software}}</a></td> - </tr> - <tr> - <td>Publisher Site</td> - <td><a href="{{publisher_website}}">{{publisher}}</a></td> - </tr> - </tbody> - </table> + <link type="text/css" rel="stylesheet" href="gadget_erp5_afs.css" /> - </section> - </script> + <script src="gadget_erp5_page_afs_success_case.js"></script> + + <script id="display-template" type="text/x-handlebars-template"> + <section class="ui-grid-container ui-responsive"> + <h1>{{title}}</h1> + {{#if image}} + <div class="custom-success-story-image-wrapper {{image_class}}"><a href="{{url}}"><img src="{{image}}" alt></a></div> + {{else}} + <div> </div> + {{/if}} + <p class="custom-success-story-description">{{description}} <a href="{{url}}">Read More</a></p> + + <table class="custom-link-table"> + <tbody> + <tr> + <td>Categories</td> + <td> + <ul class="custom-success-story-category-list"> + {{#each category_list}} + <li>{{this}}</li> + {{/each}} + </ul> + </td> + </tr> + <tr> + <td class="custom-success-story-client">Customer</td> + <td><b>{{customer}}</b></td> + </tr> + <tr> + <td>Industry</td> + <td>{{industry}}</td> + </tr> + <tr> + <td>Country</td> + <td>{{country}}</td> + </tr> + <tr> + <td>Language</td> + <td>{{language}}</td> + </tr> + <tr> + <td>Product Site</td> + <td><a href="{{software_website}}">{{software}}</a></td> + </tr> + <tr> + <td>Publisher Site</td> + <td><a href="{{publisher_website}}">{{publisher}}</a></td> + </tr> + </tbody> + </table> + + </section> + </script> </head> <body> <div class="display-widget"></div> </body> -</html> +</html> \ No newline at end of file diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_success_case_html.xml b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_success_case_html.xml index 8646d5903bcdefb5d16a84f2cbbe68c1213e90fb..68e6ef6e3bc45423e6918662968c4eecc2399b7d 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_success_case_html.xml +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_success_case_html.xml @@ -232,7 +232,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>959.35276.22741.45209</string> </value> + <value> <string>954.58847.53110.31982</string> </value> </item> <item> <key> <string>state</string> </key> @@ -250,7 +250,7 @@ </tuple> <state> <tuple> - <float>1498657466.07</float> + <float>1495467620.79</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_success_case_js.js b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_success_case_js.js index 0b8db745d6a101d334558b1c8a921975c211ab2d..32fd69abed43d6e7013e69e601106096c9689429 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_success_case_js.js +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_success_case_js.js @@ -3,114 +3,31 @@ (function (window, RSVP, rJS, Handlebars) { "use strict"; - ///////////////////////////////////////////////////////////////// - // some parameters - ///////////////////////////////////////////////////////////////// - var PLACEHOLDER = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAACWCA" + - "YAAACb3McZAAANRUlEQVR4Xu2dB1cbOReGBaGEEloCGEglYVPI7v7/37GFEBJS6SmUUG3Cnn" + - "cSnU+fMuMyHln3jl+d42MHezTSe/XkSiPpqufq6urKMFEBKpCqQA8BYcugAtkKEBC2DipQRw" + - "ECwuZBBQgI2wAVyKcAPUg+3XhVlyhAQLrE0KxmPgUISD7deFWXKEBAusTQrGY+BQhIPt14VZ" + - "coQEC6xNCsZj4FCEg+3XhVlyhAQLrE0KxmPgUISD7deFWXKEBASmroz5+/mLOzs+C1m5ycMM" + - "PDw8HvE+sGBCSW8oHv++bNO3NwcBj4LsbcvXvbTE1NBr9PrBsQkFjKB74vASlGYAJSjI7ici" + - "EgxZiEgBSjo7hcCEgxJiEgxegoLhcCUoxJCEgxOorLhYAUYxICUoyO4nIhIMWYhIAUo6O4XA" + - "hIMSYhIMXoKC4XAlKMSQhIMTqKy4WAFGOSUgNyeXlpqtWq6cbQeBsbm+bbt+NiWkmdXDiTHl" + - "zi4m4AGPb3D5LX6emZ+f79e3GZM6dUBW7cGDXz83NmaOh6KRUqhQcBGFtbO+bLl6+lNJKGSo" + - "2N3TCzs9NmZGREQ3GbLqN6QLBqdWNji96iaZOH/SE8yv37d821a9fC3qhDuasGZHt7x2xv73" + - "ZIKt6mWQWGh4fMw4cPSgGJWkA2N7fN7u5eszbj7zqsQFkgUQkIBuFv377vsMl5u1YVGBoaMk" + - "tLi6a3t7fVS8X8Xh0gFxcXZnV1zVxe8gmVmFZUpyBzc5Vk8K41qQPk/fuPfF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rwIxx4xmk79e6YB4noNC4V9xxmN+N71JO5TrVhPtKIB4nev/K6VhaMeJGnzI/KaSneWqB" + - "lAAAVePiS+F4nZzRIHiOsxAIcPStY4hIN0WSC6//v7Yw8XCAuICwoBceYurBdwB+YWkixA8L" + - "0di3AMIgsMf5LPHXTbLhQBacJmrXSx3G5WvSdZHIs0IXzgn/gz6O7jXX8MkuY93CdcXT0GsY" + - "05a5DuQoHPdgDvzonwUW/g1p4z+3pzIGlexB2wu/MiBOTnIkS/m+XC4I5JfO9hl6D4a7ly2p" + - "WXFaBA2hos281yG7//FMv1HGlLUAooWq4sog3S3e6QCwg+uxODWZOFjRYv5lKDFxWiQDPdLP" + - "eRrg8HJwp/mqHeOizXW6R5DgJSSFsOkkkWIGmehEtNGpigESTu0yp39pxzIEHadqGZZo1FXF" + - "D8z1ysmGKCLEhcOFyPkQUH50IKbd+5M8sah6Qtbc9a8u4/Ls5dmDYvjDoGsWX3B9k+AD4c/v" + - "ilTQ14eUAFXC+C2/hPptKgkQJHUt4rIf/tpj2JSgPFhcP/HNDOzDqnAvW8SRowkuAQBUiWN8" + - "nyFkK4ztlsuu+yLFAsJK4isRYmpllFjAdxC+c3/kb/7r7mprPGfsNv9G8JtRQJSD1Ymv1Ogr" + - "gsw/8UyPIKkryFGg9Sr2Gxa6UbO+lA+OqK9yC6mwNLr10BAqLdgix/UAUISFB5mbl2BQiIdg" + - "uy/EEV+A9Em3PVuGWDlwAAAABJRU5ErkJggg==", - - STR = "", - NA = "N/A", - - gadget_klass = rJS(window), + var gadget_klass = rJS(window), templater = gadget_klass.__template_element, display_widget_table = Handlebars.compile( templater.getElementById("display-template").innerHTML ); rJS(window) - - ///////////////////////////////////////////////////////////////// - // acquired methods - ///////////////////////////////////////////////////////////////// .declareAcquiredMethod('updateHeader', 'updateHeader') .declareAcquiredMethod('jio_get', 'jio_get') - ///////////////////////////////////////////////////////////////// - // declared methods - ///////////////////////////////////////////////////////////////// .declareMethod('render', function (options) { var gadget = this; - return new RSVP.Queue() .push(function () { return gadget.jio_get(options.jio_key); }) .push(function (story) { - - if (story.image === NA || story.image === STR) { - story.image = PLACEHOLDER; + if (story.image === "N/A" || story.image === "") { + story.image = 'gadget_erp5_afs_camera.png?format=png'; story.image_class = "custom-placeholder"; } gadget.element.querySelector(".display-widget") .innerHTML = display_widget_table(story); - return gadget.updateHeader({page_title: story.title}); }); }); - -}(window, RSVP, rJS, Handlebars)); +}(window, RSVP, rJS, Handlebars)); \ No newline at end of file diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_success_case_js.xml b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_success_case_js.xml index 8d41e700387ce02daa08ab09a2a0a77f434c1ff6..890c4bca41f9f4761e820c327c0d95e8d5a98a40 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_success_case_js.xml +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_success_case_js.xml @@ -214,7 +214,7 @@ </item> <item> <key> <string>actor</string> </key> - <value> <string>3</string> </value> + <value> <string>zope</string> </value> </item> <item> <key> <string>comment</string> </key> @@ -228,7 +228,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>955.20616.5429.32785</string> </value> + <value> <string>959.45187.8875.24320</string> </value> </item> <item> <key> <string>state</string> </key> @@ -246,7 +246,7 @@ </tuple> <state> <tuple> - <float>1498641401.93</float> + <float>1496067187.24</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_success_case_list_html.html b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_success_case_list_html.html index 6e94bdf361cec0aee68d4390271bf1c48dd8edf4..1252b380cd1390206bb148ead6b12acc8e6b1c04 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_success_case_list_html.html +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_success_case_list_html.html @@ -1,16 +1,16 @@ <!Doctype html> <html> <head> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>Success Case List</title> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>Success Case List</title> + + <link rel="stylesheet" href="gadget_erp5_afs.css" /> - <link rel="stylesheet" href="gadget_erp5_afs.css" /> - - <script src="rsvp.js"></script> - <script src="renderjs.js"></script> - <script src="gadget_global.js" ></script> - <script src="gadget_erp5_page_afs_success_case_list.js"></script> + <script src="rsvp.js"></script> + <script src="renderjs.js"></script> + <script src="gadget_global.js" ></script> + <script src="gadget_erp5_page_afs_success_case_list.js"></script> </head> <body> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_success_case_list_html.xml b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_success_case_list_html.xml index dd6e6d93ec77af2dbe330845ceca63e4dc32c6ad..d0bd6627e88de3378af1a49471887dac0ca4ac4d 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_success_case_list_html.xml +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_success_case_list_html.xml @@ -250,7 +250,7 @@ </tuple> <state> <tuple> - <float>1498657524.31</float> + <float>1495467635.2</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_success_case_list_js.js b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_success_case_list_js.js index f7eb486689100830110021e6e057a3e9e3eb5913..82904f7e43e8be4a7ec331ebd5e233d4d3a318d0 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_success_case_list_js.js +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_success_case_list_js.js @@ -2,93 +2,85 @@ /*jslint indent: 2, nomen: true, maxlen: 80*/ (function (window, RSVP, rJS) { "use strict"; - - ///////////////////////////////////////////////////////////////// - // some parameters - ///////////////////////////////////////////////////////////////// - var STR = "", - QUERY = 'urn:jio:allDocs?query=portal_type:"success_case"', - SORT = 'field_listbox_sort_list:json', - COLUMN_LIST = [ - ['title', 'Title'], - ['software', 'Software'], - ['publisher', 'Publisher'], - ['industry', 'Industry'], - ['category_list', 'Software Categories'], - ['customer', 'Customer'], - ['country', 'Country'], - ['language', 'Language'] - ]; - rJS(window) - - ///////////////////////////////////////////////////////////////// - // acquired methods - ///////////////////////////////////////////////////////////////// + .declareAcquiredMethod("translate", "translate") + .declareAcquiredMethod("getUrlFor", "getUrlFor") .declareAcquiredMethod("getUrlParameter", "getUrlParameter") .declareAcquiredMethod("updateHeader", "updateHeader") - - ///////////////////////////////////////////////////////////////// - // published methods - ///////////////////////////////////////////////////////////////// + .declareAcquiredMethod("jio_allDocs", "jio_allDocs") .allowPublicAcquisition('updateHeader', function () { return; }) - .allowPublicAcquisition('getUrlParameter', function (argument_list) { return this.getUrlParameter(argument_list) .push(function (result) { - if ((result === undefined) && (argument_list[0] === SORT)) { + if ((result === undefined) && + (argument_list[0] === 'field_listbox_sort_list:json')) { return [['title', 'ascending']]; } + return result; }); }) - ///////////////////////////////////////////////////////////////// - // declared methods - ///////////////////////////////////////////////////////////////// .declareMethod("render", function () { var gadget = this; return new RSVP.Queue() + .push(function () { - return RSVP.all([ - gadget.updateHeader({page_title: "Success Story List"}), - gadget.getDeclaredGadget("form_list") - ]); + return gadget.updateHeader({ + page_title: "Success Story List" + }); }) - .push(function (result_list) { - return result_list[1].render({ - erp5_document: { - "_embedded": { - "_view": { - "listbox": { - "column_list": COLUMN_LIST, - "show_anchor": 0, - "default_params": {}, - "editable": 1, - "editable_column_list": [], - "key": "field_listbox", - "lines": 20, - "list_method": "portal_catalog", - "query": QUERY, - "portal_type": [], - "search_column_list": COLUMN_LIST, - "sort_column_list": COLUMN_LIST, - "title": "", - "type": "ListBox" - } + .push(function () { + return gadget.getDeclaredGadget("form_list"); + }) + .push(function (form_gadget) { + var column_list = [ + ['title', 'Title'], + ['software', 'Software'], + ['publisher', 'Publisher'], + ['industry', 'Industry'], + ['category_list', 'Software Categories'], + ['customer', 'Customer'], + ['country', 'Country'], + ['language', 'Language'] + ]; + + return form_gadget.render({ + erp5_document: {"_embedded": {"_view": { + "listbox": { + "column_list": column_list, + "show_anchor": 0, + "default_params": {}, + "editable": 1, + "editable_column_list": [], + "key": "field_listbox", + "lines": 20, + "list_method": "portal_catalog", + "query": 'urn:jio:allDocs?query=portal_type:"success_case"', + "portal_type": [], + "search_column_list": column_list, + "sort_column_list": column_list, + "title": "", + "type": "ListBox" + } + }}, + "_links": { + "type": { + // form_list display portal_type in header + name: "" } + } }, - "_links": {"type": {name: STR}} - }, form_definition: { - group_list: [ - ["bottom", [["listbox"]]], - ["hidden", ["listbox_modification_date"]] - ] + group_list: [[ + "bottom", + [["listbox"]] + ], + ["hidden", ["listbox_modification_date"]]] } }); }); }); -}(window, RSVP, rJS)); +}(window, RSVP, rJS)); \ No newline at end of file diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_success_case_list_js.xml b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_success_case_list_js.xml index e5eac44a163e6257a9a6ed2cabde24c66373e55b..fa827c9f33827e3a48927a834f4452886d0290cf 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_success_case_list_js.xml +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_success_case_list_js.xml @@ -214,7 +214,7 @@ </item> <item> <key> <string>actor</string> </key> - <value> <string>3</string> </value> + <value> <string>zope</string> </value> </item> <item> <key> <string>comment</string> </key> @@ -228,7 +228,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>960.25491.21351.54101</string> </value> + <value> <string>959.45122.5485.9130</string> </value> </item> <item> <key> <string>state</string> </key> @@ -246,7 +246,7 @@ </tuple> <state> <tuple> - <float>1498812721.65</float> + <float>1496067205.22</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_unsplash_js.js b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_unsplash_js.js index 7ff1774625c4bc5e22ef4183e682600f8cc45e23..826368bf55b9b1c190ac5113b3e45c205c527b32 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_unsplash_js.js +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_unsplash_js.js @@ -52,11 +52,11 @@ if (is_response) { image_dict = JSON.parse(is_response); - // I don't need the gadget hooray, just the container, so look away //gadget.element.innerHTML = + // I don't need the gadget hooray, just the container, so sorry. return template({ "message": "What can Free Software do for you?", - "src": image_dict.urls.regular + UTM, + "src": image_dict.urls.full + UTM, "alt": "Free Software", "source_url": image_dict.user.links.html + UTM, "source_title": image_dict.user.name, diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_unsplash_js.xml b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_unsplash_js.xml index 3458d0904cb68f22a80ecb357c0390004e4b2620..86b1481097e5c6d7ac2bd7a829e4320c2352158e 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_unsplash_js.xml +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_unsplash_js.xml @@ -228,7 +228,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>960.19800.9537.42137</string> </value> + <value> <string>959.45391.58217.49288</string> </value> </item> <item> <key> <string>state</string> </key> @@ -246,7 +246,7 @@ </tuple> <state> <tuple> - <float>1498491243.08</float> + <float>1496074563.45</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_site_module/afs.xml b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_site_module/afs.xml index 8f9e76c05fa34de8b7728b685a8c0af0e309a458..ab2821f58bd264725a0e27db19dd075a4e30703b 100644 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_site_module/afs.xml +++ b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_site_module/afs.xml @@ -337,7 +337,7 @@ </item> <item> <key> <string>configuration_content_security_policy</string> </key> - <value> <string>default-src \'self\'; img-src \'self\' https://images.unsplash.com * data:; media-src \'self\' blob:; connect-src \'self\' https://api.unsplash.com https://www.openhub.net https://en.wikipedia.org https://fr.wikipedia.org https://raw.githubusercontent.com https://api.github.com data:; script-src \'self\' \'unsafe-eval\'; font-src \'self\'; style-src \'self\' data:; frame-src \'self\' data:</string> </value> + <value> <string>default-src \'self\'; img-src \'self\' https://images.unsplash.com * data:; media-src \'self\' blob:; connect-src \'self\' https://api.unsplash.com https://en.wikipedia.org https://fr.wikipedia.org https://raw.githubusercontent.com https://api.github.com data:; script-src \'self\' \'unsafe-eval\'; font-src \'self\'; style-src \'self\' data:; frame-src \'self\' data:</string> </value> </item> <item> <key> <string>configuration_default_view_action_reference</string> </key> @@ -614,7 +614,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>959.31263.27499.6263</string> </value> + <value> <string>959.30886.17996.5358</string> </value> </item> <item> <key> <string>state</string> </key> @@ -632,7 +632,7 @@ </tuple> <state> <tuple> - <float>1497023079.42</float> + <float>1495226845.13</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_site_module/afs/hateoas.xml b/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_site_module/afs/hateoas.xml deleted file mode 100644 index e2eda3ea0dcc854d3b1ae986b1749c0c598aec75..0000000000000000000000000000000000000000 --- a/bt5/erp5_officejs_afs_directory/PathTemplateItem/web_site_module/afs/hateoas.xml +++ /dev/null @@ -1,481 +0,0 @@ -<?xml version="1.0"?> -<ZopeData> - <record id="1" aka="AAAAAAAAAAE="> - <pickle> - <global name="Web Section" module="erp5.portal_type"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>_Add_portal_content_Permission</string> </key> - <value> - <tuple> - <string>Assignor</string> - <string>Manager</string> - </tuple> - </value> - </item> - <item> - <key> <string>_Add_portal_folders_Permission</string> </key> - <value> - <tuple> - <string>Assignor</string> - <string>Manager</string> - </tuple> - </value> - </item> - <item> - <key> <string>_Copy_or_Move_Permission</string> </key> - <value> - <tuple> - <string>Assignor</string> - <string>Manager</string> - </tuple> - </value> - </item> - <item> - <key> <string>_Delete_objects_Permission</string> </key> - <value> - <tuple> - <string>Assignor</string> - <string>Manager</string> - </tuple> - </value> - </item> - <item> - <key> <string>_Modify_portal_content_Permission</string> </key> - <value> - <tuple> - <string>Assignee</string> - <string>Assignor</string> - <string>Manager</string> - <string>Owner</string> - </tuple> - </value> - </item> - <item> - <key> <string>__before_publishing_traverse__</string> </key> - <value> - <object> - <klass> - <global name="MultiHook" module="ZPublisher.BeforeTraverse"/> - </klass> - <tuple/> - <state> - <dictionary> - <item> - <key> <string>_defined_in_class</string> </key> - <value> <int>1</int> </value> - </item> - <item> - <key> <string>_hookname</string> </key> - <value> <string>__before_publishing_traverse__</string> </value> - </item> - <item> - <key> <string>_list</string> </key> - <value> - <list> - <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> - </list> - </value> - </item> - <item> - <key> <string>_prior</string> </key> - <value> - <none/> - </value> - </item> - </dictionary> - </state> - </object> - </value> - </item> - <item> - <key> <string>__before_traverse__</string> </key> - <value> - <dictionary> - <item> - <key> - <tuple> - <int>99</int> - <string>ERP5 Web Section/hateoas</string> - </tuple> - </key> - <value> - <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> - </value> - </item> - </dictionary> - </value> - </item> - <item> - <key> <string>__translation_dict</string> </key> - <value> - <dictionary/> - </value> - </item> - <item> - <key> <string>_count</string> </key> - <value> - <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> - </value> - </item> - <item> - <key> <string>_identity_criterion</string> </key> - <value> - <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent> - </value> - </item> - <item> - <key> <string>_local_properties</string> </key> - <value> - <tuple> - <dictionary> - <item> - <key> <string>id</string> </key> - <value> <string>default_view_action_reference</string> </value> - </item> - <item> - <key> <string>type</string> </key> - <value> <string>string</string> </value> - </item> - </dictionary> - <dictionary> - <item> - <key> <string>id</string> </key> - <value> <string>view_action_category</string> </value> - </item> - <item> - <key> <string>type</string> </key> - <value> <string>string</string> </value> - </item> - </dictionary> - <dictionary> - <item> - <key> <string>id</string> </key> - <value> <string>configuration_login</string> </value> - </item> - <item> - <key> <string>type</string> </key> - <value> <string>string</string> </value> - </item> - </dictionary> - <dictionary> - <item> - <key> <string>id</string> </key> - <value> <string>configuration_logout</string> </value> - </item> - <item> - <key> <string>type</string> </key> - <value> <string>string</string> </value> - </item> - </dictionary> - </tuple> - </value> - </item> - <item> - <key> <string>_mt_index</string> </key> - <value> - <persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent> - </value> - </item> - <item> - <key> <string>_range_criterion</string> </key> - <value> - <persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent> - </value> - </item> - <item> - <key> <string>_tree</string> </key> - <value> - <persistent> <string encoding="base64">AAAAAAAAAAc=</string> </persistent> - </value> - </item> - <item> - <key> <string>categories</string> </key> - <value> - <tuple> - <string>caching_policy/hateoas</string> - </tuple> - </value> - </item> - <item> - <key> <string>configuration_login</string> </key> - <value> <string>connection/login_form{?came_from}</string> </value> - </item> - <item> - <key> <string>configuration_logout</string> </key> - <value> <string>connection/WebSite_logout{?came_from}</string> </value> - </item> - <item> - <key> <string>container_layout</string> </key> - <value> <string>ERP5Document_getHateoas</string> </value> - </item> - <item> - <key> <string>content_layout</string> </key> - <value> <string>ERP5Document_getHateoas</string> </value> - </item> - <item> - <key> <string>custom_render_method_id</string> </key> - <value> <string>ERP5Document_getHateoas</string> </value> - </item> - <item> - <key> <string>default_view_action_reference</string> </key> - <value> <string>view</string> </value> - </item> - <item> - <key> <string>description</string> </key> - <value> - <none/> - </value> - </item> - <item> - <key> <string>empty_criterion_valid</string> </key> - <value> <int>0</int> </value> - </item> - <item> - <key> <string>id</string> </key> - <value> <string>hateoas</string> </value> - </item> - <item> - <key> <string>layout_configuration_form_id</string> </key> - <value> <string>WebSection_viewHateoasPreference</string> </value> - </item> - <item> - <key> <string>portal_type</string> </key> - <value> <string>Web Section</string> </value> - </item> - <item> - <key> <string>short_title</string> </key> - <value> - <none/> - </value> - </item> - <item> - <key> <string>skin_selection_name</string> </key> - <value> <string>HalRestricted</string> </value> - </item> - <item> - <key> <string>title</string> </key> - <value> <string>Restricted Hateoas</string> </value> - </item> - <item> - <key> <string>view_action_category</string> </key> - <value> <string>object_view</string> </value> - </item> - <item> - <key> <string>visible</string> </key> - <value> <int>1</int> </value> - </item> - <item> - <key> <string>workflow_history</string> </key> - <value> - <persistent> <string encoding="base64">AAAAAAAAAAg=</string> </persistent> - </value> - </item> - </dictionary> - </pickle> - </record> - <record id="2" aka="AAAAAAAAAAI="> - <pickle> - <global name="WebSectionTraversalHook" module="Products.ERP5.Document.WebSection"/> - </pickle> - <pickle> - <dictionary/> - </pickle> - </record> - <record id="3" aka="AAAAAAAAAAM="> - <pickle> - <global name="Length" module="BTrees.Length"/> - </pickle> - <pickle> <int>0</int> </pickle> - </record> - <record id="4" aka="AAAAAAAAAAQ="> - <pickle> - <global name="PersistentMapping" module="Persistence.mapping"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>data</string> </key> - <value> - <dictionary/> - </value> - </item> - </dictionary> - </pickle> - </record> - <record id="5" aka="AAAAAAAAAAU="> - <pickle> - <global name="OOBTree" module="BTrees.OOBTree"/> - </pickle> - <pickle> - <none/> - </pickle> - </record> - <record id="6" aka="AAAAAAAAAAY="> - <pickle> - <global name="PersistentMapping" module="Persistence.mapping"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>data</string> </key> - <value> - <dictionary/> - </value> - </item> - </dictionary> - </pickle> - </record> - <record id="7" aka="AAAAAAAAAAc="> - <pickle> - <global name="OOBTree" module="BTrees.OOBTree"/> - </pickle> - <pickle> - <none/> - </pickle> - </record> - <record id="8" aka="AAAAAAAAAAg="> - <pickle> - <global name="PersistentMapping" module="Persistence.mapping"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>data</string> </key> - <value> - <dictionary> - <item> - <key> <string>category_publication_workflow</string> </key> - <value> - <persistent> <string encoding="base64">AAAAAAAAAAk=</string> </persistent> - </value> - </item> - <item> - <key> <string>edit_workflow</string> </key> - <value> - <persistent> <string encoding="base64">AAAAAAAAAAo=</string> </persistent> - </value> - </item> - </dictionary> - </value> - </item> - </dictionary> - </pickle> - </record> - <record id="9" aka="AAAAAAAAAAk="> - <pickle> - <global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/> - </pickle> - <pickle> - <tuple> - <none/> - <list> - <dictionary> - <item> - <key> <string>action</string> </key> - <value> - <none/> - </value> - </item> - <item> - <key> <string>actor</string> </key> - <value> <string>zope</string> </value> - </item> - <item> - <key> <string>comment</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>error_message</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>time</string> </key> - <value> - <object> - <klass> - <global name="DateTime" module="DateTime.DateTime"/> - </klass> - <tuple> - <none/> - </tuple> - <state> - <tuple> - <float>1472632323.86</float> - <string>UTC</string> - </tuple> - </state> - </object> - </value> - </item> - <item> - <key> <string>validation_state</string> </key> - <value> <string>embedded</string> </value> - </item> - </dictionary> - </list> - </tuple> - </pickle> - </record> - <record id="10" aka="AAAAAAAAAAo="> - <pickle> - <global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/> - </pickle> - <pickle> - <tuple> - <none/> - <list> - <dictionary> - <item> - <key> <string>action</string> </key> - <value> <string>edit</string> </value> - </item> - <item> - <key> <string>actor</string> </key> - <value> <string>zope</string> </value> - </item> - <item> - <key> <string>comment</string> </key> - <value> - <none/> - </value> - </item> - <item> - <key> <string>error_message</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>serial</string> </key> - <value> <string>953.39264.4304.36881</string> </value> - </item> - <item> - <key> <string>state</string> </key> - <value> <string>current</string> </value> - </item> - <item> - <key> <string>time</string> </key> - <value> - <object> - <klass> - <global name="DateTime" module="DateTime.DateTime"/> - </klass> - <tuple> - <none/> - </tuple> - <state> - <tuple> - <float>1473844454.31</float> - <string>UTC</string> - </tuple> - </state> - </object> - </value> - </item> - </dictionary> - </list> - </tuple> - </pickle> - </record> -</ZopeData> diff --git a/bt5/erp5_officejs_afs_directory/SkinTemplateItem/portal_skins/erp5_officejs_afs.xml b/bt5/erp5_officejs_afs_directory/SkinTemplateItem/portal_skins/erp5_officejs_afs.xml deleted file mode 100644 index 18de2758f4fdf56189d95141cdf7eaff0365dd47..0000000000000000000000000000000000000000 --- a/bt5/erp5_officejs_afs_directory/SkinTemplateItem/portal_skins/erp5_officejs_afs.xml +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0"?> -<ZopeData> - <record id="1" aka="AAAAAAAAAAE="> - <pickle> - <global name="Folder" module="OFS.Folder"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>_local_properties</string> </key> - <value> - <tuple/> - </value> - </item> - <item> - <key> <string>_objects</string> </key> - <value> - <tuple/> - </value> - </item> - <item> - <key> <string>id</string> </key> - <value> <string>erp5_officejs_afs</string> </value> - </item> - <item> - <key> <string>title</string> </key> - <value> <string></string> </value> - </item> - </dictionary> - </pickle> - </record> -</ZopeData> diff --git a/bt5/erp5_officejs_afs_directory/SkinTemplateItem/portal_skins/erp5_officejs_afs/Software_getAnalysis.py b/bt5/erp5_officejs_afs_directory/SkinTemplateItem/portal_skins/erp5_officejs_afs/Software_getAnalysis.py deleted file mode 100644 index a3aaf8e195cc3a46dcb6f447575e076055adc1d4..0000000000000000000000000000000000000000 --- a/bt5/erp5_officejs_afs_directory/SkinTemplateItem/portal_skins/erp5_officejs_afs/Software_getAnalysis.py +++ /dev/null @@ -1,18 +0,0 @@ -from Products.ERP5Type.Cache import CachingMethod - -if url == None: - raise Exception("No url parameter provided.") - -# XXX will only work for instances without authentication -context.REQUEST.response.setHeader("Access-Control-Allow-Origin", "*") - -def retrieveOpenhubAnalysis(url): - return context.Software_getOpenHubLatestAnalysis(url) - -retrieveOpenhubAnalysis = CachingMethod( - retrieveOpenhubAnalysis, - id="retrieveOpenhubAnalysis", - cache_factory="erp5_content_long" -) - -return retrieveOpenhubAnalysis(url) diff --git a/bt5/erp5_officejs_afs_directory/SkinTemplateItem/portal_skins/erp5_officejs_afs/Software_getAnalysis.xml b/bt5/erp5_officejs_afs_directory/SkinTemplateItem/portal_skins/erp5_officejs_afs/Software_getAnalysis.xml deleted file mode 100644 index faf7162f45d4e53a3347eb116aab5556818e5c95..0000000000000000000000000000000000000000 --- a/bt5/erp5_officejs_afs_directory/SkinTemplateItem/portal_skins/erp5_officejs_afs/Software_getAnalysis.xml +++ /dev/null @@ -1,62 +0,0 @@ -<?xml version="1.0"?> -<ZopeData> - <record id="1" aka="AAAAAAAAAAE="> - <pickle> - <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>Script_magic</string> </key> - <value> <int>3</int> </value> - </item> - <item> - <key> <string>_bind_names</string> </key> - <value> - <object> - <klass> - <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> - </klass> - <tuple/> - <state> - <dictionary> - <item> - <key> <string>_asgns</string> </key> - <value> - <dictionary> - <item> - <key> <string>name_container</string> </key> - <value> <string>container</string> </value> - </item> - <item> - <key> <string>name_context</string> </key> - <value> <string>context</string> </value> - </item> - <item> - <key> <string>name_m_self</string> </key> - <value> <string>script</string> </value> - </item> - <item> - <key> <string>name_subpath</string> </key> - <value> <string>traverse_subpath</string> </value> - </item> - </dictionary> - </value> - </item> - </dictionary> - </state> - </object> - </value> - </item> - <item> - <key> <string>_params</string> </key> - <value> <string>url=None</string> </value> - </item> - <item> - <key> <string>id</string> </key> - <value> <string>Software_getAnalysis</string> </value> - </item> - </dictionary> - </pickle> - </record> -</ZopeData> diff --git a/bt5/erp5_officejs_afs_directory/SkinTemplateItem/portal_skins/erp5_officejs_afs/Software_getAndStoreAnalysisList.py b/bt5/erp5_officejs_afs_directory/SkinTemplateItem/portal_skins/erp5_officejs_afs/Software_getAndStoreAnalysisList.py deleted file mode 100644 index 9af4033260da1d1d4304b7d4d713c9c6849be826..0000000000000000000000000000000000000000 --- a/bt5/erp5_officejs_afs_directory/SkinTemplateItem/portal_skins/erp5_officejs_afs/Software_getAndStoreAnalysisList.py +++ /dev/null @@ -1,31 +0,0 @@ -from Products.ERP5Type.Cache import CachingMethod - -def retrieveOpenhubAnalysis(url): - return context.Software_getOpenHubLatestAnalysis(url) - -retrieveOpenhubAnalysis = CachingMethod( - retrieveOpenhubAnalysis, - id="retrieveOpenhubAnalysis", - cache_factory="erp5_content_long" -) - -def retrieveAndStoreOpenHubAnalysisXml(): - profile_url_list = context.Software_getAndStoreOpenHubLatestAnalysisList() - for profile_url in profile_url_list: - xml_content = retrieveOpenhubAnalysis(profile_url) - #context.document.newContent( - # portal_type='Embedded File', - # id=profile_url + '.xml', - # file=xml_content, - # filename=profile_url + '.xml' - # language='en' - #) - #context.document.publishAlive() - -retrieveAndStoreOpenHubAnalysisXml = CachingMethod( - retrieveAndStoreOpenHubAnalysisXml, - id="retrieveAndStoreOpenHubAnalysisXml", - cache_factory="erp5_content_long" -) - -return retrieveAndStoreOpenHubAnalysisXml() diff --git a/bt5/erp5_officejs_afs_directory/SkinTemplateItem/portal_skins/erp5_officejs_afs/Software_getAndStoreAnalysisList.xml b/bt5/erp5_officejs_afs_directory/SkinTemplateItem/portal_skins/erp5_officejs_afs/Software_getAndStoreAnalysisList.xml deleted file mode 100644 index 12b5a91ef2de044f9a589f4813d54dc20885fbc7..0000000000000000000000000000000000000000 --- a/bt5/erp5_officejs_afs_directory/SkinTemplateItem/portal_skins/erp5_officejs_afs/Software_getAndStoreAnalysisList.xml +++ /dev/null @@ -1,62 +0,0 @@ -<?xml version="1.0"?> -<ZopeData> - <record id="1" aka="AAAAAAAAAAE="> - <pickle> - <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>Script_magic</string> </key> - <value> <int>3</int> </value> - </item> - <item> - <key> <string>_bind_names</string> </key> - <value> - <object> - <klass> - <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> - </klass> - <tuple/> - <state> - <dictionary> - <item> - <key> <string>_asgns</string> </key> - <value> - <dictionary> - <item> - <key> <string>name_container</string> </key> - <value> <string>container</string> </value> - </item> - <item> - <key> <string>name_context</string> </key> - <value> <string>context</string> </value> - </item> - <item> - <key> <string>name_m_self</string> </key> - <value> <string>script</string> </value> - </item> - <item> - <key> <string>name_subpath</string> </key> - <value> <string>traverse_subpath</string> </value> - </item> - </dictionary> - </value> - </item> - </dictionary> - </state> - </object> - </value> - </item> - <item> - <key> <string>_params</string> </key> - <value> <string>url=None</string> </value> - </item> - <item> - <key> <string>id</string> </key> - <value> <string>Software_getAndStoreAnalysisList</string> </value> - </item> - </dictionary> - </pickle> - </record> -</ZopeData> diff --git a/bt5/erp5_officejs_afs_directory/SkinTemplateItem/portal_skins/erp5_officejs_afs/Software_getAndStoreOpenHubLatestAnalysisList.xml b/bt5/erp5_officejs_afs_directory/SkinTemplateItem/portal_skins/erp5_officejs_afs/Software_getAndStoreOpenHubLatestAnalysisList.xml deleted file mode 100644 index 78c7d0000d7554538da865dc848ce45f0c638baa..0000000000000000000000000000000000000000 --- a/bt5/erp5_officejs_afs_directory/SkinTemplateItem/portal_skins/erp5_officejs_afs/Software_getAndStoreOpenHubLatestAnalysisList.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0"?> -<ZopeData> - <record id="1" aka="AAAAAAAAAAE="> - <pickle> - <global name="ExternalMethod" module="Products.ExternalMethod.ExternalMethod"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>_function</string> </key> - <value> <string>fetchOpenHubProfileListAsXml</string> </value> - </item> - <item> - <key> <string>_module</string> </key> - <value> <string>AfsOpenHub</string> </value> - </item> - <item> - <key> <string>id</string> </key> - <value> <string>Software_getAndStoreOpenHubLatestAnalysisList</string> </value> - </item> - <item> - <key> <string>title</string> </key> - <value> <string></string> </value> - </item> - </dictionary> - </pickle> - </record> -</ZopeData> diff --git a/bt5/erp5_officejs_afs_directory/SkinTemplateItem/portal_skins/erp5_officejs_afs/Software_getOpenHubLatestAnalysis.xml b/bt5/erp5_officejs_afs_directory/SkinTemplateItem/portal_skins/erp5_officejs_afs/Software_getOpenHubLatestAnalysis.xml deleted file mode 100644 index 589b4511444e6755a47e42db6d65983ad13035a3..0000000000000000000000000000000000000000 --- a/bt5/erp5_officejs_afs_directory/SkinTemplateItem/portal_skins/erp5_officejs_afs/Software_getOpenHubLatestAnalysis.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0"?> -<ZopeData> - <record id="1" aka="AAAAAAAAAAE="> - <pickle> - <global name="ExternalMethod" module="Products.ExternalMethod.ExternalMethod"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>_function</string> </key> - <value> <string>getLatestAnalysesAsXml</string> </value> - </item> - <item> - <key> <string>_module</string> </key> - <value> <string>AfsOpenHub</string> </value> - </item> - <item> - <key> <string>id</string> </key> - <value> <string>Software_getOpenHubLatestAnalysis</string> </value> - </item> - <item> - <key> <string>title</string> </key> - <value> <string></string> </value> - </item> - </dictionary> - </pickle> - </record> -</ZopeData> diff --git a/bt5/erp5_officejs_afs_directory/bt/template_extension_id_list b/bt5/erp5_officejs_afs_directory/bt/template_extension_id_list deleted file mode 100644 index dd9fcc61bda9af9f9f74b9fd865f4f44f5347bbb..0000000000000000000000000000000000000000 --- a/bt5/erp5_officejs_afs_directory/bt/template_extension_id_list +++ /dev/null @@ -1 +0,0 @@ -extension.erp5.AfsOpenHub \ No newline at end of file diff --git a/bt5/erp5_officejs_afs_directory/bt/template_keep_last_workflow_history_only_path_list b/bt5/erp5_officejs_afs_directory/bt/template_keep_last_workflow_history_only_path_list index 34fa30649d343add33af941931ada403eb47b056..57ead0857585c270b1487267fdb2a5af462bc75d 100644 --- a/bt5/erp5_officejs_afs_directory/bt/template_keep_last_workflow_history_only_path_list +++ b/bt5/erp5_officejs_afs_directory/bt/template_keep_last_workflow_history_only_path_list @@ -1,4 +1,5 @@ web_page_module/gadget_erp5_afs* web_page_module/gadget_erp5_page_afs* +image_module/gadget_erp5_afs* web_site_module/afs web_site_module/afs/** \ No newline at end of file diff --git a/bt5/erp5_officejs_afs_directory/bt/template_keep_workflow_path_list b/bt5/erp5_officejs_afs_directory/bt/template_keep_workflow_path_list index 34fa30649d343add33af941931ada403eb47b056..57ead0857585c270b1487267fdb2a5af462bc75d 100644 --- a/bt5/erp5_officejs_afs_directory/bt/template_keep_workflow_path_list +++ b/bt5/erp5_officejs_afs_directory/bt/template_keep_workflow_path_list @@ -1,4 +1,5 @@ web_page_module/gadget_erp5_afs* web_page_module/gadget_erp5_page_afs* +image_module/gadget_erp5_afs* web_site_module/afs web_site_module/afs/** \ No newline at end of file diff --git a/bt5/erp5_officejs_afs_directory/bt/template_path_list b/bt5/erp5_officejs_afs_directory/bt/template_path_list index 34fa30649d343add33af941931ada403eb47b056..030e50fd30a89383ef593047e77adec27569aebf 100644 --- a/bt5/erp5_officejs_afs_directory/bt/template_path_list +++ b/bt5/erp5_officejs_afs_directory/bt/template_path_list @@ -1,3 +1,4 @@ +image_module/gadget_erp5_afs* web_page_module/gadget_erp5_afs* web_page_module/gadget_erp5_page_afs* web_site_module/afs diff --git a/bt5/erp5_officejs_afs_directory/bt/template_skin_id_list b/bt5/erp5_officejs_afs_directory/bt/template_skin_id_list deleted file mode 100644 index 2d6454cd675415629249150b0183f249fdd0c84e..0000000000000000000000000000000000000000 --- a/bt5/erp5_officejs_afs_directory/bt/template_skin_id_list +++ /dev/null @@ -1 +0,0 @@ -erp5_officejs_afs \ No newline at end of file