Steve Howell
a03a7d4c95
peer_remove: Send user_id, not email, for unsubscribe events.
2016-11-08 15:36:29 -08:00
Igor Tokarev
07d05390bf
markdown: Fix client usermention regular expression.
...
Fixes #993 .
2016-11-06 18:37:09 -08:00
umkay
f4c621ffe3
admin: Enable admins to toggle supported auth methods via UI.
...
Add a table to the administration page that will allow realm admins to
activate and deactivate the supported authentication methods for that
realm.
2016-11-06 16:29:35 -08:00
Steve Howell
6fe86adac8
node tests: Add newer stylesheets for HTML output.
2016-11-05 15:03:29 -07:00
Steve Howell
165b6c1ff3
topic lists: Improve node test to show HTML correctly.
2016-11-05 10:38:37 -07:00
Steve Howell
1119a24ea3
node tests: Extract node_tests/topic_list.js
...
This moves one method over from stream_list.js. There's still a
lot of boilerplate here, unfortunately, as topic lists have a lot
of dependencies on other parts of the system--narrowing state,
muting state, jQuery, handlebars, etc.
2016-11-05 10:38:37 -07:00
Steve Howell
e17cb79701
node tests: Remove compile-settings code from templates.js.
2016-11-04 21:23:35 -07:00
Steve Howell
6a1b53a195
node tests: Remove compile-settings code from i18n.js.
2016-11-04 21:23:35 -07:00
Steve Howell
dae53573cb
node tests: Fix make_sure_all_templates_have_been_compiled().
...
This now searches subdirectories.
2016-11-04 21:23:35 -07:00
Steve Howell
3d0c0e2e81
node tests: Remove retry logic for compiling templates.
...
We can now use template_finder.get() to find the name we need.
2016-11-04 21:23:35 -07:00
Steve Howell
2088e8420f
User user_id, not email, in peer_add events.
2016-11-04 11:37:14 -07:00
Steve Howell
17e39a88ef
Remove people.test_set_people_name_dict().
...
We use a cleaner approach to setting up test data in echo.js to
allow us to remove the one call to test_set_people_name_dict().
2016-11-04 11:37:14 -07:00
Steve Howell
8c47f7f7db
Remove people.test_set_people_dict().
2016-11-04 11:37:14 -07:00
Steve Howell
3941334d00
Use user_ids for subscribers in stream_data.js.
...
We still shim a lot of methods to keep using emails, but the
internal data structure now has user_ids.
2016-11-04 11:37:12 -07:00
Steve Howell
7509f73f02
Clean up stream renaming in the JS code.
...
We now use stream_id as our key to rename streams, which
should prevent a few race conditions long term. (We are
still possibly contending with other events that use
stream_name as a key, so this is not perfect.)
2016-11-04 11:30:18 -07:00
Steve Howell
e1372ddf5d
Add people.get_user_id().
2016-11-04 11:30:18 -07:00
Steve Howell
2f4c7d2ef9
Clean up page_params initialization in node_tests/echo.js.
2016-11-04 11:30:18 -07:00
Steve Howell
4cd39010d1
Add people.get_person_from_user_id().
...
This requires the introduction of people_by_user_id_dict
and changes to people.add() and people.remove().
2016-11-04 11:30:18 -07:00
Steve Howell
a2874a3fe9
node tests: Simplify compiling of templates.
...
Now we just have two methods of importance:
compile_template
render_template
The compile_template() function will automatically
(and recursively) compile any partials it depends
on and mark those as compiled.
2016-11-04 11:23:11 -07:00
Steve Howell
0085164ad9
node tests: Avoid re-compiling templates.
...
This is a minor optimization to avoid re-compiling templates
that have already encountered.
2016-11-04 11:23:11 -07:00
Steve Howell
dd4a8eeebd
node tests: Extract render.find_included_partials().
2016-11-04 11:23:11 -07:00
Steve Howell
155f7881b2
node tests: Extact template_finder() class.
2016-11-04 11:23:11 -07:00
Steve Howell
61d88cfc13
node tests: Use template_dir() to walk templates.
2016-11-04 11:23:11 -07:00
Steve Howell
9b97b5da13
Improve test coverage for people.get_recipient_count().
2016-11-04 10:05:11 -07:00
Tim Abbott
368b585980
subs: Redesign the rows of the #subscriptions table.
2016-11-03 17:33:33 -07:00
Steve Howell
30e01306d9
Eliminate people.reify() and mostly ignore unknown users.
...
If I try to send a message to an unknown user (which is possible
for some types of realms), then I simply ignore them during the
send codepath, so that I don't later need to patch up their attributes.
2016-11-03 16:20:45 -07:00
Steve Howell
15d44f8d71
Encapsulate pm_recipient_count.
...
We no longer store pm_recipient_count on person objects, but we
instead use a Dict to store them. Then the new API is this:
people.get_recipient_count()
people.incr_recipient_count()
2016-11-03 16:20:45 -07:00
Rishi Gupta
9ef8536cc6
models.Realm: Require Realm.string_id to be non-NULL.
...
Adds a database migration, adds a new string_id argument to the management
realm creation command, and adds a short name field to the web realm
creation form when REALMS_HAVE_SUBDOMAINS is False.
2016-11-02 22:46:34 -07:00
Brock Whittaker
1432c6613b
zjsunit: Remove manual need to call global.use_template.
...
When the render function is run now, it uses the partial_finder
function to search recursively through files for partials and add them
so that test writers don’t have to.
This means that we no longer have to do any manual work to maintain
the templates.js check that all handlebars templates are rendered by
the node tests.
2016-11-02 22:08:47 -07:00
Rishi Gupta
a3400a6862
casper tests: Keep var/casper/server.log till it has 100kb.
...
Previously, var/casper/server.log was overwritten before every run of
run-casper. This commit implements the simplest form of log rotation,
by overwriting server.log only if it has more than 100kb.
2016-11-02 22:04:16 -07:00
sonali0901
f9f0f29298
casper: Add support for passing just the test number to run a test.
...
Fixes #2178 .
2016-11-02 21:38:42 -07:00
paxapy
2f711a070d
bugdown: Add autocomplete for #StreamName links.
...
Fixes #1858 .
2016-11-01 20:19:44 -07:00
Steve Howell
8c9488a904
Add topic_list.build_widget().
...
This gets us closer to a component model for topic lists.
2016-11-01 19:30:41 -07:00
Steve Howell
aca6ba182e
Render topic list items individually.
...
This is a precursor to being able to find topic list
items without the complexity of iterate_to_find().
2016-11-01 19:30:41 -07:00
Steve Howell
d70ac2fc0d
Remove obsolete code for page_params.people_list.
...
The only module that uses people_list now is people.js, and that's
only during the page load process.
2016-11-01 13:55:48 -07:00
Steve Howell
40ec0189e4
Use people.get_all_persons() in at-mention typeaheads.
...
This is more robust than using page_params.people_list.
2016-11-01 13:55:48 -07:00
Steve Howell
06d7012113
Use people.get_all_persons() for search_suggestion.js.
...
This is better than using page_params.people_list, which may
go out of sync when live updates happen.
2016-11-01 13:55:48 -07:00
Steve Howell
2d945d7296
Add people.get_realm_persons().
2016-11-01 13:55:48 -07:00
Steve Howell
aa07b32d58
Add people.get_all_persons().
2016-11-01 13:55:48 -07:00
Tim Abbott
56c9be75ee
subs: Add data-stream-name for stream settings.
2016-10-28 16:07:02 -07:00
Tim Abbott
66e2632809
subs: Rename .subscription_name to .stream-name.
2016-10-28 14:47:22 -07:00
Tim Abbott
f18d53d46a
subs: Rename .subscription_row to .stream_row.
...
The new name is clearer, since we show these rows for streams whether
or not you're subscribed.
2016-10-28 14:25:00 -07:00
Steve Howell
5fd71a6381
Rename var in sidebar_subject_list.handlebars.
...
s/subjects/topics/
2016-10-28 13:52:25 -07:00
Steve Howell
0a4579711d
Add stream_data.get_recent_topics().
...
This removes the last remaining references to
stream_data.recent_subjects() outside of stream_data.js.
2016-10-28 13:52:25 -07:00
Steve Howell
6a54dfc127
Remove recent_subjects from node tests.
...
We now use stream_data.populate_stream_topics_for_tests(),
which hides some of the implementation details of initializing
the data structure.
2016-10-28 13:52:25 -07:00
Steve Howell
8acdf718bc
Move process_message_for_recent_topics() to stream_data.js.
2016-10-28 13:52:25 -07:00
Steve Howell
10bc093375
Stop using server data to draw "Manage Streams".
...
We have all the data we need on the client side.
2016-10-28 13:44:46 -07:00
Tim Abbott
2834a2bbbb
subs: Extract subscription_settings.handlebars.
...
This is an early step towards being able to decouple the subscription
settings section from the slideout behavior.
2016-10-27 22:07:42 -07:00
Steve Howell
f7e6cfc892
Extract topic_list.build_list().
...
This used to be stream_list._build_subject_list(). The code
didn't change except for one s/subject/topic fix.
2016-10-27 15:49:25 -07:00
Tim Abbott
14dc98d8b9
server_events: Switch to using REST-style URLs.
...
This eliminates our use of /json/get_events; we'll remove that
endpoint in a future commit.
2016-10-25 18:02:16 -07:00