AnsweredAssumed Answered

Having difficulties overriding the enum template and handlers

Question asked by Steven Cox on Oct 20, 2018
Latest reply on Oct 22, 2018 by Eugene Bychkov



I'm trying to modify the enum listview template so that the status field of meetings is styled like the browser view (not held is red, held is green and planned is white with black border).


As this is going to need a conditional on the module, field type and name (to identify it's the status field in meetings) I was looking at overriding the stock app/js/fields/enum/enum.js handlers to inject the required classes/styles around the actual value.


I followed: 


And placed a copy of the enum.js in custom/fields/enum/enum.js together with a new list.hbs in the same directory. I stepped through the debug to find that the the new custom enum.js was ignored and the system went ahead and used the original app/js/fields/enum/enum.js file. It did try to use the new list.hbs file though.



Any suggestions on what I could do? I may be barking up the wrong tree and these handlers aren't overridable as such. Is there a better way to add the handler to the system to style a particular field - or a better way to work with the handlebar templates to achieve this specific customization?