changes to how we generate the id attribute of forms and the naming convention of forms
migrate blog edit to formslib
This commit is contained in:
+29
-28
@@ -58,10 +58,24 @@ function lockoptions(form, master, subitems) {
|
||||
return(true);
|
||||
}
|
||||
|
||||
function lockoption(form,item) {
|
||||
eval("document."+form+"."+item+".disabled=true");/* IE thing */
|
||||
if(document.forms[form].elements['h'+item]) {
|
||||
eval("document."+form+".h"+item+".value=1");
|
||||
}
|
||||
}
|
||||
|
||||
function unlockoption(form,item) {
|
||||
eval("document."+form+"."+item+".disabled=false");/* IE thing */
|
||||
if(document.forms[form].elements['h'+item]) {
|
||||
eval("document."+form+".h"+item+".value=0");
|
||||
}
|
||||
}
|
||||
function lockoptionsall(formid) {
|
||||
var lock=new Object();
|
||||
var items=eval(formid+'items');
|
||||
var form=document.forms[formid];
|
||||
var lock = new Object();
|
||||
var varname = formid.replace(/\-/g, '_');
|
||||
var items = eval(varname+'items');
|
||||
var form = document.forms[formid];
|
||||
for (var master in items){
|
||||
var subitems=items[master].dependents;
|
||||
var thislock;
|
||||
@@ -94,7 +108,8 @@ function lockoptionsall(formid) {
|
||||
}
|
||||
|
||||
function lockoptionsallsetup(formid) {
|
||||
var items=eval(formid+'items');
|
||||
var varname = formid.replace(/\-/g, '_');
|
||||
var items=eval(varname+'items');
|
||||
var form=document.forms[formid];
|
||||
for (var i = 0; i < form.elements.length; i++){
|
||||
var found=false;
|
||||
@@ -113,26 +128,11 @@ function lockoptionsallsetup(formid) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (found){
|
||||
}
|
||||
}
|
||||
|
||||
return lockoptionsall(formid);
|
||||
}
|
||||
|
||||
function lockoption(form,item) {
|
||||
eval("document."+form+"."+item+".disabled=true");/* IE thing */
|
||||
if(document.forms[form].elements['h'+item]) {
|
||||
eval("document."+form+".h"+item+".value=1");
|
||||
}
|
||||
}
|
||||
|
||||
function unlockoption(form,item) {
|
||||
eval("document."+form+"."+item+".disabled=false");/* IE thing */
|
||||
if(document.forms[form].elements['h'+item]) {
|
||||
eval("document."+form+".h"+item+".value=0");
|
||||
}
|
||||
}
|
||||
|
||||
function submitFormById(id) {
|
||||
var theform = document.getElementById(id);
|
||||
@@ -219,15 +219,16 @@ function findChildNodes(start, tagName, elementClass, elementID, elementName) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if( (child.nodeType == 1) &&//element node type
|
||||
(!tagName || child.nodeName == tagName) &&
|
||||
(!elementClass || classfound)&&
|
||||
(!elementID || child.id == elementID) &&
|
||||
(!elementName || child.name == elementName))
|
||||
{
|
||||
children = children.concat(child);
|
||||
} else {
|
||||
children = children.concat(findChildNodes(child, tagName, elementClass, elementID, elementName));
|
||||
if(child.nodeType == 1) { //element node type
|
||||
if ( (!tagName || child.nodeName == tagName) &&
|
||||
(!elementClass || classfound)&&
|
||||
(!elementID || child.id == elementID) &&
|
||||
(!elementName || child.name == elementName))
|
||||
{
|
||||
children = children.concat(child);
|
||||
} else {
|
||||
children = children.concat(findChildNodes(child, tagName, elementClass, elementID, elementName));
|
||||
}
|
||||
}
|
||||
}
|
||||
return children;
|
||||
|
||||
Reference in New Issue
Block a user