Commit graph

347 commits

Author SHA1 Message Date
Sacha Greif
bf90eedf37 URL can now be removed when editing a post 2014-11-18 10:27:58 +09:00
Charlie DeTar
ea7efc3550 Replace "throwError" with "flashMessage" and type
Currently, ``throwError`` is used for all manner of messages, including
errors, "success" messages, and "info" messages.  This makes appropriate
styling of the error message difficult.  In addition, the name
``throwError`` seems to create confusion, implying that an error will
actually be thrown (e.g. stopping execution when a user isn't logged in
[0][1]), when in fact it just displays a message.

Replace ``throwError`` with ``flashMessage``, and reliably include a
message "type" (e.g. "error", "success", "info") every time.  rename
``lib/errors.js`` to ``lib/messages.js`` to more accurately reflect its
function.

This commit doesn't rename the message collection (``Errors``), nor the
template responsible for rendering the messages (``error_item.html``) --
that should probably still be done, but has higher likelihood of
trouble for existing alternate themes and installations.

[0] 6ccf7d7d47/client/views/users/user_edit.js (L43)
[1] 083a4c4dc4/client/views/users/user_email.js (L13)
2014-11-05 13:12:09 -07:00
Charlie DeTar
83bb43ab46 Add hooks so packages can modify profiles
Add the following hooks:
 - ``addToUserSchema``: fields to add to the (currently unused) user
   Schema
 - ``postAuthor``: templates to use when rendering the post author in the
   byline
 - ``userProfileDisplay``: additional templates to add to the user
   profile display.
 - ``userProfileEdit``: additional templates to add to the user profile
   editing form.
 - ``userProfileFinishSignup``: additional templates to show in the view
   for completing user signup (adding email, username, etc).
 - ``userEditRenderedCallbacks``: Callbacks executed on "rendered" for
   user_edit view.
 - ``userEditClientCallbacks``: Callbacks used to further process user
   properties before saving changes in user_edit view.
 - ``userProfileCompleteChecks``: Functions called to determine whether
   a user profile is "complete" (e.g. has email, username, and whatever
   else).

These hooks facilitate package authors changing which profile fields are
displayed, which profile fields are required, and how to display
usernames next to posts.
2014-10-27 17:59:12 -06:00
Steffen Strätz
6e863598d1 Merged 2014-10-16 00:32:08 +02:00
Steffen Strätz
e7e1accc79 - Added view counting for posts
- Refactored click counting to match view counting
- Renamed User "commentCount" to match Post "commentsCount"
- Removed security issue in client side click counting (now calling server method instead)
2014-10-15 21:23:43 +02:00
Sacha Greif
f121b4791e remove fieldsToOmit 2014-10-06 11:10:50 +09:00
Sacha Greif
8a72a9b77c Using omit: true 2014-10-06 10:40:45 +09:00
Sacha Greif
ccf0ea7820 working on quick form for post submit 2014-10-05 17:20:15 +09:00
Sacha Greif
29495788e8 Merge pull request #454 from bengott/avatar-tweaks
Update to use bengott:avatar package for user avatars
2014-10-04 10:14:49 +09:00
Charlie DeTar
ed09d0ea7c Fully abstract isAdmin
We're using a fork with a different definition of "isAdmin" (using
``meteor-roles`` rather than the boolean user.isAdmin).  ``lib/user.js``
provides abstracted methods for reading admin state, which makes it very
easy to change our definition -- except that the abstractions weren't
used universally.

This commit finishes the job of using the abstractions, and adds a few
new parts to also allow abstracting setting and updating admin-ness:

 - setAdmin: sets admin status directly on a user object.
 - updateAdmin: executes a mongo update to set admin status.
 - adminMongoQuery: the query parameter for admin-ness, for composing
   user queries with other fields.
 - notAdminMongoQuery: the query parameter for not-admin-ness.
2014-10-03 16:21:06 -06:00
Ben Gott
bab24860d6 Update to use bengott:avatar package for all user avatars 2014-09-30 12:34:42 -05:00
Jeremy Shimko
d1c85559c5 swap order of subtract() args due to deprecation 2014-09-18 16:30:52 -04:00
Mitchell Wulfman
c0832e6798 another jQuery cache 2014-09-16 15:46:48 -04:00
Mitchell Wulfman
6fc6b9eb78 cleanup while getting familiar with the codebase 2014-09-16 15:18:27 -04:00
Mitchell Wulfman
8250f52450 cache jQuery objects 2014-09-16 15:13:42 -04:00
Sacha Greif
b7ceff4481 Merge pull request #402 from dburles/incoming
use UI.dynamic for incoming posts template
2014-09-16 14:30:41 +09:00
David Burles
f1c47acde4 use UI.dynamic for incoming posts template 2014-09-16 15:29:11 +10:00
Sacha Greif
99b07d0172 Merge branch 'dburles-incoming' 2014-09-16 14:06:04 +09:00
Sacha Greif
f9390a301d various small css fixes 2014-09-16 11:51:13 +09:00
Sacha Greif
f6bf431885 Merge branch 'incoming' of github.com:dburles/Telescope into dburles-incoming 2014-09-15 21:33:36 +09:00
David Burles
d54bd804e4 added incoming posts notification button 2014-09-15 12:42:17 +10:00
Sacha Greif
e26f8dfd11 renaming postMeta template to postInfo 2014-09-12 18:53:49 +09:00
Niklas Ström
ed97a26d45 removed the last few references to the old sign in flow - (trying to up up vote comments without being signed in etc.)
also unified all references to /sign-in to use the getSigninUrl()
2014-09-08 01:52:09 +08:00
Sandro Gvelesiani
ff4def6e3f changed the default sign-in route path from /signin to /sign-in 2014-09-01 00:04:21 -07:00
Sacha Greif
e21f5c7056 adding new htmlBody field and adding hooks to sanitise it 2014-08-31 16:11:48 +09:00
Sacha Greif
be82db9072 Disable resetScroll; Simplify adminUsers publication; fix search controller 2014-08-28 11:10:31 +09:00
Sacha Greif
fa8691eaaf making default view configurable 2014-08-28 10:16:17 +09:00
Sacha Greif
3b1cff9347 working on daily view 2014-08-27 10:23:56 +09:00
Sacha Greif
063242b78d Changed comments to CommentsCount; Now tracking _ids of commenters on each Post document 2014-08-22 10:31:05 +09:00
Sacha Greif
0a0ad6a501 layout tweaks 2014-08-21 15:30:05 +09:00
Sacha Greif
d7135c1d1d improving base theme 2014-08-20 15:59:11 +09:00
Sacha Greif
c77acd9605 Merge branch 'master' into themes 2014-08-12 17:41:44 +09:00
Sacha Greif
4ad020174c Separating themes; adding accounts-entry 2014-08-12 16:16:44 +09:00
Fabrice Delhoste
9511e7a912 Allow custom to cancel server call on edit/submit 2014-08-11 12:09:20 +02:00
Fabrice Delhoste
ad1b6abee1 Disabled submit while processing, like post_submit 2014-08-11 12:05:27 +02:00
Sacha Greif
c3bfe760c2 disable scrolling code 2014-08-08 09:54:20 +09:00
Sacha Greif
58ca8d389f Fixing latency compensation issue 2014-08-06 12:02:17 +09:00
Sacha Greif
902a2f94f1 Added rendered hooks (fix #330) 2014-08-01 09:07:58 +09:00
Sacha Greif
ba38e2a75b making post modules use dynamic templates as well 2014-07-23 10:25:16 +09:00
Sacha Greif
bcd0bdf359 fixed via twitter bug 2014-07-19 08:50:36 +09:00
Sacha Greif
44edccd610 fix #333 2014-07-18 09:18:52 +09:00
Sacha Greif
c40fbcb9f3 working on mobile version; added new postHeading and postMeta hooks 2014-07-14 10:12:02 +09:00
Sacha Greif
10f321b75c small css fixes 2014-07-10 12:02:53 +09:00
Cory Fabre
f7594403b7 Fix digest date issues
Fix today and yesterday offsets
Use current date in empty post list error
2014-07-07 23:25:53 -05:00
Sacha Greif
30ca584109 fix voting icon bug 2014-07-08 09:06:49 +09:00
Sacha Greif
a1f217545c better names for module positions 2014-07-07 13:41:25 +09:00
Sacha Greif
7d67c2539f making moduleClass helper nicer 2014-07-07 12:22:42 +09:00
Sacha Greif
130103ed9d fixing templateClass helper 2014-07-07 11:51:59 +09:00
Sacha Greif
681be06443 post_item tweaks 2014-07-07 11:49:21 +09:00
Sacha Greif
608a163ac1 merging comment_page and comment_reply templates 2014-07-07 09:36:38 +09:00