Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Documented custom javascript.

  • Loading branch information...
commit 5e753ff24f977c55aa6fd9f39b36f76687b21ad7 1 parent fec2dd4
Alan Johnson authored
View
8 README.markdown
@@ -140,6 +140,14 @@ To add custom CSS to Control Center, simply use the custom_css config property i
Would create two links in Control Center, one to a stylesheet named custom_css_1 with a media attribute of all, and one to custom_css_2 with a media attribute of print.
+Custom JavaScript
+-----------------
+Add custom JavaScript to the Control Center interface by using the include_javascript property in the initializer. The value you set to include_javascript gets passed to the Rails javascript_include_tag helper.
+
+ ControlCenter::Config.include_javascript = [ :defaults ]
+
+This would cause the Rails default javascripts (Prototype, Scriptaculous, and application.js) to be inluded with Control Center. The scripts are included at the bottom of the body of your page, as per the YSlow guidelines.
+
Where are the tests?
--------------------
I'm usually very good about testing my code, but I wasn't sure of the best way to test something that was so interface intensive, so tests simply aren't present for the 1.0 release. Tests are one of my biggest goals for the 1.1 release.
View
2  generators/control_center/templates/control_center.rb
@@ -11,4 +11,4 @@
# }
# Custom JavaScript Includes
-#ControlCenter::Config.include_javascript = %w(:defaults)
+#ControlCenter::Config.include_javascript = [:defaults]
Please sign in to comment.
Something went wrong with that request. Please try again.