Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
erp5 erp5
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 136
    • Merge requests 136
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • erp5erp5
  • Merge requests
  • !321

Merged
Created Jul 10, 2017 by Jérome Perrin@jeromeOwner

Repair graph editor

  • Overview 8
  • Commits 12
  • Changes 20

graph_editor was using rsvp.Monitor in order to dynamically add new promises to the chain of promise in its declareService promise. New DOM elements were added during gadget's lifetime and and event handler on these new elements was added to the chain of promise by using monitor method of a monitor instance which was returned in declareService.

rsvp.js included in erp5_xhml_style exported Monitor, but this was removed in af9c57db . If I understand correctly, this is now included in renderjs, but it's only internal.

So this old way of doing is not longer possible. We realized that instead of dynamically setting dblclick event handlers to each graph node elements, we could simply rely on event bubbling and use a event handler on the parent DOM element. Also, we used renderjs builtin onEvent that makes event callback function executed in the promise chain .

At this stage we did not try to switch all event handling to this approach of using a "global" event handler on the parent DOM, because the goal here was just repairing the graph editor and making sure we have tests running. Also jsplumb uses its own event system.

To enable tests for this:

  • Running the existing qunit test through Zelenium. As far as I know we cannot run qunit test as part of ERP5 test suite.
  • Install the business template in testXHTML so that it is tested by jsl, which by the way produce different messages that the jshint integrated in ERP5's code mirror and jslint from WebScript_checkSyntax. For now, this passes jshint and jsl, but jslint complains about some indentation and space problems.

/cc @romain @vincentB @xiaowu.zhang @seb @gabriel

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: fix/repair_graph_editor
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7