mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Merge branch 'master' of github.com:webmin/webmin
This commit is contained in:
7
gray-theme/unauthenticated/css/_iframe/quote.min.css
vendored
Normal file
7
gray-theme/unauthenticated/css/_iframe/quote.min.css
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
body blockquote:not([style*="border-left"]) {
|
||||
border-left: 1px solid #ccc;
|
||||
margin-left: 6px;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
padding-left: 12px;
|
||||
}
|
||||
@@ -236,7 +236,8 @@ my $iframe_styles =
|
||||
"e_escape(
|
||||
&read_file_contents("$root_directory/unauthenticated/css/_iframe/$iframe_styles_mode.min.css"), '"');
|
||||
$iframe_styles =~ s/\n/ /g;
|
||||
|
||||
my $navigation_type = $ENV{'HTTP_X_NAVIGATION_TYPE'};
|
||||
$navigation_type ||= 'reload';
|
||||
my $html_editor_init_script =
|
||||
<<EOF;
|
||||
<script type="text/javascript">
|
||||
@@ -245,6 +246,7 @@ my $html_editor_init_script =
|
||||
qs = Quill.import('attributors/style/size'),
|
||||
qf = Quill.import('attributors/style/font'),
|
||||
isMac = navigator.userAgent.toLowerCase().includes('mac'),
|
||||
navigation_type = '$navigation_type',
|
||||
iframe_styles = "$iframe_styles";
|
||||
|
||||
qs.whitelist = ["0.75em", "1.15em", "1.3em"];
|
||||
@@ -340,7 +342,8 @@ my $html_editor_init_script =
|
||||
// is reloaded or history back is clicked
|
||||
let restore_message = false;
|
||||
try {
|
||||
restore_message = window.performance?.navigation?.type > 0
|
||||
restore_message = window.performance.getEntriesByType("navigation")[0].type !== 'navigate' &&
|
||||
navigation_type !== 'navigate'
|
||||
} catch(e) {
|
||||
restore_message = false;
|
||||
}
|
||||
|
||||
@@ -2950,10 +2950,22 @@ sub iframe_quote
|
||||
my ($quote) = @_;
|
||||
return $quote if (!$quote);
|
||||
|
||||
# Do we have theme styles to embed
|
||||
# for local display purposes only
|
||||
my $iframe_theme_file = sub {
|
||||
my $f =
|
||||
"$root_directory/$current_theme/unauthenticated/css/_iframe/$_[0].min.css";
|
||||
return -r $f ? &read_file_contents($f) : '';
|
||||
};
|
||||
my $iframe_styles_theme =
|
||||
&$iframe_theme_file('quote');
|
||||
|
||||
# Quote mail iframe inner styles
|
||||
my $iframe_styles = <<EOF;
|
||||
<style>
|
||||
html, body { overflow-y: hidden; }
|
||||
div[contenteditable] { outline: none; }
|
||||
$iframe_styles_theme
|
||||
</style>
|
||||
EOF
|
||||
# Add inner styles to the email body
|
||||
|
||||
Reference in New Issue
Block a user