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

Rename gadgets to ease understanding the logic.

parent c2fc0402
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<script src="../<%= copy.renderjs.relative_dest %>" type="text/javascript"></script> <script src="../<%= copy.renderjs.relative_dest %>" type="text/javascript"></script>
<script src="mixin_gadget.js" type="text/javascript"></script> <script src="mixin_gadget.js" type="text/javascript"></script>
<script src="mixin_promise.js" type="text/javascript"></script> <script src="mixin_promise.js" type="text/javascript"></script>
<script src="create_document.js" type="text/javascript"></script> <script src="InputModule_viewAddDocumentDialog.js" type="text/javascript"></script>
</head> </head>
<body> <body>
<form class="import_form"> <form class="import_form">
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</script> </script>
<script src="mixin_gadget.js" type="text/javascript"></script> <script src="mixin_gadget.js" type="text/javascript"></script>
<script src="document_list.js" type="text/javascript"></script> <script src="InputModule_viewInputList.js" type="text/javascript"></script>
</head> </head>
<body> <body>
<section class="document_list"></section> <section class="document_list"></section>
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
return gadget.aq_allDocs({"select_list": ["title", "modified"]}) return gadget.aq_allDocs({"select_list": ["title", "modified"]})
.push(function (document_list) { .push(function (document_list) {
var result_list = [gadget.whoWantToDisplayThisPage( var result_list = [gadget.whoWantToDisplayThisPage(
"create_document" "InputModule_viewAddDocumentDialog"
)], )],
doc, doc,
i; i;
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
}) })
.declareMethod("getNavigationList", function () { .declareMethod("getNavigationList", function () {
return this.whoWantToDisplayThisPage("create_document") return this.whoWantToDisplayThisPage("InputModule_viewAddDocumentDialog")
.push(function (url) { .push(function (url) {
return [{title: "New Document", link: url}]; return [{title: "New Document", link: url}];
}); });
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<script src="mixin_gadget.js" type="text/javascript"></script> <script src="mixin_gadget.js" type="text/javascript"></script>
<script src="mixin_promise.js" type="text/javascript"></script> <script src="mixin_promise.js" type="text/javascript"></script>
<script src="mixin_document_page.js" type="text/javascript"></script> <script src="mixin_document_page.js" type="text/javascript"></script>
<script src="manage_document.js" type="text/javascript"></script> <script src="Input_viewDocumentManagement.js" type="text/javascript"></script>
</head> </head>
<body> <body>
<a class="export_link ui-btn ui-btn-inline ui-icon-action ui-btn-icon-right">Export</a> <a class="export_link ui-btn ui-btn-inline ui-icon-action ui-btn-icon-right">Export</a>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<script src="../<%= copy.renderjs.relative_dest %>" type="text/javascript"></script> <script src="../<%= copy.renderjs.relative_dest %>" type="text/javascript"></script>
<script src="mixin_document_page.js" type="text/javascript"></script> <script src="mixin_document_page.js" type="text/javascript"></script>
<script src="production_line.js" type="text/javascript"></script> <script src="Input_viewProductionLine.js" type="text/javascript"></script>
</head> </head>
<body> <body>
<div data-gadget-url="../jsplumb/index.html" <div data-gadget-url="../jsplumb/index.html"
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<script src="mixin_gadget.js" type="text/javascript"></script> <script src="mixin_gadget.js" type="text/javascript"></script>
<script src="mixin_promise.js" type="text/javascript"></script> <script src="mixin_promise.js" type="text/javascript"></script>
<script src="mixin_document_page.js" type="text/javascript"></script> <script src="mixin_document_page.js" type="text/javascript"></script>
<script src="run_simulation.js" type="text/javascript"></script> <script src="Input_viewSimulation.js" type="text/javascript"></script>
</head> </head>
<body> <body>
<form> <form>
......
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
}) })
.push(function (result) { .push(function (result) {
return gadget.whoWantToDisplayThisDocumentPage( return gadget.whoWantToDisplayThisDocumentPage(
"debug_json", "Output_viewDebugJson",
gadget.props.jio_key gadget.props.jio_key
); );
}) })
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<script src="mixin_gadget.js" type="text/javascript"></script> <script src="mixin_gadget.js" type="text/javascript"></script>
<script src="mixin_document_page.js" type="text/javascript"></script> <script src="mixin_document_page.js" type="text/javascript"></script>
<script src="edit_table.js" type="text/javascript"></script> <script src="Input_viewTable.js" type="text/javascript"></script>
</head> </head>
<body> <body>
<div data-gadget-url="../handsontable/index.html" <div data-gadget-url="../handsontable/index.html"
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<script src="../<%= copy.renderjs.relative_dest %>" type="text/javascript"></script> <script src="../<%= copy.renderjs.relative_dest %>" type="text/javascript"></script>
<script src="mixin_gadget.js" type="text/javascript"></script> <script src="mixin_gadget.js" type="text/javascript"></script>
<script src="mixin_document_page.js" type="text/javascript"></script> <script src="mixin_document_page.js" type="text/javascript"></script>
<script src="debug_json.js" type="text/javascript"></script> <script src="Output_viewDebugJson.js" type="text/javascript"></script>
</head> </head>
<body> <body>
<label for="json_input">Input</label> <label for="json_input">Input</label>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<script src="../<%= copy.handlebars.relative_dest %>" type="text/javascript"></script> <script src="../<%= copy.handlebars.relative_dest %>" type="text/javascript"></script>
<script src="mixin_gadget.js" type="text/javascript"></script> <script src="mixin_gadget.js" type="text/javascript"></script>
<script src="mixin_document_page.js" type="text/javascript"></script> <script src="mixin_document_page.js" type="text/javascript"></script>
<script src="exit_stat.js" type="text/javascript"></script> <script src="Output_viewExitStatistics.js" type="text/javascript"></script>
<script id="interval-through-metric-template" type="text/x-handlebars-template"> <script id="interval-through-metric-template" type="text/x-handlebars-template">
<tr> <tr>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<script src="../<%= copy.dhtmlxganttjs.relative_dest %>" type="text/javascript"></script> <script src="../<%= copy.dhtmlxganttjs.relative_dest %>" type="text/javascript"></script>
<script src="mixin_gadget.js" type="text/javascript"></script> <script src="mixin_gadget.js" type="text/javascript"></script>
<script src="mixin_document_page.js" type="text/javascript"></script> <script src="mixin_document_page.js" type="text/javascript"></script>
<script src="job_gantt.js" type="text/javascript"></script> <script src="Output_viewJobGantt.js" type="text/javascript"></script>
</head> </head>
<body> <body>
<div class="gant_container" style="height: 800px;"></div> <div class="gant_container" style="height: 800px;"></div>
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<script src="../<%= curl.momentjs.relative_dest %>" type="text/javascript"></script> <script src="../<%= curl.momentjs.relative_dest %>" type="text/javascript"></script>
<script src="mixin_gadget.js" type="text/javascript"></script> <script src="mixin_gadget.js" type="text/javascript"></script>
<script src="mixin_document_page.js" type="text/javascript"></script> <script src="mixin_document_page.js" type="text/javascript"></script>
<script src="job_schedule_spreadsheet.js" type="text/javascript"></script> <script src="Output_viewJobScheduleSpreadsheet.js" type="text/javascript"></script>
</head> </head>
<body> <body>
<div data-gadget-url="../handsontable/index.html" <div data-gadget-url="../handsontable/index.html"
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<script src="../<%= curl.jqueryflotstack.relative_dest %>"></script> <script src="../<%= curl.jqueryflotstack.relative_dest %>"></script>
<script src="mixin_gadget.js" type="text/javascript"></script> <script src="mixin_gadget.js" type="text/javascript"></script>
<script src="mixin_document_page.js" type="text/javascript"></script> <script src="mixin_document_page.js" type="text/javascript"></script>
<script src="queue_stat_graph.js" type="text/javascript"></script> <script src="Output_viewQueueStatGraph.js" type="text/javascript"></script>
</head> </head>
<body> <body>
<div class="graph_container" style="width: 100%;height:300px"></div> <div class="graph_container" style="width: 100%;height:300px"></div>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<script src="../<%= curl.jqueryflotstack.relative_dest %>"></script> <script src="../<%= curl.jqueryflotstack.relative_dest %>"></script>
<script src="mixin_gadget.js" type="text/javascript"></script> <script src="mixin_gadget.js" type="text/javascript"></script>
<script src="mixin_document_page.js" type="text/javascript"></script> <script src="mixin_document_page.js" type="text/javascript"></script>
<script src="station_utilisation_graph.js" type="text/javascript"></script> <script src="Output_viewStationUtilisationGraph.js" type="text/javascript"></script>
</head> </head>
<body> <body>
<div class="graph_container" style="width: 100%;height:300px"></div> <div class="graph_container" style="width: 100%;height:300px"></div>
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
function (param_list) { function (param_list) {
// Hey, I want to display some jIO document // Hey, I want to display some jIO document
return this.aq_pleasePublishMyState({ return this.aq_pleasePublishMyState({
page: "edit_table", page: "Input_viewTable",
id: param_list[0] id: param_list[0]
}); });
}) })
...@@ -151,7 +151,9 @@ ...@@ -151,7 +151,9 @@
options.configuration_dict = gadget.props.configuration_dict; options.configuration_dict = gadget.props.configuration_dict;
if (options.page === undefined) { if (options.page === undefined) {
// Redirect to the about page // Redirect to the about page
return gadget.aq_pleasePublishMyState({page: "document_list"}) return gadget.aq_pleasePublishMyState({
page: "InputModule_viewInputList"
})
.push(gadget.pleaseRedirectMyHash.bind(gadget)); .push(gadget.pleaseRedirectMyHash.bind(gadget));
} }
return gadget.declareGadget(options.page + ".html") return gadget.declareGadget(options.page + ".html")
......
...@@ -13,26 +13,44 @@ ...@@ -13,26 +13,44 @@
.push(function () { .push(function () {
// XXX Conditional simulation menu // XXX Conditional simulation menu
return RSVP.all([ return RSVP.all([
gadget.whoWantToDisplayThisDocumentPage("production_line", key), gadget.whoWantToDisplayThisDocumentPage(
gadget.whoWantToDisplayThisDocumentPage("edit_table", key), "Input_viewProductionLine",
gadget.whoWantToDisplayThisDocumentPage("run_simulation", key), key
gadget.whoWantToDisplayThisDocumentPage("manage_document", key), ),
gadget.whoWantToDisplayThisDocumentPage("Input_viewTable", key),
gadget.whoWantToDisplayThisDocumentPage(
"Input_viewSimulation",
key
),
gadget.whoWantToDisplayThisDocumentPage(
"Input_viewDocumentManagement",
key
),
gadget.whoWantToDisplayThisDocumentPage( gadget.whoWantToDisplayThisDocumentPage(
"station_utilisation_graph", "Output_viewStationUtilisationGraph",
key key
), ),
gadget.whoWantToDisplayThisDocumentPage( gadget.whoWantToDisplayThisDocumentPage(
"queue_stat_graph", "Output_viewQueueStatGraph",
key key
), ),
gadget.whoWantToDisplayThisDocumentPage("exit_stat", key),
gadget.whoWantToDisplayThisDocumentPage("job_gantt", key),
gadget.whoWantToDisplayThisDocumentPage( gadget.whoWantToDisplayThisDocumentPage(
"job_schedule_spreadsheet", "Output_viewExitStatistics",
key key
), ),
gadget.whoWantToDisplayThisDocumentPage("debug_json", key) gadget.whoWantToDisplayThisDocumentPage(
"Output_viewJobGantt",
key
),
gadget.whoWantToDisplayThisDocumentPage(
"Output_viewJobScheduleSpreadsheet",
key
),
gadget.whoWantToDisplayThisDocumentPage(
"Output_viewDebugJson",
key
)
]); ]);
}) })
.push(function (result_list) { .push(function (result_list) {
......
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