]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - js/util.js
Added missing '>'
[quix0rs-gnu-social.git] / js / util.js
index 79fd40debac308343a840e9c6c08c9785fe2554d..29b33097b18f771ab35a15dc68d091b895d8d99a 100644 (file)
@@ -84,7 +84,7 @@ var SN = { // StatusNet
                 form.find('#'+SN.C.S.NoticeTextCount).text(jQuery.data(form[0], 'ElementData').MaxLength);
             }
 
-            if ($('body')[0].id != 'conversation' && window.location.hash.length === 0) {
+            if ($('body')[0].id != 'conversation' && window.location.hash.length === 0 && $(window).scrollTop() == 0) {
                 form.find('textarea').focus();
             }
         },
@@ -401,9 +401,11 @@ var SN = { // StatusNet
 
             var attachment_more = notice.find('.attachment.more');
             if (attachment_more.length > 0) {
-                attachment_more.click(function() {
-                    $.get($(this).attr('href')+'/ajax', null, function(data) {
-                        notice.find('.entry-title .entry-content').html($(data).find('#attachment_view .entry-content').html());
+                $(attachment_more[0]).click(function() {
+                    var m = $(this);
+                    m.addClass(SN.C.S.Processing);
+                    $.get(m.attr('href')+'/ajax', null, function(data) {
+                        m.parent('.entry-content').html($(data).find('#attachment_view .entry-content').html());
                     });
 
                     return false;