Permalink
Browse files

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

… space removal.
  • Loading branch information...
1 parent deeb9eb commit 427c1ca74c0239d8a9e9960fd060c46cff315313 Christopher Slowe committed Jul 7, 2009
Showing with 4 additions and 6 deletions.
  1. +3 −5 r2/r2/lib/jsontemplates.py
  2. +1 −1 r2/r2/templates/printablebuttons.html
@@ -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)
@@ -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:

0 comments on commit 427c1ca

Please sign in to comment.