summaryrefslogtreecommitdiff
path: root/sphinx/themes/basic/static/websupport.js
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-11-21 08:25:43 +0100
committerGeorg Brandl <georg@python.org>2010-11-21 08:25:43 +0100
commit7e3f9d866a8d0d57c13a6e66329c17509e26229a (patch)
tree6e3cca843a911d3498e568aa2f3faf197f0543f3 /sphinx/themes/basic/static/websupport.js
parentdae3933e87edad48dd0b03cb308345daba2db6a2 (diff)
downloadsphinx-git-7e3f9d866a8d0d57c13a6e66329c17509e26229a.tar.gz
Fix a few smaller issues. Add JS and CSS for all pages.
Diffstat (limited to 'sphinx/themes/basic/static/websupport.js')
-rw-r--r--sphinx/themes/basic/static/websupport.js16
1 files changed, 11 insertions, 5 deletions
diff --git a/sphinx/themes/basic/static/websupport.js b/sphinx/themes/basic/static/websupport.js
index ac87c3e2c..d04336eaa 100644
--- a/sphinx/themes/basic/static/websupport.js
+++ b/sphinx/themes/basic/static/websupport.js
@@ -253,6 +253,8 @@
ul.data('empty', false);
}
insertComment(data.comment);
+ var ao = $('#ao' + (node_id || parent_id));
+ ao.find('img').attr({'src': opts.commentBrightImage});
},
error: function(request, textStatus, error) {
form.find('textarea,input').removeAttr('disabled');
@@ -598,7 +600,7 @@
function showError(message) {
$(document.createElement('div')).attr({'class': 'popup-error'})
.append($(document.createElement('div'))
- .attr({'class': 'error-header'}).text(message))
+ .attr({'class': 'error-message'}).text(message))
.appendTo('body')
.fadeIn("slow")
.delay(2000)
@@ -651,7 +653,7 @@
});
};
- var opts = jQuery.extend({
+ var opts = {
processVoteURL: '/_process_vote',
addCommentURL: '/_add_comment',
getCommentsURL: '/_get_comments',
@@ -668,7 +670,11 @@
downArrowPressed: '/static/_static/down-pressed.png',
voting: false,
moderator: false
- }, COMMENT_OPTIONS);
+ };
+
+ if (typeof COMMENT_OPTIONS != "undefined") {
+ opts = jQuery.extend(opts, COMMENT_OPTIONS);
+ }
var replyTemplate = '\
<li>\
@@ -683,7 +689,7 @@
</li>';
var commentTemplate = '\
- <div id="cd<%id%>" class="spxcdiv">\
+ <div id="cd<%id%>" class="sphinx-comment-div">\
<div class="vote">\
<div class="arrow">\
<a href="#" id="uv<%id%>" class="vote">\
@@ -769,7 +775,7 @@
})(jQuery);
$(document).ready(function() {
- $('.spxcmt').comment();
+ $('.sphinx-has-comment').comment();
/** Highlight search words in search results. */
$("div.context").each(function() {