Show error message in TB when iframes support is turned off in the browser, props nacin, fixes #10939
git-svn-id: http://svn.automattic.com/wordpress/trunk@12677 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
70c195833c
commit
1fd65dfefb
|
@ -40,7 +40,7 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic
|
|||
jQuery("body","html").css({height: "100%", width: "100%"});
|
||||
jQuery("html").css("overflow","hidden");
|
||||
if (document.getElementById("TB_HideSelect") === null) {//iframe to hide select elements in ie6
|
||||
jQuery("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");
|
||||
jQuery("body").append("<iframe id='TB_HideSelect'>"+thickboxL10n.noiframes+"</iframe><div id='TB_overlay'></div><div id='TB_window'></div>");
|
||||
jQuery("#TB_overlay").click(tb_remove);
|
||||
}
|
||||
}else{//all others
|
||||
|
@ -198,10 +198,10 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic
|
|||
urlNoQuery = url.split('TB_');
|
||||
jQuery("#TB_iframeContent").remove();
|
||||
if(params['modal'] != "true"){//iframe no modal
|
||||
jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='"+thickboxL10n.close+"'><img src='" + tb_closeImage + "' /></a></div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;' > </iframe>");
|
||||
jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='"+thickboxL10n.close+"'><img src='" + tb_closeImage + "' /></a></div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;' >"+thickboxL10n.noiframes+"</iframe>");
|
||||
}else{//iframe modal
|
||||
jQuery("#TB_overlay").unbind();
|
||||
jQuery("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;'> </iframe>");
|
||||
jQuery("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;'>"+thickboxL10n.noiframes+"</iframe>");
|
||||
}
|
||||
}else{// not an iframe, ajax
|
||||
if(jQuery("#TB_window").css("display") != "block"){
|
||||
|
|
|
@ -165,7 +165,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
$scripts->add( 'jquery-table-hotkeys', "/wp-includes/js/jquery/jquery.table-hotkeys$suffix.js", array('jquery', 'jquery-hotkeys'), '20090102' );
|
||||
$scripts->add_data( 'jquery-table-hotkeys', 'group', 1 );
|
||||
|
||||
$scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20091124');
|
||||
$scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20100108');
|
||||
$scripts->add_data( 'thickbox', 'group', 1 );
|
||||
$scripts->localize( 'thickbox', 'thickboxL10n', array(
|
||||
'next' => __('Next >'),
|
||||
|
@ -173,6 +173,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
'image' => __('Image'),
|
||||
'of' => __('of'),
|
||||
'close' => __('Close'),
|
||||
'noiframes' => __('This feature requires inline frames. You have iframes disabled or your browser does not support them.'),
|
||||
'l10n_print_after' => 'try{convertEntities(thickboxL10n);}catch(e){};'
|
||||
) );
|
||||
|
||||
|
|
Loading…
Reference in New Issue