Instead of messing with builtin files which would cause issues when
upgrading, would it work for you to add your own JS file?
In our installation we have added some jquery via site.html that can
do various things such as in this example, making certain custom
fields read only when creating a new ticket.
site.html
<!--! Custom match templates go here -->
<head py:match="head" py:attrs="select('@*')">
${select('*')}
<script type="text/javascript" src="/mycustom.js"></script>
</head>
mycustom.js
$(document).ready(function()
{
lockHoursOnNew();
}
);
function lockHoursOnNew()
{
var u = $(location).attr('href');
var nStart = u.length - ("/newticket").length;
if (nStart > 0)
{
if (u.substr(nStart) == "/newticket")
{
$.each(["#field-totalhours", "#field-qe_hours"], function(index,
value)
{
var tf = $(value);
if (tf)
{
tf[0].disabled = true;
...
On Jan 3, 6:48 am, MaartenDD <[email protected]>
wrote:
>
> We've edited the Javascript file (ticket.js) and we're trying to patch it
> using diff and patch.
...
> But everytime the Javascript is overwritten by the default one...
--
You received this message because you are subscribed to the Google Groups "Trac
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/trac-users?hl=en.