function doOrderBy(oEl) {
                var n = oEl.name;
                var p = n.substring("sort".length);
                var dEl = document.getElementById('desc' + p);
                var pEl = document.getElementById('prop' + p);
                oEl.disabled = !pEl.checked;
                if (oEl.disabled)
                    oEl.checked = false;
                dEl.disabled = !oEl.checked;
                if (dEl.disabled)
                    dEl.checked = false;

                // parse present status
                var oTermEl = document.getElementById('orderBy');
                var o = oTermEl.value;
                var oterms = o.split(' ');

                // remove old term if exists
                p = '?' + p.replace(':', '_');
                for (var i = 0; i < oterms.length; i++) {
                    if (oterms[i].trim().indexOf(p) >= 0) {
                        oterms[i] = null;
                    }
                }

                var term = makeTerm(oEl.checked, dEl.checked, p);
                // add new one:
                oterms[oterms.length] = term;
                // rebuid the terms
                var mo = join(oterms, ' ');
                oTermEl.value = mo;
                return false;
            }
// Parameter is the orderBy checkbox element.
Parameter is the orderBy checkbox element.
Parameter is the orderBy checkbox element .
function doOrderBy(oEl) {
                var n = oEl.name;
                var p = n.substring("sort".length);
                var dEl = document.getElementById('desc' + p);
                var pEl = document.getElementById('prop' + p);
                oEl.disabled = !pEl.checked;
                if (oEl.disabled)
                    oEl.checked = false;
                dEl.disabled = !oEl.checked;
                if (dEl.disabled)
                    dEl.checked = false;
                var oTermEl = document.getElementById('orderBy');
                var o = oTermEl.value;
                var oterms = o.split(' ');
                p = '?' + p.replace(':', '_');
                for (var i = 0; i < oterms.length; i++) {
                    if (oterms[i].trim().indexOf(p) >= 0) {
                        oterms[i] = null;
                    }
                }
                var term = makeTerm(oEl.checked, dEl.checked, p);
                oterms[oterms.length] = term;
                var mo = join(oterms, ' ');
                oTermEl.value = mo;
                return false;
            }
function doOrderBy ( oEl ) { var n = oEl . name ; var p = n . substring ( "sort" . length ) ; var dEl = document . getElementById ( 'desc' + p ) ; var pEl = document . getElementById ( 'prop' + p ) ; oEl . disabled = ! pEl . checked ; if ( oEl . disabled ) oEl . checked = false ; dEl . disabled = ! oEl . checked ; if ( dEl . disabled ) dEl . checked = false ; var oTermEl = document . getElementById ( 'orderBy' ) ; var o = oTermEl . value ; var oterms = o . split ( ' ' ) ; p = '?' + p . replace ( ':' , '_' ) ; for ( var i = 0 ; i < oterms . length ; i ++ ) { if ( oterms [ i ] . trim ( ) . indexOf ( p ) >= 0 ) { oterms [ i ] = null ; } } var term = makeTerm ( oEl . checked , dEl . checked , p ) ; oterms [ oterms . length ] = term ; var mo = join ( oterms , ' ' ) ; oTermEl . value = mo ; return false ; }
Parameter is the orderBy checkbox element.
Parameter is the orderBy checkbox element .
// parse present status // remove old term if exists // add new one: // rebuid the terms