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
bb2b46ff
Commit
bb2b46ff
authored
Jun 17, 2014
by
Thibaut Frain
Committed by
Jérome Perrin
Aug 11, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added toolbox to production line gadget
parent
99a31474
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
145 additions
and
176 deletions
+145
-176
Gruntfile.js
Gruntfile.js
+3
-1
dream/platform/src2/dream/Input_viewProductionLine.html
dream/platform/src2/dream/Input_viewProductionLine.html
+3
-1
dream/platform/src2/dream/Input_viewProductionLine.js
dream/platform/src2/dream/Input_viewProductionLine.js
+11
-4
dream/platform/src2/dream/index.less
dream/platform/src2/dream/index.less
+9
-170
dream/platform/src2/toolbox/index.html
dream/platform/src2/toolbox/index.html
+20
-0
dream/platform/src2/toolbox/toolbox.css
dream/platform/src2/toolbox/toolbox.css
+73
-0
dream/platform/src2/toolbox/toolbox.js
dream/platform/src2/toolbox/toolbox.js
+26
-0
No files found.
Gruntfile.js
View file @
bb2b46ff
...
...
@@ -68,7 +68,9 @@ module.exports = function (grunt) {
"
<%= global_config.dest %>/dream/index.css
"
:
"
<%= global_config.src %>/dream/index.less
"
,
"
<%= global_config.dest %>/jsplumb/jsplumb.css
"
:
"
<%= global_config.src %>/jsplumb/jsplumb.css
"
"
<%= global_config.src %>/jsplumb/jsplumb.css
"
,
"
<%= global_config.dest %>/toolbox/toolbox.css
"
:
"
<%= global_config.src %>/toolbox/toolbox.css
"
}
}
},
...
...
dream/platform/src2/dream/Input_viewProductionLine.html
View file @
bb2b46ff
...
...
@@ -10,7 +10,9 @@
<script
src=
"Input_viewProductionLine.js"
type=
"text/javascript"
></script>
</head>
<body>
<div
data-gadget-url=
"../toolbox/index.html"
data-gadget-scope=
"productionline_toolbox"
></div>
<div
data-gadget-url=
"../jsplumb/index.html"
data-gadget-scope=
"productionline"
></div>
data-gadget-scope=
"productionline
_graph
"
></div>
</body>
</html>
dream/platform/src2/dream/Input_viewProductionLine.js
View file @
bb2b46ff
...
...
@@ -27,7 +27,7 @@
gadget
.
aq_getAttachment
({
_id
:
jio_key
,
_attachment
:
"
body.json
"
}),
gadget
.
getDeclaredGadget
(
"
productionline
"
)
]);
}),
gadget
.
getDeclaredGadget
(
"
productionline
_graph
"
)
]);
})
.
push
(
function
(
result_list
)
{
return
result_list
[
1
].
render
(
result_list
[
0
]);
...
...
@@ -35,9 +35,16 @@
})
.
declareMethod
(
"
startService
"
,
function
()
{
return
this
.
getDeclaredGadget
(
"
productionline
"
)
.
push
(
function
(
productionline
)
{
return
productionline
.
startService
();
var
g
=
this
;
return
g
.
getDeclaredGadget
(
"
productionline_graph
"
)
.
push
(
function
(
graph
)
{
return
graph
.
startService
();
})
.
push
(
function
()
{
return
g
.
getDeclaredGadget
(
"
productionline_toolbox
"
);
})
.
push
(
function
(
toolbox
)
{
return
toolbox
.
startService
();
});
});
}(
window
,
rJS
,
RSVP
));
dream/platform/src2/dream/index.less
View file @
bb2b46ff
...
...
@@ -48,175 +48,14 @@
}
}
[data-gadget-scope="productionline"] {
#main {
/* these two margins settings are here just to ensure that jsPlumb handles
margins properly.*/
position: relative;
margin:20px auto;
font-size: 80%;
border: 1px solid #999;
width: 100%;
height: 600px;
overflow: hidden;
border-radius: 10px;
background-color:#eaedef;
text-align: center;
}
.selected {
color:rgb(189, 11, 11) !important;
}
.window, .label {
background-color:white;
text-align:center;
z-index:23;
cursor:pointer;
box-shadow: 2px 2px 19px #aaa;
-o-box-shadow: 2px 2px 19px #aaa;
-webkit-box-shadow: 2px 2px 19px #aaa;
-moz-box-shadow: 2px 2px 19px #aaa;
}
path, ._jsPlumb_endpoint {
cursor:pointer;
}
._jsPlumb_endpoint_drop_allowed {
border: 4px solid #123456;
box-shadow: 6px 6px 19px #444;
-o-box-shadow: 6px 6px 19px #444;
-webkit-box-shadow: 6px 6px 19px #444;
-moz-box-shadow: 6px 6px 19px #444;
}
/* z index stuff */
._jsPlumb_connector {
z-index:18;
}
._jsPlumb_endpoint {
z-index:19;
}
._jsPlumb_overlay {
z-index:23;
}
._jsPlumb_connector._jsPlumb_hover {
z-index:21 !important;
}
._jsPlumb_endpoint._jsPlumb_hover {
z-index:22 !important;
}
._jsPlumb_overlay {
border:1px solid #346789;
opacity:0.8;
filter:alpha(opacity=80);
background-color:white;
color:black;
font-family:helvetica;
padding:0.5em;
}
.Dream-Source, .Dream-BatchSource {
border: 1px solid #bbc;
background-color:#ffe;
background-image: linear-gradient(to bottom, #ffe 0%, #dde 100%);
}
.Dream-Machine, .Dream-MachineJobShop, .Dream-BatchScrapMachine, .Dream-MachineManagedJob, .Dream-MouldAssembly {
border: 1px solid #cbc;
background-color: #fef;
background-image: linear-gradient(to bottom, #fef 0%, #ede 100%);
}
.Dream-Queue, .Dream-QueueJobShop, .Dream-LineClearance, .Dream-QueueManagedJob, .Dream-ConditionalBuffer, .Dream-OrderDecomposition, .Dream-MouldAssemblyBuffer {
border: 1px solid #bcc;
background-color:#eff;
background-image: linear-gradient(to bottom, #eff 0%, #dee 100%);
}
.Dream-Exit, .Dream-ExitJobShop {
border: 1px solid #ccb;
background-color:#eef;
background-image: linear-gradient(to bottom, #eef 0%, #dde 100%);
}
.Dream-EventGenerator {
border: 1px solid #cba;
background-color:#fdc;
background-image: linear-gradient(to bottom, #fdc 0%, #ecb 100%);
}
.Dream-BatchDecomposition, .Dream-BatchDecompositionStartTime, .Dream-BatchReassembly {
border: 1px solid #bcb;
background-color:#dfd;
background-image: linear-gradient(to bottom, #dfd 0%, #cec 100%);
}
.Dream-Repairman {
border: 1px solid #cbb;
background-color:#fdd;
background-image: linear-gradient(to bottom, #fdd 0%, #dcc 100%);
}
.window, .dummy_window {
border:1px solid lightgray;
width:100px;
height:64px;
position:absolute;
color:black;
font-family:serif;
font-style:italic;
padding-top:0.9em;
font-size:0.9em;
cursor:move;
font-size:11px;
-webkit-transition:background-color 0.1s ease-in;
-moz-transition:background-color 0.1s ease-in;
transition:background-color 0.1s ease-in;
border-radius: 5px;
}
.window:hover {
background-color: #5c96bc;
background-image: none;
color:white;
}
.dummy_window {
position: absolute;
top: 0;
left: 0;
visibility: hidden;
}
.ep {
position:absolute;
bottom:37%;
right:5px;
width:1em;
height:1em;
background-color:orange;
cursor:pointer;
box-shadow: 0px 0px 2px black;
-webkit-transition:-webkit-box-shadow 0.25s ease-in;
-moz-transition:-moz-box-shadow 0.25s ease-in;
transition:box-shadow 0.25s ease-in;
}
._jsPlumb_source_hover, ._jsPlumb_target_hover, .dragHover {
background-color:#1e8151;
background-image: none;
color:white;
}
[data-gadget-scope="productionline_toolbox"] {
position: relative;
width: 19.5%;
float: left;
}
path {
cursor:pointer;
}
[data-gadget-scope="productionline_graph"] {
position: relative;
width: 79.5%;
float: right;
}
dream/platform/src2/toolbox/index.html
0 → 100644
View file @
bb2b46ff
<!doctype html>
<html>
<head>
<meta
charset=
"utf-8"
>
<link
rel=
"stylesheet"
href=
"../<%= curl.jqueryuicss.relative_dest %>"
>
<link
rel=
"stylesheet"
href=
"toolbox.css"
>
<script
src=
"../<%= curl.jquery.relative_dest %>"
></script>
<script
src=
"../<%= curl.jqueryuijs.relative_dest %>"
></script>
<script
src=
"../<%= copy.rsvp.relative_dest %>"
></script>
<script
src=
"../<%= copy.renderjs.relative_dest %>"
></script>
<script
src=
"toolbox.js"
></script>
</head>
<body>
<div
id=
"tools"
>
<div
id=
"tools-container"
></div>
</div>
</body>
</html>
dream/platform/src2/toolbox/toolbox.css
0 → 100644
View file @
bb2b46ff
#tools
{
border
:
1px
solid
#999
;
margin
:
20px
0
;
border-radius
:
10px
;
padding-bottom
:
20px
;
}
#tools-container
{
margin-bottom
:
4px
;
}
#tools
.ui-button
{
margin
:
4px
0
;
}
.tool
{
border
:
1px
solid
lightgray
;
box-shadow
:
1px
1px
2px
#aaa
;
min-width
:
7em
;
height
:
3em
;
z-index
:
10001
;
color
:
gray
;
font-family
:
serif
;
font-style
:
italic
;
font-size
:
0.9em
;
margin
:
0.8em
;
display
:
inline-block
;
border-radius
:
5px
;
text-align
:
center
;
padding-top
:
1.3em
;
}
.Dream-Source
,
.Dream-BatchSource
{
border
:
1px
solid
#bbc
;
background-color
:
#ffe
;
background-image
:
linear-gradient
(
to
bottom
,
#ffe
0%
,
#dde
100%
);
}
.Dream-Machine
,
.Dream-MachineJobShop
,
.Dream-BatchScrapMachine
,
.Dream-MachineManagedJob
,
.Dream-MouldAssembly
{
border
:
1px
solid
#cbc
;
background-color
:
#fef
;
background-image
:
linear-gradient
(
to
bottom
,
#fef
0%
,
#ede
100%
);
}
.Dream-Queue
,
.Dream-QueueJobShop
,
.Dream-LineClearance
,
.Dream-QueueManagedJob
,
.Dream-ConditionalBuffer
,
.Dream-OrderDecomposition
,
.Dream-MouldAssemblyBuffer
{
border
:
1px
solid
#bcc
;
background-color
:
#eff
;
background-image
:
linear-gradient
(
to
bottom
,
#eff
0%
,
#dee
100%
);
}
.Dream-Exit
,
.Dream-ExitJobShop
{
border
:
1px
solid
#ccb
;
background-color
:
#eef
;
background-image
:
linear-gradient
(
to
bottom
,
#eef
0%
,
#dde
100%
);
}
.Dream-EventGenerator
{
border
:
1px
solid
#cba
;
background-color
:
#fdc
;
background-image
:
linear-gradient
(
to
bottom
,
#fdc
0%
,
#ecb
100%
);
}
.Dream-BatchDecomposition
,
.Dream-BatchDecompositionStartTime
,
.Dream-BatchReassembly
{
border
:
1px
solid
#bcb
;
background-color
:
#dfd
;
background-image
:
linear-gradient
(
to
bottom
,
#dfd
0%
,
#cec
100%
);
}
.Dream-Repairman
{
border
:
1px
solid
#cbb
;
background-color
:
#fdd
;
background-image
:
linear-gradient
(
to
bottom
,
#fdd
0%
,
#dcc
100%
);
}
\ No newline at end of file
dream/platform/src2/toolbox/toolbox.js
0 → 100644
View file @
bb2b46ff
/*global window, RSVP, $, rJS*/
(
function
(
window
,
RSVP
,
$
,
rJS
)
{
"
use strict
"
;
rJS
(
window
)
.
declareAcquiredMethod
(
"
getConfigurationDict
"
,
"
getConfigurationDict
"
)
.
declareMethod
(
"
startService
"
,
function
()
{
var
g
=
this
;
return
RSVP
.
all
([
g
.
getElement
(),
g
.
getConfigurationDict
()
])
.
then
(
function
(
result
)
{
var
render_element
=
$
(
result
[
0
]).
find
(
"
#tools-container
"
);
$
.
each
(
result
[
1
],
function
(
key
,
val
)
{
var
name
=
val
.
name
||
key
.
split
(
'
-
'
)[
1
];
if
(
key
!==
'
Dream-Configuration
'
)
{
render_element
.
append
(
'
<div id="
'
+
key
+
'
" class="tool
'
+
key
+
'
">
'
+
name
+
"
<ul/></div>
"
);
}
});
});
});
}(
window
,
RSVP
,
$
,
rJS
));
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