]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/js/theme.min.js
Wordpress 3.7
[autoinstalls/wordpress.git] / wp-admin / js / theme.min.js
index 3efe890ff20422198e6b719db2cb20d260e46b52..fca2ab6a797d0d1e14f9477cec7e340b5e4a5e19 100644 (file)
@@ -1 +1 @@
-jQuery(function(a){a("#availablethemes").on("click",".theme-detail",function(c){var d=a(this).closest(".available-theme"),b=d.find(".themedetaildiv");if(!b.length){b=d.find(".install-theme-info .theme-details");b=b.clone().addClass("themedetaildiv").appendTo(d).hide()}b.toggle();c.preventDefault()})});var tb_position;jQuery(document).ready(function(a){tb_position=function(){var f=a("#TB_window"),e=a(window).width(),d=a(window).height(),c=(1040<e)?1040:e,b=0;if(a("body.admin-bar").length){b=28}if(f.size()){f.width(c-50).height(d-45-b);a("#TB_iframeContent").width(c-50).height(d-75-b);f.css({"margin-left":"-"+parseInt(((c-50)/2),10)+"px"});if(typeof document.body.style.maxWidth!="undefined"){f.css({top:20+b+"px","margin-top":"0"})}}};a(window).resize(function(){tb_position()})});jQuery(function(c){if(!window.postMessage){return}var e=c("#theme-installer"),d=e.find(".install-theme-info"),b=e.find(".wp-full-overlay-main"),a=c(document.body);e.on("click",".close-full-overlay",function(f){e.fadeOut(200,function(){b.empty();a.removeClass("theme-installer-active full-overlay-active")});f.preventDefault()});e.on("click",".collapse-sidebar",function(f){e.toggleClass("collapsed").toggleClass("expanded");f.preventDefault()});c("#availablethemes").on("click",".install-theme-preview",function(f){var g;d.html(c(this).closest(".installable-theme").find(".install-theme-info").html());g=d.find(".theme-preview-url").val();b.html('<iframe src="'+g+'" />');e.fadeIn(200,function(){a.addClass("theme-installer-active full-overlay-active")});f.preventDefault()})});var ThemeViewer;(function(a){ThemeViewer=function(b){function d(){a("#filter-click, #mini-filter-click").unbind("click").click(function(){a("#filter-click").toggleClass("current");a("#filter-box").slideToggle();a("#current-theme").slideToggle(300);return false});a("#filter-box :checkbox").unbind("click").click(function(){var e=a("#filter-box :checked").length,f=a("#filter-click").text();if(f.indexOf("(")!=-1){f=f.substr(0,f.indexOf("("))}if(e==0){a("#filter-click").text(f)}else{a("#filter-click").text(f+" ("+e+")")}})}var c={init:d};return c}})(jQuery);jQuery(document).ready(function(a){theme_viewer=new ThemeViewer();theme_viewer.init()});var ThemeScroller;(function(a){ThemeScroller={querying:false,scrollPollingDelay:500,failedRetryDelay:4000,outListBottomThreshold:300,init:function(){var b=this;if(typeof ajaxurl==="undefined"||typeof list_args==="undefined"||typeof theme_list_args==="undefined"){a(".pagination-links").show();return}this.nonce=a("#_ajax_fetch_list_nonce").val();this.nextPage=(theme_list_args.paged+1);this.$outList=a("#availablethemes");this.$spinner=a("div.tablenav.bottom").children(".spinner");this.$window=a(window);this.$document=a(document);if(theme_list_args.total_pages>=this.nextPage){this.pollInterval=setInterval(function(){return b.poll()},this.scrollPollingDelay)}},poll:function(){var b=this.$document.scrollTop()+this.$window.innerHeight();if(this.querying||(b<this.$outList.height()-this.outListBottomThreshold)){return}this.ajax()},process:function(b){if(b===undefined){clearInterval(this.pollInterval);return}if(this.nextPage>theme_list_args.total_pages){clearInterval(this.pollInterval)}if(this.nextPage<=(theme_list_args.total_pages+1)){this.$outList.append(b.rows)}},ajax:function(){var b=this;this.querying=true;var c={action:"fetch-list",paged:this.nextPage,s:theme_list_args.search,tab:theme_list_args.tab,type:theme_list_args.type,_ajax_fetch_list_nonce:this.nonce,"features[]":theme_list_args.features,list_args:list_args};this.$spinner.show();a.getJSON(ajaxurl,c).done(function(d){b.nextPage++;b.process(d);b.$spinner.hide();b.querying=false}).fail(function(){b.$spinner.hide();b.querying=false;setTimeout(function(){b.ajax()},b.failedRetryDelay)})}};a(document).ready(function(b){ThemeScroller.init()})})(jQuery);
\ No newline at end of file
+jQuery(function(a){a("#availablethemes").on("click",".theme-detail",function(b){var c=a(this).closest(".available-theme"),d=c.find(".themedetaildiv");d.length||(d=c.find(".install-theme-info .theme-details"),d=d.clone().addClass("themedetaildiv").appendTo(c).hide()),d.toggle(),b.preventDefault()})});var tb_position;jQuery(document).ready(function(a){tb_position=function(){var b=a("#TB_window"),c=a(window).width(),d=a(window).height(),e=c>1040?1040:c,f=0;a("body.admin-bar").length&&(f=28),b.size()&&(b.width(e-50).height(d-45-f),a("#TB_iframeContent").width(e-50).height(d-75-f),b.css({"margin-left":"-"+parseInt((e-50)/2,10)+"px"}),"undefined"!=typeof document.body.style.maxWidth&&b.css({top:20+f+"px","margin-top":"0"}))},a(window).resize(function(){tb_position()})}),jQuery(function(a){if(window.postMessage){var b=a("#theme-installer"),c=b.find(".install-theme-info"),d=b.find(".wp-full-overlay-main"),e=a(document.body);b.on("click",".close-full-overlay",function(a){b.fadeOut(200,function(){d.empty(),e.removeClass("theme-installer-active full-overlay-active")}),a.preventDefault()}),b.on("click",".collapse-sidebar",function(a){b.toggleClass("collapsed").toggleClass("expanded"),a.preventDefault()}),a("#availablethemes").on("click",".install-theme-preview",function(f){var g;c.html(a(this).closest(".installable-theme").find(".install-theme-info").html()),g=c.find(".theme-preview-url").val(),d.html('<iframe src="'+g+'" />'),b.fadeIn(200,function(){e.addClass("theme-installer-active full-overlay-active")}),f.preventDefault()})}});var ThemeViewer;!function(a){ThemeViewer=function(){function b(){a("#filter-click, #mini-filter-click").unbind("click").click(function(){return a("#filter-click").toggleClass("current"),a("#filter-box").slideToggle(),a("#current-theme").slideToggle(300),!1}),a("#filter-box :checkbox").unbind("click").click(function(){var b=a("#filter-box :checked").length,c=a("#filter-click").text();-1!=c.indexOf("(")&&(c=c.substr(0,c.indexOf("("))),0==b?a("#filter-click").text(c):a("#filter-click").text(c+" ("+b+")")})}var c={init:b};return c}}(jQuery),jQuery(document).ready(function(){theme_viewer=new ThemeViewer,theme_viewer.init()});var ThemeScroller;!function(a){ThemeScroller={querying:!1,scrollPollingDelay:500,failedRetryDelay:4e3,outListBottomThreshold:300,init:function(){var b=this;return"undefined"==typeof ajaxurl||"undefined"==typeof list_args||"undefined"==typeof theme_list_args?(a(".pagination-links").show(),void 0):(this.nonce=a("#_ajax_fetch_list_nonce").val(),this.nextPage=theme_list_args.paged+1,this.$outList=a("#availablethemes"),this.$spinner=a("div.tablenav.bottom").children(".spinner"),this.$window=a(window),this.$document=a(document),theme_list_args.total_pages>=this.nextPage&&(this.pollInterval=setInterval(function(){return b.poll()},this.scrollPollingDelay)),void 0)},poll:function(){var a=this.$document.scrollTop()+this.$window.innerHeight();this.querying||a<this.$outList.height()-this.outListBottomThreshold||this.ajax()},process:function(a){return void 0===a?(clearInterval(this.pollInterval),void 0):(this.nextPage>theme_list_args.total_pages&&clearInterval(this.pollInterval),this.nextPage<=theme_list_args.total_pages+1&&this.$outList.append(a.rows),void 0)},ajax:function(){var b=this;this.querying=!0;var c={action:"fetch-list",paged:this.nextPage,s:theme_list_args.search,tab:theme_list_args.tab,type:theme_list_args.type,_ajax_fetch_list_nonce:this.nonce,"features[]":theme_list_args.features,list_args:list_args};this.$spinner.show(),a.getJSON(ajaxurl,c).done(function(a){b.nextPage++,b.process(a),b.$spinner.hide(),b.querying=!1}).fail(function(){b.$spinner.hide(),b.querying=!1,setTimeout(function(){b.ajax()},b.failedRetryDelay)})}},a(document).ready(function(){ThemeScroller.init()})}(jQuery);
\ No newline at end of file