Alien-Web-ExtJS-V3
view release on metacpan or search on metacpan
share/docs/source/GroupingView.html view on Meta::CPAN
this.applyEmptyText();
},
<span id='Ext-grid-GroupingView-method-refreshRow'> // private
</span> refreshRow : function(record){
if(this.ds.getCount()==1){
this.refresh();
}else{
this.isUpdating = true;
Ext.grid.GroupingView.superclass.refreshRow.apply(this, arguments);
this.isUpdating = false;
}
},
<span id='Ext-grid-GroupingView-method-beforeMenuShow'> // private
</span> beforeMenuShow : function(){
var item, items = this.hmenu.items, disabled = this.cm.config[this.hdCtxIndex].groupable === false;
if((item = items.get('groupBy'))){
item.setDisabled(disabled);
}
if((item = items.get('showGroups'))){
item.setDisabled(disabled);
item.setChecked(this.canGroup(), true);
}
},
<span id='Ext-grid-GroupingView-method-renderUI'> // private
</span> renderUI : function(){
var markup = Ext.grid.GroupingView.superclass.renderUI.call(this);
if(this.enableGroupingMenu && this.hmenu){
this.hmenu.add('-',{
itemId:'groupBy',
text: this.groupByText,
handler: this.onGroupByClick,
scope: this,
iconCls:'x-group-by-icon'
});
if(this.enableNoGroups){
this.hmenu.add({
itemId:'showGroups',
text: this.showGroupsText,
checked: true,
checkHandler: this.onShowGroupsClick,
scope: this
});
}
this.hmenu.on('beforeshow', this.beforeMenuShow, this);
}
return markup;
},
<span id='Ext-grid-GroupingView-method-processEvent'> processEvent: function(name, e){
</span> Ext.grid.GroupingView.superclass.processEvent.call(this, name, e);
var hd = e.getTarget('.x-grid-group-hd', this.mainBody);
if(hd){
// group value is at the end of the string
var field = this.getGroupField(),
prefix = this.getPrefix(field),
groupValue = hd.id.substring(prefix.length),
emptyRe = new RegExp('gp-' + Ext.escapeRe(field) + '--hd');
// remove trailing '-hd'
groupValue = groupValue.substr(0, groupValue.length - 3);
// also need to check for empty groups
if(groupValue || emptyRe.test(hd.id)){
this.grid.fireEvent('group' + name, this.grid, field, groupValue, e);
}
if(name == 'mousedown' && e.button == 0){
this.toggleGroup(hd.parentNode);
}
}
},
<span id='Ext-grid-GroupingView-method-onGroupByClick'> // private
</span> onGroupByClick : function(){
var grid = this.grid;
this.enableGrouping = true;
grid.store.groupBy(this.cm.getDataIndex(this.hdCtxIndex));
grid.fireEvent('groupchange', grid, grid.store.getGroupState());
this.beforeMenuShow(); // Make sure the checkboxes get properly set when changing groups
this.refresh();
},
<span id='Ext-grid-GroupingView-method-onShowGroupsClick'> // private
</span> onShowGroupsClick : function(mi, checked){
this.enableGrouping = checked;
if(checked){
this.onGroupByClick();
}else{
this.grid.store.clearGrouping();
this.grid.fireEvent('groupchange', this, null);
}
},
<span id='Ext-grid-GroupingView-method-toggleRowIndex'> /**
</span> * Toggle the group that contains the specific row.
* @param {Number} rowIndex The row inside the group
* @param {Boolean} expanded (optional)
*/
toggleRowIndex : function(rowIndex, expanded){
if(!this.canGroup()){
return;
}
var row = this.getRow(rowIndex);
if(row){
this.toggleGroup(this.findGroup(row), expanded);
}
},
<span id='Ext-grid-GroupingView-method-toggleGroup'> /**
</span> * Toggles the specified group if no value is passed, otherwise sets the expanded state of the group to the value passed.
* @param {String} groupId The groupId assigned to the group (see getGroupId)
* @param {Boolean} expanded (optional)
*/
toggleGroup : function(group, expanded){
var gel = Ext.get(group),
id = Ext.util.Format.htmlEncode(gel.id);
( run in 0.529 second using v1.01-cache-2.11-cpan-119454b85a5 )