Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt to new ZMI #13

Open
icemac opened this issue Feb 9, 2019 · 1 comment
Open

Adapt to new ZMI #13

icemac opened this issue Feb 9, 2019 · 1 comment

Comments

@icemac
Copy link
Member

icemac commented Feb 9, 2019

zopefoundation/Zope#471 requires changes in ExternalEditor as it overwrites the templates to add its link. Maybe it should be switched to do it using JavaScript as it would to drop the existing monkey patch mechanism. It could be included using the mechanism described in https://zope.readthedocs.io/en/latest/ZMI.html#use-custom-icons-and-resources.

Originally posted by @icemac in zopefoundation/Zope#471 (comment)

@icemac
Copy link
Member Author

icemac commented Feb 9, 2019

Example JS code written by @drfho in zopefoundation/Zope#471

 $('table.objectItems').find('tr').each(function(){
		$(this).find('th').eq(1).after('<th>&nbsp;</th>');
		var random_boolean = Math.random() >= 0.5;
		if (random_boolean) {
			$(this).find('td').eq(1).after('<td><i title="External Editor" class="far fa-edit"></i></td>');
		} else {
			$(this).find('td').eq(1).after('<td>&nbsp;</i></td>');
		}
        
   });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant