"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Upload/jscripts/post.js" between
mybb_1821.zip and mybb_1822.zip

About: MyBB is a multilingual, standards-compliant and free forum (discussion board) software.

post.js  (mybb_1821):post.js  (mybb_1822)
skipping to change at line 72 skipping to change at line 72
{ {
$.each(json.errors, function(i, message) $.each(json.errors, function(i, message)
{ {
$.jGrowl(lang.post_fetch_error + ' ' + me ssage, {theme:'jgrowl_error'}); $.jGrowl(lang.post_fetch_error + ' ' + me ssage, {theme:'jgrowl_error'});
}); });
return false; return false;
} }
} }
var id = 'message'; var id = 'message';
if(typeof $('textarea').sceditor != 'undefined') if(typeof MyBBEditor !== 'undefined' && MyBBEditor !== null)
{ {
$('textarea').sceditor('instance').insert(json.message); MyBBEditor.insert(json.message);
} }
else else
{ {
if($('#' + id).value) if($('#' + id).value)
{ {
$('#' + id).value += "\n"; $('#' + id).value += "\n";
} }
$('#' + id).val($('#' + id).val() + json.message); $('#' + id).val($('#' + id).val() + json.message);
} }
skipping to change at line 134 skipping to change at line 134
$.each(data.error s, function(i, message) $.each(data.error s, function(i, message)
{ {
$.jGrowl( lang.post_fetch_error + ' ' + message, {theme:'jgrowl_error'}); $.jGrowl( lang.post_fetch_error + ' ' + message, {theme:'jgrowl_error'});
}); });
return false; return false;
} }
else if (data.success) else if (data.success)
{ {
$('#attachment_'+ aid).hide(500, function() $('#attachment_'+ aid).hide(500, function()
{ {
var insta
nce = MyBBEditor;
if(typeof
MyBBEditor === 'undefined') {
i
nstance = $('#message').sceditor('instance');
}
if(instan
ce.sourceMode())
{
i
nstance.setSourceEditorValue(instance.getSourceEditorValue(false).split('[attach
ment=' + aid + ']').join(''));
} else {
i
nstance.setWysiwygEditorValue(instance.getWysiwygEditorValue(false).split('[atta
chment=' + aid + ']').join(''));
}
$(this).r emove(); $(this).r emove();
}); });
} }
} }
}); });
} }
} }
}); });
return false; return false;
 End of changes. 3 change blocks. 
2 lines changed or deleted 22 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)