Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cto
g1
Commits
c6d07423
Commit
c6d07423
authored
Feb 15, 2019
by
Tejesh
🖖
Browse files
BUG: $.formhandler editable fails for columns which have spaces in name
, fixes
#148
parent
4030fcaf
Pipeline
#76827
passed with stage
in 2 minutes and 44 seconds
Changes
3
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
src/formhandler.js
View file @
c6d07423
...
...
@@ -317,7 +317,7 @@ function editHandler($this, template_data, options, template) {
var
rowIndex
=
edited_row
.
getAttribute
(
'
data-row
'
)
for
(
key
in
data
)
{
// TODO: refactor to identify editable columns other than using data-key attrs on <td> tag
var
editable_element
=
$
(
'
td[data-key=
'
+
(
remove_quotes
(
key
))
+
'
] :input
'
,
$
(
edited_row
))
var
editable_element
=
$
(
'
td[data-key=
"
'
+
(
remove_quotes
(
key
))
+
'
"
] :input
'
,
$
(
edited_row
))
if
(
editable_element
.
length
)
{
data
[
key
]
=
template_data
[
'
data
'
][
rowIndex
][
key
]
=
editable_element
.
val
()
}
...
...
test/formhandler.csv
View file @
c6d07423
Continent,Cross,ID,Name,Shapes,Stripes,Symbols,Text,Union-Flag,c1,c2,c3,c4,c5,c6,c7,c8,date
_
col
Continent,Cross,ID,Name,Shapes,Stripes,Symbols,Text,Union-Flag,c1,c2,c3,c4,c5,c6,c7,c8,date
col
Europe,,AND,Andorra,,Horizontal,,,,35,1,26,0,32,0,0,4,16-01-2013
Asia,,ARE,United Arab Emirates,,Horizontal,,,,24.0,0.0,0.0,25.0,0.0,0.0,25.0,24.0,17-02-2013
Asia,,AFG,Afghanistan,,Vertical,,Country,,28.0,1.0,0.0,33.0,0.0,0.0,33.0,3.0,06-02-2013
...
...
test/formhandler_csv.json
View file @
c6d07423
This diff is collapsed.
Click to expand it.
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