Page 1 of 1

Click on the link in the column to not enter the edit form

Posted: Fri Apr 14, 2023 6:52 pm
by gerese
Hello, I have a form that in browsing has a column in which a download link of a previously uploaded pdf file is generated(javascript), when I clicked on the link, the file opened in a new window and the form does not enter in edit mode for that click . After the last major update, when I click on the link, the download starts and the form goes into edit mode.
How can I keep the previous behavior, when clicking on the link, it does not go into edit mode for this column?
Thank you

Re: Click on the link in the column to not enter the edit form

Posted: Sat Apr 15, 2023 7:18 am
by kev1n
Hi,

Does this work?

Code: Select all

$('[data-nu-column="1"]').each(function (index) {

	if ($(this).attr('data-nu-primary-key')) {
		const link = $('<a>')
			.attr('href', 'https://i.kym-cdn.com/entries/icons/facebook/000/013/564/doge.jpg')
			.attr('target', '_blank')
			.attr('onclick', 'event.stopPropagation()')
			.text('Open link');

		$(this).html(link);
	}

});

Re: Click on the link in the column to not enter the edit form

Posted: Sat Apr 15, 2023 12:30 pm
by gerese
:thumb: Thank you man !

Re: Click on the link in the column to not enter the edit form

Posted: Thu Apr 27, 2023 4:19 pm
by kev1n
That's great!