Note that there are some explanatory texts on larger screens.

plurals
  1. POsharepoint 2010 standard model dialogs print transparent merged with background content
    primarykey
    data
    text
    <p>In Sharepoint 2010 by default each list item you edit opens in a new model dialog.</p> <p>This dialog shows up as a new div with the class of ms-dlgContent. It also creates a div with the class ms-dlgOverlay as a grey box dimming the background. However it does NOT modify the existing div holding the background content, (found in a div with the id of s4-workspace.)</p> <p>When you print the page with a dialog up the background of the dialog and the ms-dlgOverlay div are ignored because backgrounds don't print. This means you get the fields of the dialog overlapping with content of the page behind the dialog and it looks like a mess.</p> <p>I've got a css page setup for printing that I would like to use to hide the background content when a dialog is present. I can set the style of a div to display:none in this css sheet, but I can't find a way to add a class to the s4-workspace element if and only if a dialog is present. (I want the s4-workspace element to print if there is no dialog.)</p> <p>I tried adding the following to my master page but it doesn't work. I'm guessing it's because the dialog window doesn't exist on page load and I'm not sure how to get my javascript to run when a dialog opens/closes</p> <pre><code>&lt;script type="text/javascript"&gt; jQuery(function() { jQuery("#s4-workspace").removeClass("backgroundOfDialog"); //this should run if the ms-dlgContent class is found and do nothing otherwise jQuery(".ms-dlgContent").parent().children("#s4-workspace").addClass("backgroundOfDialog"); }); &lt;/script&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload