Compare commits
2 Commits
bugfix/sig
...
278d56c58d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
278d56c58d | ||
|
|
9f71579c78 |
@@ -28,6 +28,7 @@
|
|||||||
MessageConfirmationSent = 3003
|
MessageConfirmationSent = 3003
|
||||||
MessageDeletionSent = 3004
|
MessageDeletionSent = 3004
|
||||||
MessageCompletionSent = 3005
|
MessageCompletionSent = 3005
|
||||||
|
DocumentMOD_RotationChanged = 4001
|
||||||
End Enum
|
End Enum
|
||||||
|
|
||||||
'TODO: standardize in xwiki
|
'TODO: standardize in xwiki
|
||||||
|
|||||||
@@ -34,6 +34,12 @@ Public Class ActionService
|
|||||||
|
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
Public Function SetStatusDocumentRotationChanged(pEnvelope As Envelope) As Boolean
|
||||||
|
If HistoryService.SetEnvelopeStatus(pEnvelope, Constants.EnvelopeStatus.DocumentMOD_RotationChanged, pEnvelope.User.Email) = False Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
Public Function Resend_Receiver(pEnvelope As Envelope, pmail As String) As Boolean
|
Public Function Resend_Receiver(pEnvelope As Envelope, pmail As String) As Boolean
|
||||||
If HistoryService.SetEnvelopeStatus(pEnvelope, Constants.EnvelopeStatus.EnvelopeQueued, pEnvelope.User.Email) = False Then
|
If HistoryService.SetEnvelopeStatus(pEnvelope, Constants.EnvelopeStatus.EnvelopeQueued, pEnvelope.User.Email) = False Then
|
||||||
Return False
|
Return False
|
||||||
|
|||||||
@@ -38,6 +38,9 @@ Public Class EnvelopeEditorController
|
|||||||
Public Function SendEnvelope() As Boolean
|
Public Function SendEnvelope() As Boolean
|
||||||
Return ActionService.SendEnvelope(Envelope)
|
Return ActionService.SendEnvelope(Envelope)
|
||||||
End Function
|
End Function
|
||||||
|
Public Function DocumentRotationChanged() As Boolean
|
||||||
|
Return ActionService.SetStatusDocumentRotationChanged(Envelope)
|
||||||
|
End Function
|
||||||
Public Function ResendReceiverInvitation(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean
|
Public Function ResendReceiverInvitation(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean
|
||||||
Return ActionService.ResendReceiver(pEnvelope, pReceiver)
|
Return ActionService.ResendReceiver(pEnvelope, pReceiver)
|
||||||
End Function
|
End Function
|
||||||
|
|||||||
@@ -632,6 +632,7 @@ Partial Public Class frmEnvelopeEditor
|
|||||||
resources.ApplyResources(Me.txtMessage, "txtMessage")
|
resources.ApplyResources(Me.txtMessage, "txtMessage")
|
||||||
Me.txtMessage.MenuManager = Me.RibbonControl1
|
Me.txtMessage.MenuManager = Me.RibbonControl1
|
||||||
Me.txtMessage.Name = "txtMessage"
|
Me.txtMessage.Name = "txtMessage"
|
||||||
|
Me.txtMessage.Properties.AcceptsTab = True
|
||||||
Me.txtMessage.Properties.Appearance.Font = CType(resources.GetObject("txtMessage.Properties.Appearance.Font"), System.Drawing.Font)
|
Me.txtMessage.Properties.Appearance.Font = CType(resources.GetObject("txtMessage.Properties.Appearance.Font"), System.Drawing.Font)
|
||||||
Me.txtMessage.Properties.Appearance.Options.UseFont = True
|
Me.txtMessage.Properties.Appearance.Options.UseFont = True
|
||||||
Me.txtMessage.StyleController = Me.LayoutControl1
|
Me.txtMessage.StyleController = Me.LayoutControl1
|
||||||
@@ -664,7 +665,7 @@ Partial Public Class frmEnvelopeEditor
|
|||||||
Me.LayoutControlItem3.Size = New System.Drawing.Size(873, 216)
|
Me.LayoutControlItem3.Size = New System.Drawing.Size(873, 216)
|
||||||
resources.ApplyResources(Me.LayoutControlItem3, "LayoutControlItem3")
|
resources.ApplyResources(Me.LayoutControlItem3, "LayoutControlItem3")
|
||||||
Me.LayoutControlItem3.TextLocation = DevExpress.Utils.Locations.Top
|
Me.LayoutControlItem3.TextLocation = DevExpress.Utils.Locations.Top
|
||||||
Me.LayoutControlItem3.TextSize = New System.Drawing.Size(49, 13)
|
Me.LayoutControlItem3.TextSize = New System.Drawing.Size(46, 13)
|
||||||
'
|
'
|
||||||
'FrmEditorBindingSource
|
'FrmEditorBindingSource
|
||||||
'
|
'
|
||||||
|
|||||||
@@ -939,7 +939,7 @@
|
|||||||
<value>0</value>
|
<value>0</value>
|
||||||
</data>
|
</data>
|
||||||
<metadata name="FrmEditorBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="FrmEditorBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>792, 17</value>
|
<value>17, 54</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="EnvelopeDocumentBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="EnvelopeDocumentBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>557, 17</value>
|
<value>557, 17</value>
|
||||||
|
|||||||
32
EnvelopeGenerator.Form/frmMain.Designer.vb
generated
32
EnvelopeGenerator.Form/frmMain.Designer.vb
generated
@@ -64,6 +64,7 @@ Partial Class frmMain
|
|||||||
Me.BarButtonItem2 = New DevExpress.XtraBars.BarButtonItem()
|
Me.BarButtonItem2 = New DevExpress.XtraBars.BarButtonItem()
|
||||||
Me.BarButtonItem3 = New DevExpress.XtraBars.BarButtonItem()
|
Me.BarButtonItem3 = New DevExpress.XtraBars.BarButtonItem()
|
||||||
Me.BarButtonItem4 = New DevExpress.XtraBars.BarButtonItem()
|
Me.BarButtonItem4 = New DevExpress.XtraBars.BarButtonItem()
|
||||||
|
Me.BarStaticItemGhost = New DevExpress.XtraBars.BarStaticItem()
|
||||||
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
|
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
|
||||||
Me.RibbonPageEnvelopeActions = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
Me.RibbonPageEnvelopeActions = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
||||||
Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
||||||
@@ -102,7 +103,7 @@ Partial Class frmMain
|
|||||||
Me.RefreshTimer = New System.Windows.Forms.Timer(Me.components)
|
Me.RefreshTimer = New System.Windows.Forms.Timer(Me.components)
|
||||||
Me.SaveFileDialog1 = New System.Windows.Forms.SaveFileDialog()
|
Me.SaveFileDialog1 = New System.Windows.Forms.SaveFileDialog()
|
||||||
Me.XtraSaveFileDialog1 = New DevExpress.XtraEditors.XtraSaveFileDialog(Me.components)
|
Me.XtraSaveFileDialog1 = New DevExpress.XtraEditors.XtraSaveFileDialog(Me.components)
|
||||||
Me.BarStaticItemGhost = New DevExpress.XtraBars.BarStaticItem()
|
Me.SimpleButton1 = New DevExpress.XtraEditors.SimpleButton()
|
||||||
CType(Me.SplitContainerControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.SplitContainerControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
CType(Me.SplitContainerControl1.Panel1, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.SplitContainerControl1.Panel1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
Me.SplitContainerControl1.Panel1.SuspendLayout()
|
Me.SplitContainerControl1.Panel1.SuspendLayout()
|
||||||
@@ -468,6 +469,19 @@ Partial Class frmMain
|
|||||||
Me.BarButtonItem4.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonItem4.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
|
Me.BarButtonItem4.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonItem4.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
|
||||||
Me.BarButtonItem4.Name = "BarButtonItem4"
|
Me.BarButtonItem4.Name = "BarButtonItem4"
|
||||||
'
|
'
|
||||||
|
'BarStaticItemGhost
|
||||||
|
'
|
||||||
|
resources.ApplyResources(Me.BarStaticItemGhost, "BarStaticItemGhost")
|
||||||
|
Me.BarStaticItemGhost.Id = 19
|
||||||
|
Me.BarStaticItemGhost.ItemAppearance.Normal.BackColor = System.Drawing.Color.Yellow
|
||||||
|
Me.BarStaticItemGhost.ItemAppearance.Normal.Font = CType(resources.GetObject("BarStaticItemGhost.ItemAppearance.Normal.Font"), System.Drawing.Font)
|
||||||
|
Me.BarStaticItemGhost.ItemAppearance.Normal.ForeColor = System.Drawing.Color.Black
|
||||||
|
Me.BarStaticItemGhost.ItemAppearance.Normal.Options.UseBackColor = True
|
||||||
|
Me.BarStaticItemGhost.ItemAppearance.Normal.Options.UseFont = True
|
||||||
|
Me.BarStaticItemGhost.ItemAppearance.Normal.Options.UseForeColor = True
|
||||||
|
Me.BarStaticItemGhost.Name = "BarStaticItemGhost"
|
||||||
|
Me.BarStaticItemGhost.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||||
|
'
|
||||||
'RibbonPage1
|
'RibbonPage1
|
||||||
'
|
'
|
||||||
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageEnvelopeActions, Me.RibbonPageGroup1, Me.RibbonPageGroupFunctions})
|
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageEnvelopeActions, Me.RibbonPageGroup1, Me.RibbonPageGroupFunctions})
|
||||||
@@ -708,6 +722,7 @@ Partial Class frmMain
|
|||||||
'
|
'
|
||||||
'GroupControl1
|
'GroupControl1
|
||||||
'
|
'
|
||||||
|
Me.GroupControl1.Controls.Add(Me.SimpleButton1)
|
||||||
Me.GroupControl1.Controls.Add(Me.btnEnvelopes_All)
|
Me.GroupControl1.Controls.Add(Me.btnEnvelopes_All)
|
||||||
Me.GroupControl1.Controls.Add(Me.btnEnvelopes_thisYear)
|
Me.GroupControl1.Controls.Add(Me.btnEnvelopes_thisYear)
|
||||||
Me.GroupControl1.Controls.Add(Me.btnEnvelopes_lastmonth)
|
Me.GroupControl1.Controls.Add(Me.btnEnvelopes_lastmonth)
|
||||||
@@ -755,18 +770,10 @@ Partial Class frmMain
|
|||||||
'
|
'
|
||||||
Me.XtraSaveFileDialog1.FileName = "XtraSaveFileDialog1"
|
Me.XtraSaveFileDialog1.FileName = "XtraSaveFileDialog1"
|
||||||
'
|
'
|
||||||
'BarStaticItemGhost
|
'SimpleButton1
|
||||||
'
|
'
|
||||||
resources.ApplyResources(Me.BarStaticItemGhost, "BarStaticItemGhost")
|
resources.ApplyResources(Me.SimpleButton1, "SimpleButton1")
|
||||||
Me.BarStaticItemGhost.Id = 19
|
Me.SimpleButton1.Name = "SimpleButton1"
|
||||||
Me.BarStaticItemGhost.ItemAppearance.Normal.BackColor = System.Drawing.Color.Yellow
|
|
||||||
Me.BarStaticItemGhost.ItemAppearance.Normal.Font = CType(resources.GetObject("BarStaticItemGhost.ItemAppearance.Normal.Font"), System.Drawing.Font)
|
|
||||||
Me.BarStaticItemGhost.ItemAppearance.Normal.ForeColor = System.Drawing.Color.Black
|
|
||||||
Me.BarStaticItemGhost.ItemAppearance.Normal.Options.UseBackColor = True
|
|
||||||
Me.BarStaticItemGhost.ItemAppearance.Normal.Options.UseFont = True
|
|
||||||
Me.BarStaticItemGhost.ItemAppearance.Normal.Options.UseForeColor = True
|
|
||||||
Me.BarStaticItemGhost.Name = "BarStaticItemGhost"
|
|
||||||
Me.BarStaticItemGhost.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
|
||||||
'
|
'
|
||||||
'frmMain
|
'frmMain
|
||||||
'
|
'
|
||||||
@@ -894,4 +901,5 @@ Partial Class frmMain
|
|||||||
Friend WithEvents RibbonPageGroupFunctions As DevExpress.XtraBars.Ribbon.RibbonPageGroup
|
Friend WithEvents RibbonPageGroupFunctions As DevExpress.XtraBars.Ribbon.RibbonPageGroup
|
||||||
Friend WithEvents BarButtonItem4 As DevExpress.XtraBars.BarButtonItem
|
Friend WithEvents BarButtonItem4 As DevExpress.XtraBars.BarButtonItem
|
||||||
Friend WithEvents BarStaticItemGhost As DevExpress.XtraBars.BarStaticItem
|
Friend WithEvents BarStaticItemGhost As DevExpress.XtraBars.BarStaticItem
|
||||||
|
Friend WithEvents SimpleButton1 As DevExpress.XtraEditors.SimpleButton
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -1091,7 +1091,7 @@
|
|||||||
<value>195</value>
|
<value>195</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GridCompleted.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="GridCompleted.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>1088, 467</value>
|
<value>1088, 469</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GridCompleted.TabIndex" type="System.Int32, mscorlib">
|
<data name="GridCompleted.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>3</value>
|
<value>3</value>
|
||||||
@@ -1109,7 +1109,7 @@
|
|||||||
<value>0</value>
|
<value>0</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="XtraTabPage2.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="XtraTabPage2.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>1088, 467</value>
|
<value>1088, 469</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="XtraTabPage2.Text" xml:space="preserve">
|
<data name="XtraTabPage2.Text" xml:space="preserve">
|
||||||
<value>Abgeschlossene Umschläge</value>
|
<value>Abgeschlossene Umschläge</value>
|
||||||
@@ -1139,7 +1139,7 @@
|
|||||||
<value>0, 0</value>
|
<value>0, 0</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GridControlData.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="GridControlData.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>584, 388</value>
|
<value>584, 390</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GridControlData.TabIndex" type="System.Int32, mscorlib">
|
<data name="GridControlData.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
@@ -1187,7 +1187,7 @@
|
|||||||
<value>1</value>
|
<value>1</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SplitContainerControl2.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="SplitContainerControl2.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>1088, 388</value>
|
<value>1088, 390</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SplitContainerControl2.TabIndex" type="System.Int32, mscorlib">
|
<data name="SplitContainerControl2.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>2</value>
|
<value>2</value>
|
||||||
@@ -1229,10 +1229,10 @@
|
|||||||
<value>0</value>
|
<value>0</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GroupControl2.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="GroupControl2.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>496, 5</value>
|
<value>605, 5</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GroupControl2.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="GroupControl2.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>427, 68</value>
|
<value>318, 68</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GroupControl2.TabIndex" type="System.Int32, mscorlib">
|
<data name="GroupControl2.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>2</value>
|
<value>2</value>
|
||||||
@@ -1252,6 +1252,30 @@
|
|||||||
<data name=">>GroupControl2.ZOrder" xml:space="preserve">
|
<data name=">>GroupControl2.ZOrder" xml:space="preserve">
|
||||||
<value>0</value>
|
<value>0</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SimpleButton1.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>449, 26</value>
|
||||||
|
</data>
|
||||||
|
<data name="SimpleButton1.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>75, 35</value>
|
||||||
|
</data>
|
||||||
|
<data name="SimpleButton1.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>4</value>
|
||||||
|
</data>
|
||||||
|
<data name="SimpleButton1.Text" xml:space="preserve">
|
||||||
|
<value>SimpleButton1</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>SimpleButton1.Name" xml:space="preserve">
|
||||||
|
<value>SimpleButton1</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>SimpleButton1.Type" xml:space="preserve">
|
||||||
|
<value>DevExpress.XtraEditors.SimpleButton, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>SimpleButton1.Parent" xml:space="preserve">
|
||||||
|
<value>GroupControl1</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>SimpleButton1.ZOrder" xml:space="preserve">
|
||||||
|
<value>0</value>
|
||||||
|
</data>
|
||||||
<data name="btnEnvelopes_All.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="btnEnvelopes_All.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>339, 26</value>
|
<value>339, 26</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -1274,7 +1298,7 @@
|
|||||||
<value>GroupControl1</value>
|
<value>GroupControl1</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>btnEnvelopes_All.ZOrder" xml:space="preserve">
|
<data name=">>btnEnvelopes_All.ZOrder" xml:space="preserve">
|
||||||
<value>0</value>
|
<value>1</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="btnEnvelopes_thisYear.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="btnEnvelopes_thisYear.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>229, 26</value>
|
<value>229, 26</value>
|
||||||
@@ -1298,7 +1322,7 @@
|
|||||||
<value>GroupControl1</value>
|
<value>GroupControl1</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>btnEnvelopes_thisYear.ZOrder" xml:space="preserve">
|
<data name=">>btnEnvelopes_thisYear.ZOrder" xml:space="preserve">
|
||||||
<value>1</value>
|
<value>2</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="btnEnvelopes_lastmonth.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="btnEnvelopes_lastmonth.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>119, 26</value>
|
<value>119, 26</value>
|
||||||
@@ -1322,7 +1346,7 @@
|
|||||||
<value>GroupControl1</value>
|
<value>GroupControl1</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>btnEnvelopes_lastmonth.ZOrder" xml:space="preserve">
|
<data name=">>btnEnvelopes_lastmonth.ZOrder" xml:space="preserve">
|
||||||
<value>2</value>
|
<value>3</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="btnEnvelopes_thismonth.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="btnEnvelopes_thismonth.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>9, 26</value>
|
<value>9, 26</value>
|
||||||
@@ -1346,13 +1370,13 @@
|
|||||||
<value>GroupControl1</value>
|
<value>GroupControl1</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>btnEnvelopes_thismonth.ZOrder" xml:space="preserve">
|
<data name=">>btnEnvelopes_thismonth.ZOrder" xml:space="preserve">
|
||||||
<value>3</value>
|
<value>4</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GroupControl1.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="GroupControl1.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>11, 5</value>
|
<value>11, 5</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GroupControl1.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="GroupControl1.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>453, 68</value>
|
<value>588, 68</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GroupControl1.TabIndex" type="System.Int32, mscorlib">
|
<data name="GroupControl1.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
@@ -1397,7 +1421,7 @@
|
|||||||
<value>1</value>
|
<value>1</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="XtraTabPageAdmin.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="XtraTabPageAdmin.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>1088, 467</value>
|
<value>1088, 469</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="XtraTabPageAdmin.Text" xml:space="preserve">
|
<data name="XtraTabPageAdmin.Text" xml:space="preserve">
|
||||||
<value>Auswertungen (Admin) - BETA</value>
|
<value>Auswertungen (Admin) - BETA</value>
|
||||||
@@ -1789,6 +1813,12 @@
|
|||||||
<data name=">>BarButtonItem4.Type" xml:space="preserve">
|
<data name=">>BarButtonItem4.Type" xml:space="preserve">
|
||||||
<value>DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
<value>DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name=">>BarStaticItemGhost.Name" xml:space="preserve">
|
||||||
|
<value>BarStaticItemGhost</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>BarStaticItemGhost.Type" xml:space="preserve">
|
||||||
|
<value>DevExpress.XtraBars.BarStaticItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||||
|
</data>
|
||||||
<data name=">>RibbonPage1.Name" xml:space="preserve">
|
<data name=">>RibbonPage1.Name" xml:space="preserve">
|
||||||
<value>RibbonPage1</value>
|
<value>RibbonPage1</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -1933,12 +1963,6 @@
|
|||||||
<data name=">>XtraSaveFileDialog1.Type" xml:space="preserve">
|
<data name=">>XtraSaveFileDialog1.Type" xml:space="preserve">
|
||||||
<value>DevExpress.XtraEditors.XtraSaveFileDialog, DevExpress.XtraDialogs.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
<value>DevExpress.XtraEditors.XtraSaveFileDialog, DevExpress.XtraDialogs.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>BarStaticItemGhost.Name" xml:space="preserve">
|
|
||||||
<value>BarStaticItemGhost</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>BarStaticItemGhost.Type" xml:space="preserve">
|
|
||||||
<value>DevExpress.XtraBars.BarStaticItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>$this.Name" xml:space="preserve">
|
<data name=">>$this.Name" xml:space="preserve">
|
||||||
<value>frmMain</value>
|
<value>frmMain</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using EnvelopeGenerator.Web.Models.Annotation;
|
using EnvelopeGenerator.Web.Models;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
|
|
||||||
@@ -7,7 +6,6 @@ namespace EnvelopeGenerator.Web.Controllers;
|
|||||||
|
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
[ApiController]
|
[ApiController]
|
||||||
[Authorize]
|
|
||||||
public class ConfigController : ControllerBase
|
public class ConfigController : ControllerBase
|
||||||
{
|
{
|
||||||
private readonly AnnotationParams _annotParams;
|
private readonly AnnotationParams _annotParams;
|
||||||
@@ -20,6 +18,6 @@ public class ConfigController : ControllerBase
|
|||||||
[HttpGet("Annotations")]
|
[HttpGet("Annotations")]
|
||||||
public IActionResult GetAnnotationParams()
|
public IActionResult GetAnnotationParams()
|
||||||
{
|
{
|
||||||
return Ok(_annotParams.AnnotationJSObject);
|
return Ok(_annotParams.AnnotationDictionary);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Web.Models.Annotation;
|
namespace EnvelopeGenerator.Web.Models;
|
||||||
|
|
||||||
public record Annotation : IAnnotation
|
public record Annotation
|
||||||
{
|
{
|
||||||
public required string Name { get; init; }
|
public required string Name { get; init; }
|
||||||
|
|
||||||
@@ -60,16 +60,6 @@ public record Annotation : IAnnotation
|
|||||||
public Annotation? VerBoundAnnot { get; set; }
|
public Annotation? VerBoundAnnot { get; set; }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public Color? BackgroundColor { get; init; }
|
|
||||||
|
|
||||||
#region Border
|
|
||||||
public Color? BorderColor { get; init; }
|
|
||||||
|
|
||||||
public string? BorderStyle { get; init; }
|
|
||||||
|
|
||||||
public int? BorderWidth { get; set; }
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
internal Annotation Default
|
internal Annotation Default
|
||||||
{
|
{
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
using System.Text.Json.Serialization;
|
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Web.Models.Annotation;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The Background is an annotation for the PSPDF Kit. However, it has no function.
|
|
||||||
/// It is only the first annotation as a background for other annotations.
|
|
||||||
/// </summary>
|
|
||||||
public record Background : IAnnotation
|
|
||||||
{
|
|
||||||
[JsonIgnore]
|
|
||||||
public double Margin { get; init; }
|
|
||||||
|
|
||||||
public string Name { get; } = "Background";
|
|
||||||
|
|
||||||
public double? Width { get; set; }
|
|
||||||
|
|
||||||
public double? Height { get; set; }
|
|
||||||
|
|
||||||
public double Left { get; set; }
|
|
||||||
|
|
||||||
public double Top { get; set; }
|
|
||||||
|
|
||||||
public Color? BackgroundColor { get; init; }
|
|
||||||
|
|
||||||
#region Border
|
|
||||||
public Color? BorderColor { get; init; }
|
|
||||||
|
|
||||||
public string? BorderStyle { get; init; }
|
|
||||||
|
|
||||||
public int? BorderWidth { get; set; }
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
public void Locate(IEnumerable<IAnnotation> annotations)
|
|
||||||
{
|
|
||||||
// set Top
|
|
||||||
if (annotations.MinBy(a => a.Top)?.Top is double minTop)
|
|
||||||
Top = minTop;
|
|
||||||
|
|
||||||
// set Left
|
|
||||||
if (annotations.MinBy(a => a.Left)?.Left is double minLeft)
|
|
||||||
Left = minLeft;
|
|
||||||
|
|
||||||
// set Width
|
|
||||||
if(annotations.MaxBy(a => a.GetRight())?.GetRight() is double maxRight)
|
|
||||||
Width = maxRight - Left;
|
|
||||||
|
|
||||||
// set Height
|
|
||||||
if (annotations.MaxBy(a => a.GetBottom())?.GetBottom() is double maxBottom)
|
|
||||||
Height = maxBottom - Top;
|
|
||||||
|
|
||||||
// add margins
|
|
||||||
Top -= Margin;
|
|
||||||
Left -= Margin;
|
|
||||||
Width += Margin * 2;
|
|
||||||
Height += Margin * 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
namespace EnvelopeGenerator.Web.Models.Annotation;
|
|
||||||
|
|
||||||
public record Color
|
|
||||||
{
|
|
||||||
public int R { get; init; } = 0;
|
|
||||||
|
|
||||||
public int G { get; init; } = 0;
|
|
||||||
|
|
||||||
public int B { get; init; } = 0;
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
namespace EnvelopeGenerator.Web.Models.Annotation;
|
|
||||||
|
|
||||||
public static class Extensions
|
|
||||||
{
|
|
||||||
public static double GetRight(this IAnnotation annotation) => annotation.Left + annotation?.Width ?? 0;
|
|
||||||
|
|
||||||
public static double GetBottom(this IAnnotation annotation) => annotation.Top + annotation?.Height ?? 0;
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
namespace EnvelopeGenerator.Web.Models.Annotation;
|
|
||||||
|
|
||||||
public interface IAnnotation
|
|
||||||
{
|
|
||||||
string Name { get; }
|
|
||||||
|
|
||||||
double? Width { get; }
|
|
||||||
|
|
||||||
double? Height { get; }
|
|
||||||
|
|
||||||
double Left { get; }
|
|
||||||
|
|
||||||
double Top { get; }
|
|
||||||
|
|
||||||
Color? BackgroundColor { get; }
|
|
||||||
|
|
||||||
Color? BorderColor { get; }
|
|
||||||
|
|
||||||
string? BorderStyle { get; }
|
|
||||||
|
|
||||||
int? BorderWidth { get; }
|
|
||||||
}
|
|
||||||
@@ -1,21 +1,15 @@
|
|||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Web.Models.Annotation;
|
namespace EnvelopeGenerator.Web.Models;
|
||||||
|
|
||||||
public class AnnotationParams
|
public class AnnotationParams
|
||||||
{
|
{
|
||||||
public AnnotationParams()
|
|
||||||
{
|
|
||||||
_AnnotationJSObjectInitor = new(CreateAnnotationJSObject);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Background? Background { get; init; }
|
|
||||||
|
|
||||||
#region Annotation
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public Annotation? DefaultAnnotation { get; init; }
|
public Annotation? DefaultAnnotation { get; init; }
|
||||||
|
|
||||||
private readonly List<Annotation> _annots = new List<Annotation>();
|
private readonly IEnumerable<Annotation> _annots = new List<Annotation>();
|
||||||
|
|
||||||
|
public Annotation this[string name] => _annots.First(a => a.Name == name);
|
||||||
|
|
||||||
public bool TryGet(string name, out Annotation annotation)
|
public bool TryGet(string name, out Annotation annotation)
|
||||||
{
|
{
|
||||||
@@ -30,50 +24,34 @@ public class AnnotationParams
|
|||||||
get => _annots;
|
get => _annots;
|
||||||
init
|
init
|
||||||
{
|
{
|
||||||
_annots = value.ToList();
|
_annots = value;
|
||||||
|
|
||||||
if (DefaultAnnotation is not null)
|
if (DefaultAnnotation is not null)
|
||||||
foreach (var annot in _annots)
|
foreach (var annot in _annots)
|
||||||
annot.Default = DefaultAnnotation;
|
annot.Default = DefaultAnnotation;
|
||||||
|
|
||||||
for (int i = 0; i < _annots.Count; i++)
|
foreach (var annot in _annots)
|
||||||
{
|
{
|
||||||
#region set bound annotations
|
#region set bound annotations
|
||||||
// horizontal
|
// horizontal
|
||||||
if (_annots[i].HorBoundAnnotName is string horBoundAnnotName)
|
if (annot.HorBoundAnnotName is string horBoundAnnotName)
|
||||||
if (TryGet(horBoundAnnotName, out var horBoundAnnot))
|
if (TryGet(horBoundAnnotName, out var horBoundAnnot))
|
||||||
_annots[i].HorBoundAnnot = horBoundAnnot;
|
annot.HorBoundAnnot = horBoundAnnot;
|
||||||
else
|
else
|
||||||
throw new InvalidOperationException($"{horBoundAnnotName} added as bound anotation. However, it is not defined.");
|
throw new InvalidOperationException($"{horBoundAnnotName} added as bound anotation. However, it is not defined.");
|
||||||
|
|
||||||
// vertical
|
// vertical
|
||||||
if (_annots[i].VerBoundAnnotName is string verBoundAnnotName)
|
if (annot.VerBoundAnnotName is string verBoundAnnotName)
|
||||||
if (TryGet(verBoundAnnotName, out var verBoundAnnot))
|
if (TryGet(verBoundAnnotName, out var verBoundAnnot))
|
||||||
_annots[i].VerBoundAnnot = verBoundAnnot;
|
annot.VerBoundAnnot = verBoundAnnot;
|
||||||
else
|
else
|
||||||
throw new InvalidOperationException($"{verBoundAnnotName} added as bound anotation. However, it is not defined.");
|
throw new InvalidOperationException($"{verBoundAnnotName} added as bound anotation. However, it is not defined.");
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AnnotationDictionary = _annots.ToDictionary(a => a.Name.ToLower(), a => a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region AnnotationJSObject
|
public Dictionary<string, Annotation> AnnotationDictionary { get; private init; } = new();
|
||||||
private Dictionary<string, IAnnotation> CreateAnnotationJSObject()
|
|
||||||
{
|
|
||||||
var dict = _annots.ToDictionary(a => a.Name.ToLower(), a => a as IAnnotation);
|
|
||||||
|
|
||||||
if (Background is not null)
|
|
||||||
{
|
|
||||||
Background.Locate(_annots);
|
|
||||||
dict.Add(Background.Name.ToLower(), Background);
|
|
||||||
}
|
|
||||||
|
|
||||||
return dict;
|
|
||||||
}
|
|
||||||
|
|
||||||
private readonly Lazy<Dictionary<string, IAnnotation>> _AnnotationJSObjectInitor;
|
|
||||||
|
|
||||||
public Dictionary<string, IAnnotation> AnnotationJSObject => _AnnotationJSObjectInitor.Value;
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
@@ -15,7 +15,6 @@ using DigitalData.EmailProfilerDispatcher;
|
|||||||
using EnvelopeGenerator.Infrastructure;
|
using EnvelopeGenerator.Infrastructure;
|
||||||
using EnvelopeGenerator.Web.Sanitizers;
|
using EnvelopeGenerator.Web.Sanitizers;
|
||||||
using EnvelopeGenerator.Application.Contracts.Services;
|
using EnvelopeGenerator.Application.Contracts.Services;
|
||||||
using EnvelopeGenerator.Web.Models.Annotation;
|
|
||||||
|
|
||||||
var logger = LogManager.Setup().LoadConfigurationFromAppSettings().GetCurrentClassLogger();
|
var logger = LogManager.Setup().LoadConfigurationFromAppSettings().GetCurrentClassLogger();
|
||||||
logger.Info("Logging initialized!");
|
logger.Info("Logging initialized!");
|
||||||
|
|||||||
@@ -151,21 +151,6 @@
|
|||||||
},
|
},
|
||||||
"MainPageTitle": null,
|
"MainPageTitle": null,
|
||||||
"AnnotationParams": {
|
"AnnotationParams": {
|
||||||
"Background": {
|
|
||||||
"Margin": 0.20,
|
|
||||||
"BackgroundColor": {
|
|
||||||
"R": 222,
|
|
||||||
"G": 220,
|
|
||||||
"B": 215
|
|
||||||
},
|
|
||||||
"BorderColor": {
|
|
||||||
"R": 204,
|
|
||||||
"G": 202,
|
|
||||||
"B": 198
|
|
||||||
},
|
|
||||||
"BorderStyle": "underline",
|
|
||||||
"BorderWidth": 4
|
|
||||||
},
|
|
||||||
"DefaultAnnotation": {
|
"DefaultAnnotation": {
|
||||||
"Width": 1,
|
"Width": 1,
|
||||||
"Height": 0.5,
|
"Height": 0.5,
|
||||||
|
|||||||
@@ -5,34 +5,6 @@ async function createAnnotations(document, instance) {
|
|||||||
for(var element of document.elements) {
|
for(var element of document.elements) {
|
||||||
const annotParams = await getAnnotationParams(element.left, element.top);
|
const annotParams = await getAnnotationParams(element.left, element.top);
|
||||||
const page = element.page - 1
|
const page = element.page - 1
|
||||||
|
|
||||||
//background
|
|
||||||
if(annotParams.background){
|
|
||||||
let background = annotParams.background;
|
|
||||||
const id_background = PSPDFKit.generateInstantId();
|
|
||||||
const annotation_background = new PSPDFKit.Annotations.WidgetAnnotation({
|
|
||||||
id: id_background,
|
|
||||||
pageIndex: page,
|
|
||||||
formFieldName: id_background,
|
|
||||||
backgroundColor: background?.backgroundColor ? new PSPDFKit.Color(background.backgroundColor) : null,
|
|
||||||
blendMode: 'normal',
|
|
||||||
boundingBox: new PSPDFKit.Geometry.Rect(background),
|
|
||||||
fontSize: 8,
|
|
||||||
borderStyle: background.borderStyle,
|
|
||||||
borderWidth: background.borderWidth,
|
|
||||||
borderColor: background?.borderColor ? new PSPDFKit.Color(background.borderColor) : null
|
|
||||||
});
|
|
||||||
|
|
||||||
const formFieldBackground = new PSPDFKit.FormFields.ButtonFormField({
|
|
||||||
name: id_background,
|
|
||||||
annotationIds: PSPDFKit.Immutable.List([annotation_background.id]),
|
|
||||||
value: "",
|
|
||||||
readOnly: false
|
|
||||||
});
|
|
||||||
|
|
||||||
signatures.push(annotation_background)
|
|
||||||
signatures.push(formFieldBackground)
|
|
||||||
}
|
|
||||||
|
|
||||||
//signatures
|
//signatures
|
||||||
const id = PSPDFKit.generateInstantId()
|
const id = PSPDFKit.generateInstantId()
|
||||||
@@ -40,8 +12,8 @@ async function createAnnotations(document, instance) {
|
|||||||
id: id,
|
id: id,
|
||||||
pageIndex: page,
|
pageIndex: page,
|
||||||
formFieldName: id,
|
formFieldName: id,
|
||||||
backgroundColor: PSPDFKit.Color.LIGHT_YELLOW,
|
backgroundColor: PSPDFKit.Color.YELLOW,
|
||||||
blendMode: 'normal',
|
blendMode: 'multiply',
|
||||||
boundingBox: new PSPDFKit.Geometry.Rect(annotParams.signature),
|
boundingBox: new PSPDFKit.Geometry.Rect(annotParams.signature),
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -57,7 +29,7 @@ async function createAnnotations(document, instance) {
|
|||||||
pageIndex: page,
|
pageIndex: page,
|
||||||
formFieldName: id_position,
|
formFieldName: id_position,
|
||||||
backgroundColor: PSPDFKit.Color.DarkBlue,
|
backgroundColor: PSPDFKit.Color.DarkBlue,
|
||||||
blendMode: 'normal',
|
blendMode: 'multiply',
|
||||||
boundingBox: new PSPDFKit.Geometry.Rect(annotParams.position),
|
boundingBox: new PSPDFKit.Geometry.Rect(annotParams.position),
|
||||||
fontSize: 8
|
fontSize: 8
|
||||||
})
|
})
|
||||||
@@ -76,7 +48,7 @@ async function createAnnotations(document, instance) {
|
|||||||
pageIndex: page,
|
pageIndex: page,
|
||||||
formFieldName: id_city,
|
formFieldName: id_city,
|
||||||
backgroundColor: PSPDFKit.Color.DarkBlue,
|
backgroundColor: PSPDFKit.Color.DarkBlue,
|
||||||
blendMode: 'normal',
|
blendMode: 'multiply',
|
||||||
boundingBox: new PSPDFKit.Geometry.Rect(annotParams.city),
|
boundingBox: new PSPDFKit.Geometry.Rect(annotParams.city),
|
||||||
fontSize: 8
|
fontSize: 8
|
||||||
})
|
})
|
||||||
@@ -95,7 +67,7 @@ async function createAnnotations(document, instance) {
|
|||||||
pageIndex: page,
|
pageIndex: page,
|
||||||
formFieldName: id_date,
|
formFieldName: id_date,
|
||||||
backgroundColor: PSPDFKit.Color.DarkBlue,
|
backgroundColor: PSPDFKit.Color.DarkBlue,
|
||||||
blendMode: 'normal',
|
blendMode: 'multiply',
|
||||||
boundingBox: new PSPDFKit.Geometry.Rect(annotParams.date),
|
boundingBox: new PSPDFKit.Geometry.Rect(annotParams.date),
|
||||||
fontSize: 8,
|
fontSize: 8,
|
||||||
backgroundColor: PSPDFKit.Color.TRANSPARENT,
|
backgroundColor: PSPDFKit.Color.TRANSPARENT,
|
||||||
@@ -125,7 +97,7 @@ async function createAnnotations(document, instance) {
|
|||||||
id: id_date_label,
|
id: id_date_label,
|
||||||
pageIndex: page,
|
pageIndex: page,
|
||||||
formFieldName: id_date_label,
|
formFieldName: id_date_label,
|
||||||
blendMode: 'normal',
|
blendMode: 'multiply',
|
||||||
boundingBox: new PSPDFKit.Geometry.Rect(annotParams.datelabel),
|
boundingBox: new PSPDFKit.Geometry.Rect(annotParams.datelabel),
|
||||||
fontSize: 8,
|
fontSize: 8,
|
||||||
backgroundColor: PSPDFKit.Color.TRANSPARENT,
|
backgroundColor: PSPDFKit.Color.TRANSPARENT,
|
||||||
@@ -147,7 +119,7 @@ async function createAnnotations(document, instance) {
|
|||||||
id: id_city_label,
|
id: id_city_label,
|
||||||
pageIndex: page,
|
pageIndex: page,
|
||||||
formFieldName: id_city_label,
|
formFieldName: id_city_label,
|
||||||
blendMode: 'normal',
|
blendMode: 'multiply',
|
||||||
boundingBox: new PSPDFKit.Geometry.Rect(annotParams.citylabel),
|
boundingBox: new PSPDFKit.Geometry.Rect(annotParams.citylabel),
|
||||||
fontSize: 8,
|
fontSize: 8,
|
||||||
backgroundColor: PSPDFKit.Color.TRANSPARENT,
|
backgroundColor: PSPDFKit.Color.TRANSPARENT,
|
||||||
@@ -159,8 +131,7 @@ async function createAnnotations(document, instance) {
|
|||||||
name: id_city_label,
|
name: id_city_label,
|
||||||
annotationIds: PSPDFKit.Immutable.List([annotation_city_label.id]),
|
annotationIds: PSPDFKit.Immutable.List([annotation_city_label.id]),
|
||||||
value: "Ort",
|
value: "Ort",
|
||||||
readOnly: true,
|
readOnly: true
|
||||||
color: PSPDFKit.Color.BLACK
|
|
||||||
})
|
})
|
||||||
|
|
||||||
//position label
|
//position label
|
||||||
@@ -169,7 +140,7 @@ async function createAnnotations(document, instance) {
|
|||||||
id: id_position_label,
|
id: id_position_label,
|
||||||
pageIndex: page,
|
pageIndex: page,
|
||||||
formFieldName: id_position_label,
|
formFieldName: id_position_label,
|
||||||
blendMode: 'normal',
|
blendMode: 'multiply',
|
||||||
boundingBox: new PSPDFKit.Geometry.Rect(annotParams.positionlabel),
|
boundingBox: new PSPDFKit.Geometry.Rect(annotParams.positionlabel),
|
||||||
fontSize: 8,
|
fontSize: 8,
|
||||||
backgroundColor: PSPDFKit.Color.TRANSPARENT,
|
backgroundColor: PSPDFKit.Color.TRANSPARENT,
|
||||||
|
|||||||
@@ -175,21 +175,21 @@ async function setLanguage(language) {
|
|||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then(res => res.json())
|
.then(res => res.json())
|
||||||
.then(langs => langs.includes(language))
|
.then(langs => langs.includes(language))
|
||||||
.catch(err => false);
|
.catch(err => false);
|
||||||
|
|
||||||
if (hasLang)
|
if(hasLang)
|
||||||
return await fetch(`/lang/${language}`, {
|
return await fetch(`/lang/${language}`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: { 'Content-Type': 'application/json' }
|
headers: { 'Content-Type': 'application/json' }
|
||||||
})
|
})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
if (response.redirected)
|
if (response.redirected)
|
||||||
window.location.href = response.url;
|
window.location.href = response.url;
|
||||||
else if (!response.ok)
|
else if (!response.ok)
|
||||||
return Promise.reject('Failed to set language');
|
return Promise.reject('Failed to set language');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function logout() {
|
async function logout() {
|
||||||
@@ -204,23 +204,22 @@ async function logout() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getAnnotationParams(leftInInch = 0, topInInch = 0, inchToPointFactor = 72) {
|
||||||
async function getAnnotationParams(leftInInch = 0, topInInch = 0, inchToPointFactor = 72) {
|
return fetch(`${window.location.origin}/api/Config/Annotations`, {
|
||||||
|
|
||||||
const annotParams = await fetch(`${window.location.origin}/api/Config/Annotations`, {
|
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
method: 'GET'
|
method: 'GET'
|
||||||
})
|
})
|
||||||
.then(res => res.json());
|
.then(res => res.json())
|
||||||
|
.then(annotParams => {
|
||||||
for (var key in annotParams) {
|
for(var key in annotParams){
|
||||||
var annot = annotParams[key];
|
var annot = annotParams[key];
|
||||||
annot.width *= inchToPointFactor;
|
annot.width *= inchToPointFactor;
|
||||||
annot.height *= inchToPointFactor;
|
annot.height *= inchToPointFactor;
|
||||||
annot.left += leftInInch - 0.7;
|
annot.left += leftInInch;
|
||||||
annot.left *= inchToPointFactor;
|
annot.left *= inchToPointFactor;
|
||||||
annot.top += topInInch - 0.5;
|
annot.top += topInInch;
|
||||||
annot.top *= inchToPointFactor;
|
annot.top *= inchToPointFactor;
|
||||||
}
|
}
|
||||||
return annotParams;
|
return annotParams;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
@@ -1 +1 @@
|
|||||||
async function setLangAsync(n,t){document.getElementById("selectedFlag").className="fi "+t+" me-2";await fetch(`/lang/${n}`,{method:"POST",headers:{"Content-Type":"application/json"}})}async function setLanguage(n){const t=await fetch("/lang",{method:"GET",headers:{"Content-Type":"application/json"}}).then(n=>n.json()).then(t=>t.includes(n)).catch(()=>!1);if(t)return await fetch(`/lang/${n}`,{method:"POST",headers:{"Content-Type":"application/json"}}).then(n=>{if(n.redirected)window.location.href=n.url;else if(!n.ok)return Promise.reject("Failed to set language")})}async function logout(){return await fetch(`/auth/logout`,{method:"POST",headers:{"Content-Type":"application/json"}}).then(n=>{n.ok&&(window.location.href="/")})}async function getAnnotationParams(n=0,t=0,i=72){var f,r;const u=await fetch(`${window.location.origin}/api/Config/Annotations`,{credentials:"include",method:"GET"}).then(n=>n.json());for(f in u)r=u[f],r.width*=i,r.height*=i,r.left+=n-.7,r.left*=i,r.top+=t-.5,r.top*=i;return u}class Network{async getEnvelope(n){return this.getRequest(`/api/envelope/${n}`).then(this.wrapJsonResponse.bind(this))}async postEnvelope(n,t,i){return this.postRequest(`/api/envelope/${n}?index=${t}`,i).then(this.wrapJsonResponse.bind(this))}async getDocument(n,t){return this.getRequest(`/api/document/${n}?index=${t}`).then(this.wrapBinaryResponse.bind(this))}async openDocument(n){return this.postRequest(`/api/document/${n}`,{}).then(this.wrapJsonResponse.bind(this))}withCSRFToken(n){const t=getCSRFToken;let i=n.headers;return n.headers={...i,...t},n}getCSRFToken(){const n=document.getElementsByName("__RequestVerificationToken")[0].value;return{"X-XSRF-TOKEN":n}}getRequest(n){const t=this.getCSRFToken(),i={credentials:"include",method:"GET",headers:{...t}};return fetch(n,i)}postRequest(n,t){const i=this.getCSRFToken(),r={credentials:"include",method:"POST",headers:{...i,"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(t)};return fetch(n,r)}async wrapJsonResponse(n){return await this.wrapResponse(n,async n=>await n.json())}async wrapBinaryResponse(n){return await this.wrapResponse(n,async n=>await n.arrayBuffer())}async wrapResponse(n,t){let i;if(n.status===200){const r=await t(n);i=new WrappedResponse(r,null)}else if(n.status===403){const t=await n.json();i=new WrappedResponse(null,t)}else i=new WrappedResponse(null,null);return i}}class WrappedResponse{constructor(n,t){this.data=n;this.error=t;this.fatal=n===null&&t===null}}
|
async function setLangAsync(n,t){document.getElementById("selectedFlag").className="fi "+t+" me-2";await fetch(`/lang/${n}`,{method:"POST",headers:{"Content-Type":"application/json"}})}async function setLanguage(n){const t=await fetch("/lang",{method:"GET",headers:{"Content-Type":"application/json"}}).then(n=>n.json()).then(t=>t.includes(n)).catch(()=>!1);if(t)return await fetch(`/lang/${n}`,{method:"POST",headers:{"Content-Type":"application/json"}}).then(n=>{if(n.redirected)window.location.href=n.url;else if(!n.ok)return Promise.reject("Failed to set language")})}async function logout(){return await fetch(`/auth/logout`,{method:"POST",headers:{"Content-Type":"application/json"}}).then(n=>{n.ok&&(window.location.href="/")})}function getAnnotationParams(n=0,t=0,i=72){return fetch(`${window.location.origin}/api/Config/Annotations`,{credentials:"include",method:"GET"}).then(n=>n.json()).then(r=>{var f,u;for(f in r)u=r[f],u.width*=i,u.height*=i,u.left+=n,u.left*=i,u.top+=t,u.top*=i;return r})}class Network{async getEnvelope(n){return this.getRequest(`/api/envelope/${n}`).then(this.wrapJsonResponse.bind(this))}async postEnvelope(n,t,i){return this.postRequest(`/api/envelope/${n}?index=${t}`,i).then(this.wrapJsonResponse.bind(this))}async getDocument(n,t){return this.getRequest(`/api/document/${n}?index=${t}`).then(this.wrapBinaryResponse.bind(this))}async openDocument(n){return this.postRequest(`/api/document/${n}`,{}).then(this.wrapJsonResponse.bind(this))}withCSRFToken(n){const t=getCSRFToken;let i=n.headers;return n.headers={...i,...t},n}getCSRFToken(){const n=document.getElementsByName("__RequestVerificationToken")[0].value;return{"X-XSRF-TOKEN":n}}getRequest(n){const t=this.getCSRFToken(),i={credentials:"include",method:"GET",headers:{...t}};return fetch(n,i)}postRequest(n,t){const i=this.getCSRFToken(),r={credentials:"include",method:"POST",headers:{...i,"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(t)};return fetch(n,r)}async wrapJsonResponse(n){return await this.wrapResponse(n,async n=>await n.json())}async wrapBinaryResponse(n){return await this.wrapResponse(n,async n=>await n.arrayBuffer())}async wrapResponse(n,t){let i;if(n.status===200){const r=await t(n);i=new WrappedResponse(r,null)}else if(n.status===403){const t=await n.json();i=new WrappedResponse(null,t)}else i=new WrappedResponse(null,null);return i}}class WrappedResponse{constructor(n,t){this.data=n;this.error=t;this.fatal=n===null&&t===null}}
|
||||||
Reference in New Issue
Block a user