From 416baab11a585cd5b4b9b62f3c4161b0a8d0c49d Mon Sep 17 00:00:00 2001
From: Andrew Ozz
Date: Fri, 2 Jan 2009 15:08:58 +0000
Subject: [PATCH] Minify all js and add the non-minified files as .dev.js
git-svn-id: https://develop.svn.wordpress.org/trunk@10291 602fd350-edb4-49c9-b593-d223f7449a82
---
wp-admin/js/cat.dev.js | 5 +
wp-admin/js/cat.js | 6 +-
wp-admin/js/categories.dev.js | 39 +
wp-admin/js/categories.js | 38 +-
wp-admin/js/comment.dev.js | 37 +
wp-admin/js/comment.js | 38 +-
wp-admin/js/common.dev.js | 391 ++++++++
wp-admin/js/common.js | 392 +-------
wp-admin/js/custom-fields.dev.js | 34 +
wp-admin/js/custom-fields.js | 34 +-
wp-admin/js/dashboard.dev.js | 48 +
wp-admin/js/dashboard.js | 49 +-
wp-admin/js/edit-comments.dev.js | 381 ++++++++
wp-admin/js/edit-comments.js | 373 +-------
wp-admin/js/editor.dev.js | 168 ++++
wp-admin/js/editor.js | 173 +---
wp-admin/js/gallery.dev.js | 174 ++++
wp-admin/js/gallery.js | 176 +---
wp-admin/js/inline-edit-post.dev.js | 262 ++++++
wp-admin/js/inline-edit-post.js | 266 +-----
wp-admin/js/inline-edit-tax.dev.js | 150 +++
wp-admin/js/inline-edit-tax.js | 151 +--
wp-admin/js/link.dev.js | 54 ++
wp-admin/js/link.js | 56 +-
wp-admin/js/media-upload.dev.js | 61 ++
wp-admin/js/media-upload.js | 63 +-
wp-admin/js/page.dev.js | 199 ++++
wp-admin/js/page.js | 200 +---
wp-admin/js/password-strength-meter.dev.js | 21 +
wp-admin/js/password-strength-meter.js | 24 +-
wp-admin/js/plugin-install.dev.js | 48 +
wp-admin/js/plugin-install.js | 54 +-
wp-admin/js/post.dev.js | 490 ++++++++++
wp-admin/js/post.js | 492 +---------
wp-admin/js/postbox.dev.js | 104 +++
wp-admin/js/postbox.js | 105 +--
wp-admin/js/slug.dev.js | 41 +
wp-admin/js/slug.js | 49 +-
wp-admin/js/tags.dev.js | 28 +
wp-admin/js/tags.js | 31 +-
wp-admin/js/theme-preview.dev.js | 40 +
wp-admin/js/theme-preview.js | 45 +-
wp-admin/js/widgets.dev.js | 150 +++
wp-admin/js/widgets.js | 151 +--
wp-admin/js/word-count.dev.js | 39 +
wp-admin/js/word-count.js | 40 +-
wp-admin/js/wp-gears.dev.js | 96 ++
wp-admin/js/wp-gears.js | 97 +-
wp-admin/js/xfn.dev.js | 41 +
wp-admin/js/xfn.js | 47 +-
wp-includes/js/autosave.dev.js | 209 +++++
wp-includes/js/autosave.js | 214 +----
wp-includes/js/colorpicker.dev.js | 707 ++++++++++++++
wp-includes/js/colorpicker.js | 708 +-------------
wp-includes/js/comment-reply.dev.js | 48 +
wp-includes/js/comment-reply.js | 49 +-
wp-includes/js/hoverIntent.dev.js | 128 +++
wp-includes/js/hoverIntent.js | 129 +--
wp-includes/js/jquery/jquery.color.dev.js | 128 +++
wp-includes/js/jquery/jquery.color.js | 129 +--
wp-includes/js/jquery/jquery.form.dev.js | 872 +++++++++++++++++
wp-includes/js/jquery/jquery.form.js | 873 +-----------------
wp-includes/js/jquery/jquery.hotkeys.dev.js | 128 +++
wp-includes/js/jquery/jquery.hotkeys.js | 129 +--
wp-includes/js/jquery/jquery.js | 27 +-
.../js/jquery/jquery.table-hotkeys.dev.js | 99 ++
wp-includes/js/jquery/jquery.table-hotkeys.js | 94 +-
wp-includes/js/jquery/suggest.dev.js | 332 +++++++
wp-includes/js/jquery/suggest.js | 333 +------
wp-includes/js/jquery/ui.core.js | 3 +-
wp-includes/js/jquery/ui.tabs.js | 3 +-
wp-includes/js/quicktags.dev.js | 575 ++++++++++++
wp-includes/js/quicktags.js | 583 +-----------
wp-includes/js/swfupload/swfupload-all.js | 5 +
wp-includes/js/thickbox/thickbox.dev.js | 320 +++++++
wp-includes/js/thickbox/thickbox.js | 321 +------
wp-includes/js/tw-sack.dev.js | 193 ++++
wp-includes/js/tw-sack.js | 194 +---
wp-includes/js/wp-ajax-response.dev.js | 59 ++
wp-includes/js/wp-ajax-response.js | 61 +-
wp-includes/js/wp-lists.dev.js | 373 ++++++++
wp-includes/js/wp-lists.js | 375 +-------
wp-includes/script-loader.php | 174 ++--
wp-settings.php | 5 +
84 files changed, 7456 insertions(+), 7375 deletions(-)
create mode 100644 wp-admin/js/cat.dev.js
create mode 100644 wp-admin/js/categories.dev.js
create mode 100644 wp-admin/js/comment.dev.js
create mode 100644 wp-admin/js/common.dev.js
create mode 100644 wp-admin/js/custom-fields.dev.js
create mode 100644 wp-admin/js/dashboard.dev.js
create mode 100644 wp-admin/js/edit-comments.dev.js
create mode 100644 wp-admin/js/editor.dev.js
create mode 100644 wp-admin/js/gallery.dev.js
create mode 100644 wp-admin/js/inline-edit-post.dev.js
create mode 100644 wp-admin/js/inline-edit-tax.dev.js
create mode 100644 wp-admin/js/link.dev.js
create mode 100644 wp-admin/js/media-upload.dev.js
create mode 100644 wp-admin/js/page.dev.js
create mode 100644 wp-admin/js/password-strength-meter.dev.js
create mode 100644 wp-admin/js/plugin-install.dev.js
create mode 100644 wp-admin/js/post.dev.js
create mode 100644 wp-admin/js/postbox.dev.js
create mode 100644 wp-admin/js/slug.dev.js
create mode 100644 wp-admin/js/tags.dev.js
create mode 100644 wp-admin/js/theme-preview.dev.js
create mode 100644 wp-admin/js/widgets.dev.js
create mode 100644 wp-admin/js/word-count.dev.js
create mode 100644 wp-admin/js/wp-gears.dev.js
create mode 100644 wp-admin/js/xfn.dev.js
create mode 100644 wp-includes/js/autosave.dev.js
create mode 100644 wp-includes/js/colorpicker.dev.js
create mode 100644 wp-includes/js/comment-reply.dev.js
create mode 100644 wp-includes/js/hoverIntent.dev.js
create mode 100644 wp-includes/js/jquery/jquery.color.dev.js
create mode 100644 wp-includes/js/jquery/jquery.form.dev.js
create mode 100644 wp-includes/js/jquery/jquery.hotkeys.dev.js
create mode 100644 wp-includes/js/jquery/jquery.table-hotkeys.dev.js
create mode 100644 wp-includes/js/jquery/suggest.dev.js
create mode 100644 wp-includes/js/quicktags.dev.js
create mode 100644 wp-includes/js/swfupload/swfupload-all.js
create mode 100644 wp-includes/js/thickbox/thickbox.dev.js
create mode 100644 wp-includes/js/tw-sack.dev.js
create mode 100644 wp-includes/js/wp-ajax-response.dev.js
create mode 100644 wp-includes/js/wp-lists.dev.js
diff --git a/wp-admin/js/cat.dev.js b/wp-admin/js/cat.dev.js
new file mode 100644
index 0000000000..7cbfe66b35
--- /dev/null
+++ b/wp-admin/js/cat.dev.js
@@ -0,0 +1,5 @@
+jQuery(document).ready( function($) {
+ var myConfirm = function() { return '' !== $('#newcat').val(); };
+ $('#jaxcat').prepend('' + catL10n.how + '')
+ $('#categorychecklist').wpList( { alt: '', response: 'cat-ajax-response', confirm: myConfirm } );
+} );
diff --git a/wp-admin/js/cat.js b/wp-admin/js/cat.js
index 4a64994adf..deee8c47e3 100644
--- a/wp-admin/js/cat.js
+++ b/wp-admin/js/cat.js
@@ -1,5 +1 @@
-jQuery( function($) {
- var myConfirm = function() { return '' !== $('#newcat').val(); };
- $('#jaxcat').prepend('' + catL10n.how + '')
- $('#categorychecklist').wpList( { alt: '', response: 'cat-ajax-response', confirm: myConfirm } );
-} );
+jQuery(document).ready(function(b){var a=function(){return""!==b("#newcat").val()};b("#jaxcat").prepend(''+catL10n.how+'');b("#categorychecklist").wpList({alt:"",response:"cat-ajax-response",confirm:a})});
\ No newline at end of file
diff --git a/wp-admin/js/categories.dev.js b/wp-admin/js/categories.dev.js
new file mode 100644
index 0000000000..f9a1724a4d
--- /dev/null
+++ b/wp-admin/js/categories.dev.js
@@ -0,0 +1,39 @@
+jQuery(document).ready(function($) {
+ var options = false, addAfter, addAfter2, delAfter;
+ if ( document.forms['addcat'].category_parent )
+ options = document.forms['addcat'].category_parent.options;
+
+ addAfter = function( r, settings ) {
+ var name, id;
+
+ name = $("" + $('name', r).text() + "").html();
+ id = $('cat', r).attr('id');
+ options[options.length] = new Option(name, id);
+
+ addAfter2( r, settings );
+ }
+
+ addAfter2 = function( x, r ) {
+ var t = $(r.parsed.responses[0].data);
+ if ( t.length == 1 )
+ inlineEditTax.addEvents($(t.id));
+ }
+
+ delAfter = function( r, settings ) {
+ var id = $('cat', r).attr('id'), o;
+ for ( o = 0; o < options.length; o++ )
+ if ( id == options[o].value )
+ options[o] = null;
+ }
+
+ if ( options )
+ $('#the-list').wpList( { addAfter: addAfter, delAfter: delAfter } );
+ else
+ $('#the-list').wpList({ addAfter: addAfter2 });
+
+ if ( jQuery('#link-category-search-input').size() ) {
+ columns.init('edit-link-categories');
+ } else {
+ columns.init('categories');
+ }
+});
diff --git a/wp-admin/js/categories.js b/wp-admin/js/categories.js
index fa23b226ae..484a01c394 100644
--- a/wp-admin/js/categories.js
+++ b/wp-admin/js/categories.js
@@ -1,37 +1 @@
-jQuery(function($) {
- var options = false
- if ( document.forms['addcat'].category_parent )
- options = document.forms['addcat'].category_parent.options;
-
- var addAfter = function( r, settings ) {
- var name = $("" + $('name', r).text() + "").html();
- var id = $('cat', r).attr('id');
- options[options.length] = new Option(name, id);
-
- addAfter2( r, settings );
- }
-
- var addAfter2 = function( x, r ) {
- var t = $(r.parsed.responses[0].data);
- if ( t.length == 1 )
- inlineEditTax.addEvents($(t.id));
- }
-
- var delAfter = function( r, settings ) {
- var id = $('cat', r).attr('id');
- for ( var o = 0; o < options.length; o++ )
- if ( id == options[o].value )
- options[o] = null;
- }
-
- if ( options )
- $('#the-list').wpList( { addAfter: addAfter, delAfter: delAfter } );
- else
- $('#the-list').wpList({ addAfter: addAfter2 });
-
- if ( jQuery('#link-category-search-input').size() ) {
- columns.init('edit-link-categories');
- } else {
- columns.init('categories');
- }
-});
+jQuery(document).ready(function(c){var b=false,e,d,a;if(document.forms.addcat.category_parent){b=document.forms.addcat.category_parent.options}e=function(h,g){var f,i;f=c(""+c("name",h).text()+"").html();i=c("cat",h).attr("id");b[b.length]=new Option(f,i);d(h,g)};d=function(f,h){var g=c(h.parsed.responses[0].data);if(g.length==1){inlineEditTax.addEvents(c(g.id))}};a=function(g,f){var i=c("cat",g).attr("id"),h;for(h=0;h' +
+ $( '#mm option[value=' + $('#mm').val() + ']' ).text() + ' ' +
+ $('#jj').val() + ', ' +
+ $('#aa').val() + ' @ ' +
+ $('#hh').val() + ':' +
+ $('#mn').val() + ' '
+ );
+ return false;
+ });
+});
\ No newline at end of file
diff --git a/wp-admin/js/comment.js b/wp-admin/js/comment.js
index 1f15b5be30..ac65c92fa7 100644
--- a/wp-admin/js/comment.js
+++ b/wp-admin/js/comment.js
@@ -1,37 +1 @@
-jQuery(document).ready( function($) {
-
- var stamp = $('#timestamp').html();
- $('.edit-timestamp').click(function () {
- if ($('#timestampdiv').is(":hidden")) {
- $('#timestampdiv').slideDown("normal");
- $('.edit-timestamp').hide();
- }
- return false;
- });
-
- $('.cancel-timestamp').click(function() {
- $('#timestampdiv').slideUp("normal");
- $('#mm').val($('#hidden_mm').val());
- $('#jj').val($('#hidden_jj').val());
- $('#aa').val($('#hidden_aa').val());
- $('#hh').val($('#hidden_hh').val());
- $('#mn').val($('#hidden_mn').val());
- $('#timestamp').html(stamp);
- $('.edit-timestamp').show();
- return false;
- });
-
- $('.save-timestamp').click(function () { // crazyhorse - multiple ok cancels
- $('#timestampdiv').slideUp("normal");
- $('.edit-timestamp').show();
- $('#timestamp').html(
- commentL10n.submittedOn + ' ' +
- $( '#mm option[value=' + $('#mm').val() + ']' ).text() + ' ' +
- $('#jj').val() + ', ' +
- $('#aa').val() + ' @ ' +
- $('#hh').val() + ':' +
- $('#mn').val() + ' '
- );
- return false;
- });
-});
\ No newline at end of file
+jQuery(document).ready(function(b){var a=b("#timestamp").html();b(".edit-timestamp").click(function(){if(b("#timestampdiv").is(":hidden")){b("#timestampdiv").slideDown("normal");b(".edit-timestamp").hide()}return false});b(".cancel-timestamp").click(function(){b("#timestampdiv").slideUp("normal");b("#mm").val(b("#hidden_mm").val());b("#jj").val(b("#hidden_jj").val());b("#aa").val(b("#hidden_aa").val());b("#hh").val(b("#hidden_hh").val());b("#mn").val(b("#hidden_mn").val());b("#timestamp").html(a);b(".edit-timestamp").show();return false});b(".save-timestamp").click(function(){b("#timestampdiv").slideUp("normal");b(".edit-timestamp").show();b("#timestamp").html(commentL10n.submittedOn+" "+b("#mm option[value="+b("#mm").val()+"]").text()+" "+b("#jj").val()+", "+b("#aa").val()+" @ "+b("#hh").val()+":"+b("#mn").val()+" ");return false})});
\ No newline at end of file
diff --git a/wp-admin/js/common.dev.js b/wp-admin/js/common.dev.js
new file mode 100644
index 0000000000..03fe415fe4
--- /dev/null
+++ b/wp-admin/js/common.dev.js
@@ -0,0 +1,391 @@
+
+var wpCookies = {
+// The following functions are from Cookie.js class in TinyMCE, Moxiecode, used under LGPL.
+
+ each : function(o, cb, s) {
+ var n, l;
+
+ if (!o)
+ return 0;
+
+ s = s || o;
+
+ if (typeof(o.length) != 'undefined') {
+ for (n=0, l = o.length; n H ) {
+ o = (t+h+10) - H;
+ m.css({'marginTop':'-'+o+'px'});
+ } else if ( m.css('marginTop') ) {
+ m.css({'marginTop':''})
+ }
+ m.addClass('sub-open');
+ },
+ out: function(){ $(this).find('.wp-submenu').removeClass('sub-open').css({'marginTop':''}); },
+ timeout: 220,
+ sensitivity: 8,
+ interval: 100
+ });
+
+ }
+ },
+
+ favorites : function() {
+ $('#favorite-inside').width($('#favorite-actions').width()-4);
+ $('#favorite-toggle, #favorite-inside').bind( 'mouseenter', function(){$('#favorite-inside').removeClass('slideUp').addClass('slideDown'); setTimeout(function(){if ( $('#favorite-inside').hasClass('slideDown') ) { $('#favorite-inside').slideDown(100); $('#favorite-first').addClass('slide-down'); }}, 200) } );
+
+ $('#favorite-toggle, #favorite-inside').bind( 'mouseleave', function(){$('#favorite-inside').removeClass('slideDown').addClass('slideUp'); setTimeout(function(){if ( $('#favorite-inside').hasClass('slideUp') ) { $('#favorite-inside').slideUp(100, function(){ $('#favorite-first').removeClass('slide-down'); } ); }}, 300) } );
+ }
+};
+
+$(document).ready(function(){adminMenu.init();});
+})(jQuery);
+
+(function($){
+// show/hide/save table columns
+columns = {
+ init : function(page) {
+ $('.hide-column-tog').click( function() {
+ var column = $(this).val(), show = $(this).attr('checked');
+ if ( show ) {
+ $('.column-' + column).show();
+ } else {
+ $('.column-' + column).hide();
+ }
+ columns.save_manage_columns_state(page);
+ } );
+ },
+
+ save_manage_columns_state : function(page) {
+ var hidden = $('.manage-column').filter(':hidden').map(function() { return this.id; }).get().join(',');
+ $.post('admin-ajax.php', {
+ action: 'hidden-columns',
+ hidden: hidden,
+ hiddencolumnsnonce: $('#hiddencolumnsnonce').val(),
+ page: page
+ });
+ }
+}
+
+})(jQuery);
+
+
+jQuery(document).ready(function($){
+ if ( 'undefined' != typeof google && google.gears ) return;
+
+ var gf = false;
+ if ( 'undefined' != typeof GearsFactory ) {
+ gf = new GearsFactory();
+ } else {
+ try {
+ gf = new ActiveXObject('Gears.Factory');
+ if ( factory.getBuildInfo().indexOf('ie_mobile') != -1 )
+ gf.privateSetGlobalObject(this);
+ } catch (e) {
+ if ( ( 'undefined' != typeof navigator.mimeTypes ) && navigator.mimeTypes['application/x-googlegears'] ) {
+ gf = document.createElement("object");
+ gf.style.display = "none";
+ gf.width = 0;
+ gf.height = 0;
+ gf.type = "application/x-googlegears";
+ document.documentElement.appendChild(gf);
+ }
+ }
+ }
+ if ( gf && gf.hasPermission )
+ return;
+
+ $('.turbo-nag').show();
+});
diff --git a/wp-admin/js/common.js b/wp-admin/js/common.js
index 94d5396a36..2932bda31d 100644
--- a/wp-admin/js/common.js
+++ b/wp-admin/js/common.js
@@ -1,391 +1 @@
-
-var wpCookies = {
-// The following functions are from Cookie.js class in TinyMCE, Moxiecode, used under LGPL.
-
- each : function(o, cb, s) {
- var n, l;
-
- if (!o)
- return 0;
-
- s = s || o;
-
- if (typeof(o.length) != 'undefined') {
- for (n=0, l = o.length; n H ) {
- o = (t+h+10) - H;
- m.css({'marginTop':'-'+o+'px'});
- } else if ( m.css('marginTop') ) {
- m.css({'marginTop':''})
- }
- m.addClass('sub-open');
- },
- out: function(){ $(this).find('.wp-submenu').removeClass('sub-open').css({'marginTop':''}); },
- timeout: 220,
- sensitivity: 8,
- interval: 100
- });
-
- }
- },
-
- favorites : function() {
- $('#favorite-inside').width($('#favorite-actions').width()-4);
- $('#favorite-toggle, #favorite-inside').bind( 'mouseenter', function(){$('#favorite-inside').removeClass('slideUp').addClass('slideDown'); setTimeout(function(){if ( $('#favorite-inside').hasClass('slideDown') ) { $('#favorite-inside').slideDown(100); $('#favorite-first').addClass('slide-down'); }}, 200) } );
-
- $('#favorite-toggle, #favorite-inside').bind( 'mouseleave', function(){$('#favorite-inside').removeClass('slideDown').addClass('slideUp'); setTimeout(function(){if ( $('#favorite-inside').hasClass('slideUp') ) { $('#favorite-inside').slideUp(100, function(){ $('#favorite-first').removeClass('slide-down'); } ); }}, 300) } );
- }
-};
-
-$(document).ready(function(){adminMenu.init();});
-})(jQuery);
-
-(function($){
-// show/hide/save table columns
-columns = {
- init : function(page) {
- $('.hide-column-tog').click( function() {
- var column = $(this).val();
- var show = $(this).attr('checked');
- if ( show ) {
- $('.column-' + column).show();
- } else {
- $('.column-' + column).hide();
- }
- columns.save_manage_columns_state(page);
- } );
- },
-
- save_manage_columns_state : function(page) {
- var hidden = $('.manage-column').filter(':hidden').map(function() { return this.id; }).get().join(',');
- $.post('admin-ajax.php', {
- action: 'hidden-columns',
- hidden: hidden,
- hiddencolumnsnonce: $('#hiddencolumnsnonce').val(),
- page: page
- });
- }
-}
-
-})(jQuery);
-
-
-jQuery(document).ready(function($){
- if ( 'undefined' != typeof google && google.gears ) return;
-
- var gf = false;
- if ( 'undefined' != typeof GearsFactory ) {
- gf = new GearsFactory();
- } else {
- try {
- gf = new ActiveXObject('Gears.Factory');
- if ( factory.getBuildInfo().indexOf('ie_mobile') != -1 )
- gf.privateSetGlobalObject(this);
- } catch (e) {
- if ( ( 'undefined' != typeof navigator.mimeTypes ) && navigator.mimeTypes['application/x-googlegears'] ) {
- gf = document.createElement("object");
- gf.style.display = "none";
- gf.width = 0;
- gf.height = 0;
- gf.type = "application/x-googlegears";
- document.documentElement.appendChild(gf);
- }
- }
- }
- if ( gf && gf.hasPermission )
- return;
-
- $('.turbo-nag').show();
-});
+var wpCookies={each:function(d,a,c){var e,b;if(!d){return 0}c=c||d;if(typeof(d.length)!="undefined"){for(e=0,b=d.length;ed){j=(f+g+10)-d;c.css({marginTop:"-"+j+"px"})}else{if(c.css("marginTop")){c.css({marginTop:""})}}c.addClass("sub-open")},out:function(){a(this).find(".wp-submenu").removeClass("sub-open").css({marginTop:""})},timeout:220,sensitivity:8,interval:100})}},favorites:function(){a("#favorite-inside").width(a("#favorite-actions").width()-4);a("#favorite-toggle, #favorite-inside").bind("mouseenter",function(){a("#favorite-inside").removeClass("slideUp").addClass("slideDown");setTimeout(function(){if(a("#favorite-inside").hasClass("slideDown")){a("#favorite-inside").slideDown(100);a("#favorite-first").addClass("slide-down")}},200)});a("#favorite-toggle, #favorite-inside").bind("mouseleave",function(){a("#favorite-inside").removeClass("slideDown").addClass("slideUp");setTimeout(function(){if(a("#favorite-inside").hasClass("slideUp")){a("#favorite-inside").slideUp(100,function(){a("#favorite-first").removeClass("slide-down")})}},300)})}};a(document).ready(function(){adminMenu.init()})})(jQuery);(function(a){columns={init:function(b){a(".hide-column-tog").click(function(){var d=a(this).val(),c=a(this).attr("checked");if(c){a(".column-"+d).show()}else{a(".column-"+d).hide()}columns.save_manage_columns_state(b)})},save_manage_columns_state:function(c){var b=a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",");a.post("admin-ajax.php",{action:"hidden-columns",hidden:b,hiddencolumnsnonce:a("#hiddencolumnsnonce").val(),page:c})}}})(jQuery);jQuery(document).ready(function(b){if("undefined"!=typeof google&&google.gears){return}var a=false;if("undefined"!=typeof GearsFactory){a=new GearsFactory()}else{try{a=new ActiveXObject("Gears.Factory");if(factory.getBuildInfo().indexOf("ie_mobile")!=-1){a.privateSetGlobalObject(this)}}catch(c){if(("undefined"!=typeof navigator.mimeTypes)&&navigator.mimeTypes["application/x-googlegears"]){a=document.createElement("object");a.style.display="none";a.width=0;a.height=0;a.type="application/x-googlegears";document.documentElement.appendChild(a)}}}if(a&&a.hasPermission){return}b(".turbo-nag").show()});
\ No newline at end of file
diff --git a/wp-admin/js/custom-fields.dev.js b/wp-admin/js/custom-fields.dev.js
new file mode 100644
index 0000000000..8880259925
--- /dev/null
+++ b/wp-admin/js/custom-fields.dev.js
@@ -0,0 +1,34 @@
+jQuery(document).ready( function($) {
+ var before, addBefore, addAfter, delBefore;
+
+ before = function() {
+ var nonce = $('#newmeta [@name=_ajax_nonce]').val(), postId = $('#post_ID').val();
+ if ( !nonce || !postId ) { return false; }
+ return [nonce,postId];
+ }
+
+ addBefore = function( s ) {
+ var b = before();
+ if ( !b ) { return false; }
+ s.data = s.data.replace(/_ajax_nonce=[a-f0-9]+/, '_ajax_nonce=' + b[0]) + '&post_id=' + b[1];
+ return s;
+ };
+
+ addAfter = function( r, s ) {
+ var postId = $('postid', r).text(), h;
+ if ( !postId ) { return; }
+ $('#post_ID').attr( 'name', 'post_ID' ).val( postId );
+ h = $('#hiddenaction');
+ if ( 'post' == h.val() ) { h.val( 'postajaxpost' ); }
+ };
+
+ delBefore = function( s ) {
+ var b = before(); if ( !b ) return false;
+ s.data._ajax_nonce = b[0]; s.data.post_id = b[1];
+ return s;
+ }
+
+ $('#the-list')
+ .wpList( { addBefore: addBefore, addAfter: addAfter, delBefore: delBefore } )
+ .find('.updatemeta, .deletemeta').attr( 'type', 'button' );
+} );
diff --git a/wp-admin/js/custom-fields.js b/wp-admin/js/custom-fields.js
index 8f2b1a59cf..121b754a68 100644
--- a/wp-admin/js/custom-fields.js
+++ b/wp-admin/js/custom-fields.js
@@ -1,33 +1 @@
-jQuery( function($) {
- var before = function() {
- var nonce = $('#newmeta [@name=_ajax_nonce]').val();
- var postId = $('#post_ID').val();
- if ( !nonce || !postId ) { return false; }
- return [nonce,postId];
- }
-
- var addBefore = function( s ) {
- var b = before();
- if ( !b ) { return false; }
- s.data = s.data.replace(/_ajax_nonce=[a-f0-9]+/, '_ajax_nonce=' + b[0]) + '&post_id=' + b[1];
- return s;
- };
-
- var addAfter = function( r, s ) {
- var postId = $('postid', r).text();
- if ( !postId ) { return; }
- $('#post_ID').attr( 'name', 'post_ID' ).val( postId );
- var h = $('#hiddenaction');
- if ( 'post' == h.val() ) { h.val( 'postajaxpost' ); }
- };
-
- var delBefore = function( s ) {
- var b = before(); if ( !b ) return false;
- s.data._ajax_nonce = b[0]; s.data.post_id = b[1];
- return s;
- }
-
- $('#the-list')
- .wpList( { addBefore: addBefore, addAfter: addAfter, delBefore: delBefore } )
- .find('.updatemeta, .deletemeta').attr( 'type', 'button' );
-} );
+jQuery(document).ready(function(d){var c,b,e,a;c=function(){var g=d("#newmeta [@name=_ajax_nonce]").val(),f=d("#post_ID").val();if(!g||!f){return false}return[g,f]};b=function(g){var f=c();if(!f){return false}g.data=g.data.replace(/_ajax_nonce=[a-f0-9]+/,"_ajax_nonce="+f[0])+"&post_id="+f[1];return g};e=function(j,i){var f=d("postid",j).text(),g;if(!f){return}d("#post_ID").attr("name","post_ID").val(f);g=d("#hiddenaction");if("post"==g.val()){g.val("postajaxpost")}};a=function(g){var f=c();if(!f){return false}g.data._ajax_nonce=f[0];g.data.post_id=f[1];return g};d("#the-list").wpList({addBefore:b,addAfter:e,delBefore:a}).find(".updatemeta, .deletemeta").attr("type","button")});
\ No newline at end of file
diff --git a/wp-admin/js/dashboard.dev.js b/wp-admin/js/dashboard.dev.js
new file mode 100644
index 0000000000..1379eb079b
--- /dev/null
+++ b/wp-admin/js/dashboard.dev.js
@@ -0,0 +1,48 @@
+
+jQuery(document).ready( function($) {
+ var ajaxWidgets, ajaxPopulateWidgets, quickPressLoad;
+ // These widgets are sometimes populated via ajax
+ ajaxWidgets = [
+ 'dashboard_incoming_links',
+ 'dashboard_primary',
+ 'dashboard_secondary',
+ 'dashboard_plugins'
+ ];
+
+ ajaxPopulateWidgets = function() {
+ $.each( ajaxWidgets, function() {
+ var e = jQuery('#' + this + ':visible div.inside').find('.widget-loading');
+ if ( e.size() ) { e.parent().load('index-extra.php?jax=' + this); }
+ } );
+ };
+ ajaxPopulateWidgets();
+
+ postboxes.add_postbox_toggles('dashboard', { onShow: ajaxPopulateWidgets } );
+
+ /* QuickPress */
+ quickPressLoad = function() {
+ var act = $('#quickpost-action'), t;
+ t = $('#quick-press').submit( function() {
+ $('#dashboard_quick_press h3').append( '
' );
+
+ if ( 'post' == act.val() ) {
+ act.val( 'post-quickpress-publish' );
+ }
+
+ $('#dashboard_quick_press div.inside').load( t.attr( 'action' ), t.serializeArray(), function() {
+ $('#dashboard_quick_press h3 img').remove();
+ $('#dashboard_quick_press ul').find('li').each( function() {
+ $('#dashboard_recent_drafts ul').prepend( this );
+ } ).end().remove();
+ tb_init('a.thickbox');
+ quickPressLoad();
+ } );
+ return false;
+ } );
+
+ $('#publish').click( function() { act.val( 'post-quickpress-publish' ); } );
+
+ };
+ quickPressLoad();
+
+} );
diff --git a/wp-admin/js/dashboard.js b/wp-admin/js/dashboard.js
index 150c432a7e..c7f6bb4ca3 100644
--- a/wp-admin/js/dashboard.js
+++ b/wp-admin/js/dashboard.js
@@ -1,48 +1 @@
-
-jQuery( function($) {
-
-// These widgets are sometimes populated via ajax
-var ajaxWidgets = [
- 'dashboard_incoming_links',
- 'dashboard_primary',
- 'dashboard_secondary',
- 'dashboard_plugins'
-];
-
-var ajaxPopulateWidgets = function() {
- $.each( ajaxWidgets, function() {
- var e = jQuery('#' + this + ':visible div.inside').find('.widget-loading');
- if ( e.size() ) { e.parent().load('index-extra.php?jax=' + this); }
- } );
-};
-ajaxPopulateWidgets();
-
-postboxes.add_postbox_toggles('dashboard', { onShow: ajaxPopulateWidgets } );
-
-/* QuickPress */
-var quickPressLoad = function() {
- var act = $('#quickpost-action');
- var t = $('#quick-press').submit( function() {
- $('#dashboard_quick_press h3').append( '
' );
-
- if ( 'post' == act.val() ) {
- act.val( 'post-quickpress-publish' );
- }
-
- $('#dashboard_quick_press div.inside').load( t.attr( 'action' ), t.serializeArray(), function() {
- $('#dashboard_quick_press h3 img').remove();
- $('#dashboard_quick_press ul').find('li').each( function() {
- $('#dashboard_recent_drafts ul').prepend( this );
- } ).end().remove();
- tb_init('a.thickbox');
- quickPressLoad();
- } );
- return false;
- } );
-
- $('#publish').click( function() { act.val( 'post-quickpress-publish' ); } );
-
-};
-quickPressLoad();
-
-} );
+jQuery(document).ready(function(c){var a,b,d;a=["dashboard_incoming_links","dashboard_primary","dashboard_secondary","dashboard_plugins"];b=function(){c.each(a,function(){var f=jQuery("#"+this+":visible div.inside").find(".widget-loading");if(f.size()){f.parent().load("index-extra.php?jax="+this)}})};b();postboxes.add_postbox_toggles("dashboard",{onShow:b});d=function(){var e=c("#quickpost-action"),f;f=c("#quick-press").submit(function(){c("#dashboard_quick_press h3").append('
');if("post"==e.val()){e.val("post-quickpress-publish")}c("#dashboard_quick_press div.inside").load(f.attr("action"),f.serializeArray(),function(){c("#dashboard_quick_press h3 img").remove();c("#dashboard_quick_press ul").find("li").each(function(){c("#dashboard_recent_drafts ul").prepend(this)}).end().remove();tb_init("a.thickbox");d()});return false});c("#publish").click(function(){e.val("post-quickpress-publish")})};d()});
\ No newline at end of file
diff --git a/wp-admin/js/edit-comments.dev.js b/wp-admin/js/edit-comments.dev.js
new file mode 100644
index 0000000000..e8790d6bf9
--- /dev/null
+++ b/wp-admin/js/edit-comments.dev.js
@@ -0,0 +1,381 @@
+var theList, theExtraList;
+(function($) {
+
+setCommentsList = function() {
+ var totalInput, perPageInput, pageInput, lastConfidentTime = 0, dimAfter, delBefore, updateTotalCount, delAfter;
+
+ totalInput = $('#comments-form .tablenav :input[name="_total"]');
+ perPageInput = $('#comments-form .tablenav :input[name="_per_page"]');
+ pageInput = $('#comments-form .tablenav :input[name="_page"]');
+
+ dimAfter = function( r, settings ) {
+ var c = $('#' + settings.element);
+
+ if ( c.is('.unapproved') )
+ c.find('div.comment_status').html('0')
+ else
+ c.find('div.comment_status').html('1')
+
+ $('span.pending-count').each( function() {
+ var a = $(this), n;
+ n = a.html().replace(/[ ,.]+/g, '');
+ n = parseInt(n,10);
+ if ( isNaN(n) ) return;
+ n = n + ( $('#' + settings.element).is('.' + settings.dimClass) ? 1 : -1 );
+ if ( n < 0 ) { n = 0; }
+ $('#awaiting-mod')[ 0 == n ? 'addClass' : 'removeClass' ]('count-0');
+ n = n.toString();
+ if ( n.length > 3 )
+ n = n.substr(0, n.length-3)+' '+n.substr(-3);
+ a.html(n);
+ });
+ };
+
+ // Send current total, page, per_page and url
+ delBefore = function( settings ) {
+ settings.data._total = totalInput.val();
+ settings.data._per_page = perPageInput.val();
+ settings.data._page = pageInput.val();
+ settings.data._url = document.location.href;
+ return settings;
+ };
+
+ /* Updates the current total (as displayed visibly)
+ */
+ updateTotalCount = function( total, time, setConfidentTime ) {
+ if ( time < lastConfidentTime ) {
+ return;
+ }
+ totalInput.val( total.toString() );
+ if ( setConfidentTime ) {
+ lastConfidentTime = time;
+ }
+ $('span.total-type-count').each( function() {
+ var a = $(this), n;
+ n = totalInput.val().toString();
+ if ( n.length > 3 )
+ n = n.substr(0, n.length-3)+' '+n.substr(-3);
+ a.html(n);
+ });
+
+ };
+
+ // In admin-ajax.php, we send back the unix time stamp instead of 1 on success
+ delAfter = function( r, settings ) {
+ $('span.pending-count').each( function() {
+ var a = $(this), n;
+ n = a.html().replace(/[ ,.]+/g, '');
+ n = parseInt(n,10);
+ if ( isNaN(n) ) return;
+ if ( $('#' + settings.element).is('.unapproved') ) { // we deleted a formerly unapproved comment
+ n = n - 1;
+ } else if ( $(settings.target).parents( 'span.unapprove' ).size() ) { // we "deleted" an approved comment from the approved list by clicking "Unapprove"
+ n = n + 1;
+ }
+ if ( n < 0 ) { n = 0; }
+ $('#awaiting-mod')[ 0 == n ? 'addClass' : 'removeClass' ]('count-0');
+ n = n.toString();
+ if ( n.length > 3 )
+ n = n.substr(0, n.length-3)+' '+n.substr(-3);
+ a.html(n);
+ });
+
+ $('span.spam-count').each( function() {
+ var a = $(this), n;
+ n = a.html().replace(/[ ,.]+/g, '');
+ n = parseInt(n,10);
+ if ( isNaN(n) ) return;
+ if ( $(settings.target).parents( 'span.spam' ).size() ) { // we marked a comment as spam
+ n = n + 1;
+ } else if ( $('#' + settings.element).is('.spam') ) { // we approved or deleted a comment marked as spam
+ n = n - 1;
+ }
+ if ( n < 0 ) { n = 0; }
+ n = n.toString();
+ if ( n.length > 3 )
+ n = n.substr(0, n.length-3)+' '+n.substr(-3);
+ a.html(n);
+ });
+
+
+ // XML response
+ if ( ( 'object' == typeof r ) && lastConfidentTime < settings.parsed.responses[0].supplemental.time ) {
+ // Set the total to the known good value (even if this value is a little old, newer values should only be a few less, and so shouldn't mess up the page links)
+ updateTotalCount( settings.parsed.responses[0].supplemental.total, settings.parsed.responses[0].supplemental.time, true );
+ if ( $.trim( settings.parsed.responses[0].supplemental.pageLinks ) ) {
+ $('.tablenav-pages').find( '.page-numbers' ).remove().end().append( $( settings.parsed.responses[0].supplemental.pageLinks ) );
+ } else if ( 'undefined' != typeof settings.parsed.responses[0].supplemental.pageLinks ) {
+ $('.tablenav-pages').find( '.page-numbers' ).remove();
+ }
+ } else {
+ // Decrement the total
+ var total = parseInt( totalInput.val(), 10 );
+ if ( total-- < 0 )
+ total = 0;
+ updateTotalCount( total, r, false );
+ }
+
+ if ( theExtraList.size() == 0 || theExtraList.children().size() == 0 ) {
+ return;
+ }
+
+ theList.get(0).wpList.add( theExtraList.children(':eq(0)').remove().clone() );
+ $('#get-extra-comments').submit();
+ };
+
+ theExtraList = $('#the-extra-comment-list').wpList( { alt: '', delColor: 'none', addColor: 'none' } );
+ theList = $('#the-comment-list').wpList( { alt: '', delBefore: delBefore, dimAfter: dimAfter, delAfter: delAfter, addColor: 'none' } );
+
+};
+
+$(document).ready(function(){
+ setCommentsList();
+});
+
+commentReply = {
+
+ init : function() {
+ var row = $('#replyrow');
+
+ $('a.cancel', row).click(function() { return commentReply.revert(); });
+ $('a.save', row).click(function() { return commentReply.send(this); });
+
+ // add events
+ $('#the-comment-list .column-comment > p').dblclick(function(){
+ commentReply.toggle($(this).parent());
+ });
+
+ $('#doaction, #doaction2, #post-query-submit').click(function(e){
+ if ( $('#the-comment-list #replyrow').length > 0 )
+ commentReply.close();
+ });
+
+ },
+
+ addEvents : function(r) {
+ r.each(function() {
+ $(this).find('.column-comment > p').dblclick(function(){
+ commentReply.toggle($(this).parent());
+ });
+ });
+ },
+
+ toggle : function(el) {
+ if ( $(el).css('display') != 'none' )
+ $(el).find('a.vim-q').click();
+ },
+
+ revert : function() {
+
+ if ( $('#the-comment-list #replyrow').length < 1 )
+ return false;
+
+ $('#replyrow').fadeOut('fast', function(){
+ commentReply.close();
+ });
+
+ return false;
+ },
+
+ close : function() {
+ $(this.o).fadeIn('fast').css('backgroundColor', '');
+ $('#com-reply').append( $('#replyrow') );
+ $('#replycontent').val('');
+ $('#edithead input').val('');
+ $('#replysubmit .error').html('').hide();
+ $('#replysubmit .waiting').hide();
+ if ( $.browser.msie )
+ $('#replycontainer, #replycontent').css('height', '120px');
+ else
+ $('#replycontainer').resizable('destroy').css('height', '120px');
+ },
+
+ open : function(id, p, a) {
+ var t = this, editRow, act, h;
+ t.close();
+ t.o = '#comment-'+id;
+
+ $('#replyrow td').attr('colspan', $('.widefat thead th:visible').length);
+ editRow = $('#replyrow'), rowData = $('#inline-'+id);
+ act = t.act = (a == 'edit') ? 'edit-comment' : 'replyto-comment';
+
+ $('#action', editRow).val(act);
+ $('#comment_post_ID', editRow).val(p);
+ $('#comment_ID', editRow).val(id);
+
+ if ( a == 'edit' ) {
+ $('#author', editRow).val( $('div.author', rowData).text() );
+ $('#author-email', editRow).val( $('div.author-email', rowData).text() );
+ $('#author-url', editRow).val( $('div.author-url', rowData).text() );
+ $('#status', editRow).val( $('div.comment_status', rowData).text() );
+ $('#replycontent', editRow).val( $('textarea.comment', rowData).val() );
+ $('#edithead, #savebtn', editRow).show();
+ $('#replyhead, #replybtn', editRow).hide();
+
+ h = $(t.o).height();
+ if ( h > 220 )
+ if ( $.browser.msie )
+ $('#replycontainer, #replycontent', editRow).height(h-105);
+ else
+ $('#replycontainer', editRow).height(h-105);
+
+ $(t.o).after(editRow.hide()).fadeOut('fast', function(){
+ $('#replyrow').fadeIn('fast');
+ });
+ } else {
+ $('#edithead, #savebtn', editRow).hide();
+ $('#replyhead, #replybtn', editRow).show();
+ $(t.o).after(editRow);
+ $('#replyrow').hide().fadeIn('fast');
+ }
+
+ if ( ! $.browser.msie )
+ $('#replycontainer').resizable({
+ handles : 's',
+ axis : 'y',
+ minHeight : 80,
+ stop : function() {
+ $('#replycontainer').width('auto');
+ }
+ });
+
+ setTimeout(function() {
+ var rtop, rbottom, scrollTop, vp, scrollBottom;
+
+ rtop = $('#replyrow').offset().top;
+ rbottom = rtop + $('#replyrow').height();
+ scrollTop = window.pageYOffset || document.documentElement.scrollTop;
+ vp = document.documentElement.clientHeight || self.innerHeight || 0;
+ scrollBottom = scrollTop + vp;
+
+ if ( scrollBottom - 20 < rbottom )
+ window.scroll(0, rbottom - vp + 35);
+ else if ( rtop - 20 < scrollTop )
+ window.scroll(0, rtop - 35);
+
+ $('#replycontent').focus().keyup(function(e){
+ if (e.which == 27) commentReply.revert(); // close on Escape
+ });
+ }, 600);
+
+ return false;
+ },
+
+ send : function() {
+ var post = {};
+
+ $('#replysubmit .waiting').show();
+
+ $('#replyrow input').each(function() {
+ post[ $(this).attr('name') ] = $(this).val();
+ });
+
+ post.content = $('#replycontent').val();
+ post.id = post.comment_post_ID;
+
+ $.ajax({
+ type : 'POST',
+ url : wpListL10n.url,
+ data : post,
+ success : function(x) { commentReply.show(x); },
+ error : function(r) { commentReply.error(r); }
+ });
+
+ return false;
+ },
+
+ show : function(xml) {
+ var r, c, id, bg;
+
+ if ( typeof(xml) == 'string' ) {
+ this.error({'responseText': xml});
+ return false;
+ }
+
+ r = wpAjax.parseAjaxResponse(xml);
+ if ( r.errors ) {
+ this.error({'responseText': wpAjax.broken});
+ return false;
+ }
+
+ if ( 'edit-comment' == this.act )
+ $(this.o).remove();
+
+ r = r.responses[0];
+ c = r.data;
+
+ $(c).hide()
+ $('#replyrow').after(c);
+
+ this.o = id = '#comment-'+r.id;
+ this.revert();
+ this.addEvents($(id));
+ bg = $(id).hasClass('unapproved') ? '#ffffe0' : '#fff';
+
+ $(id)
+ .animate( { 'backgroundColor':'#CCEEBB' }, 600 )
+ .animate( { 'backgroundColor': bg }, 600 );
+
+ $.fn.wpList.process($(id))
+ },
+
+ error : function(r) {
+ var er = r.statusText;
+
+ $('#replysubmit .waiting').hide();
+
+ if ( r.responseText )
+ er = r.responseText.replace( /<.[^<>]*?>/g, '' );
+
+ if ( er )
+ $('#replysubmit .error').html(er).show();
+
+ }
+};
+toggleWithKeyboard = false;
+$(document).ready(function(){
+ var make_hotkeys_redirect, edit_comment, toggle_all, make_bulk;
+
+ columns.init('edit-comments');
+ commentReply.init();
+
+ if ( typeof QTags != 'undefined' )
+ ed_reply = new QTags('ed_reply', 'replycontent', 'replycontainer', 'more');
+
+ if ( typeof $.table_hotkeys != 'undefined' ) {
+ make_hotkeys_redirect = function(which) {
+ return function() {
+ var first_last, l;
+
+ first_last = 'next' == which? 'first' : 'last';
+ l = $('.'+which+'.page-numbers');
+ if (l.length)
+ window.location = l[0].href.replace(/\&hotkeys_highlight_(first|last)=1/g, '')+'&hotkeys_highlight_'+first_last+'=1';
+ }
+ };
+ edit_comment = function(event, current_row) {
+ window.location = $('span.edit a', current_row).attr('href');
+ };
+ toggle_all = function() {
+ toggleWithKeyboard = true;
+ var master_checkbox = $('form#comments-form .check-column :checkbox:first');
+ master_checkbox.click().attr('checked', '');
+ toggleWithKeyboard = false;
+ }
+ make_bulk = function(value) {
+ return function(event, _) {
+ $('option[value='+value+']').attr('selected', 'selected');
+ $('form#comments-form')[0].submit();
+ }
+ };
+ $.table_hotkeys($('table.widefat'),['a', 'u', 's', 'd', 'r', 'q', ['e', edit_comment],
+ ['shift+a', make_bulk('approve')], ['shift+s', make_bulk('markspam')],
+ ['shift+d', make_bulk('delete')], ['shift+x', toggle_all],
+ ['shift+u', make_bulk('unapprove')]],
+ {highlight_first: adminCommentsL10n.hotkeys_highlight_first, highlight_last: adminCommentsL10n.hotkeys_highlight_last,
+ prev_page_link_cb: make_hotkeys_redirect('prev'), next_page_link_cb: make_hotkeys_redirect('next')}
+ );
+ }
+});
+
+})(jQuery);
diff --git a/wp-admin/js/edit-comments.js b/wp-admin/js/edit-comments.js
index 3c69dcb86a..f850c8de47 100644
--- a/wp-admin/js/edit-comments.js
+++ b/wp-admin/js/edit-comments.js
@@ -1,372 +1 @@
-var theList; var theExtraList;
-(function($) {
-
-setCommentsList = function() {
- var totalInput = $('#comments-form .tablenav :input[name="_total"]');
- var perPageInput = $('#comments-form .tablenav :input[name="_per_page"]');
- var pageInput = $('#comments-form .tablenav :input[name="_page"]');
- var lastConfidentTime = 0;
-
- var dimAfter = function( r, settings ) {
- var c = $('#' + settings.element);
-
- if ( c.is('.unapproved') )
- c.find('div.comment_status').html('0')
- else
- c.find('div.comment_status').html('1')
-
- $('span.pending-count').each( function() {
- var a = $(this);
- var n = a.html().replace(/[ ,.]+/g, '');
- n = parseInt(n,10);
- if ( isNaN(n) ) return;
- n = n + ( $('#' + settings.element).is('.' + settings.dimClass) ? 1 : -1 );
- if ( n < 0 ) { n = 0; }
- $('#awaiting-mod')[ 0 == n ? 'addClass' : 'removeClass' ]('count-0');
- n = n.toString();
- if ( n.length > 3 )
- n = n.substr(0, n.length-3)+' '+n.substr(-3);
- a.html(n);
- });
- };
-
- // Send current total, page, per_page and url
- var delBefore = function( settings ) {
- settings.data._total = totalInput.val();
- settings.data._per_page = perPageInput.val();
- settings.data._page = pageInput.val();
- settings.data._url = document.location.href;
- return settings;
- };
-
- /* Updates the current total (as displayed visibly)
- */
- var updateTotalCount = function( total, time, setConfidentTime ) {
- if ( time < lastConfidentTime ) {
- return;
- }
- totalInput.val( total.toString() );
- if ( setConfidentTime ) {
- lastConfidentTime = time;
- }
- $('span.total-type-count').each( function() {
- var a = $(this);
- var n = totalInput.val().toString();
- if ( n.length > 3 )
- n = n.substr(0, n.length-3)+' '+n.substr(-3);
- a.html(n);
- });
-
- };
-
- // In admin-ajax.php, we send back the unix time stamp instead of 1 on success
- var delAfter = function( r, settings ) {
- $('span.pending-count').each( function() {
- var a = $(this);
- var n = a.html().replace(/[ ,.]+/g, '');
- n = parseInt(n,10);
- if ( isNaN(n) ) return;
- if ( $('#' + settings.element).is('.unapproved') ) { // we deleted a formerly unapproved comment
- n = n - 1;
- } else if ( $(settings.target).parents( 'span.unapprove' ).size() ) { // we "deleted" an approved comment from the approved list by clicking "Unapprove"
- n = n + 1;
- }
- if ( n < 0 ) { n = 0; }
- $('#awaiting-mod')[ 0 == n ? 'addClass' : 'removeClass' ]('count-0');
- n = n.toString();
- if ( n.length > 3 )
- n = n.substr(0, n.length-3)+' '+n.substr(-3);
- a.html(n);
- });
-
- $('span.spam-count').each( function() {
- var a = $(this);
- var n = a.html().replace(/[ ,.]+/g, '');
- n = parseInt(n,10);
- if ( isNaN(n) ) return;
- if ( $(settings.target).parents( 'span.spam' ).size() ) { // we marked a comment as spam
- n = n + 1;
- } else if ( $('#' + settings.element).is('.spam') ) { // we approved or deleted a comment marked as spam
- n = n - 1;
- }
- if ( n < 0 ) { n = 0; }
- n = n.toString();
- if ( n.length > 3 )
- n = n.substr(0, n.length-3)+' '+n.substr(-3);
- a.html(n);
- });
-
-
- // XML response
- if ( ( 'object' == typeof r ) && lastConfidentTime < settings.parsed.responses[0].supplemental.time ) {
- // Set the total to the known good value (even if this value is a little old, newer values should only be a few less, and so shouldn't mess up the page links)
- updateTotalCount( settings.parsed.responses[0].supplemental.total, settings.parsed.responses[0].supplemental.time, true );
- if ( $.trim( settings.parsed.responses[0].supplemental.pageLinks ) ) {
- $('.tablenav-pages').find( '.page-numbers' ).remove().end().append( $( settings.parsed.responses[0].supplemental.pageLinks ) );
- } else if ( 'undefined' != typeof settings.parsed.responses[0].supplemental.pageLinks ) {
- $('.tablenav-pages').find( '.page-numbers' ).remove();
- }
- } else {
- // Decrement the total
- var total = parseInt( totalInput.val(), 10 );
- if ( total-- < 0 )
- total = 0;
- updateTotalCount( total, r, false );
- }
-
- if ( theExtraList.size() == 0 || theExtraList.children().size() == 0 ) {
- return;
- }
-
- theList.get(0).wpList.add( theExtraList.children(':eq(0)').remove().clone() );
- $('#get-extra-comments').submit();
- };
-
- theExtraList = $('#the-extra-comment-list').wpList( { alt: '', delColor: 'none', addColor: 'none' } );
- theList = $('#the-comment-list').wpList( { alt: '', delBefore: delBefore, dimAfter: dimAfter, delAfter: delAfter, addColor: 'none' } );
-
-};
-
-$(document).ready(function(){
- setCommentsList();
-});
-
-commentReply = {
-
- init : function() {
- var row = $('#replyrow');
-
- $('a.cancel', row).click(function() { return commentReply.revert(); });
- $('a.save', row).click(function() { return commentReply.send(this); });
-
- // add events
- $('#the-comment-list .column-comment > p').dblclick(function(){
- commentReply.toggle($(this).parent());
- });
-
- $('#doaction, #doaction2, #post-query-submit').click(function(e){
- if ( $('#the-comment-list #replyrow').length > 0 )
- t.close();
- });
-
- },
-
- addEvents : function(r) {
- r.each(function() {
- $(this).find('.column-comment > p').dblclick(function(){
- commentReply.toggle($(this).parent());
- });
- });
- },
-
- toggle : function(el) {
- if ( $(el).css('display') != 'none' )
- $(el).find('a.vim-q').click();
- },
-
- revert : function() {
-
- if ( $('#the-comment-list #replyrow').length < 1 )
- return false;
-
- $('#replyrow').fadeOut('fast', function(){
- commentReply.close();
- });
-
- return false;
- },
-
- close : function() {
- $(this.o).fadeIn('fast').css('backgroundColor', '');
- $('#com-reply').append( $('#replyrow') );
- $('#replycontent').val('');
- $('#edithead input').val('');
- $('#replysubmit .error').html('').hide();
- $('#replysubmit .waiting').hide();
- if ( $.browser.msie )
- $('#replycontainer, #replycontent').css('height', '120px');
- else
- $('#replycontainer').resizable('destroy').css('height', '120px');
- },
-
- open : function(id, p, a) {
- var t = this;
- t.close();
- t.o = '#comment-'+id;
-
- $('#replyrow td').attr('colspan', $('.widefat thead th:visible').length);
- var editRow = $('#replyrow'), rowData = $('#inline-'+id);
- var act = t.act = (a == 'edit') ? 'edit-comment' : 'replyto-comment';
-
- $('#action', editRow).val(act);
- $('#comment_post_ID', editRow).val(p);
- $('#comment_ID', editRow).val(id);
-
- if ( a == 'edit' ) {
- $('#author', editRow).val( $('div.author', rowData).text() );
- $('#author-email', editRow).val( $('div.author-email', rowData).text() );
- $('#author-url', editRow).val( $('div.author-url', rowData).text() );
- $('#status', editRow).val( $('div.comment_status', rowData).text() );
- $('#replycontent', editRow).val( $('textarea.comment', rowData).val() );
- $('#edithead, #savebtn', editRow).show();
- $('#replyhead, #replybtn', editRow).hide();
-
- var h = $(t.o).height();
- if ( h > 220 )
- if ( $.browser.msie )
- $('#replycontainer, #replycontent', editRow).height(h-105);
- else
- $('#replycontainer', editRow).height(h-105);
-
- $(t.o).after(editRow.hide()).fadeOut('fast', function(){
- $('#replyrow').fadeIn('fast');
- });
- } else {
- $('#edithead, #savebtn', editRow).hide();
- $('#replyhead, #replybtn', editRow).show();
- $(t.o).after(editRow);
- $('#replyrow').hide().fadeIn('fast');
- }
-
- if ( ! $.browser.msie )
- $('#replycontainer').resizable({
- handles : 's',
- axis : 'y',
- minHeight : 80,
- stop : function() {
- $('#replycontainer').width('auto');
- }
- });
-
- setTimeout(function() {
- var rtop = $('#replyrow').offset().top;
- var rbottom = rtop + $('#replyrow').height();
- var scrollTop = window.pageYOffset || document.documentElement.scrollTop;
- var vp = document.documentElement.clientHeight || self.innerHeight || 0;
- var scrollBottom = scrollTop + vp;
-
- if ( scrollBottom - 20 < rbottom )
- window.scroll(0, rbottom - vp + 35);
- else if ( rtop - 20 < scrollTop )
- window.scroll(0, rtop - 35);
-
- $('#replycontent').focus().keyup(function(e){
- if (e.which == 27) commentReply.revert(); // close on Escape
- });
- }, 600);
-
- return false;
- },
-
- send : function() {
- var post = {};
-
- $('#replysubmit .waiting').show();
-
- $('#replyrow input').each(function() {
- post[ $(this).attr('name') ] = $(this).val();
- });
-
- post.content = $('#replycontent').val();
- post.id = post.comment_post_ID;
-
- $.ajax({
- type : 'POST',
- url : wpListL10n.url,
- data : post,
- success : function(x) { commentReply.show(x); },
- error : function(r) { commentReply.error(r); }
- });
-
- return false;
- },
-
- show : function(xml) {
-
- if ( typeof(xml) == 'string' ) {
- this.error({'responseText': xml});
- return false;
- }
-
- var r = wpAjax.parseAjaxResponse(xml);
- if ( r.errors ) {
- this.error({'responseText': wpAjax.broken});
- return false;
- }
-
- if ( 'edit-comment' == this.act )
- $(this.o).remove();
-
- r = r.responses[0];
- var c = r.data;
-
- $(c).hide()
- $('#replyrow').after(c);
- this.o = id = '#comment-'+r.id;
- this.revert();
- this.addEvents($(id));
- var bg = $(id).hasClass('unapproved') ? '#ffffe0' : '#fff';
-
- $(id)
- .animate( { 'backgroundColor':'#CCEEBB' }, 600 )
- .animate( { 'backgroundColor': bg }, 600 );
-
- $.fn.wpList.process($(id))
- },
-
- error : function(r) {
- var er = r.statusText;
-
- $('#replysubmit .waiting').hide();
-
- if ( r.responseText )
- er = r.responseText.replace( /<.[^<>]*?>/g, '' );
-
- if ( er )
- $('#replysubmit .error').html(er).show();
-
- }
-};
-toggleWithKeyboard = false;
-$(document).ready(function(){
- columns.init('edit-comments');
- commentReply.init();
-
- if ( typeof QTags != 'undefined' )
- ed_reply = new QTags('ed_reply', 'replycontent', 'replycontainer', 'more');
-
- if ( typeof $.table_hotkeys != 'undefined' ) {
- var make_hotkeys_redirect = function(which) {
- return function() {
- var first_last = 'next' == which? 'first' : 'last';
- var l=$('.'+which+'.page-numbers');
- if (l.length)
- window.location = l[0].href.replace(/\&hotkeys_highlight_(first|last)=1/g, '')+'&hotkeys_highlight_'+first_last+'=1';
- }
- };
- var edit_comment = function(event, current_row) {
- window.location = $('span.edit a', current_row).attr('href');
- };
- var toggle_all = function() {
- toggleWithKeyboard = true;
- var master_checkbox = $('form#comments-form .check-column :checkbox:first');
- master_checkbox.click().attr('checked', '');
- toggleWithKeyboard = false;
- }
- var make_bulk = function(value) {
- return function(event, _) {
- $('option[value='+value+']').attr('selected', 'selected');
- $('form#comments-form')[0].submit();
- }
- };
- $.table_hotkeys($('table.widefat'),['a', 'u', 's', 'd', 'r', 'q', ['e', edit_comment],
- ['shift+a', make_bulk('approve')], ['shift+s', make_bulk('markspam')],
- ['shift+d', make_bulk('delete')], ['shift+x', toggle_all],
- ['shift+u', make_bulk('unapprove')]],
- {highlight_first: adminCommentsL10n.hotkeys_highlight_first, highlight_last: adminCommentsL10n.hotkeys_highlight_last,
- prev_page_link_cb: make_hotkeys_redirect('prev'), next_page_link_cb: make_hotkeys_redirect('next')}
- );
- }
-});
-
-})(jQuery);
+var theList,theExtraList;(function(a){setCommentsList=function(){var g,i,h,f=0,c,e,d,b;g=a('#comments-form .tablenav :input[name="_total"]');i=a('#comments-form .tablenav :input[name="_per_page"]');h=a('#comments-form .tablenav :input[name="_page"]');c=function(k,j){var l=a("#"+j.element);if(l.is(".unapproved")){l.find("div.comment_status").html("0")}else{l.find("div.comment_status").html("1")}a("span.pending-count").each(function(){var m=a(this),o;o=m.html().replace(/[ ,.]+/g,"");o=parseInt(o,10);if(isNaN(o)){return}o=o+(a("#"+j.element).is("."+j.dimClass)?1:-1);if(o<0){o=0}a("#awaiting-mod")[0==o?"addClass":"removeClass"]("count-0");o=o.toString();if(o.length>3){o=o.substr(0,o.length-3)+" "+o.substr(-3)}m.html(o)})};e=function(j){j.data._total=g.val();j.data._per_page=i.val();j.data._page=h.val();j.data._url=document.location.href;return j};d=function(j,k,l){if(k3){o=o.substr(0,o.length-3)+" "+o.substr(-3)}m.html(o)})};b=function(l,j){a("span.pending-count").each(function(){var m=a(this),o;o=m.html().replace(/[ ,.]+/g,"");o=parseInt(o,10);if(isNaN(o)){return}if(a("#"+j.element).is(".unapproved")){o=o-1}else{if(a(j.target).parents("span.unapprove").size()){o=o+1}}if(o<0){o=0}a("#awaiting-mod")[0==o?"addClass":"removeClass"]("count-0");o=o.toString();if(o.length>3){o=o.substr(0,o.length-3)+" "+o.substr(-3)}m.html(o)});a("span.spam-count").each(function(){var m=a(this),o;o=m.html().replace(/[ ,.]+/g,"");o=parseInt(o,10);if(isNaN(o)){return}if(a(j.target).parents("span.spam").size()){o=o+1}else{if(a("#"+j.element).is(".spam")){o=o-1}}if(o<0){o=0}o=o.toString();if(o.length>3){o=o.substr(0,o.length-3)+" "+o.substr(-3)}m.html(o)});if(("object"==typeof l)&&f p").dblclick(function(){commentReply.toggle(a(this).parent())});a("#doaction, #doaction2, #post-query-submit").click(function(c){if(a("#the-comment-list #replyrow").length>0){commentReply.close()}})},addEvents:function(b){b.each(function(){a(this).find(".column-comment > p").dblclick(function(){commentReply.toggle(a(this).parent())})})},toggle:function(b){if(a(b).css("display")!="none"){a(b).find("a.vim-q").click()}},revert:function(){if(a("#the-comment-list #replyrow").length<1){return false}a("#replyrow").fadeOut("fast",function(){commentReply.close()});return false},close:function(){a(this.o).fadeIn("fast").css("backgroundColor","");a("#com-reply").append(a("#replyrow"));a("#replycontent").val("");a("#edithead input").val("");a("#replysubmit .error").html("").hide();a("#replysubmit .waiting").hide();if(a.browser.msie){a("#replycontainer, #replycontent").css("height","120px")}else{a("#replycontainer").resizable("destroy").css("height","120px")}},open:function(i,g,c){var e=this,d,b,f;e.close();e.o="#comment-"+i;a("#replyrow td").attr("colspan",a(".widefat thead th:visible").length);d=a("#replyrow"),rowData=a("#inline-"+i);b=e.act=(c=="edit")?"edit-comment":"replyto-comment";a("#action",d).val(b);a("#comment_post_ID",d).val(g);a("#comment_ID",d).val(i);if(c=="edit"){a("#author",d).val(a("div.author",rowData).text());a("#author-email",d).val(a("div.author-email",rowData).text());a("#author-url",d).val(a("div.author-url",rowData).text());a("#status",d).val(a("div.comment_status",rowData).text());a("#replycontent",d).val(a("textarea.comment",rowData).val());a("#edithead, #savebtn",d).show();a("#replyhead, #replybtn",d).hide();f=a(e.o).height();if(f>220){if(a.browser.msie){a("#replycontainer, #replycontent",d).height(f-105)}else{a("#replycontainer",d).height(f-105)}}a(e.o).after(d.hide()).fadeOut("fast",function(){a("#replyrow").fadeIn("fast")})}else{a("#edithead, #savebtn",d).hide();a("#replyhead, #replybtn",d).show();a(e.o).after(d);a("#replyrow").hide().fadeIn("fast")}if(!a.browser.msie){a("#replycontainer").resizable({handles:"s",axis:"y",minHeight:80,stop:function(){a("#replycontainer").width("auto")}})}setTimeout(function(){var l,j,m,h,k;l=a("#replyrow").offset().top;j=l+a("#replyrow").height();m=window.pageYOffset||document.documentElement.scrollTop;h=document.documentElement.clientHeight||self.innerHeight||0;k=m+h;if(k-20]*?>/g,"")}if(c){a("#replysubmit .error").html(c).show()}}};toggleWithKeyboard=false;a(document).ready(function(){var e,b,c,d;columns.init("edit-comments");commentReply.init();if(typeof QTags!="undefined"){ed_reply=new QTags("ed_reply","replycontent","replycontainer","more")}if(typeof a.table_hotkeys!="undefined"){e=function(f){return function(){var h,g;h="next"==f?"first":"last";g=a("."+f+".page-numbers");if(g.length){window.location=g[0].href.replace(/\&hotkeys_highlight_(first|last)=1/g,"")+"&hotkeys_highlight_"+h+"=1"}}};b=function(g,f){window.location=a("span.edit a",f).attr("href")};c=function(){toggleWithKeyboard=true;var f=a("form#comments-form .check-column :checkbox:first");f.click().attr("checked","");toggleWithKeyboard=false};d=function(f){return function(h,g){a("option[value="+f+"]").attr("selected","selected");a("form#comments-form")[0].submit()}};a.table_hotkeys(a("table.widefat"),["a","u","s","d","r","q",["e",b],["shift+a",d("approve")],["shift+s",d("markspam")],["shift+d",d("delete")],["shift+x",c],["shift+u",d("unapprove")]],{highlight_first:adminCommentsL10n.hotkeys_highlight_first,highlight_last:adminCommentsL10n.hotkeys_highlight_last,prev_page_link_cb:e("prev"),next_page_link_cb:e("next")})}})})(jQuery);
\ No newline at end of file
diff --git a/wp-admin/js/editor.dev.js b/wp-admin/js/editor.dev.js
new file mode 100644
index 0000000000..74b141158e
--- /dev/null
+++ b/wp-admin/js/editor.dev.js
@@ -0,0 +1,168 @@
+
+var switchEditors = {
+
+ mode : '',
+
+ I : function(e) {
+ return document.getElementById(e);
+ },
+
+ edInit : function() {
+ var h = tinymce.util.Cookie.getHash("TinyMCE_content_size");
+
+ // Activate TinyMCE if it's the user's default editor
+ if ( getUserSetting( 'editor' ) == 'html' ) {
+ if ( h )
+ try { this.I('content').style.height = h.ch - 30 + 'px'; } catch(e){};
+ } else {
+ try {
+ this.I("quicktags").style.display = "none";
+ } catch(e){};
+ tinyMCE.execCommand("mceAddControl", false, "content");
+ }
+ },
+
+ saveCallback : function(el, content, body) {
+
+ if ( tinyMCE.activeEditor.isHidden() )
+ content = this.I(el).value;
+ else
+ content = this.pre_wpautop(content);
+
+ return content;
+ },
+
+ pre_wpautop : function(content) {
+ var blocklist1, blocklist2;
+
+ // Protect pre|script tags
+ content = content.replace(/<(pre|script)[^>]*>[\s\S]+?<\/\1>/g, function(a) {
+ a = a.replace(/
[\r\n]*/g, '');
+ return a.replace(/<\/?p( [^>]*)?>[\r\n]*/g, '');
+ });
+
+ // Pretty it up for the source editor
+ blocklist1 = 'blockquote|ul|ol|li|table|thead|tbody|tr|th|td|div|h[1-6]|p';
+ content = content.replace(new RegExp('\\s*('+blocklist1+')>\\s*', 'mg'), '$1>\n');
+ content = content.replace(new RegExp('\\s*<(('+blocklist1+')[^>]*)>', 'mg'), '\n<$1>');
+
+ // Mark
if it has any attributes.
+ content = content.replace(new RegExp('(]+>.*?)
', 'mg'), '$1');
+
+ // Sepatate containing
+ content = content.replace(new RegExp('
]*)>\\s*
', 'mgi'), '
\n\n');
+
+ // Remove
and
+ content = content.replace(new RegExp('\\s*
', 'mgi'), '');
+ content = content.replace(new RegExp('\\s*
\\s*', 'mgi'), '\n\n');
+ content = content.replace(new RegExp('\\n\\s*\\n', 'mgi'), '\n\n');
+ content = content.replace(new RegExp('\\s*
\\s*', 'gi'), '\n');
+
+ // Fix some block element newline issues
+ content = content.replace(new RegExp('\\s*
\\s*', 'mg'), '
\n');
+ content = content.replace(new RegExp('\\s*\\[caption([^\\[]+)\\[/caption\\]\\s*', 'gi'), '\n\n[caption$1[/caption]\n\n');
+ content = content.replace(new RegExp('caption\\]\\n\\n+\\[caption', 'g'), 'caption]\n\n[caption');
+
+ blocklist2 = 'blockquote|ul|ol|li|table|thead|tr|th|td|h[1-6]|pre';
+ content = content.replace(new RegExp('\\s*<(('+blocklist2+') ?[^>]*)\\s*>', 'mg'), '\n<$1>');
+ content = content.replace(new RegExp('\\s*('+blocklist2+')>\\s*', 'mg'), '$1>\n');
+ content = content.replace(new RegExp('
]*)>', 'g'), '\t');
+
+ if ( content.indexOf('