Ensure headers are set correctly for json output
[civicrm-core.git] / CRM / Admin / Page / LabelFormats.php
index 3fc46604a5b385ec4c86d3182d1df62d339af37b..5fe0483105b15aa81017ff9aa8917d2f6be5d638 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.4                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
  | Copyright (C) 2011 Marty Wright                                    |
  | Licensed to CiviCRM under the Academic Free License version 3.0.   |
@@ -29,7 +29,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
  *
  */
@@ -39,6 +39,8 @@
  */
 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
    *
@@ -110,6 +112,8 @@ class CRM_Admin_Page_LabelFormats extends CRM_Core_Page_Basic {
   /**
    * Get user context.
    *
+   * @param null $mode
+   *
    * @return string user context.
    */
   function userContext($mode = NULL) {
@@ -119,14 +123,13 @@ class CRM_Admin_Page_LabelFormats extends CRM_Core_Page_Basic {
   /**
    * Browse all Label Format settings.
    *
+   * @param null $action
+   *
    * @return void
    * @access public
    * @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');