This patch allows JS Injector reactions in contexts. JS Injector is basically a minor rewrite of CSS Injector, so this patch is a minor rewrite of the CSS Injector functionality already present in context_contrib.

CommentFileSizeAuthor
jsinjector.patch1.46 KBdabblela

Comments

steven jones’s picture

Status: Active » Needs work
Issue tags: +context-2.x-rc-blocker

Quick review...

+++ new_context_contrib.module	2010-03-09 15:50:03.000000000 -0600
@@ -48,6 +48,15 @@ function context_contrib_context_reactio
+    if (module_exists('js_injector')) {

Indentation error.

+++ new_context_contrib.module	2010-03-09 15:50:03.000000000 -0600
@@ -148,3 +157,33 @@ function css_injector_context_page_react
+function _context_contrib_get_js_injector() {

I think this function is badly named, it doesn't really tell you what you are getting back.
Also it needs some doxygen explaining the return value.

+++ new_context_contrib.module	2010-03-09 15:50:03.000000000 -0600
@@ -148,3 +157,33 @@ function css_injector_context_page_react
+        drupal_add_js(file_create_path($js_rule['file_path']), 'module', $js_rule['scope'],FALSE,$js_rule['cache'], $js_rule['preprocess']);

The formatting of the whitespace on this function is wrong.

Powered by Dreditor.

steven jones’s picture

Status: Needs work » Fixed
dabblela’s picture

Thanks for the feedback! Still getting the hang of this...

Status: Fixed » Closed (fixed)
Issue tags: -context-2.x-rc-blocker

Automatically closed -- issue fixed for 2 weeks with no activity.