David Wick
a510e92c7c
analytics.js: Factor out common event data into addContextData
2016-02-01 14:56:46 -08:00
Matt Lee
86b3e71f02
Events: Add frontend expando events
2016-02-01 14:56:42 -08:00
David Wick
306ceff774
Update event-tracker to latest version
2016-02-01 14:51:55 -08:00
David Wick
517a1a49de
eventscollector: Use test endpoint if g.debug is True.
2016-02-01 14:50:44 -08:00
Chad Birch
663b00bf1e
Create subreddit button: hide if user can't create
...
We only show the create subreddit button in the sidebar to users whose
account is at least 30 days old, but since there are now some additional
requirements for creating a subreddit, this means that sometimes we end
up showing the button to people that won't be able to successfully
create a subreddit. This keeps the 30-day restriction, but on top of
that also checks that the user's actually going to be able to create
before showing the button.
2016-02-01 12:44:57 -07:00
Daniel Ellis
b7f1b052c8
ip_events: Use TTL on batch mutator.
2016-01-28 15:58:21 -08:00
Chris Slowe
81f5d74cc2
Fix install-reddit.sh to once again work via wget without checkout out the repository
2016-01-28 11:25:54 -08:00
zeantsoi
921c734816
Vagrantfile: Update box url and checksum
2016-01-27 12:31:06 -08:00
Daniel Ellis
45cb444d97
ip_events: Add Cassandra models.
...
We are storing the date in the column for sorting when querying.
Entries will stay in Cassandra for 90 days.
2016-01-27 11:44:19 -08:00
MelissaCole
816cd3bf03
Subreddit Rules: Fix typos
2016-01-27 11:35:15 -08:00
Brian Simpson
4c6740c6f6
Account.friend_rels_cache: Load data attributes in query
...
Otherwise we may pollute the cache with un-loaded Account objects.
This is almost guaranteed to happen when Account.friend_rels needs
to load the Accounts with data immediately after calling
Account.friend_rels_cache.
2016-01-27 11:19:26 -08:00
Brian Simpson
2f2998110d
Account._by_name_cache: Don't pollute cache with unloaded objects
...
Set `data=True` on the query so that the retrieved Accounts will
have their data attributes loaded before being set into the cache.
2016-01-27 11:19:20 -08:00
Daniel Ellis
77af64c226
zookeeper: Fix bug when data is None.
2016-01-26 14:35:09 -08:00
Chris Slowe
1d27289e4b
update vote tests to use explicit kw arguments for improved readability
2016-01-26 14:28:37 -08:00
MelissaCole
978aeba445
Return 404 for /about/rules in FakeSubreddit
2016-01-25 15:39:15 -08:00
MelissaCole
074d1d0d68
Subreddit Rules: Fix updating the short_name
...
When the max number of rules are used, the short name wasn't able
to be updated.
2016-01-25 15:12:15 -08:00
MelissaCole
0ba56193bc
Subreddit Rules: Handle cases where short_name is None
2016-01-25 15:12:07 -08:00
Matt Lee
6ad231b2ea
Subreddit Rules: Fix broken link to rules page
...
The string formatting inside of the 'subreddit_report_form' template function is causing
the underscore template tag to get escaped, so the link doesn't render properly on the
frontend. Moving the call to 'unsafe' fixes it, and should be safe since 'sr_name' will only ever be the name of a subreddit or the underscore template tag.
2016-01-25 13:17:25 -08:00
Matt Lee
3872db90a7
Subreddit Rules: Unbreak new report form
2016-01-25 13:17:25 -08:00
Matt Lee
adfc5fe48e
Subreddit Rules: Make about/rules page update cached rules
...
Adds methods to the model and collections to generate JSON compatible
with rendering the rules, and updates (or creates) the rules stored in
sessionStorage on page load and on any change.
2016-01-25 13:17:25 -08:00
Matt Lee
e61640acd0
Subreddit Rules: Update styles
...
Styles the new rule 'kind' inputs and display, and updates their
display text to match the spec.
2016-01-25 13:17:25 -08:00
Matt Lee
a10d837414
Subreddit Rules: Disable other input when site reason is selected
2016-01-25 13:17:25 -08:00
Matt Lee
cfd5dea2cc
Subreddit Rules: Remove action-form css class
...
This is binding some extra event handlers to be bound in
action-forms.js that aren't needed on the new form.
2016-01-25 13:17:25 -08:00
Matt Lee
442557af72
Subreddit Rules: Cache subreddit rules with sessionCache
...
Should reduce the number of requests that make it to the API.
2016-01-25 13:17:25 -08:00
Matt Lee
71d11a8186
Subreddit Rules: Render report form client side
...
Refactor the rules templates to enable rendering on the client while
keeping HTML api in place for the time being.
2016-01-25 13:17:25 -08:00
MelissaCole
0b9287e17f
Subreddit Rules: Add ability to edit type of rules
2016-01-25 13:17:25 -08:00
MelissaCole
9b30aff2a7
Subreddit Rules: Support separating types for comments and posts
2016-01-25 13:17:25 -08:00
Matt Lee
5ba63efb13
Subreddit Rules: Remove XSS sinks
...
The initial rendering of the rules is done in mako, but all subsequent
rendering of the rules is done client-side. Using the wrong template
tags here creates an unnecessary vulnerability that could be used to
XSS attack a limited set of users (mods could potentially XSS attack
other mods of the same sub).
2016-01-25 13:17:25 -08:00
MelissaCole
bceac7117c
Subreddit rules: Temporarily handle missing created_utc
2016-01-25 13:17:25 -08:00
MelissaCole
a14df90cd7
Subreddit rules: API changes
...
Change `when` to `created_utc` and add `description_html`.
2016-01-25 13:17:25 -08:00
Matt Lee
117927e49f
SubredditRules: Update new report form language.
2016-01-25 13:17:24 -08:00
Matt Lee
ba39e8fdbb
SubredditRules: Force modtools.less to rebuild.
...
Items in LESS_STYLESHEETS do not automatically rebuild when imported files
change. Items in SPRITED_STYLESHEETS automatically build when any other less
file updates, so that works for now. Stylesheets run through the spriter
will throw an error if they don't actually contain any sprites, so I added a
dummy sprite rule to modtools.less.
2016-01-25 13:17:24 -08:00
Matt Lee
d560199aa4
SubredditRules: Fix order and alignment of form buttons.
2016-01-25 13:17:24 -08:00
MelissaCole
da92d99b59
Subreddit Rules: Remove reorder subreddit rules
2016-01-25 13:17:24 -08:00
MelissaCole
af97717044
Subreddit Rules: Remove api documentation
2016-01-25 13:17:24 -08:00
Matt Lee
a63bccc686
SubredditRules: Make report form more consistent with share form.
2016-01-25 13:05:49 -08:00
Matt Lee
9c89e4a1f5
SubredditRules: Force-select the radio input when site reason is selected.
2016-01-25 13:05:49 -08:00
Matt Lee
43a53fc493
SubredditRules: Adjust font sizes.
...
Font size for rules is increased. Fixed tiny font size on delete confirmation
and adjusted color and spacing.
2016-01-25 13:05:49 -08:00
Matt Lee
188e760646
SubredditRules: Open the new rule form by default on empty pages.
2016-01-25 13:05:49 -08:00
Matt Lee
2ea5f9b653
SubredditRules: Give icons a bigger hitbox.
2016-01-25 13:05:49 -08:00
MelissaCole
2a6fe3dbea
Add new report form to /subreddits
2016-01-25 13:00:01 -08:00
MelissaCole
72e4f4657d
Subreddit rules: Don't feature flag mod note
2016-01-25 12:59:22 -08:00
umbrae
09b0ed0895
Edit subreddit rules: no ES6 function definitions
...
This breaks uglify despite working unminified
2016-01-25 12:59:14 -08:00
MelissaCole
197caa9850
Fix isinstance check
2016-01-25 12:58:03 -08:00
MelissaCole
2036aced15
Subreddit Rules: Support ReportForm for Messages
...
Messages don't have a subreddit so this was failing. Only attempt
to get subreddit rules for comments and links.
2016-01-25 12:58:03 -08:00
MelissaCole
7fe7068daa
Feature flag ban reason
2016-01-25 12:58:03 -08:00
MelissaCole
e0ece48432
Feature flag rules page menu item
2016-01-25 12:58:03 -08:00
MelissaCole
501d53a702
Refactor subreddit rules validators and strip whitespace
2016-01-25 12:58:03 -08:00
Matt Lee
281ec4b0d3
SubredditRules: Fix new rule models being uneditable.
2016-01-25 12:58:03 -08:00
Matt Lee
ccbd55d2af
SubredditRules: Style subreddit report form.
2016-01-25 12:58:03 -08:00