Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
g1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
76
Issues
76
List
Boards
Labels
Service Desk
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cto
g1
Commits
dcc61ac6
Commit
dcc61ac6
authored
Feb 13, 2019
by
Tejesh
🖖
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove all action
parent
44eea5d6
Pipeline
#76436
failed with stage
in 3 minutes and 14 seconds
Changes
3
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
205 additions
and
198 deletions
+205
-198
src/formhandler.js
src/formhandler.js
+8
-1
test/formhandler.csv
test/formhandler.csv
+1
-1
test/formhandler_csv.json
test/formhandler_csv.json
+196
-196
No files found.
src/formhandler.js
View file @
dcc61ac6
...
...
@@ -208,6 +208,7 @@ export function formhandler(js_options) {
function
modalHandler
(
$this
)
{
// Handle modal dialog
var
currentKey
$this
.
on
(
'
shown.bs.modal
'
,
'
.formhandler-table-modal
'
,
function
(
e
)
{
var
$el
=
$
(
e
.
relatedTarget
)
...
...
@@ -228,6 +229,7 @@ function modalHandler($this) {
var
$el
=
$
(
e
.
relatedTarget
)
var
template_data
=
$this
.
data
(
'
formhandler
'
)
var
col
=
$el
.
closest
(
'
[data-col]
'
).
data
(
'
col
'
)
currentKey
=
col
// render checkboxes for unique items of column
var
unique_values
=
_
.
find
(
template_data
.
options
.
columns
,
function
(
item
){
return
item
.
name
==
col
}).
unique
// if (!unique_values) return
...
...
@@ -274,9 +276,14 @@ function modalHandler($this) {
})
.
on
(
'
submit
'
,
'
form.formhandler-table-modal-form
'
,
function
(
e
)
{
e
.
preventDefault
()
var
url
=
parse
(
location
.
hash
.
replace
(
/^#/
,
''
))
// To handle empty inputs submission in form (delete keys from url)
if
(
$
(
e
.
currentTarget
).
serialize
()
===
''
)
{
url
.
update
(
url
.
searchList
,
currentKey
+
'
=del
'
)
}
var
filter
=
parse
(
'
?
'
+
$
(
e
.
currentTarget
).
serialize
()).
searchList
$
(
this
).
closest
(
'
.modal
'
).
modal
(
'
hide
'
)
window
.
location
.
hash
=
'
#
'
+
parse
(
location
.
hash
.
replace
(
/^#/
,
''
))
.
update
(
filter
)
window
.
location
.
hash
=
'
#
'
+
url
.
update
(
filter
)
})
}
...
...
test/formhandler.csv
View file @
dcc61ac6
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
Edited,,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 @
dcc61ac6
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