Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix tabbing issue. update space compression in api to stop extraneous…

… space removal.
  • Loading branch information...
commit 427c1ca74c0239d8a9e9960fd060c46cff315313 1 parent deeb9eb
Christopher Slowe authored
View
8 r2/r2/lib/jsontemplates.py
@@ -50,13 +50,13 @@ def __init__(self, d):
def update(self, kw):
def _update(obj):
if isinstance(obj, (str, unicode)):
- return spaceCompress(StringTemplate(obj).finalize(kw))
+ return StringTemplate(obj).finalize(kw)
elif isinstance(obj, dict):
return dict((k, _update(v)) for k, v in obj.iteritems())
elif isinstance(obj, (list, tuple)):
return map(_update, obj)
elif isinstance(obj, CacheStub) and kw.has_key(obj.name):
- return kw[obj.name]
+ return spaceCompress(kw[obj.name])
else:
return obj
res = _update(self.d)
@@ -238,7 +238,7 @@ def thing_attr(self, thing, attr):
except AttributeError:
return make_fullname(Link, thing.link_id)
elif attr == "body_html":
- return safemarkdown(thing.body)
+ return spaceCompress(safemarkdown(thing.body))
return ThingJsonTemplate.thing_attr(self, thing, attr)
def kind(self, wrapped):
@@ -326,8 +326,6 @@ def thing_attr(self, thing, attr):
for a in thing.things:
a.childlisting = False
r = a.render()
- if isinstance(r, str):
- r = spaceCompress(r)
res.append(r)
return res
return ThingJsonTemplate.thing_attr(self, thing, attr)
View
2  r2/r2/templates/printablebuttons.html
@@ -228,7 +228,7 @@
css_class, alt_css_class = alt_css_class, css_class
%>
<span class="${class_name} toggle" style="${style}">
- <a class="option active ${css_class}" href="#"
+ <a class="option active ${css_class}" href="#" tabindex="100"
%if login_required and not c.user_is_loggedin:
onclick="return showcover('', '${callback}_' + $(this).thing_id());"
%else:
Please sign in to comment.
Something went wrong with that request. Please try again.