git-svn-id: http://svn.automattic.com/wordpress/trunk@14030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1c109009c8
commit
46a353ece7
|
@ -22,6 +22,8 @@ jQuery(document).ready(function($) {
|
|||
};
|
||||
|
||||
thickDims().click( function() {
|
||||
tb_click.call(this);
|
||||
|
||||
$('#TB_title').css({'background-color':'#222','color':'#cfcfcf'});
|
||||
$('#TB_ajaxWindowTitle').html('<strong>' + plugininstallL10n.plugin_information + '</strong> ' + $(this).attr('title') );
|
||||
return false;
|
||||
|
|
|
@ -1 +1 @@
|
|||
jQuery(document).ready(function(b){var a=function(){var f=b("#TB_window"),e=b(window).width(),d=b(window).height(),c=(720<e)?720:e;if(f.size()){f.width(c-50).height(d-45);b("#TB_iframeContent").width(c-50).height(d-75);f.css({"margin-left":"-"+parseInt(((c-50)/2),10)+"px"});if(!(b.browser.msie&&b.browser.version.substr(0,1)<7)){f.css({top:"20px","margin-top":"0"})}}return b("#dashboard_plugins a.thickbox, .plugins a.thickbox").each(function(){var g=b(this).attr("href");if(!g){return}g=g.replace(/&width=[0-9]+/g,"");g=g.replace(/&height=[0-9]+/g,"");b(this).attr("href",g+"&width="+(c-80)+"&height="+(d-85))})};a().click(function(){b("#TB_title").css({"background-color":"#222",color:"#cfcfcf"});b("#TB_ajaxWindowTitle").html("<strong>"+plugininstallL10n.plugin_information+"</strong> "+b(this).attr("title"));return false});b("#plugin-information #sidemenu a").click(function(){var c=b(this).attr("name");b("#plugin-information-header a.current").removeClass("current");b(this).addClass("current");b("#section-holder div.section").hide();b("#section-"+c).show();return false});b('#install-plugins .action-links .install-now').click(function(){return confirm( plugininstallL10n.ays);});});
|
||||
jQuery(document).ready(function($){var thickDims=function(){var tbWindow=$("#TB_window"),width=$(window).width(),H=$(window).height(),W=(720<width)?720:width;if(tbWindow.size()){tbWindow.width(W-50).height(H-45);$("#TB_iframeContent").width(W-50).height(H-75);tbWindow.css({"margin-left":"-"+parseInt(((W-50)/2),10)+"px"});if(!($.browser.msie&&$.browser.version.substr(0,1)<7)){tbWindow.css({top:"20px","margin-top":"0"})}}return $("#dashboard_plugins a.thickbox, .plugins a.thickbox").each(function(){var href=$(this).attr("href");if(!href){return}href=href.replace(/&width=[0-9]+/g,"");href=href.replace(/&height=[0-9]+/g,"");$(this).attr("href",href+"&width="+(W-80)+"&height="+(H-85))})};thickDims().click(function(){tb_click.call(this);$("#TB_title").css({"background-color":"#222",color:"#cfcfcf"});$("#TB_ajaxWindowTitle").html("<strong>"+plugininstallL10n.plugin_information+"</strong> "+$(this).attr("title"));return false});$("#plugin-information #sidemenu a").click(function(){var tab=$(this).attr("name");$("#plugin-information-header a.current").removeClass("current");$(this).addClass("current");$("#section-holder div.section").hide();$("#section-"+tab).show();return false});$("#install-plugins .action-links .install-now").click(function(){return confirm(plugininstallL10n.ays)})});
|
|
@ -21,6 +21,8 @@ jQuery(document).ready(function($) {
|
|||
$(window).resize( function() { thickDims() } );
|
||||
|
||||
$('a.thickbox-preview').click( function() {
|
||||
tb_click.call(this);
|
||||
|
||||
var alink = $(this).parents('.available-theme').find('.activatelink'), link = '', href = $(this).attr('href'), url, text;
|
||||
|
||||
if ( tbWidth = href.match(/&tbWidth=[0-9]+/) )
|
||||
|
@ -48,6 +50,7 @@ jQuery(document).ready(function($) {
|
|||
|
||||
$('#TB_iframeContent').width('100%');
|
||||
thickDims();
|
||||
|
||||
return false;
|
||||
} );
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
var thickDims,tbWidth,tbHeight;jQuery(document).ready(function(a){thickDims=function(){var f=a("#TB_window"),d=a(window).height(),b=a(window).width(),c,e;c=(tbWidth&&tbWidth<b-90)?tbWidth:b-90;e=(tbHeight&&tbHeight<d-60)?tbHeight:d-60;if(f.size()){f.width(c).height(e);a("#TB_iframeContent").width(c).height(e-27);f.css({"margin-left":"-"+parseInt((c/2),10)+"px"});if(typeof document.body.style.maxWidth!="undefined"){f.css({top:"30px","margin-top":"0"})}}};thickDims();a(window).resize(function(){thickDims()});a("a.thickbox-preview").click(function(){var d=a(this).parents(".available-theme").find(".activatelink"),e="",b=a(this).attr("href"),c,f;if(tbWidth=b.match(/&tbWidth=[0-9]+/)){tbWidth=parseInt(tbWidth[0].replace(/[^0-9]+/g,""),10)}else{tbWidth=a(window).width()-90}if(tbHeight=b.match(/&tbHeight=[0-9]+/)){tbHeight=parseInt(tbHeight[0].replace(/[^0-9]+/g,""),10)}else{tbHeight=a(window).height()-60}if(d.length){c=d.attr("href")||"";f=d.attr("title")||"";e=' <a href="'+c+'" target="_top" class="tb-theme-preview-link">'+f+"</a>"}else{f=a(this).attr("title")||"";e=' <span class="tb-theme-preview-link">'+f+"</span>"}a("#TB_title").css({"background-color":"#222",color:"#dfdfdf"});a("#TB_closeAjaxWindow").css({"float":"left"});a("#TB_ajaxWindowTitle").css({"float":"right"}).html(e);a("#TB_iframeContent").width("100%");thickDims();return false});a(".theme-detail").click(function(){a(this).siblings(".themedetaildiv").toggle();return false})});
|
||||
var thickDims,tbWidth,tbHeight;jQuery(document).ready(function($){thickDims=function(){var tbWindow=$("#TB_window"),H=$(window).height(),W=$(window).width(),w,h;w=(tbWidth&&tbWidth<W-90)?tbWidth:W-90;h=(tbHeight&&tbHeight<H-60)?tbHeight:H-60;if(tbWindow.size()){tbWindow.width(w).height(h);$("#TB_iframeContent").width(w).height(h-27);tbWindow.css({"margin-left":"-"+parseInt((w/2),10)+"px"});if(typeof document.body.style.maxWidth!="undefined"){tbWindow.css({top:"30px","margin-top":"0"})}}};thickDims();$(window).resize(function(){thickDims()});$("a.thickbox-preview").click(function(){tb_click.call(this);var alink=$(this).parents(".available-theme").find(".activatelink"),link="",href=$(this).attr("href"),url,text;if(tbWidth=href.match(/&tbWidth=[0-9]+/)){tbWidth=parseInt(tbWidth[0].replace(/[^0-9]+/g,""),10)}else{tbWidth=$(window).width()-90}if(tbHeight=href.match(/&tbHeight=[0-9]+/)){tbHeight=parseInt(tbHeight[0].replace(/[^0-9]+/g,""),10)}else{tbHeight=$(window).height()-60}if(alink.length){url=alink.attr("href")||"";text=alink.attr("title")||"";link=' <a href="'+url+'" target="_top" class="tb-theme-preview-link">'+text+"</a>"}else{text=$(this).attr("title")||"";link=' <span class="tb-theme-preview-link">'+text+"</span>"}$("#TB_title").css({"background-color":"#222",color:"#dfdfdf"});$("#TB_closeAjaxWindow").css({"float":"left"});$("#TB_ajaxWindowTitle").css({"float":"right"}).html(link);$("#TB_iframeContent").width("100%");thickDims();return false});$(".theme-detail").click(function(){$(this).siblings(".themedetaildiv").toggle();return false})});
|
|
@ -23,14 +23,16 @@ jQuery(document).ready(function(){
|
|||
|
||||
//add thickbox to href & area elements that have a class of .thickbox
|
||||
function tb_init(domChunk){
|
||||
jQuery(domChunk).live('click', function(){
|
||||
jQuery(domChunk).live('click', tb_click);
|
||||
}
|
||||
|
||||
function tb_click(){
|
||||
var t = this.title || this.name || null;
|
||||
var a = this.href || this.alt;
|
||||
var g = this.rel || false;
|
||||
tb_show(t,a,g);
|
||||
this.blur();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link
|
||||
|
|
|
@ -167,7 +167,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
$scripts->add( 'jquery-autocomplete', "/wp-includes/js/jquery/autocomplete$suffix.js", array('jquery'), '1.1' );
|
||||
$scripts->add_data( 'jquery-autocomplete', 'group', 1 );
|
||||
|
||||
$scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20104104');
|
||||
$scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20100407');
|
||||
$scripts->add_data( 'thickbox', 'group', 1 );
|
||||
$scripts->localize( 'thickbox', 'thickboxL10n', array(
|
||||
'next' => __('Next >'),
|
||||
|
@ -337,7 +337,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
'l10n_print_after' => 'try{convertEntities(wordCountL10n);}catch(e){};'
|
||||
));
|
||||
|
||||
$scripts->add( 'theme-preview', "/wp-admin/js/theme-preview$suffix.js", array( 'thickbox', 'jquery' ), '20090319' );
|
||||
$scripts->add( 'theme-preview', "/wp-admin/js/theme-preview$suffix.js", array( 'thickbox', 'jquery' ), '20100407' );
|
||||
$scripts->add_data( 'theme-preview', 'group', 1 );
|
||||
|
||||
$scripts->add( 'inline-edit-post', "/wp-admin/js/inline-edit-post$suffix.js", array( 'jquery', 'suggest' ), '20091202' );
|
||||
|
@ -356,7 +356,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
'l10n_print_after' => 'try{convertEntities(inlineEditL10n);}catch(e){};'
|
||||
) );
|
||||
|
||||
$scripts->add( 'plugin-install', "/wp-admin/js/plugin-install$suffix.js", array( 'jquery' ), '20100402' );
|
||||
$scripts->add( 'plugin-install', "/wp-admin/js/plugin-install$suffix.js", array( 'jquery', 'thickbox' ), '20100407' );
|
||||
$scripts->add_data( 'plugin-install', 'group', 1 );
|
||||
$scripts->localize( 'plugin-install', 'plugininstallL10n', array(
|
||||
'plugin_information' => __('Plugin Information:'),
|
||||
|
|
Loading…
Reference in New Issue