From 5fa3c84fdb1a144795c13660cdd21f61cbf3e5ce Mon Sep 17 00:00:00 2001 From: scribu Date: Tue, 23 Nov 2010 00:06:15 +0000 Subject: [PATCH] Remove vestige code from theme.js. See #14936 git-svn-id: http://svn.automattic.com/wordpress/trunk@16540 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/js/theme.dev.js | 29 +---------------------------- wp-admin/js/theme.js | 2 +- wp-includes/script-loader.php | 2 +- 3 files changed, 3 insertions(+), 30 deletions(-) diff --git a/wp-admin/js/theme.dev.js b/wp-admin/js/theme.dev.js index 5d27912378..420cdb9c45 100644 --- a/wp-admin/js/theme.dev.js +++ b/wp-admin/js/theme.dev.js @@ -27,33 +27,6 @@ var ThemeViewer; $( '#filters :checkbox' ).unbind( 'click' ).click( function() { filter_count(); }); - - $( 'p.tags a' ).unbind( 'click' ).click(function() { - $( 'p.tags a' ).unbind( 'click' ).click(function() { slow_down(); return false }); // Stop further clicks until we've done - $( '.loading' ).fadeIn(); - $( '.random-info' ).fadeOut(); - - var item = this.href.replace( /.*?s=(.*?)#.*/, '$1' ); - - // Is this in the features list? - if ( $( 'input[value="' + item + '"]' ).length > 0 ) { - $( 'input[value="' + item + '"]' ).attr( 'checked', $( 'input[value="' + item + '"]' ).attr( 'checked' ) ? false : true ); - - filter_count(); - } - else - $( 'input[name=s]' ).val( item ); // Can't find it, just use a search - - // Set the options - opts.search = $( 'input[name=s]' ).val(); - opts.order = document.location.href.match( /order=(\w*)/ ) ? document.location.href.match( /order=(\w*)/ )[1] : 'random'; - - $( '#availablethemes td' ).fadeTo( 500, 0.1, function() { - $( '#availablethemes td img' ).hide(); - } ); - - return false; - }); } // These are the functions we expose @@ -68,4 +41,4 @@ var ThemeViewer; jQuery( document ).ready( function($) { theme_viewer = new ThemeViewer(); theme_viewer.init(); -}); \ No newline at end of file +}); diff --git a/wp-admin/js/theme.js b/wp-admin/js/theme.js index 42eaf0b6ac..d11e1469f3 100644 --- a/wp-admin/js/theme.js +++ b/wp-admin/js/theme.js @@ -1 +1 @@ -var ThemeViewer;(function(a){ThemeViewer=function(b){function d(){var f=a("#filters :checked").length;var g=a("#filter-click").text();if(g.indexOf("(")!=-1){g=g.substr(0,g.indexOf("("))}if(f==0){a("#filter-click").text(g)}else{a("#filter-click").text(g+" ("+f+")")}}function e(){a("#filter-click, #mini-filter-click").unbind("click").click(function(){a("#filter-click").toggleClass("current");a("#filters").slideToggle();a("#current-theme").slideToggle(300);return false});a("#filters :checkbox").unbind("click").click(function(){d()});a("p.tags a").unbind("click").click(function(){a("p.tags a").unbind("click").click(function(){slow_down();return false});a(".loading").fadeIn();a(".random-info").fadeOut();var f=this.href.replace(/.*?s=(.*?)#.*/,"$1");if(a('input[value="'+f+'"]').length>0){a('input[value="'+f+'"]').attr("checked",a('input[value="'+f+'"]').attr("checked")?false:true);d()}else{a("input[name=s]").val(f)}opts.search=a("input[name=s]").val();opts.order=document.location.href.match(/order=(\w*)/)?document.location.href.match(/order=(\w*)/)[1]:"random";a("#availablethemes td").fadeTo(500,0.1,function(){a("#availablethemes td img").hide()});return false})}var c={init:e};return c}})(jQuery);jQuery(document).ready(function(a){theme_viewer=new ThemeViewer();theme_viewer.init()}); \ No newline at end of file +var ThemeViewer;(function(a){ThemeViewer=function(b){function d(){var f=a("#filters :checked").length;var g=a("#filter-click").text();if(g.indexOf("(")!=-1){g=g.substr(0,g.indexOf("("))}if(f==0){a("#filter-click").text(g)}else{a("#filter-click").text(g+" ("+f+")")}}function e(){a("#filter-click, #mini-filter-click").unbind("click").click(function(){a("#filter-click").toggleClass("current");a("#filters").slideToggle();a("#current-theme").slideToggle(300);return false});a("#filters :checkbox").unbind("click").click(function(){d()})}var c={init:e};return c}})(jQuery);jQuery(document).ready(function(a){theme_viewer=new ThemeViewer();theme_viewer.init()}); \ No newline at end of file diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index e5e9ff14e7..301fa40c65 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -373,7 +373,7 @@ function wp_default_scripts( &$scripts ) { 'l10n_print_after' => 'try{convertEntities(wordCountL10n);}catch(e){};' )); - $scripts->add( 'theme', "/wp-admin/js/theme$suffix.js", array( 'thickbox', 'jquery' ), '20100407' ); + $scripts->add( 'theme', "/wp-admin/js/theme$suffix.js", array( 'thickbox', 'jquery' ), '20101123' ); $scripts->add_data( 'theme', 'group', 1 ); $scripts->add( 'theme-preview', "/wp-admin/js/theme-preview$suffix.js", array( 'thickbox', 'jquery' ), '20100407' );