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

git-svn-id: https://develop.svn.wordpress.org/trunk@10863 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-04-03 18:18:47 +00:00
parent 9a238639a4
commit f544f21ad3
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');