Added proxying by alternate criteria to WobjectProxy

This commit is contained in:
Len Kranendonk 2004-07-22 18:51:07 +00:00
parent d7171e5d49
commit 02d24c4e4c
13 changed files with 515 additions and 31 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 848 B

View file

@ -0,0 +1,42 @@
.qbtd {
height: 20px;
background-image: url(/extras/wobject/WobjectProxy/hline.gif);
padding-left: 5px;
padding-right: 5px;
}
.qbtdleft {
height: 20px;
background-image: url(/extras/wobject/WobjectProxy/hline.gif);
padding-right: 5px;
}
.qbtdright {
height: 20px;
background-image: url(/extras/wobject/WobjectProxy/vline.gif);
background-repeat: repeat-y;
align: right;
}
.qbfieldLabel {
text-align: left;
font-size: 12px;
border-style: solid;
border-width: 1px;
padding-right: 4px;
padding-left: 4px;
background-color: white;
}
.qbselect {
height: 20px;
font-size: 12px;
}
.qbText {
background-color: white;
text-align: left;
font-size: 12px;
}

View file

@ -0,0 +1,35 @@
function addCriteria ( fieldname, opform, valform ) {
var form = opform.form;
var operator = getValue(opform);
var value = getValue(valform);
var criteria = form.proxyCriteria.value;
var conjunction = "";
var re = /^\s*$/;
if(! re.test(criteria)) {
conjunction = " " + getValue(form.conjunction) + " ";
}
if(/\s+/.test(fieldname)) {
fieldname = '"' + fieldname + '"';
}
var statement = fieldname + " " + operator + " " + '"' + value + '"';
form.proxyCriteria.value = criteria + conjunction + statement;
}
function getValue(sel) {
if(sel.type == "text") {
return sel.value;
}
for(i=0;i<sel.length;i++) {
if(sel[i].type == "radio") {
if(sel[i].checked) {
return sel[i].value;
}
} else {
if(sel.options[i].selected) {
return sel.options[i].value;
}
}
}
return "";
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 869 B