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
eae682ea
Commit
eae682ea
authored
Feb 11, 2015
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
publish static version
parent
4a2779c8
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
8 deletions
+12
-8
dream/platform/static/dream/Input_viewSimulation.js
dream/platform/static/dream/Input_viewSimulation.js
+4
-0
dream/platform/static/dream/Output_viewDownloadFile.html
dream/platform/static/dream/Output_viewDownloadFile.html
+1
-1
dream/platform/static/dream/Output_viewDownloadFile.js
dream/platform/static/dream/Output_viewDownloadFile.js
+4
-3
dream/platform/static/dream/Output_viewSpreadsheet.js
dream/platform/static/dream/Output_viewSpreadsheet.js
+3
-4
No files found.
dream/platform/static/dream/Input_viewSimulation.js
View file @
eae682ea
...
...
@@ -56,10 +56,14 @@
});
}).
push
(
function
(
data
)
{
data
=
JSON
.
parse
(
data
);
if
(
!
data
.
result
.
result_list
)
{
data
.
result
.
result_list
=
[];
}
// XXX option to always add ?
if
(
data
.
general
.
reset_result_list
)
{
data
.
result
.
result_list
=
[];
}
data
.
result
.
result_list
=
[];
data
.
result
.
result_list
=
data
.
result
.
result_list
.
concat
(
result_json
.
data
.
result
.
result_list
);
return
gadget
.
aq_putAttachment
({
_id
:
gadget
.
props
.
jio_key
,
...
...
dream/platform/static/dream/Output_viewDownload
ExcelSpreadsheet
.html
→
dream/platform/static/dream/Output_viewDownload
File
.html
View file @
eae682ea
...
...
@@ -10,7 +10,7 @@
<script
src=
"../lib/jquery.js"
type=
"text/javascript"
></script>
<script
src=
"mixin_gadget.js"
type=
"text/javascript"
></script>
<script
src=
"Output_viewDownload
ExcelSpreadsheet
.js"
type=
"text/javascript"
></script>
<script
src=
"Output_viewDownload
File
.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>
...
...
dream/platform/static/dream/Output_viewDownload
ExcelSpreadsheet
.js
→
dream/platform/static/dream/Output_viewDownload
File
.js
View file @
eae682ea
...
...
@@ -12,9 +12,10 @@
_id
:
gadget
.
props
.
jio_key
,
_attachment
:
"
body.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
"
];
var
result
=
JSON
.
parse
(
simulation_json
).
result
.
result_list
[
options
.
result
],
output
=
result
[
options
.
action_definition
.
configuration
.
output_id
],
download_link
=
gadget
.
props
.
element
.
querySelector
(
"
.download_link
"
);
/* XXX this does not work with Internet Explorer */
download_link
.
download
=
output
.
name
;
download_link
.
href
=
"
data:
"
+
output
.
mime_type
+
"
;base64,
"
+
output
.
data
;
});
}).
declareMethod
(
"
startService
"
,
function
()
{
return
new
RSVP
.
Queue
().
push
(
function
()
{
...
...
dream/platform/static/dream/Output_viewSpreadsheet.js
View file @
eae682ea
/*global rJS, RSVP, initGadgetMixin,
loopEventListener,
$ */
(
function
(
window
,
rJS
,
RSVP
,
initGadgetMixin
,
loopEventListener
,
$
)
{
/*global rJS, RSVP, initGadgetMixin, $ */
(
function
(
window
,
rJS
,
RSVP
,
initGadgetMixin
,
$
)
{
"
use strict
"
;
var
gadget_klass
=
rJS
(
window
);
initGadgetMixin
(
gadget_klass
);
...
...
@@ -19,9 +19,8 @@
result_list
[
1
].
render
(
JSON
.
stringify
(
content
),
handsontable_options
);
});
}).
declareMethod
(
"
startService
"
,
function
()
{
var
gadget
=
this
;
return
this
.
getDeclaredGadget
(
"
tableeditor
"
).
push
(
function
(
tableeditor
)
{
return
tableeditor
.
startService
();
});
});
})(
window
,
rJS
,
RSVP
,
initGadgetMixin
,
loopEventListener
,
$
);
\ No newline at end of file
})(
window
,
rJS
,
RSVP
,
initGadgetMixin
,
$
);
\ No newline at end of file
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