Answers.Body: <p>Coming at this from a different angle that still allows customization and seemed to be more performant than ajax calls for us, you could disable the pop up forms altogether and have the admin screens as separate page loads. We did this on our install and found it much more advantageous.  Administer > Customize Data and Screens > Display Preferences.  Uncheck the box labeled:</p>
  
  <blockquote>
    <p><strong>Enable Popup Forms</strong> If you disable this option, the CiviCRM interface will be limited to traditional browsing. Opening a form will
    refresh the page rather than opening a popup dialog.</p>
  </blockquote>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-25T20:11:55.293Z
Answers.Text: Thanks for the thought! We did look at this, but sadly for this purpose, our consensus was that in general the popups work so well that we'd prefer to keep them if we possibly can.
Answers.UserDisplayName: Andyg8
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-25T20:47:02.377Z
Answers.Text: Cool, just wanted to make sure you knew it was there. Hope it works out!
Answers.UserDisplayName: Allen Hutchison
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-24T17:17:27.093Z
Answers.LastActivityDate: 2017-06-24T17:17:27.093Z
Answers.UserDisplayName: Allen Hutchison
Answers.Body: <p>The custom css file do load on every page of civicrm, even the pop ups. Note that the elements in the ajax contains different ids and classes(mostly starts from <code>ui-**</code>) compare to page view. </p>
  
  <p>So you need to redefine the css for them on your custom file.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-22T06:24:58.667Z
Answers.LastActivityDate: 2017-08-22T06:24:58.667Z
Answers.UserDisplayName: jitendra - fuzion
Body: <p>Many admin functions in Civi send the user to Ajax popup boxes. Eg on the Contact screen, Membership > Add membership, Events > Add Event... and many many more through the system.</p>
  
  <p>What is the best way to load custom css into these? </p>
  
  <p>We are using a custom css file for the rest of Civicrm - but it's not being loaded in these ajax popups. From a load-time point of view, that's possibly a good thing! Some of our admin users are in poor internet areas, and those popups can be very very temperamental when the net is slow. So it would be great if we could just add some minor css tweaks to these popups rather than load the whole of our custom css into them.</p>
  
  <p>Thanks for your ideas.  Drupal 7.54, Civicrm 4.6.25. </p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-06-24T17:12:55.087Z
Comments.Text: If Administer > Customize Data and Screens > Display Preferences
Comments.UserDisplayName: Allen Hutchison
Tags: <ajax><css>
Title: How to load custom css into admin popup boxes?
ThreadText: # How to load custom css into admin popup boxes?
  
  (Asked by: username_0 on 2017-06-21)
  
  Many admin functions in Civi send the user to Ajax popup boxes. Eg on the Contact screen, Membership > Add membership, Events > Add Event... and many many more through the system.
  
  What is the best way to load custom css into these?
  
  We are using a custom css file for the rest of Civicrm - but it's not being loaded in these ajax popups. From a load-time point of view, that's possibly a good thing! Some of our admin users are in poor internet areas, and those popups can be very very temperamental when the net is slow. So it would be great if we could just add some minor css tweaks to these popups rather than load the whole of our custom css into them.
  
  Thanks for your ideas. Drupal 7.54, Civicrm 4.6.25.
  
  **Tags:** ajax, css
  
  > **Comments:**
  > **username_1**: If Administer > Customize Data and Screens > Display Preferences  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2017-08-22. Score: 4 | Accepted answer
  
  The custom css file do load on every page of civicrm, even the pop ups. Note that the elements in the ajax contains different ids and classes(mostly starts from `ui-**`) compare to page view.
  
  So you need to redefine the css for them on your custom file.
  
  
  ---
  
  ### Answer by username_1 on 2017-06-24. Score: 0
  
  Coming at this from a different angle that still allows customization and seemed to be more performant than ajax calls for us, you could disable the pop up forms altogether and have the admin screens as separate page loads. We did this on our install and found it much more advantageous. Administer > Customize Data and Screens > Display Preferences. Uncheck the box labeled:
  
  > **Enable Popup Forms** If you disable this option, the CiviCRM interface will be limited to traditional browsing. Opening a form will
  > refresh the page rather than opening a popup dialog.
  
  > **Comments:**
  > **username_0**: Thanks for the thought! We did look at this, but sadly for this purpose, our consensus was that in general the popups work so well that we'd prefer to keep them if we possibly can.  
  > **username_1**: Cool, just wanted to make sure you knew it was there. Hope it works out!  
  
  ---
  
  