Hey,
I am providing a customfield with custom velocity templates for view and edit.
On edit there is some javascript required, so imagine the customfield-edit.vm to look like this:
<div>
<input></input>
</div>
<script>
var data = ${dataFromVelocity};
AJS.toInit(function(){
alert('test');
});
</script>
Now if i open the create dialog, where another project, which does not contain my custom field, is selected and then switch to a project with my customfield, the js is not executed.
On the other hand if the create dialog opens with the correct project selected, the js will execute as intended.
is there any way to get this working from the velocity template rather than creating an additional javascript file, which will be loaded with the customfield?
Thanks
Robin
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.