From 03c3c94d1e79e74cb1c86cc2f314d744355c7ec3 Mon Sep 17 00:00:00 2001 From: azaozz Date: Fri, 15 Apr 2011 04:20:12 +0000 Subject: [PATCH] Remove redundant IE restore selection calls for TinyMCE, see #17136 git-svn-id: http://svn.automattic.com/wordpress/trunk@17639 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/js/gallery.dev.js | 8 -------- wp-admin/js/gallery.js | 2 +- wp-admin/js/media-upload.dev.js | 11 ----------- wp-admin/js/media-upload.js | 2 +- wp-includes/script-loader.php | 4 ++-- 5 files changed, 4 insertions(+), 23 deletions(-) diff --git a/wp-admin/js/gallery.dev.js b/wp-admin/js/gallery.dev.js index 4f3ce46102..1e80fd9f85 100644 --- a/wp-admin/js/gallery.dev.js +++ b/wp-admin/js/gallery.dev.js @@ -110,18 +110,10 @@ wpgallery = { return window.dialogArguments || opener || parent || top; }, - restoreSelection : function() { - var t = this; - - if (tinymce.isIE) - t.editor.selection.moveToBookmark(t.editor.windowManager.bookmark); - }, - setup : function() { var t = this, a, ed = t.editor, g, columns, link, order, orderby; if ( ! t.mcemode ) return; - t.restoreSelection(); t.el = ed.selection.getNode(); if ( t.el.nodeName != 'IMG' || ! ed.dom.hasClass(t.el, 'wpGallery') ) { diff --git a/wp-admin/js/gallery.js b/wp-admin/js/gallery.js index 06565af277..0271f1bc30 100644 --- a/wp-admin/js/gallery.js +++ b/wp-admin/js/gallery.js @@ -1 +1 @@ -jQuery(document).ready(function(c){var b,e,a,d=false;e=function(){b=c("#media-items").sortable({items:"div.media-item",placeholder:"sorthelper",axis:"y",distance:2,handle:"div.filename",stop:function(i,h){var g=c("#media-items").sortable("toArray"),f=g.length;c.each(g,function(k,l){var j=d?(f-k):(1+k);c("#"+l+" .menu_order input").val(j)})}})};sortIt=function(){var g=c(".menu_order_input"),f=g.length;g.each(function(j){var h=d?(f-j):(1+j);c(this).val(h)})};clearAll=function(f){f=f||0;c(".menu_order_input").each(function(){if(this.value=="0"||f){this.value=""}})};c("#asc").click(function(){d=false;sortIt();return false});c("#desc").click(function(){d=true;sortIt();return false});c("#clear").click(function(){clearAll(1);return false});c("#showall").click(function(){c("#sort-buttons span a").toggle();c("a.describe-toggle-on").hide();c("a.describe-toggle-off, table.slidetoggle").show();return false});c("#hideall").click(function(){c("#sort-buttons span a").toggle();c("a.describe-toggle-on").show();c("a.describe-toggle-off, table.slidetoggle").hide();return false});e();clearAll();if(c("#media-items>*").length>1){a=wpgallery.getWin();c("#save-all, #gallery-settings").show();if(typeof a.tinyMCE!="undefined"&&a.tinyMCE.activeEditor&&!a.tinyMCE.activeEditor.isHidden()){wpgallery.mcemode=true;wpgallery.init()}else{c("#insert-gallery").show()}}});jQuery(window).unload(function(){tinymce=tinyMCE=wpgallery=null});var tinymce=null,tinyMCE,wpgallery;wpgallery={mcemode:false,editor:{},dom:{},is_update:false,el:{},I:function(a){return document.getElementById(a)},init:function(){var d=this,a,f,c,e,b=d.getWin();if(!d.mcemode){return}a=(""+document.location.search).replace(/^\?/,"").split("&");f={};for(c=0;c*").length>1){a=wpgallery.getWin();c("#save-all, #gallery-settings").show();if(typeof a.tinyMCE!="undefined"&&a.tinyMCE.activeEditor&&!a.tinyMCE.activeEditor.isHidden()){wpgallery.mcemode=true;wpgallery.init()}else{c("#insert-gallery").show()}}});jQuery(window).unload(function(){tinymce=tinyMCE=wpgallery=null});var tinymce=null,tinyMCE,wpgallery;wpgallery={mcemode:false,editor:{},dom:{},is_update:false,el:{},I:function(a){return document.getElementById(a)},init:function(){var d=this,a,f,c,e,b=d.getWin();if(!d.mcemode){return}a=(""+document.location.search).replace(/^\?/,"").split("&");f={};for(c=0;c 'try{convertEntities(commentL10n);}catch(e){};' ) ); - $scripts->add( 'admin-gallery', "/wp-admin/js/gallery$suffix.js", array( 'jquery-ui-sortable' ), '20090516' ); + $scripts->add( 'admin-gallery', "/wp-admin/js/gallery$suffix.js", array( 'jquery-ui-sortable' ), '20110414' ); - $scripts->add( 'media-upload', "/wp-admin/js/media-upload$suffix.js", array( 'thickbox' ), '20110113' ); + $scripts->add( 'media-upload', "/wp-admin/js/media-upload$suffix.js", array( 'thickbox' ), '20110414' ); $scripts->add_data( 'media-upload', 'group', 1 ); $scripts->add( 'admin-widgets', "/wp-admin/js/widgets$suffix.js", array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable' ), '20101007' );