} 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');
//multirecord listing page
$multiRecordFieldListing = TRUE;
$page = new CRM_Profile_Page_MultipleRecordFieldsListing();
$fieldDetail = reset($fields);
$fieldId = CRM_Core_BAO_CustomField::getKeyID($fieldDetail['name']);
$customGroupDetails = CRM_Core_BAO_CustomGroup::getGroupTitles(array($fieldId));
- $title = $customGroupDetails[$fieldId]['groupTitle'];
+ $multiRecTitle = $customGroupDetails[$fieldId]['groupTitle'];
} else {
$title = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_UFGroup', $this->_gid, 'title');
}
$title .= ' - ' . $displayName;
}
+ $title = isset($multiRecTitle) ? ts('View %1 Record', array(1 => $multiRecTitle)) : $title;
CRM_Utils_System::setTitle($title);
// invoke the pagRun hook, CRM-3906
class="button action-item"><span><div class="icon add-icon"></div>{ts}Add New Record{/ts}</span></a>
{/if}
{/if}
-{/if}
-{literal}
- <script type='text/javascript'>
- cj(function () {
- var dialogId = '{/literal}{$dialogId}{literal}';
- var pageViewType = '{/literal}{$pageViewType}{literal}';
- // NOTE: Triggers two events, "profile-dialog:FOO:open" and "profile-dialog:FOO:close",
- // where "FOO" is the internal name of a profile form
- function formDialog(dialogName, dataURL, dialogTitle) {
- cj.ajax({
- url: dataURL,
- success: function (content) {
- cj('#' + dialogId).show().html(content).dialog({
- title: dialogTitle,
- modal: true,
- width: 750,
- overlay: {
- opacity: 0.5,
- background: "black"
- },
- open: function(event, ui) {
- cj('#' + dialogId).trigger({
- type: "crmFormLoad",
- profileName: dialogName
- });
- },
- close: function (event, ui) {
- cj('#' + dialogId).trigger({
- type: "crmFormClose",
- profileName: dialogName
- });
- cj('#' + dialogId).html('');
- }
- });
- cj('.action-link').hide();
- if (pageViewType == 'customDataView') {
- var labelElement = cj('#custom-record-dialog .html-adjust label').css('display', 'inline');
- }
- else {
- var labelElement = cj('#profile-dialog #crm-profile-block .edit-value label').css('display', 'inline');
- }
- }
- });
- }
-
- var profileName = {/literal}"{$ufGroupName}"{literal};
-
- if (pageViewType == 'customDataView') {
- var actionItemHeirarchy = '.action-item';
- profileName = 'customRecordView';
- }
- else {
- var actionItemHeirarchy = '.crm-profile-name-' + profileName + ' .action-item';
- }
- });
- </script>
- {/literal}
+{/if}
\ No newline at end of file