mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-25 14:58:27 -05:00
Fix voting when template_debug=true.
Remove leading/trailing whitespace from thing_css_class for printables. Fixes #85.
This commit is contained in:
@@ -331,7 +331,7 @@ $.fn.thing_id = function(class_filter) {
|
||||
t = t.find("." + class_filter + ":first");
|
||||
}
|
||||
if(t.length) {
|
||||
var id = $.grep(t.get(0).className.split(' '),
|
||||
var id = $.grep(t.get(0).className.match(/\S+/g),
|
||||
function(i) { return i.match(/^id-/); });
|
||||
return (id.length) ? id[0].slice(3, id[0].length) : "";
|
||||
}
|
||||
|
||||
@@ -45,9 +45,7 @@ ${self.RenderPrintable()}
|
||||
%endif
|
||||
</%def>
|
||||
|
||||
<%def name="thing_css_class(what)">
|
||||
thing id-${what._fullname}
|
||||
</%def>
|
||||
<%def name="thing_css_class(what)">thing id-${what._fullname}</%def>
|
||||
|
||||
<%def name="RenderPrintable()">
|
||||
<% cls = thing.lookups[0].__class__.__name__.lower() %>
|
||||
|
||||
Reference in New Issue
Block a user