diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php index 84ff19f9..65afce5b 100644 --- a/www/vicidial/admin.php +++ b/www/vicidial/admin.php @@ -967,12 +967,13 @@ $lead_filter_sql = ereg_replace(";","",$lead_filter_sql); # 70219-1102 - Changed campaign dial statuses to be one string allowing for high limit # 70223-0957 - Added queuemetrics_eq_prepend for custom ENTERQUEUE prepending of a field # 70302-1111 - Fixed small bug in dialable leads calculation +# 70314-1133 - Added insert selection on script forms # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$admin_version = '2.0.90'; -$build = '70302-1111'; +$admin_version = '2.0.91'; +$build = '70314-1133'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -3099,6 +3100,31 @@ if ($hh=='reports') function openNewWindow(url) { window.open (url,"",'width=620,height=300,scrollbars=yes,menubar=yes,address=yes'); } +function scriptInsertField() { + openField = '--A--'; + closeField = '--B--'; + var textBox = document.scriptForm.script_text; + var scriptIndex = document.getElementById("selectedField").selectedIndex; + var insValue = document.getElementById('selectedField').options[scriptIndex].value; + if (document.selection) { + //IE + textBox = document.scriptForm.script_text; + insValue = document.scriptForm.selectedField.options[document.scriptForm.selectedField.selectedIndex].text; + textBox.focus(); + sel = document.selection.createRange(); + sel.text = openField + insValue + closeField; + } else if (textBox.selectionStart || textBox.selectionStart == 0) { + //Mozilla + var startPos = textBox.selectionStart; + var endPos = textBox.selectionEnd; + textBox.value = textBox.value.substring(0, startPos) + + openField + insValue + closeField + + textBox.value.substring(endPos, textBox.value.length); + } else { + textBox.value += openField + insValue + closeField; + } +} +
@@ -3525,14 +3551,57 @@ if ($ADD==1111111) echo "| \n";
echo "";
- echo " ADD NEW SCRIPT |