Skip to content

Instantly share code, notes, and snippets.

@slackorama
Created May 28, 2009 23:58
Show Gist options
  • Save slackorama/119675 to your computer and use it in GitHub Desktop.
Save slackorama/119675 to your computer and use it in GitHub Desktop.
Awful or ok?
// ternary to the nth degree
s+='<span class="cpointer '+(
t==='date' || t==='time' || t==='year' || t==='quarter' || t==='month' || t==='week'?
val===5201 || val===1028 || val===1128 ?'purple':'dark_purple':
t==='percent'?'blue':
t==='id'?'grey_blue':
t==='aid'?'green':
t==='a'?'dark_green':
t==='anumber'?'darker_green':
'')+'" onclick="ck(event);'+this.tt+'.ck_filter('+pane_id+','+fe_count+',1)"><input type="checkbox" name="f'+val+'"'+(checked[val]||'')+'> '+title+'</span><br/>'
// yet another spot....
if(!(t=this.g('where_template')))return
if(this.r.where){
var wq=this.r.where.split('`'),wql=wq.length-1
t.value=wql!==dfcl?this.abc.slice(0,dfcl).join(
this.r.where && this.r.where.substr(this.r.where.length-1)==='|'?' or ':' and '
):
wq[wql]==='|' || wq[wql]==='&'?this.abc.slice(0,dfcl).join(
wq[wql]==='|'?' or ':' and '
):
wq[wql]
}
else t.value=this.abc.slice(0,dfcl).join(' and ')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment