@@ -33,7 +40,7 @@ string template_render(bool renderBody)
{template_body(renderBody)}
-{(Toolbar.Exports.EnableSettings ? template_modalcontainer() : "")}
+{(needModal ? template_modalcontainer() : "")}
";
}
}
diff --git a/FastReport.Core.Web/Templates/script.cs b/FastReport.Core.Web/Templates/script.cs
index c7490c9e..3b8d2c82 100644
--- a/FastReport.Core.Web/Templates/script.cs
+++ b/FastReport.Core.Web/Templates/script.cs
@@ -222,6 +222,56 @@ string template_script() => $@"
}});
}},
+ showEmailExportModal: function() {{
+ var modalcontainer = this._findModalContainer();
+ const emailExportLink = document.getElementById('emailexport');
+ const buttons = document.querySelectorAll('.fr-webreport-settings-btn');
+ const Overlay = document.querySelector('.modalcontainer-overlay');
+ var that = this;
+
+ this._fetch({{
+ method: 'POST',
+ url: '{template_ROUTE_BASE_PATH}/exportsettings.getSettings?reportId={ID}&format=email',
+ onSuccess: function (xhr) {{
+ modalcontainer.innerHTML = xhr.responseText;
+ that._execModalScripts();
+ document.querySelector(`[data-target=email]`).classList.add('modalcontainer--visible');
+ Overlay.classList.add('modalcontainer-overlay--visible');
+ }},
+ }})
+ }},
+
+showPopup: function (message, isSuccess) {{
+ var popup = document.createElement(""div"");
+ popup.className = ""fr-notification"";
+ if (isSuccess) {{
+ popup.classList.add(""positive"");
+ }} else {{
+ popup.classList.add(""negative"");
+ }}
+
+ var content = document.createElement(""div"");
+ content.className = ""fr-notification-content"";
+
+ var image = document.createElement(""img"");
+ image.src = ""/_fr/resources.getResource?resourceName=notification-bell.svg&contentType=image%2Fsvg%2Bxml"";
+
+ var text = document.createElement(""div"");
+ text.innerText = message;
+
+ content.appendChild(image);
+ content.appendChild(text);
+ popup.appendChild(content);
+ document.body.appendChild(popup);
+
+ setTimeout(function () {{
+ popup.style.opacity = ""0"";
+ setTimeout(function () {{
+ popup.remove();
+ }}, 500);
+ }}, 2000);
+}},
+
getExportSettings: function () {{
this._getExportSettings();
}},
@@ -246,11 +296,11 @@ string template_script() => $@"
document.querySelector(`[data-target=${{fileformat}}]`).classList.add('modalcontainer--visible');
Overlay.classList.add('modalcontainer-overlay--visible');
}},
-
}});
}})
}});
}},
+
_execScripts: function () {{
var container = this._findContainer();
var scripts = container.getElementsByTagName('script');
diff --git a/FastReport.Core.Web/Templates/style.cs b/FastReport.Core.Web/Templates/style.cs
index 01663dcf..15b55407 100644
--- a/FastReport.Core.Web/Templates/style.cs
+++ b/FastReport.Core.Web/Templates/style.cs
@@ -834,6 +834,107 @@ TOOLBAR NAVIGATION
.{template_FR}-outline-children {{
padding-left: 20px;
}}
+
+/*******************
+
+ EMAIL EXPORT
+
+*******************/
+.fr-notification {{
+ position: fixed;
+ bottom: 20px;
+ right: 20px;
+ display: flex;
+ align-items: center;
+ padding: 10px 20px;
+ border-radius: 4px;
+ font-size: 14px;
+ color: white;
+ opacity: 1;
+ transition: opacity 0.5s;
+ z-index: 9999;
+ font-family: Arial, sans-serif;
+}}
+
+.fr-notification-content {{
+ display: flex;
+ align-items: center;
+}}
+
+.fr-notification-content img {{
+ margin-right: 10px;
+}}
+
+.fr-notification.positive {{
+ background-color: #44cc44;
+}}
+
+.fr-required-star {{
+ color: red;
+}}
+
+
+.fr-notification.negative {{
+ background-color: #cc4444;
+}}
+
+
+.fr-email-export-form {{
+ display: flex;
+ flex-direction: column;
+ padding: 5px;
+ box-sizing: border-box;
+ width: 100%;
+}}
+
+.fr-email-export-field {{
+ display: flex;
+ margin-bottom: 5px;
+ justify-content: space-between;
+ width: 100%;
+ font-size: 12px;
+}}
+
+.fr-email-export-input{{
+ width: 244px;
+ padding: 8px;
+ border: none;
+ border-radius: 4px;
+ background: #FFF;
+ display: flex;
+ margin-left: 30px;
+ font-size: 12px;
+}}
+
+.fr-email-export-textarea{{
+ margin - left: 10px;
+ width: 244px;
+ height: 146px;
+ padding: 8px;
+ border: none;
+ border-radius: 5px;
+ resize: none;
+ font-size: 12px;
+}}
+
+.fr-email-export-select{{
+ overflow: hidden;
+ -moz-appearance:none; /* Firefox */
+ -webkit-appearance:none; /* Safari and Chrome */
+ background: #ffffff url(/_fr/resources.getResource?resourceName=select-arrow.svg&contentType=image%2Fsvg%2Bxml) no-repeat;
+ background-position: calc(100% - 10px) center;
+ margin - left: 10px;
+ width: 244px;
+ padding: 8px;
+ border-radius: 5px;
+ border: none;
+ font-size: 12px;
+}}
+
+.fr-email-export-label{{
+ font-weight: normal;
+ font-size: 12px;
+}}
";
}
}
\ No newline at end of file
diff --git a/FastReport.Core.Web/Templates/toolbar.cs b/FastReport.Core.Web/Templates/toolbar.cs
index 6adb4368..781cc888 100644
--- a/FastReport.Core.Web/Templates/toolbar.cs
+++ b/FastReport.Core.Web/Templates/toolbar.cs
@@ -48,7 +48,7 @@ string template_toolbar(bool renderBody)
+ (exports.EnableSettings && exports.ShowSvgExport? $@"
" : "")
+ (exports.ShowMhtExport ? $@"
{localization.mhtTxt}" : "")
+ (exports.ShowExcel97Export ? $@"
{localization.excel97Txt}" : "")
- //(exports.ShowEmailExport ? $@"
{emailTxt}" : "") +
+ + (exports.ShowEmailExport ? $@"
{localization.emailTxt}" : "")
+ (exports.ShowHpglExport ? $@"
{localization.hpglTxt}" : "")
+ (exports.ShowHTMLExport ? $@"
{localization.htmlTxt}" : "")
+ (exports.EnableSettings && exports.ShowHTMLExport ? $@"
" : "")
diff --git a/FastReport/Resources/en.xml b/FastReport/Resources/en.xml
index 240ba0a3..a86227db 100644
--- a/FastReport/Resources/en.xml
+++ b/FastReport/Resources/en.xml
@@ -134,7 +134,6 @@
-
@@ -2127,6 +2126,7 @@
+
@@ -2358,19 +2358,36 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -2469,17 +2486,6 @@
-
-
-
-
-
-
-
-
-
-
-
@@ -2540,17 +2546,22 @@
-
-
+
+
-
-
+
+
+
+
+
+
+
diff --git a/Localization/Russian.frl b/Localization/Russian.frl
index acafbe10..de14bc00 100644
--- a/Localization/Russian.frl
+++ b/Localization/Russian.frl
@@ -134,7 +134,6 @@
-
@@ -1942,6 +1941,7 @@
+
@@ -2157,19 +2157,36 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -2268,17 +2285,6 @@
-
-
-
-
-
-
-
-
-
-
-
@@ -2339,17 +2345,22 @@
-
-
+
+
-
-
+
+
+
+
+
+
+