X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=js%2Futil.js;h=b645e8b0298aa1dc0d5e218acac82f979f02aa6e;hb=63ab20d20bfe2985402f7f66c3679bcb36e497e8;hp=29650b1a4d4007c50d430c12fe668e9b602ffdb7;hpb=44c10bb2aafb31aa54cda53c6ef9af85bb4fbf80;p=quix0rs-gnu-social.git diff --git a/js/util.js b/js/util.js index 29650b1a4d..b645e8b029 100644 --- a/js/util.js +++ b/js/util.js @@ -57,6 +57,7 @@ var SN = { // StatusNet }, V: { // Variables + // These get set on runtime via inline scripting, so don't put anything here. }, /** @@ -358,7 +359,7 @@ var SN = { // StatusNet form.ajaxForm({ dataType: 'xml', - timeout: '60000', + timeout: SN.V.xhrTimeout, beforeSend: function (formData) { if (form.find('.notice_data-text:first').val() == '') { form.addClass(SN.C.S.Warning); @@ -847,27 +848,29 @@ var SN = { // StatusNet NDA.change(function (event) { form.find('.attach-status').remove(); - var filename = $(this).val(); - if (!filename) { - // No file -- we've been tricked! - return false; - } - - var attachStatus = $('
' + file.name + '
'));
var img = $('')
.attr('title', tooltip)
.attr('alt', tooltip)
.attr('src', url)
.attr('style', 'height: 120px');
- form.find('.attach-status').append(img);
+ fileentry.append(img);
+ form.find('.attach-status').append(fileentry);
});
} else {
var img = $('').text(tooltip);