Merge branch 'release-2.0.0-alpha.2'
This commit is contained in:
commit
6a9b5010a1
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
[submodule "www/PHPMailer"]
|
||||
path = www/PHPMailer
|
||||
url = git@github.com:PHPMailer/PHPMailer.git
|
12
HISTORY.md
12
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.
|
||||
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
|
BIN
gimp/dk.xcf
Normal file
BIN
gimp/dk.xcf
Normal file
Binary file not shown.
BIN
gimp/fff.xcf
Normal file
BIN
gimp/fff.xcf
Normal file
Binary file not shown.
1
www/PHPMailer
Submodule
1
www/PHPMailer
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 1193eb9d280f046fb3726c0124ea171f216328fd
|
53
www/postreport.php
Normal file
53
www/postreport.php
Normal file
@ -0,0 +1,53 @@
|
||||
<?php
|
||||
require(__DIR__ . '/PHPMailer/PHPMailerAutoload.php');
|
||||
$reportId = $_POST['report_id'];
|
||||
$mail = new PHPMailer;
|
||||
$mail->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 = <<<EOF
|
||||
zaaReloaded exception
|
||||
|
||||
User's comment on submission:
|
||||
{$_POST['comment']}
|
||||
|
||||
***
|
||||
|
||||
Technical details: $info
|
||||
|
||||
--
|
||||
http://zaa.nephrowiki.de
|
||||
EOF;
|
||||
|
||||
if ($mail->send())
|
||||
{
|
||||
// Must return the report ID to indicate success
|
||||
echo($reportId);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo($mail->ErrorInfo);
|
||||
}
|
@ -34,7 +34,7 @@
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger SourceObject="{Binding ViewDetailsMessage}" EventName="Sent">
|
||||
<i:EventTrigger.Actions>
|
||||
<actions:ShowViewAction Assembly="zaaReloaded2" View="XLToolbox.ExceptionHandler.ExceptionDetailView" />
|
||||
<actions:ShowViewAction Assembly="zaaReloaded2" View="zaaReloaded2.ExceptionHandler.ExceptionDetailView" />
|
||||
</i:EventTrigger.Actions>
|
||||
</i:EventTrigger>
|
||||
<i:EventTrigger SourceObject="{Binding SubmitReportMessage}" EventName="Sent">
|
||||
|
71
zaaReloaded2/Formatter/DanielsStyle.cs
Executable file
71
zaaReloaded2/Formatter/DanielsStyle.cs
Executable file
@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// Makes design changes and edits especially for Daniel Kraus.
|
||||
/// </summary>
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
BIN
zaaReloaded2/Icons/dk.png
Normal file
BIN
zaaReloaded2/Icons/dk.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
BIN
zaaReloaded2/Icons/fff.png
Normal file
BIN
zaaReloaded2/Icons/fff.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
@ -90,6 +90,11 @@ namespace zaaReloaded2
|
||||
ViewModels.AboutViewModel vm = new ViewModels.AboutViewModel();
|
||||
vm.InjectInto<Views.AboutView>().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
|
||||
|
@ -24,10 +24,21 @@
|
||||
<tabs>
|
||||
<tab id="zaaReloaded2" label="zaaReloaded2">
|
||||
<group id="zrlFormatGroup" label="Formatieren">
|
||||
<button id="zrlFormat" label="Formatieren" image="f.png" onAction="Ribbon_Click" size="large" />
|
||||
<splitButton id="zrlFormatSplitButton" size="large">
|
||||
<button id="zrlFormat" label="Formatieren" image="f.png" onAction="Ribbon_Click"
|
||||
supertip="Formatiert den ausgewählten Bereich mit dem zuletzt verwendeten Stil." />
|
||||
<menu id="zrlFormatMenu" screentip="Formatierungsmenü" supertip="Öffnet ein Menü mit einem weiteren Befehl.">
|
||||
<button id="zrlChooseFormat" label="Stil auswählen/bearbeiten" image="fff.png" onAction="Ribbon_Click"
|
||||
supertip="Zeigt eine Liste vorhandener Stile an. Stile können bearbeitet, hinzugefügt, gelöscht werden." />
|
||||
</menu>
|
||||
</splitButton>
|
||||
<button id="zrlDaniel" label="Daniels Spezial" image="dk.png" onAction="Ribbon_Click" size="large"
|
||||
getVisible="Daniel_GetVisible"/>
|
||||
</group>
|
||||
<group id="zrlInfoGroup" label="Info">
|
||||
<button id="zrlAbout" label="Über..." image="i.png" onAction="Ribbon_Click" size="large" />
|
||||
<button id="zrlAbout" label="Über..." image="i.png" onAction="Ribbon_Click" size="large"
|
||||
screentip="Über zaaReloaded"
|
||||
supertip="Zeigt Informationen über das Add-in an." />
|
||||
</group>
|
||||
</tab>
|
||||
</tabs>
|
||||
|
@ -26,6 +26,7 @@ using Office = Microsoft.Office.Core;
|
||||
using Microsoft.Office.Tools.Word;
|
||||
using Bovender.Versioning;
|
||||
using Bovender.Mvvm.Messaging;
|
||||
using zaaReloaded2.ExceptionHandler;
|
||||
|
||||
namespace zaaReloaded2
|
||||
{
|
||||
@ -46,6 +47,7 @@ namespace zaaReloaded2
|
||||
|
||||
private void ThisAddIn_Startup(object sender, System.EventArgs e)
|
||||
{
|
||||
Bovender.ExceptionHandler.CentralHandler.ManageExceptionCallback += CentralHandler_ManageExceptionCallback;
|
||||
}
|
||||
|
||||
private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
|
||||
@ -108,6 +110,16 @@ namespace zaaReloaded2
|
||||
|
||||
#endregion
|
||||
|
||||
#region Exception handler
|
||||
|
||||
void CentralHandler_ManageExceptionCallback(object sender, Bovender.ExceptionHandler.ManageExceptionEventArgs e)
|
||||
{
|
||||
e.IsHandled = true;
|
||||
ExceptionViewModel vm = new ExceptionViewModel(e.Exception);
|
||||
vm.InjectInto<ExceptionView>().ShowDialog();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Private fields
|
||||
|
||||
Ribbon _ribbon;
|
||||
|
@ -1,2 +1,2 @@
|
||||
2.0.0-alpha.1
|
||||
2.0.0.1
|
||||
2.0.0-alpha.2
|
||||
2.0.0.2
|
||||
|
@ -184,6 +184,7 @@
|
||||
<Compile Include="ExceptionHandler\SubmissionProcessAction.cs" />
|
||||
<Compile Include="ExceptionHandler\SubmissionProcessView.xaml.cs" />
|
||||
<Compile Include="ExceptionHandler\SubmissionSuccessView.xaml.cs" />
|
||||
<Compile Include="Formatter\DanielsStyle.cs" />
|
||||
<Compile Include="Formatter\DocumentWriter.cs" />
|
||||
<Compile Include="Ribbon.cs" />
|
||||
<Compile Include="Thesaurus\ThesaurusBase.cs" />
|
||||
@ -293,7 +294,9 @@
|
||||
<EmbeddedResource Include="VERSION" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Ribbon.xml" />
|
||||
<EmbeddedResource Include="Ribbon.xml">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Icons\i.png" />
|
||||
@ -301,6 +304,12 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="Icons\f.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Icons\dk.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Icons\fff.png" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
|
Loading…
Reference in New Issue
Block a user