Commit dcc61ac6 authored by Tejesh's avatar Tejesh 🖖

remove all action

parent 44eea5d6
Pipeline #76436 failed with stage
in 3 minutes and 14 seconds
......@@ -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)
})
}
......
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
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment