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

Publish static version.

parent b0206ca4
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Edit Wip Part Spreadsheet</title>
<script src="../lib/rsvp.min.js" type="text/javascript"></script>
<script src="../lib/renderjs.min.js" type="text/javascript"></script>
<script src="mixin_gadget.js" type="text/javascript"></script>
<script src="Input_viewShiftSpreadsheet.js" type="text/javascript"></script>
</head>
<body>
<div data-gadget-url="../handsontable/index.html"
data-gadget-scope="tableeditor"></div>
</body>
</html>
/*global console, rJS, RSVP, initGadgetMixin */
(function(window, rJS, RSVP, initGadgetMixin) {
"use strict";
var gadget_klass = rJS(window);
initGadgetMixin(gadget_klass);
gadget_klass.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("tableeditor") ]);
}).push(function(result_list) {
return result_list[1].render(JSON.stringify(JSON.parse(result_list[0]).shift_spreadsheet));
});
}).declareMethod("startService", function() {
return this.getDeclaredGadget("tableeditor").push(function(tableeditor) {
return tableeditor.startService();
});
});
})(window, rJS, RSVP, initGadgetMixin);
\ 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 Wip Part Spreadsheet</title>
<script src="../lib/rsvp.min.js" type="text/javascript"></script>
<script src="../lib/renderjs.min.js" type="text/javascript"></script>
<script src="mixin_gadget.js" type="text/javascript"></script>
<script src="Input_viewWipPartSpreadsheet.js" type="text/javascript"></script>
</head>
<body>
<div data-gadget-url="../handsontable/index.html"
data-gadget-scope="tableeditor"></div>
</body>
</html>
/*global console, rJS, RSVP, initGadgetMixin */
(function(window, rJS, RSVP, initGadgetMixin) {
"use strict";
var gadget_klass = rJS(window);
initGadgetMixin(gadget_klass);
gadget_klass.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("tableeditor") ]);
}).push(function(result_list) {
return result_list[1].render(JSON.stringify(JSON.parse(result_list[0]).wip_part_spreadsheet));
});
}).declareMethod("startService", function() {
return this.getDeclaredGadget("tableeditor").push(function(tableeditor) {
return tableeditor.startService();
});
});
})(window, rJS, RSVP, initGadgetMixin);
\ No newline at end of file
...@@ -52,8 +52,8 @@ ...@@ -52,8 +52,8 @@
<a href="#leftpanel" <a href="#leftpanel"
data-icon="bars" data-icon="bars"
class="menu_link ui-btn ui-icon-bars ui-btn-icon-left">Menu</a> class="menu_link ui-btn ui-icon-bars ui-btn-icon-left">Menu</a>
<a data-icon="back" <a data-icon="carat-u"
class="back_link ui-btn ui-icon-back ui-btn-icon-right">Back</a> class="back_link ui-btn ui-icon-carat-u ui-btn-icon-left">Parent</a>
</div> </div>
<h1>Dream Simulation</h1> <h1>Dream Simulation</h1>
......
...@@ -31,10 +31,21 @@ ...@@ -31,10 +31,21 @@
type: "object_view", type: "object_view",
title: "Production Line" title: "Production Line"
}, },
view_table: { view_wip_part_spreadsheet: {
gadget: "Input_viewTable", gadget: "Input_viewWipPartSpreadsheet",
type: "object_view", type: "object_view",
title: "Edit table" title: "WIP Part Spreadsheet",
condition: function(gadget) {
return gadget.props.configuration_dict["Dream-Configuration"].gui.wip_part_spreadsheet;
}
},
view_shift_spreadsheet: {
gadget: "Input_viewShiftSpreadsheet",
type: "object_view",
title: "Shift Spreadsheet",
condition: function(gadget) {
return gadget.props.configuration_dict["Dream-Configuration"].gui.shift_spreadsheet;
}
}, },
view_simu: { view_simu: {
gadget: "Input_viewSimulation", gadget: "Input_viewSimulation",
...@@ -56,32 +67,50 @@ ...@@ -56,32 +67,50 @@
view: { view: {
gadget: "Output_viewStationUtilisationGraph", gadget: "Output_viewStationUtilisationGraph",
type: "object_view", type: "object_view",
title: "Stations Utilization" title: "Stations Utilization",
condition: function(gadget) {
return gadget.props.configuration_dict["Dream-Configuration"].gui.station_utilisation_graph;
}
}, },
view_queue_stat: { view_queue_stat: {
gadget: "Output_viewQueueStatGraph", gadget: "Output_viewQueueStatGraph",
type: "object_view", type: "object_view",
title: "Queues Statistics" title: "Queues Statistics",
condition: function(gadget) {
return gadget.props.configuration_dict["Dream-Configuration"].gui.queue_stat;
}
}, },
view_exit_stat: { view_exit_stat: {
gadget: "Output_viewExitStatistics", gadget: "Output_viewExitStatistics",
type: "object_view", type: "object_view",
title: "Exit Statistics" title: "Exit Statistics",
condition: function(gadget) {
return gadget.props.configuration_dict["Dream-Configuration"].gui.exit_stat;
}
}, },
view_gantt: { view_gantt: {
gadget: "Output_viewJobGantt", gadget: "Output_viewJobGantt",
type: "object_view", type: "object_view",
title: "Job Gantt" title: "Job Gantt",
condition: function(gadget) {
return gadget.props.configuration_dict["Dream-Configuration"].gui.job_gantt;
}
}, },
view_schedule: { view_schedule: {
gadget: "Output_viewJobScheduleSpreadsheet", gadget: "Output_viewJobScheduleSpreadsheet",
type: "object_view", type: "object_view",
title: "Job Schedule" title: "Job Schedule",
condition: function(gadget) {
return gadget.props.configuration_dict["Dream-Configuration"].gui.job_schedule_spreadsheet;
}
}, },
view_debug: { view_debug: {
gadget: "Output_viewDebugJson", gadget: "Output_viewDebugJson",
type: "object_view", type: "object_view",
title: "Debug JSON" title: "Debug JSON",
condition: function(gadget) {
return gadget.props.configuration_dict["Dream-Configuration"].gui.debug_json;
}
} }
} }
}, panel_template, navigation_template, active_navigation_template, gadget_klass = rJS(window); }, panel_template, navigation_template, active_navigation_template, gadget_klass = rJS(window);
...@@ -172,7 +201,9 @@ ...@@ -172,7 +201,9 @@
if (portal_types[portal_type].hasOwnProperty(key2)) { if (portal_types[portal_type].hasOwnProperty(key2)) {
action = portal_types[portal_type][key2]; action = portal_types[portal_type][key2];
if (action.type === "object_view") { if (action.type === "object_view") {
url_list.push(calculateTabHTML(gadget, options, key2, action.title, key2 === options.action)); if (action.condition === undefined || action.condition(gadget)) {
url_list.push(calculateTabHTML(gadget, options, key2, action.title, key2 === options.action));
}
} }
} }
} }
......
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