Commits

Anonymous committed f1fc955

Got it working with the existing project - now time to modularize, and turn the JavaScript into a jQuery plugin.

Comments (0)

Files changed (2)

src/ajaxcomments/media/img/ajax-wait.gif

Added
New image

src/ajaxcomments/media/js/comment-post.js

     commentBusy = false;
 });
 
-function commentAjax() {
+function commentAjax(media) {
+    // TODO: if the media variable ends in a forward slash, remove it.
+    
     $('div.comment-error').remove();
     
     if (commentBusy) {
    
     // Add a wait animation
     $('input.submit-post').after('\
-        <img src="/static/adoleo/img/ajax-loader.gif" alt="Please wait..."\
+        <img src="' + media + '/img/ajax-wait.gif" alt="Please wait..."\
             class="ajax-loader" />\
     ');