Home Analyst Portal

Disable Edit and Tasks drawer buttons

Adrian_MataiszAdrian_Mataisz Customer Advanced IT Monkey ✭✭✭
How Can I disable Edit and Tasks buttons from the drawer?  Using these analysts can bypass some required field that we don't want them to do. Thank you

Best Answer

Answers

  • Adrian_MataiszAdrian_Mataisz Customer Advanced IT Monkey ✭✭✭

    Thank You Tom. I'll give it a try.

    I will probably not hide "Edit" from the grid view since it is used for KBAs edits.

    Same line I can use to hide "Favorites" button while in the RO, correct? 

  • Tom_HendricksTom_Hendricks Customer Super IT Monkey ✭✭✭✭✭
    Yes, the same idea can be used for any of those buttons in the task bar.  Just watch for them to have different CSS classes potentially, like the Tasks and Edit buttons, for example.

    A savvy user could still un-hide them or find a way to execute the underlying functions, but the probability is low and the impact of that happening is also not particularly significant, so this approach should work for most of us.
  • Jeff_LandersJeff_Landers Customer IT Monkey ✭
    @Tom_Hendricks
    I assume the two lines that apply to the drawer buttons (Edit and Tasks) need to be wrapped in a fucntion but I can't get those two lines to apply.  We want those buttons hidden on all of those screens like TeamWork, My Work, etc.   I have this

    app.custom.formTasks.add('My Requests', null, function (formObj, viewModel) {
     formObj.boundReady(function(){
     var vm = pageForm.viewModel;  
    $("button.btn-taskbar.btn-link.btn.btn-lg.dropdown-toggle:has('div'):contains('Tasks')").hide();
    $("button.btn-link.btn-lg:has('div'):contains('Edit')").hide();
    });
     return;
    });
  • Jeff_LandersJeff_Landers Customer IT Monkey ✭

    Has anyone tested this line.   I have modified it dozens of ways with no joy.

    $("button.btn-taskbar.btn-link.btn.btn-lg.dropdown-toggle:has('div'):contains('Tasks')").hide();

  • Jeff_LangJeff_Lang Customer Advanced IT Monkey ✭✭✭

    We actually hide the Edit and Task Drawer buttons via CSS, to hide these buttons (we also hide the new button with slightly different CSS), to do this we added the following to the custom.css file.
    #drawer-taskbar span.btn-group {<br>	display: none;<br>}<br>
  • Jeff_LandersJeff_Landers Customer IT Monkey ✭
    Thank you @Jeff_Lang
    With the assistance of @Patrick_Chambers we have the correct code for use from custom.js.   We did not want to hide it globallly so he helped us with that.
  • Christopher_MontgomeChristopher_Montgome Customer IT Monkey ✭

    @Jeff_Landers

    Hi Jeff, could you share the code you used to hide the buttons? I have not been able to get the examples above to work.

    Thanks, Chris

  • Jeff_LandersJeff_Landers Customer IT Monkey ✭

    @Christopher_Montgome   I have been on vacation.  Give me a bit to find it and I will post it.

    Jeff

  • Jeff_LandersJeff_Landers Customer IT Monkey ✭

    @Christopher_Montgome     I will take a crack at this.  It has been awhile so it will be good for me to go back and document this.    Unfortunately, you will have to bear with me as I find all of the pieces.  Hopefully, you have a test system to work with but it is easy enough to comment the lines out if you don't get the desired result.

    Try ADDING the code in the attached custom.js to your custom js  and see if it works.  If it doesn't let me know and I will figure out what I missed.  Restart the cachebuilder at a minimum but you may need to bounce IIS.    The Other file is some additional code you might be interested in

  • Jeff_LandersJeff_Landers Customer IT Monkey ✭

    @Christopher_Montgome  Here is some other code you may find helpful


  • Christopher_MontgomeChristopher_Montgome Customer IT Monkey ✭

    @Jeff_Landers


    Jeff, greatly appreciated. I will give this a try in my test environment.

Sign In or Register to comment.