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
199cf2df
Commit
199cf2df
authored
Dec 12, 2014
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
static update
parent
2c15f97c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
5 deletions
+25
-5
dream/platform/static/dream/Input_viewSpreadsheet.html
dream/platform/static/dream/Input_viewSpreadsheet.html
+1
-1
dream/platform/static/dream/Input_viewSpreadsheet.js
dream/platform/static/dream/Input_viewSpreadsheet.js
+18
-2
dream/platform/static/handsontable/handsontable.js
dream/platform/static/handsontable/handsontable.js
+6
-2
No files found.
dream/platform/static/dream/Input_viewSpreadsheet.html
View file @
199cf2df
...
...
@@ -10,7 +10,7 @@
<script
src=
"../lib/jquerymobile.js"
type=
"text/javascript"
></script>
<script
src=
"mixin_gadget.js"
type=
"text/javascript"
></script>
<script
src=
"Input_viewS
hiftS
preadsheet.js"
type=
"text/javascript"
></script>
<script
src=
"Input_viewSpreadsheet.js"
type=
"text/javascript"
></script>
</head>
<body>
<div
data-gadget-url=
"../handsontable/index.html"
...
...
dream/platform/static/dream/Input_viewSpreadsheet.js
View file @
199cf2df
/*global rJS, RSVP, initGadgetMixin, loopEventListener */
/*global rJS, RSVP, initGadgetMixin, loopEventListener
, console
*/
(
function
(
window
,
rJS
,
RSVP
,
initGadgetMixin
,
loopEventListener
)
{
"
use strict
"
;
function
saveSpreadsheet
(
evt
)
{
...
...
@@ -40,15 +40,31 @@
var
gadget_klass
=
rJS
(
window
);
initGadgetMixin
(
gadget_klass
);
gadget_klass
.
declareAcquiredMethod
(
"
aq_getAttachment
"
,
"
jio_getAttachment
"
).
declareAcquiredMethod
(
"
aq_putAttachment
"
,
"
jio_putAttachment
"
).
declareMethod
(
"
render
"
,
function
(
options
)
{
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
);
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
)
{
return
result_list
[
1
].
render
(
JSON
.
stringify
(
JSON
.
parse
(
result_list
[
0
]).
shift_spreadsheet
),
{
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
);
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
return
result_list
[
1
].
render
(
JSON
.
stringify
(
content
),
{
minSpareRows
:
1
,
onChange
:
function
()
{
if
(
gadget
.
timeout
)
{
...
...
dream/platform/static/handsontable/handsontable.js
View file @
199cf2df
...
...
@@ -2,10 +2,14 @@
(
function
(
window
,
$
,
rJS
,
JSON
,
RSVP
)
{
"
use strict
"
;
rJS
(
window
).
declareMethod
(
"
render
"
,
function
(
content
,
options
)
{
var
data
=
JSON
.
parse
(
content
);
var
data
=
JSON
.
parse
(
content
),
i
,
def
=
[];
for
(
i
=
0
;
i
<=
data
.
length
-
1
;
i
+=
1
)
{
def
.
push
(
data
[
i
].
name
);
}
def
=
[
def
];
return
this
.
getElement
().
push
(
function
(
element
)
{
$
(
element
).
find
(
"
.table-container
"
).
handsontable
(
$
.
extend
({
data
:
d
ata
,
data
:
d
ef
,
stretchH
:
"
all
"
},
options
||
{}));
});
...
...
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