Commit a9d31fd3 authored by Romain Courteaud's avatar Romain Courteaud Committed by Jérome Perrin

Update static version.

parent 1bc8307f
......@@ -6,34 +6,37 @@
var key = this.props.jio_key, gadget = this;
return new RSVP.Queue().push(function() {
// XXX Conditional simulation menu
return RSVP.all([ gadget.whoWantToDisplayThisDocumentPage("edit_table", key), gadget.whoWantToDisplayThisDocumentPage("run_simulation", key), gadget.whoWantToDisplayThisDocumentPage("manage_document", key), gadget.whoWantToDisplayThisDocumentPage("station_utilisation_graph", key), gadget.whoWantToDisplayThisDocumentPage("queue_stat_graph", key), gadget.whoWantToDisplayThisDocumentPage("exit_stat", key), gadget.whoWantToDisplayThisDocumentPage("job_gantt", key), gadget.whoWantToDisplayThisDocumentPage("job_schedule_spreadsheet", key), gadget.whoWantToDisplayThisDocumentPage("debug_json", key) ]);
return RSVP.all([ gadget.whoWantToDisplayThisDocumentPage("production_line", key), gadget.whoWantToDisplayThisDocumentPage("edit_table", key), gadget.whoWantToDisplayThisDocumentPage("run_simulation", key), gadget.whoWantToDisplayThisDocumentPage("manage_document", key), gadget.whoWantToDisplayThisDocumentPage("station_utilisation_graph", key), gadget.whoWantToDisplayThisDocumentPage("queue_stat_graph", key), gadget.whoWantToDisplayThisDocumentPage("exit_stat", key), gadget.whoWantToDisplayThisDocumentPage("job_gantt", key), gadget.whoWantToDisplayThisDocumentPage("job_schedule_spreadsheet", key), gadget.whoWantToDisplayThisDocumentPage("debug_json", key) ]);
}).push(function(result_list) {
return [ {
link: result_list[0],
title: "Edit table"
title: "Production line"
}, {
link: result_list[1],
title: "Run simulation"
title: "Edit table"
}, {
link: result_list[2],
title: "Manage document"
title: "Run simulation"
}, {
link: result_list[3],
title: "Stations Utilization"
title: "Manage document"
}, {
link: result_list[4],
title: "Queues Statistics"
title: "Stations Utilization"
}, {
link: result_list[5],
title: "Exit Statistics"
title: "Queues Statistics"
}, {
link: result_list[6],
title: "Job Gantt"
title: "Exit Statistics"
}, {
link: result_list[7],
title: "Job Schedule"
title: "Job Gantt"
}, {
link: result_list[8],
title: "Job Schedule"
}, {
link: result_list[9],
title: "Debug JSON"
} ];
});
......
@media (min-width:35em){.jqm-navmenu-panel.ui-panel-closed{visibility:visible!important;width:17em;-webkit-transition:none!important;-moz-transition:none!important;transition:none!important;-webkit-transform:none!important;-moz-transform:none!important;transform:none!important;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;height:100%;position:absolute;display:block}.ui-panel-page-content-open{width:auto}.ui-panel-page-content-open.ui-panel-page-content-position-left{margin-right:17em}.ui-panel-dismiss,.menu_link{display:none!important}.gadget_container,header{margin-left:17em}.close-entry{display:none!important}.gadget_container{padding:1em}}
\ No newline at end of file
@media (min-width:35em){.jqm-navmenu-panel.ui-panel-closed{visibility:visible!important;width:17em;-webkit-transition:none!important;-moz-transition:none!important;transition:none!important;-webkit-transform:none!important;-moz-transform:none!important;transform:none!important;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;height:100%;position:absolute;display:block}.ui-panel-page-content-open{width:auto}.ui-panel-page-content-open.ui-panel-page-content-position-left{margin-right:17em}.ui-panel-dismiss,.menu_link{display:none!important}.gadget_container,header{margin-left:17em}.close-entry{display:none!important}.gadget_container{padding:1em}}[data-gadget-scope=productionline] #main{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}[data-gadget-scope=productionline] .selected{color:#bd0b0b!important}[data-gadget-scope=productionline] .window,[data-gadget-scope=productionline] .label{background-color:#fff;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}[data-gadget-scope=productionline] path,[data-gadget-scope=productionline] ._jsPlumb_endpoint{cursor:pointer}[data-gadget-scope=productionline] ._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}[data-gadget-scope=productionline] ._jsPlumb_connector{z-index:18}[data-gadget-scope=productionline] ._jsPlumb_endpoint{z-index:19}[data-gadget-scope=productionline] ._jsPlumb_overlay{z-index:23}[data-gadget-scope=productionline] ._jsPlumb_connector._jsPlumb_hover{z-index:21!important}[data-gadget-scope=productionline] ._jsPlumb_endpoint._jsPlumb_hover{z-index:22!important}[data-gadget-scope=productionline] ._jsPlumb_overlay{border:1px solid #346789;opacity:.8;filter:alpha(opacity=80);background-color:#fff;color:#000;font-family:helvetica;padding:.5em}[data-gadget-scope=productionline] .Dream-Source,[data-gadget-scope=productionline] .Dream-BatchSource{border:1px solid #bbc;background-color:#ffe;background-image:linear-gradient(to bottom,#ffe 0,#dde 100%)}[data-gadget-scope=productionline] .Dream-Machine,[data-gadget-scope=productionline] .Dream-MachineJobShop,[data-gadget-scope=productionline] .Dream-BatchScrapMachine,[data-gadget-scope=productionline] .Dream-MachineManagedJob,[data-gadget-scope=productionline] .Dream-MouldAssembly{border:1px solid #cbc;background-color:#fef;background-image:linear-gradient(to bottom,#fef 0,#ede 100%)}[data-gadget-scope=productionline] .Dream-Queue,[data-gadget-scope=productionline] .Dream-QueueJobShop,[data-gadget-scope=productionline] .Dream-LineClearance,[data-gadget-scope=productionline] .Dream-QueueManagedJob,[data-gadget-scope=productionline] .Dream-ConditionalBuffer,[data-gadget-scope=productionline] .Dream-OrderDecomposition,[data-gadget-scope=productionline] .Dream-MouldAssemblyBuffer{border:1px solid #bcc;background-color:#eff;background-image:linear-gradient(to bottom,#eff 0,#dee 100%)}[data-gadget-scope=productionline] .Dream-Exit,[data-gadget-scope=productionline] .Dream-ExitJobShop{border:1px solid #ccb;background-color:#eef;background-image:linear-gradient(to bottom,#eef 0,#dde 100%)}[data-gadget-scope=productionline] .Dream-EventGenerator{border:1px solid #cba;background-color:#fdc;background-image:linear-gradient(to bottom,#fdc 0,#ecb 100%)}[data-gadget-scope=productionline] .Dream-BatchDecomposition,[data-gadget-scope=productionline] .Dream-BatchDecompositionStartTime,[data-gadget-scope=productionline] .Dream-BatchReassembly{border:1px solid #bcb;background-color:#dfd;background-image:linear-gradient(to bottom,#dfd 0,#cec 100%)}[data-gadget-scope=productionline] .Dream-Repairman{border:1px solid #cbb;background-color:#fdd;background-image:linear-gradient(to bottom,#fdd 0,#dcc 100%)}[data-gadget-scope=productionline] .window,[data-gadget-scope=productionline] .dummy_window{border:1px solid #d3d3d3;width:100px;height:64px;position:absolute;color:#000;font-family:serif;font-style:italic;padding-top:.9em;font-size:.9em;cursor:move;font-size:11px;-webkit-transition:background-color .1s ease-in;-moz-transition:background-color .1s ease-in;transition:background-color .1s ease-in;border-radius:5px}[data-gadget-scope=productionline] .window:hover{background-color:#5c96bc;background-image:none;color:#fff}[data-gadget-scope=productionline] .dummy_window{position:absolute;top:0;left:0;visibility:hidden}[data-gadget-scope=productionline] .ep{position:absolute;bottom:37%;right:5px;width:1em;height:1em;background-color:orange;cursor:pointer;box-shadow:0 0 2px #000;-webkit-transition:-webkit-box-shadow .25s ease-in;-moz-transition:-moz-box-shadow .25s ease-in;transition:box-shadow .25s ease-in}[data-gadget-scope=productionline] ._jsPlumb_source_hover,[data-gadget-scope=productionline] ._jsPlumb_target_hover,[data-gadget-scope=productionline] .dragHover{background-color:#1e8151;background-image:none;color:#fff}[data-gadget-scope=productionline] path{cursor:pointer}
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Edit table</title>
<script src="../lib/rsvp.min.js" type="text/javascript"></script>
<script src="../lib/renderjs.min.js" type="text/javascript"></script>
<script src="document_page_mixin.js" type="text/javascript"></script>
<script src="production_line.js" type="text/javascript"></script>
</head>
<body>
<div data-gadget-url="../jsplumb/index.html"
data-gadget-scope="productionline"></div>
</body>
</html>
/*global window, rJS, RSVP, initDocumentPageMixin */
/*jslint nomen: true */
(function(window, rJS, RSVP, initDocumentPageMixin) {
"use strict";
var gadget_klass = rJS(window);
initDocumentPageMixin(gadget_klass);
gadget_klass.ready(function(g) {
g.props = {};
}).ready(function(g) {
return g.getElement().push(function(element) {
g.props.element = element;
});
}).declareAcquiredMethod("aq_getAttachment", "jio_getAttachment").declareMethod("render", function(options) {
var jio_key = options.id, gadget = this;
gadget.props.jio_key = jio_key;
return new RSVP.Queue().push(function() {
return RSVP.all([ gadget.aq_getAttachment({
_id: jio_key,
_attachment: "body.json"
}), gadget.getDeclaredGadget("productionline") ]);
}).push(function(result_list) {
return result_list[1].render(result_list[0]);
});
}).declareMethod("startService", function() {
return this.getDeclaredGadget("productionline").push(function(productionline) {
return productionline.startService();
});
});
})(window, rJS, RSVP, initDocumentPageMixin);
\ No newline at end of file
......@@ -6,13 +6,22 @@
<title>Run Simulation</title>
<script src="../lib/rsvp.min.js" type="text/javascript"></script>
<script src="../lib/renderjs.min.js" type="text/javascript"></script>
<script src="../lib/handlebars.min.js" type="text/javascript"></script>
<script src="../lib/jquery.js" type="text/javascript"></script>
<script src="../lib/jquerymobile.js" type="text/javascript"></script>
<script id="label-template" type="text/x-handlebars-template">
<label>{{label}}</label>
</script>
<script src="document_page_mixin.js" type="text/javascript"></script>
<script src="run_simulation.js" type="text/javascript"></script>
</head>
<body>
<form>
<fieldset class="simulation_parameters">
</fieldset>
</form>
<form class="run_form">
<button type="submit" class="ui-btn ui-btn-b ui-btn-inline
ui-icon-refresh ui-btn-icon-right">Run Simulation</button>
......
/*global console, rJS, RSVP, initDocumentPageMixin, jQuery */
(function(window, rJS, RSVP, initDocumentPageMixin, $) {
/*global rJS, RSVP, initDocumentPageMixin, jQuery, Handlebars */
/*jslint nomen: true, maxlen: 200 */
(function(window, rJS, RSVP, initDocumentPageMixin, $, Handlebars) {
"use strict";
function promiseEventListener(target, type, useCapture) {
//////////////////////////
......@@ -22,7 +23,11 @@
}
return new RSVP.Promise(resolver, canceller);
}
var gadget_klass = rJS(window);
/////////////////////////////////////////////////////////////////
// Handlebars
/////////////////////////////////////////////////////////////////
// Precompile the templates while loading the first gadget instance
var gadget_klass = rJS(window), source = gadget_klass.__template_element.getElementById("label-template").innerHTML, label_template = Handlebars.compile(source);
initDocumentPageMixin(gadget_klass);
gadget_klass.ready(function(g) {
g.props = {};
......@@ -31,7 +36,45 @@
g.props.element = element;
});
}).declareAcquiredMethod("aq_getAttachment", "jio_getAttachment").declareAcquiredMethod("aq_putAttachment", "jio_putAttachment").declareAcquiredMethod("aq_ajax", "jio_ajax").declareAcquiredMethod("pleaseRedirectMyHash", "pleaseRedirectMyHash").declareAcquiredMethod("whoWantToDisplayThisDocumentPage", "whoWantToDisplayThisDocumentPage").declareMethod("render", function(options) {
var i, gadget = this, property, parent_element = gadget.props.element.querySelector(".simulation_parameters"), value, queue, data, property_list = options.configuration_dict["Dream-Configuration"].property_list;
this.props.jio_key = options.id;
queue = gadget.aq_getAttachment({
_id: gadget.props.jio_key,
_attachment: "body.json"
}).push(function(json) {
data = JSON.parse(json).general;
});
function addField(property, value) {
var sub_gadget;
queue.push(function() {
parent_element.insertAdjacentHTML("beforeend", label_template({
label: property.name || property.id
}));
return gadget.declareGadget("../string_field/index.html");
}).push(function(gg) {
sub_gadget = gg;
value = data[property.id] || value;
return sub_gadget.render({
field_json: {
title: property.description || "",
key: property.id,
value: value
}
});
}).push(function() {
return sub_gadget.getElement();
}).push(function(sub_element) {
parent_element.appendChild(sub_element);
});
}
for (i = 0; i < property_list.length; i += 1) {
property = property_list[i];
if (property._class === "Dream.Property") {
value = property._default || "";
addField(property, value);
}
}
return queue;
}).declareMethod("startService", function() {
var gadget = this;
return new RSVP.Queue().push(function() {
......@@ -76,4 +119,4 @@
return gadget.pleaseRedirectMyHash(url);
});
});
})(window, rJS, RSVP, initDocumentPageMixin, jQuery);
\ No newline at end of file
})(window, rJS, RSVP, initDocumentPageMixin, jQuery, Handlebars);
\ No newline at end of file
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<!--link rel="stylesheet" href="lib/jquery-ui.css"-->
<!--script src="curl.jquery.relative_dest %>"></script-->
<!--script src="curl.jqueryuijs.relative_dest %>"></script-->
<script src="../lib/rsvp.min.js" type="text/javascript"></script>
<script src="../lib/renderjs.min.js" type="text/javascript"></script>
<script src="../lib/jquery.jsplumb.min.js" type="text/javascript"></script>
<script src="jsplumb.js"></script>
</head>
<body>
<div id="main"></div>
<div class="dummy_window"></div>
</body>
</html>
body {
padding:0;
margin:0;
background-color:white;
font-family:'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
text-align:center;
}
#headerWrapper {
display:none;
width:100%;
background-color:black;
position:fixed;
top:0;
left:0;
height:44px;
padding:0;
border-bottom:1px solid #999;
box-shadow: 0px 2px 19px #aaa;
-o-box-shadow: 0px 2px 19px #aaa;
-webkit-box-shadow: 0px 2px 19px #aaa;
-moz-box-shadow: 0px 2px 19px #aaa;
opacity:0.8;
}
#intro {
margin-top:59px;
}
#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;
}
/* Setting for dialog */
label, input {
display:block;
}
input.text, select {
margin:4px;
padding:0;
width:95%;
}
fieldset {
padding:0;
border:0;
margin-top:25px;
}
h1 {
font-size: 1.2em;
margin: .6em 0;
}
div#users-contain {
width: 350px;
margin: 20px 0;
}
div#users-contain table {
margin: 1em 0;
border-collapse: collapse;
width: 100%;
}
div#users-contain table td, div#users-contain table th {
border: 1px solid #eee;
padding: .6em 10px;
text-align: left;
}
.ui-dialog .ui-state-error {
padding: .3em;
}
.validateTips {
border: 1px solid transparent;
padding: 0.3em;
}
/* End of dialog setting */
li {
margin: 3px;
/*padding: 1px;*/
/*text-align: -webkit-match-parent;*/
background: #e6e6e6;
border: 1px solid #d3d3d3;
list-style-type: none;
width: 120px;
}
#sidebar {
font-size:13px;
}
/* demo elements */
.menu, #explanation {
background-color:#fff;
}
.menu {
height: 15px;
float:right;
padding-top:1em;
padding-bottom:0.4em;
background-color: transparent;
margin-right:30px;
}
.otherLibraries {
display:inline;
}
a, a:visited {
text-decoration:none;
color:#01a3c6;
font-family:helvetica;
padding:0.3em;
border-radius:0.2em;
}
a:hover {
color:#1b911b;
}
.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 specific css */
#available {
position: absolute;
width: 200px;
height: 200px;
border: 2px solid;
margin-top: 350px;
margin-left: 150px;
border-radius: 10px;
}
#tools {
/* position: absolute;
width: 200px;
height: 400px; */
width: 100%;
border: 1px solid #999;
margin: 20px 0;
border-radius: 10px;
padding-bottom: 20px;
}
#tools-container {
margin-bottom: 4px;
}
#simulation_controls {
/* position: absolute;
width: 200px;
height: 300px;
margin-top: 550px;
margin-left: 35px;
font-size:13px; */
width: 100%;
border: 1px solid #999;
border-radius: 10px;
}
.tool {
border: 1px solid lightgray;
box-shadow: 1px 1px 2px #aaa;
/*margin-top: 20px;
margin-left: 35px;*/
min-width:7em;
height:2em;
z-index: 10001;
color: gray;
font-family:serif;
font-style:italic;
padding-top:0.9em;
font-size:0.9em;
margin:0.5em;
display: inline-block;
border-radius: 5px;
}
#graph {
width: 70%;
height: 250px;
text-align: center;
margin-left:auto;
margin-right:auto;
padding-top:2px;
margin-top:0px;
}
#queue_stat_graph {
width: 70%;
height: 250px;
text-align: center;
margin-left:auto;
margin-right:auto;
padding-top:2px;
margin-top:0px;
}
#tools .ui-button {
width:80%;
margin:4px 0;
}
.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%);
}
#exit_stat {
display: inline-block;
}
#exit_stat table, #exit_stat td {
border: 1px solid black;
}
.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;
}
#debug_json textarea {
width:95%;
}
#error{
text-align: left;
}
.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;
}
path {
cursor:pointer;
}
#spreadsheet_output {
margin: 20px 0;
}
#gantt_output {
height: 400px;
margin: 20px 0;
}
.sub_task {
background-color: #3DD388;
border-color: #28B06C;
}
li.result {
width: 100%;
text-align: left;
cursor:pointer;
}
li.result.active {
background:#fcc;
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment