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
24d7df81
Commit
24d7df81
authored
Apr 09, 2015
by
Jérome Perrin
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GUI: fix initial data on spreadsheet, this was lost during merges
parent
420c306e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
dream/platform/src/handsontable/handsontable.js
dream/platform/src/handsontable/handsontable.js
+18
-3
No files found.
dream/platform/src/handsontable/handsontable.js
View file @
24d7df81
...
...
@@ -5,13 +5,28 @@
rJS
(
window
)
.
declareMethod
(
'
render
'
,
function
(
content
,
options
)
{
var
data
=
JSON
.
parse
(
content
);
var
data
=
JSON
.
parse
(
content
),
i
,
ctrlflag
=
true
,
def
=
[];
// if the content is not an array of arrays then create one
// from the content
for
(
i
=
0
;
i
<=
data
.
length
-
1
;
i
+=
1
)
{
if
(
!
(
data
[
i
].
constructor
===
Array
))
{
def
.
push
(
data
[
i
].
name
);
}
else
{
// otherwise do not modify anything
def
=
data
;
ctrlflag
=
false
;
break
;
}
}
if
(
ctrlflag
)
{
def
=
[
def
];
}
return
this
.
getElement
()
.
push
(
function
(
element
)
{
$
(
element
).
find
(
'
.table-container
'
)
.
handsontable
(
$
.
extend
({
data
:
d
ata
,
data
:
d
ef
,
stretchH
:
'
all
'
},
options
||
{}));
});
...
...
Jérome Perrin
@jerome
mentioned in commit
a362559b
·
Oct 14, 2016
mentioned in commit
a362559b
mentioned in commit a362559bc2839528a15145aebf5a3b9ef11bbd75
Toggle commit list
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