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
ed20ca33
Commit
ed20ca33
authored
Dec 15, 2014
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updating the static after last changes
parent
d32c436f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
23 deletions
+19
-23
dream/platform/static/dream/Input_viewSpreadsheet.js
dream/platform/static/dream/Input_viewSpreadsheet.js
+6
-10
dream/platform/static/dream/index.js
dream/platform/static/dream/index.js
+13
-13
No files found.
dream/platform/static/dream/Input_viewSpreadsheet.js
View file @
ed20ca33
...
...
@@ -21,7 +21,9 @@
});
}).
push
(
function
(
body
)
{
var
data
=
JSON
.
parse
(
body
);
data
.
shift_spreadsheet
=
JSON
.
parse
(
editor_data
);
// create a property within input
// with name the provided at render time
data
.
input
[
gadget
.
props
.
name
]
=
JSON
.
parse
(
editor_data
);
return
gadget
.
aq_putAttachment
({
_id
:
gadget
.
props
.
jio_key
,
_attachment
:
"
body.json
"
,
...
...
@@ -43,24 +45,18 @@
console
.
log
(
"
generic spreadsheet RENDER1
"
);
var
jio_key
=
options
.
id
,
gadget
=
this
;
gadget
.
props
.
jio_key
=
jio_key
;
console
.
log
(
"
generic spreadsheet RENDER2
"
);
console
.
log
(
options
);
// view_##### is the formulatino of the names
gadget
.
props
.
name
=
options
.
action
.
substr
(
5
,
options
.
action
.
length
);
return
new
RSVP
.
Queue
().
push
(
function
()
{
console
.
log
(
"
generic spreadsheet RENDER3
"
);
return
RSVP
.
all
([
gadget
.
aq_getAttachment
({
_id
:
jio_key
,
_attachment
:
"
body.json
"
}),
gadget
.
getDeclaredGadget
(
"
tableeditor
"
)
]);
}).
push
(
function
(
result_list
)
{
console
.
log
(
"
generic spreadsheet RENDER4
"
);
console
.
log
(
JSON
.
parse
(
result_list
[
0
]));
var
i
,
content
,
data
=
JSON
.
parse
(
result_list
[
0
]).
application_configuration
.
Input
;
console
.
log
(
data
);
var
i
,
content
,
data
=
JSON
.
parse
(
result_list
[
0
]).
application_configuration
.
input
;
for
(
i
=
0
;
i
<=
Object
.
keys
(
data
).
length
;
i
+=
1
)
{
if
(
Object
.
keys
(
data
)[
i
]
===
options
.
action
)
{
console
.
log
(
"
content
"
);
content
=
data
[
options
.
action
].
configuration
.
columns
;
console
.
log
(
content
);
}
}
// application_configuration.input.view_???_spreasheet.configuration
...
...
dream/platform/static/dream/index.js
View file @
ed20ca33
...
...
@@ -62,9 +62,9 @@
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
()
{
return
gadget
.
getDeclaredGadget
(
"
jio
"
);
...
...
@@ -92,7 +92,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
...
...
@@ -100,7 +100,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
({
_id
:
options
.
id
,
...
...
@@ -223,9 +223,9 @@
// Hey, I want to display some jIO document
// 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
;
break
;
...
...
@@ -331,15 +331,15 @@
$('.pre_input_link').hide();
}*/
if
(
gadget
.
props
.
configSet
===
true
)
{
portal_types
.
Input
=
gadget
.
props
.
configuration_dict
.
application_configuration
.
I
nput
;
portal_types
.
Output
=
gadget
.
props
.
configuration_dict
.
application_configuration
.
O
utput
;
portal_types
.
input
=
gadget
.
props
.
configuration_dict
.
application_configuration
.
i
nput
;
portal_types
.
output
=
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
;
}
...
...
@@ -363,8 +363,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