Bug 23354: (follow-up) Input type on jEditable

Update the jEditable plugin to a maintained version and use the new
'number' type to enable increment arrows on click and remap onblur event
to submit.

Sponsored-by: PTFS Europe
Sponsored-by: Cheshire Libraries Shared Services
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Martin Renvoize 2019-09-23 13:51:11 +01:00
parent cf27a62f70
commit 49e5debfc2
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F
2 changed files with 18 additions and 39 deletions

File diff suppressed because one or more lines are too long

View file

@ -273,8 +273,11 @@
return '£'+price;
}
}, {
"aTargets": [-3, -4],
"aTargets": [-4],
"sClass" : "editable",
}, {
"aTargets": [-3],
"sClass" : "editable_int",
}],
"aaSorting": [
[1, "asc"]
@ -286,7 +289,18 @@
local.fnUpdate( value, aPos[0], aPos[1], true, false );
return value;
},{
type : 'text'
type : 'number',
step : '0.01',
onblur : 'submit'
});
local.$('.editable_int').editable( function(value, settings) {
var aPos = local.fnGetPosition( this );
local.fnUpdate( value, aPos[0], aPos[1], true, false );
return value;
},{
type : 'number',
step : '1',
onblur : 'submit'
});
},
"fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {