Skip to content

Commit

Permalink
added location in admin layout's head for developers to inject anythi…
Browse files Browse the repository at this point in the history
…ng they want. E.g. this could be used to inject custom_wymeditor_boot_options which are now supported by boot_wym, say for changing the wymeditor skin or specifying more items for the CSS option.
  • Loading branch information
parndt committed Dec 14, 2009
1 parent 3d9fc35 commit c226512
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.5.25
0.9.5.26
11 changes: 6 additions & 5 deletions public/javascripts/refinery/boot_wym.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
jQuery.noConflict();
var wymeditor_inputs = [];
var wymeditors_loaded = 0;
var wymeditor_boot_options = {
// supply custom_wymeditor_boot_options if you want to override anything here.
if (typeof(custom_wymeditor_boot_options) == "undefined") { custom_wymeditor_boot_options = {}; }
var wymeditor_boot_options = jQuery.extend({
skin: 'refinery'
, basePath: "/javascripts/wymeditor/"
, wymPath: "/javascripts/wymeditor/jquery.refinery.wymeditor.js"
, cssSkinPath: "/stylesheets/wymeditor/skins/"
, jsSkinPath: "/javascripts/wymeditor/skins/"
, langPath: "/javascripts/wymeditor/lang/"
, langPath: "/javascripts/wymeditor/lang/"
, iframeBasePath: '/'
, toolsItems: [
{'name': 'Bold', 'title': 'Bold', 'css': 'wym_tools_strong'}
Expand All @@ -19,7 +20,7 @@ var wymeditor_boot_options = {
,{'name': 'InsertImage', 'title': 'Image', 'css': 'wym_tools_image'}
,{'name': 'InsertTable', 'title': 'Table', 'css': 'wym_tools_table'}
,{'name': 'ToggleHtml', 'title': 'HTML', 'css': 'wym_tools_html'}
,{'name': 'Paste', 'title': 'Paste_From_Word', 'css': 'wym_tools_paste'}
,{'name': 'Paste', 'title': 'Paste_From_Word', 'css': 'wym_tools_paste'}
]

,toolsHtml: "<ul class='wym_tools wym_section'>" + WYMeditor.TOOLS_ITEMS + WYMeditor.CLASSES + "</ul>"
Expand Down Expand Up @@ -140,7 +141,7 @@ var wymeditor_boot_options = {
WYMeditor.loaded();
}
}
};
}, custom_wymeditor_boot_options);

// custom function added by us to hook into when all wymeditor instances on the page have finally loaded:
WYMeditor.loaded = function(){};
Expand Down
1 change: 1 addition & 0 deletions vendor/plugins/refinery/app/views/admin/_head.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<%= RefinerySetting.find_or_set(:site_name, 'Company Name').titleize %> - Refinery
</title>
<%= stylesheet_link_tag 'refinery/thickbox', 'refinery/refinery', 'refinery/tooltips' %>
<%= render :partial => "/shared/admin/head_before_javascript_libraries" %>
<% if RefinerySetting.find_or_set(:use_google_ajax_libraries, true) %>
<% unless local_request? %>
<script type='text/javascript' src="http://www.google.com/jsapi"></script>
Expand Down
Empty file.

0 comments on commit c226512

Please sign in to comment.