Make jCrop compatible with noConflict. Props nbachiyski. fixes #9375

git-svn-id: http://svn.automattic.com/wordpress/trunk@10863 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-04-03 18:18:47 +00:00
parent ef9237e7b0
commit d859e9dd3b
4 changed files with 6 additions and 153 deletions

View File

@ -242,7 +242,7 @@ class Custom_Image_Header {
} }
} }
$('#upload').Jcrop({ jQuery('#upload').Jcrop({
aspectRatio: ratio, aspectRatio: ratio,
setSelect: [ 0, 0, xinit, yinit ], setSelect: [ 0, 0, xinit, yinit ],
onSelect: onEndCrop onSelect: onEndCrop

View File

@ -27,7 +27,7 @@
* }}} * }}}
*/ */
(function($) {
$.Jcrop = function(obj,opt) $.Jcrop = function(obj,opt)
{ {
// Initialization {{{ // Initialization {{{
@ -1080,5 +1080,5 @@ $.fn.Jcrop = function(options)/*{{{*/
// Return "this" so we're chainable a la jQuery plugin-style! // Return "this" so we're chainable a la jQuery plugin-style!
return this; return this;
}; };
/*}}}*/ })(jQuery);
/*}}}*/

File diff suppressed because one or more lines are too long

View File

@ -167,7 +167,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20090123'); $scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20090123');
$scripts->add_data( 'thickbox', 'group', 1 ); $scripts->add_data( 'thickbox', 'group', 1 );
$scripts->add( 'jcrop', "/wp-includes/js/jcrop/jquery.Jcrop$suffix.js", array('jquery'), '0.9.5'); $scripts->add( 'jcrop', "/wp-includes/js/jcrop/jquery.Jcrop$suffix.js", array('jquery'), '0.9.5-1');
if ( defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ) { if ( defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ) {
$scripts->add( 'swfupload', '/wp-includes/js/swfupload/swfupload.js', false, '2.2.0-20081031'); $scripts->add( 'swfupload', '/wp-includes/js/swfupload/swfupload.js', false, '2.2.0-20081031');