Commit Graph

5374 Commits

Author SHA1 Message Date
Brian Simpson
b3bf278cb3 authorize: Delete unused ShippingAddress stuff. 2015-02-02 16:58:24 -05:00
Matt Lee
0b0872743f selfserve: Fix sponsor domain override .
When the new promo form went from being a normal ajax call to a multipart form, it
stopped using the 'post_pseudo_form' method.  That method ignored inputs with the
'gray' class applied, which was being used for displaying the 'optional' placeholder
string.  This was probably created before there was widespread support for the
placeholder html attribute.
2015-01-30 11:59:31 -08:00
Matt Lee
ad99451f63 markdown: Update markdown styles.
+ Add horizontal padding to gold-highlighted comments
+ Restore blockquote indent
+ Darken blockquote and del element text
+ Darken blockquote border and hr element
+ Increase font size of reply textarea to match comment font size
+ Fix alignment of messages
+ Restore green text to sent modmail
+ Fix code elements having a much smaller font size in Chrome
+ Increase left spacing on lists to prevent ol list numbers from being cropped.
+ Make code blocks have white background when on non-white backgrounds.

Conflicts:
	r2/r2/public/static/css/markdown.less
2015-01-30 11:59:06 -08:00
Brian Simpson
f558033c96 selfserve: Allow thumbnail upload on new_promo page.
Add the POST_create_promo endpoint and validator for posting a multipart form.  The
form is posted to a hidden iframe on the page, which then relays the jquery response
back to the parent frame.
2015-01-30 11:57:21 -08:00
Brian Simpson
4db92f5b73 promotecontroller: clean up POST_link_thumb. 2015-01-30 11:57:20 -08:00
Matt Lee
3fca431e3c markdown: Swap feature flags to enable access to old markdown styles. 2015-01-30 11:56:38 -08:00
Matt Lee
29df0ad506 selfserve: Return to first page when changing sort on sponsor/promoted/ listing.
Currently, if you navigate to the second page of links then change the sort type, you'll
get no results back.  This is because it is carrying over the 'after' query param.  This
drops the query params for all of the sort options _except_ the one you are currently
on, so that changing it will always kick you back to page 1.
2015-01-30 11:55:56 -08:00
Matt Lee
04363d781a selfserve: Change 'bid' to 'spend' on edit_promo page.
from Dylan:

We haven't used "bids" for 18 months or so, can probably substitute "Spend History" and
"Spend" in place of the two instances of bid. Doesn't really matter for people that are
familiar with the system, but as we bring new people on it may be confusing.
2015-01-30 11:55:40 -08:00
Matt Lee
8e654fbb89 Add es5-sham to reddit-init-legacy.
es5-shim only adds polyfills for es5 methods whose behavior can be faithfully
emulated in legacy javascript engines.  es5-sham adds stubs and partial support
for additional es5 methods (e.g. Object.freeze) with the goal of preventing
runtime errors.

react-with-addons.js uses some of these methods, and as such breaks on old IE.
The 'shams' work perfectly fine for it.
2015-01-30 11:55:00 -08:00
Chad Birch
fef95e3642 Highlight new comments: enable for mods 2015-01-30 12:42:46 -07:00
Chad Birch
3216377cbc Comment limit: allow mods to use reddit gold limit 2015-01-30 12:42:38 -07:00
angrypotato1
4a90ec013f Add a link to sidebar in .compact header. 2015-01-30 14:36:02 -05:00
Michele
83a58d5a34 /api/morechildren is now a GET 2015-01-30 10:03:59 -08:00
MelissaCole
d000b421a5 Use account object for cancel_stripe_subscription 2015-01-30 09:54:48 -08:00
Neil Williams
a42ff99c52 vote: Stop dual-writing to postgres.
This is the final step in the saga of the pg vote rel destruction. We've
been dual-writing to PG and C* while gaining confidence in the pure-C*
model being able to survive full load.  This kills the pgvote databases
and moves forward in a pure-cassandra world for votes which should save
us considerable operational headaches.  After rolling this out, we can
not switch back without considerable effort.

When he reached the New World, Cortez burned his relational databases.
As a result his queue processors were well motivated.
2015-01-29 12:15:31 -08:00
MelissaCole
1470b29b6b Pass account obj to cancel_stripe_subscr 2015-01-29 11:20:21 -08:00
powerlanguage
ec0e5a89a4 Simplify contact page. 2015-01-29 11:19:31 -08:00
powerlanguage
6f06e5af82 Update jobs link in footer. 2015-01-29 11:19:24 -08:00
MelissaCole
a6721055d3 Cancel subscription or warn on account delete
If a user has a Stripe subscription, we can delete the customer when the
account is deleted. If there's a paypal subscription, a link to paypal will
be shown to remind the user to cancel the subscription.
2015-01-29 11:19:16 -08:00
Keith Mitchell
b57d0679df HSTS redirects: Avoid redirecting with extensions 2015-01-28 16:15:40 -08:00
Brian Simpson
85f79ef889 PromoteReport: optionally group by date. 2015-01-27 05:06:11 -05:00
Brian Simpson
a2945ff64d Add campaign summary table to sponsor view of review listings.
Previously sponsors had to go to the edit_promo page for each link
they were reviewing. Adding the summary table to the link listing
shows them all the information they need to accept or reject the ad.
2015-01-27 01:43:41 -05:00
Neil Williams
387aca5af3 Remove search feedback feature.
It is currently unused and is one of the remaining hardcache clients.
2015-01-26 12:53:13 -08:00
Neil Williams
3aeeb42c07 vote: Start reading from C* for vote_q processing.
This cuts primary reads over to VoteDetailsBy{Link,Comment} instead of
Postgres for determining if the vote being processed is overwriting a
previous vote or not.

Postgres is kept up to date in case we need to fall back.
2015-01-26 12:53:13 -08:00
MelissaCole
4176f33021 Account for no secret in reverse_gold_purchase
Secret was removed for recurring Stripe calls. To see if it's a recurring
subscription, we can see if a subscr_id exists.
2015-01-23 11:30:50 -08:00
Chad Birch
88a05fd3d2 Ban page: add note about message and unhide fields 2015-01-23 10:38:16 -08:00
Chad Birch
52b4be0749 Prevent ban with custom message that will not send
A user will only be sent a ban notification if either of the following
is true:

1. they are subscribed to the subreddit
2. they have ever gained or lost karma (of any type) in the subreddit

Because of these conditions, there is some confusion in cases where
moderators ban someone that has made a post that didn't yet receive any
votes, where they still expect the user to receive a ban message and be
able to see the reason for the ban that they requested to include in it.

This commit makes it so that including a custom reason is not possible
in a case where the message won't actually be sent, to prevent that
confusion.
2015-01-23 10:38:04 -08:00
Chad Birch
214445df8f Exempt admins from subreddit image upload limit 2015-01-23 10:37:58 -08:00
Chad Birch
dcd25c1cca Remove GET_bookmarklet endpoint 2015-01-23 10:37:49 -08:00
MelissaCole
a6cfd627e0 Clear secret if subscr_id already exists
Currently all subscriptions (new or recurring) have a secret (autorenew-).
To make it easier to find which type of payment it is, this will clear the
secret if this is a recurring subscription (which is the same structure
paypal takes).
2015-01-22 14:05:28 -08:00
MelissaCole
ee0682ad26 Fix stripe secret being nulled when renewed 2015-01-22 14:05:23 -08:00
MelissaCole
8ef7766336 Add customer.card.updated to event type (noop) 2015-01-22 14:05:17 -08:00
Brian Simpson
45bc8b09f5 modlog: Fix showing of subreddit name when in a multireddit. 2015-01-22 15:13:35 -05:00
Brian Simpson
dbb7935bf8 Enable per-user global selfserve cpm override.
Setting Account.selfserve_cpm_override_pennies will let the user create
campaigns with ANY targeting at that price.
2015-01-22 15:13:24 -05:00
Brian Simpson
a6c1d2e81f Allow custom pricing for location targets. 2015-01-22 15:13:20 -05:00
Brian Simpson
df8f3e4ccc PromotionWeights.add: Use map not filter to fix names. 2015-01-17 02:27:54 -05:00
Brian Simpson
b38a087072 PromotionWeights: improve object creation and deletion. 2015-01-17 02:27:45 -05:00
Brian Simpson
4c37d92bbe Clarify wording when a user initiates a thumbnail rescrape.
Previously it could seem like the browser will get notified when complete.
2015-01-16 03:23:24 -05:00
umbrae
7bed81dece Inbox counts: Remove live alter of unread count when mark-on-open is off
This is a good interaction in theory, but gets pretty hairy to test for
in practice due to modmail being a subset of messages as well as
subreddit messages not being restricted to modmail. This issue is
blocking release, so remove the buggy feature for rollout to be addressed
at a later date.
2015-01-16 12:03:29 -08:00
umbrae
5a1051a267 Make NSFL in link titles also denote over18. 2015-01-16 12:03:23 -08:00
Brian Simpson
232563ee22 Report hourly unique clicks. 2015-01-16 01:48:41 -05:00
Keith Mitchell
f58b70fa25 LabeledMulti: Age-normalized hot
Update normalized_hot to allow certain LabeledMultis
to specify slightly different weighting between subreddits
compared to the current algorithm.

Current merge algorithm always results in an N-subreddit multi
having the first N results being the #1 result from each of
the individual subreddits; this is not always ideal for slow
subreddits (e.g., /r/announcements and /r/blog).

Age-weighting allows a LabeledMulti to scale those older posts
further down the list, and lets them drop off after a number of
days.

The age-weighting will require a change to the use of sgm
in normalized_hot prior to full deployment, as the calculated
ehot values are no longer global amongst all users.
2015-01-16 11:41:41 -08:00
Brian Simpson
1c8a27121a Preserve the originally attempted url and subreddit when resubmitting a link. 2015-01-16 01:21:32 -05:00
Jordan Milne
bb0f5b552c Replace ad-hoc HTML templating with format_html() and _wsf()
Conflicts:
	r2/r2/templates/prefoptions.html
2015-01-16 00:29:59 -08:00
Jordan Milne
d8d0e46b95 Add format_html and format_html_join and _wsf
These functions should make it easier to do ad-hoc HTML templating
correctly.
2015-01-16 00:25:43 -08:00
Jordan Milne
b4bce39902 Rename mako_websafe to the more descriptive conditional_websafe 2015-01-16 00:25:28 -08:00
MelissaCole
e7d2d1806c Clear secret for recurring subscription payments 2015-01-15 14:17:40 -08:00
Keith Mitchell
61850e958a OAuth2: Validate OAuth2Client owner of refresh_tokens 2015-01-15 14:07:17 -08:00
Keith Mitchell
49dd4209da OAuth2: Expose leavemoderator, leavecontributor, accept_mod 2015-01-15 11:15:45 -08:00
Keith Mitchell
fb66af7c3b /dev/api: Remove api_section.apps
Programmatic use of OAuth developer management is discouraged
2015-01-15 11:15:35 -08:00