Forums de discussion

How to remove buttons (Add, Select) from Liferay.AssetTagsSelector

thumbnail
Andrej Litowka, modifié il y a 12 années.

How to remove buttons (Add, Select) from Liferay.AssetTagsSelector

Junior Member Publications: 79 Date d'inscription: 30/06/10 Publications récentes
Hi All! When I create an input element with Liferay.AssetTagsSelector two buttons "Add" and "Select" will be automatically added under the input field. Is there any way to remove this two buttons or substitute it with my own?

Thanks and regards,
Andrej
thumbnail
Nguyen Tue, modifié il y a 10 années.

RE: How to remove buttons (Add, Select) from Liferay.AssetTagsSelector

New Member Envoyer: 1 Date d'inscription: 01/07/13 Publications récentes
You can hook js file: html/js/liferay/asset_tags_selector.js.
Find the function "_renderIcons" and REM block code following:
-----------------------------------------------------------------------------------
/* if(instance.get('allowAddSelectBtn')){
     var toolbar = [
											{
												handler: {
													context: instance,
													fn: instance._onAddEntryClick
												},
												icon: 'plus',
												id: 'add',
												label: Liferay.Language.get('add'),
												title: Liferay.Language.get('add-tags')
											},
											{
												handler: {
													context: instance,
													fn: instance._showSelectPopup
												},
												icon: 'search',
												id: 'select',
												label: Liferay.Language.get('select-tags'),
												title: Liferay.Language.get('select-tags')
											}
										];
						} else if(instance.get('allowSelectBtn')) {
							var toolbar = [
											{
												handler: {
													context: instance,
													fn: instance._showSelectPopup
												},
												icon: 'search',
												id: 'select',
												label: Liferay.Language.get('select-tags'),
												title: Liferay.Language.get('select-tags')
											}
										];
						} */

Goodluck!!! emoticon