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
313b8a8c
Commit
313b8a8c
authored
Dec 15, 2014
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
index update to create portal type with corresponding keys input and output
parent
f3d9e4ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
dream/platform/src/dream/index.js
dream/platform/src/dream/index.js
+16
-16
No files found.
dream/platform/src/dream/index.js
View file @
313b8a8c
...
...
@@ -117,7 +117,7 @@
"title": "Results"
}
},
"
O
utput": {
"
o
utput": {
"view": {
"gadget": "Output_viewStationUtilisationGraph",
"type": "object_view",
...
...
@@ -243,9 +243,9 @@
function
getNextLink
(
gadget
,
portal_type
,
options
)
{
var
forward_kw
=
{
action
:
options
.
action
||
"
view
"
},
queue
=
new
RSVP
.
Queue
();
if
(
portal_type
===
"
I
nput
"
)
{
if
(
portal_type
===
"
i
nput
"
)
{
forward_kw
.
id
=
options
.
id
;
}
else
if
(
portal_type
===
"
O
utput
"
)
{
}
else
if
(
portal_type
===
"
o
utput
"
)
{
forward_kw
.
id
=
options
.
id
;
queue
.
push
(
function
()
{
...
...
@@ -278,7 +278,7 @@
var
title
;
if
(
portal_type
===
"
Pre Input Module
"
)
{
title
=
"
Documents
"
;
}
else
if
(
portal_type
===
"
I
nput
"
)
{
}
else
if
(
portal_type
===
"
i
nput
"
)
{
title
=
gadget
.
getDeclaredGadget
(
"
jio
"
)
.
push
(
function
(
jio_gadget
)
{
return
jio_gadget
.
get
({
_id
:
options
.
id
});
...
...
@@ -286,7 +286,7 @@
.
push
(
function
(
jio_doc
)
{
return
jio_doc
.
data
.
title
+
"
(
"
+
jio_doc
.
data
.
modified
+
"
)
"
;
});
}
else
if
(
portal_type
===
"
O
utput
"
)
{
}
else
if
(
portal_type
===
"
o
utput
"
)
{
title
=
gadget
.
getDeclaredGadget
(
"
jio
"
)
.
push
(
function
(
jio_gadget
)
{
return
jio_gadget
.
getAttachment
({
...
...
@@ -454,9 +454,9 @@
// We'll display the result using the first enabled action
var
action
=
"
view
"
,
action_info
,
action_id
;
for
(
action_id
in
portal_types
.
O
utput
)
{
if
(
portal_types
.
O
utput
.
hasOwnProperty
(
action_id
))
{
action_info
=
portal_types
.
O
utput
[
action_id
];
for
(
action_id
in
portal_types
.
o
utput
)
{
if
(
portal_types
.
o
utput
.
hasOwnProperty
(
action_id
))
{
action_info
=
portal_types
.
o
utput
[
action_id
];
if
((
action_info
.
condition
===
undefined
)
||
(
action_info
.
condition
(
this
)))
{
action
=
action_id
;
...
...
@@ -646,17 +646,17 @@
$('.pre_input_link').hide();
}*/
if
(
gadget
.
props
.
configSet
===
true
)
{
portal_types
.
I
nput
=
gadget
.
props
.
configuration_dict
.
application_configuration
.
I
nput
;
portal_types
.
O
utput
=
gadget
.
props
.
configuration_dict
.
application_configuration
.
O
utput
;
portal_types
.
i
nput
=
gadget
.
props
.
configuration_dict
.
application_configuration
.
i
nput
;
portal_types
.
o
utput
=
gadget
.
props
.
configuration_dict
.
application_configuration
.
o
utput
;
}
// Detect what is the kind of document displayed
if
(
options
.
id
!==
undefined
)
{
if
(
options
.
result
===
undefined
)
{
portal_type
=
"
I
nput
"
;
portal_type
=
"
i
nput
"
;
}
else
{
portal_type
=
"
O
utput
"
;
portal_type
=
"
o
utput
"
;
back_kw
.
action
=
"
view_result
"
;
back_kw
.
id
=
options
.
id
;
}
...
...
@@ -681,8 +681,8 @@
if (result) {
data = JSON.parse(result);
gadget.props.data = data;
portal_types.
I
nput = data.application_configuration.input;
portal_types.
O
utput = data.application_configuration.output;
portal_types.
i
nput = data.application_configuration.input;
portal_types.
o
utput = data.application_configuration.output;
}
// Get the action information
return gadget.declareGadget(
...
...
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