remove liked/disliked/saved bookmarklets and update modhash error handling

This commit is contained in:
spez
2009-03-03 10:34:07 -08:00
parent 92380dc9bd
commit 6ec183752a
2 changed files with 12 additions and 8 deletions

View File

@@ -121,9 +121,14 @@ def noresponse(*simple_vals, **param_vals):
c.response_content_type = 'application/json; charset=UTF-8'
jquery = JQueryResponse()
validate(*simple_vals, **param_vals)(fn)(self, *a, **env)
return self.response_func()
try:
kw = _make_validated_kw(fn, simple_vals, param_vals, env)
fn(self, *a, **kw)
return ''
except UserRequiredException:
jquery = JQueryResponse()
jquery.refresh()
return self.response_func(**dict(list(jquery)))
return newfn
return val
@@ -162,12 +167,12 @@ def validatedForm(*simple_vals, **param_vals):
return self.response_func(**dict(list(jquery)))
except UserRequiredException:
return self.ajax_login_redirect("/")
jquery = JQueryResponse()
jquery.refresh()
return self.response_func(**dict(list(jquery)))
return newfn
return val
#### validators ####
class nop(Validator):
def run(self, x):

View File

@@ -984,8 +984,7 @@ class Socialite(Wrapped):
class Bookmarklets(Wrapped):
"""The bookmarklets page."""
def __init__(self, buttons=["reddit", "like", "dislike",
"save", "serendipity!"]):
def __init__(self, buttons=["reddit", "serendipity!"]):
Wrapped.__init__(self, buttons = buttons)