$jsWeight = -9999;
foreach ($files as $file => $type) {
if ($type == 'js') {
- $this->addScriptFile('civicrm', $file, $jsWeight++, $region, FALSE);
+ // Don't bother looking for ts() calls in packages, there aren't any
+ $translate = (substr($file, 0, 9) != 'packages/');
+ $this->addScriptFile('civicrm', $file, $jsWeight++, $region, $translate);
}
elseif ($type == 'css') {
$this->addStyleFile('civicrm', $file, -100, $region);
{literal}
var CRM = CRM || {};
CRM = cj.extend(true, {
- strings: {{/literal}
- '- select -': '{ts escape="js"}- select -{/ts}',
- Ok: '{ts escape="js"}Ok{/ts}',
- Cancel: '{ts escape="js"}Cancel{/ts}',
- Yes: '{ts escape="js"}Yes{/ts}',
- No: '{ts escape="js"}No{/ts}',
- Saved: '{ts escape="js"}Saved{/ts}',
- Error: '{ts escape="js"}Error{/ts}',
- Removed: '{ts escape="js"}Removed{/ts}'
- {literal}},
+ strings: {},
config: {{/literal}
urlIsPublic: {if $urlIsPublic}true{else}false{/if},
userFramework: '{$config->userFramework}',