Steve Howell
f8cad17c75
search.js: kill off labels, mapped, update_typeahead()
...
(imported from commit e0320b5315762d1776ef198fe57663ee6b74d7f8)
2013-07-16 13:29:18 -04:00
Steve Howell
73f013f077
search.js: Simplify stream suggestions
...
(imported from commit b12395a2b3415065e0c25a637d22bc385dbdda8b)
2013-07-16 13:29:18 -04:00
Steve Howell
6e385bc85d
search.js: Simplify people suggestions
...
(imported from commit ff3683f63e85e4d021de299d62bf2585fd6b99d9)
2013-07-16 13:29:18 -04:00
Steve Howell
82233a5de9
search.js: Introduce search_object var
...
(imported from commit ce4b32891011c548b0b9f6851537f3110d0f2329)
2013-07-16 13:29:18 -04:00
Steve Howell
b4e05d3430
search.js: Construct descriptions while constructing suggestions.
...
(imported from commit 5de6d0799de6d132e6e7ac28658d0f25b71cc7ed)
2013-07-16 13:29:18 -04:00
Steve Howell
d216069e29
search.js: Kill off get_object_parts()
...
(imported from commit fabfa6c3bf8cb0749ba1379882eda8cb9c8316ed)
2013-07-16 13:29:17 -04:00
Steve Howell
ec7a5c0ea5
search.js: Simplify operators suggestion
...
(imported from commit 55f84b69be5e8f75a8e0ab5a7a00ba6f88873db8)
2013-07-16 13:29:17 -04:00
Steve Howell
9041b1f7ac
search.js: Isolate person suggestions
...
(imported from commit afec996b39b662c5000f7f2217e139b872bee990)
2013-07-16 13:29:17 -04:00
Steve Howell
200a4d2d83
search.js: Isolate stream suggestions
...
(imported from commit 627a57d0be0b53ed4027408be949c060e6674224)
2013-07-16 13:29:17 -04:00
Steve Howell
e2634042a0
search.js: Avoid sorter callback
...
(imported from commit d930af6e0beca6165c750dfecf85b092475e868c)
2013-07-16 13:29:17 -04:00
Steve Howell
ba71dd212b
search.js: Avoid matcher callback
...
(imported from commit aa5289b174dfeb3e89debc344b106a8446b4f6a5)
2013-07-16 13:29:17 -04:00
Steve Howell
eca2ca675b
search.js: Decouple object labeling from object rendering.
...
(imported from commit f761401d3e287aa2771ce4203f1b2b8f57c7ca86)
2013-07-16 13:29:17 -04:00
Steve Howell
0a7b5e5b6b
Rename render_object_in_parts to get_object_parts
...
(imported from commit b040bb60d166a2f904c8d1280fb51693e0d50977)
2013-07-16 13:29:17 -04:00
Steve Howell
b4dd0efc74
Move describe() from narrow.js to search.js.
...
(This function is only used in the search code.)
(imported from commit 44d53fbd73be56d9d416ebcafdc517c686e7adf8)
2013-07-16 13:29:16 -04:00
Steve Howell
249252f700
Put spaces after "function" in JS code (cosmetic).
...
(imported from commit 7579547bfed70b3e53122109d0d6f30ea01f5ac3)
2013-07-05 16:32:32 -04:00
Kevin Mehall
9322e63d32
Refactor typeahead for user names (PM and @reply).
...
Get data directly from the main user list, rather than maintaining a
separate list just for autocomplete.
Fixes trac #1362 -- Does not depend on historical messages, so
will do the correct autocomplete after a single reload.
(imported from commit 6b35a709dba3384530082e8cfacf0151f9e0eb26)
2013-06-18 17:52:39 -04:00
Leo Franchi
0524c14c8c
Ignore leading spaces in search box
...
(imported from commit 098a8f288c8264cc804b737f804b866c64c0ff5b)
2013-05-31 12:24:30 -04:00
Zev Benjamin
d35c8f0c81
Track what user action triggered a narrow
...
(imported from commit 2b110dc27334e4b823810bfef13c3d10d36b3886)
2013-05-21 17:56:49 -04:00
Steve Howell
cee31a4f4e
Fix unescaped angle brackets in search typeahead.
...
This was a pretty recent regression in the logic for
highlighting search typeaheads.
(imported from commit ba226f9cc7d6b09744ea07ef516fee280f23e048)
2013-05-09 10:35:46 -04:00
Steve Howell
58c1110635
Put streams lower in typeaheads and kill off some dead code related to search
...
(imported from commit c7d50f44a4de6cc5049e51ef4b671cc49902c466)
2013-05-09 10:35:46 -04:00
Steve Howell
96100bb42a
Highlight search typeaheads for streams
...
(imported from commit e8725fe8c4f4985d46e48fdab5003e3e9def9bd1)
2013-05-09 10:35:46 -04:00
Steve Howell
667a47755e
Highlight search typeaheads for senders
...
(imported from commit 80e16d47507b0c23103aa1e574961cc5e29cac6e)
2013-05-09 10:35:46 -04:00
Steve Howell
e47b98df38
Highlight search typeaheads for private messages
...
(imported from commit e3c5525255c70e507f33f24fc305d4a268c87e42)
2013-05-09 10:35:46 -04:00
Steve Howell
64ba2864bc
Match names w/prefix and turn off highlighting.
...
(imported from commit 4ebc4aba5d05173ad6b8176d47fdf062e23c1441)
2013-05-09 10:35:45 -04:00
Steve Howell
0f75cbd30f
Match any word in stream for typeahead queries
...
(imported from commit bd6ee91ae880c7fb3dd118cd2f024820ced73466)
2013-05-09 10:35:45 -04:00
Steve Howell
de8106d923
Refine search (sort people by # of pms, limit streams to prefix-only).
...
Also minor configuration changes and no need to clone list.
(imported from commit 9f9c7259ed479fc29cd66fe260d9d81017e5f48f)
2013-05-09 10:35:45 -04:00
Steve Howell
0164d9f757
Search typeahead has more suggestions and sorting.
...
(imported from commit 5386be57e7f0b820e1a9cbd166c9c43e5e72215b)
2013-05-09 10:35:45 -04:00
Zev Benjamin
c08a86aeb9
Use server-highlighted subject and content when narrowed to a search
...
(imported from commit 0579193da040db77f9c7937d3714cb9ffeaf7ed8)
2013-04-30 11:40:27 -04:00
Keegan McAllister
6d9aca5f1a
Move "page parameters" (email, enter_sends, etc) into a single object
...
(imported from commit 842b2371bf6364982f1358f1cd2d91118c7fb2bf)
2013-03-26 13:50:03 -04:00
Waseem Daher
c41fa46fb4
Always show the searchbar 'x'.
...
This simplifies a bunch of fragile resizing logic in our code,
and also addresses the Chrome Canary bug where clicking in the
searchbox causes the navbar to get huge.
This fixes Trac #764 and Trac #1039
(imported from commit fc8c3995109de384b71dfba2b986a8500ff7f08d)
2013-03-06 15:06:35 -05:00
Tim Abbott
a92f2a5229
Rename 'Narrow to messages containing' to 'Search for'.
...
(imported from commit 147164bb96bb4fdb451454956ac56f5d3b2424b6)
2013-03-05 09:32:59 -05:00
Tim Abbott
ee3662d1da
Move 'Narrow to' to text inside narrow.describe().
...
(imported from commit a5ccce0034f4c70b71958b26b60521b779837377)
2013-03-05 09:32:59 -05:00
Tim Abbott
021052a247
search: Remove unused variable search_active.
...
(imported from commit ebb907742fd38f60116fb0fe46fa622abd3b23e0)
2013-03-04 17:57:21 -05:00
Tim Abbott
d5a185dca8
Add highlighting of search terms in "messages containing" narrows.
...
(imported from commit 47fca2f20650c32e976ab01e213463d4fb4ed655)
2013-03-04 17:57:20 -05:00
Luke Faraone
d88107567a
Remove "find in page" functionality.
...
This was a source of user confusion and didn't provide that much value.
(imported from commit fbe9405d8bc4cb6661baa7fe7583eab5ed73d886)
2013-03-04 10:59:41 -05:00
Tim Abbott
096df2d3da
typeahead_helper: Rename render_pm_object and cleanup usage.
...
(imported from commit 28bca00802e189daed22dcabba1241ef2625536e)
2013-02-28 17:49:57 -05:00
Tim Abbott
49af19aa71
Add support for narrowing by a message's sender.
...
Fixes #972 .
(imported from commit 2514d14c94a071f2b3e6149a2bdaeaa00e0c847f)
2013-02-28 17:49:57 -05:00
Keegan McAllister
e8dff94bfc
Clear the search box on blur if not searching or narrowed
...
Fixes #978 .
(imported from commit 5aefa1bf369e01e4cb6df15478080a793116628b)
2013-02-28 12:29:52 -05:00
Keegan McAllister
db58ede658
Move some search UI code from ui.js to search.js
...
(imported from commit 4e761636769b320431d34d00bfed6b2ba888fa55)
2013-02-28 12:29:52 -05:00
Zev Benjamin
4c9e3a167e
Move message selection to an event-based system
...
Messages are now selected on a MessageList, which triggers a
message_selected event that other parts of the code can listen for.
(imported from commit 1da9e4121425c0ac4461b41b7aea169072e1512b)
2013-02-21 13:29:17 -05:00
Zev Benjamin
e9b915c2b9
Remove global selected_message_id and persistent_message_id variables
...
Each message list now has a selected message id.
(imported from commit 041abc54ea42c636c30e39df4a2e838bb830e1aa)
2013-02-21 13:29:17 -05:00
Waseem Daher
3e28cbc545
Make 'narrow to messages containing x' the default.
...
As it currently stands, after the introduction of operators, narrowing
to messages that contained X would also trigger a find-in-page.
This stops that from happening, and then also makes the default action
of the search-bar-invoked-without-a-typeahead be 'narrow to messages
containing x' rather than 'find in page'.
(imported from commit 1beffce426c6b00449e7c1c803687a129747ed63)
2013-02-01 13:47:20 -05:00
Jacob Hurwitz
c3c79f5423
This magically makes the gear not move when the search box is focused
...
(imported from commit b562c358f3ba80877e8f03199638c236823d184c)
2013-01-31 19:07:13 -05:00
Waseem Daher
6d5424c910
Put "find in page" as the last option.
...
Leo points out that if you type a stream name, we probably want
to offer to narrow you to that stream more than we should offer
to find that stream name in the page.
(imported from commit 803ac681ec2f759f4dabb68a40722a07b86a0cab)
2013-01-31 17:50:53 -05:00
Waseem Daher
6cefbde820
Make "Find" option read "Find x in page".
...
(imported from commit 5d95b996f4d944c285ca6f5bc0f75ea359cb4df2)
2013-01-31 17:50:52 -05:00
Waseem Daher
0eca9fa595
Put 'narrow to messages containing' before 'find in page'.
...
This fixes Trac #740 .
(imported from commit e40ffa149eac3c7d954d6cac617935496d366ce4)
2013-01-30 22:38:56 -05:00
Jacob Hurwitz
c82fd34cad
Two fixes to the search bar:
...
1) Make the search hotkey (/) no longer clear the search box
2) Vertically center the "Search..." placeholder
(imported from commit 02dee6b72c4457e160f57d8604164e15e62f5f28)
2013-01-29 15:29:27 -05:00
Zev Benjamin
8e7ac23d2b
Make subs.js the keeper of the streams list
...
(imported from commit 566f529757bb83ad8dd4e52d3fc8c1b90c497ca2)
2013-01-24 17:59:02 -05:00
Waseem Daher
01ee0ccc9c
Return to home view if a search is initiated from elsewhere.
...
(imported from commit a7453f269cabc2dd349a9711fcb6e84de18fecd7)
2013-01-22 17:18:50 -05:00
Keegan McAllister
a15a1702e1
search: Only highlight actual message or recipient header text
...
Before, a whitespace-only search would "highlight" the pointer and all kinds of
other interstitial space, which totally broke the page layout.
Fixes #408 .
(imported from commit e7e0e251551a9da5a2ea53e36b9cce16e3e30634)
2013-01-15 17:28:07 -05:00