Skip to content
Snippets Groups Projects
Commit 856b7770 authored by Renaud Le Gac's avatar Renaud Le Gac
Browse files

don't instanciate the underlying plugin pGridEditor.

Raise an error is absent.
parent 33b69680
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,8 @@
* Display the context menu when the user right click on a row.
* The content of the menu allows to manipulate the App.grid.RowEditor
*
* Requires the App.grid.GridRowEditor plugin.
*
* The ptype of this component is pGridRowEditorContextMenu.
*
* @extends Object
......@@ -16,7 +18,7 @@ Ext.namespace('App.grid');
App.grid.RowEditorContextMenu = Ext.extend(Object, {
/**
* Private parameter identifying the type of plugin
* Private attribute identifying the type of plugin
*/
ptype: 'pGridRowEditorContextMenu',
......@@ -28,11 +30,9 @@ App.grid.RowEditorContextMenu = Ext.extend(Object, {
var menu = new Ext.menu.Menu();
// RowEditor can be shared between several plugin
// create and initialize the underlying RowEditor
// protection
if (!grid.rowEditor) {
grid.rowEditor = new App.grid.RowEditor();
grid.rowEditor.init(grid);
throw new Error('no grid row editor !!!');
}
grid.addListener('containercontextmenu', this.onContainerContextMenu, menu);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment