In various modules, JS variables are defined through uc_add_js() (itself a wrapper for drupal_add_js()) using the 'inline' $type. This is fine and dandy, but it might be nicer to update the modules and .js files to use the Drupal.setting object... in the modules this means changing 'inline' to 'setting' and the other parameters accordingly, and in the .js files this means updating any reference to these variables to use the settings object.

Gladly accepting patches if I don't get to this sooner than you. ; )

Comments

Island Usurper’s picture

Status: Active » Needs review

See revision 1264, and test it out. I've added namespacing to those variables so hopefully we won't clobber any other JS modules. There were a couple that I couldn't find reference to anywhere else ("methods" in uc_payment_order_pane.inc, and "uc_cart_path" in uc_cart.module).

I went ahead and deleted uc_cart_path because it looked like it was unnecessary with the changes made to the cart block previously. But I have no clue about the methods array. Is that in use any more?

Island Usurper’s picture

Status: Needs review » Fixed

It's been a couple of weeks without any problems, so I consider this issue fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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