hide play/pause button for time_worked field for Incident

Deepa Srivastav
Kilo Sage

I am trying to hide play/pause button for time_worked field for Incident.

I tried using below code in onload :

$('link.incident.time_worked').hide(); but its not working for me. I tried this in Fuji and Geneva.

Only the image gets hidden, but a square still appears and we can click that too which starts/pause the timer.

1 ACCEPTED SOLUTION

Works on Fuji



jQuery('#link\\.incident\\.time_worked').parent().hide();


View solution in original post

19 REPLIES 19

calendar is not getting read only/disabled if am making field read only.


When field is a formatter..


Its getting hide with below code but not readonly..



function onLoad() {
    //Type appropriate comment here, and begin script below
    var refs = document.getElementsByTagName("TD");
        if (refs) {
          for (var i=0; i < refs.length; i++) {
              var ref = refs[i];
              var inner = ref.innerHTML;


            if (inner.indexOf("formatter.schedule_date_range.xml") > 0)
      {
                ref.style.display = 'none';
    }
  }


}


Hi Kalaiarasan



I was hiding with client script the Icon image of the Timer successfully in Our Instance Fuji Version and since yesterday we upgraded to Helsinki and my code is not working anymore.,


I tried yours as well and it is the same. do you have any idea?



var btn_id = g_form.getControl('time_worked').getAttribute("data-uid");  


      gel('tmr_'+btn_id+'_img').style.display = 'none';



Thanks


Elias


This works fine on the Incident form on Helsinki instance



jQuery('#link\\.incident\\.time_worked').parent().hide();