Location: PHPKode > scripts > Avatar Tools > views/extensions_menus.php
<?php
/**
 * @version		$Id: coolfeed.php 100 2012-04-14 17:42:51Z hide@address.com $
 * @copyright	JoomAvatar.com
 * @author		Nguyen Quang Trung
 * @link		http://joomavatar.com
 * @license		License GNU General Public License version 2 or later http://www.gnu.org/licenses/gpl-2.0.html
 * @package		Avatar Dream Framework Template
 * @facebook 	http://www.facebook.com/pages/JoomAvatar/120705031368683
 * @twitter	    https://twitter.com/#!/JoomAvatar
 * @support 	http://joomavatar.com/forum/
 */

// no direct access
defined('_JEXEC') or die; 
?>
<script type="text/javascript">
	
	jQuery.noConflict();
	
	(function($) 
	{ 
		$(document).ready( function()
		{	
			var searchMenusRequest;
			
			$('#avatar-tool-menus-search').keyup(function()
			{
				if (searchMenusRequest !== undefined) {
					searchMenusRequest.abort();
				}
				
				searchMenusRequest = $.ajax({
				  	url: "index.php?option=avatar-tool&controller=ajax&task=menuSearch",
				  	type: "POST",
				  	data: $("#avatar-tool-form-menus").serialize(),
				  	dataType: "json",
				});	
				
				searchMenusRequest.done(function(data) 
				{
					var items = $('#avatar-tool-menus-search-results');
					var html = '';
					
				  	data.each(function (el, index)
				  	{
				  		index++;
				  		
				  		if (el.published == '1') {
				  			publish = 'menu-publish';
				  		} else {
				  			publish = 'menu-unpublish';
				  		}
				  		
				  		html += '<li class="item ' + publish + '">';
				  		html += '<form id="module-'+ el.id +'">';
				  		html += '<input type="hidden" name="id" value="'+ $.addslashes(el.id) +'">';
				  		html += '<input type="hidden" name="ordering" value="'+ $.addslashes(el.ordering) +'">';
				  		html += '<input type="hidden" name="menutype" value="'+ $.addslashes(el.menutype) +'">';
				  		html += '<input type="hidden" name="parent_id" value="'+ el.parent_id +'">';
				  		html += '<input type="hidden" name="update_parent_id" value="'+ el.parent_id +'">';
				  		html += '<h3 class="title avatar-tool-title">' + index + ' - <span>' + el.title + '</span></h3>';
				  		html += '<input class="avatar-tool-input-title" type="text" name="title" value="'+ $.addslashes(el.title)  +'">';
				  		html += '<strong><?php echo JText::_('AVATAR_TOOL_ALIAS', true); ?></strong> <span class="title avatar-tool-alias">' + el.alias + '</span>';
				  		html += '<input class="avatar-tool-input-alias" type="text" name="alias" value="'+ $.addslashes(el.alias)  +'">';
				  		html += '<div class="details">';
				  		html += '<span class="action click"><strong><?php echo JText::_('AVATAR_TOOL_PUBLISH', true); ?></strong> <span class="publish state'+ el.published +'"></span></span>';
				  		html += '<span class="action click"><strong><?php echo JText::_('AVATAR_TOOL_ACCESS', true); ?></strong> <span class="text access">'+ el.access_level +'</span></span>';
				  		html += '<span class="action click"><strong><?php echo JText::_('AVATAR_TOOL_MENU_LOCATION', true); ?></strong> <span class="text menu-location">'+ el.menutype +'</span></span>';
				  		html += '<span class="action click"><strong><?php echo JText::_('AVATAR_TOOL_PARENT', true); ?></strong> <span class="text menu-parent">'+ el.parent_id +'</span></span>';
				  		html += '<span class="action click"><strong><?php echo JText::_('AVATAR_TOOL_ORDERING', true); ?></strong> <span class="text ordering">'+ el.ordering +'</span></span>';
				  		
				  		var textBrowserNav = {
								parent : '<?php echo JText::_('AVATAR_TOOL_MENU_BROWSER_PARENT', true); ?>',
								newWithNav : '<?php echo JText::_('AVATAR_TOOL_MENU_BROWSER_NEW_WITH_NAV', true); ?>',
								newWithoutNav : '<?php echo JText::_('AVATAR_TOOL_MENU_BROWSER_NEW_WITHOUT_NAV', true); ?>'
							}
							
						var languageOpts = $.parseJSON('<?php echo json_encode(JHtml::_('contentlanguage.existing')); ?>');
						
					  	html += '<span class="action target"><strong><?php echo JText::_('AVATAR_TOOL_BROWSERNAV', true); ?></strong> '+ AvatarTools.HTML.menus.selectboxMenuOpenWindow(el.browserNav, textBrowserNav) +'</span>';
				  		html += '<span class="action language"><strong><?php echo JText::_('AVATAR_TOOL_LANGUAGE', true); ?></strong> '+ AvatarTools.HTML.menus.selectboxLanguage(el.language, languageOpts) +'</span>';
				  		html += '<span class="action click home"><strong><?php echo JText::_('AVATAR_TOOL_DEFAULT_PAGE', true); ?></strong> <span class="text state'+ el.home +'"></span></span>';
				  		html += '<span style="clear:both;"></span>';
				  		html += '</div>';
				  		html += '<div>';
				  		
				  		if (el.params) {
				  			try {
				  				el.params = $.parseJSON(el.params);	
				  			} catch (er) {}
				  		}
				  		
				  		if (el.params.page_title != undefined) 
				  		{
				  			html += '<span class="avatar-tool-button button-edit">';
					  		html += '<?php echo JText::_('AVATAR_TOOL_ARTICLES_QUICK_EDIT', true); ?>';
					  		html += '</span>';	
				  		}
				  		
				  		html += '<span class="avatar-tool-button button-full-edit">';
				  		html += '<a href="index.php?option=com_menus&task=item.edit&id='+ el.id +'">';
				  		html += '<?php echo JText::_('AVATAR_TOOL_ARTICLES_FULL_EDIT', true); ?>';
				  		html += '</a>';
	  				 	html += '</span>';
				  		html += '</div>';
				  		
				  		if (el.params.page_title != undefined) 
				  		{
					  		html += '<div class="info-edit">';
						  	
						  	html += '<p class="label"><?php echo JText::_('AVATAR_TOOL_MENU_BROWSER_PAGE_TITLE', true); ?></p>';
							html += '<input name="params[page_title]" value="' + $.addslashes(el.params.page_title) + '">';
							
							html += '<p class="label"><?php echo JText::_('AVATAR_TOOL_MENU_SHOW_PAGE_HEADING', true); ?></p>';
							html += AvatarTools.HTML.menus.selectboxPageHeading(el.params.show_page_heading, '<?php echo JText::_('AVATAR_TOOL_MENU_YES', true); ?>', '<?php echo JText::_('AVATAR_TOOL_MENU_NO', true); ?>');
					  		
					  		html += '<p class="label"><?php echo JText::_('AVATAR_TOOL_MENU_PAGE_HEADING', true); ?></p>';
							html += '<input name="params[page_heading]" value="' + $.addslashes(el.params.page_heading) + '">';
							
							html += '<p class="label"><?php echo JText::_('AVATAR_TOOL_MENU_PAGE_CLASS', true); ?></p>';
							html += '<input name="params[pageclass_sfx]" value="' + $.addslashes(el.params.pageclass_sfx) + '">';
							
							html += '<p class="label"><?php echo JText::_('JFIELD_META_KEYWORDS_LABEL', true); ?></p>';
							html +=	'<p class="description"><?php echo JText::_('JFIELD_META_KEYWORDS_DESC', true) ?></p>';
							html += '<textarea name="params[menu-meta_keywords]" >'+ el.params['menu-meta_keywords'] +'</textarea>';
							
							html += '<p class="label"><?php echo JText::_('JFIELD_META_DESCRIPTION_LABEL', true); ?></p>';
							html +=	'<p class="description"><?php echo JText::_('JFIELD_META_DESCRIPTION_DESC', true) ?></p>';
					  		html += '<textarea name="params[menu-meta_description]" >'+ el.params['menu-meta_description'] +'</textarea>';
					  		
					  		html += '<p class="label"><?php echo JText::_('AVATAR_TOOL_MENU_ROBOTS', true); ?></p>';
							var textRobots = {
								userGlobal : '<?php echo JText::_('AVATAR_TOOL_MENU_ROBOTS_USER_GLOBAL', true); ?>',
								indexFollow : '<?php echo JText::_('AVATAR_TOOL_MENU_ROBOTS_INDEX_FOLLOW', true); ?>',
								noIndexFollow : '<?php echo JText::_('AVATAR_TOOL_MENU_ROBOTS_NOINDEX_FOLLOW', true); ?>',
								indexNoFollow : '<?php echo JText::_('AVATAR_TOOL_MENU_ROBOTS_INDEX_NOFOLLOW', true); ?>',
								noIndexNoFollow : '<?php echo JText::_('AVATAR_TOOL_MENU_ROBOTS_NOINDEX_NOFOLLOW', true); ?>',
							}
							
					  		html += AvatarTools.HTML.menus.selectboxRobots(el.params.robots, textRobots, {name: 'params[robots]'});
					  		html += '<div class="buttons">';
					  		html += '<span class="avatar-tool-button button-cancel">';
					  		html += '<?php echo JText::_('AVATAR_TOOL_BUTTON_CANCEL', true); ?>';
					  		html += '</span>';
					  		html += '<span rel="#module-'+ el.id +'" class="avatar-tool-button button-update">';
					  		html += '<?php echo JText::_('AVATAR_TOOL_BUTTON_UPDATE', true); ?>';
					  		html += '</span>';
					  		html += '</div>';
					  		html += '</div></div>';
					  	}
				  			
				  		html += '</form>';
				  		html += '</li>';
				  	})
				  	
				  	items.html(html);
				  	var menuForms = $('#avatar-tool-menus-search-results form');
				  	
				  	$('#avatar-tool-menus-search-results .button-edit').each(function(index){
					  		
				  		var infos = $('#avatar-tool-menus-search-results .info-edit');
				  		var buttonCancels 	= $('#avatar-tool-menus-search-results .button-cancel');
				  		var buttonUpdates 	= $('#avatar-tool-menus-search-results .button-update');
				  		
				  		$(this).click(function() 
				  		{
				  			var editButton = $(this);
				  			editButton.css('display', 'none');
				  			
				  			$(infos[index]).css('display', 'block');
				  			
				  			$(buttonCancels[index]).click(function(){
				  				editButton.css('display', 'inline-block');
				  				$(infos[index]).css('display', 'none');
				  			});	
				  			
				  			$(buttonUpdates[index]).click(function()
				  			{
				  				var formID = $(this).attr('rel');
				  				updatemenu = $.ajax({
								  	url: "index.php?option=avatar-tool&controller=ajax&task=menuUpdateParams",
								  	type: "POST",
								  	data: $(formID).serialize(),
								  	dataType: "json",
								});	
								editButton.css('display', 'inline-block');
								$(infos[index]).css('display', 'none');
				  			});
				  		});
				  	});
				  	
				  	var titles 	= $('#avatar-tool-menus-search-results .avatar-tool-title');
				  	var inputTitles = $('#avatar-tool-menus-search-results .avatar-tool-input-title');
				  	var alias 	= $('#avatar-tool-menus-search-results .avatar-tool-alias');
				  	var inputAlias = $('#avatar-tool-menus-search-results .avatar-tool-input-alias');
				  	
				  	
				  	titles.each(function(index)
				  	{
				  		var el = $(this);
				  		el.click(function(){
				  			el.css('display', 'none');
				  			$(inputTitles[index]).css('display', 'block');
				  		});
				  	});
				  	
				  	inputTitles.each(function(index)
				  	{
				  		var el = $(this);
				  		el.change(function()
				  		{
				  			if (el.val() != '') 
				  			{
				  				$('span', $(titles[index])).html(el.val());
					  			el.css('display', 'none');
					  			$(titles[index]).css('display', 'block');
					  			
					  			request = $.ajax({
								  	url: "index.php?option=avatar-tool&controller=ajax&task=menuUpdateTitle",
								  	type: "POST",
								  	data: $('#' + menuForms[index].get('id')).serialize(),
								  	dataType: "json",
								});	
				  			}
				  		});
				  	});
				  	
				  	alias.each(function(index)
				  	{
				  		var el = $(this);
				  		el.click(function(){
				  			el.css('display', 'none');
				  			$(inputAlias[index]).css('display', 'inline-block');
				  		});
				  	});
				  	
				  	inputAlias.each(function(index)
				  	{
				  		var el = $(this);
				  		el.change(function()
				  		{
				  			if (el.val() != '') 
				  			{
				  				$(alias[index]).html(el.val());
					  			el.css('display', 'none');
					  			$(alias[index]).css('display', 'inline-block');
					  			
					  			request = $.ajax({
								  	url: "index.php?option=avatar-tool&controller=ajax&task=menuUpdateTitle",
								  	type: "POST",
								  	data: $('#' + menuForms[index].get('id')).serialize(),
								  	dataType: "json",
								});	
				  			}
				  		});
				  	});
				  	
				  	var buttonPublishs 	= $('#avatar-tool-menus-search-results .details .publish');
			  		
			  		buttonPublishs.each(function(index)
				  	{
				  		$(this).click(function()
			  			{
			  				var el = $(this);
			  				var state = 0;
			  				
			  				if (el.hasClass('state1')) {
			  					el.removeClass('state1').addClass('state0');
			  					state = 0;
			  				} else if (el.hasClass('state0')) {
			  					el.removeClass('state0').addClass('state1');
			  					state = 1;
			  				};
			  			
			  				searchRequest = $.ajax({
							  	url: "index.php?option=avatar-tool&controller=ajax&task=menuPublish",
							  	type: "POST",
							  	data: $('#' + menuForms[index].get('id')).serialize() + '&published=' + state,
							  	dataType: "json",
							});	
			  			});
				  	})
				  	
				  	var buttonAccess = $('#avatar-tool-menus-search-results .details .access');
						
				  	buttonAccess.each(function(index)
				  	{
				  		var access = $(this);
				  		access.click(function()
				  		{
				  			$('#avatar-tool-subview-access').dialog({
				  				zIndex: 900,
				  				open: function(event, ui)
				  				{
				  					request = $.ajax({
									  	url: "index.php?option=avatar-tool&controller=ajax&task=accessGet",
									  	type: "GET",
									  	dataType: "json",
									});	
									
									request.done(function(data)
									{
										if ($.isArray(data)) 
										{
											var html = '';
											data.each(function(index)
											{
												html += '<p class="avatar-tool-button button-tag">' + $(index)[0].title;
												html += '<input type="hidden" name="access" value="'+ $.addslashes($(index)[0].id) +'"></p>';
											});
											
											html += '<p style="clear: both;"></p>'
											
											$('#avatar-tool-subview-access').html(html);
											
											$('#avatar-tool-subview-access .button-tag').each(function(el){
												$(this).draggable({
													revert: true,
													stack: "#avatar-tool-subview-access .button-tag",
													helper:'clone',
													appendTo: 'body',
													zIndex: 910,
													start: function(){
														$('#avatar-tool-menus-search-results .details .access').each(function(index){
															$(this).css('background','#137BAF');
														});
													},
													stop: function(){
														$('#avatar-tool-menus-search-results .details .access').each(function(index){
															$(this).css('background','');
														});
													}
											    });
												
											});
										}
									})
				  				}
				  			});
				  		});
				  		
				  		access.droppable(
				  		{
				  			accept: "#avatar-tool-subview-access .button-tag",
							drop: function(event, ui) 
							{ 
						   		$(this).html(ui.draggable.html());
						   		 
						   		request = $.ajax({
								  	url: "index.php?option=avatar-tool&controller=ajax&task=menuAccessUpdate",
								  	type: "POST",
								  	data: $('#' + menuForms[index].get('id')).serialize(),
								  	dataType: "json",
								});	
							}
						});
				  	});
				  	
				  	var buttonLocations = $('#avatar-tool-menus-search-results .details .menu-location');
						
				  	buttonLocations.each(function(index)
				  	{
				  		var location = $(this);
				  		location.click(function()
				  		{
				  			$('#avatar-tool-subview-menutype').dialog({
				  				title: "<?php echo Jtext::_('AVATAR_TOOL_VIEW_LOCATION_TITLE', true); ?>",
				  				zIndex: 900,
				  				open: function(event, ui)
				  				{
				  					request = $.ajax({
									  	url: "index.php?option=avatar-tool&controller=ajax&task=menuGetMenutype",
									  	type: "GET",
									  	dataType: "json",
									});	
									
									request.done(function(data)
									{
										if ($.isArray(data)) 
										{
											var html = '';
											data.each(function(index)
											{
												html += '<p class="avatar-tool-button button-tag">' + $(index)[0].title;
												html += '<input type="hidden" name="menutype" value="'+ $.addslashes($(index)[0].menutype) +'"></p>';
											});
											
											html += '<p style="clear: both;"></p>'
											
											$('#avatar-tool-subview-menutype').html(html);
											
											$('#avatar-tool-subview-menutype .button-tag').each(function(el){
												$(this).draggable({
													revert: true,
													stack: "#avatar-tool-subview-menutype .button-tag",
													helper:'clone',
													appendTo: 'body',
													zIndex: 910,
													start: function(){
														$('#avatar-tool-menus-search-results .details .menu-location').each(function(index){
															$(this).css('background','#137BAF');
														});
													},
													stop: function(){
														$('#avatar-tool-menus-search-results .details .menu-location').each(function(index){
															$(this).css('background','');
														});
													}
											    });
											});
										}
									})
				  				}
				  			});
				  		});
				  		
				  		location.droppable(
				  		{
				  			accept: "#avatar-tool-subview-menutype .button-tag",
							drop: function(event, ui) 
							{ 
						   		$(this).html(ui.draggable.html());
						   		 
						   		request = $.ajax({
								  	url: "index.php?option=avatar-tool&controller=ajax&task=menuUpdateMenutype",
								  	type: "POST",
								  	data: $('#' + menuForms[index].get('id')).serialize(),
								  	dataType: "json",
								});	
							}
						});
				  	});
				  	
				  	var buttonParents = $('#avatar-tool-menus-search-results .details .menu-parent');
						
				  	buttonParents.each(function(index)
				  	{
				  		var parent = $(this);
				  		
				  		parent.click(function()
				  		{
				  			$('#avatar-tool-subview-menu-parent').dialog({
				  				modal: true,
				  				buttons: { 
				  					"<?php echo JText::_('AVATAR_TOOL_UPDATE', true); ?>": function() { 
				  						$(this).dialog("close"); 
				  						
				  						request = $.ajax({
										  	url: "index.php?option=avatar-tool&controller=ajax&task=menuUpdateParent",
										  	type: "POST",
										  	data: $('#' + menuForms[index].get('id')).serialize(),
										  	dataType: "json",
										});	
										
										request.done(function(){
											var value = $('input[name="update_parent_id"]', menuForms[index]).val();
											$('span', parent).html(value);	
											$('input[name="parent_id"]', menuForms[index]).val(value);
										});
									} 
				  				},
				  				title: "<?php echo Jtext::_('AVATAR_TOOL_VIEW_MENU_PARENT_TITLE', true); ?>",
				  				zIndex: 900,
				  				open: function(event, ui)
				  				{
				  					var dialog = $(this);
				  					
				  					request = $.ajax({
									  	url: "index.php?option=avatar-tool&controller=ajax&task=menuGetParent",
									  	type: "POST",
										data: $('#' + menuForms[index].get('id')).serialize(),
									  	dataType: "json",
									});	
									
									request.done(function(data)
									{
										if ($.isArray(data)) 
										{
											var html = '';
											var parentValue = $('#' + menuForms[index].get('id') + ' input[name="parent_id"]').val();
											
											html += '<div><input id="item-root" class="menu-item-input" type="radio" '+ ((parentValue == 1) ? 'checked="checked"' : '') +' name="update_parent_id" value="1">';
											html += '<label for="item-root" class="menu-item '+ ((parentValue == 1) ? 'selected' : '') +'">Root</label></div>';
											
											data.each(function(index)
											{
												html += '<div><input class="menu-item-input" id="item-'+ $(index)[0].value +'" type="radio" '+ ((parentValue == $(index)[0].value) ? 'checked="checked"' : '') +' name="update_parent_id" value="'+ $(index)[0].value +'">';
												html += '<label for="item-'+ $(index)[0].value +'" class="menu-item '+ ((parentValue == $(index)[0].value) ? 'selected' : '') +'">'+ $(index)[0].text +'</label></div>';
											});
											
											html += '<p style="clear: both;"></p>'
											
											$('#avatar-tool-subview-menu-parent').html(html);
											
											var labels = $('#avatar-tool-subview-menu-parent .menu-item');
											
											$('#avatar-tool-subview-menu-parent .menu-item-input').each(function(elIndex)
											{
												var value = $(this).val();
												
												$(this).focus(function()
												{
													labels.each(function(el){
														$(this).removeClass('selected');
													})
													
													$('input[name="update_parent_id"]', menuForms[index]).val(value);
													labels[elIndex].addClass('selected');
												});
											});
										}
									})
				  				}
				  			});
				  		});
				  	});
				  	
				  	var buttonOrders = $('#avatar-tool-menus-search-results .details .ordering');
					
				  	buttonOrders.each(function(index)
				  	{
				  		var order = $(this);
				  		
				  		order.click(function()
				  		{
				  			$('#avatar-tool-subview-ordering').dialog(
				  			{
				  				title: "<?php echo JText::_('AVATAR_TOOL_VIEW_MENU_ORDERING_TITLE', true); ?>",
				  				modal: true, 
				  				
				  				buttons: { 
				  					"<?php echo JText::_('AVATAR_TOOL_UPDATE', true); ?>": function() { 
				  						$(this).dialog("close"); 
				  						request = $.ajax({
									  	url: "index.php?option=avatar-tool&controller=ajax&task=menuUpdateOrder",
									  	type: "POST",
									  	data: $('#avatar-tool-form-ordering').serialize(),
									  	dataType: "json",
									});	
				  					} 
				  				},
				  				
				  				zIndex: 900,
				  				
				  				open: function(event, ui)
				  				{
				  					request = $.ajax({
									  	url: "index.php?option=avatar-tool&controller=ajax&task=menuGetOrder",
									  	type: "GET",
									  	data: $('#' + menuForms[index].get('id')).serialize(),
									  	dataType: "json",
									});	
									
									request.done(function(data)
									{
										if ($.isArray(data)) 
										{
											var html = '<form id="avatar-tool-form-ordering"><ul class="list-items">';
											
											data.each(function(index)
											{
												html += '<li><p class="avatar-tool-button button-tag">' + $(index)[0].text;
												html += '<input type="hidden" name="ordering[]" value="'+ $.addslashes($(index)[0].value) +'"></p></li>';
											});
											
											html += '</ul></form><p style="clear: both;"></p>'
											
											$('#avatar-tool-subview-ordering').html(html);
											
											$('#avatar-tool-subview-ordering .list-items').sortable();
										}
									});
				  				}
				  			});
				  		});
				  	});
				  	
				  	var buttonHomes = $('#avatar-tool-menus-search-results .details .home .text');
				  	
				  	buttonHomes.each(function(index)
				  	{
				  		$(this).click(function()
			  			{
			  				var el = $(this);
			  				var state = 0;
			  				
			  				if (el.hasClass('state0')) 
			  				{
			  					$('#avatar-tool-menus-search-results .details .home .state1').each(function(){
									$(this).removeClass('state1').addClass('state0');
								});
								
			  					el.removeClass('state0').addClass('state1');
			  					var request = $.ajax({
								  	url: "index.php?option=avatar-tool&controller=ajax&task=menuUpdateHome",
								  	type: "POST",
								  	data: $('#' + menuForms[index].get('id')).serialize() + '&home=' + 1,
								  	dataType: "json",
								});
							};
			  			});
				  	});
				  	
				  	var buttonBrwoserNavs = $('#avatar-tool-menus-search-results .details .target select');
			  		
			  		buttonBrwoserNavs.each(function(index)
				  	{
				  		$(this).change(function()
			  			{
			  				request = $.ajax({
							  	url: "index.php?option=avatar-tool&controller=ajax&task=menuUpdateBrowserNav",
							  	type: "POST",
							  	data: $('#' + menuForms[index].get('id')).serialize(),
							  	dataType: "json",
							});	
			  			});
				  	})
				  	
				  	var buttonLanguages = $('#avatar-tool-menus-search-results .details .language select');
			  		
			  		buttonLanguages.each(function(index)
				  	{
				  		$(this).change(function()
			  			{
			  				request = $.ajax({
							  	url: "index.php?option=avatar-tool&controller=ajax&task=menuUpdateLanguage",
							  	type: "POST",
							  	data: $('#' + menuForms[index].get('id')).serialize(),
							  	dataType: "json",
							});	
			  			});
				  	})
				  });
			});
		});
	})(jQuery);
</script>	

<div class="avatar-view" id="avatar-view-menus">
	<form id="avatar-tool-form-menus" name="avatar-tool-form-menus">
		<ul class="list-item">
			<li class="item">
				<p class="label"><?php echo JText::_('AVATAR_TOOL_MENUS_SEARCH'); ?></p>
				<p class="description"><?php echo JText::_('AVATAR_TOOL_MENUS_SEARCH_DESC') ?></p>
				<input id="avatar-tool-menus-search" size="50" name="search"/>	
				<p class="description"><?php echo JText::_('AVATAR_TOOL_MENUS_OPTIONS_DESC') ?></p>
				<?php echo JText::_('AVATAR_TOOL_LIMIT'); ?> <input type="text" name="search-options[limit]" value="100" size="5"/> &nbsp;&nbsp;
				<br/><br/>
			</li>
		</ul>	
	</form>
	
	<ul id="avatar-tool-menus-search-results" class="list-item">
		
	</ul>	
</div>
Return current item: Avatar Tools