Silence error if TB iframe is loaded from another domain, see #6883

git-svn-id: https://develop.svn.wordpress.org/trunk@12634 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2010-01-07 05:55:26 +00:00
parent 7196d7fbe8
commit 74ae03486d
3 changed files with 11 additions and 6 deletions
+9 -4
View File
@@ -25,8 +25,11 @@ function fileQueued(fileObj) {
}
function uploadStart(fileObj) {
if ( typeof topWin.tb_remove != 'undefined' )
topWin.jQuery('#TB_overlay').unbind('click', topWin.tb_remove);
try {
if ( typeof topWin.tb_remove != 'undefined' )
topWin.jQuery('#TB_overlay').unbind('click', topWin.tb_remove);
} catch(e){}
return true;
}
@@ -46,8 +49,10 @@ function prepareMediaItem(fileObj, serverData) {
jQuery('.bar', item).remove();
jQuery('.progress', item).hide();
if ( typeof topWin.tb_remove != 'undefined' )
topWin.jQuery('#TB_overlay').click(topWin.tb_remove);
try {
if ( typeof topWin.tb_remove != 'undefined' )
topWin.jQuery('#TB_overlay').click(topWin.tb_remove);
} catch(e){}
// Old style: Append the HTML returned by the server -- thumbnail and form inputs
if ( isNaN(serverData) || !serverData ) {
File diff suppressed because one or more lines are too long