From 988db1dbec0b08db4ea2cecd2720510e40ab817e Mon Sep 17 00:00:00 2001 From: mattf Date: Wed, 20 Jun 2018 01:45:07 +0000 Subject: [PATCH] Modified audio chooser window to appear at height where mouse was clicked in JS functions in admin web screens git-svn-id: svn://192.168.202.10@3002 3d104415-ff17-0410-8863-d5cf3c621b8a --- agc_2-X/trunk/www/vicidial/admin.php | 9 ++++ .../trunk/www/vicidial/admin_amm_multi.php | 2 +- agc_2-X/trunk/www/vicidial/admin_header.php | 46 +++++++++++++------ .../trunk/www/vicidial/admin_soundboard.php | 2 +- agc_2-X/trunk/www/vicidial/audio_store.php | 4 +- 5 files changed, 46 insertions(+), 17 deletions(-) diff --git a/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php index b738706b..971b204e 100644 --- a/agc_2-X/trunk/www/vicidial/admin.php +++ b/agc_2-X/trunk/www/vicidial/admin.php @@ -42218,6 +42218,15 @@ echo "\n"; > + 1) and ($modify_footer_refresh > 0) and (strlen($modify_url)>10) ) ) diff --git a/agc_2-X/trunk/www/vicidial/admin_amm_multi.php b/agc_2-X/trunk/www/vicidial/admin_amm_multi.php index 766ac067..3bf27dc6 100644 --- a/agc_2-X/trunk/www/vicidial/admin_amm_multi.php +++ b/agc_2-X/trunk/www/vicidial/admin_amm_multi.php @@ -458,7 +458,7 @@ if ($action == "BLANK") echo ""; echo ""; echo ""; - echo ""; + echo ""; echo "\n"; echo "\n"; echo "
"._QXZ("FIELD").": "._QXZ("AM MESSAGE").": "._QXZ("audio chooser").""._QXZ("AM MESSAGE").": "._QXZ("audio chooser")."

\n"; diff --git a/agc_2-X/trunk/www/vicidial/admin_header.php b/agc_2-X/trunk/www/vicidial/admin_header.php index f7f362ad..dd44932f 100644 --- a/agc_2-X/trunk/www/vicidial/admin_header.php +++ b/agc_2-X/trunk/www/vicidial/admin_header.php @@ -75,6 +75,7 @@ # 170821-2010 - Fix for issue #1036 # 180213-1657 - Added CID Groups # 180512-1105 - Changed to dynamic DB help +# 180614-2200 - Modified audio chooser window to appear at height where mouse was clicked in JS functions # $stmt="SELECT admin_home_url,enable_tts_integration,callcard_enabled,custom_fields_enabled,allow_emails,level_8_disable_add,allow_chats,enable_languages,admin_row_click,admin_screen_colors,user_new_lead_limit,user_territories_active,qc_features_active,agent_soundboards,enable_drop_lists,allow_ip_lists from system_settings;"; @@ -698,8 +699,19 @@ else { echo " var pass = '$PHP_AUTH_PW';\n"; ?> - function launch_chooser(fieldname,stage,vposition) + + mouseY=0; + function getMousePos(event) { + mouseY=event.pageY; + } + document.addEventListener("click", getMousePos); + + function launch_chooser(fieldname,stage) { + + var h = window.innerHeight; + var vposition=mouseY; + var audiolistURL = "./non_agent_api.php"; var audiolistQuery = "source=admin&function=sounds_list&user=" + user + "&pass=" + pass + "&format=selectframe&stage=" + stage + "&comments=" + fieldname; var Iframe_content = ''; @@ -711,8 +723,12 @@ else document.getElementById("audio_chooser_span").innerHTML = Iframe_content; } - function launch_moh_chooser(fieldname,stage,vposition) + function launch_moh_chooser(fieldname,stage) { + + var h = window.innerHeight; + var vposition=mouseY; + var audiolistURL = "./non_agent_api.php"; var audiolistQuery = "source=admin&function=moh_list&user=" + user + "&pass=" + pass + "&format=selectframe&stage=" + stage + "&comments=" + fieldname; var Iframe_content = ''; @@ -724,8 +740,12 @@ else document.getElementById("audio_chooser_span").innerHTML = Iframe_content; } - function launch_vm_chooser(fieldname,stage,vposition) + function launch_vm_chooser(fieldname,stage) { + + var h = window.innerHeight; + var vposition=mouseY; + var audiolistURL = "./non_agent_api.php"; var audiolistQuery = "source=admin&function=vm_list&user=" + user + "&pass=" + pass + "&format=selectframe&stage=" + stage + "&comments=" + fieldname; var Iframe_content = ''; @@ -1000,9 +1020,9 @@ if ( ($ADD==3511) or ($ADD==2511) or ($ADD==2611) or ($ADD==4511) or ($ADD==5511 new_content = new_content + "
: '; new_content = new_content + "   : '; - new_content = new_content + "
  : "; - new_content = new_content + "
  : "; - new_content = new_content + "
  : "; + new_content = new_content + "
  : "; + new_content = new_content + "
  : "; + new_content = new_content + "
  : "; new_content = new_content + "   : '; } if (selected_route=='DID') @@ -1023,7 +1043,7 @@ if ( ($ADD==3511) or ($ADD==2511) or ($ADD==2611) or ($ADD==4511) or ($ADD==5511 } else {value='vm-goodbye';} - new_content = ": "; + new_content = ": "; } if (selected_route=='EXTENSION') { @@ -1054,7 +1074,7 @@ if ( ($ADD==3511) or ($ADD==2511) or ($ADD==2611) or ($ADD==4511) or ($ADD==5511 } else {value='';} - new_content = ": "; + new_content = ": "; } if (selected_route=='AGI') { @@ -1167,9 +1187,9 @@ if ( ($ADD==2811) or ($ADD==3811) or ($ADD==3111) or ($ADD==2111) or ($ADD==2011 new_content = new_content + "
: '; new_content = new_content + "   : '; - // new_content = new_content + "
  : "; - // new_content = new_content + "
  : "; - // new_content = new_content + "
  : "; + // new_content = new_content + "
  : "; + // new_content = new_content + "
  : "; + // new_content = new_content + "
  : "; // new_content = new_content + '   : '; } @@ -1191,7 +1211,7 @@ if ( ($ADD==2811) or ($ADD==3811) or ($ADD==3111) or ($ADD==2111) or ($ADD==2011 } else {value = 'nbdy-avail-to-take-call|vm-goodbye';} - new_content = ": "; + new_content = ": "; } if (selected_route=='EXTENSION') { @@ -1211,7 +1231,7 @@ if ( ($ADD==2811) or ($ADD==3811) or ($ADD==3111) or ($ADD==2111) or ($ADD==2011 } else {value = '101';} - new_content = ": "; + new_content = ": "; } if (new_content.length < 1) diff --git a/agc_2-X/trunk/www/vicidial/admin_soundboard.php b/agc_2-X/trunk/www/vicidial/admin_soundboard.php index a15c3fdc..d97bff88 100644 --- a/agc_2-X/trunk/www/vicidial/admin_soundboard.php +++ b/agc_2-X/trunk/www/vicidial/admin_soundboard.php @@ -1173,7 +1173,7 @@ if ($ADD==362111111111) echo "\n"; - echo ""._QXZ("Add An Audio File").": "._QXZ("audio chooser")." $NWB#soundboard-audio_filename$NWE\n"; + echo ""._QXZ("Add An Audio File").": "._QXZ("audio chooser")." $NWB#soundboard-audio_filename$NWE\n"; echo "\n"; echo "\n"; diff --git a/agc_2-X/trunk/www/vicidial/audio_store.php b/agc_2-X/trunk/www/vicidial/audio_store.php index 78599924..bd389ed3 100644 --- a/agc_2-X/trunk/www/vicidial/audio_store.php +++ b/agc_2-X/trunk/www/vicidial/audio_store.php @@ -590,7 +590,7 @@ if ($action == "MANUALUPLOAD")

(.wav)



-
+ \n"; 0) { - echo "
"._QXZ("File to Delete").": ". _QXZ("select file")."
\n"; + echo "
"._QXZ("File to Delete").": ". _QXZ("select file")."
\n"; echo "
\n"; echo "\n"; echo "\n";