Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yoji Takeuchi
erp5
Commits
ae4d3fef
Commit
ae4d3fef
authored
Aug 29, 2017
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
graph_editor: use renderjs style event handler for node click dialog
parent
48287495
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
bt5/erp5_graph_editor/SkinTemplateItem/portal_skins/erp5_graph_editor/dream_graph_editor/jsplumb/jsplumb.js.js
...rp5_graph_editor/dream_graph_editor/jsplumb/jsplumb.js.js
+8
-7
No files found.
bt5/erp5_graph_editor/SkinTemplateItem/portal_skins/erp5_graph_editor/dream_graph_editor/jsplumb/jsplumb.js.js
View file @
ae4d3fef
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU Lesser General Public License
* You should have received a copy of the GNU Lesser General Public License
* along with DREAM. If not, see <http://www.gnu.org/licenses/>.
* along with DREAM. If not, see <http://www.gnu.org/licenses/>.
* ==========================================================================*/
* ==========================================================================*/
/*global console, window, RSVP, rJS, $, jsPlumb, Handlebars,
/*global console, window,
Node,
RSVP, rJS, $, jsPlumb, Handlebars,
loopEventListener, promiseEventListener, DOMParser, Springy */
loopEventListener, promiseEventListener, DOMParser, Springy */
/*jslint unparam: true todo: true */
/*jslint unparam: true todo: true */
(
function
(
RSVP
,
rJS
,
$
,
jsPlumb
,
Handlebars
,
loopEventListener
,
promiseEventListener
,
DOMParser
,
Springy
)
{
(
function
(
RSVP
,
rJS
,
$
,
jsPlumb
,
Handlebars
,
loopEventListener
,
promiseEventListener
,
DOMParser
,
Springy
)
{
...
@@ -611,10 +611,6 @@
...
@@ -611,10 +611,6 @@
});
});
}
}
function
waitForNodeClick
(
gadget
,
node
)
{
gadget
.
props
.
nodes_click_monitor
.
monitor
(
loopEventListener
(
node
,
"
dblclick
"
,
false
,
openNodeEditionDialog
.
bind
(
null
,
gadget
,
node
)));
}
function
waitForConnection
(
gadget
)
{
function
waitForConnection
(
gadget
)
{
return
loopJsplumbBind
(
gadget
,
"
connection
"
,
function
(
info
,
originalEvent
)
{
return
loopJsplumbBind
(
gadget
,
"
connection
"
,
function
(
info
,
originalEvent
)
{
updateConnectionData
(
gadget
,
info
.
connection
,
false
);
updateConnectionData
(
gadget
,
info
.
connection
,
false
);
...
@@ -661,7 +657,6 @@
...
@@ -661,7 +657,6 @@
name
:
node_data
.
name
||
node_data
.
id
name
:
node_data
.
name
||
node_data
.
id
}),
"
text/html
"
).
querySelector
(
"
.window
"
);
}),
"
text/html
"
).
querySelector
(
"
.window
"
);
render_element
.
append
(
domElement
);
render_element
.
append
(
domElement
);
waitForNodeClick
(
gadget
,
domElement
);
box
=
$
(
gadget
.
props
.
element
).
find
(
"
#
"
+
dom_element_id
);
box
=
$
(
gadget
.
props
.
element
).
find
(
"
#
"
+
dom_element_id
);
absolute_position
=
convertToAbsolutePosition
(
gadget
,
coordinate
.
left
,
coordinate
.
top
);
absolute_position
=
convertToAbsolutePosition
(
gadget
,
coordinate
.
left
,
coordinate
.
top
);
if
(
class_definition
&&
class_definition
.
css
)
{
if
(
class_definition
&&
class_definition
.
css
)
{
...
@@ -801,6 +796,13 @@
...
@@ -801,6 +796,13 @@
}
}
return
JSON
.
stringify
(
this
.
props
.
data
);
return
JSON
.
stringify
(
this
.
props
.
data
);
})
})
.
onEvent
(
"
dblclick
"
,
function
(
evt
)
{
var
node
=
evt
.
target
;
if
((
node
.
nodeType
===
Node
.
ELEMENT_NODE
)
&&
(
node
.
tagName
===
"
DIV
"
)
&&
node
.
classList
.
contains
([
'
window
'
]))
{
return
openNodeEditionDialog
(
this
,
node
);
}
})
.
declareService
(
function
()
{
.
declareService
(
function
()
{
var
gadget
=
this
,
jsplumb_instance
;
var
gadget
=
this
,
jsplumb_instance
;
this
.
props
.
main
=
this
.
props
.
element
.
querySelector
(
"
.graph_container
"
);
this
.
props
.
main
=
this
.
props
.
element
.
querySelector
(
"
.graph_container
"
);
...
@@ -835,7 +837,6 @@
...
@@ -835,7 +837,6 @@
});
});
draggable
(
gadget
);
draggable
(
gadget
);
this
.
props
.
nodes_click_monitor
=
this
.
__monitor
;
return
RSVP
.
all
([
waitForDrop
(
gadget
),
return
RSVP
.
all
([
waitForDrop
(
gadget
),
waitForConnection
(
gadget
),
waitForConnection
(
gadget
),
waitForConnectionDetached
(
gadget
),
waitForConnectionDetached
(
gadget
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment