• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Rowhelper & checkbox

webGUI
1
2
2.4k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D
    dvserg
    last edited by Jun 21, 2006, 12:22 PM

    <rowhelperfield><fielddescr>Not</fielddescr>
    <fieldname>Nnnn</fieldname>
    <type>checkbox</type></rowhelperfield>

    I create package XML for WebGUI with adddeleteeditpagefields and Rowhelper (as edit table item page)
    In rowhelper use checkbox.

    • if edit page showed - in rowhelper view all elements but checkbox not view;
    • if add rowhelper element - checkbox present in new row
    • if i store editpage and open them - in rowhelper exists all rows and elements. but not present any checkboxes/

    PS System client IE6 & WinXP

    SquidGuardDoc EN  RU Tutorial
    Localization ru_PFSense

    1 Reply Last reply Reply Quote 0
    • D
      dvserg
      last edited by Jun 21, 2006, 1:23 PM

      My row_helper_dynamic.js

      need also
      var rowsize
      for setup elements size if adding new row with rowhelper>

      // Global Variables
      var rowname = new Array(99);
      var rowtype = new Array(99);
      var newrow  = new Array(99);
      
      for (i = 0; i < 99; i++) {
      	rowname[i] = '';
      	rowtype[i] = '';
      	 newrow[i] = '';
      }
      
      var field_counter_js = 0;
      var loaded = 0;
      var is_streaming_progress_bar = 0;
      var temp_streaming_text = "";
      
      var addRowTo = (function() {
          return (function (tableId) {
      	var d, tbody, tr, td, bgc, i, ii, j;
      	d = document;
      	tbody = d.getElementById(tableId).getElementsByTagName("tbody").item(0);
      	tr = d.createElement("tr");
      	totalrows++;
      	for (i = 0; i < field_counter_js; i++) {
      		td = d.createElement("td");
      		if(rowtype[i] == 'textbox') {
      			td.innerHTML=" ";
      		} else if(rowtype[i] == 'select') {
      			td.innerHTML="<select name="&quot; + rowname[i] + totalrows + &quot;">" + newrow[i] + "</select> ";
      		} else if(rowtype[i] == 'checkbox') {
      			td.innerHTML=" ";
      		} else if(rowtype[i] == 'input') {
      			td.innerHTML=" ";
      		} else if(rowtype[i] == 'password') {
      			td.innerHTML=" ";
      		}
      		tr.appendChild(td);
      	}
      	td = d.createElement("td");
      	td.rowSpan = "1";
      	td.innerHTML = '';
      	tr.appendChild(td);
      	tbody.appendChild(tr);
          });
      })();
      
      function removeRow(el) {
          var cel;
          while (el && el.nodeName.toLowerCase() != "tr")
      	    el = el.parentNode;
      
          if (el && el.parentNode) {
      	cel = el.getElementsByTagName("td").item(0);
      	el.parentNode.removeChild(el);
          }
      }
      
      function find_unique_field_name(field_name) {
      	// loop through field_name and strip off -NUMBER
      	var last_found_dash = 0;
      	for (var i = 0; i < field_name.length; i++) {
      		// is this a dash, if so, update
      		//    last_found_dash
      		if (field_name.substr(i,1) == "-" )
      			last_found_dash = i;
      	}
      	if (last_found_dash < 1)
      		return field_name;
      	return(field_name.substr(0,last_found_dash));
      }[/i][/i][/i][/i][/i][/i][/i][/i][/i][/i][/i][/i][/i][/i][/i][/i][/i][/i][/i]
      

      SquidGuardDoc EN  RU Tutorial
      Localization ru_PFSense

      1 Reply Last reply Reply Quote 0
      1 out of 2
      • First post
        1/2
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.