Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added a "plugin_media_handler_url" option, makes things more DRY and …

…less hardcoded
  • Loading branch information...
commit 69a50fe4f84334b3032824f7cdf1ba7021c9ab5d 1 parent 05711bb
Peter-Jakob Cosoroaba authored
3  assets/config/initializers/tiny_mce_plus_config.rb
View
@@ -29,7 +29,7 @@ module ApplicationConfiguration
:plugins => %w{media preview curblyadvimage inlinepopups safari paste},
:plugin_preview_pageurl => '../../../../../posts/preview',
:plugin_preview_width => "950",
- :plugin_preview_height => "650",
+ :plugin_preview_height => "650",
:editor_selector => "mceEditor",
:extended_valid_elements => "img[class|src|flashvars|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|obj|param|embed|scale|wmode|salign|style],embed[src|quality|scale|salign|wmode|bgcolor|width|height|name|align|type|pluginspage|flashvars],object[align<bottom?left?middle?right?top|archive|border|class|classid|codebase|codetype|data|declare|dir<ltr?rtl|height|hspace|id|lang|name|style|tabindex|title|type|usemap|vspace|width]"
}
@@ -55,6 +55,7 @@ module ApplicationConfiguration
:plugin_preview_pageurl => '../../../../../posts/preview',
:plugin_preview_width => "950",
:plugin_preview_height => "650",
+ :plugin_media_handler_url => '/attachments/manage',
:editor_selector => "mceEditor",
:extended_valid_elements => "img[class|src|flashvars|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|obj|param|embed|scale|wmode|salign|style],embed[src|quality|scale|salign|wmode|bgcolor|width|height|name|align|type|pluginspage|flashvars],object[align<bottom?left?middle?right?top|archive|border|class|classid|codebase|codetype|data|declare|dir<ltr?rtl|height|hspace|id|lang|name|style|tabindex|title|type|usemap|vspace|width]"
}
2  assets/public/javascripts/tiny_mce/plugins/curblyadvimage/image.htm
View
@@ -43,7 +43,7 @@
<fieldset>
<legend>Available Images</legend>
<script type="text/javascript">//<![CDATA[
- $.ajax({type: "GET", url: "/attachments/manage?media=print", dataType: "script"});
+ $.ajax({type: "GET", url: tinyMCE.settings.plugin_media_handler_url+ "?media=print", dataType: "script"});
//]]></script>
<div id="dynamic_images_list">
2  assets/public/javascripts/tiny_mce/plugins/curblyadvimage/js/functions.js
View
@@ -24,7 +24,7 @@ function select_thumb(element) {
function upload_callback(){
//$('#dynamic_images_list').html('');
- $.ajax({type: "GET", url: "/attachments/manage?media=print&page=1", dataType: "script"});
+ $.ajax({type: "GET", url: tinyMCE.settings.plugin_media_handler_url+"?media=print&page=1", dataType: "script"});
}
function curbly_insert_image(url, alt_text){
2  assets/public/javascripts/tiny_mce/plugins/media/js/media.js
View
@@ -21,7 +21,7 @@ function select_thumb(element) {
function upload_callback(channel){
//$('#dynamic_images_list').html('');
- $.ajax({type: "GET", url: "/attachments/manage?media=video&page=1", dataType: "script"});
+ $.ajax({type: "GET", url: tinyMCE.settings.plugin_media_handler_url+"?media=video&page=1", dataType: "script"});
}
function insert_attachment(path){
2  assets/public/javascripts/tiny_mce/plugins/media/media.htm
View
@@ -40,7 +40,7 @@
<fieldset>
<legend>Available Media</legend>
<script type="text/javascript">//<![CDATA[
- $.ajax({type: "GET", url: "/attachments/manage?media=video", dataType: "script"});
+ $.ajax({type: "GET", url: tinyMCE.settings.plugin_media_handler_url+"?media=video", dataType: "script"});
//]]></script>
<div id="dynamic_images_list">
3  tiny_mce_options.yml
View
@@ -121,4 +121,5 @@
- theme_advanced_fonts
- plugin_preview_pageurl
- plugin_preview_width
-- plugin_preview_height
+- plugin_preview_height
+- plugin_media_handler_url
Please sign in to comment.
Something went wrong with that request. Please try again.