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
b174b9b8
Commit
b174b9b8
authored
Mar 21, 2013
by
Sebastien Robin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reorganize and clean the code
parent
92b31cc9
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
374 additions
and
353 deletions
+374
-353
ui/index.html
ui/index.html
+3
-2
ui/src/demo-helper-jquery.js
ui/src/demo-helper-jquery.js
+0
-34
ui/src/dream.js
ui/src/dream.js
+324
-0
ui/src/dream_launcher.js
ui/src/dream_launcher.js
+47
-0
ui/src/flowchartConnectorsDemo.js
ui/src/flowchartConnectorsDemo.js
+0
-317
No files found.
ui/index.html
View file @
b174b9b8
...
...
@@ -83,11 +83,12 @@
<!-- /JS -->
<!-- demo code -->
<script
src=
"src/flowchartConnectorsDemo.js"
></script>
<script
src=
"src/dream.js"
></script>
<script
src=
"src/dream_launcher.js"
></script>
<!-- demo helper code -->
<!--script src="src/demo-list.js"></script-->
<
script
src=
"src/demo-helper-jquery.js"
></script
>
<
!--script src="src/demo-helper-jquery.js"></script--
>
</body>
</html>
ui/src/demo-helper-jquery.js
deleted
100644 → 0
View file @
92b31cc9
/*
* This file contains the JS that handles the first init of each jQuery demonstration, and also switching
* between render modes.
*/
jsPlumb
.
bind
(
"
ready
"
,
function
()
{
//jsPlumb.DemoList.init();
// chrome fix.
document
.
onselectstart
=
function
()
{
return
false
;
};
// render mode
var
resetRenderMode
=
function
(
desiredMode
)
{
var
newMode
=
jsPlumb
.
setRenderMode
(
desiredMode
);
$
(
"
.rmode
"
).
removeClass
(
"
selected
"
);
$
(
"
.rmode[mode='
"
+
newMode
+
"
']
"
).
addClass
(
"
selected
"
);
$
(
"
.rmode[mode='canvas']
"
).
attr
(
"
disabled
"
,
!
jsPlumb
.
isCanvasAvailable
());
$
(
"
.rmode[mode='svg']
"
).
attr
(
"
disabled
"
,
!
jsPlumb
.
isSVGAvailable
());
$
(
"
.rmode[mode='vml']
"
).
attr
(
"
disabled
"
,
!
jsPlumb
.
isVMLAvailable
());
jsPlumbDemo
.
init
();
};
$
(
"
.rmode
"
).
bind
(
"
click
"
,
function
()
{
var
desiredMode
=
$
(
this
).
attr
(
"
mode
"
);
if
(
jsPlumbDemo
.
reset
)
jsPlumbDemo
.
reset
();
jsPlumb
.
reset
();
resetRenderMode
(
desiredMode
);
});
resetRenderMode
(
jsPlumb
.
SVG
);
});
\ No newline at end of file
ui/src/dream.js
0 → 100644
View file @
b174b9b8
This diff is collapsed.
Click to expand it.
ui/src/dream_launcher.js
0 → 100644
View file @
b174b9b8
(
function
(
$
)
{
jsPlumb
.
bind
(
"
ready
"
,
function
()
{
var
graph_data
=
{},
dream_instance
,
available_people
=
{},
people_list
,
i
,
i_length
;
graph_data
.
box_list
=
[
{
id
:
'
window1
'
,
title
:
'
attach1
'
,
target_list
:
[
'
window2
'
],
coordinate
:
{
top
:
5
,
left
:
5
}},
{
id
:
'
window2
'
,
title
:
'
attach2
'
,
target_list
:
[
'
window3
'
],
coordinate
:
{
top
:
5
,
left
:
15
}},
{
id
:
'
window3
'
,
title
:
'
attach3
'
,
target_list
:
[
'
window7
'
],
coordinate
:
{
top
:
5
,
left
:
25
}},
{
id
:
'
window4
'
,
title
:
'
attach1
'
,
target_list
:
[
'
window5
'
],
coordinate
:
{
top
:
20
,
left
:
5
}},
{
id
:
'
window5
'
,
title
:
'
attach2
'
,
target_list
:
[
'
window6
'
],
coordinate
:
{
top
:
20
,
left
:
15
}},
{
id
:
'
window6
'
,
title
:
'
attach3
'
,
target_list
:
[
'
window7
'
],
coordinate
:
{
top
:
20
,
left
:
25
}},
{
id
:
'
window7
'
,
title
:
'
Moulding
'
,
target_list
:
[
'
window8
'
,
'
window10
'
],
coordinate
:
{
top
:
12
,
left
:
35
}},
{
id
:
'
window8
'
,
title
:
'
tests
'
,
target_list
:
[
'
window9
'
],
coordinate
:
{
top
:
5
,
left
:
45
}},
{
id
:
'
window9
'
,
title
:
'
packaging
'
,
coordinate
:
{
top
:
5
,
left
:
55
}},
{
id
:
'
window10
'
,
title
:
'
tests
'
,
target_list
:
[
'
window11
'
],
coordinate
:
{
top
:
20
,
left
:
45
}},
{
id
:
'
window11
'
,
title
:
'
packaging
'
,
coordinate
:
{
top
:
20
,
left
:
55
}},
];
dream_instance
=
DREAM
.
newDream
(
graph_data
);
dream_instance
.
start
();
//Fill list of people
people_list
=
[
"
Seb
"
,
"
Jerome
"
,
"
Jean-Paul
"
,
"
Anna
"
,
"
George
"
,
"
Ivor
"
,
"
Dipo
"
,
"
Stephan
"
];
i_length
=
people_list
.
length
;
for
(
i
=
0
;
i
<
i_length
;
i
++
)
{
$
(
"
#not_available ul
"
).
append
(
'
<li class="ui-state-default">
'
+
people_list
[
i
]
+
"
</li>
"
);
}
// Make list of people draggable, update list of people depending
// to make them available or not
$
(
"
#available li
"
).
draggable
({
appendTo
:
"
body
"
});
$
(
"
#not_available li
"
).
draggable
({
appendTo
:
"
body
"
});
$
(
"
#available
"
).
droppable
({
drop
:
function
(
event
,
ui
)
{
available_people
[
ui
.
draggable
.
text
()]
=
true
;
dream_instance
.
setSimulationParameters
(
available_people
);
}
});
$
(
"
#not_available
"
).
droppable
({
drop
:
function
(
event
,
ui
)
{
available_people
[
ui
.
draggable
.
text
()]
=
false
;
dream_instance
.
setSimulationParameters
(
available_people
);
}
});
})
})(
jQuery
);
\ No newline at end of file
ui/src/flowchartConnectorsDemo.js
deleted
100644 → 0
View file @
92b31cc9
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