function run() {
CRM_Utils_System::setTitle(ts('API explorer and generator'));
CRM_Core_Resources::singleton()
- ->addScriptFile('civicrm', 'templates/CRM/Admin/Page/APIExplorer.js')
- ->addScriptUrl('//cdnjs.cloudflare.com/ajax/libs/prettify/r298/prettify.min.js', 99)
- ->addStyleUrl('//cdnjs.cloudflare.com/ajax/libs/prettify/r298/prettify.min.css', 99);
+ ->addScriptFile('civicrm', 'templates/CRM/Admin/Page/APIExplorer.js', 1, 'html-header')
+ ->addScriptUrl('//cdnjs.cloudflare.com/ajax/libs/prettify/r298/prettify.min.js', 99, 'html-header')
+ ->addStyleUrl('//cdnjs.cloudflare.com/ajax/libs/prettify/r298/prettify.min.css', 99, 'html-header');
$this->assign('operators', CRM_Core_DAO::acceptedSQLOperators());
return parent::run();
}
'kcfinderPath' => $config->userFrameworkResourceURL .'packages' .DIRECTORY_SEPARATOR
)
);
- $resources->addScriptFile('civicrm', 'templates/CRM/Badge/Form/Layout.js');
+ $resources->addScriptFile('civicrm', 'templates/CRM/Badge/Form/Layout.js', 1, 'html-header');
$this->applyFilter('__ALL__', 'trim');
$this->_profileId = CRM_Batch_BAO_Batch::getProfileId($this->_batchInfo['type_id']);
}
CRM_Core_Resources::singleton()
- ->addScriptFile('civicrm', 'templates/CRM/Batch/Form/Entry.js')
+ ->addScriptFile('civicrm', 'templates/CRM/Batch/Form/Entry.js', 1, 'html-header')
->addSetting(array('batch' => array('type_id' => $this->_batchInfo['type_id'])))
->addSetting(array('setting' => array('monetaryThousandSeparator' => CRM_Core_Config::singleton()->monetaryThousandSeparator)))
->addSetting(array('setting' => array('monetaryDecimalPoint' => CRM_Core_Config::singleton()->monetaryDecimalPoint)));
}
$form->assign_by_ref('tabHeader', $tabs);
CRM_Core_Resources::singleton()
- ->addScriptFile('civicrm', 'templates/CRM/common/TabHeader.js')
+ ->addScriptFile('civicrm', 'templates/CRM/common/TabHeader.js', 1, 'html-header')
->addSetting(array('tabSettings' => array(
'active' => self::getCurrentTab($tabs),
)));
$this->buildTabs();
}
CRM_Core_Resources::singleton()
- ->addScriptFile('civicrm', 'templates/CRM/common/TabHeader.js')
+ ->addScriptFile('civicrm', 'templates/CRM/common/TabHeader.js', 1, 'html-header')
->addSetting(array('tabSettings' => array(
'active' => strtolower(CRM_Utils_Array::value('subPage', $_GET, 'campaign')),
)));
$this->assign('subPageType', $subPageType);
CRM_Core_Resources::singleton()
- ->addScriptFile('civicrm', 'templates/CRM/common/TabHeader.js')
+ ->addScriptFile('civicrm', 'templates/CRM/common/TabHeader.js', 1, 'html-header')
->addSetting(array('tabSettings' => array(
'active' => strtolower(CRM_Utils_Array::value('subPage', $_GET, 'reserve')),
)));
}
CRM_Core_Resources::singleton()
- ->addScriptFile('civicrm', 'js/crm.livePage.js')
- ->addScriptFile('civicrm', 'templates/CRM/Case/Form/CaseView.js');
+ ->addScriptFile('civicrm', 'js/crm.livePage.js', 1, 'html-header')
+ ->addScriptFile('civicrm', 'templates/CRM/Case/Form/CaseView.js', 2, 'html-header');
$xmlProcessor = new CRM_Case_XMLProcessor_Process();
$caseRoles = $xmlProcessor->get($this->_caseType, 'CaseRoles');
}
// Add javascript
CRM_Core_Resources::singleton()
- ->addScriptFile('civicrm', 'templates/CRM/Contact/Form/Search/Builder.js')
+ ->addScriptFile('civicrm', 'templates/CRM/Contact/Form/Search/Builder.js', 1, 'html-header')
->addSetting(array(
'searchBuilder' => array(
// Index of newly added/expanded block (1-based index)
function view() {
// Add js for tabs, in-place editing, and jstree for tags
CRM_Core_Resources::singleton()
- ->addScriptFile('civicrm', 'templates/CRM/Contact/Page/View/Summary.js')
+ ->addScriptFile('civicrm', 'templates/CRM/Contact/Page/View/Summary.js', 2, 'html-header')
->addScriptFile('civicrm', 'packages/jquery/plugins/jstree/jquery.jstree.js', 0, 'html-header', FALSE)
->addStyleFile('civicrm', 'packages/jquery/plugins/jstree/themes/default/style.css', 0, 'html-header')
- ->addScriptFile('civicrm', 'templates/CRM/common/TabHeader.js')
+ ->addScriptFile('civicrm', 'templates/CRM/common/TabHeader.js', 1, 'html-header')
->addSetting(array(
'summaryPrint' => array('mode' => $this->_print),
'tabSettings' => array('active' => CRM_Utils_Request::retrieve('selectedChild', 'String', $this, FALSE, 'summary')),
}
$form->assign_by_ref('tabHeader', $tabs);
CRM_Core_Resources::singleton()
- ->addScriptFile('civicrm', 'templates/CRM/common/TabHeader.js')
+ ->addScriptFile('civicrm', 'templates/CRM/common/TabHeader.js', 1, 'html-header')
->addSetting(array('tabSettings' => array(
'active' => self::getCurrentTab($tabs),
)));
$chartForm->setEmbedded(TRUE);
$chartForm->process();
$chartForm->run();
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'templates/CRM/Contribute/Page/DashBoard.js');
+ CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'templates/CRM/Contribute/Page/DashBoard.js', 1, 'html-header');
return parent::run();
}
$this->assign('selectable', $autoCompleteField['id_field']);
$this->addEntityRef($autoCompleteField['id_field'], NULL, array('placeholder' => $autoCompleteField['placeholder'], 'api' => $autoCompleteField['api']));
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/AlternateContactSelector.js')
+ CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/AlternateContactSelector.js', 1, 'html-header')
->addSetting(array(
'form' => array('autocompletes' => $autoCompleteField),
'ids' => array('profile' => $profiles),
$this->assign('includeWysiwygEditor', TRUE);
}
- $resources->addScriptFile('civicrm', 'js/crm.searchForm.js');
+ $resources->addScriptFile('civicrm', 'js/crm.searchForm.js', 1, 'html-header');
$this->addButtons(array(
array(
if ($this->useLivePageJS &&
CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajaxPopupsEnabled', NULL, TRUE))
{
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
+ CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js', 1, 'html-header');
$this->assign('includeWysiwygEditor', TRUE);
}
$this->assign('qunitTpl', "qunit/$suite/test.tpl");
}
if (file_exists("$path/tests/qunit/$suite/test.js")) {
- CRM_Core_Resources::singleton()->addScriptFile($ext, "tests/qunit/$suite/test.js", 1000);
+ CRM_Core_Resources::singleton()->addScriptFile($ext, "tests/qunit/$suite/test.js", 1000, 'html-header');
}
CRM_Utils_System::setTitle(ts('QUnit: %2 (%1)', array(1 => $ext, 2 => $suite)));
CRM_Core_Resources::singleton()
- ->addScriptFile('civicrm', 'packages/qunit/qunit.js')
- ->addStyleFile('civicrm', 'packages/qunit/qunit.css');
+ ->addScriptFile('civicrm', 'packages/qunit/qunit.js', 1, 'html-header')
+ ->addStyleFile('civicrm', 'packages/qunit/qunit.css', 1, 'html-header');
parent::run();
}
function browse() {
$resourceManager = CRM_Core_Resources::singleton();
if (!empty($_GET['new']) && $resourceManager->ajaxPopupsEnabled) {
- $resourceManager->addScriptFile('civicrm', 'js/crm.addNew.js', 999);
+ $resourceManager->addScriptFile('civicrm', 'js/crm.addNew.js', 999, 'html-header');
}
$customField = array();
}
$form->assign_by_ref('tabHeader', $tabs);
CRM_Core_Resources::singleton()
- ->addScriptFile('civicrm', 'templates/CRM/common/TabHeader.js')
+ ->addScriptFile('civicrm', 'templates/CRM/common/TabHeader.js', 1, 'html-header')
->addSetting(array('tabSettings' => array(
'active' => self::getCurrentTab($tabs),
)));
function browse() {
$resourceManager = CRM_Core_Resources::singleton();
if (!empty($_GET['new']) && $resourceManager->ajaxPopupsEnabled) {
- $resourceManager->addScriptFile('civicrm', 'js/crm.addNew.js', 999);
+ $resourceManager->addScriptFile('civicrm', 'js/crm.addNew.js', 999, 'html-header');
}
$priceField = array();
} elseif (!empty($this->_multiRecordFields)
&& (!$this->_multiRecord || !in_array($this->_multiRecord, array(CRM_Core_Action::DELETE, CRM_Core_Action::UPDATE)) )) {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
+ CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js', 1, 'html-header');
//multirecord listing page
$multiRecordFieldListing = TRUE;
$page = new CRM_Profile_Page_MultipleRecordFieldsListing();
function browse() {
$resourceManager = CRM_Core_Resources::singleton();
if (!empty($_GET['new']) && $resourceManager->ajaxPopupsEnabled) {
- $resourceManager->addScriptFile('civicrm', 'js/crm.addNew.js', 999);
+ $resourceManager->addScriptFile('civicrm', 'js/crm.addNew.js', 999, 'html-header');
}
$ufField = array();