readd modal focuser

This commit is contained in:
Jacob Mason
2010-08-13 14:32:30 -05:00
parent 3717927c83
commit 642cfd08aa
2 changed files with 7 additions and 2 deletions
@@ -94,4 +94,5 @@
<ul id="comment_ul"></ul>
</div>
</div>
<div id="focuser"></div>
</div>
+6 -2
View File
@@ -110,9 +110,11 @@
popup = $(renderTemplate(popupTemplate, opts));
popup.find('textarea').autogrow();
commentTemplate = loadTemplate('#comment_template');
replyTemplate = loadTemplate('#reply_template');
commentTemplate = loadTemplate('comment_template');
replyTemplate = loadTemplate('reply_template');
var focuser = templates.find('#focuser');
$('body').append(popup);
$('body').append(focuser);
initEvents();
});
};
@@ -156,6 +158,7 @@
// Position the popup and show it.
var clientWidth = document.documentElement.clientWidth;
var popupWidth = $('div.popup_comment').width();
$('div#focuser').fadeIn('fast');
$('div.popup_comment')
.css({
'top': 100 + $(window).scrollTop(),
@@ -171,6 +174,7 @@
Hide the comments popup window.
*/
function hide() {
$('div#focuser').fadeOut('fast');
$('div.popup_comment').fadeOut('fast', function() {
$('ul#comment_ul').empty();
$('h3#comment_notification').show();