Disabling Buttons in the Agent Desktop

Issue


Stop agents clicking buttons in the menu bar, to disable the icons below...



Solution

Version 4.5.29 of CallScripter and above

Use the control called Toolbar Buttons, this gives the option to disable all of the buttons on the Toolbar. Once a button is disabled using this control it will stay disabled until another Toolbar button control is added that has the button set to Enabled. This control has the following options

 

You can also use an API call (useful for disabling a button across all scripts in custom.js)

The commands for JS script usage are

.Show() = makes visible
.Hide() = removed from view
.Enable() = makes clicakble
.Disable = greys out and not clickable

The process to get the buttons is below. With the button name being the first word shown in the Toolbar Control text, ie: "End Call" buton is just called "End".

Script.NavigationButtons["BUTTON NAME HERE"]

ie: Script.NavigationButtons["Back"]
These can be combined to give the usage examples:
Shown but disabled: Script.NavigationButtons["Back"].Show().Disable();
Hidden from view: Script.NavigationButtons["Back"].Hide();
Shown but enabled: Script.NavigationButtons["Back"].Show().Enable();

 

Below version 4.5.29 of CallScripter

To disable any of the icons at the top of the Agent Desktop screen, just add a calculation to each page where the icon should be disabled:

var td = parent.back;
if (td) {
    if (td.src.search('back00.gif') == -1) {
        td.src = 'images/back00.gif';
    }
    td.onclick = null;
    td.onmouseover = null;
    td.onmouseout = null;
    td.onmousedown = null;
}

var td = parent.home;
if (td) {
    if (td.src.search('home00.gif') == -1) {
        td.src = 'images/home00.gif';
    }
    td.onclick = null;
    td.onmouseover = null;
    td.onmouseout = null;
    td.onmousedown = null;
}

var td = parent.endcall;
if (td) {
    if (td.src.search('endcall00.gif') == -1) {
        td.src = 'images/endcall00.gif';
    }
    td.onclick = null;
    td.onmouseover = null;
    td.onmouseout = null;
    td.onmousedown = null;
}

var td = parent.foward;
if (td) {
    if (td.src.search('forward00.gif') == -1) {
        td.src = 'images/forward00.gif';
    }
    td.onclick = null;
    td.onmouseover = null;
    td.onmouseout = null;
    td.onmousedown = null;
}

var td = parent.trans;
if (td) {
    if (td.src.search('trans00.gif') == -1) {
        td.src = 'images/trans00.gif';
    }
    td.onclick = null;
    td.onmouseover = null;
    td.onmouseout = null;
    td.onmousedown = null;
}

var td = parent.spellcheck;
if (td) {
    if (td.src.search('spellcheck00.gif') == -1) {
        td.src = 'images/spellcheck00.gif';
    }
    td.onclick = null;
    td.onmouseover = null;
    td.onmouseout = null;
    td.onmousedown = null;
}

The icons will be re-enabled when reaching a page where there is no calculation that disables it.