diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..78265bd --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "www/PHPMailer"] + path = www/PHPMailer + url = git@github.com:PHPMailer/PHPMailer.git diff --git a/HISTORY.md b/HISTORY.md index 9a49239..41bda37 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,6 +1,14 @@ -Unpublished changes (2015-06-19) +Version 2.0.0-alpha.2 (2015-07-28) ======================================================================== +- NEU: Fehlerbehandlung und Fehlerberichte. +* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + +Version 2.0.0-alpha.1 (2015-07-27) +======================================================================== + +- NEW: First release of version 2 series. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * diff --git a/gimp/dk.xcf b/gimp/dk.xcf new file mode 100644 index 0000000..439dd50 Binary files /dev/null and b/gimp/dk.xcf differ diff --git a/gimp/fff.xcf b/gimp/fff.xcf new file mode 100644 index 0000000..404657a Binary files /dev/null and b/gimp/fff.xcf differ diff --git a/www/PHPMailer b/www/PHPMailer new file mode 160000 index 0000000..1193eb9 --- /dev/null +++ b/www/PHPMailer @@ -0,0 +1 @@ +Subproject commit 1193eb9d280f046fb3726c0124ea171f216328fd diff --git a/www/postreport.php b/www/postreport.php new file mode 100644 index 0000000..4ec082c --- /dev/null +++ b/www/postreport.php @@ -0,0 +1,53 @@ +isSMTP(); +$mail->SMTPAuth = true; +$mail->Host = 'nephrowiki.de'; +$mail->Username = 'zaareloaded@nephrowiki.de'; +$mail->Password = 'ooZ1eiJa'; +// $mail->SMTPSecure = 'tls'; +$mail->Port = 25; + +$mail->From = 'zaareloaded@nephrowiki.de'; +$mail->FromName = 'zaaReloaded'; +$mail->addAddress('dk@doktorkraus.de'); +$mail->Subject = "[zaaReloaded] Exception $reportId"; + +if ( $_POST['ccUser'] ) { + $validMail = filter_var( $_POST['usersMail'], FILTER_VALIDATE_EMAIL ); + $validUser = filter_var( $_POST['usersName'], FILTER_SANITIZE_STRING ); + if ( $validUser ) { + $validUser = "\"$validUser\" "; // space character deliberately placed + }; + if ( $validMail ) { + $mail->addCC($validMail, $validUser); + }; +}; + +$info = print_r( $_POST, true ); + +$mail->Body = <<send()) +{ + // Must return the report ID to indicate success + echo($reportId); +} +else +{ + echo($mail->ErrorInfo); +} diff --git a/zaaReloaded2/ExceptionHandler/ExceptionView.xaml b/zaaReloaded2/ExceptionHandler/ExceptionView.xaml index b61e024..64e6e0e 100755 --- a/zaaReloaded2/ExceptionHandler/ExceptionView.xaml +++ b/zaaReloaded2/ExceptionHandler/ExceptionView.xaml @@ -34,7 +34,7 @@ - + diff --git a/zaaReloaded2/Formatter/DanielsStyle.cs b/zaaReloaded2/Formatter/DanielsStyle.cs new file mode 100755 index 0000000..a2ab215 --- /dev/null +++ b/zaaReloaded2/Formatter/DanielsStyle.cs @@ -0,0 +1,71 @@ +/* DanielsStyle.cs + * part of zaaReloaded2 + * + * Copyright 2015 Daniel Kraus + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Microsoft.Office.Interop.Word; + +namespace zaaReloaded2.Formatter +{ + /// + /// Makes design changes and edits especially for Daniel Kraus. + /// + static class DanielsStyle + { + public static void Apply(Document document, Selection selection) + { + FixWords(document); + FormatDiagnoses(selection); + } + + static void FormatDiagnoses(Selection selection) + { + Range r = selection.Range; + r.ListFormat.RemoveNumbers(); + r.Bold = 0; + r.Italic = 0; + r.Underline = WdUnderline.wdUnderlineNone; + r.Font.Size = 10; + Paragraphs p = r.Paragraphs; + p.Alignment = WdParagraphAlignment.wdAlignParagraphLeft; + p.FirstLineIndent = -45; + p.LeftIndent = 45; + p.LineSpacingRule = WdLineSpacing.wdLineSpaceSingle; + p.SpaceAfter = 0; + p.SpaceBefore = 0; + + if (p[p.Count].Range.Text.StartsWith("Aktuell")) + { + p[p.Count].Range.Bold = 1; + } + } + + static void FixWords(Document document) + { + Find find = document.Range().Find; + find.Execute2007(FindText: "Dr.D.Kraus", ReplaceWith: "Dr. D. Kraus", Replace: WdReplace.wdReplaceAll); + find.Execute2007(FindText: "Z. n.", ReplaceWith: "Z.n.", Replace: WdReplace.wdReplaceAll); + find.Execute2007(FindText: "Zust. n.", ReplaceWith: "Z.n.", Replace: WdReplace.wdReplaceAll); + find.Execute2007(FindText: "Zust.n.", ReplaceWith: "Z.n.", Replace: WdReplace.wdReplaceAll); + find.Execute2007(FindText: "Assistent der Klinik", ReplaceWith: "Internist/Nephrologe", Replace: WdReplace.wdReplaceAll); + find.Execute2007(FindText: "Professor Dr.", ReplaceWith: "Prof. Dr.", Replace: WdReplace.wdReplaceAll); + find.Execute2007(FindText: "mmHg", ReplaceWith: "mm Hg", Replace: WdReplace.wdReplaceAll); + } + } +} diff --git a/zaaReloaded2/Icons/dk.png b/zaaReloaded2/Icons/dk.png new file mode 100644 index 0000000..b4f9c39 Binary files /dev/null and b/zaaReloaded2/Icons/dk.png differ diff --git a/zaaReloaded2/Icons/fff.png b/zaaReloaded2/Icons/fff.png new file mode 100644 index 0000000..2491380 Binary files /dev/null and b/zaaReloaded2/Icons/fff.png differ diff --git a/zaaReloaded2/Ribbon.cs b/zaaReloaded2/Ribbon.cs index 4192060..a9a1791 100755 --- a/zaaReloaded2/Ribbon.cs +++ b/zaaReloaded2/Ribbon.cs @@ -90,6 +90,11 @@ namespace zaaReloaded2 ViewModels.AboutViewModel vm = new ViewModels.AboutViewModel(); vm.InjectInto().ShowDialog(); break; + case "zrlDaniel": + Formatter.DanielsStyle.Apply( + Globals.ThisAddIn.Application.ActiveDocument, + Globals.ThisAddIn.Application.Selection); + break; default: throw new InvalidOperationException("No operation defined for " + control.Id); } @@ -118,6 +123,18 @@ namespace zaaReloaded2 return Image.FromStream(sri.Stream); } + public bool Daniel_GetVisible(Office.IRibbonControl control) + { + switch (Environment.UserName.ToUpper()) + { + case "DANIEL": + case "KRAUS_D1": + return true; + default: + return false; + } + } + #endregion #region Helpers diff --git a/zaaReloaded2/Ribbon.xml b/zaaReloaded2/Ribbon.xml index cd12b15..3793cc4 100755 --- a/zaaReloaded2/Ribbon.xml +++ b/zaaReloaded2/Ribbon.xml @@ -24,10 +24,21 @@ -