I'm having no trouble attaching an image to an IMCE CCK field, but how do I remove the image?

Seems I can only change the image, but not actually remove the image completely?

Comments

fgasking’s picture

Priority: Normal » Minor
Status: Active » Closed (fixed)

My apologies, once you have saved and come back to the editing options you can remove. If there is an award for stupidity, please give it to me :(

ssm2017 Binder’s picture

hello
i have modified the "imceimage.js" file to build a "remove" link when adding an image without saving the node.
this link dissapear when you press it to remove the image.

add this line after line 32 :

	if ( $('#imceimage-remove-'+ fld).length == 0 )
	{
		$('#imceimagearea-'+ fld).parent().before(
			'<div id="imceimage-remove-'+fld+'" class="form-item"><a id="imceimage-remove-link-'+fld+'" class="imceimage-remove" href="javascript:imceImage.remove(\''+fld+'\')">'+
			Drupal.t('Remove')+'</a></div>'
		);
	}

and this after line 40 :

        // removing the "remove" link
	$('#imceimage-remove-'+fld).remove();

if this can help... :)

fgasking’s picture

That is really cool, thanks for that! :)

yang_yi_cn’s picture

Status: Closed (fixed) » Patch (to be ported)