{
	xtype: 'menu',
	onInitialize: function(i_owner, o_config, s_type) {

		var a_items = [];
		var s_xtype = "themedbutton";

		if (s_type == "grid") {
			s_xtype = "themedmenuitem";
		}

		var i_self = this;
		var i_record = o_config.records[0];


		var i_button = Ext.widget(s_xtype, {
			itemId : "itm_sendorder",
			text: ip2.i18n({
				'da': 'Send ordrekvittering',
				'en': 'Send order receipt'
			}),
			iconCls : "icon-mail",
			disabled: false,
			handler: function(item) {

				Ext.Ajax.request({
					url: "/ip2-services/basket2order.aspx?",
					params: {
						action: "resend",
						basketToken: i_record.get(i_record.idProperty),
						noclient: true
					},
					success: function(o_response) {

						var o_result = Ext.JSON.decode(o_response.responseText, true) || {};

						if (o_result.success) {
							ip2.messageBox({
								icon: Ext.MessageBox.INFO,
								title: ip2.i18n({
									da: "Ordrekvittering",
									en: "Order receipt"
								}),
								closable: true,
								message: ip2.i18n({
									da: "Ordrekvittering er blevet gensendt",
									en: "Order receipt has been resend"
								}),
								yesText: ip2.i18n({
									'da': 'Ja',
									'en': 'Yes'
								}),
								noText: ip2.i18n({
									'da': 'Nej',
									'en': 'No'
								})
							});
						}
						else {
							Ext.Error.handle({
								restart: false,
								message: {
									message: o_result.message
								},
								debug: "error",
								description: ip2.i18n({
									da: "Ordrekvittering",
									en: "Order receipt"
								}) + ip2.i18n({
									da: " fejl",
									en: " errror"
								})
							});
						}
					}
				});
			}
		});

		a_items.push(i_button);

		return a_items;
	}
}
