summaryrefslogtreecommitdiffstats
path: root/usr/local/www/javascript
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@gmail.com>2012-04-06 10:16:06 -0700
committerScott Ullrich <sullrich@gmail.com>2012-04-06 10:16:06 -0700
commit48cb641a817a29d78b2dda9913e93e22971ab1fa (patch)
treeae1797fc850cf9adc6a289298954d6757bbade9f /usr/local/www/javascript
parentd33e772fa06556e6ce9b52775414737be0c326f4 (diff)
parent85a46fbdcd8a71bfc786ce6bf9f51b222b7a8bc1 (diff)
downloadpfsense-48cb641a817a29d78b2dda9913e93e22971ab1fa.zip
pfsense-48cb641a817a29d78b2dda9913e93e22971ab1fa.tar.gz
Merge pull request #78 from Whizkidzz/master
Added "interface_selection" to enable interface selection in tinydns
Diffstat (limited to 'usr/local/www/javascript')
-rwxr-xr-xusr/local/www/javascript/row_helper_dynamic.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/usr/local/www/javascript/row_helper_dynamic.js b/usr/local/www/javascript/row_helper_dynamic.js
index e5e5c6f..d3f2681 100755
--- a/usr/local/www/javascript/row_helper_dynamic.js
+++ b/usr/local/www/javascript/row_helper_dynamic.js
@@ -25,17 +25,18 @@ var temp_streaming_text = "";
var addRowTo = (function() {
return (function (tableId, objectSize) {
var $ = jQuery;
- var d, tbody, tr, td, bgc, i, ii, j, className;
+ var d, tbody, tr, td, bgc, i, ii, j, size, className;
d = document;
tbody = d.getElementById(tableId).getElementsByTagName("tbody").item(0);
tr = d.createElement("tr");
totalrows++;
- if (!objectSize)
- objectSize = rowsize[i];
+ size = objectSize;
for (i = 0; i < field_counter_js; i++) {
+ if (!objectSize)
+ size = rowsize[i];
td = d.createElement("td");
if(typeof(rowtype[i]) == 'function') {
- td.innerHTML="<INPUT type='hidden' value='" + totalrows +"' name='" + rowname[i] + "_row-" + totalrows + "'></input>" + rowtype[i](rowname[i], objectSize, totalrows) + " ";
+ td.innerHTML="<INPUT type='hidden' value='" + totalrows +"' name='" + rowname[i] + "_row-" + totalrows + "'></input>" + rowtype[i](rowname[i], size, totalrows) + " ";
} else if(rowtype[i] == 'textbox') {
td.innerHTML="<INPUT type='hidden' value='" + totalrows +"' name='" + rowname[i] + "_row-" + totalrows + "'></input><input " + rowhelper_onChange + " size='" + rowsize[i] + "' name='" + rowname[i] + totalrows + "' id='" + rowname[i] + totalrows + "'></input> ";
} else if(rowtype[i] == 'textbox,ipv4v6') {
@@ -44,12 +45,14 @@ var addRowTo = (function() {
td.innerHTML="<INPUT type='hidden' value='" + totalrows +"' name='" + rowname[i] + "_row-" + totalrows + "'></input><select " + rowhelper_onChange + " name='" + rowname[i] + totalrows + "' id='" + rowname[i] + totalrows + "'>" + newrow[i] + "</select> ";
} else if(rowtype[i] == 'select,ipv4v6') {
td.innerHTML="<INPUT type='hidden' value='" + totalrows +"' name='" + rowname[i] + "_row-" + totalrows + "'></input><select " + rowhelper_onChange + " name='" + rowname[i] + totalrows + "' class='ipv4v6' id='" + rowname[i] + totalrows + "'>" + newrow[i] + "</select> ";
+ } else if(rowtype[i] == 'interfaces_selection') {
+ td.innerHTML="<INPUT type='hidden' value='" + totalrows +"' name='" + rowname[i] + "_row-" + totalrows + "'></input><select " + rowhelper_onChange + " name='" + rowname[i] + totalrows + "' id='" + rowname[i] + totalrows + "'>" + newrow[i] + "</select> ";
} else if(rowtype[i] == 'select_source') {
td.innerHTML="<INPUT type='hidden' value='" + totalrows +"' name='" + rowname[i] + "_row-" + totalrows + "'></input><select " + rowhelper_onChange + " name='" + rowname[i] + totalrows + "' id='" + rowname[i] + totalrows + "'>" + newrow[i] + "</select> ";
} else if(rowtype[i] == 'checkbox') {
td.innerHTML="<INPUT type='hidden' value='" + totalrows +"' name='" + rowname[i] + "_row-" + totalrows + "'></input><input " + rowhelper_onChange + " type='checkbox'name='" + rowname[i] + totalrows + "' id='" + rowname[i] + totalrows + "'></input> ";
} else if(rowtype[i] == 'input') {
- td.innerHTML="<INPUT type='hidden' value='" + totalrows +"' name='" + rowname[i] + "_row-" + totalrows + "'></input><input " + rowhelper_onChange + " class='formfld unknown' size='" + objectSize + "' name='" + rowname[i] + totalrows + "' id='" + rowname[i] + totalrows + "'></input> ";
+ td.innerHTML="<INPUT type='hidden' value='" + totalrows +"' name='" + rowname[i] + "_row-" + totalrows + "'></input><input " + rowhelper_onChange + " class='formfld unknown' size='" + size + "' name='" + rowname[i] + totalrows + "' id='" + rowname[i] + totalrows + "'></input> ";
} else if(rowtype[i] == 'password') {
td.innerHTML="<INPUT type='hidden' value='" + totalrows +"' name='" + rowname[i] + "_row-" + totalrows + "'></input><input " + rowhelper_onChange + " class='formfld pwd' type='password' name='" + rowname[i] + totalrows + "' id='" + rowname[i] + totalrows + "'></input> ";
}
OpenPOWER on IntegriCloud