1. 24 Apr, 2017 1 commit
  2. 21 Apr, 2017 4 commits
    • Eugene Shen's avatar
      3ac6381b
    • Eugene Shen's avatar
      Fix enough miscellaneous bugs to pass all tests · 48f7d3fb
      Eugene Shen authored
      Split local Text Post storage from the configurator Person storage,
      completely rewrite URL matching regexp, handle Handlebars' =,
      add field in MappingStorage to keep mapping in the main document,
      always set that to true, wrap custom configs in MappingStorages,
      use Rusha to generate SHA1 hashes of JSON messages for mapping,
      set dav_url as the value of its input and not the placeholder,
      rename connect-form to storage-form to avoid style conflicts,
      wrap labels and inputs by <label>, prepend "chat-" to stuff,
      remove all line breaks from all forms, make email readonly,
      prepend https:// instead of http:// to protocol-less URLs,
      update join_time on actual join instead of jIO discovery,
      use has_joined instead of message_count > 0 for joining,
      create all queries as modifications to a general_query,
      stop repairing the non-replicate configurator storage,
      shift the chat-hidden class instead of style.display,
      and leave all the things with XXX to future commits!
      48f7d3fb
    • Eugene Shen's avatar
      Align chat with OfficeJS standards · 97465970
      Eugene Shen authored
      Remove all chat-specific modifications to common OfficeJS files
      such as erp5_launcher_nojqm.js and gadget_erp5_nojqm.css;
      copy the latest version of gadget_erp5_nojqm.css into
      gadget_erp5_nojquery.css and only add FontAwesome icons;
      keep all chat-specific styles in gadget_erp5_chat.css,
      including input padding, button colours, and a hidden class;
      add chat_connect and chat_disconnect pages to chat_panel.html;
      rename all configurator page titles from "Gadget" to "Page";
      and only store Persons in the local configurator IndexedDB.
      97465970
    • Eugene Shen's avatar
      Add chat_disconnect page and Rusha hashing module · 23d55cdb
      Eugene Shen authored
      Add gadget_erp5_page_chat_disconnect to clear settings and redirect;
      remove line breaks and prepend "chat-" to chat-specific classes;
      and add Rusha in preparation of future hash-related adventures.
      23d55cdb
  3. 14 Apr, 2017 4 commits
    • Eugene Shen's avatar
      Fix duplication error using MappingStorage · 62f0bebc
      Eugene Shen authored
      Put MappingStorage over ERP5Storage to map the proper mappings,
      by replacing its relative_url IDs with the mapping property.
      
      Change other minor things: sort only by date_ms, not content,
      rename author to sender as per the commit before the last commit,
      store only the epoch time in milliseconds in messages, not Dates,
      and keep only the raw nameToId in id_to_name, not chat-contact-.
      62f0bebc
    • Eugene Shen's avatar
      Bring back MappingStorage to try again · 3f6d1dd5
      Eugene Shen authored
      Bring back MappingStorage to deal with more duplication bugs,
      but remove Handlebars because the erp5_officejs bt5 already has it.
      3f6d1dd5
    • Eugene Shen's avatar
      Make Text Posts work with MappingStorage · df09162f
      Eugene Shen authored
      Rename mapping_id to mapping, because that makes mappings show up,
      add TextPost_viewAsJio, because that's the default_view_reference,
      rename sender to author, because that makes senders queryable,
      and add mapping as a searchable text property, because of the above.
      df09162f
    • Eugene Shen's avatar
      4bbcd3de
  4. 13 Apr, 2017 1 commit
  5. 12 Apr, 2017 2 commits
    • Eugene Shen's avatar
      Refactor and JSLint configurator files · 510cf1a7
      Eugene Shen authored
      Store only text content in jIO instead of the full stringified message,
      rename message properties and recolour old messages to deal with that,
      move jIO and MappingStorage scripts around in chat box and room HTML,
      use room in queries because room is in the TextPost property sheet,
      make the chat box redirect to chat connect if user_email is falsy,
      completely refactor configurator files to delete custom settings,
      remove requireSetting, and pass JSLint on all of them; finally,
      store ID in mapping_id property in preparation for more fun.
      510cf1a7
    • Eugene Shen's avatar
      Add Text Post and last workflow history to bt5 · da50ea6d
      Eugene Shen authored
      Add the text_post_module module, the erp5_text_post skin folder,
      the TextPost property sheet, the last workflow history of all files,
      and the Text Post (Module) portal types, workflows, actions, etc.
      to the business template, along with the associated XML updates.
      
      Remove erp5_page_launcher.html and erp5_page_launcher.js because
      all my custom modifications were completely unnecessary, and
      add officejs_chat_launcher.html to use the custom chat CSS
      and jio_mappingstorage_js for future fun with jIO mapping storage.
      da50ea6d
  6. 10 Apr, 2017 2 commits
    • Eugene Shen's avatar
      Load contacts from Person module in ERP5 · 4eb4efd5
      Eugene Shen authored
      4eb4efd5
    • Eugene Shen's avatar
      Update bt5 with missing Web Pages · ef07ce8b
      Eugene Shen authored
      Update IDs of missing Web Pages to add them to the business template:
      erp5_page_launcher.html, gadget_erp5_chat.css,
      gadget_erp5_chat_header.html, gadget_erp5_chat_header.js,
      gadget_erp5_page_jio_configurator.html, and
      gadget_erp5_page_jio_configurator.js.
      Also add the Web Site officejs_chat.
      
      Remove contact list from the panel gadget and delete its Web Pages:
      gadget_erp5_page_contact_add.html, gadget_erp5_page_contact_add.js,
      gdaget_erp5_page_contact_list.html, gadget_erp5_page_contact_list.js,
      gadget_erp5_page_jio_person_view.html, and
      gadget_erp5_page_jio_person_view.js.
      ef07ce8b
  7. 07 Apr, 2017 3 commits
    • Eugene Shen's avatar
      Actually add chat room gadget to bt5 · 69670067
      Eugene Shen authored
      Add gadget_erp5_chat_room to the business template after forgetting to,
      remove fast priority queue because everything is already sorted,
      and make both contact list and chat list scroll with a fixed height.
      69670067
    • Eugene Shen's avatar
      Thoroughly validate polling logic · 05a213ef
      Eugene Shen authored
      05a213ef
    • Eugene Shen's avatar
      Add polling time list and fix minor bugs · 2b146ccf
      Eugene Shen authored
      Remove FastPriorityQueue because jIO already sorts everything
      and gadget.state.message_list_dict[room] is always sorted,
      fix the merge algorithm to not use a priority queue at all,
      add POLL_DELAY_LIST to customize increasing polling intervals,
      add current_refresh_dict as a mutex over refreshChat(),
      and add requirements to function docstrings.
      2b146ccf
  8. 04 Apr, 2017 2 commits
  9. 31 Mar, 2017 1 commit
  10. 28 Mar, 2017 1 commit
  11. 03 Mar, 2017 2 commits
  12. 01 Mar, 2017 1 commit
    • Eugene Shen's avatar
      Squeeze WebRTC authentication into chat panel · b9917283
      Eugene Shen authored
      Make WebRTC gadget spawn a new hidden div inside the chat panel
      instead of indefinitely expanding downwards, highlight current room,
      remove automatic login and authentication, add field for hateoas URL,
      move all utility functions such as logError into gadget_global.js,
      add hasOwnProperty, send join/quit notifications in bundles once more,
      fix cannot-make-second-connection bug by resetting host candidate,
      change declareService to submit onEvent, split submit buttons among
      separate forms, and declare chat panel functions as gadget methods.
      b9917283
  13. 24 Feb, 2017 1 commit
    • Eugene Shen's avatar
      Implement multi-room messaging · af967d44
      Eugene Shen authored
      Add font, remove unused JIO Mapping Storage,
      split chat box into contacts and chats tabs,
      only send join and leave notifications to others,
      add message colours, change styles with favicons,
      declare new WebRTC gadgets for every room connection,
      create new room with their own names for each client,
      manage more query values in parent gadget with less code,
      generate Dropbox link to stuff URL queries as state info,
      prepare parseParams to handle new connections from the panel,
      strip whitespaces, delete "my_", remove line breaks with CSS,
      understand how queues in .ready() block .declareService() forever,
      and finally, use flexbox CSS to completely overhaul look and feel.
      af967d44
  14. 22 Feb, 2017 1 commit
    • Eugene Shen's avatar
      Flatten gadget hierarchy and purify WebRTC gadget · 01b24062
      Eugene Shen authored
      Instead of having chat_panel as a subgadget of chat_webrtc,
      both chat_panel and chat_webrtc are direct subgadgets of chat.
      Strip out all chat-related functions and variables from chat_webrtc,
      so that it can be used for non-chat-related purposes in the future.
      Bundle state variables into dictionaries for cross-gadget passing.
      Completely rewrite HTML structure to reflect a linear hierarchy.
      Fully document and augment existing URL query parameters.
      Replace all var declarations with let or const from ES6.
      Modify chat panel message_list and last_message_dict
      to prepare for multi-room messaging, coming soon.
      01b24062
  15. 20 Feb, 2017 1 commit
    • Eugene Shen's avatar
      Synchronize text posts across Dropbox and WebDAV · 6ee093ae
      Eugene Shen authored
      Allow users to configure storage synchronization options during login,
      with the choice of ERP5, Dropbox, WebDAV, or no remote storage.
      Remove gadget_erp5_chat_login by merging it with the main page.
      Use mapping storage and remove peer_source from messages.
      6ee093ae
  16. 16 Feb, 2017 1 commit
    • Eugene Shen's avatar
      Use replicate storage and request smaller bundles · f5c87f9c
      Eugene Shen authored
      Store all chats as Text Posts using ERP5 in a replicate storage.
      Synchronize divergent chats through a three-step process:
      1. send doubler (request a request from the host)
         receive request (get dict of host's last-seen messages)
      2. send archive (give all new messages to the host)
         receive doubler (get after host is fully updated)
      3. send request (give dict of your last-seen messages)
         receive archive (get all new messages from all peers)
      
      This means that Space Chat now synchronizes correctly even when
      peers disconnect from each other, and all chat messages will
      eventually be stored on ERP5 as soon as one peer reconnects.
      f5c87f9c
  17. 14 Feb, 2017 1 commit
    • Eugene Shen's avatar
      Allow authentication using ERP5 · bb0d31e5
      Eugene Shen authored
      Co-opt Webrtc Rooms module to directly store negotiations as attributes,
      integrate Space Chat with ERP5 and pass parameters through the URL,
      move Dropbox main login page, and make authentication more robust.
      bb0d31e5
  18. 10 Feb, 2017 1 commit
    • Eugene Shen's avatar
      Add miscellaneous chat functionality · 6cdfcbfa
      Eugene Shen authored
      Abstract WebRTC signalling to prepare for ERP5,
      detect client browser unloading and send message,
      directly display URLs of images as an actual <img>,
      add global "notifications" such as joining and /help,
      clean names to avoid OAuth2 state conflicts in the URL,
      make Dropbox authentication more robust against failures,
      and parse non-image URLs as <a> using a regular expression.
      6cdfcbfa
  19. 08 Feb, 2017 1 commit
    • Eugene Shen's avatar
      Initialize erp5_space_chat gadget · 6a2c3380
      Eugene Shen authored
      Add initial files for space chat project. Features include:
      - Real-time text-based communication system over WebRTC
      - Modular chat separation into 'folders' and 'rooms'
      - Multiple signalling options, including text or Dropbox
      - Configurable local storages like IndexedDB using jIO
      - Follows WebRTC best practices by using adapter.js shim
      - Adjustable polling behaviour for managing Dropbox offers
      - Powerful offline synchronization algorithms within rooms
      
      Actually none of the above are even features, this chat is very bad.
      
      The file list is:
      - adapter.js: shim for cross-browser WebRTC compatibility
      - fast_priority_queue.js: by adamhooper, for sorting messages
      - gadget_erp5_chat: main chat gadget, contains local storage and login
      - gadget_erp5_chat_login: gadget to get name, folder, and room from user
      - gadget_erp5_chat_webrtc: WebRTC signalling gadget to open communications
      - gadget_erp5_chat_panel: actual chat gadget, has all the chatting functions
      6a2c3380
  20. 06 Feb, 2017 2 commits
  21. 03 Feb, 2017 1 commit
  22. 02 Feb, 2017 5 commits
    • Gabriel Monnerat's avatar
      Fix property type validity consistency · e1c9d477
      Gabriel Monnerat authored
      Fix inconsistencies from gadgets
      
      /cc @jerome 
      
      /reviewed-on !225
      e1c9d477
    • Gabriel Monnerat's avatar
      erp5_knowledge_pad: Fix inconsistency with preferred_height and... · 5bb901df
      Gabriel Monnerat authored
      erp5_knowledge_pad: Fix inconsistency with preferred_height and preferred_width in google_maps gadget
      
      ERP5Type.ConsistencyMessage for PropertyTypeValidity type_check on portal_gadgets/google_maps (message: Attribute preferred_width should be of type string but is of type <type 'int'>)
      ERP5Type.ConsistencyMessage for PropertyTypeValidity type_check on portal_gadgets/google_maps (message: Attribute preferred_height should be of type string but is of type <type 'int'>)
      5bb901df
    • Gabriel Monnerat's avatar
      erp5_knowledge_pad: Fix inconsistency with preferred_height and... · 51907bce
      Gabriel Monnerat authored
      erp5_knowledge_pad: Fix inconsistency with preferred_height and preferred_width in google_calendar gadget
      
      ERP5Type.ConsistencyMessage for PropertyTypeValidity type_check on portal_gadgets/google_calendar (message: Attribute preferred_width should be of type string but is of type <type 'int'>)
      ERP5Type.ConsistencyMessage for PropertyTypeValidity type_check on portal_gadgets/google_calendar (message: Attribute preferred_height should be of type string but is of type <type 'int'>)
      51907bce
    • Gabriel Monnerat's avatar
      erp5_knowledge_pad: Fix inconsistency with preferred_height and... · 6f85d5ac
      Gabriel Monnerat authored
      erp5_knowledge_pad: Fix inconsistency with preferred_height and preferred_width in google_search gadget
      
      ERP5Type.ConsistencyMessage for PropertyTypeValidity type_check on portal_gadgets/google_search (message: Attribute preferred_width should be of type string but is of type <type 'int'>)
      ERP5Type.ConsistencyMessage for PropertyTypeValidity type_check on portal_gadgets/google_search (message: Attribute preferred_height should be of type string but is of type <type 'int'>)
      6f85d5ac
    • Gabriel Monnerat's avatar
      erp5_knowledge_pad: Fix inconsistency with preferred_width and preferred_height in clock gadget · 363c0c71
      Gabriel Monnerat authored
      ERP5Type.ConsistencyMessage for PropertyTypeValidity type_check on portal_gadgets/clock (message: Attribute preferred_width should be of type string but is of type <type 'int'>)
      ERP5Type.ConsistencyMessage for PropertyTypeValidity type_check on portal_gadgets/clock (message: Attribute preferred_height should be of type string but is of type <type 'int'>)
      363c0c71
  23. 01 Feb, 2017 1 commit