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
86dc804b
Commit
86dc804b
authored
Jun 17, 2014
by
Romain Courteaud
Committed by
Jérome Perrin
Aug 11, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add condition to display a tab.
parent
7cc01a8b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
116 additions
and
15 deletions
+116
-15
dream/platform/src2/dream/Input_viewShiftSpreadsheet.html
dream/platform/src2/dream/Input_viewShiftSpreadsheet.html
+2
-2
dream/platform/src2/dream/Input_viewShiftSpreadsheet.js
dream/platform/src2/dream/Input_viewShiftSpreadsheet.js
+44
-0
dream/platform/src2/dream/Input_viewWipPartSpreadsheet.html
dream/platform/src2/dream/Input_viewWipPartSpreadsheet.html
+17
-0
dream/platform/src2/dream/Input_viewWipPartSpreadsheet.js
dream/platform/src2/dream/Input_viewWipPartSpreadsheet.js
+0
-0
dream/platform/src2/dream/index.js
dream/platform/src2/dream/index.js
+53
-13
No files found.
dream/platform/src2/dream/Input_view
Table
.html
→
dream/platform/src2/dream/Input_view
ShiftSpreadsheet
.html
View file @
86dc804b
...
...
@@ -3,12 +3,12 @@
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<title>
Edit
table
</title>
<title>
Edit
Wip Part Spreadsheet
</title>
<script
src=
"../<%= copy.rsvp.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=
"Input_view
Table
.js"
type=
"text/javascript"
></script>
<script
src=
"Input_view
ShiftSpreadsheet
.js"
type=
"text/javascript"
></script>
</head>
<body>
<div
data-gadget-url=
"../handsontable/index.html"
...
...
dream/platform/src2/dream/Input_viewShiftSpreadsheet.js
0 → 100644
View file @
86dc804b
/*global console, rJS, RSVP, initGadgetMixin */
(
function
(
window
,
rJS
,
RSVP
,
initGadgetMixin
)
{
"
use strict
"
;
var
gadget_klass
=
rJS
(
window
);
initGadgetMixin
(
gadget_klass
);
gadget_klass
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.
declareAcquiredMethod
(
"
aq_getAttachment
"
,
"
jio_getAttachment
"
)
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.
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
));
dream/platform/src2/dream/Input_viewWipPartSpreadsheet.html
0 → 100644
View file @
86dc804b
<!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=
"../<%= copy.rsvp.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=
"Input_viewWipPartSpreadsheet.js"
type=
"text/javascript"
></script>
</head>
<body>
<div
data-gadget-url=
"../handsontable/index.html"
data-gadget-scope=
"tableeditor"
></div>
</body>
</html>
dream/platform/src2/dream/Input_view
Table
.js
→
dream/platform/src2/dream/Input_view
WipPartSpreadsheet
.js
View file @
86dc804b
File moved
dream/platform/src2/dream/index.js
View file @
86dc804b
...
...
@@ -33,10 +33,23 @@
"
type
"
:
"
object_view
"
,
"
title
"
:
"
Production Line
"
},
"
view_
table
"
:
{
"
gadget
"
:
"
Input_view
Table
"
,
"
view_
wip_part_spreadsheet
"
:
{
"
gadget
"
:
"
Input_view
WipPartSpreadsheet
"
,
"
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
"
:
{
"
gadget
"
:
"
Input_viewSimulation
"
,
...
...
@@ -58,32 +71,56 @@
"
view
"
:
{
"
gadget
"
:
"
Output_viewStationUtilisationGraph
"
,
"
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
"
:
{
"
gadget
"
:
"
Output_viewQueueStatGraph
"
,
"
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
"
:
{
"
gadget
"
:
"
Output_viewExitStatistics
"
,
"
type
"
:
"
object_view
"
,
"
title
"
:
"
Exit Statistics
"
"
title
"
:
"
Exit Statistics
"
,
"
condition
"
:
function
(
gadget
)
{
return
(
gadget
.
props
.
configuration_dict
[
'
Dream-Configuration
'
]
.
gui
.
exit_stat
);
}
},
"
view_gantt
"
:
{
"
gadget
"
:
"
Output_viewJobGantt
"
,
"
type
"
:
"
object_view
"
,
"
title
"
:
"
Job Gantt
"
"
title
"
:
"
Job Gantt
"
,
"
condition
"
:
function
(
gadget
)
{
return
(
gadget
.
props
.
configuration_dict
[
'
Dream-Configuration
'
]
.
gui
.
job_gantt
);
}
},
"
view_schedule
"
:
{
"
gadget
"
:
"
Output_viewJobScheduleSpreadsheet
"
,
"
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
"
:
{
"
gadget
"
:
"
Output_viewDebugJson
"
,
"
type
"
:
"
object_view
"
,
"
title
"
:
"
Debug JSON
"
"
title
"
:
"
Debug JSON
"
,
"
condition
"
:
function
(
gadget
)
{
return
(
gadget
.
props
.
configuration_dict
[
'
Dream-Configuration
'
]
.
gui
.
debug_json
);
}
}
}
},
...
...
@@ -196,10 +233,13 @@
if
(
portal_types
[
portal_type
].
hasOwnProperty
(
key2
))
{
action
=
portal_types
[
portal_type
][
key2
];
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
))
);
}
}
}
...
...
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