bkruse: trunk r1414 - in /trunk: ./ config/menus.html config/scripts/astman.js
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Tue Aug 21 14:28:11 CDT 2007
Author: bkruse
Date: Tue Aug 21 14:28:10 2007
New Revision: 1414
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1414
Log:
Merged revisions 1413 via svnmerge from
https://origsvn.digium.com/svn/asterisk-gui/branches/1.4
........
r1413 | bkruse | 2007-08-21 14:26:54 -0500 (Tue, 21 Aug 2007) | 3 lines
Remove the old combo_box function, and use the new COMBOBOX function in
the ASTGUI namespace.
........
Modified:
trunk/ (props changed)
trunk/config/menus.html
trunk/config/scripts/astman.js
Propchange: trunk/
------------------------------------------------------------------------------
--- branch-1.4-merged (original)
+++ branch-1.4-merged Tue Aug 21 14:28:10 2007
@@ -1,1 +1,1 @@
-/branches/1.4:1-1291,1293,1298-1300,1326,1332,1336-1338,1342,1346,1349,1356,1359,1362,1381,1384,1395,1399,1402
+/branches/1.4:1-1291,1293,1298-1300,1326,1332,1336-1338,1342,1346,1349,1356,1359,1362,1381,1384,1395,1399,1402,1413
Modified: trunk/config/menus.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/menus.html?view=diff&rev=1414&r1=1413&r2=1414
==============================================================================
--- trunk/config/menus.html (original)
+++ trunk/config/menus.html Tue Aug 21 14:28:10 2007
@@ -1235,7 +1235,7 @@
<select style="display:none" id="tbr" class="input8" onChange=" $('newstep_var').value = $('tbr').value;"></select>
<select style="display:none" id="rgrp" class="input8" onChange=" $('newstep_var').value = $('rgrp').value;"></select>
<input type=text id="newstep_var_digit" size=3 style="display:none;" onChange=" $('newstep_var').value = $('newstep_var_digit').value;" pattern='^\d*$' class="input8">
- <SCRIPT LANGUAGE="JavaScript">combo_box('newstep_var', "combodiv_sounds","combosel_sounds"); </SCRIPT>
+ <SCRIPT LANGUAGE="JavaScript">ASTGUI.COMBOBOX.call('newstep_var', "combodiv_sounds","combosel_sounds"); </SCRIPT>
<input type=button style='width:45' id='addstep' onclick="add_newstep()" value="Add" disabled class="buttonbold">
<input type=button style='width:50' id='deletestep' onclick="delete_step()" value="Delete" disabled class="buttonbold">
</NOBR>
Modified: trunk/config/scripts/astman.js
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/scripts/astman.js?view=diff&rev=1414&r1=1413&r2=1414
==============================================================================
--- trunk/config/scripts/astman.js (original)
+++ trunk/config/scripts/astman.js Tue Aug 21 14:28:10 2007
@@ -557,95 +557,6 @@
'<TR><TD><img src="/asterisk/static/config/images/loading.gif"></TD>' +
'<TD valign=middle align=center> <div id=message_text></div></TD></TR></TABLE>';
document.body.appendChild(h);
-}
-
-function combo_box(a, b, c ){
- var combo_text = document.getElementById(a);
- var combo_selectdiv = document.getElementById(b);
- var combo_selectbox = document.getElementById(c);
- var TAB = 9;
- var ENTER = 13;
- var ESC = 27;
- var KEYUP = 38;
- var KEYDN = 40;
- var BKSPACE = 8;
-
- function xyz(event){
- if( event.keyCode == ENTER || event.keyCode == ESC || event.keyCode == TAB){
- combo_selectdiv.style.display = "none";
- return false;
- }else if( event.keyCode == KEYDN || event.keyCode == KEYUP ){
- combo_selectbox.focus();
- return false;
- }else if( event.keyCode == BKSPACE && !combo_text.value.length ){
- combo_selectdiv.style.display = "none";
- return false;
- }else{
- combo_selectdiv.style.display = "";
- return true;
- }
- }
-
- function abcd(event){
- if( event.keyCode == ENTER || event.keyCode == ESC || event.keyCode == TAB){
- return false;
- }
- for (var i=0; i < combo_selectbox.options.length; i++){
- if(combo_selectbox.options[i].value.toLowerCase().match(combo_text.value.toLowerCase()) ){
- combo_selectbox.selectedIndex = i;
- return true;
- }
- }
- combo_selectdiv.style.display = "none";
- }
-
- function efgh(event) {
- if( event.keyCode == ENTER ){
- combo_text.value = combo_selectbox.value;
- combo_text.focus();
- combo_selectdiv.style.display = "none";
- return false;
- }else if( event.keyCode == ESC ){
- combo_text.focus();
- combo_selectdiv.style.display = "none";
- }else{
- return true;
- }
- }
- function ijkl(event) {
- combo_text.value = combo_selectbox.value;
- combo_text.focus();
- combo_selectdiv.style.display = "none";
- }
-
- combo_selectdiv.style.position ="absolute";
- combo_selectdiv.style.top = 0;
- combo_selectdiv.style.left = 0;
-// combo_selectdiv.style.z-index = 10000;
- combo_selectdiv.style.display = "none";
-
- ASTGUI.events.add( combo_text , 'keychange' , combobox_activate ) ;
- ASTGUI.events.add( combo_text , 'focus' , combobox_activate ) ;
- ASTGUI.events.add( combo_text , 'focusout' , function(){ combo_selectdiv.style.display ='none'; } ) ;
- ASTGUI.events.add( combo_text , 'keypress' , xyz) ;
- ASTGUI.events.add( combo_text , 'keyup' , abcd ) ;
- ASTGUI.events.add( combo_selectbox, 'keypress' , efgh ) ;
- ASTGUI.events.add( combo_selectbox, 'click' , ijkl ) ;
-
- function combobox_activate(){
- var tmp_left = combo_text.offsetLeft;
- var tmp_top = combo_text.offsetTop + combo_text.offsetHeight;
- var tmp_parent = combo_text;
- while(tmp_parent.offsetParent != document.body){
- tmp_parent = tmp_parent.offsetParent;
- tmp_left += tmp_parent.offsetLeft;
- tmp_top += tmp_parent.offsetTop;
- }
- combo_selectdiv.style.left = tmp_left;
- combo_selectdiv.style.top = tmp_top ;
- combo_selectdiv.style.width = combo_text.offsetWidth;
- combo_selectdiv.style.display = "";
- }
}
function InArray(search_array, searchstring ){
More information about the asterisk-gui-commits
mailing list