From 32d64915a154dc84a6c1d10e1bc7a4a25982da04 Mon Sep 17 00:00:00 2001
From: Renaud Le Gac <renaud.legac@free.fr>
Date: Sun, 28 Nov 2010 17:27:19 +0000
Subject: [PATCH] Add a private parameter ptype. It simplified the life when
 looking for installed plugins in the grid.

---
 static/plugin_dbui/lib/appgridroweditor.js            |  7 ++++++-
 static/plugin_dbui/lib/appgridroweditorcontextmenu.js | 11 ++++++++++-
 static/plugin_dbui/lib/appgridroweditortoolbar.js     |  9 +++++++++
 3 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/static/plugin_dbui/lib/appgridroweditor.js b/static/plugin_dbui/lib/appgridroweditor.js
index 746bb4ce..3f0827a0 100644
--- a/static/plugin_dbui/lib/appgridroweditor.js
+++ b/static/plugin_dbui/lib/appgridroweditor.js
@@ -29,6 +29,11 @@ App.grid.RowEditor = Ext.extend(Ext.Window, {
 	 */
 	formModel: null,
 	
+	/**
+	 * Private parameter identifying the type of plugin
+	 */
+	ptype: 'pgridroweditor',
+	
 	/**
 	 * pre-defined properties for the window
 	 */
@@ -51,7 +56,7 @@ App.grid.RowEditor = Ext.extend(Ext.Window, {
 	},
 
 	/**
-	 * Plugin initialization function
+	 * Plugin initialization
 	 *
 	 * @param {Object} grid GridPanel   the grid instantiating the plugin
 	 */
diff --git a/static/plugin_dbui/lib/appgridroweditorcontextmenu.js b/static/plugin_dbui/lib/appgridroweditorcontextmenu.js
index 4de609c3..7a07ffb9 100644
--- a/static/plugin_dbui/lib/appgridroweditorcontextmenu.js
+++ b/static/plugin_dbui/lib/appgridroweditorcontextmenu.js
@@ -14,7 +14,16 @@
 Ext.namespace('App.grid');
 
 App.grid.RowEditorContextMenu = Ext.extend(Object, {
-		
+
+	/**
+	 * Private parameter identifying the type of plugin
+	 */
+	ptype: 'pGridRowEditorContextMenu',
+	
+	/**
+	 * Plugin intialisation
+	 * @param {Object} grid
+	 */
 	init: function(grid){
 				
 		var menu = new Ext.menu.Menu();
diff --git a/static/plugin_dbui/lib/appgridroweditortoolbar.js b/static/plugin_dbui/lib/appgridroweditortoolbar.js
index 7060fde1..5d964ebe 100644
--- a/static/plugin_dbui/lib/appgridroweditortoolbar.js
+++ b/static/plugin_dbui/lib/appgridroweditortoolbar.js
@@ -13,6 +13,15 @@ Ext.namespace('App.grid');
 
 App.grid.RowEditorToolbar = Ext.extend(Object, {
 
+	/**
+	 * Private parameter identifying the type of plugin
+	 */
+	ptype: 'pGridRowEditorToolbar',
+	
+	/**
+	 * Plugin intiaisation
+	 * @param {Object} grid
+	 */
 	init: function(grid){
 
 		// create and initialize the underlying RowEditor		
-- 
GitLab