*/
class CRM_ACL_Page_ACL extends CRM_Core_Page_Basic {
+ public $useLivePageJS = TRUE;
+
/**
* The action links that we need to display for the browse screen
*
* @static
*/
function browse() {
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajax_popups_enabled', NULL, TRUE)) {
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajax_popups_enabled', NULL, TRUE)) {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
- }
- }
-
// get all acl's sorted by weight
$acl = array();
$query = "
*/
class CRM_ACL_Page_EntityRole extends CRM_Core_Page_Basic {
+ public $useLivePageJS = TRUE;
+
/**
* The action links that we need to display for the browse screen
*
// finally browse the acl's
if ($action & CRM_Core_Action::BROWSE) {
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajax_popups_enabled', NULL, TRUE)) {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
- }
}
// parent run
* @static
*/
function browse() {
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajax_popups_enabled', NULL, TRUE)) {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
- }
// get all acl's sorted by weight
$entityRoles = array();
*/
class CRM_Admin_Page_ContactType extends CRM_Core_Page_Basic {
+ public $useLivePageJS = TRUE;
+
/**
* The action links that we need to display for the browse screen
*
}
function browse() {
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajax_popups_enabled', NULL, TRUE)) {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
- }
$rows = CRM_Contact_BAO_ContactType::contactTypeInfo(TRUE);
foreach ($rows as $key => $value) {
$mask = NULL;
*/
class CRM_Admin_Page_LabelFormats extends CRM_Core_Page_Basic {
+ public $useLivePageJS = TRUE;
+
/**
* The action links that we need to display for the browse screen
*
* @static
*/
function browse($action = NULL) {
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajax_popups_enabled', NULL, TRUE)) {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
- }
// Get list of configured Label Formats
$labelFormatList= CRM_Core_BAO_LabelFormat::getList();
$nameFormatList= CRM_Core_BAO_LabelFormat::getList(false, 'name_badge');
*/
class CRM_Admin_Page_LocationType extends CRM_Core_Page_Basic {
+ public $useLivePageJS = TRUE;
+
/**
* The action links that we need to display for the browse screen
*
* @return array (reference) of action links
*/
function &links() {
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajax_popups_enabled', NULL, TRUE)) {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
- }
if (!(self::$_links)) {
self::$_links = array(
CRM_Core_Action::UPDATE => array(
*/
class CRM_Admin_Page_MailSettings extends CRM_Core_Page_Basic {
+ public $useLivePageJS = TRUE;
+
/**
* The action links that we need to display for the browse screen
*
*/
class CRM_Admin_Page_MessageTemplates extends CRM_Core_Page_Basic {
+ public $useLivePageJS = TRUE;
+
/**
* The action links that we need to display for the browse screen
*
* @access public
*/
function browse() {
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajax_popups_enabled', NULL, TRUE)) {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
- }
$action = func_num_args() ? func_get_arg(0) : NULL;
if ($this->_action & CRM_Core_Action::ADD) {
return;
*/
class CRM_Admin_Page_Options extends CRM_Core_Page_Basic {
+ public $useLivePageJS = TRUE;
+
/**
* The action links that we need to display for the browse screen
*
if (!self::$_gName) {
return parent::browse();
}
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajax_popups_enabled', NULL, TRUE)) {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
- }
$groupParams = array('name' => self::$_gName);
$optionValue = CRM_Core_OptionValue::getRows($groupParams, $this->links(), 'component_id,weight');
$gName = self::$_gName;
*
*/
class CRM_Admin_Page_ParticipantStatus extends CRM_Core_Page_Basic {
+
+ public $useLivePageJS = TRUE;
function getBAOName() {
return 'CRM_Event_BAO_ParticipantStatusType';
}
}
function browse() {
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajax_popups_enabled', NULL, TRUE)) {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
- }
$statusTypes = array();
$dao = new CRM_Event_DAO_ParticipantStatusType;
*/
class CRM_Admin_Page_PdfFormats extends CRM_Core_Page_Basic {
+ public $useLivePageJS = TRUE;
+
/**
* The action links that we need to display for the browse screen
*
* @static
*/
function browse($action = NULL) {
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajax_popups_enabled', NULL, TRUE)) {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
- }
// Get list of configured PDF Page Formats
$pdfFormatList = CRM_Core_BAO_PdfFormat::getList();
*/
class CRM_Admin_Page_RelationshipType extends CRM_Core_Page_Basic {
+ public $useLivePageJS = TRUE;
+
/**
* The action links that we need to display for the browse screen
*
* @return array (reference) of action links
*/
function &links() {
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajax_popups_enabled', NULL, TRUE)) {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
- }
if (!(self::$_links)) {
self::$_links = array(
CRM_Core_Action::VIEW => array(
*/
class CRM_Admin_Page_ScheduleReminders extends CRM_Core_Page_Basic {
+ public $useLivePageJS = TRUE;
+
/**
* The action links that we need to display for the browse screen
*
* @static
*/
function browse($action = NULL) {
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajax_popups_enabled', NULL, TRUE)) {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
- }
// Get list of configured reminders
$reminderList = CRM_Core_BAO_ActionSchedule::getList();
*/
class CRM_Admin_Page_Tag extends CRM_Core_Page_Basic {
+ public $useLivePageJS = TRUE;
+
/**
* The action links that we need to display for the browse screen
*
* override function browse()
*/
function browse($action = NULL, $sort = NULL) {
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajax_popups_enabled', NULL, TRUE)) {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
- }
$adminTagSet = FALSE;
if (CRM_Core_Permission::check('administer Tagsets')) {
$adminTagSet = TRUE;
*/
class CRM_Campaign_Page_Campaign extends CRM_Core_Page {
+ public $useLivePageJS = TRUE;
+
/**
* The action links that we need to display for the browse screen
*
}
function browse() {
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajax_popups_enabled', NULL, TRUE)) {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
- }
$campaigns = CRM_Campaign_BAO_Campaign::getCampaignSummary();
*/
class CRM_Campaign_Page_Survey extends CRM_Core_Page {
+ public $useLivePageJS = TRUE;
+
private static $_actionLinks;
function &actionLinks() {
}
function browse() {
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajax_popups_enabled', NULL, TRUE)) {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
- }
$surveys = CRM_Campaign_BAO_Survey::getSurveySummary();
*/
class CRM_Campaign_Page_SurveyType extends CRM_Core_Page_Basic {
+ public $useLivePageJS = TRUE;
+
/**
* The action links that we need to display for the browse screen
*
* @static
*/
function browse() {
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajax_popups_enabled', NULL, TRUE)) {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
- }
$this->assign('includeWysiwygEditor', TRUE);
$campaingCompId = CRM_Core_Component::getComponentID('CiviCampaign');
*/
class CRM_Contribute_Page_ManagePremiums extends CRM_Core_Page_Basic {
+ public $useLivePageJS = TRUE;
+
/**
* The action links that we need to display for the browse screen
*
* @static
*/
function browse() {
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajax_popups_enabled', NULL, TRUE)) {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
- }
// get all custom groups sorted by weight
$premiums = array();
$dao = new CRM_Contribute_DAO_Product();
* @access public
*/
function browse() {
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajax_popups_enabled', NULL, TRUE)) {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
- }
-
// add annual contribution
$annual = array();
list($annual['count'],
*/
public $urlPath = array();
+ /**
+ * Should crm.livePage.js be added to the page?
+ * @var bool
+ */
+ public $useLivePageJS;
+
/**
* class constructor
*
$config = CRM_Core_Config::singleton();
- // TODO: Is there a better way to ensure these actions don't happen during AJAX requests?
- if (empty($_GET['snippet'])) {
- // Version check and intermittent alert to admins
- CRM_Utils_VersionCheck::singleton()->versionAlert();
- CRM_Utils_Check_Security::singleton()->showPeriodicAlerts();
+ // Version check and intermittent alert to admins
+ CRM_Utils_VersionCheck::singleton()->versionAlert();
+ CRM_Utils_Check_Security::singleton()->showPeriodicAlerts();
- // Debug msg once per hour
- if ($config->debug && CRM_Core_Permission::check('administer CiviCRM') && CRM_Core_Session::singleton()->timer('debug_alert', 3600)) {
- $msg = ts('Warning: Debug is enabled in <a href="%1">system settings</a>. This should not be enabled on production servers.', array(1 => CRM_Utils_System::url('civicrm/admin/setting/debug', 'reset=1')));
- CRM_Core_Session::setStatus($msg, ts('Debug Mode'));
- }
+ // Debug msg once per hour
+ if ($config->debug && CRM_Core_Permission::check('administer CiviCRM') && CRM_Core_Session::singleton()->timer('debug_alert', 3600)) {
+ $msg = ts('Warning: Debug is enabled in <a href="%1">system settings</a>. This should not be enabled on production servers.', array(1 => CRM_Utils_System::url('civicrm/admin/setting/debug', 'reset=1')));
+ CRM_Core_Session::setStatus($msg, ts('Debug Mode'));
+ }
+
+ if ($this->useLivePageJS &&
+ CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajax_popups_enabled', NULL, TRUE))
+ {
+ CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
}
$content = self::$_template->fetch('CRM/common/' . strtolower($config->userFramework) . '.tpl');
*/
class CRM_Custom_Page_Field extends CRM_Core_Page {
+ public $useLivePageJS = TRUE;
+
/**
* The group id of the field
*
* @access public
*/
function browse() {
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajax_popups_enabled', NULL, TRUE)) {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
- }
$customField = array();
$customFieldBAO = new CRM_Core_BAO_CustomField();
*/
class CRM_Custom_Page_Option extends CRM_Core_Page {
+ public $useLivePageJS = TRUE;
+
/**
* The Group id of the option
*
* @access public
*/
function browse() {
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajax_popups_enabled', NULL, TRUE)) {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
- }
//get the default value from custom fields
$customFieldBAO = new CRM_Core_BAO_CustomField();
$customFieldBAO->id = $this->_fid;
*/
class CRM_Event_Form_Participant extends CRM_Contact_Form_Task {
+ public $useLivePageJS = TRUE;
+
/**
* the values for the contribution db object
*
* @access public
*/
public function buildQuickForm() {
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajax_popups_enabled', NULL, TRUE)) {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
- }
$participantStatuses = CRM_Event_PseudoConstant::participantStatus();
$partiallyPaidStatusId = array_search('Partially paid', $participantStatuses);
$this->assign('partiallyPaidStatusId', $partiallyPaidStatusId);
*/
class CRM_Event_Form_ParticipantFeeSelection extends CRM_Core_Form {
+ public $useLivePageJS = TRUE;
+
protected $_contactId = NULL;
protected $_contributorDisplayName = NULL;
}
public function buildQuickForm() {
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajax_popups_enabled', NULL, TRUE)) {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
- }
$statuses = CRM_Event_PseudoConstant::participantStatus();
$this->assign('partiallyPaid', array_search('Partially paid', $statuses));
*/
class CRM_Event_Form_ParticipantView extends CRM_Core_Form {
+ public $useLivePageJS = TRUE;
+
/**
* Function to set variables up before form is built
*
* @access public
*/
public function buildQuickForm() {
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajax_popups_enabled', NULL, TRUE)) {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
- }
$this->addButtons(array(
array(
'type' => 'cancel',
* Page for displaying list of financial types
*/
class CRM_Financial_Page_FinancialAccount extends CRM_Core_Page_Basic {
+
+ public $useLivePageJS = TRUE;
/**
* The action links that we need to display for the browse screen
*
* @static
*/
function browse() {
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajax_popups_enabled', NULL, TRUE)) {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
- }
// get all custom groups sorted by weight
$contributionType = array();
$dao = new CRM_Financial_DAO_FinancialAccount();
* Page for displaying list of financial types
*/
class CRM_Financial_Page_FinancialType extends CRM_Core_Page_Basic {
+
+ public $useLivePageJS = TRUE;
/**
* The action links that we need to display for the browse screen
*
* @static
*/
function browse() {
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajax_popups_enabled', NULL, TRUE)) {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
- }
// get all financial types sorted by weight
$financialType = array();
$dao = new CRM_Financial_DAO_FinancialType();
*/
class CRM_Member_Page_MembershipStatus extends CRM_Core_Page_Basic {
+ public $useLivePageJS = TRUE;
+
/**
* The action links that we need to display for the browse screen
*
* @static
*/
function browse() {
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajax_popups_enabled', NULL, TRUE)) {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
- }
// get all custom groups sorted by weight
$membershipStatus = array();
$dao = new CRM_Member_DAO_MembershipStatus();
*/
static $_links = NULL;
+ public $useLivePageJS = TRUE;
+
/**
* Get action Links
*
* @static
*/
function browse() {
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajax_popups_enabled', NULL, TRUE)) {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
- }
// get all membership types sorted by weight
$membershipType = array();
$dao = new CRM_Member_DAO_MembershipType();
*/
class CRM_Price_Page_Field extends CRM_Core_Page {
+ public $useLivePageJS = TRUE;
+
/**
* The price set group id of the field
*
* @access public
*/
function browse() {
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajax_popups_enabled', NULL, TRUE)) {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
- }
$priceField = array();
$priceFieldBAO = new CRM_Price_BAO_PriceField();
*/
class CRM_Price_Page_Option extends CRM_Core_Page {
+ public $useLivePageJS = TRUE;
+
/**
* The field id of the option
*
* @access public
*/
function browse() {
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajax_popups_enabled', NULL, TRUE)) {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
- }
$customOption = array();
CRM_Price_BAO_PriceFieldValue::getValues($this->_fid, $customOption);
$config = CRM_Core_Config::singleton();
*/
class CRM_Report_Page_Options extends CRM_Core_Page_Basic {
+ public $useLivePageJS = TRUE;
+
/**
* The action links that we need to display for the browse screen
*
* @static
*/
function browse() {
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajax_popups_enabled', NULL, TRUE)) {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
- }
$groupParams = array('name' => self::$_gName);
$optionValue = CRM_Core_OptionValue::getRows($groupParams, $this->links(), 'weight');
$gName = self::$_gName;
*/
class CRM_SMS_Page_Provider extends CRM_Core_Page_Basic {
+ public $useLivePageJS = TRUE;
+
/**
* The action links that we need to display for the browse screen
*
* @static
*/
function browse($action = NULL) {
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajax_popups_enabled', NULL, TRUE)) {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
- }
$providers = CRM_SMS_BAO_Provider::getProviders();
$rows = array();
foreach ($providers as $provider) {
*/
class CRM_UF_Page_Field extends CRM_Core_Page {
+ public $useLivePageJS = TRUE;
+
/**
* The group id of the field
*
* @static
*/
function browse() {
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajax_popups_enabled', NULL, TRUE)) {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
- }
$ufField = array();
$ufFieldBAO = new CRM_Core_BAO_UFField();