We've only gotten one error report for this error, and it didn't have a stack
trace, so it's hard to know whether this will actually fix the issue or not.
(imported from commit 7bff052347a33f67d8479b1cb23f6e5e24defc75)
The client's update_person() method will look for an is_admin
change and update the gear menu as needed, as well as the underlying
data structures that help draw the admin page user list.
(imported from commit af8c173886d63dd102c63336bbca176f49e1036d)
Always render the Administration menu item from the back end, but
make it be hidden by default until the page is loaded. Then, the
client can un-hide it as needed.
(imported from commit 66e607eec430d7179b4d5ac3f5416f5be8ac26c9)
Going forward, the back end may supply fields other than
full_name, like is_admin, so we should make sure the field
is in the hash first.
(imported from commit be94b9698bae0866444739e2846ff65a3ab27eb6)
The code to keep page_params.people_list and realm_people_dict
values in sync with people_dict was unnecessary, as they are
the same underlying object.
(imported from commit 0a901213977ed21a0587ed1590ab5434be756f51)
Add javascript to handle the button clicks and update the status based
on the subscribe and unsubscribe events from the server.
(imported from commit 6b9c0b40d9084e3d8b64bed701ebc786bef6d432)
The message_rendered.zulip event fires after a new messages was rendered
but before it is added to the DOM. This allows javascript components to
change the display of a message before it is added to the DOM.
(imported from commit 69448a250863853a6d0a6e428dcfa12db50f2f71)
There was a bug where you would type "is:private je" into the search
suggestion and see undefined:jesstess@zulip.com. Now we use
the "pm-with" operator. The search suggestions for people are kind
of complicated now, because there is some overlap between
get_private_suggestions and get_person_suggestions.
(imported from commit 7d330f34f4a433995420de6eb90cb41229b70272)
There was a bug where you could not reactivate a user after
doing another user-based action on the page, because we weren't
clearing the active_user_row class on the previous row, and
then $(".active_user_row").find('.email').text() would be a
concatenation of two user emails and cause a "No such user!"
error.
(imported from commit c867d3bc0855e02b17b9553e1924926c2dd50e56)
It was confusing, because it has different meaning that being
the opposite of active_user_row.
(imported from commit df190afb2d9bccf9790c7373802b16ff6da2f2cb)
If you make a stream private/public from the Streams page
(which admins can do now), then we now correctly redraw
the swatch to have/not have the lock icon.
(imported from commit 35eb4ba12ad152e43b40f1bcf2c5db784a965dee)
This function can redraws the lock icon (or lack of lock icon)
for a stream in the stream sidebar. It can be called when
admins change the stream privacy.
(imported from commit 880133d02525137094c48ecad8cf2dfff59f3307)
The new name is more descriptive of what the function does, and it
also has the side benefit of cleaning up greps for the backend
function called build_narrow_filter().
(imported from commit 4b88fa863d7c1751946c78977f2ffaf19dd3ae5e)
The type parameter was always passed in as "stream", and we
only render the stream_sidebar_row template, so let's not
pretend like we support arbitrary message types here.
(imported from commit 8a852a68ddda336024793f6fdafa648883bb815e)
We now call add_stream_to_sidebar() instead. The old function was
only ever called for streams, so the newly named function is more
descriptive of what it does.
(imported from commit 7ae373279ea9987d3637cdbdc427680ac989fe86)
This is a node test that verifies that
stream_list.add_stream_to_sidebar() creates the right
DOM when it renders the stream_sidebar_row template.
The test also makes sure that the DOM gets put in the
correct place to be retrieved by stream_list.get_stream_li()
calls.
(imported from commit ed4c0148da2261870e3db5a9b553913788b4eccd)
If a user is not allowed to create new streams, then do not
show the "Create new stream" UI at the top of the settings page.
(imported from commit b97626938d8b612317c2189f7eca0d4bd27fc274)
Our logic for unnarrowing when messages were read during the narrow
did not properly use the then_scroll option and thus actually set the
scroll position when they selected a new message. This was
accidentally prevented from being a big problem by the incorrect
scrolling logic that was fixed by:
Only preserve_pre_narrowing_screen_position when preserving pointer.
which caused the browser to scroll _back_ to close to the correct
scroll position (but not the intended scroll position -- it would
usually be a little bit off).
(imported from commit d779de8f89590d242f62d32b22a297bdc096c594)
The one call we were making to it was actually unnecessary since highlighting is
no longer done client-side.
(imported from commit 7644a5961ca48cd57f4b65c6f698083677e0a130)
I think that this will fix the issues we've been having with
hashchange.save_narrow() screwing up the scroll position in the page.
(imported from commit 25af9b7dda2d107220e11dd12b9dc344bc63addc)
This is important for hotkey users to be able to use other hotkeys.
Since ESC clears a search, we need ENTER to merely blur the search;
otherwise, hotkey users will need to mouse away from the search box
if they want to keep the search sticky.
(imported from commit 204704435c7821c1ad3b7b750ffe3545adaff9aa)