Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
dream
Commits
92e53cc1
Commit
92e53cc1
authored
Mar 03, 2015
by
Klaus Wölfel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update static version
parent
729f6194
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
3 deletions
+21
-3
dream/platform/static/jsplumb/jsplumb.js
dream/platform/static/jsplumb/jsplumb.js
+18
-0
dream/platform/static/lib/handlebars.min.js
dream/platform/static/lib/handlebars.min.js
+3
-3
No files found.
dream/platform/static/jsplumb/jsplumb.js
View file @
92e53cc1
...
@@ -117,6 +117,7 @@
...
@@ -117,6 +117,7 @@
edge_data
.
destination
=
getNodeId
(
gadget
,
connection
.
targetId
);
edge_data
.
destination
=
getNodeId
(
gadget
,
connection
.
targetId
);
gadget
.
props
.
data
.
graph
.
edge
[
connection
.
id
]
=
edge_data
;
gadget
.
props
.
data
.
graph
.
edge
[
connection
.
id
]
=
edge_data
;
}
}
checkNodeConstraint
(
gadget
,
getNodeId
(
gadget
,
connection
.
targetId
));
gadget
.
notifyDataChanged
();
gadget
.
notifyDataChanged
();
}
}
function
convertToAbsolutePosition
(
gadget
,
x
,
y
)
{
function
convertToAbsolutePosition
(
gadget
,
x
,
y
)
{
...
@@ -217,6 +218,20 @@
...
@@ -217,6 +218,20 @@
});
});
gadget
.
notifyDataChanged
();
gadget
.
notifyDataChanged
();
}
}
function
checkNodeConstraint
(
gadget
,
node_id
)
{
var
element_id
=
gadget
.
props
.
node_id_to_dom_element_id
[
node_id
],
element
=
$
(
gadget
.
props
.
element
).
find
(
"
#
"
+
element_id
),
jsplumb_instance
=
gadget
.
props
.
jsplumb_instance
,
node_class
=
gadget
.
props
.
data
.
graph
.
node
[
node_id
].
_class
;
if
(
jsplumb_instance
.
getConnections
({
target
:
element_id
}).
length
===
0
&&
node_class
.
toLowerCase
().
search
(
"
source
"
)
===
-
1
)
{
var
warning
=
$
(
"
<div></div>
"
).
attr
({
"
class
"
:
"
alert_no_input ui-btn-icon-notext ui-icon-alert
"
,
title
:
"
No input defined!
"
});
element
.
append
(
warning
);
}
else
{
element
.
find
(
"
.alert_no_input
"
).
remove
();
}
}
function
updateElementData
(
gadget
,
node_id
,
data
)
{
function
updateElementData
(
gadget
,
node_id
,
data
)
{
var
element_id
=
gadget
.
props
.
node_id_to_dom_element_id
[
node_id
],
new_id
=
data
.
id
;
var
element_id
=
gadget
.
props
.
node_id_to_dom_element_id
[
node_id
],
new_id
=
data
.
id
;
if
(
data
.
data
.
name
)
{
if
(
data
.
data
.
name
)
{
...
@@ -640,6 +655,9 @@
...
@@ -640,6 +655,9 @@
$
.
each
(
this
.
props
.
data
.
graph
.
edge
,
function
(
key
,
value
)
{
$
.
each
(
this
.
props
.
data
.
graph
.
edge
,
function
(
key
,
value
)
{
addEdge
(
gadget
,
key
,
value
);
addEdge
(
gadget
,
key
,
value
);
});
});
$
.
each
(
this
.
props
.
data
.
graph
.
node
,
function
(
key
,
value
)
{
checkNodeConstraint
(
gadget
,
key
);
});
return
RSVP
.
all
([
waitForDrop
(
gadget
),
waitForConnection
(
gadget
),
waitForConnectionDetached
(
gadget
),
waitForConnectionClick
(
gadget
),
gadget
.
props
.
nodes_click_monitor
]);
return
RSVP
.
all
([
waitForDrop
(
gadget
),
waitForConnection
(
gadget
),
waitForConnectionDetached
(
gadget
),
waitForConnectionClick
(
gadget
),
gadget
.
props
.
nodes_click_monitor
]);
});
});
})(
RSVP
,
rJS
,
$
,
jsPlumb
,
Handlebars
,
loopEventListener
,
promiseEventListener
,
DOMParser
);
})(
RSVP
,
rJS
,
$
,
jsPlumb
,
Handlebars
,
loopEventListener
,
promiseEventListener
,
DOMParser
);
\ No newline at end of file
dream/platform/static/lib/handlebars.min.js
View file @
92e53cc1
This diff is collapsed.
Click to expand it.
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