mirror of
https://github.com/koalyptus/TableFilter.git
synced 2024-05-11 19:06:50 +02:00
Fix ezEditTable enter key hijaking
This commit is contained in:
parent
82132308ae
commit
73b8dbcdae
|
@ -32,7 +32,7 @@
|
|||
|
||||
<p>
|
||||
To make the grid rows selectable, you need to import the
|
||||
<a href="http://edittable.free.fr/zip.php?f=ezEditTable.zip&p=1"target="_blank" title="ezEditTable is a javascript code aimed at enhancing regular HTML tables by adding features such as inline editing components, advanced selection and keyboard navigation - Developed by Max Guglielmi">ezEditTable</a> plugin, enable the <code>selectable</code> property
|
||||
<a href="http://edittable.free.fr/zip.php?f=ezEditTable.zip&p=1"target="_blank" title="ezEditTable is a javascript code aimed at enhancing regular HTML tables by adding features such as inline editing components, advanced selection and keyboard navigation - Developed by Max Guglielmi">ezEditTable</a> plugin, enable the <code>selection</code> property
|
||||
and configure the <code>advancedGrid</code> with the <a href="http://edittable.free.fr/zip.php?f=ezEditTable.zip&p=1"target="_blank" title="ezEditTable is a javascript code aimed at enhancing regular HTML tables by adding features such as inline editing components, advanced selection and keyboard navigation - Developed by Max Guglielmi">ezEditTable</a>
|
||||
options.
|
||||
</p>
|
||||
|
@ -13045,7 +13045,7 @@
|
|||
// Once ezEditTable dependency is installed in your
|
||||
// project import it by pointing to a local path:
|
||||
// vendor_path: 'path/to/ezEditTable'
|
||||
selectable: true,
|
||||
selection: true,
|
||||
default_selection: 'both',
|
||||
on_validate_row: function(o, row){
|
||||
var country = o.Selection.GetActiveRowValues()[0];
|
||||
|
|
10
dist/tablefilter/tablefilter.js
vendored
10
dist/tablefilter/tablefilter.js
vendored
File diff suppressed because one or more lines are too long
4
dist/tablefilter/tf-1.js
vendored
4
dist/tablefilter/tf-1.js
vendored
File diff suppressed because one or more lines are too long
|
@ -66,8 +66,7 @@ export default class AdapterEzEditTable {
|
|||
|
||||
cfg.base_path = cfg.base_path || tf.basePath + 'ezEditTable/';
|
||||
var editable = cfg.editable;
|
||||
var selectable = cfg.selectable;
|
||||
cfg.selection = selectable;
|
||||
var selectable = cfg.selection;
|
||||
|
||||
if(selectable){
|
||||
cfg.default_selection = cfg.default_selection || 'row';
|
||||
|
@ -348,7 +347,7 @@ export default class AdapterEzEditTable {
|
|||
reset(){
|
||||
var ezEditTable = this._ezEditTable;
|
||||
if(ezEditTable){
|
||||
if(this.cfg.selectable){
|
||||
if(this.cfg.selection){
|
||||
ezEditTable.Selection.Set();
|
||||
}
|
||||
if(this.cfg.editable){
|
||||
|
@ -363,7 +362,7 @@ export default class AdapterEzEditTable {
|
|||
destroy(){
|
||||
var ezEditTable = this._ezEditTable;
|
||||
if(ezEditTable){
|
||||
if(this.cfg.selectable){
|
||||
if(this.cfg.selection){
|
||||
ezEditTable.Selection.ClearSelections();
|
||||
ezEditTable.Selection.Remove();
|
||||
}
|
||||
|
|
|
@ -523,14 +523,18 @@ export class TableFilter{
|
|||
this.isUserTyping = false;
|
||||
global.clearInterval(this.autoFilterTimer);
|
||||
}
|
||||
// if(o.ezEditTable){
|
||||
// if(o.editable){
|
||||
// o.ezEditTable.Editable.Set();
|
||||
// }
|
||||
// if(o.selectable){
|
||||
// o.ezEditTable.Selection.Set();
|
||||
// }
|
||||
// }
|
||||
// TODO: hack to prevent ezEditTable enter key event hijaking.
|
||||
// Needs to be fixed in the vendor's library
|
||||
if(this.hasExtension('advancedGrid')){
|
||||
var advGrid = this.extension('advancedGrid');
|
||||
var ezEditTable = advGrid._ezEditTable;
|
||||
if(advGrid.cfg.editable){
|
||||
ezEditTable.Editable.Set();
|
||||
}
|
||||
if(advGrid.cfg.selection){
|
||||
ezEditTable.Selection.Set();
|
||||
}
|
||||
}
|
||||
},
|
||||
// set focused text-box filter as active
|
||||
onInpFocus(e) {
|
||||
|
@ -542,14 +546,18 @@ export class TableFilter{
|
|||
Event.cancel(_ev);
|
||||
Event.stop(_ev);
|
||||
}
|
||||
// if(o.ezEditTable){
|
||||
// if(o.editable){
|
||||
// o.ezEditTable.Editable.Remove();
|
||||
// }
|
||||
// if(o.selectable){
|
||||
// o.ezEditTable.Selection.Remove();
|
||||
// }
|
||||
// }
|
||||
// TODO: hack to prevent ezEditTable enter key event hijaking.
|
||||
// Needs to be fixed in the vendor's library
|
||||
if(this.hasExtension('advancedGrid')){
|
||||
var advGrid = this.extension('advancedGrid');
|
||||
var ezEditTable = advGrid._ezEditTable;
|
||||
if(advGrid.cfg.editable){
|
||||
ezEditTable.Editable.Remove();
|
||||
}
|
||||
if(advGrid.cfg.selection){
|
||||
ezEditTable.Selection.Remove();
|
||||
}
|
||||
}
|
||||
},
|
||||
// set focused drop-down filter as active
|
||||
onSlcFocus(e) {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<p>
|
||||
To make the grid rows selectable, you need to import the
|
||||
{EZEDITTABLE_LINK} plugin, enable the <code>selectable</code> property
|
||||
{EZEDITTABLE_LINK} plugin, enable the <code>selection</code> property
|
||||
and configure the <code>advancedGrid</code> with the {EZEDITTABLE_LINK}
|
||||
options.
|
||||
</p>
|
||||
|
@ -68,7 +68,7 @@
|
|||
// Once ezEditTable dependency is installed in your
|
||||
// project import it by pointing to a local path:
|
||||
// vendor_path: 'path/to/ezEditTable'
|
||||
selectable: true,
|
||||
selection: true,
|
||||
default_selection: 'both',
|
||||
on_validate_row: function(o, row){
|
||||
var country = o.Selection.GetActiveRowValues()[0];
|
||||
|
|
Loading…
Reference in a new issue