From 6bf85a5a8f842aa5cfe7cf450dfde0d3e2b163fa Mon Sep 17 00:00:00 2001 From: Jason May Date: Mon, 18 Jun 2012 11:41:15 -0400 Subject: [PATCH] Use jQuery instead of $ in a few places This avoids conflicts with other libraries that use $. --- lib/ckeditor/utils.rb | 4 ++-- vendor/assets/javascripts/ckeditor/config.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ckeditor/utils.rb b/lib/ckeditor/utils.rb index 2282a099e..23cdf6ed1 100644 --- a/lib/ckeditor/utils.rb +++ b/lib/ckeditor/utils.rb @@ -31,7 +31,7 @@ def js_replace(dom_id, options = {}) js = ["if (CKEDITOR.instances['#{dom_id}']) {CKEDITOR.remove(CKEDITOR.instances['#{dom_id}']);}"] js << "CKEDITOR.replace('#{dom_id}', #{js_options});" - "$(document).ready(function(){ #{js.join} });".html_safe + "jQuery(document).ready(function($){ #{js.join} });".html_safe end def js_fileuploader(uploader_type, options = {}) @@ -51,7 +51,7 @@ def js_fileuploader(uploader_type, options = {}) js_options = ActiveSupport::JSON.encode(options) - "$(document).ready(function(){ new qq.FileUploaderInput(#{js_options}); });".html_safe + "jQuery(document).ready(function($){ new qq.FileUploaderInput(#{js_options}); });".html_safe end def filethumb(filename) diff --git a/vendor/assets/javascripts/ckeditor/config.js b/vendor/assets/javascripts/ckeditor/config.js index 3f7763f2a..f6d100a02 100644 --- a/vendor/assets/javascripts/ckeditor/config.js +++ b/vendor/assets/javascripts/ckeditor/config.js @@ -65,7 +65,7 @@ CKEDITOR.editorConfig = function( config ) var dialogDefinition = ev.data.definition; var content, upload; - if ($.inArray(dialogName, ['link', 'image', 'attachment', 'flash']) > -1) { + if (jQuery.inArray(dialogName, ['link', 'image', 'attachment', 'flash']) > -1) { content = (dialogDefinition.getContents('Upload') || dialogDefinition.getContents('upload')); upload = (content == null ? null : content.get('upload'));