{
	"pluginname":"Developer",
	"version":1.1,
	"systemplugin":true,
	"table_def":[
				{
					"name":"plugin",
					"fields":[		
						{"name":"pluginname","type":"varchar(25)","other":"NOT NULL"},
						{"name":"version","type":"float","other":"NOT NULL DEFAULT 1"},
						{"name":"status","type":"tinyint","other":"NOT NULL DEFAULT 1"},												
						{"name":"table_def","type":"varchar(3000)","other":"NOT NULL DEFAULT ''"},
						{"name":"form","type":"varchar(5000)","other":"NOT NULL DEFAULT ''"},
						{"name":"form_html","type":"varchar(3000)","other":"NOT NULL DEFAULT ''"},
						{"name":"navbutton","type":"varchar(1000)","other":"NOT NULL DEFAULT ''"},
						{"name":"script","type":"varchar(3000)","other":"NOT NULL DEFAULT ''"},						
						{"name":"formbuttons","type":"varchar(1000)","other":""},
						{"name":"tablecreatedonline","type":"tinyint","other":"NOT NULL DEFAULT 0"}
						
						
					]	
				},
				{
					"name":"sqlstatements",
					"fields":[
								{"name":"customid","type":"varchar(5)","other":"NOT NULL"},
								{"name":"pname","type":"varchar(30)","other":"NOT NULL"},
								{"name":"sql_statement","type":"varchar(1000)","other":"NOT NULL"},
								{"name":"status","type":"tinyint","other":"NOT NULL DEFAULT 1"},
								{"name":"pluginid","type":"uniqueidentifier","other":"NOT NULL"},
								{"name":"header","type":"varchar(500)","other":"NOT NULL"},
								{"name":"filter_exists","type":"tinyint","other":"NOT NULL"},
								{"name":"filter_fields","type":"varchar(200)","other":"NOT NULL"},
								{"name":"filter_fields_operator","type":"varchar(100)","other":"NOT NULL"},
								{"name":"filter_fields_caption","type":"varchar(300)","other":"NOT NULL"},
								{"name":"filter_fields_type","type":"varchar(50)","other":"NOT NULL"},
								{"name":"filter_fields_inputtype","type":"varchar(200)","other":"NOT NULL"},
								{"name":"filter_fields_options","type":"varchar(1000)","other":"NOT NULL"},
								{"name":"edit_record","type":"tinyint","other":"NOT NULL DEFAULT 0"},
								{"name":"delete_record","type":"tinyint","other":"NOT NULL DEFAULT 0"},
								{"name":"restore_record","type":"tinyint","other":"NOT NULL DEFAULT 0"},
								{"name":"change_status","type":"varchar(100)","other":"NOT NULL DEFAULT 101"},								
								{"name":"set_appendix","type":"varchar(20)","other":"NOT NULL DEFAULT ''"},								
								{"name":"function1","type":"varchar(200)","other":""},								
								{"name":"function2","type":"varchar(200)","other":""},								
								{"name":"function3","type":"varchar(200)","other":""},							
								{"name":"function4","type":"varchar(200)","other":""}							
							  ]
				},
				{
					"name":"nav_buttons",
					"fields":[		
						{"name":"customid","type":"varchar(5)","other":"NOT NULL"},
						{"name":"caption","type":"varchar(30)","other":"NOT NULL"},
						{"name":"icon","type":"varchar(50)","other":"NOT NULL"},
						{"name":"navbutton_type","type":"varchar(50)","other":"NOT NULL"},
						{"name":"navbutton_group","type":"varchar(50)","other":"NOT NULL"},
						{"name":"navbutton_tab","type":"varchar(50)","other":"NOT NULL"},
						{"name":"navbutton_order","type":"int","other":"NOT NULL DEFAULT 1"},
						{"name":"onclick","type":"varchar(1000)","other":"NOT NULL"},
						{"name":"status","type":"tinyint","other":"NOT NULL DEFAULT 1"},
						{"name":"pluginid","type":"uniqueidentifier","other":"NOT NULL"}
					]	
				}
			],
	"form":{							
			},
	"form_html":"",
	"navbutton":[
					{"customid":"1","caption":"Refresh","icon":"mif-refresh fg-pink","btntype":"ribbon-button","btngroup":"Refresh","btntab":"Developer","btnorder":"1","onclick":"refreshPage();"},
					{"customid":"2","caption":"Plugin","icon":"mif-power-cord fg-cobalt","btntype":"ribbon-button","btngroup":"Plugin","btntab":"Developer","btnorder":"2","onclick":"initializePlugin();"}
				],
	"formbuttons":[					
					{"name":"installPlugin","caption":"","icon":"mif-plus fg-red","onclick":"installPlugin()"},
					{"name":"activepluginList","caption":" Active Plugins","icon":"mif-list fg-cobalt","onclick":"getTableFromSqlStatement('1')"},
					{"name":"inactivepluginList","caption":" Inactive Plugins","icon":"mif-list fg-indigo","onclick":"getTableFromSqlStatement('2')"},
					{"name":"deletedpluginList","caption":" Deleted Plugins","icon":"mif-list fg-cyan","onclick":"getTableFromSqlStatement('3')"},
					{"name":"systempluginList","caption":" System Plugins","icon":"mif-list fg-orange","onclick":"getTableFromSqlStatement('4')"}
				  ],
	"script":"",
	"sqlstatement":[
						{"customid":"1","name":"Active Plugins","sql":"SELECT a.pluginname,a.version,a.createdon,b.fullname,a.modifiedon,c.fullname,a.status,CONCAT('<div onclick=''installPlugin(\\\"',a.id,'\\\")''>Update</div>'),CONCAT('<div onclick=''createTableOnline(\\\"',a.id,'\\\")''>Create Table Online</div>'),CONCAT('<div onclick=''insertIntoOnlineTable(\\\"',a.id,'\\\")''>Sync Table</div>') FROM plugin a INNER JOIN users b ON a.createdby=b.id LEFT JOIN users c ON a.modifiedby=c.id WHERE a.status=1 and a.recordstatus=1","header":"Plugin Name,Version,Created On,Created By,Last Modified On,Last Modified By,Status,,,","change_status":"0:Deactivate:Plugin Deactivated:Plugin Deactivation Failed","filter":true,"filter_fields":"pluginname","filter_fields_operator":"like","filter_fields_caption":"Plugin Name","filter_fields_type":"s","filter_fields_inputtype":"text","filter_fields_option":[{"fieldname":"","option":""}],"function1":"installPlugin:a.id:Update"},
						{"customid":"2","name":"Inactive Plugins","sql":"SELECT a.pluginname,a.version,a.createdon,b.fullname,a.modifiedon,c.fullname,a.status FROM plugin a INNER JOIN users b ON a.createdby=b.id LEFT JOIN users c ON a.modifiedby=c.id WHERE a.status=0 and a.recordstatus=1","header":"Plugin Name,Version,Created On,Created By,last Modified On,Last Modified By,Status","change_status":"1:Activate:Plugin Activated:Plugin Activation Failed","delete_record":"1","filter":true,"filter_fields":"pluginname","filter_fields_operator":"like","filter_fields_caption":"Plugin Name","filter_fields_type":"s","filter_fields_inputtype":"text","filter_fields_option":[{"fieldname":"","option":""}]},
						{"customid":"3","name":"Deleted Plugins","sql":"SELECT a.pluginname,a.version,a.createdon,b.fullname,a.modifiedon,c.fullname,a.status FROM plugin a INNER JOIN users b ON a.createdby=b.id LEFT JOIN users c ON a.modifiedby=c.id WHERE a.recordstatus=0","header":"Plugin Name,Version,Created On,Created By,Last Modified On,Last Modified By,Status","restore_record":"1"},
						{"customid":"4","name":"System Plugins","sql":"SELECT a.pluginname,a.version,a.createdon,b.fullname,a.modifiedon,c.fullname,a.status,CONCAT('<div onclick=''installPlugin(\\\"',a.id,'\\\")''>Update</div>'),CONCAT('<div onclick=''createTableOnline(\\\"',a.id,'\\\")''>Create Table Online</div>'),CONCAT('<div onclick=''insertIntoOnlineTable(\\\"',a.id,'\\\")''>Sync Table</div>') FROM plugin a INNER JOIN users b ON a.createdby=b.id LEFT JOIN users c ON a.modifiedby=c.id WHERE a.status=2","header":"Plugin Name,Version,Created On,Created By,Last Modified On,Last Modified By,Status,,,","filter":true,"filter_fields":"pluginname","filter_fields_operator":"like","filter_fields_caption":"Plugin Name","filter_fields_type":"s","filter_fields_inputtype":"text","filter_fields_option":[{"fieldname":"","option":""}]}
					]
}

