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
d7fcb763
Commit
d7fcb763
authored
Sep 09, 2014
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
publish static version
parent
dbb5e014
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
314 additions
and
2 deletions
+314
-2
dream/platform/static/dream/InputModule_viewAddDocumentDialog.js
...latform/static/dream/InputModule_viewAddDocumentDialog.js
+3
-1
dream/platform/static/dream/Input_viewDemandPlanningCapacitySpreadsheet.html
...ic/dream/Input_viewDemandPlanningCapacitySpreadsheet.html
+23
-0
dream/platform/static/dream/Input_viewDemandPlanningCapacitySpreadsheet.js
...atic/dream/Input_viewDemandPlanningCapacitySpreadsheet.js
+58
-0
dream/platform/static/dream/Input_viewDemandPlanningRouteSpreadsheet.html
...tatic/dream/Input_viewDemandPlanningRouteSpreadsheet.html
+23
-0
dream/platform/static/dream/Input_viewDemandPlanningRouteSpreadsheet.js
.../static/dream/Input_viewDemandPlanningRouteSpreadsheet.js
+58
-0
dream/platform/static/dream/Input_viewDemandPlanningapacitySpreadsheet.html
...tic/dream/Input_viewDemandPlanningapacitySpreadsheet.html
+23
-0
dream/platform/static/dream/Input_viewDemandPlanningapacitySpreadsheet.js
...tatic/dream/Input_viewDemandPlanningapacitySpreadsheet.js
+58
-0
dream/platform/static/dream/Output_viewDownloadExcelSpreadsheet.html
...orm/static/dream/Output_viewDownloadExcelSpreadsheet.html
+18
-0
dream/platform/static/dream/Output_viewDownloadExcelSpreadsheet.js
...tform/static/dream/Output_viewDownloadExcelSpreadsheet.js
+25
-0
dream/platform/static/dream/index.js
dream/platform/static/dream/index.js
+24
-0
dream/platform/static/fieldset/fieldset.js
dream/platform/static/fieldset/fieldset.js
+1
-1
No files found.
dream/platform/static/dream/InputModule_viewAddDocumentDialog.js
View file @
d7fcb763
...
...
@@ -46,7 +46,9 @@
shift_spreadsheet
:
[
[
"
Day
"
,
"
Machines
"
,
// XXX more generic name ?
"
Start
"
,
"
End
"
]
],
capacity_by_project_spreadsheet
:
[
[
"
Project Name
"
,
"
Sequence
"
,
"
Capacity Requirements
"
]
],
capacity_by_station_spreadsheet
:
[
[
"
Day
"
,
"
CS1
"
]
]
capacity_by_station_spreadsheet
:
[
[
"
Day
"
,
"
CS1
"
]
],
dp_capacity_spreadsheet
:
[
[]
],
dp_route_spreadsheet
:
[
[]
]
},
name
=
"
Untitled
"
;
return
new
RSVP
.
Queue
().
push
(
function
()
{
return
promiseEventListener
(
gadget
.
props
.
element
.
getElementsByClassName
(
"
new_form
"
)[
0
],
"
submit
"
,
false
);
...
...
dream/platform/static/dream/Input_viewDemandPlanningCapacitySpreadsheet.html
0 → 100644
View file @
d7fcb763
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<title>
Edit Required Capacity Spreadsheet
</title>
<script
src=
"../lib/rsvp.min.js"
type=
"text/javascript"
></script>
<script
src=
"../lib/renderjs.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
src=
"mixin_gadget.js"
type=
"text/javascript"
></script>
<script
src=
"Input_viewDemandPlanningCapacitySpreadsheet.js"
type=
"text/javascript"
></script>
</head>
<body>
<div
data-gadget-url=
"../handsontable/index.html"
data-gadget-scope=
"tableeditor"
></div>
<form
class=
"save_form"
>
<button
type=
"submit"
class=
"ui-btn ui-btn-b ui-btn-inline
ui-icon-edit ui-btn-icon-right"
>
Save
</button>
</form>
</body>
</html>
dream/platform/static/dream/Input_viewDemandPlanningCapacitySpreadsheet.js
0 → 100644
View file @
d7fcb763
/*global rJS, RSVP, initGadgetMixin, loopEventListener */
(
function
(
window
,
rJS
,
RSVP
,
initGadgetMixin
,
loopEventListener
)
{
"
use strict
"
;
function
saveSpreadsheet
(
evt
)
{
var
gadget
=
this
,
editor_data
,
editor_gadget
;
return
new
RSVP
.
Queue
().
push
(
function
()
{
// Prevent double click
evt
.
target
.
getElementsByClassName
(
"
ui-btn
"
)[
0
].
disabled
=
true
;
return
gadget
.
getDeclaredGadget
(
"
tableeditor
"
);
}).
push
(
function
(
tablegadget
)
{
editor_gadget
=
tablegadget
;
return
editor_gadget
.
getData
();
}).
push
(
function
(
data
)
{
editor_data
=
data
;
// Always get a fresh version, to prevent deleting spreadsheet & co
return
gadget
.
aq_getAttachment
({
_id
:
gadget
.
props
.
jio_key
,
_attachment
:
"
body.json
"
});
}).
push
(
function
(
body
)
{
var
data
=
JSON
.
parse
(
body
);
data
.
dp_capacity_spreadsheet
=
JSON
.
parse
(
editor_data
);
return
gadget
.
aq_putAttachment
({
_id
:
gadget
.
props
.
jio_key
,
_attachment
:
"
body.json
"
,
_data
:
JSON
.
stringify
(
data
,
null
,
2
),
_mimetype
:
"
application/json
"
});
}).
push
(
function
()
{
evt
.
target
.
getElementsByClassName
(
"
ui-btn
"
)[
0
].
disabled
=
false
;
});
}
function
waitForSave
(
gadget
)
{
return
loopEventListener
(
gadget
.
props
.
element
.
getElementsByClassName
(
"
save_form
"
)[
0
],
"
submit
"
,
false
,
saveSpreadsheet
.
bind
(
gadget
));
}
var
gadget_klass
=
rJS
(
window
);
initGadgetMixin
(
gadget_klass
);
gadget_klass
.
declareAcquiredMethod
(
"
aq_getAttachment
"
,
"
jio_getAttachment
"
).
declareAcquiredMethod
(
"
aq_putAttachment
"
,
"
jio_putAttachment
"
).
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
]).
dp_capacity_spreadsheet
),
{
minSpareCols
:
1
,
minSpareRows
:
1
});
});
}).
declareMethod
(
"
startService
"
,
function
()
{
var
gadget
=
this
;
return
this
.
getDeclaredGadget
(
"
tableeditor
"
).
push
(
function
(
tableeditor
)
{
return
RSVP
.
all
([
tableeditor
.
startService
(),
waitForSave
(
gadget
)
]);
});
});
})(
window
,
rJS
,
RSVP
,
initGadgetMixin
,
loopEventListener
);
\ No newline at end of file
dream/platform/static/dream/Input_viewDemandPlanningRouteSpreadsheet.html
0 → 100644
View file @
d7fcb763
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<title>
Edit Required Capacity Spreadsheet
</title>
<script
src=
"../lib/rsvp.min.js"
type=
"text/javascript"
></script>
<script
src=
"../lib/renderjs.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
src=
"mixin_gadget.js"
type=
"text/javascript"
></script>
<script
src=
"Input_viewDemandPlanningRouteSpreadsheet.js"
type=
"text/javascript"
></script>
</head>
<body>
<div
data-gadget-url=
"../handsontable/index.html"
data-gadget-scope=
"tableeditor"
></div>
<form
class=
"save_form"
>
<button
type=
"submit"
class=
"ui-btn ui-btn-b ui-btn-inline
ui-icon-edit ui-btn-icon-right"
>
Save
</button>
</form>
</body>
</html>
dream/platform/static/dream/Input_viewDemandPlanningRouteSpreadsheet.js
0 → 100644
View file @
d7fcb763
/*global rJS, RSVP, initGadgetMixin, loopEventListener */
(
function
(
window
,
rJS
,
RSVP
,
initGadgetMixin
,
loopEventListener
)
{
"
use strict
"
;
function
saveSpreadsheet
(
evt
)
{
var
gadget
=
this
,
editor_data
,
editor_gadget
;
return
new
RSVP
.
Queue
().
push
(
function
()
{
// Prevent double click
evt
.
target
.
getElementsByClassName
(
"
ui-btn
"
)[
0
].
disabled
=
true
;
return
gadget
.
getDeclaredGadget
(
"
tableeditor
"
);
}).
push
(
function
(
tablegadget
)
{
editor_gadget
=
tablegadget
;
return
editor_gadget
.
getData
();
}).
push
(
function
(
data
)
{
editor_data
=
data
;
// Always get a fresh version, to prevent deleting spreadsheet & co
return
gadget
.
aq_getAttachment
({
_id
:
gadget
.
props
.
jio_key
,
_attachment
:
"
body.json
"
});
}).
push
(
function
(
body
)
{
var
data
=
JSON
.
parse
(
body
);
data
.
dp_route_spreadsheet
=
JSON
.
parse
(
editor_data
);
return
gadget
.
aq_putAttachment
({
_id
:
gadget
.
props
.
jio_key
,
_attachment
:
"
body.json
"
,
_data
:
JSON
.
stringify
(
data
,
null
,
2
),
_mimetype
:
"
application/json
"
});
}).
push
(
function
()
{
evt
.
target
.
getElementsByClassName
(
"
ui-btn
"
)[
0
].
disabled
=
false
;
});
}
function
waitForSave
(
gadget
)
{
return
loopEventListener
(
gadget
.
props
.
element
.
getElementsByClassName
(
"
save_form
"
)[
0
],
"
submit
"
,
false
,
saveSpreadsheet
.
bind
(
gadget
));
}
var
gadget_klass
=
rJS
(
window
);
initGadgetMixin
(
gadget_klass
);
gadget_klass
.
declareAcquiredMethod
(
"
aq_getAttachment
"
,
"
jio_getAttachment
"
).
declareAcquiredMethod
(
"
aq_putAttachment
"
,
"
jio_putAttachment
"
).
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
]).
dp_route_spreadsheet
),
{
minSpareCols
:
1
,
minSpareRows
:
1
});
});
}).
declareMethod
(
"
startService
"
,
function
()
{
var
gadget
=
this
;
return
this
.
getDeclaredGadget
(
"
tableeditor
"
).
push
(
function
(
tableeditor
)
{
return
RSVP
.
all
([
tableeditor
.
startService
(),
waitForSave
(
gadget
)
]);
});
});
})(
window
,
rJS
,
RSVP
,
initGadgetMixin
,
loopEventListener
);
\ No newline at end of file
dream/platform/static/dream/Input_viewDemandPlanningapacitySpreadsheet.html
0 → 100644
View file @
d7fcb763
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<title>
Edit Required Capacity Spreadsheet
</title>
<script
src=
"../lib/rsvp.min.js"
type=
"text/javascript"
></script>
<script
src=
"../lib/renderjs.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
src=
"mixin_gadget.js"
type=
"text/javascript"
></script>
<script
src=
"Input_viewAvailableCapacitySpreadsheet.js"
type=
"text/javascript"
></script>
</head>
<body>
<div
data-gadget-url=
"../handsontable/index.html"
data-gadget-scope=
"tableeditor"
></div>
<form
class=
"save_form"
>
<button
type=
"submit"
class=
"ui-btn ui-btn-b ui-btn-inline
ui-icon-edit ui-btn-icon-right"
>
Save
</button>
</form>
</body>
</html>
dream/platform/static/dream/Input_viewDemandPlanningapacitySpreadsheet.js
0 → 100644
View file @
d7fcb763
/*global rJS, RSVP, initGadgetMixin, loopEventListener */
(
function
(
window
,
rJS
,
RSVP
,
initGadgetMixin
,
loopEventListener
)
{
"
use strict
"
;
function
saveSpreadsheet
(
evt
)
{
var
gadget
=
this
,
editor_data
,
editor_gadget
;
return
new
RSVP
.
Queue
().
push
(
function
()
{
// Prevent double click
evt
.
target
.
getElementsByClassName
(
"
ui-btn
"
)[
0
].
disabled
=
true
;
return
gadget
.
getDeclaredGadget
(
"
tableeditor
"
);
}).
push
(
function
(
tablegadget
)
{
editor_gadget
=
tablegadget
;
return
editor_gadget
.
getData
();
}).
push
(
function
(
data
)
{
editor_data
=
data
;
// Always get a fresh version, to prevent deleting spreadsheet & co
return
gadget
.
aq_getAttachment
({
_id
:
gadget
.
props
.
jio_key
,
_attachment
:
"
body.json
"
});
}).
push
(
function
(
body
)
{
var
data
=
JSON
.
parse
(
body
);
data
.
capacity_by_station_spreadsheet
=
JSON
.
parse
(
editor_data
);
return
gadget
.
aq_putAttachment
({
_id
:
gadget
.
props
.
jio_key
,
_attachment
:
"
body.json
"
,
_data
:
JSON
.
stringify
(
data
,
null
,
2
),
_mimetype
:
"
application/json
"
});
}).
push
(
function
()
{
evt
.
target
.
getElementsByClassName
(
"
ui-btn
"
)[
0
].
disabled
=
false
;
});
}
function
waitForSave
(
gadget
)
{
return
loopEventListener
(
gadget
.
props
.
element
.
getElementsByClassName
(
"
save_form
"
)[
0
],
"
submit
"
,
false
,
saveSpreadsheet
.
bind
(
gadget
));
}
var
gadget_klass
=
rJS
(
window
);
initGadgetMixin
(
gadget_klass
);
gadget_klass
.
declareAcquiredMethod
(
"
aq_getAttachment
"
,
"
jio_getAttachment
"
).
declareAcquiredMethod
(
"
aq_putAttachment
"
,
"
jio_putAttachment
"
).
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
]).
capacity_by_station_spreadsheet
),
{
minSpareCols
:
1
,
minSpareRows
:
1
});
});
}).
declareMethod
(
"
startService
"
,
function
()
{
var
gadget
=
this
;
return
this
.
getDeclaredGadget
(
"
tableeditor
"
).
push
(
function
(
tableeditor
)
{
return
RSVP
.
all
([
tableeditor
.
startService
(),
waitForSave
(
gadget
)
]);
});
});
})(
window
,
rJS
,
RSVP
,
initGadgetMixin
,
loopEventListener
);
\ No newline at end of file
dream/platform/static/dream/Output_viewDownloadExcelSpreadsheet.html
0 → 100644
View file @
d7fcb763
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<title>
Download Excel Spreadsheet
</title>
<script
src=
"../lib/rsvp.min.js"
type=
"text/javascript"
></script>
<script
src=
"../lib/renderjs.min.js"
type=
"text/javascript"
></script>
<script
src=
"../lib/jquery.js"
type=
"text/javascript"
></script>
<script
src=
"mixin_gadget.js"
type=
"text/javascript"
></script>
<script
src=
"Output_viewDownloadExcelSpreadsheet.js"
type=
"text/javascript"
></script>
</head>
<body>
<a
class=
"download_link ui-btn ui-btn-inline ui-icon-action ui-btn-icon-right"
>
Download
</a>
</body>
</html>
dream/platform/static/dream/Output_viewDownloadExcelSpreadsheet.js
0 → 100644
View file @
d7fcb763
/*global rJS, RSVP, jQuery, initGadgetMixin */
/*jslint nomen: true, unparam: true */
(
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
;
gadget
.
props
.
result
=
options
.
result
;
return
gadget
.
aq_getAttachment
({
_id
:
gadget
.
props
.
jio_key
,
_attachment
:
"
simulation.json
"
}).
push
(
function
(
simulation_json
)
{
var
result
=
JSON
.
parse
(
simulation_json
)[
0
].
result
,
download_link
=
gadget
.
props
.
element
.
querySelector
(
"
.download_link
"
);
download_link
.
download
=
"
demandPlannerOutput.xls
"
;
download_link
.
href
=
"
data:application/excel;base64,
"
+
result
[
"
demandPlannerOutput.xls
"
];
});
}).
declareMethod
(
"
startService
"
,
function
()
{
return
new
RSVP
.
Queue
().
push
(
function
()
{
// Infinite wait, until cancelled
return
new
RSVP
.
defer
().
promise
;
});
});
})(
window
,
rJS
,
RSVP
,
jQuery
,
initGadgetMixin
);
\ No newline at end of file
dream/platform/static/dream/index.js
View file @
d7fcb763
...
...
@@ -64,6 +64,22 @@
return
gadget
.
props
.
configuration_dict
[
"
Dream-Configuration
"
].
gui
.
capacity_by_station_spreadsheet
;
}
},
view_dp_capacity_spreadsheet
:
{
gadget
:
"
Input_viewDemandPlanningCapacitySpreadsheet
"
,
type
:
"
object_view
"
,
title
:
"
Demand Planning Required Capacity Spreadsheet
"
,
condition
:
function
(
gadget
)
{
return
gadget
.
props
.
configuration_dict
[
"
Dream-Configuration
"
].
gui
.
dp_capacity_spreadsheet
;
}
},
view_dp_route_spreadsheet
:
{
gadget
:
"
Input_viewDemandPlanningRouteSpreadsheet
"
,
type
:
"
object_view
"
,
title
:
"
Demand Planning Route Spreadsheet
"
,
condition
:
function
(
gadget
)
{
return
gadget
.
props
.
configuration_dict
[
"
Dream-Configuration
"
].
gui
.
dp_route_spreadsheet
;
}
},
view_simu
:
{
gadget
:
"
Input_viewSimulation
"
,
type
:
"
object_view
"
,
...
...
@@ -89,6 +105,14 @@
return
gadget
.
props
.
configuration_dict
[
"
Dream-Configuration
"
].
gui
.
station_utilisation_graph
;
}
},
download_excel_spreadsheet
:
{
gadget
:
"
Output_viewDownloadExcelSpreadsheet
"
,
type
:
"
object_view
"
,
title
:
"
Download Excel Spreadsheet
"
,
condition
:
function
(
gadget
)
{
return
gadget
.
props
.
configuration_dict
[
"
Dream-Configuration
"
].
gui
.
download_excel_spreadsheet
;
}
},
view_capacity_utilization
:
{
gadget
:
"
Output_viewCapacityUtilisationGraph
"
,
type
:
"
object_view
"
,
...
...
dream/platform/static/fieldset/fieldset.js
View file @
d7fcb763
...
...
@@ -61,7 +61,7 @@
queue
=
new
RSVP
.
Queue
().
push
(
function
()
{
Object
.
keys
(
property_list
).
forEach
(
function
(
i
)
{
property
=
property_list
[
i
];
value
=
property
.
_default
||
""
;
value
=
property
.
_default
===
undefined
?
""
:
property
.
_default
;
addField
(
property
,
value
);
});
});
...
...
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