SAMPSendToClientButton.js 528 Bytes
Ext.define('treps.view.SAMP.SAMPSendToClientButton', {
	extend: 'Ext.Button',

	alias: 'widget.sampsend_button',

	onUpdateMenu : null,

	initComponent: function() {
		this.callParent(arguments);
	},

	scale: 'large',

	iconCls: 'icons-24x24-target',

	text: 'Send (via SAMP) to ...',

	menu: [],

	maybeShowMenu: function() //overrided function
	{
		var me = this;

		if (me.onUpdateMenu != null)
			if (!me.onUpdateMenu(me))
				return;

		if (me.menu && !me.hasVisibleMenu() && !me.ignoreNextClick) 
			me.showMenu();
	}
});