From e50d389a389b05628eea195d44117035f08c64d6 Mon Sep 17 00:00:00 2001 From: mattf Date: Wed, 12 Jan 2011 18:08:22 +0000 Subject: [PATCH] added options.php setting to enable/disable focus/blur enter-key-press fix, some issues in IE when using API git-svn-id: svn://192.168.202.10@1589 3d104415-ff17-0410-8863-d5cf3c621b8a --- agc_2-X/trunk/www/agc/options-example.php | 1 + agc_2-X/trunk/www/agc/vicidial.php | 57 ++++++++++++++++------- 2 files changed, 41 insertions(+), 17 deletions(-) diff --git a/agc_2-X/trunk/www/agc/options-example.php b/agc_2-X/trunk/www/agc/options-example.php index dc12f18e..e12f8aee 100644 --- a/agc_2-X/trunk/www/agc/options-example.php +++ b/agc_2-X/trunk/www/agc/options-example.php @@ -38,6 +38,7 @@ $AgentAlert_allowed = '1'; # set to 1 to allow Agent alert option $disable_blended_checkbox='0'; # set to 1 to disable the BLENDED checkbox from the in-group chooser screen $hide_timeclock_link = '0'; # set to 1 to hide the timeclock link on the agent login screen $conf_check_attempts = '3'; # number of attempts to try before loosing webserver connection, for bad network setups +$focus_blur_enabled = '1'; # set to 1 to enable the focus/blur enter key blocking(some IE instances have issues) $TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen diff --git a/agc_2-X/trunk/www/agc/vicidial.php b/agc_2-X/trunk/www/agc/vicidial.php index 165b7723..a8550d65 100644 --- a/agc_2-X/trunk/www/agc/vicidial.php +++ b/agc_2-X/trunk/www/agc/vicidial.php @@ -329,10 +329,11 @@ # 101216-1758 - Added the ability to hide fields if the label is set to ---HIDE--- in System Settings # 101227-1645 - Added dialplan off toggle options, and settings and code changes for top bar webphone # 110109-1205 - Added queuemetrics_loginout NONE option +# 110112-1254 - Added options.php option for focus/blur/enter functions # -$version = '2.4-306'; -$build = '110109-1205'; +$version = '2.4-307'; +$build = '110112-1254'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=69; $one_mysql_log=0; @@ -476,7 +477,7 @@ $AgentAlert_allowed = '1'; # set to 1 to allow Agent alert option $disable_blended_checkbox='0'; # set to 1 to disable the BLENDED checkbox from the in-group chooser screen $hide_timeclock_link = '0'; # set to 1 to hide the timeclock link on the agent login screen $conf_check_attempts = '3'; # number of attempts to try before loosing webserver connection, for bad network setups - +$focus_blur_enabled = '1'; # set to 1 to enable the focus/blur enter key blocking(some IE instances have issues) $TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen $stretch_dimensions = '1'; # sets the vicidial screen to the size of the browser window @@ -3195,6 +3196,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var AllowManualQueueCalls=''; var AllowManualQueueCallsChoice=''; var call_variables=''; + var focus_blur_enabled=''; var DiaLControl_auto_HTML = "\"\"Resume\""; var DiaLControl_auto_HTML_ready = "\"\"Resume\""; var DiaLControl_auto_HTML_OFF = "\"\"Resume\""; @@ -7802,8 +7804,11 @@ function set_length(SLnumber,SLlength_goal,SLdirection) else {document.vicidial_form.DispoSelection.value = taskDSgrp;} document.getElementById("DispoSelectContent").innerHTML = dispo_HTML; - document.inert_form.inert_button.focus(); - document.inert_form.inert_button.blur(); + if (focus_blur_enabled==1) + { + document.inert_form.inert_button.focus(); + document.inert_form.inert_button.blur(); + } } // ################################################################################ @@ -7847,8 +7852,11 @@ function set_length(SLnumber,SLlength_goal,SLdirection) document.getElementById("PauseCodeSelectContent").innerHTML = PauseCode_HTML; } } - document.inert_form.inert_button.focus(); - document.inert_form.inert_button.blur(); + if (focus_blur_enabled==1) + { + document.inert_form.inert_button.focus(); + document.inert_form.inert_button.blur(); + } } @@ -7963,8 +7971,11 @@ function set_length(SLnumber,SLlength_goal,SLdirection) GroupAlias_HTML = GroupAlias_HTML + "

" + Go_BacK_LinK; document.getElementById("GroupAliasSelectContent").innerHTML = GroupAlias_HTML; - document.inert_form.inert_button.focus(); - document.inert_form.inert_button.blur(); + if (focus_blur_enabled==1) + { + document.inert_form.inert_button.focus(); + document.inert_form.inert_button.blur(); + } } // ################################################################################ @@ -8227,8 +8238,11 @@ function set_length(SLnumber,SLlength_goal,SLdirection) } } // scroll back to the top of the page - document.inert_form.inert_button.focus(); - document.inert_form.inert_button.blur(); + if (focus_blur_enabled==1) + { + document.inert_form.inert_button.focus(); + document.inert_form.inert_button.blur(); + } scroll(0,0); } } @@ -8517,8 +8531,11 @@ function set_length(SLnumber,SLlength_goal,SLdirection) document.vicidial_form.CloserSelectList.value = ''; document.getElementById("CloserSelectContent").innerHTML = live_CSC_HTML; } - document.inert_form.inert_button.focus(); - document.inert_form.inert_button.blur(); + if (focus_blur_enabled==1) + { + document.inert_form.inert_button.focus(); + document.inert_form.inert_button.blur(); + } } // ################################################################################ @@ -8674,8 +8691,11 @@ function set_length(SLnumber,SLlength_goal,SLdirection) document.getElementById("TerritorySelectContent").innerHTML = live_TERR_HTML; } } - document.inert_form.inert_button.focus(); - document.inert_form.inert_button.blur(); + if (focus_blur_enabled==1) + { + document.inert_form.inert_button.focus(); + document.inert_form.inert_button.blur(); + } } // ################################################################################ @@ -9011,8 +9031,11 @@ else var HKdispo = hotkeys[String.fromCharCode(key)]; if (HKdispo) { - document.inert_form.inert_button.focus(); - document.inert_form.inert_button.blur(); + if (focus_blur_enabled==1) + { + document.inert_form.inert_button.focus(); + document.inert_form.inert_button.blur(); + } CustomerData_update(); var HKdispo_ary = HKdispo.split(" ----- "); if ( (HKdispo_ary[0] == 'ALTPH2') || (HKdispo_ary[0] == 'ADDR3') )