fix UI links and CSS in searches delivered by email, #72101
[freeside.git] / httemplate / elements / header-popup.html
index 1759369..906b1ee 100644 (file)
@@ -30,11 +30,20 @@ Example:
     <META HTTP-Equiv="Expires" Content="0"> 
 %   unless ( $no_jquery ) {
       <SCRIPT SRC="<% $fsurl %>elements/jquery.js"></SCRIPT>
+%     if ( $FS::CurrentUser::CurrentUser->option('printtofit') ) {
+      <SCRIPT SRC="<% $fsurl %>elements/printtofit.js"></SCRIPT>
+%     }
 %   }
     <% $head |n %>
   </HEAD>
   <BODY <% $etc |n %>>
+%   if ($m->notes('inline_stylesheet')) { # for email delivery
+    <style type="text/css">
+    <& /elements/freeside.css &>
+    </style>
+%   } else {
     <link href="<%$fsurl%>elements/freeside.css" type="text/css" rel="stylesheet">
+%   }
 % if ( $title || $title_noescape ) {
     <FONT SIZE=6>
       <CENTER><% encode_entities($title) || $title_noescape |n %></CENTER>
@@ -56,7 +65,7 @@ if ( ref($_[0]) ) {
   $head           = $opt->{head};
   $nobr           = $opt->{nobr};
   #$nocss          = $opt->{nocss};
-  $no_jquery      = $opt->{no_jquery};
+  $no_jquery      = exists($opt->{no_jquery}) ? $opt->{no_jquery} : 1; #v3 only, 0 on v4+
 } else {
   ($title, $menubar) = ( shift, shift );
   $etc = @_ ? shift : ''; #$etc is for things like onLoad= etc.