This is untested in anything but Chrome, and offered without warranty. (It's also ugly.) If you find a bug, let me know via email at customer-service@fogcreek.com.
var search_axes = new Array('< refine search by axis >',
'AlsoEditedBy',
'Area',
'AssignedTo',
'Attachment',
'Category',
'Closed',
'ClosedBy',
'CommunityUser',
'Correspondent',
'CreatedBy',
'Due',
'Edited',
'EditedBy',
'ElapsedTime',
'EstimateCurrent',
'EstimateOriginal',
'From',
'LastEdited',
'LastEditedBy',
'LastViewed',
'Milestone',
'Occurrences',
'Opened',
'OpenedBy',
'Outline',
'Parent',
'Priority',
'Project',
'RelatedTo',
'ReleaseNotes',
'RemainingTime',
'Resolved',
'ResolvedBy',
'Show',
'StarredBy',
'Status',
'Tag',
'Title',
'To',
'ViewedBy'
);
var search_axis_explanations = new Array ('select a property',
'e.g., Sally Jones, Bob',
'',
'e.g., Sally Jones, Bob',
'e.g., picture.jpg',
'e.g., Bug, Feature',
'e.g., yesterday, last week, -14d..-1d, -4h..now',
'e.g., Sally Jones, Bob',
'e.g., Sally Jones, Bob',
'e.g.,bob@example.com',
'e.g., Sally Jones, Bob',
'e.g., today, yesterday, now..+4h, -1h..',
'e.g., yesterday, last week, -14d..-1d, -4h..now',
'e.g., Sally Jones, Bob',
'e.g., 3.5 hours, 40.., 1..3',
'e.g., 3.5 hours, 40.., 1..3',
'e.g., 3.5 hours, 40.., 1..3',
'e.g.,bob@example.com',
'e.g., yesterday, last week, -14d..-1d, -4h..now',
'e.g., Sally Jones, Bob',
'e.g., yesterday, last week, -14d..-1d, -4h..now',
'',
'e.g., 3, 1..4',
'e.g., yesterday, last week, -14d..-1d, -4h..now',
'e.g., Sally Jones, Bob',
'e.g., 24356 (a case number)',
'e.g., 24356 (a case number)',
'e.g., 3, 1..4',
'',
'e.g., 24356 (a case number)',
'',
'e.g., 3.5 hours, 40.., 1..3',
'e.g., yesterday, last week, -14d..-1d, -4h..now',
'e.g., Sally Jones, Bob',
'e.g., unread, read, subscribed, spam',
'e.g., me',
'e.g., open, closed, active, by design',
'',
'',
'e.g., bob@example.com',
'e.g., me');
$("#idFilterSearchAnchor").each(function(){
$("<select id=idSearchHelp>").insertAfter($("#idFilterLinkPopTerm"))
.css({ "margin-left": 6 ,"visibility" : "visible"})
.bind('change',function(){
$("#idSearchAxisExplanation").text(search_axis_explanations[this.selectedIndex]);
$('#idAxisValue').focus();
});
for ( var i=0, len=search_axes.length; i<len; ++i ){
this_axis = search_axes[i];
$('<option value=\'' + this_axis + '\'>').appendTo($('#idSearchHelp'))
.text(this_axis);
}
$('<input type=text id=idAxisValue>').insertAfter($('#idSearchHelp'))
.css({'height':'12px'})
.bind('keypress',function(event){
if (event.keyCode == '13') {
window.location = window.location.href + "+" + escape($('#idSearchHelp').val() + ":\"" + this.value + "\"");
}
});
$("<span id=idSearchAxisExplanation>").insertAfter($('#idAxisValue'))
.css ({'visibility' : 'visible', 'color':'gray','font-size':'11px'});
});