pari: trunk r505 - /trunk/config/scripts/astman.js
asterisk-gui-commits at lists.digium.com
asterisk-gui-commits at lists.digium.com
Tue Mar 27 16:49:16 MST 2007
Author: pari
Date: Tue Mar 27 18:49:16 2007
New Revision: 505
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=505
Log:
explicitly defining the parent document of the box element .. was testing the GUI in Firefox3 :-)
Modified:
trunk/config/scripts/astman.js
Modified: trunk/config/scripts/astman.js
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/scripts/astman.js?view=diff&rev=505&r1=504&r2=505
==============================================================================
--- trunk/config/scripts/astman.js (original)
+++ trunk/config/scripts/astman.js Tue Mar 27 18:49:16 2007
@@ -417,7 +417,7 @@
function insert_option(box, res, value, core_name){
var z;
if (res) {
- var opt_new = document.createElement('option');
+ var opt_new = box.ownerDocument.createElement('option');
opt_new.text = res ;
opt_new.value = value ;
opt_new.core_name = core_name;
@@ -742,7 +742,7 @@
category.fields = new Array;
}
- var newoption = document.createElement("option");
+ var newoption = box.ownerDocument.createElement("option");
newoption.text = "New Entry";
newoption.value = "";
box.options.add(newoption);
@@ -777,7 +777,7 @@
var pos;
var subname, subitem, subcat;
var category;
- var newoption = document.createElement("option");
+ var newoption = box.ownerDocument.createElement("option");
newoption.text = "New Entry";
if (box.callbacks.newsubitem) {
@@ -915,7 +915,7 @@
tmp = box.callbacks.format(box.stored_config.catbyname[tmp[0]], tmp[1]);
if (tmp) {
box.options[box.selectedIndex].innerHTML = tmp;
- var tmp_newopt = document.createElement('option');
+ var tmp_newopt = box.ownerDocument.createElement('option');
tmp_newopt.text = box.options[box.selectedIndex].innerHTML ;
tmp_newopt.value = box.options[box.selectedIndex].value;
@@ -965,7 +965,7 @@
try{
box.options.add(box.options[box.selectedIndex], y);
}catch(err){
- var new_option = document.createElement('option') ;
+ var new_option = box.ownerDocument.createElement('option') ;
new_option.text = box.options[box.selectedIndex].text ;
new_option.value = box.options[box.selectedIndex].value ;
new_option.core_name = box.options[box.selectedIndex].core_name ;
@@ -1220,7 +1220,7 @@
var fields = allheaders[x].split(': ');
if (!inmsg) {
msgs[msgnum] = new Object();
- msgs[msgnum].headers = new Array();
+ msgs[msgnum].headers = {};
msgs[msgnum].names = new Array();
y=0;
}
@@ -1839,7 +1839,7 @@
var t = e.options.length ;
for( var f =0 ; f < t ; f++ ){
// take each element in e
- var opt_new = document.createElement('option');
+ var opt_new = e.ownerDocument.createElement('option');
opt_new.text = e.options[f].text ;
opt_new.value = 'reserved';
//if( navigator.userAgent.indexOf("Firefox") != -1 ){ opt_new.disabled = true; }
More information about the asterisk-gui-commits
mailing list