mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-08-08 01:30:31 +00:00
add grid/SelectFeature.js
This commit is contained in:
parent
a3489b1016
commit
e58445b3a4
1
Makefile
1
Makefile
@ -31,6 +31,7 @@ JSSRC= \
|
|||||||
form/RRDTypeSelector.js \
|
form/RRDTypeSelector.js \
|
||||||
button/Button.js \
|
button/Button.js \
|
||||||
button/HelpButton.js \
|
button/HelpButton.js \
|
||||||
|
grid/SelectFeature.js \
|
||||||
grid/ObjectGrid.js \
|
grid/ObjectGrid.js \
|
||||||
grid/PendingObjectGrid.js \
|
grid/PendingObjectGrid.js \
|
||||||
panel/InputPanel.js \
|
panel/InputPanel.js \
|
||||||
|
36
grid/SelectFeature.js
Normal file
36
grid/SelectFeature.js
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
Ext.override(Ext.view.Table, {
|
||||||
|
afterRender: function() {
|
||||||
|
var me = this;
|
||||||
|
|
||||||
|
me.callParent();
|
||||||
|
// EXT5DEBUG
|
||||||
|
// me.mon(me.el, {
|
||||||
|
// scroll: me.fireBodyScroll,
|
||||||
|
// scope: me
|
||||||
|
// });
|
||||||
|
// if (!me.featuresMC ||
|
||||||
|
// (me.featuresMC.findIndex('ftype', 'selectable') < 0)) {
|
||||||
|
// me.el.unselectable();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// me.attachEventsForFeatures();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
Ext.define('Proxmox.grid.SelectFeature', {
|
||||||
|
extend: 'Ext.grid.feature.Feature',
|
||||||
|
alias: 'feature.selectable',
|
||||||
|
|
||||||
|
mutateMetaRowTpl: function(metaRowTpl) {
|
||||||
|
var tpl, i,
|
||||||
|
ln = metaRowTpl.length;
|
||||||
|
|
||||||
|
for (i = 0; i < ln; i++) {
|
||||||
|
tpl = metaRowTpl[i];
|
||||||
|
tpl = tpl.replace(/x-grid-row/, 'x-grid-row x-selectable');
|
||||||
|
tpl = tpl.replace(/x-grid-cell-inner x-unselectable/g, 'x-grid-cell-inner');
|
||||||
|
tpl = tpl.replace(/unselectable="on"/g, '');
|
||||||
|
metaRowTpl[i] = tpl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user