123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
"use strict";
modulum('RowBoundDecoratorWidget', ['WidgetBase', 'WidgetFactory'],
function(context, cls) {
cls.RowBoundDecoratorWidget = context.oo.Class(cls.WidgetBase, function($super) {
return {
__name: "RowBoundDecoratorWidget",
manageMouseClick: function(domEvent) {
var rowBoundIconElement = this._element.getElementsByTagName('i')[0];
var rowBoundContainerWidget = this.getTableWidgetBase();
if (!rowBoundContainerWidget && this.getParentWidget().isInstanceOf(cls.StretchableScrollGridLineWidget)) {
rowBoundContainerWidget = this.getParentWidget().getParentWidget();
}
if (rowBoundContainerWidget && domEvent.target.isElementOrChildOf(rowBoundIconElement)) {
if (this.getParentWidget().requestFocus) {
this.getParentWidget().requestFocus(domEvent);
}
var rowBoundWidget = rowBoundContainerWidget.getRowBoundWidget();
rowBoundWidget.parentElement = rowBoundIconElement;
rowBoundWidget.reverseX = true;
rowBoundWidget.emit(context.constants.widgetEvents.contextMenu);
return false;
}
return true;
},
};
});
cls.WidgetFactory.registerBuilder('RowBoundDecorator', cls.RowBoundDecoratorWidget);
});