Compare commits
54 Commits
feat/locat
...
a763fd6a24
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a763fd6a24 | ||
|
|
28a8e20b63 | ||
|
|
155f80e8b3 | ||
|
|
d8f74971f3 | ||
|
|
44dc7185c6 | ||
|
|
551ba595b6 | ||
|
|
4b77713df4 | ||
|
|
f1ca1e9067 | ||
|
|
0469f057c9 | ||
|
|
b4a97abe6b | ||
|
|
423b293197 | ||
|
|
27618a343e | ||
|
|
fe106c5a8c | ||
|
|
941b98b1a4 | ||
|
|
168c33bfea | ||
|
|
40c25ee111 | ||
|
|
608d79d35b | ||
|
|
62d396932d | ||
|
|
62dcb41526 | ||
|
|
360bb9b3d8 | ||
|
|
1f57914f9e | ||
|
|
9c431ddf56 | ||
|
|
61ff2f8cde | ||
|
|
f2ee509727 | ||
|
|
da06daf776 | ||
|
|
d3104500d4 | ||
|
|
d23b8b9187 | ||
|
|
ec206ab33a | ||
|
|
de6d4b9dd8 | ||
|
|
2943fe0e2d | ||
|
|
33e99f584a | ||
|
|
4a62ab0c56 | ||
|
|
132acd35cc | ||
|
|
ed80839777 | ||
|
|
2114615584 | ||
|
|
6e6f3fd2ed | ||
|
|
5da306acd3 | ||
|
|
18ef1d19b5 | ||
|
|
b76ebd2abc | ||
|
|
d55233061d | ||
|
|
949001791c | ||
|
|
30f93f2439 | ||
|
|
36ffb9511c | ||
|
|
bf84d5c63a | ||
|
|
57f8d0e398 | ||
|
|
bb8bd8ed40 | ||
|
|
ba832acad3 | ||
|
|
6490a3cb82 | ||
|
|
4c077c90db | ||
|
|
9bd5e63128 | ||
|
|
15ce7c9384 | ||
|
|
8707a5cdb5 | ||
|
|
47c7070700 | ||
|
|
fcc3223eb1 |
@@ -0,0 +1,22 @@
|
|||||||
|
using DigitalData.Core.Abstractions.Client;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Configurations.GtxMessaging
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// https://www.gtx-messaging.com/en/api-docs/sms-rest-api/
|
||||||
|
/// </summary>
|
||||||
|
public class SmsParams : IHttpClientOptions
|
||||||
|
{
|
||||||
|
public required string Uri { get; init; }
|
||||||
|
|
||||||
|
public string? Path { get; init; }
|
||||||
|
|
||||||
|
public Dictionary<string, object>? Headers { get; init; }
|
||||||
|
|
||||||
|
public Dictionary<string, object?>? QueryParams { get; init; }
|
||||||
|
|
||||||
|
public string RecipientQueryParamName { get; init; } = "to";
|
||||||
|
|
||||||
|
public string MessageQueryParamName { get; init; } = "text";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
using DigitalData.Core.Abstractions.Application;
|
using DigitalData.Core.Abstractions.Application;
|
||||||
using DigitalData.Core.DTO;
|
using DigitalData.Core.DTO;
|
||||||
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
|
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
|
||||||
using EnvelopeGenerator.Application.DTOs.Receiver;
|
using EnvelopeGenerator.Application.DTOs.Messaging;
|
||||||
using EnvelopeGenerator.Domain.Entities;
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Application.Contracts
|
namespace EnvelopeGenerator.Application.Contracts
|
||||||
@@ -30,5 +30,7 @@ namespace EnvelopeGenerator.Application.Contracts
|
|||||||
Task<DataResult<IEnumerable<EnvelopeReceiverDto>>> ReadByUsernameAsync(string username, int? min_status = null, int? max_status = null, params int[] ignore_statuses);
|
Task<DataResult<IEnumerable<EnvelopeReceiverDto>>> ReadByUsernameAsync(string username, int? min_status = null, int? max_status = null, params int[] ignore_statuses);
|
||||||
|
|
||||||
Task<DataResult<string?>> ReadLastUsedReceiverNameByMail(string mail);
|
Task<DataResult<string?>> ReadLastUsedReceiverNameByMail(string mail);
|
||||||
|
|
||||||
|
Task<DataResult<SmsResponse>> SendSmsAsync(string envelopeReceiverId, string message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
11
EnvelopeGenerator.Application/Contracts/IMessagingService.cs
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
using EnvelopeGenerator.Application.DTOs.Messaging;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Contracts
|
||||||
|
{
|
||||||
|
public interface IMessagingService
|
||||||
|
{
|
||||||
|
public Task<SmsResponse> SendSmsAsync(string recipient, string message);
|
||||||
|
|
||||||
|
string ServiceProvider { get; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,44 +7,47 @@ using EnvelopeGenerator.Infrastructure.Contracts;
|
|||||||
using EnvelopeGenerator.Infrastructure.Repositories;
|
using EnvelopeGenerator.Infrastructure.Repositories;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||||
|
using DigitalData.Core.Client;
|
||||||
|
using EnvelopeGenerator.Application.Configurations.GtxMessaging;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Application
|
namespace EnvelopeGenerator.Application
|
||||||
{
|
{
|
||||||
public static class DIExtensions
|
public static class DIExtensions
|
||||||
{
|
{
|
||||||
public static IServiceCollection AddEnvelopeGenerator(this IServiceCollection services, IConfiguration dispatcherConfigSection, IConfiguration mailConfigSection)
|
public static IServiceCollection AddEnvelopeGenerator(this IServiceCollection services, IConfigurationSection dispatcherConfigSection, IConfigurationSection mailConfigSection, IConfigurationSection smsConfigSection)
|
||||||
{
|
{
|
||||||
//Inject CRUD Service and repositoriesad
|
//Inject CRUD Service and repositoriesad
|
||||||
services.AddScoped<IConfigRepository, ConfigRepository>();
|
services.TryAddScoped<IConfigRepository, ConfigRepository>();
|
||||||
services.AddScoped<IDocumentReceiverElementRepository, DocumentReceiverElementRepository>();
|
services.TryAddScoped<IDocumentReceiverElementRepository, DocumentReceiverElementRepository>();
|
||||||
services.AddScoped<IEnvelopeDocumentRepository, EnvelopeDocumentRepository>();
|
services.TryAddScoped<IEnvelopeDocumentRepository, EnvelopeDocumentRepository>();
|
||||||
services.AddScoped<IConfigRepository, ConfigRepository>();
|
services.TryAddScoped<IConfigRepository, ConfigRepository>();
|
||||||
services.AddScoped<IDocumentReceiverElementRepository, DocumentReceiverElementRepository>();
|
services.TryAddScoped<IDocumentReceiverElementRepository, DocumentReceiverElementRepository>();
|
||||||
services.AddScoped<IDocumentStatusRepository, DocumentStatusRepository>();
|
services.TryAddScoped<IDocumentStatusRepository, DocumentStatusRepository>();
|
||||||
services.AddScoped<IEmailTemplateRepository, EmailTemplateRepository>();
|
services.TryAddScoped<IEmailTemplateRepository, EmailTemplateRepository>();
|
||||||
services.AddScoped<IEnvelopeRepository, EnvelopeRepository>();
|
services.TryAddScoped<IEnvelopeRepository, EnvelopeRepository>();
|
||||||
services.AddScoped<IEnvelopeCertificateRepository, EnvelopeCertificateRepository>();
|
services.TryAddScoped<IEnvelopeCertificateRepository, EnvelopeCertificateRepository>();
|
||||||
services.AddScoped<IEnvelopeDocumentRepository, EnvelopeDocumentRepository>();
|
services.TryAddScoped<IEnvelopeDocumentRepository, EnvelopeDocumentRepository>();
|
||||||
services.AddScoped<IEnvelopeHistoryRepository, EnvelopeHistoryRepository>();
|
services.TryAddScoped<IEnvelopeHistoryRepository, EnvelopeHistoryRepository>();
|
||||||
services.AddScoped<IEnvelopeReceiverRepository, EnvelopeReceiverRepository>();
|
services.TryAddScoped<IEnvelopeReceiverRepository, EnvelopeReceiverRepository>();
|
||||||
services.AddScoped<IEnvelopeTypeRepository, EnvelopeTypeRepository>();
|
services.TryAddScoped<IEnvelopeTypeRepository, EnvelopeTypeRepository>();
|
||||||
services.AddScoped<IReceiverRepository, ReceiverRepository>();
|
services.TryAddScoped<IReceiverRepository, ReceiverRepository>();
|
||||||
services.AddScoped<IUserReceiverRepository, UserReceiverRepository>();
|
services.TryAddScoped<IUserReceiverRepository, UserReceiverRepository>();
|
||||||
services.AddScoped<IEnvelopeReceiverReadOnlyRepository, EnvelopeReceiverReadOnlyRepository>();
|
services.TryAddScoped<IEnvelopeReceiverReadOnlyRepository, EnvelopeReceiverReadOnlyRepository>();
|
||||||
services.AddScoped<IConfigService, ConfigService>();
|
services.TryAddScoped<IConfigService, ConfigService>();
|
||||||
services.AddScoped<IDocumentReceiverElementService, DocumentReceiverElementService>();
|
services.TryAddScoped<IDocumentReceiverElementService, DocumentReceiverElementService>();
|
||||||
services.AddScoped<IEnvelopeDocumentService, EnvelopeDocumentService>();
|
services.TryAddScoped<IEnvelopeDocumentService, EnvelopeDocumentService>();
|
||||||
services.AddScoped<IEnvelopeHistoryService, EnvelopeHistoryService>();
|
services.TryAddScoped<IEnvelopeHistoryService, EnvelopeHistoryService>();
|
||||||
services.AddScoped<IDocumentStatusService, DocumentStatusService>();
|
services.TryAddScoped<IDocumentStatusService, DocumentStatusService>();
|
||||||
services.AddScoped<IEmailTemplateService, EmailTemplateService>();
|
services.TryAddScoped<IEmailTemplateService, EmailTemplateService>();
|
||||||
services.AddScoped<IEnvelopeService, EnvelopeService>();
|
services.TryAddScoped<IEnvelopeService, EnvelopeService>();
|
||||||
services.AddScoped<IEnvelopeCertificateService, EnvelopeCertificateService>();
|
services.TryAddScoped<IEnvelopeCertificateService, EnvelopeCertificateService>();
|
||||||
services.AddScoped<IEnvelopeDocumentService, EnvelopeDocumentService>();
|
services.TryAddScoped<IEnvelopeDocumentService, EnvelopeDocumentService>();
|
||||||
services.AddScoped<IEnvelopeReceiverService, EnvelopeReceiverService>();
|
services.TryAddScoped<IEnvelopeReceiverService, EnvelopeReceiverService>();
|
||||||
services.AddScoped<IEnvelopeTypeService, EnvelopeTypeService>();
|
services.TryAddScoped<IEnvelopeTypeService, EnvelopeTypeService>();
|
||||||
services.AddScoped<IReceiverService, ReceiverService>();
|
services.TryAddScoped<IReceiverService, ReceiverService>();
|
||||||
services.AddScoped<IUserReceiverService, UserReceiverService>();
|
services.TryAddScoped<IUserReceiverService, UserReceiverService>();
|
||||||
services.AddScoped<IEnvelopeReceiverReadOnlyService, EnvelopeReceiverReadOnlyService>();
|
services.TryAddScoped<IEnvelopeReceiverReadOnlyService, EnvelopeReceiverReadOnlyService>();
|
||||||
|
|
||||||
//Auto mapping profiles
|
//Auto mapping profiles
|
||||||
services.AddAutoMapper(typeof(BasicDtoMappingProfile).Assembly);
|
services.AddAutoMapper(typeof(BasicDtoMappingProfile).Assembly);
|
||||||
@@ -53,11 +56,15 @@ namespace EnvelopeGenerator.Application
|
|||||||
services.Configure<DispatcherConfig>(dispatcherConfigSection);
|
services.Configure<DispatcherConfig>(dispatcherConfigSection);
|
||||||
services.Configure<MailConfig>(mailConfigSection);
|
services.Configure<MailConfig>(mailConfigSection);
|
||||||
|
|
||||||
|
services.AddHttpClientService<SmsParams>(smsConfigSection);
|
||||||
|
services.TryAddSingleton<IMessagingService, GtxMessagingService>();
|
||||||
|
|
||||||
return services;
|
return services;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IServiceCollection AddEnvelopeGenerator(this IServiceCollection services, IConfiguration config) => services.AddEnvelopeGenerator(
|
public static IServiceCollection AddEnvelopeGenerator(this IServiceCollection services, IConfiguration config) => services.AddEnvelopeGenerator(
|
||||||
dispatcherConfigSection: config.GetSection("DispatcherConfig"),
|
dispatcherConfigSection: config.GetSection("DispatcherConfig"),
|
||||||
mailConfigSection: config.GetSection("MailConfig"));
|
mailConfigSection: config.GetSection("MailConfig"),
|
||||||
|
smsConfigSection: config.GetSection("SmsConfig"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using DigitalData.Core.Abstractions;
|
using DigitalData.Core.Abstractions;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Application.DTOs
|
namespace EnvelopeGenerator.Application.DTOs
|
||||||
@@ -8,11 +9,9 @@ namespace EnvelopeGenerator.Application.DTOs
|
|||||||
int SendingProfile,
|
int SendingProfile,
|
||||||
string SignatureHost,
|
string SignatureHost,
|
||||||
string ExternalProgramName,
|
string ExternalProgramName,
|
||||||
string ExportPath,
|
string ExportPath) : IUnique<int>
|
||||||
string DocumentPathDmz,
|
|
||||||
string ExportPathDmz,
|
|
||||||
string DocumentPathMoveAftsend) : IUnique<int>
|
|
||||||
{
|
{
|
||||||
|
[NotMapped]
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[Obsolete("Configuration does not have an ID; it represents a single table in the database.")]
|
[Obsolete("Configuration does not have an ID; it represents a single table in the database.")]
|
||||||
public int Id => throw new InvalidOperationException("This configuration does not support an ID as it represents a single row in the database.");
|
public int Id => throw new InvalidOperationException("This configuration does not support an ID as it represents a single row in the database.");
|
||||||
|
|||||||
@@ -25,5 +25,7 @@ namespace EnvelopeGenerator.Application.DTOs.EnvelopeReceiver
|
|||||||
public DateTime AddedWhen { get; init; }
|
public DateTime AddedWhen { get; init; }
|
||||||
|
|
||||||
public DateTime? ChangedWhen { get; init; }
|
public DateTime? ChangedWhen { get; init; }
|
||||||
|
|
||||||
|
public bool HasPhoneNumber { get; init; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
17
EnvelopeGenerator.Application/DTOs/Messaging/SmsResponse.cs
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
namespace EnvelopeGenerator.Application.DTOs.Messaging
|
||||||
|
{
|
||||||
|
public record SmsResponse
|
||||||
|
{
|
||||||
|
public required bool Ok { get; init; }
|
||||||
|
|
||||||
|
public DateTime? AllowedAt { get; set; }
|
||||||
|
|
||||||
|
public TimeSpan AllowedAfter => Allowed ? TimeSpan.Zero : AllowedAt!.Value - DateTime.Now;
|
||||||
|
|
||||||
|
public bool Allowed => AllowedAt is null || DateTime.Now >= AllowedAt;
|
||||||
|
|
||||||
|
public bool Error => !Ok && Allowed;
|
||||||
|
|
||||||
|
public dynamic? Errors { get; init; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -12,8 +12,9 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="AutoMapper" Version="13.0.1" />
|
<PackageReference Include="AutoMapper" Version="13.0.1" />
|
||||||
<PackageReference Include="DigitalData.Core.Abstractions" Version="2.0.0" />
|
<PackageReference Include="DigitalData.Core.Abstractions" Version="2.2.1" />
|
||||||
<PackageReference Include="DigitalData.Core.Application" Version="2.0.0" />
|
<PackageReference Include="DigitalData.Core.Application" Version="2.0.0" />
|
||||||
|
<PackageReference Include="DigitalData.Core.Client" Version="2.0.3" />
|
||||||
<PackageReference Include="DigitalData.Core.DTO" Version="2.0.0" />
|
<PackageReference Include="DigitalData.Core.DTO" Version="2.0.0" />
|
||||||
<PackageReference Include="DigitalData.EmailProfilerDispatcher" Version="2.0.0" />
|
<PackageReference Include="DigitalData.EmailProfilerDispatcher" Version="2.0.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.18" />
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.18" />
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
public static readonly string PossibleSecurityBreach = nameof(PossibleSecurityBreach);
|
public static readonly string PossibleSecurityBreach = nameof(PossibleSecurityBreach);
|
||||||
public static readonly string WrongEnvelopeReceiverId = nameof(WrongEnvelopeReceiverId);
|
public static readonly string WrongEnvelopeReceiverId = nameof(WrongEnvelopeReceiverId);
|
||||||
public static readonly string EnvelopeOrReceiverNonexists = nameof(EnvelopeOrReceiverNonexists);
|
public static readonly string EnvelopeOrReceiverNonexists = nameof(EnvelopeOrReceiverNonexists);
|
||||||
|
public static readonly string PhoneNumberNonexists = nameof(PhoneNumberNonexists);
|
||||||
public static readonly string Default = nameof(Default);
|
public static readonly string Default = nameof(Default);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
11
EnvelopeGenerator.Application/MappingExtensions.cs
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
using EnvelopeGenerator.Domain.HttpResponse;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application
|
||||||
|
{
|
||||||
|
public static class MappingExtensions
|
||||||
|
{
|
||||||
|
public static bool Ok(this GtxMessagingResponse gtxMessagingResponse)
|
||||||
|
=> gtxMessagingResponse.TryGetValue("message-status", out var status)
|
||||||
|
&& status?.ToString()?.ToLower() == "ok";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,8 +3,10 @@ using EnvelopeGenerator.Application.DTOs;
|
|||||||
using EnvelopeGenerator.Application.DTOs.EnvelopeHistory;
|
using EnvelopeGenerator.Application.DTOs.EnvelopeHistory;
|
||||||
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
|
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
|
||||||
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiverReadOnly;
|
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiverReadOnly;
|
||||||
|
using EnvelopeGenerator.Application.DTOs.Messaging;
|
||||||
using EnvelopeGenerator.Application.DTOs.Receiver;
|
using EnvelopeGenerator.Application.DTOs.Receiver;
|
||||||
using EnvelopeGenerator.Domain.Entities;
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using EnvelopeGenerator.Domain.HttpResponse;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Application.MappingProfiles
|
namespace EnvelopeGenerator.Application.MappingProfiles
|
||||||
{
|
{
|
||||||
@@ -50,6 +52,13 @@ namespace EnvelopeGenerator.Application.MappingProfiles
|
|||||||
CreateMap<EnvelopeReceiverBase, EnvelopeReceiverBasicDto>();
|
CreateMap<EnvelopeReceiverBase, EnvelopeReceiverBasicDto>();
|
||||||
CreateMap<EnvelopeReceiverReadOnlyCreateDto, EnvelopeReceiverReadOnly>();
|
CreateMap<EnvelopeReceiverReadOnlyCreateDto, EnvelopeReceiverReadOnly>();
|
||||||
CreateMap<EnvelopeReceiverReadOnlyUpdateDto, EnvelopeReceiverReadOnly>();
|
CreateMap<EnvelopeReceiverReadOnlyUpdateDto, EnvelopeReceiverReadOnly>();
|
||||||
|
|
||||||
|
// Messaging mappings
|
||||||
|
// for GTX messaging
|
||||||
|
CreateMap<GtxMessagingResponse, SmsResponse>()
|
||||||
|
.ConstructUsing(gtxRes => gtxRes.Ok()
|
||||||
|
? new SmsResponse() { Ok = true }
|
||||||
|
: new SmsResponse() { Ok = false, Errors = gtxRes });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -156,6 +156,9 @@
|
|||||||
<data name="Hello" xml:space="preserve">
|
<data name="Hello" xml:space="preserve">
|
||||||
<value>Hallo</value>
|
<value>Hallo</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="HomePageDescription" xml:space="preserve">
|
||||||
|
<value>Das digitale Unterschriftenportal ist eine Plattform, die entwickelt wurde, um Ihre Dokumente sicher zu unterschreiben und zu verwalten. Mit seiner benutzerfreundlichen Oberfläche können Sie Ihre Dokumente schnell hochladen, die Unterschriftsprozesse verfolgen und Ihre digitalen Unterschriftenanwendungen einfach durchführen. Dieses Portal beschleunigt Ihren Arbeitsablauf mit rechtlich gültigen Unterschriften und erhöht gleichzeitig die Sicherheit Ihrer Dokumente.</value>
|
||||||
|
</data>
|
||||||
<data name="LocakedOpen" xml:space="preserve">
|
<data name="LocakedOpen" xml:space="preserve">
|
||||||
<value>Öffnen</value>
|
<value>Öffnen</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -174,9 +177,27 @@
|
|||||||
<data name="LockedFooterTitle" xml:space="preserve">
|
<data name="LockedFooterTitle" xml:space="preserve">
|
||||||
<value>Sie haben keinen Zugriffscode erhalten?</value>
|
<value>Sie haben keinen Zugriffscode erhalten?</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="LockedSmsAccessCode" xml:space="preserve">
|
||||||
|
<value>SMS-Code</value>
|
||||||
|
</data>
|
||||||
|
<data name="LockedSmsTfaBody" xml:space="preserve">
|
||||||
|
<value>Wir haben soeben den Zugangscode als SMS an die von Ihnen angegebene Telefonnummer gesendet.</value>
|
||||||
|
</data>
|
||||||
|
<data name="LockedSmsTfaFooterBody" xml:space="preserve">
|
||||||
|
<value>Sie können den Absender bitten, Ihre Rufnummer zu überprüfen. Die Telefonnummer muss mit der Ortsvorwahl eingegeben werden. Andernfalls können Sie beantragen, den Zwei-Faktor-Schutz zu entfernen.</value>
|
||||||
|
</data>
|
||||||
|
<data name="LockedSmsTfaFooterTitle" xml:space="preserve">
|
||||||
|
<value>Sie haben keine SMS erhalten?</value>
|
||||||
|
</data>
|
||||||
|
<data name="LockedSmsTfaTitle" xml:space="preserve">
|
||||||
|
<value>2-Faktor-Authentifizierung</value>
|
||||||
|
</data>
|
||||||
<data name="LockedTitle" xml:space="preserve">
|
<data name="LockedTitle" xml:space="preserve">
|
||||||
<value>Dokument erfordert einen Zugriffscode</value>
|
<value>Dokument erfordert einen Zugriffscode</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Privacy" xml:space="preserve">
|
||||||
|
<value>Datenschutz</value>
|
||||||
|
</data>
|
||||||
<data name="ReadOnlyMessage" xml:space="preserve">
|
<data name="ReadOnlyMessage" xml:space="preserve">
|
||||||
<value>Weitergeleitet von {0}. Gültig bis {1}.</value>
|
<value>Weitergeleitet von {0}. Gültig bis {1}.</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -156,6 +156,9 @@
|
|||||||
<data name="Hello" xml:space="preserve">
|
<data name="Hello" xml:space="preserve">
|
||||||
<value>Hello</value>
|
<value>Hello</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="HomePageDescription" xml:space="preserve">
|
||||||
|
<value>The Digital Signature Portal is a platform developed for securely signing and managing your documents. With its user-friendly interface, you can quickly upload your documents, track the signing processes, and easily carry out your digital signature applications. This portal accelerates your workflow with legally valid signatures while enhancing the security of your documents.</value>
|
||||||
|
</data>
|
||||||
<data name="LocakedOpen" xml:space="preserve">
|
<data name="LocakedOpen" xml:space="preserve">
|
||||||
<value>Open</value>
|
<value>Open</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -174,9 +177,27 @@
|
|||||||
<data name="LockedFooterTitle" xml:space="preserve">
|
<data name="LockedFooterTitle" xml:space="preserve">
|
||||||
<value>You have not received an access code?</value>
|
<value>You have not received an access code?</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="LockedSmsAccessCode" xml:space="preserve">
|
||||||
|
<value>SMS Code</value>
|
||||||
|
</data>
|
||||||
|
<data name="LockedSmsTfaBody" xml:space="preserve">
|
||||||
|
<value>We have just sent the access code as an SMS to the phone number you provided.</value>
|
||||||
|
</data>
|
||||||
|
<data name="LockedSmsTfaFooterBody" xml:space="preserve">
|
||||||
|
<value>You can ask the sender to check your phone number. The phone number must be entered with the area code. Otherwise you can request to remove the two-factor protection.</value>
|
||||||
|
</data>
|
||||||
|
<data name="LockedSmsTfaFooterTitle" xml:space="preserve">
|
||||||
|
<value>You have not received an SMS?</value>
|
||||||
|
</data>
|
||||||
|
<data name="LockedSmsTfaTitle" xml:space="preserve">
|
||||||
|
<value>2-Factor Authentication</value>
|
||||||
|
</data>
|
||||||
<data name="LockedTitle" xml:space="preserve">
|
<data name="LockedTitle" xml:space="preserve">
|
||||||
<value>Document requires an access code</value>
|
<value>Document requires an access code</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Privacy" xml:space="preserve">
|
||||||
|
<value>Privacy</value>
|
||||||
|
</data>
|
||||||
<data name="ReadOnlyMessage" xml:space="preserve">
|
<data name="ReadOnlyMessage" xml:space="preserve">
|
||||||
<value>Forwarded by {0}. Valid until {1}.</value>
|
<value>Forwarded by {0}. Valid until {1}.</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ using EnvelopeGenerator.Infrastructure.Contracts;
|
|||||||
using Microsoft.Extensions.Localization;
|
using Microsoft.Extensions.Localization;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using EnvelopeGenerator.Extensions;
|
using EnvelopeGenerator.Extensions;
|
||||||
|
using EnvelopeGenerator.Application.DTOs.Messaging;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Application.Services
|
namespace EnvelopeGenerator.Application.Services
|
||||||
{
|
{
|
||||||
@@ -16,10 +17,13 @@ namespace EnvelopeGenerator.Application.Services
|
|||||||
{
|
{
|
||||||
private readonly IStringLocalizer<Resource> _localizer;
|
private readonly IStringLocalizer<Resource> _localizer;
|
||||||
|
|
||||||
public EnvelopeReceiverService(IEnvelopeReceiverRepository repository, IStringLocalizer<Resource> localizer, IMapper mapper)
|
private readonly IMessagingService _messagingService;
|
||||||
|
|
||||||
|
public EnvelopeReceiverService(IEnvelopeReceiverRepository repository, IStringLocalizer<Resource> localizer, IMapper mapper, IMessagingService messagingService)
|
||||||
: base(repository, mapper)
|
: base(repository, mapper)
|
||||||
{
|
{
|
||||||
_localizer = localizer;
|
_localizer = localizer;
|
||||||
|
_messagingService = messagingService;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<DataResult<IEnumerable<EnvelopeReceiverDto>>> ReadBySignatureAsync(string signature, bool withEnvelope = false, bool withReceiver = true)
|
public async Task<DataResult<IEnumerable<EnvelopeReceiverDto>>> ReadBySignatureAsync(string signature, bool withEnvelope = false, bool withReceiver = true)
|
||||||
@@ -135,5 +139,31 @@ namespace EnvelopeGenerator.Application.Services
|
|||||||
var er = await _repository.ReadLastByReceiver(mail);
|
var er = await _repository.ReadLastByReceiver(mail);
|
||||||
return er is null ? Result.Fail<string?>().Notice(LogLevel.None, Flag.NotFound) : Result.Success(er.Name);
|
return er is null ? Result.Fail<string?>().Notice(LogLevel.None, Flag.NotFound) : Result.Success(er.Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<DataResult<SmsResponse>> SendSmsAsync(string envelopeReceiverId, string message)
|
||||||
|
{
|
||||||
|
(string? uuid, string? signature) = envelopeReceiverId.DecodeEnvelopeReceiverId();
|
||||||
|
|
||||||
|
if (uuid is null || signature is null)
|
||||||
|
return Result.Fail<SmsResponse>()
|
||||||
|
.Message(_localizer[Key.WrongEnvelopeReceiverId])
|
||||||
|
.Notice(LogLevel.Warning, (uuid, signature).ToTitle())
|
||||||
|
.Notice(LogLevel.Warning, EnvelopeFlag.WrongEnvelopeReceiverId)
|
||||||
|
.Notice(LogLevel.Warning, Flag.PossibleSecurityBreach);
|
||||||
|
|
||||||
|
var env_rcv = await _repository.ReadByUuidSignatureAsync(uuid: uuid, signature: signature, withEnvelope: false, withReceiver: false);
|
||||||
|
if (env_rcv is null)
|
||||||
|
return Result.Fail<SmsResponse>()
|
||||||
|
.Message(Key.EnvelopeReceiverNotFound);
|
||||||
|
|
||||||
|
if (env_rcv.PhoneNumber is null)
|
||||||
|
return Result.Fail<SmsResponse>()
|
||||||
|
.Message(Key.PhoneNumberNonexists)
|
||||||
|
.Notice(LogLevel.Error, Flag.NotFound, $"An attempt was made to send sms to the user whose phone number is null. Envelope recipient ID is {envelopeReceiverId}, UUID is {uuid} and signature is {signature}.");
|
||||||
|
|
||||||
|
var res = await _messagingService.SendSmsAsync(recipient: env_rcv.PhoneNumber, message: message);
|
||||||
|
|
||||||
|
return Result.Success(res);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
using AutoMapper;
|
||||||
|
using DigitalData.Core.Abstractions.Client;
|
||||||
|
using DigitalData.Core.Client;
|
||||||
|
using EnvelopeGenerator.Application.Configurations.GtxMessaging;
|
||||||
|
using EnvelopeGenerator.Application.Contracts;
|
||||||
|
using EnvelopeGenerator.Application.DTOs.Messaging;
|
||||||
|
using EnvelopeGenerator.Domain.HttpResponse;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Services
|
||||||
|
{
|
||||||
|
public class GtxMessagingService : IMessagingService
|
||||||
|
{
|
||||||
|
private readonly IHttpClientService<SmsParams> _smsClient;
|
||||||
|
|
||||||
|
private readonly SmsParams _smsParams;
|
||||||
|
|
||||||
|
private readonly IMapper _mapper;
|
||||||
|
|
||||||
|
public GtxMessagingService(IHttpClientService<SmsParams> smsClient, IOptions<SmsParams> smsParamsOptions, IMapper mapper)
|
||||||
|
{
|
||||||
|
_smsClient = smsClient;
|
||||||
|
_smsParams = smsParamsOptions.Value;
|
||||||
|
_mapper = mapper;
|
||||||
|
ServiceProvider = GetType().Name.Replace("Service", string.Empty);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<SmsResponse> SendSmsAsync(string recipient, string message)
|
||||||
|
{
|
||||||
|
return await _smsClient.FetchAsync(queryParams: new Dictionary<string, object?>()
|
||||||
|
{
|
||||||
|
{ _smsParams.RecipientQueryParamName, recipient },
|
||||||
|
{ _smsParams.MessageQueryParamName, message }
|
||||||
|
})
|
||||||
|
.ThenAsync(res => res.Json<GtxMessagingResponse>())
|
||||||
|
.ThenAsync(_mapper.Map<SmsResponse>);
|
||||||
|
}
|
||||||
|
|
||||||
|
public string ServiceProvider { get; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
|
|
||||||
Public Enum CertificationType
|
Public Enum CertificationType
|
||||||
ElectronicSignature = 1
|
ElectronicSignature = 1
|
||||||
QualifiedSignature = 2
|
'QualifiedSignature = 2
|
||||||
End Enum
|
End Enum
|
||||||
|
|
||||||
Public Enum FinalEmailType
|
Public Enum FinalEmailType
|
||||||
|
|||||||
@@ -3,13 +3,6 @@
|
|||||||
Public Property DocumentPathOrigin As String = ""
|
Public Property DocumentPathOrigin As String = ""
|
||||||
Public Property DocumentPath As String = ""
|
Public Property DocumentPath As String = ""
|
||||||
Public Property ExportPath As String = ""
|
Public Property ExportPath As String = ""
|
||||||
Public Property DocumentPath_DMZ As String = ""
|
|
||||||
Public Property ExportPath_DMZ As String = ""
|
|
||||||
Public Property DOCUMENT_PATH_MOVE_AFTSEND As String = ""
|
|
||||||
Public Property FINISHED_PATH_EX_DMZ As String = ""
|
|
||||||
Public Property EML_PATH_EX_DMZ As String = ""
|
|
||||||
Public Property SendingProfile As Integer = 0
|
Public Property SendingProfile As Integer = 0
|
||||||
Public Property SignatureHost As String = ""
|
Public Property SignatureHost As String = ""
|
||||||
Public Property NetUse_necessary As Boolean = False
|
|
||||||
Public Property NetUse_Finish As Boolean = False
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -260,11 +260,13 @@
|
|||||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||||
<LastGenOutput>Model.en.Designer.vb</LastGenOutput>
|
<LastGenOutput>Model.en.Designer.vb</LastGenOutput>
|
||||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Strings\Model.resx">
|
<EmbeddedResource Include="Strings\Model.resx">
|
||||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||||
<LastGenOutput>Model.Designer.vb</LastGenOutput>
|
<LastGenOutput>Model.Designer.vb</LastGenOutput>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -82,49 +82,14 @@ Namespace Jobs
|
|||||||
|
|
||||||
Logger.Debug("Loading ReportCreator..")
|
Logger.Debug("Loading ReportCreator..")
|
||||||
ReportCreator = New ReportCreator(LogConfig, oState)
|
ReportCreator = New ReportCreator(LogConfig, oState)
|
||||||
Logger.Debug("My.Settings.RuninDMZ: [{0}]", My.Settings.RuninDMZ.ToString)
|
|
||||||
Logger.Debug("My.Settings.NetUse_Usr: [{0}]", My.Settings.NetUse_Usr)
|
|
||||||
|
|
||||||
|
Config.DocumentPath = Config.DocumentPath
|
||||||
|
|
||||||
If My.Settings.RuninDMZ = True Then
|
|
||||||
If Config.DocumentPath_DMZ <> String.Empty Then
|
|
||||||
Logger.Debug("RuninDMZ - Using DocumentPath_DMZ: [{0}] - Overwrite Document-Path", Config.DocumentPath_DMZ)
|
|
||||||
Config.DocumentPath = Config.DocumentPath_DMZ
|
|
||||||
Config.NetUse_necessary = True
|
|
||||||
Else
|
|
||||||
Config.DocumentPath = Config.DocumentPath
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
If Config.DOCUMENT_PATH_MOVE_AFTSEND <> String.Empty Then
|
|
||||||
Logger.Debug("Using DMZRemotePath: [{0}] - Overwrite Document-Path ...", Config.DOCUMENT_PATH_MOVE_AFTSEND)
|
|
||||||
Config.DocumentPath = Config.DOCUMENT_PATH_MOVE_AFTSEND
|
|
||||||
Config.NetUse_Finish = True
|
|
||||||
|
|
||||||
Else
|
|
||||||
Config.DocumentPath = Config.DocumentPath
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Logger.Debug("DocumentPath: [{0}]", Config.DocumentPath)
|
Logger.Debug("DocumentPath: [{0}]", Config.DocumentPath)
|
||||||
|
|
||||||
If My.Settings.RuninDMZ = True Then
|
|
||||||
If Config.FINISHED_PATH_EX_DMZ <> String.Empty Then
|
|
||||||
Logger.Debug("RuninDMZ - FINISHED_PATH_EX_DMZ configured: [{0}]", Config.FINISHED_PATH_EX_DMZ)
|
|
||||||
Config.NetUse_Finish = True
|
|
||||||
End If
|
|
||||||
If Config.ExportPath_DMZ <> String.Empty Then
|
|
||||||
Logger.Debug("RuninDMZ - Using ExportPath_DMZ: [{0}] - Overwrite ExportPath", Config.ExportPath_DMZ)
|
|
||||||
Config.ExportPath = Config.ExportPath_DMZ
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
Logger.Debug("ExportPath: [{0}]", Config.ExportPath)
|
Logger.Debug("ExportPath: [{0}]", Config.ExportPath)
|
||||||
|
|
||||||
If Config.NetUse_Finish = True Then
|
|
||||||
If NetUse_Command(Config.DocumentPath, My.Settings.NetUse_Usr, My.Settings.NetUse_PW) = True Then
|
|
||||||
Logger.Debug("NetUse_Finish = successful!")
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim oCompleteStatus As Integer = Constants.EnvelopeStatus.EnvelopeCompletelySigned
|
Dim oCompleteStatus As Integer = Constants.EnvelopeStatus.EnvelopeCompletelySigned
|
||||||
Dim oSql = $"SELECT * FROM TBSIG_ENVELOPE WHERE STATUS = {oCompleteStatus} AND DATEDIFF(minute, CHANGED_WHEN, GETDATE()) >= {CompleteWaitTime} ORDER BY GUID"
|
Dim oSql = $"SELECT * FROM TBSIG_ENVELOPE WHERE STATUS = {oCompleteStatus} AND DATEDIFF(minute, CHANGED_WHEN, GETDATE()) >= {CompleteWaitTime} ORDER BY GUID"
|
||||||
Dim oTable = Database.GetDatatable(oSql)
|
Dim oTable = Database.GetDatatable(oSql)
|
||||||
@@ -157,10 +122,6 @@ Namespace Jobs
|
|||||||
Logger.Warn("EnvelopeData could not be loaded for Id [{0}]!", oId)
|
Logger.Warn("EnvelopeData could not be loaded for Id [{0}]!", oId)
|
||||||
Throw New ArgumentNullException("EnvelopeData")
|
Throw New ArgumentNullException("EnvelopeData")
|
||||||
End If
|
End If
|
||||||
If Config.DOCUMENT_PATH_MOVE_AFTSEND <> String.Empty Then
|
|
||||||
oEnvelopeData.DocumentPath.Replace(Config.DocumentPathOrigin, Config.DOCUMENT_PATH_MOVE_AFTSEND)
|
|
||||||
Logger.Debug("Replaced Path in oEnvelopeData.DocumentPath!")
|
|
||||||
End If
|
|
||||||
Logger.Debug("Burning Annotations to pdf ...")
|
Logger.Debug("Burning Annotations to pdf ...")
|
||||||
Dim oBurnedDocument As Byte() = BurnAnnotationsToPdf(oEnvelopeData)
|
Dim oBurnedDocument As Byte() = BurnAnnotationsToPdf(oEnvelopeData)
|
||||||
If oBurnedDocument Is Nothing Then
|
If oBurnedDocument Is Nothing Then
|
||||||
@@ -196,13 +157,6 @@ Namespace Jobs
|
|||||||
Throw New ExportDocumentException("Could not export final document to disk!", ex)
|
Throw New ExportDocumentException("Could not export final document to disk!", ex)
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
If Config.NetUse_Finish = True Then
|
|
||||||
If Config.FINISHED_PATH_EX_DMZ <> String.Empty Then
|
|
||||||
If My.Settings.NetUse_PW <> String.Empty And My.Settings.NetUse_Usr <> String.Empty Then
|
|
||||||
Clean_DNZ_PAth(Config.FINISHED_PATH_EX_DMZ)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Logger.Info("Writing EB-bytes to database...")
|
Logger.Info("Writing EB-bytes to database...")
|
||||||
Update_File_DB(oOutputFilePath, oEnvelope.Id)
|
Update_File_DB(oOutputFilePath, oEnvelope.Id)
|
||||||
|
|
||||||
@@ -287,48 +241,48 @@ Namespace Jobs
|
|||||||
data = br.ReadBytes(CInt(numBytes))
|
data = br.ReadBytes(CInt(numBytes))
|
||||||
Return data
|
Return data
|
||||||
End Function
|
End Function
|
||||||
Private Function NetUse_Command(pDestinationPath As String, pUsername As String, pPassword As String)
|
'Private Function NetUse_Command(pDestinationPath As String, pUsername As String, pPassword As String)
|
||||||
Dim oDectryptedPW = Helpers.Decrypt(My.Settings.NetUse_PW)
|
' Dim oDectryptedPW = Helpers.Decrypt(My.Settings.NetUse_PW)
|
||||||
Dim netUseCommand As String = $"net use {pDestinationPath} /user:{pUsername} {oDectryptedPW}"
|
' Dim netUseCommand As String = $"net use {pDestinationPath} /user:{pUsername} {oDectryptedPW}"
|
||||||
Logger.Debug("EXECUTING NetUse_Command for " & pDestinationPath)
|
' Logger.Debug("EXECUTING NetUse_Command for " & pDestinationPath)
|
||||||
Dim processInfo As New ProcessStartInfo("cmd.exe", $"/C {netUseCommand}")
|
' Dim processInfo As New ProcessStartInfo("cmd.exe", $"/C {netUseCommand}")
|
||||||
processInfo.RedirectStandardOutput = True
|
' processInfo.RedirectStandardOutput = True
|
||||||
processInfo.UseShellExecute = False
|
' processInfo.UseShellExecute = False
|
||||||
processInfo.CreateNoWindow = True
|
' processInfo.CreateNoWindow = True
|
||||||
|
|
||||||
Using process As Process = Process.Start(processInfo)
|
' Using process As Process = Process.Start(processInfo)
|
||||||
process.WaitForExit()
|
' process.WaitForExit()
|
||||||
|
|
||||||
' Prüfe den Rückgabewert des net use Befehls
|
' ' Prüfe den Rückgabewert des net use Befehls
|
||||||
If process.ExitCode = 0 Then
|
' If process.ExitCode = 0 Then
|
||||||
Return True
|
' Return True
|
||||||
Else
|
' Else
|
||||||
Return False
|
' Return False
|
||||||
End If
|
' End If
|
||||||
End Using
|
' End Using
|
||||||
End Function
|
'End Function
|
||||||
|
|
||||||
Private Function Clean_DNZ_PAth(pSourcePath As String) As Boolean
|
'Private Function Clean_DNZ_PAth(pSourcePath As String) As Boolean
|
||||||
Dim oFilename = System.IO.Path.GetFileName(pSourcePath)
|
' Dim oFilename = System.IO.Path.GetFileName(pSourcePath)
|
||||||
|
|
||||||
Logger.Debug("## Starting Clean_DNZ_PAth ...")
|
' Logger.Debug("## Starting Clean_DNZ_PAth ...")
|
||||||
Logger.Debug("## pSourcePath {0}", pSourcePath)
|
' Logger.Debug("## pSourcePath {0}", pSourcePath)
|
||||||
|
|
||||||
Dim oDirectorySource = Path.Combine(pSourcePath, ParentFolderUID)
|
' Dim oDirectorySource = Path.Combine(pSourcePath, ParentFolderUID)
|
||||||
|
|
||||||
Try
|
' Try
|
||||||
Logger.Debug($"Deleting oDirectorySource {oDirectorySource} ...")
|
' Logger.Debug($"Deleting oDirectorySource {oDirectorySource} ...")
|
||||||
Directory.Delete(oDirectorySource, True)
|
' Directory.Delete(oDirectorySource, True)
|
||||||
Console.WriteLine($"Folder successfully deleted!")
|
' Console.WriteLine($"Folder successfully deleted!")
|
||||||
Logger.Debug($"...Deleted!")
|
' Logger.Debug($"...Deleted!")
|
||||||
Return True
|
' Return True
|
||||||
Catch ex As Exception
|
' Catch ex As Exception
|
||||||
Logger.Error(ex)
|
' Logger.Error(ex)
|
||||||
Return False
|
' Return False
|
||||||
End Try
|
' End Try
|
||||||
|
|
||||||
|
|
||||||
End Function
|
'End Function
|
||||||
Private Function SendFinalEmails(pEnvelope As Envelope) As Boolean ', pAttachment As String
|
Private Function SendFinalEmails(pEnvelope As Envelope) As Boolean ', pAttachment As String
|
||||||
Dim oMailToCreator = pEnvelope.FinalEmailToCreator
|
Dim oMailToCreator = pEnvelope.FinalEmailToCreator
|
||||||
Dim oMailToReceivers = pEnvelope.FinalEmailToReceivers
|
Dim oMailToReceivers = pEnvelope.FinalEmailToReceivers
|
||||||
@@ -398,15 +352,7 @@ Namespace Jobs
|
|||||||
Dim oAnnotations = pEnvelopeData.AnnotationData
|
Dim oAnnotations = pEnvelopeData.AnnotationData
|
||||||
Dim oInputPath = ""
|
Dim oInputPath = ""
|
||||||
If IsNothing(pEnvelopeData.DocAsByte) Then
|
If IsNothing(pEnvelopeData.DocAsByte) Then
|
||||||
If My.Settings.RuninDMZ Then
|
oInputPath = pEnvelopeData.DocumentPath
|
||||||
Logger.Debug("Replacing Path in pData.DocumentPath ...")
|
|
||||||
oInputPath = pEnvelopeData.DocumentPath.Replace(Config.DocumentPathOrigin, Config.DocumentPath)
|
|
||||||
ElseIf Config.DOCUMENT_PATH_MOVE_AFTSEND <> String.Empty Then
|
|
||||||
Logger.Debug("Replacing Path in pData.DocumentPath ...")
|
|
||||||
oInputPath = pEnvelopeData.DocumentPath.Replace(Config.DocumentPathOrigin, Config.DOCUMENT_PATH_MOVE_AFTSEND)
|
|
||||||
Else
|
|
||||||
oInputPath = pEnvelopeData.DocumentPath
|
|
||||||
End If
|
|
||||||
Logger.Info($"Input path: [{oInputPath}]")
|
Logger.Info($"Input path: [{oInputPath}]")
|
||||||
Else
|
Else
|
||||||
Logger.Info($"we got bytes..")
|
Logger.Info($"we got bytes..")
|
||||||
|
|||||||
@@ -16,17 +16,12 @@ Public Class ConfigModel
|
|||||||
Dim oRow As DataRow = oTable.Rows.Item(0)
|
Dim oRow As DataRow = oTable.Rows.Item(0)
|
||||||
|
|
||||||
Return New DbConfig() With {
|
Return New DbConfig() With {
|
||||||
.DocumentPath = oRow.ItemEx("DOCUMENT_PATH", ""),
|
.DocumentPath = oRow.ItemEx("DOCUMENT_PATH", ""),
|
||||||
.DocumentPathOrigin = oRow.ItemEx("DOCUMENT_PATH", ""),
|
.DocumentPathOrigin = oRow.ItemEx("DOCUMENT_PATH", ""),
|
||||||
.DocumentPath_DMZ = oRow.ItemEx("DOCUMENT_PATH_DMZ", ""),
|
.ExportPath = oRow.ItemEx("EXPORT_PATH", ""),
|
||||||
.ExportPath = oRow.ItemEx("EXPORT_PATH", ""),
|
.SendingProfile = oRow.ItemEx("SENDING_PROFILE", 0),
|
||||||
.ExportPath_DMZ = oRow.ItemEx("EXPORT_PATH_DMZ", ""),
|
.SignatureHost = oRow.ItemEx("SIGNATURE_HOST", ""),
|
||||||
.SendingProfile = oRow.ItemEx("SENDING_PROFILE", 0),
|
.ExternalProgramName = oRow.ItemEx("EXTERNAL_PROGRAM_NAME", "")
|
||||||
.SignatureHost = oRow.ItemEx("SIGNATURE_HOST", ""),
|
|
||||||
.ExternalProgramName = oRow.ItemEx("EXTERNAL_PROGRAM_NAME", ""),
|
|
||||||
.DOCUMENT_PATH_MOVE_AFTSEND = oRow.ItemEx("DOCUMENT_PATH_MOVE_AFTSEND", ""),
|
|
||||||
.FINISHED_PATH_EX_DMZ = oRow.ItemEx("FINISHED_PATH_EX_DMZ", ""),
|
|
||||||
.EML_PATH_EX_DMZ = oRow.ItemEx("EML_PATH_EX_DMZ", "")
|
|
||||||
}
|
}
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Logger.Error(ex)
|
Logger.Error(ex)
|
||||||
|
|||||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
|||||||
' indem Sie "*" wie unten gezeigt eingeben:
|
' indem Sie "*" wie unten gezeigt eingeben:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("1.9.3.0")>
|
<Assembly: AssemblyVersion("2.0.0.0")>
|
||||||
<Assembly: AssemblyFileVersion("1.9.3.0")>
|
<Assembly: AssemblyFileVersion("2.0.0.0")>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ Option Explicit On
|
|||||||
Namespace My
|
Namespace My
|
||||||
|
|
||||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.3.0.0"), _
|
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.9.0.0"), _
|
||||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
Partial Friend NotInheritable Class MySettings
|
Partial Friend NotInheritable Class MySettings
|
||||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||||
@@ -53,33 +53,6 @@ Namespace My
|
|||||||
Return defaultInstance
|
Return defaultInstance
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
|
|
||||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
|
||||||
Global.System.Configuration.DefaultSettingValueAttribute("False")> _
|
|
||||||
Public ReadOnly Property RuninDMZ() As Boolean
|
|
||||||
Get
|
|
||||||
Return CType(Me("RuninDMZ"),Boolean)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
|
|
||||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
|
||||||
Global.System.Configuration.DefaultSettingValueAttribute("dd-gan\Administrator")> _
|
|
||||||
Public ReadOnly Property NetUse_Usr() As String
|
|
||||||
Get
|
|
||||||
Return CType(Me("NetUse_Usr"),String)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
|
|
||||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
|
||||||
Global.System.Configuration.DefaultSettingValueAttribute("sY4vnATDXwosbTJGip6SqA==")> _
|
|
||||||
Public ReadOnly Property NetUse_PW() As String
|
|
||||||
Get
|
|
||||||
Return CType(Me("NetUse_PW"),String)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
End Class
|
End Class
|
||||||
End Namespace
|
End Namespace
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,5 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="My" GeneratedClassName="MySettings" UseMySettingsClassName="true">
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||||
<Profiles />
|
<Profiles />
|
||||||
<Settings>
|
<Settings />
|
||||||
<Setting Name="RuninDMZ" Type="System.Boolean" Scope="Application">
|
|
||||||
<Value Profile="(Default)">False</Value>
|
|
||||||
</Setting>
|
|
||||||
<Setting Name="NetUse_Usr" Type="System.String" Scope="Application">
|
|
||||||
<Value Profile="(Default)">dd-gan\Administrator</Value>
|
|
||||||
</Setting>
|
|
||||||
<Setting Name="NetUse_PW" Type="System.String" Scope="Application">
|
|
||||||
<Value Profile="(Default)">sY4vnATDXwosbTJGip6SqA==</Value>
|
|
||||||
</Setting>
|
|
||||||
</Settings>
|
|
||||||
</SettingsFile>
|
</SettingsFile>
|
||||||
@@ -45,7 +45,7 @@ Public Class ActionService
|
|||||||
Return oSendResult
|
Return oSendResult
|
||||||
End Function
|
End Function
|
||||||
Public Function ResendReceiver(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean
|
Public Function ResendReceiver(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean
|
||||||
EmailService.SendDocumentReceivedEmail(pEnvelope, pReceiver)
|
Return EmailService.SendDocumentReceivedEmail(pEnvelope, pReceiver)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -168,6 +168,9 @@
|
|||||||
<data name="Envelope-Editor" xml:space="preserve">
|
<data name="Envelope-Editor" xml:space="preserve">
|
||||||
<value>Envelope-Editor</value>
|
<value>Envelope-Editor</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Error email Validation" xml:space="preserve">
|
||||||
|
<value>The email [ @Mail ] could not be varified!</value>
|
||||||
|
</data>
|
||||||
<data name="Error sending the envelope" xml:space="preserve">
|
<data name="Error sending the envelope" xml:space="preserve">
|
||||||
<value>Error sending the envelope:</value>
|
<value>Error sending the envelope:</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -168,6 +168,9 @@
|
|||||||
<data name="Envelope-Editor" xml:space="preserve">
|
<data name="Envelope-Editor" xml:space="preserve">
|
||||||
<value>Umschlag-Editor</value>
|
<value>Umschlag-Editor</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Error email Validation" xml:space="preserve">
|
||||||
|
<value>Die Email-Adresse [ @Mail ] konnte nicht validiert werden!</value>
|
||||||
|
</data>
|
||||||
<data name="Error sending the envelope" xml:space="preserve">
|
<data name="Error sending the envelope" xml:space="preserve">
|
||||||
<value>Fehler beim Senden des Umschlags:</value>
|
<value>Fehler beim Senden des Umschlags:</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -217,6 +217,15 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Sucht eine lokalisierte Zeichenfolge, die Die Email-Adresse [ @Mail ] konnte nicht validiert werden! ähnelt.
|
||||||
|
'''</summary>
|
||||||
|
Public Shared ReadOnly Property Error_email_Validation() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("Error email Validation", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Sucht eine lokalisierte Zeichenfolge, die Fehler beim Senden des Umschlags: ähnelt.
|
''' Sucht eine lokalisierte Zeichenfolge, die Fehler beim Senden des Umschlags: ähnelt.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
|
|||||||
20
EnvelopeGenerator.Common/Strings/Model.Designer.vb
generated
@@ -306,16 +306,16 @@ Namespace My.Resources
|
|||||||
Return ResourceManager.GetString("PartlySigned", resourceCulture)
|
Return ResourceManager.GetString("PartlySigned", resourceCulture)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
''''<summary>
|
||||||
''' Sucht eine lokalisierte Zeichenfolge, die Qualifizierte Signatur ähnelt.
|
'''' Sucht eine lokalisierte Zeichenfolge, die Qualifizierte Signatur ähnelt.
|
||||||
'''</summary>
|
''''</summary>
|
||||||
Public Shared ReadOnly Property QualifiedSignature() As String
|
'Public Shared ReadOnly Property QualifiedSignature() As String
|
||||||
Get
|
' Get
|
||||||
Return ResourceManager.GetString("QualifiedSignature", resourceCulture)
|
' Return ResourceManager.GetString("QualifiedSignature", resourceCulture)
|
||||||
End Get
|
' End Get
|
||||||
End Property
|
'End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Sucht eine lokalisierte Zeichenfolge, die Arbeitsanweisung ähnelt.
|
''' Sucht eine lokalisierte Zeichenfolge, die Arbeitsanweisung ähnelt.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
|
|||||||
@@ -2,9 +2,6 @@
|
|||||||
<configuration>
|
<configuration>
|
||||||
|
|
||||||
<configSections>
|
<configSections>
|
||||||
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
|
||||||
<section name="EnvelopeGenerator.Common.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
|
||||||
</sectionGroup>
|
|
||||||
</configSections>
|
</configSections>
|
||||||
<system.diagnostics>
|
<system.diagnostics>
|
||||||
<sources>
|
<sources>
|
||||||
@@ -29,17 +26,4 @@
|
|||||||
</sharedListeners>
|
</sharedListeners>
|
||||||
</system.diagnostics>
|
</system.diagnostics>
|
||||||
|
|
||||||
<applicationSettings>
|
|
||||||
<EnvelopeGenerator.Common.My.MySettings>
|
|
||||||
<setting name="RuninDMZ" serializeAs="String">
|
|
||||||
<value>False</value>
|
|
||||||
</setting>
|
|
||||||
<setting name="NetUse_Usr" serializeAs="String">
|
|
||||||
<value>dd-gan\Administrator</value>
|
|
||||||
</setting>
|
|
||||||
<setting name="NetUse_PW" serializeAs="String">
|
|
||||||
<value>sY4vnATDXwosbTJGip6SqA==</value>
|
|
||||||
</setting>
|
|
||||||
</EnvelopeGenerator.Common.My.MySettings>
|
|
||||||
</applicationSettings>
|
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using DigitalData.Core.Abstractions;
|
using DigitalData.Core.Abstractions;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Domain.Entities
|
namespace EnvelopeGenerator.Domain.Entities
|
||||||
{
|
{
|
||||||
@@ -23,19 +24,9 @@ namespace EnvelopeGenerator.Domain.Entities
|
|||||||
[Column("EXPORT_PATH", TypeName = "nvarchar(256)")]
|
[Column("EXPORT_PATH", TypeName = "nvarchar(256)")]
|
||||||
public string? ExportPath { get; init; }
|
public string? ExportPath { get; init; }
|
||||||
|
|
||||||
[Column("DOCUMENT_PATH_DMZ", TypeName = "nvarchar(512)")]
|
|
||||||
[Required]
|
|
||||||
public string? DocumentPathDmz { get; init; }
|
|
||||||
|
|
||||||
[Column("EXPORT_PATH_DMZ", TypeName = "nvarchar(512)")]
|
|
||||||
[Required]
|
|
||||||
public required string ExportPathDmz { get; init; }
|
|
||||||
|
|
||||||
[Column("DOCUMENT_PATH_MOVE_AFTSEND", TypeName = "nvarchar(512)")]
|
|
||||||
[Required]
|
|
||||||
public required string DocumentPathMoveAftsend { get; init; }
|
|
||||||
|
|
||||||
[Obsolete("Configuration does not have an ID; it represents a single table in the database.")]
|
[Obsolete("Configuration does not have an ID; it represents a single table in the database.")]
|
||||||
|
[NotMapped]
|
||||||
|
[JsonIgnore]
|
||||||
public int Id => throw new InvalidOperationException("This configuration does not support an ID as it represents a single table in the database.");
|
public int Id => throw new InvalidOperationException("This configuration does not support an ID as it represents a single table in the database.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -16,21 +16,10 @@ namespace EnvelopeGenerator.Domain.Entities
|
|||||||
[Column("ENVELOPE_ID")]
|
[Column("ENVELOPE_ID")]
|
||||||
public int EnvelopeId { get; set; }
|
public int EnvelopeId { get; set; }
|
||||||
|
|
||||||
[Required]
|
|
||||||
[Column("FILENAME", TypeName = "nvarchar(256)")]
|
|
||||||
public required string Filename { get; set; }
|
|
||||||
|
|
||||||
[Required]
|
|
||||||
[Column("FILEPATH", TypeName = "nvarchar(256)")]
|
|
||||||
public required string Filepath { get; set; }
|
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[Column("ADDED_WHEN", TypeName = "datetime")]
|
[Column("ADDED_WHEN", TypeName = "datetime")]
|
||||||
public required DateTime AddedWhen { get; set; }
|
public required DateTime AddedWhen { get; set; }
|
||||||
|
|
||||||
[Column("FILENAME_ORIGINAL", TypeName = "nvarchar(256)")]
|
|
||||||
public required string FilenameOriginal { get; set; }
|
|
||||||
|
|
||||||
[Column("BYTE_DATA", TypeName = "varbinary(max)")]
|
[Column("BYTE_DATA", TypeName = "varbinary(max)")]
|
||||||
public byte[]? ByteData { get; init; }
|
public byte[]? ByteData { get; init; }
|
||||||
|
|
||||||
|
|||||||
@@ -41,6 +41,15 @@ namespace EnvelopeGenerator.Domain.Entities
|
|||||||
[Column("CHANGED_WHEN", TypeName = "datetime")]
|
[Column("CHANGED_WHEN", TypeName = "datetime")]
|
||||||
public DateTime? ChangedWhen { get; set; }
|
public DateTime? ChangedWhen { get; set; }
|
||||||
|
|
||||||
|
[Column("PHONE_NUMBER")]
|
||||||
|
[StringLength(20)]
|
||||||
|
[RegularExpression(@"^\+[0-9]+$", ErrorMessage = "Phone number must start with '+' followed by digits.")]
|
||||||
|
public string? PhoneNumber { get; set; }
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
public (int Envelope, int Receiver) Id => (Envelope: EnvelopeId, Receiver: ReceiverId);
|
public (int Envelope, int Receiver) Id => (Envelope: EnvelopeId, Receiver: ReceiverId);
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public bool HasPhoneNumber => PhoneNumber is not null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="DigitalData.Core.Abstractions" Version="2.0.0" />
|
<PackageReference Include="DigitalData.Core.Abstractions" Version="2.2.1" />
|
||||||
<PackageReference Include="DigitalData.EmailProfilerDispatcher.Abstraction" Version="1.0.0" />
|
<PackageReference Include="DigitalData.EmailProfilerDispatcher.Abstraction" Version="1.0.0" />
|
||||||
<PackageReference Include="UserManager.Domain" Version="1.0.0" />
|
<PackageReference Include="UserManager.Domain" Version="1.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
namespace EnvelopeGenerator.Domain.HttpResponse
|
||||||
|
{
|
||||||
|
public class GtxMessagingResponse : Dictionary<string, object?> { }
|
||||||
|
}
|
||||||
@@ -142,6 +142,12 @@
|
|||||||
<Compile Include="Controllers\EnvelopeListController.vb" />
|
<Compile Include="Controllers\EnvelopeListController.vb" />
|
||||||
<Compile Include="Controllers\FieldEditorController.vb" />
|
<Compile Include="Controllers\FieldEditorController.vb" />
|
||||||
<Compile Include="Controllers\BaseController.vb" />
|
<Compile Include="Controllers\BaseController.vb" />
|
||||||
|
<Compile Include="frmChooseDocVariant.Designer.vb">
|
||||||
|
<DependentUpon>frmChooseDocVariant.vb</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="frmChooseDocVariant.vb">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Include="frmEnvelopeEditor.vb">
|
<Compile Include="frmEnvelopeEditor.vb">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -190,6 +196,9 @@
|
|||||||
<DesignTime>True</DesignTime>
|
<DesignTime>True</DesignTime>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||||
|
<EmbeddedResource Include="frmChooseDocVariant.resx">
|
||||||
|
<DependentUpon>frmChooseDocVariant.vb</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="frmEnvelopeEditor.en.resx">
|
<EmbeddedResource Include="frmEnvelopeEditor.en.resx">
|
||||||
<DependentUpon>frmEnvelopeEditor.vb</DependentUpon>
|
<DependentUpon>frmEnvelopeEditor.vb</DependentUpon>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
Imports DigitalData.Modules.Logging
|
Imports DigitalData.Modules.Logging
|
||||||
|
|
||||||
Module ModuleSettings
|
Module ModuleSettings
|
||||||
Public DOCUMENT_PATH_MOVE_AFTSEND As String = ""
|
Public ENVELOPE_TEMP_DOCUMENT As String = ""
|
||||||
Public CurrLogConfig As LogConfig
|
Public CurrLogConfig As LogConfig
|
||||||
Public Directory2Delete As String = ""
|
Public Directory2Delete As String = ""
|
||||||
Public MS_GDPICTUREKEY As String = ""
|
Public MS_GDPICTUREKEY As String = ""
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ Imports System.Runtime.InteropServices
|
|||||||
<Assembly: AssemblyCompany("Digital Data")>
|
<Assembly: AssemblyCompany("Digital Data")>
|
||||||
<Assembly: AssemblyProduct("Envelope Generator")>
|
<Assembly: AssemblyProduct("Envelope Generator")>
|
||||||
<Assembly: AssemblyCopyright("Copyright © 2024")>
|
<Assembly: AssemblyCopyright("Copyright © 2024")>
|
||||||
<Assembly: AssemblyTrademark("2.4.5.0")>
|
<Assembly: AssemblyTrademark("2.8.0.0")>
|
||||||
<Assembly: AssemblyCulture("")>
|
<Assembly: AssemblyCulture("")>
|
||||||
|
|
||||||
' Setting ComVisible to false makes the types in this assembly not visible
|
' Setting ComVisible to false makes the types in this assembly not visible
|
||||||
@@ -32,5 +32,5 @@ Imports System.Runtime.InteropServices
|
|||||||
' You can specify all the values or you can default the Build and Revision Numbers
|
' You can specify all the values or you can default the Build and Revision Numbers
|
||||||
' by using the '*' as shown below:
|
' by using the '*' as shown below:
|
||||||
' [assembly: AssemblyVersion("1.0.*")]
|
' [assembly: AssemblyVersion("1.0.*")]
|
||||||
<Assembly: AssemblyVersion("2.7.0.0")>
|
<Assembly: AssemblyVersion("2.8.0.0")>
|
||||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||||
|
|||||||
75
EnvelopeGenerator.Form/frmChooseDocVariant.Designer.vb
generated
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||||
|
Partial Class frmChooseDocVariant
|
||||||
|
Inherits DevExpress.XtraEditors.XtraForm
|
||||||
|
|
||||||
|
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
||||||
|
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||||
|
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||||
|
Try
|
||||||
|
If disposing AndAlso components IsNot Nothing Then
|
||||||
|
components.Dispose()
|
||||||
|
End If
|
||||||
|
Finally
|
||||||
|
MyBase.Dispose(disposing)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'Wird vom Windows Form-Designer benötigt.
|
||||||
|
Private components As System.ComponentModel.IContainer
|
||||||
|
|
||||||
|
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
|
||||||
|
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
|
||||||
|
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||||
|
<System.Diagnostics.DebuggerStepThrough()> _
|
||||||
|
Private Sub InitializeComponent()
|
||||||
|
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmChooseDocVariant))
|
||||||
|
Me.LabelControl1 = New DevExpress.XtraEditors.LabelControl()
|
||||||
|
Me.SimpleButton2 = New DevExpress.XtraEditors.SimpleButton()
|
||||||
|
Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog()
|
||||||
|
Me.SuspendLayout()
|
||||||
|
'
|
||||||
|
'LabelControl1
|
||||||
|
'
|
||||||
|
Me.LabelControl1.Appearance.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
|
Me.LabelControl1.Appearance.Options.UseFont = True
|
||||||
|
Me.LabelControl1.Location = New System.Drawing.Point(12, 26)
|
||||||
|
Me.LabelControl1.Name = "LabelControl1"
|
||||||
|
Me.LabelControl1.Size = New System.Drawing.Size(625, 17)
|
||||||
|
Me.LabelControl1.TabIndex = 2
|
||||||
|
Me.LabelControl1.Text = "In diesem Dialog wählen Sie die Dokumente aus, welche dann zu einem Dokument verk" &
|
||||||
|
"ettet werden!"
|
||||||
|
'
|
||||||
|
'SimpleButton2
|
||||||
|
'
|
||||||
|
Me.SimpleButton2.Appearance.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
|
Me.SimpleButton2.Appearance.Options.UseFont = True
|
||||||
|
Me.SimpleButton2.ImageOptions.SvgImage = CType(resources.GetObject("SimpleButton2.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
|
||||||
|
Me.SimpleButton2.Location = New System.Drawing.Point(142, 85)
|
||||||
|
Me.SimpleButton2.Name = "SimpleButton2"
|
||||||
|
Me.SimpleButton2.Size = New System.Drawing.Size(343, 50)
|
||||||
|
Me.SimpleButton2.TabIndex = 3
|
||||||
|
Me.SimpleButton2.Text = "Mehrere PDF auswählen und automatisch verketten"
|
||||||
|
'
|
||||||
|
'OpenFileDialog1
|
||||||
|
'
|
||||||
|
Me.OpenFileDialog1.FileName = "OpenFileDialog1"
|
||||||
|
Me.OpenFileDialog1.Filter = "PDF Files|*.pdf"
|
||||||
|
'
|
||||||
|
'frmChooseDocVariant
|
||||||
|
'
|
||||||
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
|
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||||
|
Me.ClientSize = New System.Drawing.Size(644, 189)
|
||||||
|
Me.Controls.Add(Me.SimpleButton2)
|
||||||
|
Me.Controls.Add(Me.LabelControl1)
|
||||||
|
Me.IconOptions.SvgImage = CType(resources.GetObject("frmChooseDocVariant.IconOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
|
||||||
|
Me.Name = "frmChooseDocVariant"
|
||||||
|
Me.Text = "Mehrere Dokumente"
|
||||||
|
Me.ResumeLayout(False)
|
||||||
|
Me.PerformLayout()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
Friend WithEvents LabelControl1 As DevExpress.XtraEditors.LabelControl
|
||||||
|
Friend WithEvents SimpleButton2 As DevExpress.XtraEditors.SimpleButton
|
||||||
|
Friend WithEvents OpenFileDialog1 As OpenFileDialog
|
||||||
|
End Class
|
||||||
179
EnvelopeGenerator.Form/frmChooseDocVariant.resx
Normal file
@@ -0,0 +1,179 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<assembly alias="DevExpress.Data.v21.2" name="DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||||
|
<data name="SimpleButton2.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40
|
||||||
|
LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
|
||||||
|
dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAJYEAAAC77u/
|
||||||
|
PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi
|
||||||
|
IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
|
||||||
|
MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh
|
||||||
|
Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg
|
||||||
|
MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJ
|
||||||
|
LlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5HcmVlbntmaWxsOiMwMzlD
|
||||||
|
MjM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh
|
||||||
|
Y2l0eTowLjc1O30KPC9zdHlsZT4NCiAgPGcgaWQ9IkRvY3VtZW50UERGIj4NCiAgICA8cGF0aCBkPSJN
|
||||||
|
MjIsMjR2NEgyVjJoMTR2NWMwLDAuNiwwLjQsMSwxLDFoNXY0aDJWN2wtNy03SDFDMC40LDAsMCwwLjQs
|
||||||
|
MCwxdjI4YzAsMC42LDAuNCwxLDEsMWgyMmMwLjYsMCwxLTAuNCwxLTEgICB2LTVIMjJ6IiBjbGFzcz0i
|
||||||
|
QmxhY2siIC8+DQogICAgPHBhdGggZD0iTTE5LjIsMTZjMC4zLDAuNSwwLjQsMS4xLDAuNCwxLjljMCww
|
||||||
|
LjktMC4yLDEuNS0wLjUsMmMtMC4zLDAuNS0wLjcsMC43LTEuMywwLjdoLTAuNnYtNS4zaDAuNiAgIEMx
|
||||||
|
OC40LDE1LjMsMTguOSwxNS42LDE5LjIsMTZ6IE0xMi4xLDE1LjNoLTAuNXYyLjZoMC41YzAuNywwLDEu
|
||||||
|
MS0wLjQsMS4xLTEuM2MwLTAuNC0wLjEtMC44LTAuMy0xQzEyLjYsMTUuNCwxMi40LDE1LjMsMTIuMSwx
|
||||||
|
NS4zeiAgICBNMzAsMTJ2MTJINlYxMkgzMHogTTE0LjgsMTYuNWMwLTAuOC0wLjItMS41LTAuNi0xLjlj
|
||||||
|
LTAuNC0wLjQtMS0wLjctMS44LTAuN0gxMHY4aDEuNnYtMi43aDAuNmMwLjgsMCwxLjQtMC4zLDEuOS0w
|
||||||
|
LjggICBDMTQuNSwxOCwxNC44LDE3LjMsMTQuOCwxNi41eiBNMjEuMiwxNy45YzAtMi42LTEuMS0zLjkt
|
||||||
|
My40LTMuOWgtMi4xdjhoMi4yYzEuMSwwLDEuOS0wLjQsMi41LTEuMUMyMC45LDIwLjIsMjEuMiwxOS4y
|
||||||
|
LDIxLjIsMTcuOXogICAgTTI2LDE0aC0zLjd2OGgxLjZ2LTMuMWgydi0xLjNoLTJ2LTIuMkgyNlYxNHoi
|
||||||
|
IGNsYXNzPSJSZWQiIC8+DQogIDwvZz4NCjwvc3ZnPgs=
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<metadata name="OpenFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<data name="frmChooseDocVariant.IconOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40
|
||||||
|
LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
|
||||||
|
dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAANYEAAAC77u/
|
||||||
|
PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi
|
||||||
|
IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
|
||||||
|
MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh
|
||||||
|
Y2U9InByZXNlcnZlIiBpZD0iTG9naWNhbCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg
|
||||||
|
MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KPC9z
|
||||||
|
dHlsZT4NCiAgPHBhdGggZD0iTTUsNGgyM1YzYzAtMC42LTAuNC0xLTEtMUg1QzMuMywyLDIsMy4zLDIs
|
||||||
|
NXYyMmMwLDEuNywxLjMsMywzLDNoMjJjMC42LDAsMS0wLjQsMS0xVjZINUM0LjQsNiw0LDUuNiw0LDUg
|
||||||
|
IEM0LDQuNCw0LjQsNCw1LDR6IE0xNiwyNGgtMnYtMmgyVjI0eiBNMTEuNiwxNC40YzAuMi0wLjUsMC40
|
||||||
|
LTAuOSwwLjctMS4zYzAuMy0wLjQsMC43LTAuNiwxLjEtMC44YzAuNC0wLjIsMC45LTAuMywxLjUtMC4z
|
||||||
|
ICBjMC43LDAsMS4zLDAuMSwxLjgsMC4zYzAuNSwwLjIsMC45LDAuNSwxLjIsMC44YzAuMywwLjMsMC41
|
||||||
|
LDAuNywwLjYsMWMwLjEsMC40LDAuMiwwLjcsMC4yLDFjMCwwLjQsMCwwLjctMC4xLDEgIGMtMC4xLDAu
|
||||||
|
My0wLjIsMC41LTAuMywwLjhjLTAuMSwwLjItMC4zLDAuNC0wLjQsMC42Yy0wLjIsMC4yLTAuMywwLjMt
|
||||||
|
MC41LDAuNGMtMC4yLDAuMS0wLjMsMC4zLTAuNSwwLjRjLTAuMiwwLjEtMC4zLDAuMy0wLjQsMC40ICBj
|
||||||
|
LTAuMSwwLjEtMC4zLDAuMy0wLjQsMC41Yy0wLjEsMC4yLTAuMiwwLjQtMC4yLDAuNnYwLjZoLTJ2LTAu
|
||||||
|
N2MwLTAuNCwwLjEtMC43LDAuMS0wLjljMC4xLTAuMywwLjItMC41LDAuMy0wLjcgIGMwLjEtMC4yLDAu
|
||||||
|
My0wLjQsMC40LTAuNWMwLjEtMC4xLDAuMy0wLjMsMC40LTAuNHMwLjMtMC4zLDAuNC0wLjRjMC4xLTAu
|
||||||
|
MSwwLjItMC4yLDAuMy0wLjRjMC4xLTAuMSwwLjItMC4zLDAuMi0wLjUgIGMwLjEtMC4yLDAuMS0wLjQs
|
||||||
|
MC4xLTAuNmMwLTAuNS0wLjEtMC45LTAuMy0xLjFjLTAuMi0wLjItMC41LTAuNC0wLjktMC40Yy0wLjMs
|
||||||
|
MC0wLjUsMC4xLTAuNywwLjJjLTAuMiwwLjEtMC40LDAuMy0wLjUsMC41ICBjLTAuMSwwLjItMC4yLDAu
|
||||||
|
NC0wLjMsMC43Yy0wLjEsMC4yLTAuMSwwLjUtMC4xLDAuOGgtMi4yQzExLjQsMTUuNCwxMS40LDE0Ljks
|
||||||
|
MTEuNiwxNC40eiIgY2xhc3M9IkJsdWUiIC8+DQo8L3N2Zz4L
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
96
EnvelopeGenerator.Form/frmChooseDocVariant.vb
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
Imports DevExpress.XtraSplashScreen
|
||||||
|
Imports EnvelopeGenerator.Common
|
||||||
|
Imports DigitalData.Modules.Logging
|
||||||
|
Imports GdPicture14
|
||||||
|
Public Class frmChooseDocVariant
|
||||||
|
Private TempFiles As TempFiles
|
||||||
|
Public Property State As State
|
||||||
|
Private Logger As Logger
|
||||||
|
Private Sub frmChooseDocVariant_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
|
ENVELOPE_TEMP_DOCUMENT = ""
|
||||||
|
TempFiles = New TempFiles(State.LogConfig)
|
||||||
|
TempFiles.Create()
|
||||||
|
Logger = State.LogConfig.GetLogger()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SimpleButton1_Click(sender As Object, e As EventArgs)
|
||||||
|
OpenFileDialog1.Multiselect = False
|
||||||
|
Dim oHandle = SplashScreenManager.ShowOverlayForm(Me)
|
||||||
|
|
||||||
|
Try
|
||||||
|
If OpenFileDialog1.ShowDialog() = DialogResult.OK Then
|
||||||
|
ENVELOPE_TEMP_DOCUMENT = OpenFileDialog1.FileName
|
||||||
|
End If
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
Logger.Error(ex)
|
||||||
|
Finally
|
||||||
|
SplashScreenManager.CloseOverlayForm(oHandle)
|
||||||
|
End Try
|
||||||
|
' Else
|
||||||
|
' SplashScreenManager.CloseOverlayForm(oHandle)
|
||||||
|
' End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SimpleButton2_Click(sender As Object, e As EventArgs) Handles SimpleButton2.Click
|
||||||
|
OpenFileDialog1.Multiselect = True
|
||||||
|
Dim oHandle = SplashScreenManager.ShowOverlayForm(Me)
|
||||||
|
Try
|
||||||
|
Dim oErr As Boolean = False
|
||||||
|
If OpenFileDialog1.ShowDialog() = DialogResult.OK Then
|
||||||
|
Dim oIDX As Integer = 0
|
||||||
|
For Each oFile As String In OpenFileDialog1.FileNames
|
||||||
|
oIDX += 1
|
||||||
|
Next
|
||||||
|
|
||||||
|
Dim arPDF As GdPicturePDF() = New GdPicturePDF(oIDX) {}
|
||||||
|
oIDX = 0
|
||||||
|
For Each oFile As String In OpenFileDialog1.FileNames
|
||||||
|
arPDF(oIDX) = New GdPicturePDF()
|
||||||
|
If arPDF(oIDX).LoadFromFile(oFile) <> GdPictureStatus.OK Then
|
||||||
|
MsgBox($"PDF Statsu of file {oFile} is not OK. Please check PDF-conformity!", MsgBoxStyle.Critical)
|
||||||
|
oErr = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
oIDX += 1
|
||||||
|
Next
|
||||||
|
If oErr = False Then
|
||||||
|
|
||||||
|
Dim dstPDF As GdPicturePDF = arPDF(0).MergeDocuments(arPDF)
|
||||||
|
Dim oStatus As GdPictureStatus = arPDF(0).GetStat()
|
||||||
|
If oStatus = GdPictureStatus.OK Then
|
||||||
|
MsgBox("All documents have been successfully merged.", MsgBoxStyle.Information)
|
||||||
|
Dim oTempFolder = TempFiles.TempPath
|
||||||
|
Dim oTempFilename = String.Concat(oTempFolder, "\", $"MergedDoc.pdf")
|
||||||
|
If System.IO.File.Exists(oTempFilename) Then
|
||||||
|
System.IO.File.Delete(oTempFilename)
|
||||||
|
End If
|
||||||
|
If dstPDF.SaveToFile(oTempFilename) = GdPictureStatus.OK Then
|
||||||
|
MessageBox.Show("Merged document has been successfully saved.", "Example: MergeDocuments")
|
||||||
|
ENVELOPE_TEMP_DOCUMENT = oTempFilename
|
||||||
|
dstPDF.CloseDocument()
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
MessageBox.Show("The MergeDocuments() method has failed with the status: " + oStatus.ToString(), "Example: MergeDocuments")
|
||||||
|
End If
|
||||||
|
dstPDF.Dispose()
|
||||||
|
oIDX = 0
|
||||||
|
For Each oFile As String In OpenFileDialog1.FileNames
|
||||||
|
arPDF(oIDX).CloseDocument()
|
||||||
|
oIDX += 1
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
Logger.Error(ex)
|
||||||
|
Finally
|
||||||
|
SplashScreenManager.CloseOverlayForm(oHandle)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub LabelControl1_Click(sender As Object, e As EventArgs) Handles LabelControl1.Click
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
32
EnvelopeGenerator.Form/frmEnvelopeEditor.Designer.vb
generated
@@ -58,12 +58,14 @@ Partial Public Class frmEnvelopeEditor
|
|||||||
Me.BarButtonItem1 = New DevExpress.XtraBars.BarButtonItem()
|
Me.BarButtonItem1 = New DevExpress.XtraBars.BarButtonItem()
|
||||||
Me.BarStaticItem1 = New DevExpress.XtraBars.BarStaticItem()
|
Me.BarStaticItem1 = New DevExpress.XtraBars.BarStaticItem()
|
||||||
Me.BarButtonItem2 = New DevExpress.XtraBars.BarButtonItem()
|
Me.BarButtonItem2 = New DevExpress.XtraBars.BarButtonItem()
|
||||||
|
Me.BarButtonItem3 = New DevExpress.XtraBars.BarButtonItem()
|
||||||
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
|
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
|
||||||
Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
||||||
Me.RibbonPageGroupDocuments = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
Me.RibbonPageGroupDocuments = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
||||||
Me.RibbonPageGroupInvitation = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
Me.RibbonPageGroupInvitation = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
||||||
Me.RibbonPageGroupAddSignature = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
Me.RibbonPageGroupAddSignature = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
||||||
Me.RibbonPageGroupReceiver = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
Me.RibbonPageGroupReceiver = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
||||||
|
Me.RibbonPageGroup2 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
||||||
Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar()
|
Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar()
|
||||||
Me.LayoutControlGroup4 = New DevExpress.XtraLayout.LayoutControlGroup()
|
Me.LayoutControlGroup4 = New DevExpress.XtraLayout.LayoutControlGroup()
|
||||||
Me.LayoutControlGroup5 = New DevExpress.XtraLayout.LayoutControlGroup()
|
Me.LayoutControlGroup5 = New DevExpress.XtraLayout.LayoutControlGroup()
|
||||||
@@ -98,6 +100,7 @@ Partial Public Class frmEnvelopeEditor
|
|||||||
Me.EnvelopeDocumentBindingSource = New System.Windows.Forms.BindingSource(Me.components)
|
Me.EnvelopeDocumentBindingSource = New System.Windows.Forms.BindingSource(Me.components)
|
||||||
Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog()
|
Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog()
|
||||||
Me.txtEnvelopeIdLabel = New DevExpress.XtraBars.BarStaticItem()
|
Me.txtEnvelopeIdLabel = New DevExpress.XtraBars.BarStaticItem()
|
||||||
|
Me.BarButtonItem4 = New DevExpress.XtraBars.BarButtonItem()
|
||||||
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()
|
||||||
@@ -240,9 +243,9 @@ Partial Public Class frmEnvelopeEditor
|
|||||||
'RibbonControl1
|
'RibbonControl1
|
||||||
'
|
'
|
||||||
Me.RibbonControl1.ExpandCollapseItem.Id = 0
|
Me.RibbonControl1.ExpandCollapseItem.Id = 0
|
||||||
Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.btnSave, Me.btnCancel, Me.btnNewFile, Me.btnDeleteFile, Me.btnSendEnvelope, Me.btnEditFields, Me.btnDeleteReceiver, Me.btnEditData, Me.txtCreatorEmailLabel, Me.txtEnvelopeIdLabel2, Me.BarButtonItem1, Me.BarStaticItem1, Me.BarButtonItem2})
|
Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.btnSave, Me.btnCancel, Me.btnNewFile, Me.btnDeleteFile, Me.btnSendEnvelope, Me.btnEditFields, Me.btnDeleteReceiver, Me.btnEditData, Me.txtCreatorEmailLabel, Me.txtEnvelopeIdLabel2, Me.BarButtonItem1, Me.BarStaticItem1, Me.BarButtonItem2, Me.BarButtonItem3, Me.BarButtonItem4})
|
||||||
resources.ApplyResources(Me.RibbonControl1, "RibbonControl1")
|
resources.ApplyResources(Me.RibbonControl1, "RibbonControl1")
|
||||||
Me.RibbonControl1.MaxItemId = 15
|
Me.RibbonControl1.MaxItemId = 17
|
||||||
Me.RibbonControl1.Name = "RibbonControl1"
|
Me.RibbonControl1.Name = "RibbonControl1"
|
||||||
Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1})
|
Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1})
|
||||||
Me.RibbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False]
|
Me.RibbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False]
|
||||||
@@ -342,9 +345,15 @@ Partial Public Class frmEnvelopeEditor
|
|||||||
Me.BarButtonItem2.Id = 14
|
Me.BarButtonItem2.Id = 14
|
||||||
Me.BarButtonItem2.Name = "BarButtonItem2"
|
Me.BarButtonItem2.Name = "BarButtonItem2"
|
||||||
'
|
'
|
||||||
|
'BarButtonItem3
|
||||||
|
'
|
||||||
|
resources.ApplyResources(Me.BarButtonItem3, "BarButtonItem3")
|
||||||
|
Me.BarButtonItem3.Id = 15
|
||||||
|
Me.BarButtonItem3.Name = "BarButtonItem3"
|
||||||
|
'
|
||||||
'RibbonPage1
|
'RibbonPage1
|
||||||
'
|
'
|
||||||
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1, Me.RibbonPageGroupDocuments, Me.RibbonPageGroupInvitation, Me.RibbonPageGroupAddSignature, Me.RibbonPageGroupReceiver})
|
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1, Me.RibbonPageGroupDocuments, Me.RibbonPageGroupInvitation, Me.RibbonPageGroupAddSignature, Me.RibbonPageGroupReceiver, Me.RibbonPageGroup2})
|
||||||
Me.RibbonPage1.Name = "RibbonPage1"
|
Me.RibbonPage1.Name = "RibbonPage1"
|
||||||
resources.ApplyResources(Me.RibbonPage1, "RibbonPage1")
|
resources.ApplyResources(Me.RibbonPage1, "RibbonPage1")
|
||||||
'
|
'
|
||||||
@@ -359,6 +368,7 @@ Partial Public Class frmEnvelopeEditor
|
|||||||
'RibbonPageGroupDocuments
|
'RibbonPageGroupDocuments
|
||||||
'
|
'
|
||||||
Me.RibbonPageGroupDocuments.ItemLinks.Add(Me.btnNewFile)
|
Me.RibbonPageGroupDocuments.ItemLinks.Add(Me.btnNewFile)
|
||||||
|
Me.RibbonPageGroupDocuments.ItemLinks.Add(Me.BarButtonItem4)
|
||||||
Me.RibbonPageGroupDocuments.ItemLinks.Add(Me.btnDeleteFile)
|
Me.RibbonPageGroupDocuments.ItemLinks.Add(Me.btnDeleteFile)
|
||||||
Me.RibbonPageGroupDocuments.Name = "RibbonPageGroupDocuments"
|
Me.RibbonPageGroupDocuments.Name = "RibbonPageGroupDocuments"
|
||||||
resources.ApplyResources(Me.RibbonPageGroupDocuments, "RibbonPageGroupDocuments")
|
resources.ApplyResources(Me.RibbonPageGroupDocuments, "RibbonPageGroupDocuments")
|
||||||
@@ -382,6 +392,12 @@ Partial Public Class frmEnvelopeEditor
|
|||||||
Me.RibbonPageGroupReceiver.Name = "RibbonPageGroupReceiver"
|
Me.RibbonPageGroupReceiver.Name = "RibbonPageGroupReceiver"
|
||||||
resources.ApplyResources(Me.RibbonPageGroupReceiver, "RibbonPageGroupReceiver")
|
resources.ApplyResources(Me.RibbonPageGroupReceiver, "RibbonPageGroupReceiver")
|
||||||
'
|
'
|
||||||
|
'RibbonPageGroup2
|
||||||
|
'
|
||||||
|
Me.RibbonPageGroup2.ItemLinks.Add(Me.BarButtonItem3)
|
||||||
|
Me.RibbonPageGroup2.Name = "RibbonPageGroup2"
|
||||||
|
resources.ApplyResources(Me.RibbonPageGroup2, "RibbonPageGroup2")
|
||||||
|
'
|
||||||
'RibbonStatusBar1
|
'RibbonStatusBar1
|
||||||
'
|
'
|
||||||
Me.RibbonStatusBar1.ItemLinks.Add(Me.txtCreatorEmailLabel)
|
Me.RibbonStatusBar1.ItemLinks.Add(Me.txtCreatorEmailLabel)
|
||||||
@@ -659,6 +675,13 @@ Partial Public Class frmEnvelopeEditor
|
|||||||
Me.txtEnvelopeIdLabel.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph
|
Me.txtEnvelopeIdLabel.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph
|
||||||
Me.txtEnvelopeIdLabel.Tag = "Envelope-ID: {0}"
|
Me.txtEnvelopeIdLabel.Tag = "Envelope-ID: {0}"
|
||||||
'
|
'
|
||||||
|
'BarButtonItem4
|
||||||
|
'
|
||||||
|
resources.ApplyResources(Me.BarButtonItem4, "BarButtonItem4")
|
||||||
|
Me.BarButtonItem4.Id = 16
|
||||||
|
Me.BarButtonItem4.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonItem4.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
|
||||||
|
Me.BarButtonItem4.Name = "BarButtonItem4"
|
||||||
|
'
|
||||||
'frmEnvelopeEditor
|
'frmEnvelopeEditor
|
||||||
'
|
'
|
||||||
resources.ApplyResources(Me, "$this")
|
resources.ApplyResources(Me, "$this")
|
||||||
@@ -783,6 +806,9 @@ Partial Public Class frmEnvelopeEditor
|
|||||||
Friend WithEvents BarButtonItem1 As DevExpress.XtraBars.BarButtonItem
|
Friend WithEvents BarButtonItem1 As DevExpress.XtraBars.BarButtonItem
|
||||||
Friend WithEvents BarStaticItem1 As DevExpress.XtraBars.BarStaticItem
|
Friend WithEvents BarStaticItem1 As DevExpress.XtraBars.BarStaticItem
|
||||||
Friend WithEvents BarButtonItem2 As DevExpress.XtraBars.BarButtonItem
|
Friend WithEvents BarButtonItem2 As DevExpress.XtraBars.BarButtonItem
|
||||||
|
Friend WithEvents BarButtonItem3 As DevExpress.XtraBars.BarButtonItem
|
||||||
|
Friend WithEvents RibbonPageGroup2 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
|
||||||
|
Friend WithEvents BarButtonItem4 As DevExpress.XtraBars.BarButtonItem
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|||||||
@@ -213,7 +213,7 @@
|
|||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="btnNewFile.Caption" xml:space="preserve">
|
<data name="btnNewFile.Caption" xml:space="preserve">
|
||||||
<value>Neues Dokument</value>
|
<value>Ein Dokument hinzufügen</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="btnNewFile.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="btnNewFile.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
@@ -414,6 +414,30 @@
|
|||||||
<data name="BarButtonItem2.Caption" xml:space="preserve">
|
<data name="BarButtonItem2.Caption" xml:space="preserve">
|
||||||
<value>Öffnen</value>
|
<value>Öffnen</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="BarButtonItem3.Caption" xml:space="preserve">
|
||||||
|
<value>BarButtonItem3</value>
|
||||||
|
</data>
|
||||||
|
<data name="BarButtonItem4.Caption" xml:space="preserve">
|
||||||
|
<value>Mehrere Dokumente hinzufügen</value>
|
||||||
|
</data>
|
||||||
|
<data name="BarButtonItem4.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40
|
||||||
|
LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
|
||||||
|
dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAHECAAAC77u/
|
||||||
|
PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi
|
||||||
|
IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
|
||||||
|
MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh
|
||||||
|
Y2U9InByZXNlcnZlIiBpZD0iTXVsdGlwbGVfRG9jdW1lbnRzIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91
|
||||||
|
bmQ6bmV3IDAgMCAzMiAzMiI+DQogIDxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+CgkuQmxhY2t7ZmlsbDoj
|
||||||
|
NzI3MjcyO30KPC9zdHlsZT4NCiAgPHBhdGggZD0iTTMxLDhoLTVWNWMwLTAuNS0wLjUtMS0xLTFoLTVW
|
||||||
|
MWMwLTAuNS0wLjUtMS0xLTFIMUMwLjUsMCwwLDAuNSwwLDF2MjJjMCwwLjUsMC41LDEsMSwxaDV2M2Mw
|
||||||
|
LDAuNSwwLjUsMSwxLDEgIGg1djNjMCwwLjUsMC41LDEsMSwxaDE4YzAuNSwwLDEtMC41LDEtMVY5QzMy
|
||||||
|
LDguNSwzMS41LDgsMzEsOHogTTYsNXYxN0gyVjJoMTZ2Mkg3QzYuNSw0LDYsNC41LDYsNXogTTEyLDl2
|
||||||
|
MTdIOFY2aDE2djJIMTMgIEMxMi41LDgsMTIsOC41LDEyLDl6IE0zMCwzMEgxNFYxMGgxNlYzMHoiIGNs
|
||||||
|
YXNzPSJCbGFjayIgLz4NCjwvc3ZnPgs=
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
<data name="RibbonControl1.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="RibbonControl1.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>0, 0</value>
|
<value>0, 0</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -432,6 +456,9 @@
|
|||||||
<data name="RibbonPageGroupReceiver.Text" xml:space="preserve">
|
<data name="RibbonPageGroupReceiver.Text" xml:space="preserve">
|
||||||
<value>Empfänger</value>
|
<value>Empfänger</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="RibbonPageGroup2.Text" xml:space="preserve">
|
||||||
|
<value>RibbonPageGroup2</value>
|
||||||
|
</data>
|
||||||
<data name="RibbonPage1.Text" xml:space="preserve">
|
<data name="RibbonPage1.Text" xml:space="preserve">
|
||||||
<value>Start</value>
|
<value>Start</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -1058,6 +1085,18 @@
|
|||||||
<data name=">>BarButtonItem2.Type" xml:space="preserve">
|
<data name=">>BarButtonItem2.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=">>BarButtonItem3.Name" xml:space="preserve">
|
||||||
|
<value>BarButtonItem3</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>BarButtonItem3.Type" xml:space="preserve">
|
||||||
|
<value>DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>BarButtonItem4.Name" xml:space="preserve">
|
||||||
|
<value>BarButtonItem4</value>
|
||||||
|
</data>
|
||||||
|
<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>
|
||||||
|
</data>
|
||||||
<data name=">>RibbonPage1.Name" xml:space="preserve">
|
<data name=">>RibbonPage1.Name" xml:space="preserve">
|
||||||
<value>RibbonPage1</value>
|
<value>RibbonPage1</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -1094,6 +1133,12 @@
|
|||||||
<data name=">>RibbonPageGroupReceiver.Type" xml:space="preserve">
|
<data name=">>RibbonPageGroupReceiver.Type" xml:space="preserve">
|
||||||
<value>DevExpress.XtraBars.Ribbon.RibbonPageGroup, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
<value>DevExpress.XtraBars.Ribbon.RibbonPageGroup, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name=">>RibbonPageGroup2.Name" xml:space="preserve">
|
||||||
|
<value>RibbonPageGroup2</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>RibbonPageGroup2.Type" xml:space="preserve">
|
||||||
|
<value>DevExpress.XtraBars.Ribbon.RibbonPageGroup, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||||
|
</data>
|
||||||
<data name=">>LayoutControlGroup4.Name" xml:space="preserve">
|
<data name=">>LayoutControlGroup4.Name" xml:space="preserve">
|
||||||
<value>LayoutControlGroup4</value>
|
<value>LayoutControlGroup4</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -4,9 +4,12 @@ Imports System.IO
|
|||||||
Imports DevExpress.Export.Xl
|
Imports DevExpress.Export.Xl
|
||||||
Imports DevExpress.Utils.CommonDialogs
|
Imports DevExpress.Utils.CommonDialogs
|
||||||
Imports DevExpress.Utils.Drawing
|
Imports DevExpress.Utils.Drawing
|
||||||
|
Imports DevExpress.Utils.Svg.CommonSvgImages
|
||||||
Imports DevExpress.XtraEditors
|
Imports DevExpress.XtraEditors
|
||||||
Imports DevExpress.XtraExport.Helpers
|
Imports DevExpress.XtraExport.Helpers
|
||||||
Imports DevExpress.XtraGrid
|
Imports DevExpress.XtraGrid
|
||||||
|
Imports DevExpress.XtraGrid.Columns
|
||||||
|
Imports DevExpress.XtraGrid.Views.Base
|
||||||
Imports DevExpress.XtraGrid.Views.Grid
|
Imports DevExpress.XtraGrid.Views.Grid
|
||||||
Imports DevExpress.XtraSplashScreen
|
Imports DevExpress.XtraSplashScreen
|
||||||
Imports DigitalData.Modules.Base
|
Imports DigitalData.Modules.Base
|
||||||
@@ -30,6 +33,7 @@ Partial Public Class frmEnvelopeEditor
|
|||||||
Private Const COL_CODE = "AccessCode"
|
Private Const COL_CODE = "AccessCode"
|
||||||
|
|
||||||
Public Property State As State
|
Public Property State As State
|
||||||
|
Private TempFiles As TempFiles
|
||||||
|
|
||||||
Public Sub New()
|
Public Sub New()
|
||||||
InitializeComponent()
|
InitializeComponent()
|
||||||
@@ -40,30 +44,30 @@ Partial Public Class frmEnvelopeEditor
|
|||||||
'SaveEnvelopeWithValidation()
|
'SaveEnvelopeWithValidation()
|
||||||
' If Not IsNothing(Envelope) Then
|
' If Not IsNothing(Envelope) Then
|
||||||
Try
|
Try
|
||||||
' prüfen ob es schon eine Datei gibt
|
' prüfen ob es schon eine Datei gibt
|
||||||
If Documents.Count > 0 Then
|
If Documents.Count > 0 Then
|
||||||
MsgBox(Resources.Envelope.Only_one_file_is_allowed, MsgBoxStyle.Information, Text)
|
MsgBox(Resources.Envelope.Only_one_file_is_allowed, MsgBoxStyle.Information, Text)
|
||||||
Return
|
Return
|
||||||
|
End If
|
||||||
|
|
||||||
|
If OpenFileDialog1.ShowDialog() = DialogResult.OK Then
|
||||||
|
Dim oDocument = Await Controller.CreateDocument(OpenFileDialog1.FileName)
|
||||||
|
|
||||||
|
If oDocument IsNot Nothing Then
|
||||||
|
Documents.Add(oDocument)
|
||||||
|
' Update_File_DB(OpenFileDialog1.FileName)
|
||||||
|
Else
|
||||||
|
MsgBox(Resources.Envelope.Document_Could_Not_Be_Saved, MsgBoxStyle.Critical, Text)
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If OpenFileDialog1.ShowDialog() = DialogResult.OK Then
|
Catch ex As Exception
|
||||||
Dim oDocument = Await Controller.CreateDocument(OpenFileDialog1.FileName)
|
Logger.Error(ex)
|
||||||
|
Finally
|
||||||
|
SplashScreenManager.CloseOverlayForm(oHandle)
|
||||||
|
|
||||||
If oDocument IsNot Nothing Then
|
RibbonPageGroupAddSignature_Enabled()
|
||||||
Documents.Add(oDocument)
|
End Try
|
||||||
' Update_File_DB(OpenFileDialog1.FileName)
|
|
||||||
Else
|
|
||||||
MsgBox(Resources.Envelope.Document_Could_Not_Be_Saved, MsgBoxStyle.Critical, Text)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
Catch ex As Exception
|
|
||||||
Logger.Error(ex)
|
|
||||||
Finally
|
|
||||||
SplashScreenManager.CloseOverlayForm(oHandle)
|
|
||||||
|
|
||||||
RibbonPageGroupAddSignature_Enabled()
|
|
||||||
End Try
|
|
||||||
' Else
|
' Else
|
||||||
' SplashScreenManager.CloseOverlayForm(oHandle)
|
' SplashScreenManager.CloseOverlayForm(oHandle)
|
||||||
' End If
|
' End If
|
||||||
@@ -72,6 +76,8 @@ Partial Public Class frmEnvelopeEditor
|
|||||||
Private Sub frmEditor_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Private Sub frmEditor_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
Logger = State.LogConfig.GetLogger()
|
Logger = State.LogConfig.GetLogger()
|
||||||
Logger.Debug("Loading Configuration..")
|
Logger.Debug("Loading Configuration..")
|
||||||
|
TempFiles = New TempFiles(State.LogConfig)
|
||||||
|
TempFiles.Create()
|
||||||
If Envelope Is Nothing Then
|
If Envelope Is Nothing Then
|
||||||
Controller = New EnvelopeEditorController(State)
|
Controller = New EnvelopeEditorController(State)
|
||||||
|
|
||||||
@@ -93,6 +99,24 @@ Partial Public Class frmEnvelopeEditor
|
|||||||
Receivers = New BindingList(Of EnvelopeReceiver)(Controller.Envelope.Receivers)
|
Receivers = New BindingList(Of EnvelopeReceiver)(Controller.Envelope.Receivers)
|
||||||
|
|
||||||
For Each docItem As EnvelopeDocument In Documents
|
For Each docItem As EnvelopeDocument In Documents
|
||||||
|
If Not File.Exists(docItem.Filepath) Then
|
||||||
|
Dim oTempFolder = TempFiles.TempPath
|
||||||
|
Dim oTempFilename = String.Concat(oTempFolder, "\", $"ViewEnvDoc_{Envelope.Id}.pdf")
|
||||||
|
If File.Exists(oTempFilename) Then
|
||||||
|
Try
|
||||||
|
File.OpenWrite(oTempFilename)
|
||||||
|
Catch ex As Exception
|
||||||
|
MsgBox("File might already be open?", MsgBoxStyle.Exclamation)
|
||||||
|
Me.Cursor = Cursors.Default
|
||||||
|
Exit Sub
|
||||||
|
End Try
|
||||||
|
|
||||||
|
|
||||||
|
File.Delete(oTempFilename)
|
||||||
|
End If
|
||||||
|
WriteBytetoPath(oTempFilename, docItem.Byte_Data)
|
||||||
|
docItem.Filepath = oTempFilename
|
||||||
|
End If
|
||||||
If docItem.Thumbnail Is Nothing Then
|
If docItem.Thumbnail Is Nothing Then
|
||||||
docItem.Thumbnail = Controller.CreateThumbnail(docItem.Filepath)
|
docItem.Thumbnail = Controller.CreateThumbnail(docItem.Filepath)
|
||||||
docItem.PageCount = Controller.GetPageCount(docItem.Filepath)
|
docItem.PageCount = Controller.GetPageCount(docItem.Filepath)
|
||||||
@@ -141,6 +165,8 @@ Partial Public Class frmEnvelopeEditor
|
|||||||
Dim oDocument As EnvelopeDocument = DirectCast(ViewDocuments.GetFocusedRow(), EnvelopeDocument)
|
Dim oDocument As EnvelopeDocument = DirectCast(ViewDocuments.GetFocusedRow(), EnvelopeDocument)
|
||||||
If Controller.DeleteDocument(oDocument) Then
|
If Controller.DeleteDocument(oDocument) Then
|
||||||
Documents.Remove(oDocument)
|
Documents.Remove(oDocument)
|
||||||
|
GridDocuments.DataSource = Nothing
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -163,6 +189,19 @@ Partial Public Class frmEnvelopeEditor
|
|||||||
|
|
||||||
If ViewDocuments.GetSelectedRows().Count > 0 Then
|
If ViewDocuments.GetSelectedRows().Count > 0 Then
|
||||||
Dim oDocument As EnvelopeDocument = DirectCast(ViewDocuments.GetFocusedRow(), EnvelopeDocument)
|
Dim oDocument As EnvelopeDocument = DirectCast(ViewDocuments.GetFocusedRow(), EnvelopeDocument)
|
||||||
|
Dim oEnvelope = Controller.Envelope
|
||||||
|
If Not IsNothing(oDocument.Byte_Data) Then
|
||||||
|
Dim oTempFolder = TempFiles.TempPath
|
||||||
|
Dim oTempFilename = String.Concat(oTempFolder, "\", $"ViewEnvDoc_{oEnvelope.Id}.pdf")
|
||||||
|
If Not File.Exists(oTempFilename) Then
|
||||||
|
WriteBytetoPath(oTempFilename, oDocument.Byte_Data)
|
||||||
|
oDocument.Filepath = oTempFilename
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim oGDPictureKey As String = MS_GDPICTUREKEY
|
Dim oGDPictureKey As String = MS_GDPICTUREKEY
|
||||||
|
|
||||||
Dim oForm As New frmFieldEditor(State) With {
|
Dim oForm As New frmFieldEditor(State) With {
|
||||||
@@ -180,7 +219,23 @@ Partial Public Class frmEnvelopeEditor
|
|||||||
SplashScreenManager.CloseOverlayForm(oHandle)
|
SplashScreenManager.CloseOverlayForm(oHandle)
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
Private Sub WriteBytetoPath(ByVal sFileName As String, pByte As Byte())
|
||||||
|
|
||||||
|
'For Document
|
||||||
|
Try
|
||||||
|
If Not pByte Is Nothing Then
|
||||||
|
'Read image data into a file stream
|
||||||
|
Using fs As New FileStream(sFileName, FileMode.OpenOrCreate, FileAccess.Write)
|
||||||
|
fs.Write(pByte, 0, pByte.Length)
|
||||||
|
'Set image variable value using memory stream.
|
||||||
|
fs.Flush()
|
||||||
|
fs.Close()
|
||||||
|
End Using
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Error in downloadFile")
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
Private Function SaveEnvelopeWithValidation() As Boolean
|
Private Function SaveEnvelopeWithValidation() As Boolean
|
||||||
Return SaveEnvelope(True)
|
Return SaveEnvelope(True)
|
||||||
End Function
|
End Function
|
||||||
@@ -479,7 +534,12 @@ Partial Public Class frmEnvelopeEditor
|
|||||||
RibbonPageGroupAddSignature_Enabled()
|
RibbonPageGroupAddSignature_Enabled()
|
||||||
End Sub
|
End Sub
|
||||||
Dim CellValueChanged As Boolean = False
|
Dim CellValueChanged As Boolean = False
|
||||||
|
Private Sub ViewReceivers_ColumnPositionChanged(sender As Object, e As EventArgs) Handles ViewReceivers.ColumnPositionChanged
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
Private Sub ViewReceivers_CellValueChanged(sender As Object, e As Views.Base.CellValueChangedEventArgs) Handles ViewReceivers.CellValueChanged
|
Private Sub ViewReceivers_CellValueChanged(sender As Object, e As Views.Base.CellValueChangedEventArgs) Handles ViewReceivers.CellValueChanged
|
||||||
|
|
||||||
If e.Column.FieldName = COL_EMAIL And CellValueChanged = False Then
|
If e.Column.FieldName = COL_EMAIL And CellValueChanged = False Then
|
||||||
If e.Value Is Nothing Then
|
If e.Value Is Nothing Then
|
||||||
' Keine E-Mail-Adresse, also weg damit
|
' Keine E-Mail-Adresse, also weg damit
|
||||||
@@ -491,21 +551,57 @@ Partial Public Class frmEnvelopeEditor
|
|||||||
Dim oNameCellValue = ViewReceivers.GetRowCellValue(e.RowHandle, COL_NAME)
|
Dim oNameCellValue = ViewReceivers.GetRowCellValue(e.RowHandle, COL_NAME)
|
||||||
If oNameCellValue Is Nothing Then
|
If oNameCellValue Is Nothing Then
|
||||||
Dim oEmailAdress As String = DirectCast(e.Value.ToString.ToLower, String)
|
Dim oEmailAdress As String = DirectCast(e.Value.ToString.ToLower, String)
|
||||||
|
oEmailAdress = Trim(oEmailAdress)
|
||||||
|
If IsValidEmailAddress(oEmailAdress) = True Then
|
||||||
|
Dim oLastName As String = Controller.GetLastNameByEmailAdress(oEmailAdress)
|
||||||
|
Dim oAccessCode As String = Helpers.GetAccessCode()
|
||||||
|
ViewReceivers.SetRowCellValue(e.RowHandle, ViewReceivers.Columns.Item(COL_EMAIL), oEmailAdress)
|
||||||
|
ViewReceivers.SetRowCellValue(e.RowHandle, ViewReceivers.Columns.Item(COL_NAME), oLastName)
|
||||||
|
ViewReceivers.SetRowCellValue(e.RowHandle, ViewReceivers.Columns.Item(COL_CODE), oAccessCode)
|
||||||
|
CellValueChanged = False
|
||||||
|
Else
|
||||||
|
Dim oMsg = Resources.Envelope.Error_email_Validation
|
||||||
|
oMsg = oMsg.Replace("@Mail", oEmailAdress)
|
||||||
|
MsgBox(oMsg, MsgBoxStyle.Exclamation, Text)
|
||||||
|
ViewReceivers.DeleteRow(ViewReceivers.FocusedRowHandle)
|
||||||
|
End If
|
||||||
|
|
||||||
Dim oLastName As String = Controller.GetLastNameByEmailAdress(oEmailAdress)
|
|
||||||
Dim oAccessCode As String = Helpers.GetAccessCode()
|
|
||||||
ViewReceivers.SetRowCellValue(e.RowHandle, ViewReceivers.Columns.Item(COL_EMAIL), oEmailAdress)
|
|
||||||
ViewReceivers.SetRowCellValue(e.RowHandle, ViewReceivers.Columns.Item(COL_NAME), oLastName)
|
|
||||||
ViewReceivers.SetRowCellValue(e.RowHandle, ViewReceivers.Columns.Item(COL_CODE), oAccessCode)
|
|
||||||
CellValueChanged = False
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
Private Sub email_validation()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function IsValidEmailAddress(pEmailAddress As String) As Boolean
|
||||||
|
Try
|
||||||
|
If pEmailAddress.Contains("@") Then
|
||||||
|
Dim oAddress = New System.Net.Mail.MailAddress(pEmailAddress)
|
||||||
|
Return oAddress.Address = pEmailAddress
|
||||||
|
Else
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
Logger.Error(ex)
|
||||||
|
Return False
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
Private Sub RibbonControl1_Click(sender As Object, e As EventArgs) Handles RibbonControl1.Click
|
Private Sub RibbonControl1_Click(sender As Object, e As EventArgs) Handles RibbonControl1.Click
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub BarButtonItem3_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem3.ItemClick
|
||||||
|
frmChooseDocVariant.ShowDialog()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub BarButtonItem4_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem4.ItemClick
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ViewReceivers_CellValueChanging(sender As Object, e As CellValueChangedEventArgs) Handles ViewReceivers.CellValueChanging
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -220,6 +220,9 @@
|
|||||||
<data name=">>btCancel.ZOrder" xml:space="preserve">
|
<data name=">>btCancel.ZOrder" xml:space="preserve">
|
||||||
<value>7</value>
|
<value>7</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="cmbCertificationType.Enabled" type="System.Boolean, mscorlib">
|
||||||
|
<value>False</value>
|
||||||
|
</data>
|
||||||
<data name="cmbCertificationType.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="cmbCertificationType.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>207, 162</value>
|
<value>207, 162</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -566,6 +566,7 @@ Public Class frmMain
|
|||||||
If oReceiver.Email = selReceiver.Email Then
|
If oReceiver.Email = selReceiver.Email Then
|
||||||
If oController.ActionService.ResendReceiver(oEnvelope, oReceiver) = True Then
|
If oController.ActionService.ResendReceiver(oEnvelope, oReceiver) = True Then
|
||||||
MsgBox(Resources.Envelope.Invitation_successfully_resend, MsgBoxStyle.Information, Text)
|
MsgBox(Resources.Envelope.Invitation_successfully_resend, MsgBoxStyle.Information, Text)
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ Public Class frmSplashScreen
|
|||||||
Private Sub Worker_DoWork(sender As Object, e As DoWorkEventArgs) Handles Worker.DoWork
|
Private Sub Worker_DoWork(sender As Object, e As DoWorkEventArgs) Handles Worker.DoWork
|
||||||
Dim oState As State = DirectCast(e.Argument, State)
|
Dim oState As State = DirectCast(e.Argument, State)
|
||||||
|
|
||||||
Worker.ReportProgress(20, "Initialize Database")
|
Worker.ReportProgress(20, "Initializing Database")
|
||||||
Thread.Sleep(300)
|
Thread.Sleep(300)
|
||||||
|
|
||||||
Dim oConnectionString = MSSQLServer.DecryptConnectionString(oState.Config.ConnectionString)
|
Dim oConnectionString = MSSQLServer.DecryptConnectionString(oState.Config.ConnectionString)
|
||||||
@@ -74,13 +74,13 @@ Public Class frmSplashScreen
|
|||||||
DB_DD_ECM = oState.Database
|
DB_DD_ECM = oState.Database
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Worker.ReportProgress(40, "Initialize Confguration")
|
Worker.ReportProgress(40, "Initializing Configuration")
|
||||||
Thread.Sleep(300)
|
Thread.Sleep(300)
|
||||||
|
|
||||||
Dim ConfigModel = New ConfigModel(oState)
|
Dim ConfigModel = New ConfigModel(oState)
|
||||||
oState.DbConfig = ConfigModel.LoadConfiguration()
|
oState.DbConfig = ConfigModel.LoadConfiguration()
|
||||||
DOCUMENT_PATH_MOVE_AFTSEND = oState.DbConfig.DOCUMENT_PATH_MOVE_AFTSEND
|
' DOCUMENT_PATH_MOVE_AFTSEND = oState.DbConfig.DOCUMENT_PATH_MOVE_AFTSEND
|
||||||
Worker.ReportProgress(60, "Initialize User")
|
Worker.ReportProgress(60, "Initializing User")
|
||||||
Dim oKey = oState.Database.GetScalarValue("SELECT LICENSE FROM TBDD_3RD_PARTY_MODULES WHERE NAME = 'GDPICTURE' and ACTIVE = 1")
|
Dim oKey = oState.Database.GetScalarValue("SELECT LICENSE FROM TBDD_3RD_PARTY_MODULES WHERE NAME = 'GDPICTURE' and ACTIVE = 1")
|
||||||
Thread.Sleep(300)
|
Thread.Sleep(300)
|
||||||
If oKey.ToString <> String.Empty Then
|
If oKey.ToString <> String.Empty Then
|
||||||
@@ -91,7 +91,7 @@ Public Class frmSplashScreen
|
|||||||
|
|
||||||
Dim oUser = oUserModel.SelectUser()
|
Dim oUser = oUserModel.SelectUser()
|
||||||
|
|
||||||
Worker.ReportProgress(80, "Initialize Rights")
|
Worker.ReportProgress(80, "Initializing Rights")
|
||||||
Thread.Sleep(300)
|
Thread.Sleep(300)
|
||||||
|
|
||||||
' This checks for module access and admin rights
|
' This checks for module access and admin rights
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="DigitalData.Core.Abstractions" Version="2.0.0" />
|
<PackageReference Include="DigitalData.Core.Abstractions" Version="2.2.1" />
|
||||||
<PackageReference Include="DigitalData.Core.API" Version="2.0.0" />
|
<PackageReference Include="DigitalData.Core.API" Version="2.0.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.15" />
|
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.15" />
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="DigitalData.Core.Abstractions" Version="2.0.0" />
|
<PackageReference Include="DigitalData.Core.Abstractions" Version="2.2.1" />
|
||||||
<PackageReference Include="DigitalData.Core.Infrastructure" Version="2.0.0" />
|
<PackageReference Include="DigitalData.Core.Infrastructure" Version="2.0.0" />
|
||||||
<PackageReference Include="DigitalData.EmailProfilerDispatcher" Version="2.0.0" />
|
<PackageReference Include="DigitalData.EmailProfilerDispatcher" Version="2.0.0" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.16" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.16" />
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using EnvelopeGenerator.Common;
|
using EnvelopeGenerator.Web.Services;
|
||||||
using EnvelopeGenerator.Web.Services;
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Web.Controllers
|
namespace EnvelopeGenerator.Web.Controllers
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ using EnvelopeGenerator.Extensions;
|
|||||||
namespace EnvelopeGenerator.Web.Controllers
|
namespace EnvelopeGenerator.Web.Controllers
|
||||||
{
|
{
|
||||||
[Authorize]
|
[Authorize]
|
||||||
|
[Route("api/[controller]")]
|
||||||
public class DocumentController : BaseController
|
public class DocumentController : BaseController
|
||||||
{
|
{
|
||||||
private readonly EnvelopeOldService envelopeService;
|
private readonly EnvelopeOldService envelopeService;
|
||||||
@@ -48,7 +49,7 @@ namespace EnvelopeGenerator.Web.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Authorize]
|
[Authorize]
|
||||||
[HttpPost("api/document/{envelopeKey}")]
|
[HttpPost("{envelopeKey}")]
|
||||||
public async Task<IActionResult> Open(string envelopeKey)
|
public async Task<IActionResult> Open(string envelopeKey)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using DigitalData.Core.DTO;
|
using DigitalData.Core.DTO;
|
||||||
using EnvelopeGenerator.Application;
|
|
||||||
using EnvelopeGenerator.Application.Contracts;
|
using EnvelopeGenerator.Application.Contracts;
|
||||||
using EnvelopeGenerator.Common;
|
using EnvelopeGenerator.Common;
|
||||||
using EnvelopeGenerator.Web.Services;
|
using EnvelopeGenerator.Web.Services;
|
||||||
@@ -23,7 +22,6 @@ namespace EnvelopeGenerator.Web.Controllers
|
|||||||
private readonly IReceiverService _receiverService;
|
private readonly IReceiverService _receiverService;
|
||||||
private readonly IEnvelopeReceiverService _envRcvService;
|
private readonly IEnvelopeReceiverService _envRcvService;
|
||||||
|
|
||||||
|
|
||||||
public EnvelopeController(DatabaseService database,
|
public EnvelopeController(DatabaseService database,
|
||||||
EnvelopeOldService envelope,
|
EnvelopeOldService envelope,
|
||||||
ILogger<EnvelopeController> logger, UrlEncoder urlEncoder,
|
ILogger<EnvelopeController> logger, UrlEncoder urlEncoder,
|
||||||
|
|||||||
@@ -47,6 +47,23 @@ namespace EnvelopeGenerator.Web.Controllers
|
|||||||
_logger = logger;
|
_logger = logger;
|
||||||
_readOnlyService = readOnlyService;
|
_readOnlyService = readOnlyService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpGet("/")]
|
||||||
|
public IActionResult Main([FromQuery] string? culture = null)
|
||||||
|
{
|
||||||
|
//TODO: add a middelware or use an asp.net functionality insead of this code-smell
|
||||||
|
culture = culture is not null ? _sanitizer.Sanitize(culture) : null;
|
||||||
|
|
||||||
|
if (UserLanguage is null && culture is null)
|
||||||
|
{
|
||||||
|
UserLanguage = _cultures.Default.Language;
|
||||||
|
return Redirect($"{Request.Headers["Referer"]}?culture={_cultures.Default.Language}");
|
||||||
|
}
|
||||||
|
|
||||||
|
ViewData["UserCulture"] = _cultures[UserLanguage];
|
||||||
|
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
|
||||||
[HttpGet("EnvelopeKey/{envelopeReceiverId}")]
|
[HttpGet("EnvelopeKey/{envelopeReceiverId}")]
|
||||||
public async Task<IActionResult> MainAsync([FromRoute] string envelopeReceiverId, [FromQuery] string? culture = null)
|
public async Task<IActionResult> MainAsync([FromRoute] string envelopeReceiverId, [FromQuery] string? culture = null)
|
||||||
@@ -116,9 +133,9 @@ namespace EnvelopeGenerator.Web.Controllers
|
|||||||
{
|
{
|
||||||
ViewData["UserCulture"] = _cultures[UserLanguage];
|
ViewData["UserCulture"] = _cultures[UserLanguage];
|
||||||
|
|
||||||
return await _envRcvService.IsExisting(envelopeReceiverId: envelopeReceiverId).ThenAsync(
|
return await _envRcvService.ReadByEnvelopeReceiverIdAsync(envelopeReceiverId: envelopeReceiverId).ThenAsync(
|
||||||
Success: isExisting => isExisting ? View().WithData("EnvelopeKey", envelopeReceiverId) : this.ViewEnvelopeNotFound(),
|
Success: er => View().WithData("EnvelopeKey", envelopeReceiverId),
|
||||||
Fail: IActionResult (messages,notices) =>
|
Fail: IActionResult (messages, notices) =>
|
||||||
{
|
{
|
||||||
_logger.LogNotice(notices);
|
_logger.LogNotice(notices);
|
||||||
Response.StatusCode = StatusCodes.Status401Unauthorized;
|
Response.StatusCode = StatusCodes.Status401Unauthorized;
|
||||||
@@ -133,7 +150,7 @@ namespace EnvelopeGenerator.Web.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost("EnvelopeKey/{envelopeReceiverId}/Locked")]
|
[HttpPost("EnvelopeKey/{envelopeReceiverId}/Locked")]
|
||||||
public async Task<IActionResult> LogInEnvelope([FromRoute] string envelopeReceiverId, [FromForm] string access_code)
|
public async Task<IActionResult> LogInEnvelope([FromRoute] string envelopeReceiverId, [FromForm] Auth auth)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -152,7 +169,7 @@ namespace EnvelopeGenerator.Web.Controllers
|
|||||||
|
|
||||||
//check access code
|
//check access code
|
||||||
EnvelopeResponse response = await envelopeOldService.LoadEnvelope(envelopeReceiverId);
|
EnvelopeResponse response = await envelopeOldService.LoadEnvelope(envelopeReceiverId);
|
||||||
var verification = await _envRcvService.VerifyAccessCodeAsync(uuid: uuid, signature: signature, accessCode: access_code);
|
var verification = await _envRcvService.VerifyAccessCodeAsync(uuid: uuid, signature: signature, accessCode: auth.AccessCode!);
|
||||||
if (verification.IsFailed)
|
if (verification.IsFailed)
|
||||||
{
|
{
|
||||||
_logger.LogNotice(verification.Notices);
|
_logger.LogNotice(verification.Notices);
|
||||||
@@ -176,6 +193,12 @@ namespace EnvelopeGenerator.Web.Controllers
|
|||||||
|
|
||||||
await _historyService.RecordAsync(er.EnvelopeId, er.Receiver!.EmailAddress, Constants.EnvelopeStatus.AccessCodeCorrect);
|
await _historyService.RecordAsync(er.EnvelopeId, er.Receiver!.EmailAddress, Constants.EnvelopeStatus.AccessCodeCorrect);
|
||||||
|
|
||||||
|
//check if the user has phone is added
|
||||||
|
if (er.HasPhoneNumber)
|
||||||
|
{
|
||||||
|
return View("EnvelopeLocked").WithData("ViaSms", true);
|
||||||
|
}
|
||||||
|
|
||||||
ViewData["EnvelopeKey"] = envelopeReceiverId;
|
ViewData["EnvelopeKey"] = envelopeReceiverId;
|
||||||
//check rejection
|
//check rejection
|
||||||
var rejRcvrs = await _historyService.ReadRejectingReceivers(er.Envelope!.Id);
|
var rejRcvrs = await _historyService.ReadRejectingReceivers(er.Envelope!.Id);
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
using EnvelopeGenerator.Application.Resources;
|
using EnvelopeGenerator.Application.Resources;
|
||||||
using Ganss.Xss;
|
using Ganss.Xss;
|
||||||
using Microsoft.AspNetCore.Http;
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.Extensions.Localization;
|
using Microsoft.Extensions.Localization;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
using DigitalData.Core.DTO;
|
using DigitalData.Core.DTO;
|
||||||
using EnvelopeGenerator.Application.Contracts;
|
using EnvelopeGenerator.Application.Contracts;
|
||||||
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiverReadOnly;
|
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiverReadOnly;
|
||||||
using EnvelopeGenerator.Extensions;
|
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
using EnvelopeGenerator.Application.Contracts;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Web.Controllers.Test
|
||||||
|
{
|
||||||
|
[Route("api/[controller]")]
|
||||||
|
[ApiController]
|
||||||
|
public class TestMessagingController : ControllerBase
|
||||||
|
{
|
||||||
|
private readonly IMessagingService _service;
|
||||||
|
|
||||||
|
public TestMessagingController(IMessagingService service)
|
||||||
|
{
|
||||||
|
_service = service;
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<IActionResult> SendAsync(string recipient, string message, bool staticResponse = true)
|
||||||
|
{
|
||||||
|
var res = await _service.SendSmsAsync(recipient: recipient, message: message);
|
||||||
|
return res is null? StatusCode(StatusCodes.Status500InternalServerError) : Ok(res);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
using EnvelopeGenerator.Application.Contracts;
|
using EnvelopeGenerator.Common;
|
||||||
using EnvelopeGenerator.Common;
|
|
||||||
using EnvelopeGenerator.Web.Services;
|
using EnvelopeGenerator.Web.Services;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Web.Controllers.Test
|
namespace EnvelopeGenerator.Web.Controllers.Test
|
||||||
{
|
{
|
||||||
|
[Route("api/test/[controller]")]
|
||||||
public class TestViewController : BaseController
|
public class TestViewController : BaseController
|
||||||
{
|
{
|
||||||
private readonly EnvelopeOldService envelopeOldService;
|
private readonly EnvelopeOldService envelopeOldService;
|
||||||
@@ -16,13 +16,13 @@ namespace EnvelopeGenerator.Web.Controllers.Test
|
|||||||
_config = configuration;
|
_config = configuration;
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet("/")]
|
[HttpGet]
|
||||||
public IActionResult Index()
|
public IActionResult Index()
|
||||||
{
|
{
|
||||||
return View("Index");
|
return View("Index");
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost("/")]
|
[HttpPost]
|
||||||
public IActionResult DebugEnvelopes([FromForm] string? password)
|
public IActionResult DebugEnvelopes([FromForm] string? password)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<PackageId>EnvelopeGenerator.Web</PackageId>
|
<PackageId>EnvelopeGenerator.Web</PackageId>
|
||||||
<Version>2.4.0.0</Version>
|
<Version>2.6.0</Version>
|
||||||
<Authors>Digital Data GmbH</Authors>
|
<Authors>Digital Data GmbH</Authors>
|
||||||
<Company>Digital Data GmbH</Company>
|
<Company>Digital Data GmbH</Company>
|
||||||
<Product>EnvelopeGenerator.Web</Product>
|
<Product>EnvelopeGenerator.Web</Product>
|
||||||
@@ -13,28 +13,16 @@
|
|||||||
<PackageTags>digital data envelope generator web</PackageTags>
|
<PackageTags>digital data envelope generator web</PackageTags>
|
||||||
<Description>EnvelopeGenerator.Web is an ASP.NET MVC application developed to manage signing processes. It uses Entity Framework Core (EF Core) for database operations. The user interface for signing processes is developed with Razor View Engine (.cshtml files) and JavaScript under wwwroot, integrated with PSPDFKit. This integration allows users to view and sign documents seamlessly.</Description>
|
<Description>EnvelopeGenerator.Web is an ASP.NET MVC application developed to manage signing processes. It uses Entity Framework Core (EF Core) for database operations. The user interface for signing processes is developed with Razor View Engine (.cshtml files) and JavaScript under wwwroot, integrated with PSPDFKit. This integration allows users to view and sign documents seamlessly.</Description>
|
||||||
<ApplicationIcon>Assets\icon.ico</ApplicationIcon>
|
<ApplicationIcon>Assets\icon.ico</ApplicationIcon>
|
||||||
<AssemblyVersion>2.4.0.0</AssemblyVersion>
|
<AssemblyVersion>2.6.0</AssemblyVersion>
|
||||||
<FileVersion>2.4.0.0</FileVersion>
|
<FileVersion>2.6.0</FileVersion>
|
||||||
<Copyright>Copyright © 2024 Digital Data GmbH. All rights reserved.</Copyright>
|
<Copyright>Copyright © 2024 Digital Data GmbH. All rights reserved.</Copyright>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Remove="wwwroot\lib\leaflet\build\**" />
|
<Compile Remove="wwwroot\lib\typed.js\**" />
|
||||||
<Compile Remove="wwwroot\lib\leaflet\debug\**" />
|
<Content Remove="wwwroot\lib\typed.js\**" />
|
||||||
<Compile Remove="wwwroot\lib\leaflet\spec\**" />
|
<EmbeddedResource Remove="wwwroot\lib\typed.js\**" />
|
||||||
<Compile Remove="wwwroot\lib\leaflet\src\**" />
|
<None Remove="wwwroot\lib\typed.js\**" />
|
||||||
<Content Remove="wwwroot\lib\leaflet\build\**" />
|
|
||||||
<Content Remove="wwwroot\lib\leaflet\debug\**" />
|
|
||||||
<Content Remove="wwwroot\lib\leaflet\spec\**" />
|
|
||||||
<Content Remove="wwwroot\lib\leaflet\src\**" />
|
|
||||||
<EmbeddedResource Remove="wwwroot\lib\leaflet\build\**" />
|
|
||||||
<EmbeddedResource Remove="wwwroot\lib\leaflet\debug\**" />
|
|
||||||
<EmbeddedResource Remove="wwwroot\lib\leaflet\spec\**" />
|
|
||||||
<EmbeddedResource Remove="wwwroot\lib\leaflet\src\**" />
|
|
||||||
<None Remove="wwwroot\lib\leaflet\build\**" />
|
|
||||||
<None Remove="wwwroot\lib\leaflet\debug\**" />
|
|
||||||
<None Remove="wwwroot\lib\leaflet\spec\**" />
|
|
||||||
<None Remove="wwwroot\lib\leaflet\src\**" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -53,23 +41,12 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="bundleconfig.json" />
|
<None Include="bundleconfig.json" />
|
||||||
<None Include="wwwroot\lib\leaflet-locationpicker\dist\leaflet-locationpicker.min.js" />
|
|
||||||
<None Include="wwwroot\lib\leaflet-locationpicker\dist\leaflet-locationpicker.src.js" />
|
|
||||||
<None Include="wwwroot\lib\leaflet-locationpicker\Gruntfile.js" />
|
|
||||||
<None Include="wwwroot\lib\leaflet-locationpicker\index.tmpl" />
|
|
||||||
<None Include="wwwroot\lib\leaflet-locationpicker\LICENSE" />
|
|
||||||
<None Include="wwwroot\lib\leaflet-locationpicker\README.md" />
|
|
||||||
<None Include="wwwroot\lib\leaflet\dist\leaflet-src.js" />
|
|
||||||
<None Include="wwwroot\lib\leaflet\dist\leaflet.js" />
|
|
||||||
<None Include="wwwroot\lib\leaflet\LICENSE" />
|
|
||||||
<None Include="wwwroot\lib\leaflet\PLUGIN-GUIDE.md" />
|
|
||||||
<None Include="wwwroot\lib\leaflet\README.md" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="AutoMapper" Version="13.0.1" />
|
<PackageReference Include="AutoMapper" Version="13.0.1" />
|
||||||
<PackageReference Include="BuildBundlerMinifier2022" Version="2.9.9" />
|
<PackageReference Include="BuildBundlerMinifier2022" Version="2.9.9" />
|
||||||
<PackageReference Include="DigitalData.Core.Abstractions" Version="2.0.0" />
|
<PackageReference Include="DigitalData.Core.Abstractions" Version="2.2.1" />
|
||||||
<PackageReference Include="DigitalData.Core.API" Version="2.0.0" />
|
<PackageReference Include="DigitalData.Core.API" Version="2.0.0" />
|
||||||
<PackageReference Include="DigitalData.EmailProfilerDispatcher" Version="2.0.0" />
|
<PackageReference Include="DigitalData.EmailProfilerDispatcher" Version="2.0.0" />
|
||||||
<PackageReference Include="HtmlSanitizer" Version="8.0.865" />
|
<PackageReference Include="HtmlSanitizer" Version="8.0.865" />
|
||||||
|
|||||||
13
EnvelopeGenerator.Web/Models/Auth.cs
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
namespace EnvelopeGenerator.Web.Models
|
||||||
|
{
|
||||||
|
public record Auth(string? AccessCode = null, string? SmsCode = null)
|
||||||
|
{
|
||||||
|
public bool HasAccessCode => AccessCode is not null;
|
||||||
|
|
||||||
|
public bool HasSmsCode => SmsCode is not null;
|
||||||
|
|
||||||
|
public bool HasMulti => HasAccessCode && HasSmsCode;
|
||||||
|
|
||||||
|
public bool HasNone => !(HasAccessCode || HasSmsCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -98,13 +98,6 @@ namespace EnvelopeGenerator.Web.Services
|
|||||||
//if documenet_path_dmz is existing in config, replace the path with it
|
//if documenet_path_dmz is existing in config, replace the path with it
|
||||||
var config = await _configService.ReadDefaultAsync();
|
var config = await _configService.ReadDefaultAsync();
|
||||||
|
|
||||||
if (config.DocumentPathDmz is not null && config.DocumentPathDmz != string.Empty)
|
|
||||||
foreach (var doc in envelope.Documents)
|
|
||||||
{
|
|
||||||
doc.Filepath = doc.Filepath.Replace(config.DocumentPath, config.DocumentPathDmz);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return new()
|
return new()
|
||||||
{
|
{
|
||||||
Receiver = receiver,
|
Receiver = receiver,
|
||||||
|
|||||||
@@ -20,5 +20,4 @@
|
|||||||
<section class="text-center">
|
<section class="text-center">
|
||||||
<p>Der Zeitraum für die gemeinsame Nutzung von Dokumenten ist abgelaufen.</p>
|
<p>Der Zeitraum für die gemeinsame Nutzung von Dokumenten ist abgelaufen.</p>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
<footer class="container" id="page-footer">© SignFlow 2023-2024 <a href="https://digitaldata.works">Digital Data GmbH</a></footer>
|
|
||||||
@@ -1,8 +1,11 @@
|
|||||||
@{
|
@using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
|
||||||
|
@{
|
||||||
var nonce = _accessor.HttpContext?.Items["csp-nonce"] as string;
|
var nonce = _accessor.HttpContext?.Items["csp-nonce"] as string;
|
||||||
var logo = _logoOpt.Value;
|
var logo = _logoOpt.Value;
|
||||||
ViewData["Title"] = _localizer[WebKey.DocProtected];
|
ViewData["Title"] = _localizer[WebKey.DocProtected];
|
||||||
var userCulture = ViewData["UserCulture"] as Culture;
|
var userCulture = ViewData["UserCulture"] as Culture;
|
||||||
|
bool viaSms = ViewData["ViaSms"] is bool _viaSms && _viaSms;
|
||||||
|
var accessCodeName = viaSms ? "smsCode" : "accessCode";
|
||||||
}
|
}
|
||||||
<div class="page container py-4 px-4">
|
<div class="page container py-4 px-4">
|
||||||
<header class="text-center">
|
<header class="text-center">
|
||||||
@@ -10,23 +13,23 @@
|
|||||||
<h3 class="text">@_localizer[WebKey.WelcomeToTheESignPortal]</h3>
|
<h3 class="text">@_localizer[WebKey.WelcomeToTheESignPortal]</h3>
|
||||||
<img class="@logo.LockedPageClass" src="@logo.Src" />
|
<img class="@logo.LockedPageClass" src="@logo.Src" />
|
||||||
</div>
|
</div>
|
||||||
<div class="icon locked mt-4 mb-1">
|
<div class="icon locked @(viaSms ? "sms-tfa" : "") mt-4 mb-1">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="72" height="72" fill="currentColor" class="bi bi-shield-lock" viewBox="0 0 16 16">
|
<svg xmlns="http://www.w3.org/2000/svg" width="72" height="72" fill="currentColor" class="bi bi-shield-lock" viewBox="0 0 16 16">
|
||||||
<path d="M5.338 1.59a61 61 0 0 0-2.837.856.48.48 0 0 0-.328.39c-.554 4.157.726 7.19 2.253 9.188a10.7 10.7 0 0 0 2.287 2.233c.346.244.652.42.893.533q.18.085.293.118a1 1 0 0 0 .101.025 1 1 0 0 0 .1-.025q.114-.034.294-.118c.24-.113.547-.29.893-.533a10.7 10.7 0 0 0 2.287-2.233c1.527-1.997 2.807-5.031 2.253-9.188a.48.48 0 0 0-.328-.39c-.651-.213-1.75-.56-2.837-.855C9.552 1.29 8.531 1.067 8 1.067c-.53 0-1.552.223-2.662.524zM5.072.56C6.157.265 7.31 0 8 0s1.843.265 2.928.56c1.11.3 2.229.655 2.887.87a1.54 1.54 0 0 1 1.044 1.262c.596 4.477-.787 7.795-2.465 9.99a11.8 11.8 0 0 1-2.517 2.453 7 7 0 0 1-1.048.625c-.28.132-.581.24-.829.24s-.548-.108-.829-.24a7 7 0 0 1-1.048-.625 11.8 11.8 0 0 1-2.517-2.453C1.928 10.487.545 7.169 1.141 2.692A1.54 1.54 0 0 1 2.185 1.43 63 63 0 0 1 5.072.56" />
|
<path d="M5.338 1.59a61 61 0 0 0-2.837.856.48.48 0 0 0-.328.39c-.554 4.157.726 7.19 2.253 9.188a10.7 10.7 0 0 0 2.287 2.233c.346.244.652.42.893.533q.18.085.293.118a1 1 0 0 0 .101.025 1 1 0 0 0 .1-.025q.114-.034.294-.118c.24-.113.547-.29.893-.533a10.7 10.7 0 0 0 2.287-2.233c1.527-1.997 2.807-5.031 2.253-9.188a.48.48 0 0 0-.328-.39c-.651-.213-1.75-.56-2.837-.855C9.552 1.29 8.531 1.067 8 1.067c-.53 0-1.552.223-2.662.524zM5.072.56C6.157.265 7.31 0 8 0s1.843.265 2.928.56c1.11.3 2.229.655 2.887.87a1.54 1.54 0 0 1 1.044 1.262c.596 4.477-.787 7.795-2.465 9.99a11.8 11.8 0 0 1-2.517 2.453 7 7 0 0 1-1.048.625c-.28.132-.581.24-.829.24s-.548-.108-.829-.24a7 7 0 0 1-1.048-.625 11.8 11.8 0 0 1-2.517-2.453C1.928 10.487.545 7.169 1.141 2.692A1.54 1.54 0 0 1 2.185 1.43 63 63 0 0 1 5.072.56" />
|
||||||
<path d="M9.5 6.5a1.5 1.5 0 0 1-1 1.415l.385 1.99a.5.5 0 0 1-.491.595h-.788a.5.5 0 0 1-.49-.595l.384-1.99a1.5 1.5 0 1 1 2-1.415" />
|
<path d="M9.5 6.5a1.5 1.5 0 0 1-1 1.415l.385 1.99a.5.5 0 0 1-.491.595h-.788a.5.5 0 0 1-.49-.595l.384-1.99a1.5 1.5 0 1 1 2-1.415" />
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<h1>@_localizer[WebKey.LockedTitle]</h1>
|
<h1>@_localizer[viaSms ? WebKey.LockedSmsTfaTitle : WebKey.LockedTitle]</h1>
|
||||||
</header>
|
</header>
|
||||||
<section class="text-center">
|
<section class="text-center">
|
||||||
<p>@_localizer[WebKey.LockedBody]</p>
|
<p>@_localizer[viaSms ? WebKey.LockedSmsTfaBody : WebKey.LockedBody]</p>
|
||||||
</section>
|
</section>
|
||||||
<div class="row m-0 p-0">
|
<div class="row m-0 p-0">
|
||||||
<div class="access-code-panel justify-content-center align-items-center p-0 m-0">
|
<div class="access-code-panel justify-content-center align-items-center p-0 m-0">
|
||||||
<form id="form-access-code" class="form form-floating mb-0" method="post">
|
<form id="form-access-code" class="form form-floating mb-0" method="post">
|
||||||
<div class="form-floating access-code-form-floating">
|
<div class="form-floating access-code-form-floating">
|
||||||
<input type="password" id="access_code" class="form-control" name="access_code" placeholder="@_localizer[WebKey.LockedAccessCode]" required="required">
|
<input type="password" id="access_code" class="form-control" name="@accessCodeName" placeholder="@_localizer[viaSms ? WebKey.LockedSmsAccessCode : WebKey.LockedAccessCode]" required="required">
|
||||||
<label for="access_code">@_localizer[WebKey.LockedAccessCode]</label>
|
<label for="access_code">@_localizer[viaSms ? WebKey.LockedSmsAccessCode : WebKey.LockedAccessCode]</label>
|
||||||
<button type="submit" class="btn btn-primary">
|
<button type="submit" class="btn btn-primary">
|
||||||
<span class="material-symbols-outlined">
|
<span class="material-symbols-outlined">
|
||||||
login
|
login
|
||||||
@@ -45,8 +48,8 @@
|
|||||||
}
|
}
|
||||||
<section class="no-receiver-explanation text-center">
|
<section class="no-receiver-explanation text-center">
|
||||||
<details>
|
<details>
|
||||||
<summary>@_localizer[WebKey.LockedFooterTitle]</summary>
|
<summary>@_localizer[viaSms ? WebKey.LockedSmsTfaFooterTitle : WebKey.LockedFooterTitle]</summary>
|
||||||
<p>@_localizer[WebKey.LockedFooterBody]</p>
|
<p>@_localizer[viaSms ? WebKey.LockedSmsTfaFooterBody : WebKey.LockedFooterBody]</p>
|
||||||
</details>
|
</details>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
@@ -68,5 +68,4 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
<footer class="container" id="page-footer">© SignFlow 2023-2024 <a href="https://digitaldata.works">Digital Data GmbH</a></footer>
|
|
||||||
@@ -14,5 +14,4 @@
|
|||||||
<section class="text-center">
|
<section class="text-center">
|
||||||
<p>Sie haben das Dokument signiert. Im Anschluss erhalten Sie eine schriftliche Bestätigung.</p>
|
<p>Sie haben das Dokument signiert. Im Anschluss erhalten Sie eine schriftliche Bestätigung.</p>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
<footer class="container" id="page-footer">© SignFlow 2023-2024 <a href="https://digitaldata.works">Digital Data GmbH</a></footer>
|
|
||||||
36
EnvelopeGenerator.Web/Views/Home/Main.cshtml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
@{
|
||||||
|
var nonce = _accessor.HttpContext?.Items["csp-nonce"] as string;
|
||||||
|
var logo = _logoOpt.Value;
|
||||||
|
ViewData["Title"] = _localizer["Home"];
|
||||||
|
var userCulture = ViewData["UserCulture"] as Culture;
|
||||||
|
}
|
||||||
|
<div class="page container py-4 px-4">
|
||||||
|
<header class="text-center">
|
||||||
|
<div class="header-1 alert alert-secondary" role="alert">
|
||||||
|
<h3 class="text">@_localizer[WebKey.WelcomeToTheESignPortal]</h3>
|
||||||
|
<img class="@logo.LockedPageClass" src="@logo.Src" />
|
||||||
|
</div>
|
||||||
|
<div class="icon mt-4 mb-1">
|
||||||
|
<img src="~/img/sign_flow_min.svg">
|
||||||
|
</div>
|
||||||
|
<h1>signFlow</h1>
|
||||||
|
</header>
|
||||||
|
<section class="text-center">
|
||||||
|
<div class="alert alert-light" role="alert">
|
||||||
|
<p class="home-description"><span id="home-description"></span></p>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
@if (ViewData["ErrorMessage"] is string errMsg)
|
||||||
|
{
|
||||||
|
<div id="access-code-error-message" class="alert alert-danger row" role="alert">
|
||||||
|
@_sanitizer.Sanitize(errMsg)
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
<script nonce="@nonce">
|
||||||
|
const msg = "@_localizer[WebKey.HomePageDescription]";
|
||||||
|
var typed = new Typed('#home-description', {
|
||||||
|
strings: [msg],
|
||||||
|
typeSpeed: 15,
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@@ -127,25 +127,81 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal fade" id="locationBackdrop" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="locationBackdropLabel" aria-hidden="true">
|
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<input id="geoloc" type="text" value="" size="20" />
|
|
||||||
<div id="fixedMapCont"></div>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
}
|
}
|
||||||
<div id='app'></div>
|
<div id='app'></div>
|
||||||
</div>
|
</div>
|
||||||
|
@if (!isReadOnly)
|
||||||
|
{
|
||||||
<script nonce="@nonce">
|
<script nonce="@nonce">
|
||||||
|
document.getElementById('readonly-send').addEventListener('click', async () => {
|
||||||
|
const receiverMail = document.getElementById('readonly-receiver-mail');
|
||||||
|
const dateValid = document.getElementById('readonly-date-valid');
|
||||||
|
|
||||||
|
const receiverMail_value = receiverMail.value;
|
||||||
|
const dateValid_value = dateValid.value;
|
||||||
|
|
||||||
|
//check email
|
||||||
|
if (!receiverMail_value || receiverMail.classList.contains('is-invalid')) {
|
||||||
|
Swal.fire({
|
||||||
|
icon: "error",
|
||||||
|
title: "Falsche Email",
|
||||||
|
text: "Die E-Mail-Adresse ist ungültig. Bitte verwenden Sie das richtige Format, z. B.: user@mail.com."
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//check the date
|
||||||
|
const tomorrow = new Date(Date.now() + 86400000);
|
||||||
|
if (new Date(dateValid_value) < tomorrow) {
|
||||||
|
Swal.fire({
|
||||||
|
icon: "error",
|
||||||
|
title: "Falsches Datum",
|
||||||
|
text: "Die Verteilung der Umschläge sollte mindestens einen Tag dauern."
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
shareEnvelope(receiverMail_value, dateValid_value)
|
||||||
|
.then(res => {
|
||||||
|
if (res.ok) {
|
||||||
|
Swal.fire({
|
||||||
|
title: "Gesendet",
|
||||||
|
icon: "success"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Swal.fire({
|
||||||
|
icon: "error",
|
||||||
|
title: `Fehler ${res.status}`,
|
||||||
|
text: "Der Vorgang ist fehlgeschlagen. Bitte wenden Sie sich an das IT-Team."
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
Swal.fire({
|
||||||
|
icon: "error",
|
||||||
|
title: "Unerwarteter Fehler",
|
||||||
|
text: "Der Vorgang ist fehlgeschlagen. Bitte wenden Sie sich an das IT-Team."
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
|
receiverMail.value = '';
|
||||||
|
dateValid.valueAsDate = new Date(new Date().setDate(new Date().getDate() + 8));
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
}
|
||||||
|
<script nonce="@nonce">
|
||||||
|
const collapseNav = () => {
|
||||||
|
document.addEventListener('click', function (event) {
|
||||||
|
var navbarToggle = document.getElementById('navbarToggleExternalContent');
|
||||||
|
var navbarButton = document.querySelector('[data-bs-target="#navbarToggleExternalContent"]');
|
||||||
|
var isCollapsed = new bootstrap.Collapse(navbarToggle)._isTransitioning;
|
||||||
|
|
||||||
|
if (!navbarToggle.contains(event.target) && !navbarButton.contains(event.target) && !isCollapsed) {
|
||||||
|
new bootstrap.Collapse(navbarToggle).hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
@if (ViewData["DocumentBytes"] is byte[] documentBytes)
|
@if (ViewData["DocumentBytes"] is byte[] documentBytes)
|
||||||
{
|
{
|
||||||
var settings = new JsonSerializerSettings
|
var settings = new JsonSerializerSettings
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
@{
|
@{
|
||||||
var nonce = _accessor.HttpContext?.Items["csp-nonce"] as string;
|
var nonce = _accessor.HttpContext?.Items["csp-nonce"] as string;
|
||||||
var userCulture = ViewData["UserCulture"] as Culture;
|
var userCulture = ViewData["UserCulture"] as Culture;
|
||||||
|
//TODO: instead of default assignment add a middleware for culture
|
||||||
|
userCulture ??= _cultures.Default;
|
||||||
var isReadOnly = false;
|
var isReadOnly = false;
|
||||||
if (ViewData["IsReadOnly"] is bool isReadOnly_bool)
|
if (ViewData["IsReadOnly"] is bool isReadOnly_bool)
|
||||||
isReadOnly = isReadOnly_bool;
|
isReadOnly = isReadOnly_bool;
|
||||||
@@ -21,12 +23,9 @@
|
|||||||
<link rel="stylesheet" href="~/css/card.min.css" asp-append-version="true" />
|
<link rel="stylesheet" href="~/css/card.min.css" asp-append-version="true" />
|
||||||
<link rel="stylesheet" href="~/EnvelopeGenerator.Web.styles.css" asp-append-version="true" />
|
<link rel="stylesheet" href="~/EnvelopeGenerator.Web.styles.css" asp-append-version="true" />
|
||||||
<link rel="stylesheet" href="~/lib/flag-icons-main/css/flag-icons.min.css" asp-append-version="true" />
|
<link rel="stylesheet" href="~/lib/flag-icons-main/css/flag-icons.min.css" asp-append-version="true" />
|
||||||
<link rel="stylesheet" href="~/css/location-picker.min.css" asp-append-version="true" />
|
|
||||||
<link rel="stylesheet" href="~/lib/alertifyjs/css/alertify.min.css" />
|
<link rel="stylesheet" href="~/lib/alertifyjs/css/alertify.min.css" />
|
||||||
<link href="https://fonts.googleapis.com/icon?family=Material+Symbols+Outlined" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/icon?family=Material+Symbols+Outlined" rel="stylesheet">
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0" />
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0" />
|
||||||
<link rel="stylesheet" href="~/lib/leaflet/dist/leaflet.css" />
|
|
||||||
<link rel="stylesheet" href="~/lib/leaflet-locationpicker/dist/leaflet-locationpicker.src.css" />
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<style>
|
<style>
|
||||||
@@ -54,15 +53,14 @@
|
|||||||
<script src="~/lib/bootstrap/dist/js/bootstrap.min.js"></script>
|
<script src="~/lib/bootstrap/dist/js/bootstrap.min.js"></script>
|
||||||
<script src="~/lib/sweetalert2/sweetalert2.min.js"></script>
|
<script src="~/lib/sweetalert2/sweetalert2.min.js"></script>
|
||||||
<script src="~/lib/alertifyjs/alertify.min.js"></script>
|
<script src="~/lib/alertifyjs/alertify.min.js"></script>
|
||||||
<script src="~/js/util.min.js" asp-append-version="true"></script>
|
|
||||||
<script src="~/js/ui.min.js" asp-append-version="true"></script>
|
<script src="~/js/ui.min.js" asp-append-version="true"></script>
|
||||||
<script src="~/js/annotation.js" asp-append-version="true"></script>
|
<script src="~/js/annotation.js" asp-append-version="true"></script>
|
||||||
<script src="~/js/network.min.js" asp-append-version="true"></script>
|
<script src="~/js/network.min.js" asp-append-version="true"></script>
|
||||||
<script src="~/js/app.min.js" asp-append-version="true"></script>
|
<script src="~/js/app.min.js" asp-append-version="true"></script>
|
||||||
<script src="~/lib/pspdfkit/dist-2024.3.2/pspdfkit.js"></script>
|
<script src="~/lib/pspdfkit/dist-2024.3.2/pspdfkit.js"></script>
|
||||||
|
<script src="~/js/util.min.js" asp-append-version="true"></script>
|
||||||
<script src="~/js/api-service.min.js" asp-append-version="true"></script>
|
<script src="~/js/api-service.min.js" asp-append-version="true"></script>
|
||||||
<script src="~/lib/leaflet/dist/leaflet.js"></script>
|
<script src="~/lib/typed.js@2.1.0/dist/typed.umd.js"></script>
|
||||||
<script src="~/lib/leaflet-locationpicker/dist/leaflet-locationpicker.min.js"></script>
|
|
||||||
@await RenderSectionAsync("Scripts", required: false)
|
@await RenderSectionAsync("Scripts", required: false)
|
||||||
@{
|
@{
|
||||||
var settings = new JsonSerializerSettings
|
var settings = new JsonSerializerSettings
|
||||||
@@ -81,7 +79,7 @@
|
|||||||
<script src="~/js/event-binder.min.js" asp-append-version="true"></script>
|
<script src="~/js/event-binder.min.js" asp-append-version="true"></script>
|
||||||
@Html.AntiForgeryToken()
|
@Html.AntiForgeryToken()
|
||||||
<footer>
|
<footer>
|
||||||
<span>© SignFlow 2023-2024 <a href="https://digitaldata.works">Digital Data GmbH</a></span>
|
<span>© SignFlow 2023-2024 <a href="https://digitaldata.works" target="_blank">Digital Data GmbH</a></span>
|
||||||
<div class="dropup flag-dropdown">
|
<div class="dropup flag-dropdown">
|
||||||
<button class="btn btn-outline-secondary dropdown-toggle" type="button" id="langDropdownMenuButton" data-bs-toggle="dropdown" aria-expanded="false">
|
<button class="btn btn-outline-secondary dropdown-toggle" type="button" id="langDropdownMenuButton" data-bs-toggle="dropdown" aria-expanded="false">
|
||||||
<span class="fi @userCulture?.FIClass.TrySanitize(_sanitizer) me-2" id="selectedFlag"></span><span id="selectedLanguage"></span>
|
<span class="fi @userCulture?.FIClass.TrySanitize(_sanitizer) me-2" id="selectedFlag"></span><span id="selectedLanguage"></span>
|
||||||
@@ -99,7 +97,7 @@
|
|||||||
}
|
}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<a href="/privacy-policy.de-DE.html">Datenschutz</a>
|
<a href="/privacy-policy.@(userCulture?.Language).html" target="_blank">@_localizer[WebKey.Privacy]</a>
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -11,11 +11,16 @@
|
|||||||
public static readonly string de_DE = nameof(de_DE).Replace("_", "-");
|
public static readonly string de_DE = nameof(de_DE).Replace("_", "-");
|
||||||
public static readonly string en_US = nameof(en_US).Replace("_", "-");
|
public static readonly string en_US = nameof(en_US).Replace("_", "-");
|
||||||
public static readonly string LockedTitle = nameof(LockedTitle);
|
public static readonly string LockedTitle = nameof(LockedTitle);
|
||||||
|
public static readonly string LockedSmsTfaTitle = nameof(LockedSmsTfaTitle);
|
||||||
public static readonly string LockedBody = nameof(LockedBody);
|
public static readonly string LockedBody = nameof(LockedBody);
|
||||||
|
public static readonly string LockedSmsTfaBody = nameof(LockedSmsTfaBody);
|
||||||
public static readonly string LocakedOpen = nameof(LocakedOpen);
|
public static readonly string LocakedOpen = nameof(LocakedOpen);
|
||||||
public static readonly string LockedAccessCode = nameof(LockedAccessCode);
|
public static readonly string LockedAccessCode = nameof(LockedAccessCode);
|
||||||
|
public static readonly string LockedSmsAccessCode = nameof(LockedSmsAccessCode);
|
||||||
public static readonly string LockedFooterTitle = nameof(LockedFooterTitle);
|
public static readonly string LockedFooterTitle = nameof(LockedFooterTitle);
|
||||||
|
public static readonly string LockedSmsTfaFooterTitle = nameof(LockedSmsTfaFooterTitle);
|
||||||
public static readonly string LockedFooterBody = nameof(LockedFooterBody);
|
public static readonly string LockedFooterBody = nameof(LockedFooterBody);
|
||||||
|
public static readonly string LockedSmsTfaFooterBody = nameof(LockedSmsTfaFooterBody);
|
||||||
public static readonly string WrongAccessCode = nameof(WrongAccessCode);
|
public static readonly string WrongAccessCode = nameof(WrongAccessCode);
|
||||||
public static readonly string SignDoc = nameof(SignDoc);
|
public static readonly string SignDoc = nameof(SignDoc);
|
||||||
public static readonly string DocRejected = nameof(DocRejected);
|
public static readonly string DocRejected = nameof(DocRejected);
|
||||||
@@ -35,5 +40,7 @@
|
|||||||
public static readonly string SigningProcessTitle = nameof(SigningProcessTitle);
|
public static readonly string SigningProcessTitle = nameof(SigningProcessTitle);
|
||||||
public static readonly string WelcomeToTheESignPortal = nameof(WelcomeToTheESignPortal);
|
public static readonly string WelcomeToTheESignPortal = nameof(WelcomeToTheESignPortal);
|
||||||
public static readonly string ViewDoc = nameof(ViewDoc);
|
public static readonly string ViewDoc = nameof(ViewDoc);
|
||||||
|
public static readonly string HomePageDescription = nameof(HomePageDescription);
|
||||||
|
public static readonly string Privacy = nameof(Privacy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -125,5 +125,16 @@
|
|||||||
"[SIGNATURE_TYPE]": "signieren",
|
"[SIGNATURE_TYPE]": "signieren",
|
||||||
"[REASON]": ""
|
"[REASON]": ""
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"GTXMessagingConfig": {
|
||||||
|
"AuthKey": "ep$?A!Gs"
|
||||||
|
},
|
||||||
|
"SmsConfig": {
|
||||||
|
"Uri": "https://rest.gtx-messaging.net",
|
||||||
|
"Path": "smsc/sendsms/f566f7e5-bdf2-4a9a-bf52-ed88215a432e/json",
|
||||||
|
"Headers": {},
|
||||||
|
"QueryParams": {
|
||||||
|
"from": "signFlow"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -82,11 +82,5 @@
|
|||||||
"inputFiles": [
|
"inputFiles": [
|
||||||
"wwwroot/css/card.css"
|
"wwwroot/css/card.css"
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
"outputFileName": "wwwroot/css/location-picker.min.css",
|
|
||||||
"inputFiles": [
|
|
||||||
"wwwroot/css/location-picker.css"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
#fixedMapCont {
|
|
||||||
height: 100%;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
#locationBackdrop .modal-body {
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
#fixedMapCont{height:100%;width:100%}#locationBackdrop .modal-body{padding:0;margin:0}
|
|
||||||
@@ -130,6 +130,15 @@ main {
|
|||||||
margin: 0 0 0.5vh 0;
|
margin: 0 0 0.5vh 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.home-description {
|
||||||
|
text-align: justify;
|
||||||
|
font-family: Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: .95em;
|
||||||
|
letter-spacing: -1px;
|
||||||
|
word-spacing: -2px;
|
||||||
|
}
|
||||||
|
|
||||||
.envelope-view {
|
.envelope-view {
|
||||||
display: flex; /* d-flex */
|
display: flex; /* d-flex */
|
||||||
flex-direction: column; /* flex-column */
|
flex-direction: column; /* flex-column */
|
||||||
@@ -212,10 +221,15 @@ footer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.page header .icon.locked {
|
.page header .icon.locked {
|
||||||
background-color: #ffc107;
|
background-color: #ffa407;
|
||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.page header .icon.locked.sms-tfa {
|
||||||
|
background-color: #ff7207;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
.page header .icon.signed {
|
.page header .icon.signed {
|
||||||
background-color: #146c43;
|
background-color: #146c43;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|||||||
3
EnvelopeGenerator.Web/wwwroot/img/sign_flow_min.svg
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<svg width="98" height="95" viewBox="0 0 98 95" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M67.515 15.8772L52.455 36.8498H44.64L29.58 15.8772L36.135 11.7096H60.9525L67.5075 15.8772H67.515ZM19.485 22.2969L34.2525 42.8654L25.3425 53.7595L14.4675 25.4918L19.485 22.3044V22.2969ZM30.795 65.0651L43.7925 49.1729H53.295L66.2925 65.0651L48.54 79.4084L30.7875 65.0651H30.795ZM71.7525 53.7595L62.8425 42.8654L77.61 22.2969L82.6275 25.4843L71.7525 53.752V53.7595ZM64.4175 0.0224456V0H32.6775V0.0224456L0 20.793L0.209999 21.1222L19.53 71.3352L48.495 94.4476L48.54 94.5H48.5475H48.555L48.5925 94.4476L77.5575 71.3352L96.8775 21.1222L97.0875 20.793L64.41 0.0224456H64.4175Z" fill="#FFD631"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 700 B |
@@ -211,10 +211,6 @@ class App {
|
|||||||
// Show the modal
|
// Show the modal
|
||||||
Comp.ShareBackdrop.show();
|
Comp.ShareBackdrop.show();
|
||||||
break;
|
break;
|
||||||
case 'LOCATION':
|
|
||||||
// Show the modal
|
|
||||||
Comp.LocationBackdrop.show();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
2
EnvelopeGenerator.Web/wwwroot/js/app.min.js
vendored
@@ -1,3 +1,3 @@
|
|||||||
const ActionType={Created:0,Saved:1,Sent:2,EmailSent:3,Delivered:4,Seen:5,Signed:6,Rejected:7};class App{constructor(n,t,i,r,u,f){this.container=f??`#${this.constructor.name.toLowerCase()}`;this.envelopeKey=n;this.Network=new Network;this.Instance=null;this.currentDocument=null;this.currentReceiver=null;this.signatureCount=0;this.envelopeReceiver=t;this.documentBytes=i;this.licenseKey=r;this.locale=u}async init(){this.currentDocument=this.envelopeReceiver.envelope.documents[0];this.currentReceiver=this.envelopeReceiver.receiver;const n=this.documentBytes;if(n.fatal||n.error)return Swal.fire({title:"Fehler",text:"Dokument konnte nicht geladen werden!",icon:"error"});const t=this.documentBytes;this.Instance=await UI.loadPSPDFKit(t,this.container,this.licenseKey,this.locale);UI.addToolbarItems(this.Instance,this.handleClick.bind(this));this.Instance.addEventListener("annotations.load",this.handleAnnotationsLoad.bind(this));this.Instance.addEventListener("annotations.change",this.handleAnnotationsChange.bind(this));this.Instance.addEventListener("annotations.create",this.handleAnnotationsCreate.bind(this));this.Instance.addEventListener("annotations.willChange",()=>{Comp.ActPanel.Toggle()});try{this.signatureCount=this.currentDocument.elements.length;await Annotation.createAnnotations(this.currentDocument,this.Instance);const n=await this.Network.openDocument(this.envelopeKey);if(n.fatal||n.error)return Swal.fire({title:"Fehler",text:"Umschlag konnte nicht geöffnet werden!",icon:"error"})}catch(i){}[...document.getElementsByClassName("btn_refresh")].forEach(n=>n.addEventListener("click",()=>this.handleClick("RESET")));[...document.getElementsByClassName("btn_complete")].forEach(n=>n.addEventListener("click",()=>this.handleClick("FINISH")));[...document.getElementsByClassName("btn_reject")].forEach(n=>n.addEventListener("click",()=>this.handleClick("REJECT")))}handleAnnotationsLoad(n){n.toJS()}handleAnnotationsChange(){}async handleAnnotationsCreate(n){const t=n.toJS()[0],i=!!t.formFieldName,r=!!t.isSignature;if(i===!1&&r===!0){const r=t.boundingBox.left-20,u=t.boundingBox.top-20,n=150,i=75,f=new Date,e=await Annotation.createAnnotationFrameBlob(this.envelopeReceiver.name,this.currentReceiver.signature,f,n,i),o=await fetch(e),s=await o.blob(),h=await this.Instance.createAttachment(s),c=Annotation.createImageAnnotation(new PSPDFKit.Geometry.Rect({left:r,top:u,width:n,height:i}),t.pageIndex,h);this.Instance.create(c)}}async handleClick(n){let t=!1;switch(n){case"RESET":t=await this.handleReset(null);Comp.SignatureProgress.SignedCount=0;t.isConfirmed&&Swal.fire({title:"Erfolg",text:"Dokument wurde zurückgesetzt",icon:"info"});break;case"FINISH":t=await this.handleFinish(null);t==!0&&(window.location.href=`/EnvelopeKey/${this.envelopeKey}/Success`);break;case"REJECT":Swal.fire({title:localized.rejection,html:`<div class="text-start fs-6 p-0 m-0">${localized.rejectionReasonQ}</div>`,icon:"question",input:"text",inputAttributes:{autocapitalize:"off"},showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:localized.complete,cancelButtonText:localized.back,showLoaderOnConfirm:!0,preConfirm:async n=>{try{return await rejectEnvelope(n)}catch(t){Swal.showValidationMessage(`
|
const ActionType={Created:0,Saved:1,Sent:2,EmailSent:3,Delivered:4,Seen:5,Signed:6,Rejected:7};class App{constructor(n,t,i,r,u,f){this.container=f??`#${this.constructor.name.toLowerCase()}`;this.envelopeKey=n;this.Network=new Network;this.Instance=null;this.currentDocument=null;this.currentReceiver=null;this.signatureCount=0;this.envelopeReceiver=t;this.documentBytes=i;this.licenseKey=r;this.locale=u}async init(){this.currentDocument=this.envelopeReceiver.envelope.documents[0];this.currentReceiver=this.envelopeReceiver.receiver;const n=this.documentBytes;if(n.fatal||n.error)return Swal.fire({title:"Fehler",text:"Dokument konnte nicht geladen werden!",icon:"error"});const t=this.documentBytes;this.Instance=await UI.loadPSPDFKit(t,this.container,this.licenseKey,this.locale);UI.addToolbarItems(this.Instance,this.handleClick.bind(this));this.Instance.addEventListener("annotations.load",this.handleAnnotationsLoad.bind(this));this.Instance.addEventListener("annotations.change",this.handleAnnotationsChange.bind(this));this.Instance.addEventListener("annotations.create",this.handleAnnotationsCreate.bind(this));this.Instance.addEventListener("annotations.willChange",()=>{Comp.ActPanel.Toggle()});try{this.signatureCount=this.currentDocument.elements.length;await Annotation.createAnnotations(this.currentDocument,this.Instance);const n=await this.Network.openDocument(this.envelopeKey);if(n.fatal||n.error)return Swal.fire({title:"Fehler",text:"Umschlag konnte nicht geöffnet werden!",icon:"error"})}catch(i){}[...document.getElementsByClassName("btn_refresh")].forEach(n=>n.addEventListener("click",()=>this.handleClick("RESET")));[...document.getElementsByClassName("btn_complete")].forEach(n=>n.addEventListener("click",()=>this.handleClick("FINISH")));[...document.getElementsByClassName("btn_reject")].forEach(n=>n.addEventListener("click",()=>this.handleClick("REJECT")))}handleAnnotationsLoad(n){n.toJS()}handleAnnotationsChange(){}async handleAnnotationsCreate(n){const t=n.toJS()[0],i=!!t.formFieldName,r=!!t.isSignature;if(i===!1&&r===!0){const r=t.boundingBox.left-20,u=t.boundingBox.top-20,n=150,i=75,f=new Date,e=await Annotation.createAnnotationFrameBlob(this.envelopeReceiver.name,this.currentReceiver.signature,f,n,i),o=await fetch(e),s=await o.blob(),h=await this.Instance.createAttachment(s),c=Annotation.createImageAnnotation(new PSPDFKit.Geometry.Rect({left:r,top:u,width:n,height:i}),t.pageIndex,h);this.Instance.create(c)}}async handleClick(n){let t=!1;switch(n){case"RESET":t=await this.handleReset(null);Comp.SignatureProgress.SignedCount=0;t.isConfirmed&&Swal.fire({title:"Erfolg",text:"Dokument wurde zurückgesetzt",icon:"info"});break;case"FINISH":t=await this.handleFinish(null);t==!0&&(window.location.href=`/EnvelopeKey/${this.envelopeKey}/Success`);break;case"REJECT":Swal.fire({title:localized.rejection,html:`<div class="text-start fs-6 p-0 m-0">${localized.rejectionReasonQ}</div>`,icon:"question",input:"text",inputAttributes:{autocapitalize:"off"},showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:localized.complete,cancelButtonText:localized.back,showLoaderOnConfirm:!0,preConfirm:async n=>{try{return await rejectEnvelope(n)}catch(t){Swal.showValidationMessage(`
|
||||||
Request failed: ${t}
|
Request failed: ${t}
|
||||||
`)}},allowOutsideClick:()=>!Swal.isLoading()}).then(n=>{if(n.isConfirmed){const t=n.value;t.ok?redirRejected():Swal.showValidationMessage(`Request failed: ${t.message}`)}});break;case"COPY_URL":const n=window.location.href.replace(/\/readonly/gi,"");navigator.clipboard.writeText(n).then(function(){bsNotify("Kopiert",{alert_type:"success",delay:4,icon_name:"check_circle"})}).catch(function(){bsNotify("Unerwarteter Fehler",{alert_type:"danger",delay:4,icon_name:"error"})});break;case"SHARE":Comp.ShareBackdrop.show();break;case"LOCATION":Comp.LocationBackdrop.show()}}async handleFinish(){const n=await this.Instance.exportInstantJSON(),t=await n.formFieldValues,r=t.filter(n=>Annotation.isFieldRequired(n)),u=r.some(n=>n.value===undefined||n.value===null||n.value==="");if(u)return Swal.fire({title:"Warnung",text:"Bitte füllen Sie alle Standortinformationen vollständig aus!",icon:"warning"}),!1;const f=new RegExp("^[a-zA-Z\\u0080-\\u024F]+(?:([\\ \\-\\']|(\\.\\ ))[a-zA-Z\\u0080-\\u024F]+)*$"),e=t.filter(n=>Annotation.isCityField(n));for(var i of e)if(!IS_MOBILE_DEVICE&&!f.test(i.value))return Swal.fire({title:"Warnung",text:`Bitte überprüfen Sie die eingegebene Ortsangabe "${i.value}" auf korrekte Formatierung. Beispiele für richtige Formate sind: München, Île-de-France, Sauðárkrókur, San Francisco, St. Catharines usw.`,icon:"warning"}),!1;const o=await this.validateAnnotations(this.signatureCount);return o===!1?(Swal.fire({title:"Warnung",text:"Es wurden nicht alle Signaturfelder ausgefüllt!",icon:"warning"}),!1):Swal.fire({title:localized.confirmation,html:`<div class="text-start fs-6 p-0 m-0">${localized.sigAgree}</div>`,icon:"question",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:localized.finalize,cancelButtonText:localized.back}).then(async t=>{if(t.isConfirmed){try{await this.Instance.save()}catch(i){return Swal.fire({title:"Fehler",text:"Umschlag konnte nicht signiert werden!",icon:"error"}),!1}try{const i=await n,t=await this.Network.postEnvelope(this.envelopeKey,this.currentDocument.id,i);return t.fatal?(Swal.fire({title:"Fehler",text:"Umschlag konnte nicht signiert werden!",icon:"error"}),!1):t.error?(Swal.fire({title:"Warnung",text:"Umschlag ist nicht mehr verfügbar.",icon:"warning"}),!1):!0}catch(i){return!1}}else return!1})}async validateAnnotations(n){const t=await Annotation.getAnnotations(this.Instance),i=t.map(n=>n.toJS()).filter(n=>n.isSignature);return n>i.length?!1:!0}async handleReset(){const n=await Swal.fire({title:"Sind sie sicher?",text:"Wollen Sie das Dokument und alle erstellten Signaturen zurücksetzen?",icon:"question",showCancelButton:!0});if(n.isConfirmed){const n=await Annotation.deleteAnnotations(this.Instance)}return n}}
|
`)}},allowOutsideClick:()=>!Swal.isLoading()}).then(n=>{if(n.isConfirmed){const t=n.value;t.ok?redirRejected():Swal.showValidationMessage(`Request failed: ${t.message}`)}});break;case"COPY_URL":const n=window.location.href.replace(/\/readonly/gi,"");navigator.clipboard.writeText(n).then(function(){bsNotify("Kopiert",{alert_type:"success",delay:4,icon_name:"check_circle"})}).catch(function(){bsNotify("Unerwarteter Fehler",{alert_type:"danger",delay:4,icon_name:"error"})});break;case"SHARE":Comp.ShareBackdrop.show()}}async handleFinish(){const n=await this.Instance.exportInstantJSON(),t=await n.formFieldValues,r=t.filter(n=>Annotation.isFieldRequired(n)),u=r.some(n=>n.value===undefined||n.value===null||n.value==="");if(u)return Swal.fire({title:"Warnung",text:"Bitte füllen Sie alle Standortinformationen vollständig aus!",icon:"warning"}),!1;const f=new RegExp("^[a-zA-Z\\u0080-\\u024F]+(?:([\\ \\-\\']|(\\.\\ ))[a-zA-Z\\u0080-\\u024F]+)*$"),e=t.filter(n=>Annotation.isCityField(n));for(var i of e)if(!IS_MOBILE_DEVICE&&!f.test(i.value))return Swal.fire({title:"Warnung",text:`Bitte überprüfen Sie die eingegebene Ortsangabe "${i.value}" auf korrekte Formatierung. Beispiele für richtige Formate sind: München, Île-de-France, Sauðárkrókur, San Francisco, St. Catharines usw.`,icon:"warning"}),!1;const o=await this.validateAnnotations(this.signatureCount);return o===!1?(Swal.fire({title:"Warnung",text:"Es wurden nicht alle Signaturfelder ausgefüllt!",icon:"warning"}),!1):Swal.fire({title:localized.confirmation,html:`<div class="text-start fs-6 p-0 m-0">${localized.sigAgree}</div>`,icon:"question",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:localized.finalize,cancelButtonText:localized.back}).then(async t=>{if(t.isConfirmed){try{await this.Instance.save()}catch(i){return Swal.fire({title:"Fehler",text:"Umschlag konnte nicht signiert werden!",icon:"error"}),!1}try{const i=await n,t=await this.Network.postEnvelope(this.envelopeKey,this.currentDocument.id,i);return t.fatal?(Swal.fire({title:"Fehler",text:"Umschlag konnte nicht signiert werden!",icon:"error"}),!1):t.error?(Swal.fire({title:"Warnung",text:"Umschlag ist nicht mehr verfügbar.",icon:"warning"}),!1):!0}catch(i){return!1}}else return!1})}async validateAnnotations(n){const t=await Annotation.getAnnotations(this.Instance),i=t.map(n=>n.toJS()).filter(n=>n.isSignature);return n>i.length?!1:!0}async handleReset(){const n=await Swal.fire({title:"Sind sie sicher?",text:"Wollen Sie das Dokument und alle erstellten Signaturen zurücksetzen?",icon:"question",showCancelButton:!0});if(n.isConfirmed){const n=await Annotation.deleteAnnotations(this.Instance)}return n}}
|
||||||
@@ -11,7 +11,7 @@ document.querySelectorAll('.email-input').forEach(input => {
|
|||||||
document.addEventListener('DOMContentLoaded', function () {
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
var dropdownItems = document.querySelectorAll('.culture-dropdown-item');
|
var dropdownItems = document.querySelectorAll('.culture-dropdown-item');
|
||||||
dropdownItems.forEach(function (item) {
|
dropdownItems.forEach(function (item) {
|
||||||
item.addEventListener('click', async function (event) {
|
item.addEventListener('click', async function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
var language = this.getAttribute('data-language');
|
var language = this.getAttribute('data-language');
|
||||||
var flagCode = this.getAttribute('data-flag');
|
var flagCode = this.getAttribute('data-flag');
|
||||||
@@ -21,81 +21,6 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
document.getElementById('readonly-send').addEventListener('click', async () => {
|
|
||||||
const receiverMail = document.getElementById('readonly-receiver-mail');
|
|
||||||
const dateValid = document.getElementById('readonly-date-valid');
|
|
||||||
|
|
||||||
const receiverMail_value = receiverMail.value;
|
|
||||||
const dateValid_value = dateValid.value;
|
|
||||||
|
|
||||||
//check email
|
|
||||||
if (!receiverMail_value || receiverMail.classList.contains('is-invalid')) {
|
|
||||||
Swal.fire({
|
|
||||||
icon: "error",
|
|
||||||
title: "Falsche Email",
|
|
||||||
text: "Die E-Mail-Adresse ist ungültig. Bitte verwenden Sie das richtige Format, z. B.: user@mail.com."
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
//check the date
|
|
||||||
const tomorrow = new Date(Date.now() + 86400000);
|
|
||||||
if (new Date(dateValid_value) < tomorrow) {
|
|
||||||
Swal.fire({
|
|
||||||
icon: "error",
|
|
||||||
title: "Falsches Datum",
|
|
||||||
text: "Die Verteilung der Umschläge sollte mindestens einen Tag dauern."
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
shareEnvelope(receiverMail_value, dateValid_value)
|
|
||||||
.then(res => {
|
|
||||||
if (res.ok) {
|
|
||||||
Swal.fire({
|
|
||||||
title: "Gesendet",
|
|
||||||
icon: "success"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Swal.fire({
|
|
||||||
icon: "error",
|
|
||||||
title: `Fehler ${res.status}`,
|
|
||||||
text: "Der Vorgang ist fehlgeschlagen. Bitte wenden Sie sich an das IT-Team."
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(err => {
|
|
||||||
Swal.fire({
|
|
||||||
icon: "error",
|
|
||||||
title: "Unerwarteter Fehler",
|
|
||||||
text: "Der Vorgang ist fehlgeschlagen. Bitte wenden Sie sich an das IT-Team."
|
|
||||||
});
|
|
||||||
})
|
|
||||||
|
|
||||||
receiverMail.value = '';
|
|
||||||
dateValid.valueAsDate = new Date(new Date().setDate(new Date().getDate() + 8));
|
|
||||||
});
|
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', async () => {
|
|
||||||
var coords;
|
|
||||||
try {
|
|
||||||
coords = await getCoordinates();
|
|
||||||
}
|
|
||||||
catch (err) {
|
|
||||||
coords = {
|
|
||||||
latitude: 0,
|
|
||||||
longitude: 0,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
$('#geoloc').leafletLocationPicker({
|
|
||||||
alwaysOpen: true,
|
|
||||||
mapContainer: "#fixedMapCont",
|
|
||||||
location: { latitude: coords.latitude, longitude: coords.longitude }
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
const bsNotify = (message, options) => alertify.notify(
|
const bsNotify = (message, options) => alertify.notify(
|
||||||
`<div class="alert ${options.alert_type ? 'alert-' + options.alert_type : ''}" role="alert"><span class="material-symbols-outlined">${options?.icon_name ?? ''}</span><p>${message}</p></div>`,
|
`<div class="alert ${options.alert_type ? 'alert-' + options.alert_type : ''}" role="alert"><span class="material-symbols-outlined">${options?.icon_name ?? ''}</span><p>${message}</p></div>`,
|
||||||
'custom',
|
'custom',
|
||||||
@@ -167,10 +92,4 @@ class Comp {
|
|||||||
Comp.__ShareBackdrop ??= new bootstrap.Modal(document.getElementById('shareBackdrop'));
|
Comp.__ShareBackdrop ??= new bootstrap.Modal(document.getElementById('shareBackdrop'));
|
||||||
return this.__ShareBackdrop;
|
return this.__ShareBackdrop;
|
||||||
}
|
}
|
||||||
|
|
||||||
static __LocationBackdrop;
|
|
||||||
static get LocationBackdrop() {
|
|
||||||
Comp.__LocationBackdrop ??= new bootstrap.Modal(document.getElementById('locationBackdrop'));
|
|
||||||
return this.__LocationBackdrop;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1 +1 @@
|
|||||||
document.querySelectorAll(".email-input").forEach(n=>{n.addEventListener("input",function(){/^\S+@\S+\.\S+$/.test(this.value)?this.classList.remove("is-invalid"):this.classList.add("is-invalid")})});document.addEventListener("DOMContentLoaded",function(){var n=document.querySelectorAll(".culture-dropdown-item");n.forEach(function(n){n.addEventListener("click",async function(n){n.preventDefault();var t=this.getAttribute("data-language"),i=this.getAttribute("data-flag");document.getElementById("selectedFlag").className="fi "+i+" me-2";await setLanguage(t)})})});document.getElementById("readonly-send").addEventListener("click",async()=>{const n=document.getElementById("readonly-receiver-mail"),t=document.getElementById("readonly-date-valid"),i=n.value,r=t.value;if(!i||n.classList.contains("is-invalid")){Swal.fire({icon:"error",title:"Falsche Email",text:"Die E-Mail-Adresse ist ungültig. Bitte verwenden Sie das richtige Format, z. B.: user@mail.com."});return}const u=new Date(Date.now()+864e5);if(new Date(r)<u){Swal.fire({icon:"error",title:"Falsches Datum",text:"Die Verteilung der Umschläge sollte mindestens einen Tag dauern."});return}shareEnvelope(i,r).then(n=>{n.ok?Swal.fire({title:"Gesendet",icon:"success"}):Swal.fire({icon:"error",title:`Fehler ${n.status}`,text:"Der Vorgang ist fehlgeschlagen. Bitte wenden Sie sich an das IT-Team."})}).catch(()=>{Swal.fire({icon:"error",title:"Unerwarteter Fehler",text:"Der Vorgang ist fehlgeschlagen. Bitte wenden Sie sich an das IT-Team."})});n.value="";t.valueAsDate=new Date((new Date).setDate((new Date).getDate()+8))});document.addEventListener("DOMContentLoaded",async()=>{var n;try{n=await getCoordinates()}catch(t){n={latitude:0,longitude:0}}$("#geoloc").leafletLocationPicker({alwaysOpen:!0,mapContainer:"#fixedMapCont",location:{latitude:n.latitude,longitude:n.longitude}})});const bsNotify=(n,t)=>alertify.notify(`<div class="alert ${t.alert_type?"alert-"+t.alert_type:""}" role="alert"><span class="material-symbols-outlined">${t?.icon_name??""}</span><p>${n}</p></div>`,"custom",t?.delay??5);class Comp{static ActPanel=class{static __Root;static get Root(){Comp.ActPanel.__Root??=document.getElementById("flex-action-panel");return Comp.ActPanel.__Root}static get Elements(){return[...Comp.ActPanel.Root.children]}static get IsHided(){return Comp.ActPanel.Root.style.display=="none"}static set Display(n){Comp.ActPanel.Root.style.display=n;Comp.ActPanel.Elements.forEach(t=>t.style.display=n)}static Toggle(){Comp.ActPanel.Display=Comp.ActPanel.IsHided?"":"none"}};static SignatureProgress=class{static __SignatureCount;static get SignatureCount(){this.__SignatureCount=parseInt(document.getElementById("signature-count").innerText);return this.__SignatureCount}static __SignedCountSpan;static get SignedCountSpan(){this.__SignedCountSpan??=document.getElementById("signed-count");return Comp.SignatureProgress.__SignedCountSpan}static __signedCount=0;static get SignedCount(){return this.__signedCount}static set SignedCount(n){this.__signedCount=n;const t=(n/this.SignatureCount)*100;this.SignedCountBar.style.setProperty("--progress-width",t+"%");this.SignedCountSpan.innerText=n.toString()}static __SignedCountBar;static get SignedCountBar(){this.__SignedCountBar??=document.getElementById("signed-count-bar");return this.__SignedCountBar}};static __ShareBackdrop;static get ShareBackdrop(){return Comp.__ShareBackdrop??=new bootstrap.Modal(document.getElementById("shareBackdrop")),this.__ShareBackdrop}static __LocationBackdrop;static get LocationBackdrop(){return Comp.__LocationBackdrop??=new bootstrap.Modal(document.getElementById("locationBackdrop")),this.__LocationBackdrop}}
|
document.querySelectorAll(".email-input").forEach(n=>{n.addEventListener("input",function(){/^\S+@\S+\.\S+$/.test(this.value)?this.classList.remove("is-invalid"):this.classList.add("is-invalid")})});document.addEventListener("DOMContentLoaded",function(){var n=document.querySelectorAll(".culture-dropdown-item");n.forEach(function(n){n.addEventListener("click",async function(n){n.preventDefault();var t=this.getAttribute("data-language"),i=this.getAttribute("data-flag");document.getElementById("selectedFlag").className="fi "+i+" me-2";await setLanguage(t)})})});const bsNotify=(n,t)=>alertify.notify(`<div class="alert ${t.alert_type?"alert-"+t.alert_type:""}" role="alert"><span class="material-symbols-outlined">${t?.icon_name??""}</span><p>${n}</p></div>`,"custom",t?.delay??5);class Comp{static ActPanel=class{static __Root;static get Root(){Comp.ActPanel.__Root??=document.getElementById("flex-action-panel");return Comp.ActPanel.__Root}static get Elements(){return[...Comp.ActPanel.Root.children]}static get IsHided(){return Comp.ActPanel.Root.style.display=="none"}static set Display(n){Comp.ActPanel.Root.style.display=n;Comp.ActPanel.Elements.forEach(t=>t.style.display=n)}static Toggle(){Comp.ActPanel.Display=Comp.ActPanel.IsHided?"":"none"}};static SignatureProgress=class{static __SignatureCount;static get SignatureCount(){this.__SignatureCount=parseInt(document.getElementById("signature-count").innerText);return this.__SignatureCount}static __SignedCountSpan;static get SignedCountSpan(){this.__SignedCountSpan??=document.getElementById("signed-count");return Comp.SignatureProgress.__SignedCountSpan}static __signedCount=0;static get SignedCount(){return this.__signedCount}static set SignedCount(n){this.__signedCount=n;const t=(n/this.SignatureCount)*100;this.SignedCountBar.style.setProperty("--progress-width",t+"%");this.SignedCountSpan.innerText=n.toString()}static __SignedCountBar;static get SignedCountBar(){this.__SignedCountBar??=document.getElementById("signed-count-bar");return this.__SignedCountBar}};static __ShareBackdrop;static get ShareBackdrop(){return Comp.__ShareBackdrop??=new bootstrap.Modal(document.getElementById("shareBackdrop")),this.__ShareBackdrop}}
|
||||||
@@ -89,19 +89,6 @@
|
|||||||
icon: `<svg width="30" height="30" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
icon: `<svg width="30" height="30" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path d="M20 13V17.5C20 20.5577 16 20.5 12 20.5C8 20.5 4 20.5577 4 17.5V13M12 3L12 15M12 3L16 7M12 3L8 7" stroke="#000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
<path d="M20 13V17.5C20 20.5577 16 20.5 12 20.5C8 20.5 4 20.5577 4 17.5V13M12 3L12 15M12 3L16 7M12 3L8 7" stroke="#000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
</svg>`,
|
</svg>`,
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'custom',
|
|
||||||
id: 'button-location',
|
|
||||||
className: 'button-location',
|
|
||||||
title: 'Location',
|
|
||||||
onPress() {
|
|
||||||
callback('LOCATION')
|
|
||||||
},
|
|
||||||
icon: `<svg width="30" height="30" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path d="M12 21C15.5 17.4 19 14.1764 19 10.2C19 6.22355 15.866 3 12 3C8.13401 3 5 6.22355 5 10.2C5 14.1764 8.5 17.4 12 21Z" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
||||||
<path d="M12 13C13.6569 13 15 11.6569 15 10C15 8.34315 13.6569 7 12 7C10.3431 7 9 8.34315 9 10C9 11.6569 10.3431 13 12 13Z" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
||||||
</svg>`,
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
5
EnvelopeGenerator.Web/wwwroot/js/ui.min.js
vendored
@@ -1,10 +1,7 @@
|
|||||||
class UI{static allowedToolbarItems=["sidebar-thumbnails","sidebar-document-ouline","sidebar-bookmarks","pager","pan","zoom-out","zoom-in","zoom-mode","spacer","search","export-pdf"];static Instance
|
class UI{static allowedToolbarItems=["sidebar-thumbnails","sidebar-document-ouline","sidebar-bookmarks","pager","pan","zoom-out","zoom-in","zoom-mode","spacer","search","export-pdf"];static Instance
|
||||||
static loadPSPDFKit(n,t,i,r){return UI.Instance=PSPDFKit.load({inlineWorkers:!1,locale:r,licenseKey:i,styleSheets:["/css/site.css"],container:t,document:n,annotationPresets:UI.getPresets(),electronicSignatures:{creationModes:["DRAW","TYPE","IMAGE"]},initialViewState:new PSPDFKit.ViewState({sidebarMode:PSPDFKit.SidebarMode.THUMBNAILS}),isEditableAnnotation:function(n){return n.isSignature||n.description=="FRAME"?!1:!0},customRenderers:{Annotation:UI.annotationRenderer}}),UI.Instance}static addToolbarItems(n,t){var i=n.toolbarItems.filter(n=>UI.allowedToolbarItems.includes(n.type));i=IS_READONLY?i.concat(UI.getReadOnlyItems(t)):i.concat(UI.getWritableItems(t));IS_DESKTOP_SIZE||IS_READONLY||(i=i.concat(UI.getMobileWritableItems(t)));n.setToolbarItems(i)}static annotationRenderer(){return null}static createElementFromHTML(n){const t=document.createElement("div");return t.innerHTML=n.trim(),t.firstChild}static getWritableItems=function(n){return[{type:"custom",id:"button-share",className:"button-share",title:"Teilen",onPress(){n("SHARE")},icon:`<svg width="30" height="30" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
static loadPSPDFKit(n,t,i,r){return UI.Instance=PSPDFKit.load({inlineWorkers:!1,locale:r,licenseKey:i,styleSheets:["/css/site.css"],container:t,document:n,annotationPresets:UI.getPresets(),electronicSignatures:{creationModes:["DRAW","TYPE","IMAGE"]},initialViewState:new PSPDFKit.ViewState({sidebarMode:PSPDFKit.SidebarMode.THUMBNAILS}),isEditableAnnotation:function(n){return n.isSignature||n.description=="FRAME"?!1:!0},customRenderers:{Annotation:UI.annotationRenderer}}),UI.Instance}static addToolbarItems(n,t){var i=n.toolbarItems.filter(n=>UI.allowedToolbarItems.includes(n.type));i=IS_READONLY?i.concat(UI.getReadOnlyItems(t)):i.concat(UI.getWritableItems(t));IS_DESKTOP_SIZE||IS_READONLY||(i=i.concat(UI.getMobileWritableItems(t)));n.setToolbarItems(i)}static annotationRenderer(){return null}static createElementFromHTML(n){const t=document.createElement("div");return t.innerHTML=n.trim(),t.firstChild}static getWritableItems=function(n){return[{type:"custom",id:"button-share",className:"button-share",title:"Teilen",onPress(){n("SHARE")},icon:`<svg width="30" height="30" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path d="M20 13V17.5C20 20.5577 16 20.5 12 20.5C8 20.5 4 20.5577 4 17.5V13M12 3L12 15M12 3L16 7M12 3L8 7" stroke="#000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
<path d="M20 13V17.5C20 20.5577 16 20.5 12 20.5C8 20.5 4 20.5577 4 17.5V13M12 3L12 15M12 3L16 7M12 3L8 7" stroke="#000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
</svg>`},{type:"custom",id:"button-location",className:"button-location",title:"Location",onPress(){n("LOCATION")},icon:`<svg width="30" height="30" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
</svg>`}]};static getReadOnlyItems=function(n){return[{type:"custom",id:"button-copy-url",className:"button-copy-url",title:"Teilen",onPress(){n("COPY_URL")},icon:`<svg viewBox="4 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path d="M12 21C15.5 17.4 19 14.1764 19 10.2C19 6.22355 15.866 3 12 3C8.13401 3 5 6.22355 5 10.2C5 14.1764 8.5 17.4 12 21Z" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
||||||
<path d="M12 13C13.6569 13 15 11.6569 15 10C15 8.34315 13.6569 7 12 7C10.3431 7 9 8.34315 9 10C9 11.6569 10.3431 13 12 13Z" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
||||||
</svg>`}]};static getReadOnlyItems=function(n){return[{type:"custom",id:"button-copy-url",className:"button-copy-url",title:"Teilen",onPress(){n("COPY_URL")},icon:`<svg viewBox="4 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path d="M15 3H9C6.79086 3 5 4.79086 5 7V15" stroke="#222222"/>
|
<path d="M15 3H9C6.79086 3 5 4.79086 5 7V15" stroke="#222222"/>
|
||||||
<path d="M8.5 11.5C8.5 10.3156 8.50074 9.46912 8.57435 8.81625C8.64681 8.17346 8.78457 7.78051 9.01662 7.4781C9.14962 7.30477 9.30477 7.14962 9.4781 7.01662C9.78051 6.78457 10.1735 6.64681 10.8163 6.57435C11.4691 6.50074 12.3156 6.5 13.5 6.5C14.6844 6.5 15.5309 6.50074 16.1837 6.57435C16.8265 6.64681 17.2195 6.78457 17.5219 7.01662C17.6952 7.14962 17.8504 7.30477 17.9834 7.4781C18.2154 7.78051 18.3532 8.17346 18.4257 8.81625C18.4993 9.46912 18.5 10.3156 18.5 11.5V15.5C18.5 16.6844 18.4993 17.5309 18.4257 18.1837C18.3532 18.8265 18.2154 19.2195 17.9834 19.5219C17.8504 19.6952 17.6952 19.8504 17.5219 19.9834C17.2195 20.2154 16.8265 20.3532 16.1837 20.4257C15.5309 20.4993 14.6844 20.5 13.5 20.5C12.3156 20.5 11.4691 20.4993 10.8163 20.4257C10.1735 20.3532 9.78051 20.2154 9.4781 19.9834C9.30477 19.8504 9.14962 19.6952 9.01662 19.5219C8.78457 19.2195 8.64681 18.8265 8.57435 18.1837C8.50074 17.5309 8.5 16.6844 8.5 15.5V11.5Z" stroke="#222222"/>
|
<path d="M8.5 11.5C8.5 10.3156 8.50074 9.46912 8.57435 8.81625C8.64681 8.17346 8.78457 7.78051 9.01662 7.4781C9.14962 7.30477 9.30477 7.14962 9.4781 7.01662C9.78051 6.78457 10.1735 6.64681 10.8163 6.57435C11.4691 6.50074 12.3156 6.5 13.5 6.5C14.6844 6.5 15.5309 6.50074 16.1837 6.57435C16.8265 6.64681 17.2195 6.78457 17.5219 7.01662C17.6952 7.14962 17.8504 7.30477 17.9834 7.4781C18.2154 7.78051 18.3532 8.17346 18.4257 8.81625C18.4993 9.46912 18.5 10.3156 18.5 11.5V15.5C18.5 16.6844 18.4993 17.5309 18.4257 18.1837C18.3532 18.8265 18.2154 19.2195 17.9834 19.5219C17.8504 19.6952 17.6952 19.8504 17.5219 19.9834C17.2195 20.2154 16.8265 20.3532 16.1837 20.4257C15.5309 20.4993 14.6844 20.5 13.5 20.5C12.3156 20.5 11.4691 20.4993 10.8163 20.4257C10.1735 20.3532 9.78051 20.2154 9.4781 19.9834C9.30477 19.8504 9.14962 19.6952 9.01662 19.5219C8.78457 19.2195 8.64681 18.8265 8.57435 18.1837C8.50074 17.5309 8.5 16.6844 8.5 15.5V11.5Z" stroke="#222222"/>
|
||||||
</svg>`}]};static getMobileWritableItems=function(n){return[{type:"custom",id:"button-finish",className:"button-finish",onPress(){n("FINISH")},icon:`<svg class="icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="-4 -4 26 26">
|
</svg>`}]};static getMobileWritableItems=function(n){return[{type:"custom",id:"button-finish",className:"button-finish",onPress(){n("FINISH")},icon:`<svg class="icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="-4 -4 26 26">
|
||||||
|
|||||||
@@ -1,142 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
module.exports = function(grunt) {
|
|
||||||
|
|
||||||
grunt.loadNpmTasks('grunt-contrib-clean');
|
|
||||||
grunt.loadNpmTasks('grunt-contrib-jshint');
|
|
||||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
|
||||||
grunt.loadNpmTasks('grunt-contrib-concat');
|
|
||||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
|
||||||
grunt.loadNpmTasks('grunt-markdown');
|
|
||||||
|
|
||||||
grunt.initConfig({
|
|
||||||
pkg: grunt.file.readJSON('package.json'),
|
|
||||||
meta: {
|
|
||||||
banner:
|
|
||||||
'/* \n'+
|
|
||||||
' * Leaflet Location Picker v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %> \n'+
|
|
||||||
' * \n'+
|
|
||||||
' * Copyright <%= grunt.template.today("yyyy") %> <%= pkg.author.name %> \n'+
|
|
||||||
' * <%= pkg.author.email %> \n'+
|
|
||||||
' * <%= pkg.author.url %> \n'+
|
|
||||||
' * \n'+
|
|
||||||
' * Licensed under the <%= pkg.license %> license. \n'+
|
|
||||||
' * \n'+
|
|
||||||
' * Demo: \n'+
|
|
||||||
' * <%= pkg.homepage %> \n'+
|
|
||||||
' * \n'+
|
|
||||||
' * Source: \n'+
|
|
||||||
' * <%= pkg.repository.url %> \n'+
|
|
||||||
' * \n'+
|
|
||||||
' */\n',
|
|
||||||
features: [
|
|
||||||
"Custom location format, lat,lon separator and precision",
|
|
||||||
"Pick Location Latidute,Longitude clicking on map",
|
|
||||||
"Bind multiple events or single picker callback",
|
|
||||||
"Load picker map from preselected location",
|
|
||||||
"Bind callback on location picked",
|
|
||||||
"Enable disable location marker",
|
|
||||||
"Custom map baselayer"
|
|
||||||
],
|
|
||||||
sources: [
|
|
||||||
{name: "Github.com", url: 'https://github.com/stefanocudini/<%= pkg.name %>' },
|
|
||||||
{name: "Node Packaged Module", url: 'https://npmjs.org/package/<%= pkg.name %>' },
|
|
||||||
//{name: "Bitbuket", url: 'https://bitbucket.org/zakis_/<%= pkg.name %>' },
|
|
||||||
//{name: "Atmosphere", url: 'http://atmospherejs.com/package/<%= pkg.name %>' }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
clean: {
|
|
||||||
homepage: {
|
|
||||||
src: ['index.html']
|
|
||||||
},
|
|
||||||
dist: {
|
|
||||||
src: ['dist/*']
|
|
||||||
}
|
|
||||||
},
|
|
||||||
jshint: {
|
|
||||||
options: {
|
|
||||||
globals: {
|
|
||||||
console: true,
|
|
||||||
module: true
|
|
||||||
},
|
|
||||||
"-W099": true, //ignora tabs e space warning
|
|
||||||
"-W033": true,
|
|
||||||
"-W044": true //ignore regexp
|
|
||||||
},
|
|
||||||
files: "src/<%= pkg.name %>.js"
|
|
||||||
},
|
|
||||||
concat: {
|
|
||||||
//TODO cut out SearchMarker
|
|
||||||
options: {
|
|
||||||
banner: '<%= meta.banner %>'
|
|
||||||
},
|
|
||||||
dist: {
|
|
||||||
files: {
|
|
||||||
'dist/<%= pkg.name %>.src.js': ['src/<%= pkg.name %>.js'],
|
|
||||||
'dist/<%= pkg.name %>.src.css': ['src/<%= pkg.name %>.css']
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
uglify: {
|
|
||||||
options: {
|
|
||||||
banner: '<%= meta.banner %>'
|
|
||||||
},
|
|
||||||
dist: {
|
|
||||||
files: {
|
|
||||||
'dist/<%= pkg.name %>.min.js': ['dist/<%= pkg.name %>.src.js']
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
markdown: {
|
|
||||||
readme: {
|
|
||||||
files: {
|
|
||||||
'index.html': ['README.md']
|
|
||||||
},
|
|
||||||
options: {
|
|
||||||
template: 'index.tmpl',
|
|
||||||
templateContext: function() {
|
|
||||||
var cfg = grunt.config();
|
|
||||||
|
|
||||||
cfg.title = cfg.pkg.name.replace(/-/g,' ');
|
|
||||||
|
|
||||||
cfg.ribbonurl = 'http://ghbtns.com/github-btn.html?user=stefanocudini&repo='+cfg.pkg.name+'&type=watch&count=true';
|
|
||||||
|
|
||||||
cfg.examples = grunt.file.expand('examples/*.html');
|
|
||||||
|
|
||||||
cfg.features = cfg.meta.features;
|
|
||||||
cfg.sources = cfg.meta.sources;
|
|
||||||
cfg.giturl = cfg.meta.sources[0].url;
|
|
||||||
|
|
||||||
cfg.image = grunt.file.expand('images/'+cfg.pkg.name+'.png');
|
|
||||||
|
|
||||||
return cfg;
|
|
||||||
},
|
|
||||||
markdownOptions: {
|
|
||||||
gfm: true,
|
|
||||||
highlight: 'manual',
|
|
||||||
codeLines: {
|
|
||||||
before: '<div>',
|
|
||||||
after: '</div>'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
dist: {
|
|
||||||
options: { livereload: true },
|
|
||||||
files: ['src/*'],
|
|
||||||
tasks: ['clean','concat','jshint']
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
grunt.registerTask('default', [
|
|
||||||
'clean',
|
|
||||||
'concat',
|
|
||||||
'jshint',
|
|
||||||
'uglify',
|
|
||||||
'markdown'
|
|
||||||
]);
|
|
||||||
|
|
||||||
};
|
|
||||||
@@ -1,68 +0,0 @@
|
|||||||
Leaflet Location Picker
|
|
||||||
============
|
|
||||||
|
|
||||||
[](http://badge.fury.io/js/leaflet-locationpicker)
|
|
||||||
|
|
||||||
Simple location picker with Leaflet map
|
|
||||||
|
|
||||||
# Usage:
|
|
||||||
|
|
||||||
```html
|
|
||||||
|
|
||||||
<label>Insert a Geo Location
|
|
||||||
<input id="geoloc" type="text" value="" />
|
|
||||||
</label>
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
|
|
||||||
$('#geoloc').leafletLocationPicker();
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
# Examples:
|
|
||||||
|
|
||||||
* [Simple](examples/simple.html)
|
|
||||||
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
# Options
|
|
||||||
| Option | Default | Description |
|
|
||||||
| --------------- | ---------------- | ----------------------------------------- |
|
|
||||||
|className | baseClassName |css classname applied to widget |
|
|
||||||
|location | optsMap.center | initial map center |
|
|
||||||
|locationFormat | '{lat}{sep}{lng}'| returne format of location value |
|
|
||||||
|locationMarker | true | render manker on map |
|
|
||||||
|locationDigits | 6 | coordinates precision |
|
|
||||||
|locationSep | ',' | coordinates separator|
|
|
||||||
|position | 'topright' | position relative to input|
|
|
||||||
|layer | 'OSM' | base layer on map|
|
|
||||||
|height | 140 | height of map |
|
|
||||||
|width | 200 | with f map|
|
|
||||||
|event | 'click' | event to fire location pick|
|
|
||||||
|cursorSize | '30px' | size of cross cursor |
|
|
||||||
|map | optsMap | custom [leflet map options](https://leafletjs.com/reference-1.6.0.html#map-option) |
|
|
||||||
|onChangeLocation | $.noop | callback retuned location after pick from map|
|
|
||||||
|alwaysOpen | false | always open Maps (without close button) |
|
|
||||||
|mapContainer | "" ||
|
|
||||||
|
|
||||||
# Install
|
|
||||||
```
|
|
||||||
npm install --save leaflet-locationpicker
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
# Build
|
|
||||||
|
|
||||||
Therefore the deployment require **npm** installed in your system.
|
|
||||||
```bash
|
|
||||||
npm install
|
|
||||||
grunt
|
|
||||||
```
|
|
||||||
|
|
||||||
# Source
|
|
||||||
|
|
||||||
* [Github](https://github.com/stefanocudini/leaflet-locationpicker)
|
|
||||||
* [NPM](https://npmjs.org/package/leaflet-locationpicker)
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
/*
|
|
||||||
* Leaflet Location Picker v0.3.4 - 2022-11-18
|
|
||||||
*
|
|
||||||
* Copyright 2022 Stefano Cudini
|
|
||||||
* stefano.cudini@gmail.com
|
|
||||||
* https://opengeo.tech/
|
|
||||||
*
|
|
||||||
* Licensed under the MIT license.
|
|
||||||
*
|
|
||||||
* Demo:
|
|
||||||
* https://opengeo.tech/maps/leaflet-locationpicker/
|
|
||||||
*
|
|
||||||
* Source:
|
|
||||||
* git@github.com:stefanocudini/leaflet-locationpicker.git
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
!function(a){if("function"==typeof define&&define.amd)define(["jquery","leaflet"],a);else if("undefined"!=typeof module)module.exports=a(require("jquery","leaflet"));else{if(void 0===window.jQuery)throw"jQuery must be loaded first";if(void 0===window.L)throw"Leaflet must be loaded first";a(window.jQuery,window.L)}}(function(a,b){var c=a;c.fn.leafletLocationPicker=function(a,d){function e(c){return c?b.latLng(parseFloat(c.lat).toFixed(a.locationDigits),parseFloat(c.lng).toFixed(a.locationDigits)):c}function f(d){var f=d;switch(c.type(d)){case"string":var g=d.split(a.locationSep);f=g[0]&&g[1]?b.latLng(g):null;break;case"array":f=b.latLng(d);break;case"object":var h,i;d.hasOwnProperty("lat")?h=d.lat:d.hasOwnProperty("latitude")&&(h=d.latitude),d.hasOwnProperty("lng")?i=d.lng:d.hasOwnProperty("lon")?i=d.lon:d.hasOwnProperty("longitude")&&(i=d.longitude),f=b.latLng(parseFloat(h),parseFloat(i));break;default:f=d}return e(f)}function g(d){if(d.divMap=document.createElement("div"),d.$map=c(document.createElement("div")).addClass(a.className+"-map").height(a.height).width(a.width).append(d.divMap),a.readOnly&&d.$map.addClass("read-only"),a.mapContainer&&c(a.mapContainer)?d.$map.appendTo(a.mapContainer).addClass("map-select"):d.$map.appendTo("body"),d.location&&(a.map.center=d.location),"string"==typeof a.layer&&k[a.layer]?a.map.layers=b.tileLayer(k[a.layer]):a.layer instanceof b.TileLayer||a.layer instanceof b.GridLayer||a.layer instanceof b.LayerGroup?a.map.layers=a.layer:a.map.layers=b.tileLayer(k.OSM),d.map=b.map(d.divMap,a.map).addControl(b.control.zoom({position:"bottomright"})).on(a.event,function(b){a.readOnly||d.setLocation(b.latlng)}),a.activeOnMove&&d.map.on("move",function(a){d.setLocation(a.target.getCenter())}),!0!==a.alwaysOpen){var e=b.control({position:"topright"});e.onAdd=function(c){var e=b.DomUtil.create("div","leaflet-bar"),f=b.DomUtil.create("a","leaflet-control "+a.className+"-close");return f.innerHTML="×",e.appendChild(f),b.DomEvent.on(f,"click",b.DomEvent.stop,d).on(f,"click",d.closeMap,d),e},e.addTo(d.map)}return a.locationMarker&&(d.marker=h(d.location).addTo(d.map)),d.$map}function h(c){return b.marker(f(c)||b.latLng(0,0),{icon:b.divIcon({className:a.className+"-marker",iconAnchor:b.point(0,0),html:"<div"+("30px"!==a.cursorSize?'style="width: '+a.cursorSize+"; height: "+a.cursorSize+';"':"")+'><div class="corner1"></div><div class="corner2"></div><div class="corner3"></div><div class="corner4"></div></div>'})})}var i=window.location.protocol,j="leaflet-locpicker",k={OSM:i+"//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"},l={zoom:0,center:b.latLng([40,0]),zoomControl:!1,attributionControl:!1};c.isPlainObject(a)&&c.isPlainObject(a.map)&&(l=c.extend(l,a.map));var m={alwaysOpen:!1,className:j,location:l.center,locationFormat:"{lat}{sep}{lng}",locationMarker:!0,locationDigits:6,locationSep:",",position:"topright",layer:"OSM",height:140,width:200,event:"click",cursorSize:"30px",readOnly:!1,map:l,onChangeLocation:c.noop,mapContainer:""};return a=c.isPlainObject(a)?c.extend(m,a):c.isFunction(a)?c.extend(m,{onChangeLocation:a}):m,c.isFunction(d)&&(a=c.extend(m,{onChangeLocation:d})),c(this).each(function(d,e){var h=this;h.$input=c(this),h.options=a,h.setReadOnly=function(b){a.readOnly=b,h.$map.toggleClass("read-only",b)},h.locationOri=h.$input.val(),h.onChangeLocation=function(){var b={latlng:h.location,location:h.getLocation()};h.$input.trigger(c.extend(b,{type:"changeLocation"})),a.onChangeLocation.call(h,b)},h.setLocation=function(a,b){a=a||m.location,h.location=f(a),h.marker&&h.marker.setLatLng(a),b||(h.$input.data("location",h.location),h.$input.val(h.getLocation()),h.onChangeLocation())},h.getLocation=function(){return h.location?b.Util.template(a.locationFormat,{lat:h.location.lat,lng:h.location.lng,sep:a.locationSep}):h.location},h.updatePosition=function(){switch(a.position){case"bottomleft":h.$map.css({top:h.$input.offset().top+h.$input.height()+6,left:h.$input.offset().left});break;case"topright":h.$map.css({top:h.$input.offset().top,left:h.$input.offset().left+h.$input.width()+5})}},h.openMap=function(){h.updatePosition(),h.$map.show(),h.map.invalidateSize(),h.$input.trigger("show")},h.closeMap=function(){h.$map.hide(),h.$input.trigger("hide")},h.setLocation(h.locationOri,!0),h.$map=g(h),h.$input.addClass(a.className).on("focus."+a.className,function(a){a.preventDefault(),h.openMap()}).on("blur."+a.className,function(a){a.preventDefault();for(var b=a.relatedTarget,c=!0;b;){if(b._leaflet){c=!1;break}b=b.parentElement}c&&setTimeout(function(){h.closeMap()},100)}),c(window).on("resize",function(){h.$map.is(":visible")&&h.updatePosition()}),a.alwaysOpen&&!0===a.alwaysOpen&&h.openMap()}),this}});
|
|
||||||
@@ -1,128 +0,0 @@
|
|||||||
/*
|
|
||||||
* Leaflet Location Picker v0.3.4 - 2022-11-18
|
|
||||||
*
|
|
||||||
* Copyright 2022 Stefano Cudini
|
|
||||||
* stefano.cudini@gmail.com
|
|
||||||
* https://opengeo.tech/
|
|
||||||
*
|
|
||||||
* Licensed under the MIT license.
|
|
||||||
*
|
|
||||||
* Demo:
|
|
||||||
* https://opengeo.tech/maps/leaflet-locationpicker/
|
|
||||||
*
|
|
||||||
* Source:
|
|
||||||
* git@github.com:stefanocudini/leaflet-locationpicker.git
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
.leaflet-locpicker-active {
|
|
||||||
box-shadow: 0 0 5px rgba(0,0,0,0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-locpicker-map {
|
|
||||||
display: none;
|
|
||||||
position: absolute;
|
|
||||||
background: rgba(255,255,255,1);
|
|
||||||
box-shadow: 4px 4px 8px rgba(0,0,0,0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-locpicker-map:not(.read-only) .leaflet-container,
|
|
||||||
.leaflet-locpicker-map:not(.read-only) .leaflet-locpicker-marker {
|
|
||||||
cursor: crosshair;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-locpicker-map.read-only .leaflet-locpicker-marker {
|
|
||||||
cursor: grab;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-locpicker-close {
|
|
||||||
cursor: pointer;
|
|
||||||
width: 30px;
|
|
||||||
height: 30px;
|
|
||||||
line-height: 30px;
|
|
||||||
font: 700 22px 'Lucida Console', Monaco, monospace;
|
|
||||||
text-indent: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-locpicker-map .leaflet-container {
|
|
||||||
position: absolute;
|
|
||||||
top: 5px;
|
|
||||||
right: 5px;
|
|
||||||
bottom: 5px;
|
|
||||||
left: 5px;
|
|
||||||
border: 1px solid rgba(100,100,100,0.2)
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-locpicker-map .leaflet-control {
|
|
||||||
box-shadow: none;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-locpicker-map .leaflet-bar {
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-locpicker-map .leaflet-bar a:first-child {
|
|
||||||
border-top-left-radius: 0;
|
|
||||||
border-top-right-radius: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-locpicker-map .leaflet-bar a:last-child {
|
|
||||||
border-bottom-left-radius: 0;
|
|
||||||
border-bottom-right-radius: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.map-select {
|
|
||||||
display: block !important;
|
|
||||||
position: relative;
|
|
||||||
left: 0 !important;
|
|
||||||
top: 0 !important;
|
|
||||||
width: 100% !important;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* MARKER */
|
|
||||||
.leaflet-locpicker-map .leaflet-locpicker-marker > div {
|
|
||||||
position: relative;
|
|
||||||
top: -1px;
|
|
||||||
left: -1px;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
width: 30px; /* defaults */
|
|
||||||
height: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-locpicker-map .leaflet-locpicker-marker > div > div {
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
position: absolute;
|
|
||||||
outline: 1px solid #fff;
|
|
||||||
box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-locpicker-map .leaflet-locpicker-marker > div > .corner1 {
|
|
||||||
width: 50%;
|
|
||||||
height: 0;
|
|
||||||
left: -70%;
|
|
||||||
border-top: 2px solid black;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-locpicker-map .leaflet-locpicker-marker > div > .corner2 {
|
|
||||||
width: 50%;
|
|
||||||
height: 0;
|
|
||||||
left: 30%;
|
|
||||||
border-top: 2px solid black;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-locpicker-map .leaflet-locpicker-marker > div > .corner3 {
|
|
||||||
width: 0;
|
|
||||||
height: 50%;
|
|
||||||
top: 30%;
|
|
||||||
border-left: 2px solid black;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-locpicker-map .leaflet-locpicker-marker > div > .corner4 {
|
|
||||||
width: 0;
|
|
||||||
height: 50%;
|
|
||||||
top: -70%;
|
|
||||||
border-left: 2px solid black;
|
|
||||||
}
|
|
||||||
@@ -1,339 +0,0 @@
|
|||||||
/*
|
|
||||||
* Leaflet Location Picker v0.3.4 - 2022-11-18
|
|
||||||
*
|
|
||||||
* Copyright 2022 Stefano Cudini
|
|
||||||
* stefano.cudini@gmail.com
|
|
||||||
* https://opengeo.tech/
|
|
||||||
*
|
|
||||||
* Licensed under the MIT license.
|
|
||||||
*
|
|
||||||
* Demo:
|
|
||||||
* https://opengeo.tech/maps/leaflet-locationpicker/
|
|
||||||
*
|
|
||||||
* Source:
|
|
||||||
* git@github.com:stefanocudini/leaflet-locationpicker.git
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
(function (factory) {
|
|
||||||
if(typeof define === 'function' && define.amd) {
|
|
||||||
//AMD
|
|
||||||
define(['jquery','leaflet'], factory);
|
|
||||||
} else if(typeof module !== 'undefined') {
|
|
||||||
// Node/CommonJS
|
|
||||||
module.exports = factory(require('jquery','leaflet'));
|
|
||||||
} else {
|
|
||||||
// Browser globals
|
|
||||||
if(typeof window.jQuery === 'undefined')
|
|
||||||
throw 'jQuery must be loaded first';
|
|
||||||
if(typeof window.L === 'undefined')
|
|
||||||
throw 'Leaflet must be loaded first';
|
|
||||||
factory(window.jQuery, window.L);
|
|
||||||
}
|
|
||||||
})(function(jQuery, L) {
|
|
||||||
|
|
||||||
var $ = jQuery;
|
|
||||||
|
|
||||||
$.fn.leafletLocationPicker = function(opts, onChangeLocation) {
|
|
||||||
|
|
||||||
var http = window.location.protocol;
|
|
||||||
|
|
||||||
var baseClassName = 'leaflet-locpicker',
|
|
||||||
baseLayers = {
|
|
||||||
'OSM': http + '//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
|
||||||
// 'SAT': http + '//otile1.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.png' // AK 2021-04-22: invalid URL!!
|
|
||||||
//TODO add more free base layers
|
|
||||||
};
|
|
||||||
|
|
||||||
var optsMap = {
|
|
||||||
zoom: 0,
|
|
||||||
center: L.latLng([40,0]),
|
|
||||||
zoomControl: false,
|
|
||||||
attributionControl: false
|
|
||||||
};
|
|
||||||
|
|
||||||
if($.isPlainObject(opts) && $.isPlainObject(opts.map))
|
|
||||||
optsMap = $.extend(optsMap, opts.map);
|
|
||||||
|
|
||||||
var defaults = {
|
|
||||||
alwaysOpen: false,
|
|
||||||
className: baseClassName,
|
|
||||||
location: optsMap.center,
|
|
||||||
locationFormat: '{lat}{sep}{lng}',
|
|
||||||
locationMarker: true,
|
|
||||||
locationDigits: 6,
|
|
||||||
locationSep: ',',
|
|
||||||
position: 'topright',
|
|
||||||
layer: 'OSM',
|
|
||||||
height: 140,
|
|
||||||
width: 200,
|
|
||||||
event: 'click',
|
|
||||||
cursorSize: '30px',
|
|
||||||
readOnly: false,
|
|
||||||
map: optsMap,
|
|
||||||
onChangeLocation: $.noop,
|
|
||||||
mapContainer: ""
|
|
||||||
};
|
|
||||||
|
|
||||||
if($.isPlainObject(opts))
|
|
||||||
opts = $.extend(defaults, opts);
|
|
||||||
|
|
||||||
else if($.isFunction(opts))
|
|
||||||
opts = $.extend(defaults, {
|
|
||||||
onChangeLocation: opts
|
|
||||||
});
|
|
||||||
else
|
|
||||||
opts = defaults;
|
|
||||||
|
|
||||||
if($.isFunction(onChangeLocation))
|
|
||||||
opts = $.extend(defaults, {
|
|
||||||
onChangeLocation: onChangeLocation
|
|
||||||
});
|
|
||||||
|
|
||||||
function roundLocation(loc) {
|
|
||||||
return loc ? L.latLng(
|
|
||||||
parseFloat(loc.lat).toFixed(opts.locationDigits),
|
|
||||||
parseFloat(loc.lng).toFixed(opts.locationDigits)
|
|
||||||
) : loc;
|
|
||||||
}
|
|
||||||
|
|
||||||
function parseLocation(loc) {
|
|
||||||
var retLoc = loc;
|
|
||||||
|
|
||||||
switch($.type(loc)) {
|
|
||||||
case 'string':
|
|
||||||
var ll = loc.split(opts.locationSep);
|
|
||||||
if(ll[0] && ll[1])
|
|
||||||
retLoc = L.latLng(ll);
|
|
||||||
else
|
|
||||||
retLoc = null;
|
|
||||||
break;
|
|
||||||
case 'array':
|
|
||||||
retLoc = L.latLng(loc);
|
|
||||||
break;
|
|
||||||
case 'object':
|
|
||||||
var lat, lng;
|
|
||||||
if(loc.hasOwnProperty('lat'))
|
|
||||||
lat = loc.lat;
|
|
||||||
else if(loc.hasOwnProperty('latitude'))
|
|
||||||
lat = loc.latitude;
|
|
||||||
|
|
||||||
if(loc.hasOwnProperty('lng'))
|
|
||||||
lng = loc.lng;
|
|
||||||
else if(loc.hasOwnProperty('lon'))
|
|
||||||
lng = loc.lon;
|
|
||||||
else if(loc.hasOwnProperty('longitude'))
|
|
||||||
lng = loc.longitude;
|
|
||||||
|
|
||||||
retLoc = L.latLng(parseFloat(lat),parseFloat(lng));
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
retLoc = loc;
|
|
||||||
}
|
|
||||||
return roundLocation( retLoc );
|
|
||||||
}
|
|
||||||
|
|
||||||
function buildMap(self) {
|
|
||||||
|
|
||||||
self.divMap = document.createElement('div');
|
|
||||||
self.$map = $(document.createElement('div'))
|
|
||||||
.addClass(opts.className + '-map')
|
|
||||||
.height(opts.height)
|
|
||||||
.width(opts.width)
|
|
||||||
.append(self.divMap);
|
|
||||||
|
|
||||||
if (opts.readOnly)
|
|
||||||
self.$map.addClass("read-only");
|
|
||||||
|
|
||||||
//adds either as global div or specified container
|
|
||||||
//if added to specified container add some style class
|
|
||||||
if(opts.mapContainer && $(opts.mapContainer))
|
|
||||||
self.$map.appendTo(opts.mapContainer)
|
|
||||||
.addClass('map-select');
|
|
||||||
else
|
|
||||||
self.$map.appendTo('body');
|
|
||||||
|
|
||||||
if(self.location)
|
|
||||||
opts.map.center = self.location;
|
|
||||||
|
|
||||||
if(typeof opts.layer === 'string' && baseLayers[opts.layer]) {
|
|
||||||
opts.map.layers = L.tileLayer(baseLayers[opts.layer]);
|
|
||||||
|
|
||||||
}else if (opts.layer instanceof L.TileLayer ||
|
|
||||||
opts.layer instanceof L.GridLayer ||
|
|
||||||
opts.layer instanceof L.LayerGroup) {
|
|
||||||
opts.map.layers = opts.layer;
|
|
||||||
|
|
||||||
}else {
|
|
||||||
opts.map.layers = L.tileLayer(baseLayers.OSM);
|
|
||||||
}
|
|
||||||
|
|
||||||
//leaflet map
|
|
||||||
self.map = L.map(self.divMap, opts.map)
|
|
||||||
.addControl( L.control.zoom({position: 'bottomright'}) )
|
|
||||||
.on(opts.event, function(e) {
|
|
||||||
if (!opts.readOnly)
|
|
||||||
self.setLocation(e.latlng);
|
|
||||||
});
|
|
||||||
|
|
||||||
if(opts.activeOnMove) {
|
|
||||||
self.map.on('move', function(e) {
|
|
||||||
self.setLocation(e.target.getCenter());
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
//only adds closeBtn if not alwaysOpen
|
|
||||||
if(opts.alwaysOpen!==true){
|
|
||||||
var xmap = L.control({position: 'topright'});
|
|
||||||
xmap.onAdd = function(map) {
|
|
||||||
var btn_holder = L.DomUtil.create('div', 'leaflet-bar');
|
|
||||||
var btn = L.DomUtil.create('a','leaflet-control '+opts.className+'-close');
|
|
||||||
btn.innerHTML = '×';
|
|
||||||
btn_holder.appendChild(btn);
|
|
||||||
L.DomEvent
|
|
||||||
.on(btn, 'click', L.DomEvent.stop, self)
|
|
||||||
.on(btn, 'click', self.closeMap, self);
|
|
||||||
return btn_holder;
|
|
||||||
};
|
|
||||||
xmap.addTo(self.map);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(opts.locationMarker)
|
|
||||||
self.marker = buildMarker(self.location).addTo(self.map);
|
|
||||||
|
|
||||||
return self.$map;
|
|
||||||
}
|
|
||||||
|
|
||||||
function buildMarker(loc) {
|
|
||||||
return L.marker(parseLocation(loc) || L.latLng(0,0), {
|
|
||||||
icon: L.divIcon({
|
|
||||||
className: opts.className+'-marker',
|
|
||||||
iconAnchor: L.point(0, 0),
|
|
||||||
|
|
||||||
// TODO: get rid of inline CSS completely, in order to make it compliant with Content-Security-Policy that doesn't wallows 'unsafe-inline' CSS.
|
|
||||||
// AK: These additional styles can be set up with JavaScript, after creation of the marker icon element.
|
|
||||||
html: '<div' + ("30px" !== opts.cursorSize ? 'style="width: ' + opts.cursorSize + '; height: ' + opts.cursorSize + ';"' : '') + '>'+
|
|
||||||
'<div class="corner1"></div>'+
|
|
||||||
'<div class="corner2"></div>'+
|
|
||||||
'<div class="corner3"></div>'+
|
|
||||||
'<div class="corner4"></div>'+
|
|
||||||
'</div>'
|
|
||||||
})
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
$(this).each(function(index, input) {
|
|
||||||
var self = this;
|
|
||||||
|
|
||||||
self.$input = $(this);
|
|
||||||
|
|
||||||
self.options = opts; // access to options
|
|
||||||
self.setReadOnly = function(newReadOnly) {
|
|
||||||
opts.readOnly = newReadOnly;
|
|
||||||
self.$map.toggleClass("read-only", newReadOnly);
|
|
||||||
};
|
|
||||||
|
|
||||||
self.locationOri = self.$input.val();
|
|
||||||
|
|
||||||
self.onChangeLocation = function() {
|
|
||||||
var edata = {
|
|
||||||
latlng: self.location,
|
|
||||||
location: self.getLocation()
|
|
||||||
};
|
|
||||||
self.$input.trigger($.extend(edata, {
|
|
||||||
type: 'changeLocation'
|
|
||||||
}));
|
|
||||||
opts.onChangeLocation.call(self, edata);
|
|
||||||
};
|
|
||||||
|
|
||||||
self.setLocation = function(loc, noSet) {
|
|
||||||
loc = loc || defaults.location;
|
|
||||||
self.location = parseLocation(loc);
|
|
||||||
|
|
||||||
if(self.marker)
|
|
||||||
self.marker.setLatLng(loc);
|
|
||||||
|
|
||||||
if(!noSet) {
|
|
||||||
self.$input.data('location', self.location);
|
|
||||||
self.$input.val( self.getLocation() );
|
|
||||||
self.onChangeLocation();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
self.getLocation = function() {
|
|
||||||
return self.location ? L.Util.template(opts.locationFormat, {
|
|
||||||
lat: self.location.lat,
|
|
||||||
lng: self.location.lng,
|
|
||||||
sep: opts.locationSep
|
|
||||||
}) : self.location;
|
|
||||||
};
|
|
||||||
|
|
||||||
self.updatePosition = function() {
|
|
||||||
switch(opts.position) {
|
|
||||||
case 'bottomleft':
|
|
||||||
self.$map.css({
|
|
||||||
top: self.$input.offset().top + self.$input.height() + 6,
|
|
||||||
left: self.$input.offset().left
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
case 'topright':
|
|
||||||
self.$map.css({
|
|
||||||
top: self.$input.offset().top,
|
|
||||||
left: self.$input.offset().left + self.$input.width() + 5
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
self.openMap = function() {
|
|
||||||
self.updatePosition();
|
|
||||||
self.$map.show();
|
|
||||||
self.map.invalidateSize();
|
|
||||||
self.$input.trigger('show');
|
|
||||||
};
|
|
||||||
|
|
||||||
self.closeMap = function() {
|
|
||||||
self.$map.hide();
|
|
||||||
self.$input.trigger('hide');
|
|
||||||
};
|
|
||||||
|
|
||||||
self.setLocation(self.locationOri, true);
|
|
||||||
|
|
||||||
self.$map = buildMap(self);
|
|
||||||
|
|
||||||
self.$input
|
|
||||||
.addClass(opts.className)
|
|
||||||
.on('focus.'+opts.className, function(e) {
|
|
||||||
e.preventDefault();
|
|
||||||
self.openMap();
|
|
||||||
})
|
|
||||||
.on('blur.'+opts.className, function(e) {
|
|
||||||
e.preventDefault();
|
|
||||||
var p = e.relatedTarget;
|
|
||||||
var close = true;
|
|
||||||
while (p) {
|
|
||||||
if (p._leaflet) {
|
|
||||||
close = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
p = p.parentElement;
|
|
||||||
}
|
|
||||||
if(close) {
|
|
||||||
setTimeout(function() {
|
|
||||||
self.closeMap();
|
|
||||||
}, 100);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$(window).on('resize', function() {
|
|
||||||
if (self.$map.is(':visible'))
|
|
||||||
self.updatePosition();
|
|
||||||
});
|
|
||||||
//opens map initially if alwaysOpen
|
|
||||||
if(opts.alwaysOpen && opts.alwaysOpen===true) self.openMap();
|
|
||||||
});
|
|
||||||
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
|
|
||||||
});
|
|
||||||
@@ -1,148 +0,0 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="https://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<title>Leaflet Location Picker Demo</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="//unpkg.com/leaflet@1.1.0/dist/leaflet.css" />
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="../dist/leaflet-locationpicker.src.css" />
|
|
||||||
<link rel="stylesheet" href="style.css" />
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<h3><a href="../index.html"><big>◄</big> Leaflet Location Picker</a></h3>
|
|
||||||
|
|
||||||
<h4>Simple Example: <em></em></h4>
|
|
||||||
|
|
||||||
<form id="insert">
|
|
||||||
<label>Insert new geographic location:</label><br />
|
|
||||||
<input class="geolocs" type="text" value="" size="20" />
|
|
||||||
<pre>
|
|
||||||
$('.geolocs').leafletLocationPicker();
|
|
||||||
</pre>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<form id="default">
|
|
||||||
Change default geographic location: <br />
|
|
||||||
<input class="geolocs" type="text" value="17.9787,81.0352" size="20" />
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<form id="format">
|
|
||||||
Custom location format: <br />
|
|
||||||
<input id="geoloc2" type="text" value="" size="20" /> <br />
|
|
||||||
<pre>
|
|
||||||
$('#geoloc2').leafletLocationPicker({
|
|
||||||
locationFormat: '{lat}@{lng}#WGS84',
|
|
||||||
position: 'bottomleft'
|
|
||||||
});
|
|
||||||
</pre>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<form id="callback">
|
|
||||||
Custom callback: <br />
|
|
||||||
<input id="geoloc4" type="text" value="" size="20" />
|
|
||||||
<br /><br />
|
|
||||||
<i>Value from callback:</i><br />
|
|
||||||
<em style="color:blue"></em><br />
|
|
||||||
<pre>
|
|
||||||
$('#geoloc4').leafletLocationPicker(function(e) {
|
|
||||||
$(this).siblings('em').text(e.location);
|
|
||||||
});
|
|
||||||
</pre>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<form id="events">
|
|
||||||
Events: <em style="color:red"></em><br />
|
|
||||||
<input id="geoloc3" type="text" value="" size="20" />
|
|
||||||
<br />
|
|
||||||
<br /><input id="geolat" type="text" value="" size="20" />
|
|
||||||
<br /><input id="geolng" type="text" value="" size="20" />
|
|
||||||
<br /><i>string location</i><br />
|
|
||||||
<pre>
|
|
||||||
$('#geoloc3').leafletLocationPicker({
|
|
||||||
locationSep: ' - '
|
|
||||||
})
|
|
||||||
.on('show', function(e) {
|
|
||||||
$(this).siblings('em').text('click on map for insert the location');
|
|
||||||
})
|
|
||||||
.on('hide', function(e) {
|
|
||||||
$(this).siblings('em').text('');
|
|
||||||
})
|
|
||||||
.on('changeLocation', function(e) {
|
|
||||||
$(this)
|
|
||||||
.siblings('#geolat').val( e.latlng.lat )
|
|
||||||
.siblings('#geolng').val( e.latlng.lng )
|
|
||||||
.siblings('i').text('"'+e.location+'"');
|
|
||||||
});
|
|
||||||
</pre>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<script src="//unpkg.com/leaflet@1.1.0/dist/leaflet.js"></script>
|
|
||||||
<script src="//code.jquery.com/jquery-2.1.0.min.js"></script>
|
|
||||||
|
|
||||||
<form id="fixedContAlwaysOpen">
|
|
||||||
Fixed container and always open map: <br />
|
|
||||||
<div style="min-height: 140;min-width: 200;">
|
|
||||||
<input id="geoloc5" type="text" value="" size="20" />
|
|
||||||
<div id="fixedMapCont" style="border: 1px solid black; min-height: 140;min-width: 200;"></div>
|
|
||||||
</div>
|
|
||||||
<pre>
|
|
||||||
$('#geoloc5').leafletLocationPicker({
|
|
||||||
alwaysOpen: true,
|
|
||||||
mapContainer: "#fixedMapCont"
|
|
||||||
});
|
|
||||||
</pre>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
|
|
||||||
<script src="../../leaflet/dist/leaflet.js"></script>
|
|
||||||
<script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
|
|
||||||
<script src="../dist/leaflet-locationpicker.min.js"></script>
|
|
||||||
<script>
|
|
||||||
|
|
||||||
//multiple istances
|
|
||||||
$('.geolocs').leafletLocationPicker();
|
|
||||||
|
|
||||||
//custom location format
|
|
||||||
$('#geoloc2').leafletLocationPicker({
|
|
||||||
locationFormat: '{lat}@{lng}#WGS84',
|
|
||||||
position: 'bottomleft'
|
|
||||||
});
|
|
||||||
|
|
||||||
//events
|
|
||||||
$('#geoloc3').leafletLocationPicker({
|
|
||||||
locationSep: ' - '
|
|
||||||
})
|
|
||||||
.on('show', function(e) {
|
|
||||||
$(this).siblings('em').text('click on map for insert the location');
|
|
||||||
})
|
|
||||||
.on('hide', function(e) {
|
|
||||||
$(this).siblings('em').text('');
|
|
||||||
})
|
|
||||||
.on('changeLocation', function(e) {
|
|
||||||
$(this)
|
|
||||||
.siblings('#geolat').val( e.latlng.lat )
|
|
||||||
.siblings('#geolng').val( e.latlng.lng )
|
|
||||||
.siblings('i').text('"'+e.location+'"');
|
|
||||||
});
|
|
||||||
|
|
||||||
//callback
|
|
||||||
$('#geoloc4').leafletLocationPicker(function(e) {
|
|
||||||
$(this).siblings('em').text(e.location);
|
|
||||||
});
|
|
||||||
|
|
||||||
//fix n alwaysOpen
|
|
||||||
$('#geoloc5').leafletLocationPicker({
|
|
||||||
alwaysOpen: true,
|
|
||||||
mapContainer: "#fixedMapCont"
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<div id="copy"><a href="https://opengeo.tech/">Opengeo.tech</a> • <a rel="author" href="https://opengeo.tech/stefano-cudini/">Stefano Cudini</a></div>
|
|
||||||
|
|
||||||
<script src="/labs-common.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
body {
|
|
||||||
background:#b5d0d0;
|
|
||||||
color:#285585;
|
|
||||||
font-family:Arial;
|
|
||||||
}
|
|
||||||
body#home {
|
|
||||||
background:url('images/leaflet-panel.png') no-repeat top left #b5d0d0;
|
|
||||||
margin-left:200px;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
color:#1978cf;
|
|
||||||
}
|
|
||||||
a:hover {
|
|
||||||
color:#fff;
|
|
||||||
}
|
|
||||||
h2, h3, h4 {
|
|
||||||
white-space:nowrap;
|
|
||||||
margin:1em 0 0 0;
|
|
||||||
}
|
|
||||||
h3 a,
|
|
||||||
h3 a:hover {
|
|
||||||
text-decoration:none;
|
|
||||||
}
|
|
||||||
#desc {
|
|
||||||
float: left;
|
|
||||||
margin-bottom: 1em;
|
|
||||||
position: relative;
|
|
||||||
white-space:nowrap;
|
|
||||||
font-size:1em;
|
|
||||||
}
|
|
||||||
#map {
|
|
||||||
border:2px solid #1978cf;
|
|
||||||
box-shadow: 0 0 8px #999;
|
|
||||||
float:left;
|
|
||||||
width:800px;
|
|
||||||
height:400px;
|
|
||||||
}
|
|
||||||
label {
|
|
||||||
float: left;
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
pre {
|
|
||||||
font-family: "Courier New";
|
|
||||||
font-size: .85em;
|
|
||||||
color: #333;
|
|
||||||
float: left;
|
|
||||||
clear: both;
|
|
||||||
padding: 10px;
|
|
||||||
margin: 10px 0;
|
|
||||||
background-color: #fff;
|
|
||||||
box-shadow: inset 2px 2px 3px rgba(100,100,100,0.2);
|
|
||||||
border: 1px solid #ccc;
|
|
||||||
}
|
|
||||||
#copy {
|
|
||||||
position:fixed;
|
|
||||||
z-index:1000;
|
|
||||||
right:150px;
|
|
||||||
top:-8px;
|
|
||||||
font-size:.85em;
|
|
||||||
padding:8px 8px 2px 8px;
|
|
||||||
background: #323b44;
|
|
||||||
border: 2px solid #737c85;
|
|
||||||
border-radius:.7em;
|
|
||||||
opacity: 0.9;
|
|
||||||
box-shadow:0 0 8px #5f7182;
|
|
||||||
color:#eee
|
|
||||||
}
|
|
||||||
#copy a {
|
|
||||||
color:#ccc;
|
|
||||||
text-decoration:none
|
|
||||||
}
|
|
||||||
#copy a:hover {
|
|
||||||
color:#fff
|
|
||||||
}
|
|
||||||
#ribbon {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
border: 0;
|
|
||||||
filter: alpha(opacity=80);
|
|
||||||
-khtml-opacity: .8;
|
|
||||||
-moz-opacity: .8;
|
|
||||||
opacity: .8;
|
|
||||||
}
|
|
||||||
|
|
||||||
#comments {
|
|
||||||
margin-top:50px;
|
|
||||||
clear:both;
|
|
||||||
}
|
|
||||||
|
|
||||||
form {
|
|
||||||
margin: 20px;
|
|
||||||
padding: 20px;
|
|
||||||
background: #eee;
|
|
||||||
float: left;
|
|
||||||
min-height: 160px;
|
|
||||||
min-width: 400px
|
|
||||||
}
|
|
||||||
input {
|
|
||||||
margin: 5px 0;
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 19 KiB |
@@ -1,178 +0,0 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="https://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<title>leaflet locationpicker</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
||||||
<style>
|
|
||||||
body {
|
|
||||||
background:#F2F9FF;
|
|
||||||
color:#666;
|
|
||||||
font-family:Arial;
|
|
||||||
}
|
|
||||||
a {
|
|
||||||
color:#f80;
|
|
||||||
text-decoration:none;
|
|
||||||
}
|
|
||||||
a:hover {
|
|
||||||
color:#635f94;
|
|
||||||
text-decoration:underline;
|
|
||||||
}
|
|
||||||
h1, h2, h3, h4 {
|
|
||||||
text-transform: capitalize;
|
|
||||||
white-space:nowrap;
|
|
||||||
margin: 0 0 .25em 0;
|
|
||||||
}
|
|
||||||
h4 {
|
|
||||||
color: #A1A8AD;
|
|
||||||
}
|
|
||||||
#desc {
|
|
||||||
float: left;
|
|
||||||
margin-bottom: 1em;
|
|
||||||
position: relative;
|
|
||||||
white-space:nowrap;
|
|
||||||
font-size:1em;
|
|
||||||
}
|
|
||||||
.box {
|
|
||||||
float: left;
|
|
||||||
min-width: 200px;
|
|
||||||
margin-right: 20px;
|
|
||||||
background: #fff;
|
|
||||||
padding:8px;
|
|
||||||
border:2px solid #c5cdd4;
|
|
||||||
border-radius:.45em;
|
|
||||||
|
|
||||||
box-shadow: 0 0 16px rgba(100,100,100,0.2);
|
|
||||||
}
|
|
||||||
.screenshot {
|
|
||||||
margin: 20px 20px 20px 0;
|
|
||||||
float: left;
|
|
||||||
clear: both;
|
|
||||||
background: #fff;
|
|
||||||
box-shadow: 0 0 10px rgba(120,120,120,0.2);
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
ul {
|
|
||||||
font-size:.85em;
|
|
||||||
margin:0;
|
|
||||||
padding:0;
|
|
||||||
}
|
|
||||||
li {
|
|
||||||
margin:0 0 2px 18px;
|
|
||||||
}
|
|
||||||
#copy {
|
|
||||||
position:fixed;
|
|
||||||
z-index:1000;
|
|
||||||
right:150px;
|
|
||||||
top:-8px;
|
|
||||||
font-size:.85em;
|
|
||||||
padding:8px 8px 2px 8px;
|
|
||||||
background: #eee;
|
|
||||||
border: 2px solid #bbb;
|
|
||||||
border-radius:.7em;
|
|
||||||
opacity: 0.9;
|
|
||||||
box-shadow:0 0 8px #aaa;
|
|
||||||
font-weight: bold;
|
|
||||||
color:#bbb;
|
|
||||||
}
|
|
||||||
#copy a {
|
|
||||||
color:#888;
|
|
||||||
text-decoration:none
|
|
||||||
}
|
|
||||||
#copy a:hover {
|
|
||||||
color:#f80
|
|
||||||
}
|
|
||||||
#ribbon {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
border: 0;
|
|
||||||
filter: alpha(opacity=80);
|
|
||||||
-khtml-opacity: .8;
|
|
||||||
-moz-opacity: .8;
|
|
||||||
opacity: .8;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body id="home">
|
|
||||||
|
|
||||||
<h1>leaflet locationpicker</h1>
|
|
||||||
|
|
||||||
<div id="desc">
|
|
||||||
Simple location picker with Leaflet map
|
|
||||||
<div style="position:absolute;top:0;right:-120px">
|
|
||||||
<iframe src="http://ghbtns.com/github-btn.html?user=stefanocudini&repo=leaflet-locationpicker&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="104px" height="20px"></iframe>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div style="clear:both"></div>
|
|
||||||
<div class="box">
|
|
||||||
<h4>Features</h4>
|
|
||||||
<ul id="ff">
|
|
||||||
|
|
||||||
<li>Custom location format, lat,lon separator and precision</li>
|
|
||||||
|
|
||||||
<li>Pick Location Latidute,Longitude clicking on map</li>
|
|
||||||
|
|
||||||
<li>Bind multiple events or single picker callback</li>
|
|
||||||
|
|
||||||
<li>Load picker map from preselected location</li>
|
|
||||||
|
|
||||||
<li>Bind callback on location picked</li>
|
|
||||||
|
|
||||||
<li>Enable disable location marker</li>
|
|
||||||
|
|
||||||
<li>Custom map baselayer</li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="box">
|
|
||||||
<h4>Code repositories</h4>
|
|
||||||
|
|
||||||
<a target="_blank" href="https://github.com/stefanocudini/leaflet-locationpicker">Github.com</a>
|
|
||||||
<br />
|
|
||||||
|
|
||||||
<a target="_blank" href="https://npmjs.org/package/leaflet-locationpicker">Node Packaged Module</a>
|
|
||||||
<br />
|
|
||||||
|
|
||||||
|
|
||||||
<h4>Homepage</h4>
|
|
||||||
<a href="https://opengeo.tech/maps/leaflet-locationpicker/">https://opengeo.tech/maps/leaflet-locationpicker/</a>
|
|
||||||
<br />
|
|
||||||
|
|
||||||
<h4>Download</h4>
|
|
||||||
<ul>
|
|
||||||
<li><a href="https://github.com/stefanocudini/leaflet-locationpicker/archive/master.zip">Dev Pack (.zip)</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="box">
|
|
||||||
<h4>Examples</h4>
|
|
||||||
<ul id="examples">
|
|
||||||
|
|
||||||
<li><a href="examples/simple.html">examples/simple.html</a></li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="screenshot">
|
|
||||||
<img src="images/leaflet-locationpicker.png" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="copy"><a href="https://opengeo.tech/">Opengeo.tech</a> • ©<a rel="author" href="https://opengeo.tech/stefano-cudini/">Stefano Cudini</a></div>
|
|
||||||
|
|
||||||
<a href="https://github.com/stefanocudini/leaflet-locationpicker"><img id="ribbon" src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png" alt="Fork me on GitHub"></a>
|
|
||||||
|
|
||||||
<div style="clear:both;font-size:.85em;margin-bottom:1em">
|
|
||||||
<b>For questions and bugs</b> I recommend you to <a href="https://github.com/stefanocudini/leaflet-locationpicker/issues">create New Issue</a> on Github repository.</strong><br />
|
|
||||||
<br />
|
|
||||||
This is a micro discussion area for methods of implementation.<br />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="comments">
|
|
||||||
<div id="disqus_thread"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script type="text/javascript" src="/labs-common.js"></script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,163 +0,0 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="https://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<title><%=title%></title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
||||||
<style>
|
|
||||||
body {
|
|
||||||
background:#F2F9FF;
|
|
||||||
color:#666;
|
|
||||||
font-family:Arial;
|
|
||||||
}
|
|
||||||
a {
|
|
||||||
color:#f80;
|
|
||||||
text-decoration:none;
|
|
||||||
}
|
|
||||||
a:hover {
|
|
||||||
color:#635f94;
|
|
||||||
text-decoration:underline;
|
|
||||||
}
|
|
||||||
h1, h2, h3, h4 {
|
|
||||||
text-transform: capitalize;
|
|
||||||
white-space:nowrap;
|
|
||||||
margin: 0 0 .25em 0;
|
|
||||||
}
|
|
||||||
h4 {
|
|
||||||
color: #A1A8AD;
|
|
||||||
}
|
|
||||||
#desc {
|
|
||||||
float: left;
|
|
||||||
margin-bottom: 1em;
|
|
||||||
position: relative;
|
|
||||||
white-space:nowrap;
|
|
||||||
font-size:1em;
|
|
||||||
}
|
|
||||||
.box {
|
|
||||||
float: left;
|
|
||||||
min-width: 200px;
|
|
||||||
margin-right: 20px;
|
|
||||||
background: #fff;
|
|
||||||
padding:8px;
|
|
||||||
border:2px solid #c5cdd4;
|
|
||||||
border-radius:.45em;
|
|
||||||
|
|
||||||
box-shadow: 0 0 16px rgba(100,100,100,0.2);
|
|
||||||
}
|
|
||||||
.screenshot {
|
|
||||||
margin: 20px 20px 20px 0;
|
|
||||||
float: left;
|
|
||||||
clear: both;
|
|
||||||
background: #fff;
|
|
||||||
box-shadow: 0 0 10px rgba(120,120,120,0.2);
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
ul {
|
|
||||||
font-size:.85em;
|
|
||||||
margin:0;
|
|
||||||
padding:0;
|
|
||||||
}
|
|
||||||
li {
|
|
||||||
margin:0 0 2px 18px;
|
|
||||||
}
|
|
||||||
#copy {
|
|
||||||
position:fixed;
|
|
||||||
z-index:1000;
|
|
||||||
right:150px;
|
|
||||||
top:-8px;
|
|
||||||
font-size:.85em;
|
|
||||||
padding:8px 8px 2px 8px;
|
|
||||||
background: #eee;
|
|
||||||
border: 2px solid #bbb;
|
|
||||||
border-radius:.7em;
|
|
||||||
opacity: 0.9;
|
|
||||||
box-shadow:0 0 8px #aaa;
|
|
||||||
font-weight: bold;
|
|
||||||
color:#bbb;
|
|
||||||
}
|
|
||||||
#copy a {
|
|
||||||
color:#888;
|
|
||||||
text-decoration:none
|
|
||||||
}
|
|
||||||
#copy a:hover {
|
|
||||||
color:#f80
|
|
||||||
}
|
|
||||||
#ribbon {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
border: 0;
|
|
||||||
filter: alpha(opacity=80);
|
|
||||||
-khtml-opacity: .8;
|
|
||||||
-moz-opacity: .8;
|
|
||||||
opacity: .8;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body id="home">
|
|
||||||
|
|
||||||
<h1><%=title%></h1>
|
|
||||||
|
|
||||||
<div id="desc">
|
|
||||||
<%=pkg.description%>
|
|
||||||
<div style="position:absolute;top:0;right:-120px">
|
|
||||||
<iframe src="<%=ribbonurl%>" allowtransparency="true" frameborder="0" scrolling="0" width="104px" height="20px"></iframe>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div style="clear:both"></div>
|
|
||||||
<div class="box">
|
|
||||||
<h4>Features</h4>
|
|
||||||
<ul id="ff">
|
|
||||||
<% _.forEach(features, function(f) { %>
|
|
||||||
<li><%- f%></li>
|
|
||||||
<% }); %>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="box">
|
|
||||||
<h4>Code repositories</h4>
|
|
||||||
<% _.forEach(sources, function(s) { %>
|
|
||||||
<a target="_blank" href="<%=s.url%>"><%- s.name%></a>
|
|
||||||
<br />
|
|
||||||
<% }); %>
|
|
||||||
|
|
||||||
<h4>Homepage</h4>
|
|
||||||
<a href="<%=pkg.homepage%>"><%=pkg.homepage%></a>
|
|
||||||
<br />
|
|
||||||
|
|
||||||
<h4>Download</h4>
|
|
||||||
<ul>
|
|
||||||
<li><a href="<%=giturl%>/archive/master.zip">Dev Pack (.zip)</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="box">
|
|
||||||
<h4>Examples</h4>
|
|
||||||
<ul id="examples">
|
|
||||||
<% _.forEach(examples, function(file) { %>
|
|
||||||
<li><a href="<%- file %>"><%- file%></a></li>
|
|
||||||
<% }); %>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="screenshot">
|
|
||||||
<img src="<%=image%>" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="copy"><a href="<%=pkg.author.url%>">Opengeo.tech</a> • ©<a rel="author" href="https://opengeo.tech/stefano-cudini/"><%= pkg.author.name %></a></div>
|
|
||||||
|
|
||||||
<a href="<%=giturl%>"><img id="ribbon" src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png" alt="Fork me on GitHub"></a>
|
|
||||||
|
|
||||||
<div style="clear:both;font-size:.85em;margin-bottom:1em">
|
|
||||||
<b>For questions and bugs</b> I recommend you to <a href="<%=giturl%>/issues">create New Issue</a> on Github repository.</strong><br />
|
|
||||||
<br />
|
|
||||||
This is a micro discussion area for methods of implementation.<br />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="comments">
|
|
||||||
<div id="disqus_thread"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script type="text/javascript" src="/labs-common.js"></script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
Copyright (c) 2010-2013, Vladimir Agafonkin
|
|
||||||
Copyright (c) 2010-2011, CloudMade
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification, are
|
|
||||||
permitted provided that the following conditions are met:
|
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice, this list of
|
|
||||||
conditions and the following disclaimer.
|
|
||||||
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright notice, this list
|
|
||||||
of conditions and the following disclaimer in the documentation and/or other materials
|
|
||||||
provided with the distribution.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
|
||||||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
||||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
||||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
||||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
|
||||||
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
@@ -1,127 +0,0 @@
|
|||||||
# Leaflet Plugin Authoring Guide
|
|
||||||
|
|
||||||
One of the greatest things about Leaflet is its powerful plugin ecosystem.
|
|
||||||
The [Leaflet plugins page](http://leafletjs.com/plugins.html) lists dozens of awesome plugins, and more are being added every week.
|
|
||||||
|
|
||||||
This guide lists a number of best practices for publishing a Leaflet plugin that meets the quality standards of Leaflet itself.
|
|
||||||
|
|
||||||
1. [Presentation](#presentation)
|
|
||||||
- [Repository](#repository)
|
|
||||||
- [Name](#name)
|
|
||||||
- [Demo](#demo)
|
|
||||||
- [Readme](#readme)
|
|
||||||
- [License](#license)
|
|
||||||
2. [Code](#code)
|
|
||||||
- [File Structure](#file-structure)
|
|
||||||
- [Code Conventions](#code-conventions)
|
|
||||||
- [Plugin API](#plugin-api)
|
|
||||||
|
|
||||||
## Presentation
|
|
||||||
|
|
||||||
### Repository
|
|
||||||
|
|
||||||
The best place to put your Leaflet plugin to is a separate [GitHub](http://github.com) repository.
|
|
||||||
If you create a collection of plugins for different uses,
|
|
||||||
don't put them in one repo —
|
|
||||||
it's usually easier to work with small, self-contained plugins in individual repositories.
|
|
||||||
|
|
||||||
### Name
|
|
||||||
|
|
||||||
Most existing plugins follow the convention of naming plugins (and repos) like this: `Leaflet.MyPluginName`.
|
|
||||||
You can use other forms (e.g. "leaflet-my-plugin-name"),
|
|
||||||
just make sure to include the word "Leaflet" in the name so that it's obvious that it's a Leaflet plugin.
|
|
||||||
|
|
||||||
### Demo
|
|
||||||
|
|
||||||
The most essential thing to do when publishing a plugin is to include a demo that showcases what the plugin does —
|
|
||||||
it's usually the first thing people will look for.
|
|
||||||
|
|
||||||
The easiest way to put up a demo is using [GitHub Pages](http://pages.github.com/).
|
|
||||||
A good [starting point](https://help.github.com/articles/creating-project-pages-manually) is creating a `gh-pages` branch in your repo and adding an `index.html` page to it —
|
|
||||||
after pushing, it'll be published as `http://<user>.github.io/<repo>`.
|
|
||||||
|
|
||||||
### Readme
|
|
||||||
|
|
||||||
The next thing you need to have is a descriptive `README.md` in the root of the repo (or a link to a website with a similar content).
|
|
||||||
At a minimum it should contain the following items:
|
|
||||||
|
|
||||||
- name of the plugin
|
|
||||||
- a simple, concise description of what it does
|
|
||||||
- requirements
|
|
||||||
- Leaflet version
|
|
||||||
- other external dependencies (if any)
|
|
||||||
- browser / device compatibility
|
|
||||||
- links to demos
|
|
||||||
- instructions for including the plugin
|
|
||||||
- simple usage code example
|
|
||||||
- API reference (methods, options, events)
|
|
||||||
|
|
||||||
### License
|
|
||||||
|
|
||||||
Every open source repository should include a license.
|
|
||||||
If you don't know what open source license to choose for your code,
|
|
||||||
[MIT License](http://opensource.org/licenses/MIT) and [BSD 2-Clause License](http://opensource.org/licenses/BSD-2-Clause) are both good choices.
|
|
||||||
You can either put it in the repo as a `LICENSE` file or just link to the license from the Readme.
|
|
||||||
|
|
||||||
## Code
|
|
||||||
|
|
||||||
### File Structure
|
|
||||||
|
|
||||||
Keep the file structure clean and simple,
|
|
||||||
don't pile up lots of files in one place —
|
|
||||||
make it easy for a new person to find their way in your repo.
|
|
||||||
|
|
||||||
A barebones repo for a simple plugin would look like this:
|
|
||||||
|
|
||||||
```
|
|
||||||
my-plugin.js
|
|
||||||
README.md
|
|
||||||
```
|
|
||||||
|
|
||||||
An example of a more sophisticated plugin file structure:
|
|
||||||
|
|
||||||
```
|
|
||||||
/src - JS source files
|
|
||||||
/dist - minified plugin JS, CSS, images
|
|
||||||
/spec - test files
|
|
||||||
/lib - any external libraries/plugins if necessary
|
|
||||||
/examples - HTML examples of plugin usage
|
|
||||||
README.md
|
|
||||||
LICENSE
|
|
||||||
package.json
|
|
||||||
```
|
|
||||||
|
|
||||||
### Code Conventions
|
|
||||||
|
|
||||||
Everyone's tastes are different, but it's important to be consistent with whatever conventions you choose for your plugin.
|
|
||||||
|
|
||||||
For a good starting point, check out [Airbnb JavaScript Guide](https://github.com/airbnb/javascript).
|
|
||||||
Leaflet follows pretty much the same conventions
|
|
||||||
except for using smart tabs (hard tabs for indentation, spaces for alignment)
|
|
||||||
and putting a space after the `function` keyword.
|
|
||||||
|
|
||||||
### Plugin API
|
|
||||||
|
|
||||||
Never expose global variables in your plugin.<br>
|
|
||||||
If you have a new class, put it directly in the `L` namespace (`L.MyPlugin`).<br>
|
|
||||||
If you inherit one of the existing classes, make it a sub-property (`L.TileLayer.Banana`).<br>
|
|
||||||
If you want to add new methods to existing Leaflet classes, you can do it like this: `L.Marker.include({myPlugin: …})`.
|
|
||||||
|
|
||||||
Function, method and property names should be in `camelCase`.<br>
|
|
||||||
Class names should be in `CapitalizedCamelCase`.
|
|
||||||
|
|
||||||
If you have a lot of arguments in your function, consider accepting an options object instead
|
|
||||||
(putting default values where possible so that users don't need specify all of them):
|
|
||||||
|
|
||||||
```js
|
|
||||||
// bad
|
|
||||||
marker.myPlugin('bla', 'foo', null, {}, 5, 0);
|
|
||||||
|
|
||||||
// good
|
|
||||||
marker.myPlugin('bla', {
|
|
||||||
optionOne: 'foo',
|
|
||||||
optionThree: 5
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
And most importantly, keep it simple. Leaflet is all about *simplicity*.
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
<img src="http://leafletjs.com/docs/images/logo.png" alt="Leaflet" />
|
|
||||||
|
|
||||||
Leaflet is an open source JavaScript library for **mobile-friendly interactive maps**.
|
|
||||||
It is developed by [Vladimir Agafonkin][] of [MapBox][] with a team of dedicated [contributors][].
|
|
||||||
Weighing just about 30 KB of gzipped JS code, it has all the [features][] most developers ever need for online maps.
|
|
||||||
|
|
||||||
Leaflet is designed with *simplicity*, *performance* and *usability* in mind.
|
|
||||||
It works efficiently across all major desktop and mobile platforms out of the box,
|
|
||||||
taking advantage of HTML5 and CSS3 on modern browsers while being accessible on older ones too.
|
|
||||||
It can be extended with a huge amount of [plugins][],
|
|
||||||
has a beautiful, easy to use and [well-documented][] API
|
|
||||||
and a simple, readable [source code][] that is a joy to [contribute][] to.
|
|
||||||
|
|
||||||
For more info, docs and tutorials, check out the [official website][].<br>
|
|
||||||
For **Leaflet downloads** (including the built master version), check out the [download page][].
|
|
||||||
|
|
||||||
We're happy to meet new contributors.
|
|
||||||
If you want to **get involved** with Leaflet development, check out the [contribution guide][contribute].
|
|
||||||
Let's make the best mapping library that will ever exist,
|
|
||||||
and push the limits of what's possible with online maps!
|
|
||||||
|
|
||||||
[](https://travis-ci.org/Leaflet/Leaflet)
|
|
||||||
|
|
||||||
[Vladimir Agafonkin]: http://agafonkin.com/en
|
|
||||||
[contributors]: https://github.com/Leaflet/Leaflet/graphs/contributors
|
|
||||||
[features]: http://leafletjs.com/features.html
|
|
||||||
[plugins]: http://leafletjs.com/plugins.html
|
|
||||||
[well-documented]: http://leafletjs.com/reference.html "Leaflet API reference"
|
|
||||||
[source code]: https://github.com/Leaflet/Leaflet "Leaflet GitHub repository"
|
|
||||||
[hosted on GitHub]: http://github.com/Leaflet/Leaflet
|
|
||||||
[contribute]: https://github.com/Leaflet/Leaflet/blob/master/CONTRIBUTING.md "A guide to contributing to Leaflet"
|
|
||||||
[official website]: http://leafletjs.com
|
|
||||||
[download page]: http://leafletjs.com/download.html
|
|
||||||
[MapBox]: https://mapbox.com
|
|
||||||
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 797 B |
@@ -1,479 +0,0 @@
|
|||||||
/* required styles */
|
|
||||||
|
|
||||||
.leaflet-map-pane,
|
|
||||||
.leaflet-tile,
|
|
||||||
.leaflet-marker-icon,
|
|
||||||
.leaflet-marker-shadow,
|
|
||||||
.leaflet-tile-pane,
|
|
||||||
.leaflet-tile-container,
|
|
||||||
.leaflet-overlay-pane,
|
|
||||||
.leaflet-shadow-pane,
|
|
||||||
.leaflet-marker-pane,
|
|
||||||
.leaflet-popup-pane,
|
|
||||||
.leaflet-overlay-pane svg,
|
|
||||||
.leaflet-zoom-box,
|
|
||||||
.leaflet-image-layer,
|
|
||||||
.leaflet-layer {
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
.leaflet-container {
|
|
||||||
overflow: hidden;
|
|
||||||
-ms-touch-action: none;
|
|
||||||
touch-action: none;
|
|
||||||
}
|
|
||||||
.leaflet-tile,
|
|
||||||
.leaflet-marker-icon,
|
|
||||||
.leaflet-marker-shadow {
|
|
||||||
-webkit-user-select: none;
|
|
||||||
-moz-user-select: none;
|
|
||||||
user-select: none;
|
|
||||||
-webkit-user-drag: none;
|
|
||||||
}
|
|
||||||
.leaflet-marker-icon,
|
|
||||||
.leaflet-marker-shadow {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
/* map is broken in FF if you have max-width: 100% on tiles */
|
|
||||||
.leaflet-container img {
|
|
||||||
max-width: none !important;
|
|
||||||
}
|
|
||||||
/* stupid Android 2 doesn't understand "max-width: none" properly */
|
|
||||||
.leaflet-container img.leaflet-image-layer {
|
|
||||||
max-width: 15000px !important;
|
|
||||||
}
|
|
||||||
.leaflet-tile {
|
|
||||||
filter: inherit;
|
|
||||||
visibility: hidden;
|
|
||||||
}
|
|
||||||
.leaflet-tile-loaded {
|
|
||||||
visibility: inherit;
|
|
||||||
}
|
|
||||||
.leaflet-zoom-box {
|
|
||||||
width: 0;
|
|
||||||
height: 0;
|
|
||||||
}
|
|
||||||
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
|
|
||||||
.leaflet-overlay-pane svg {
|
|
||||||
-moz-user-select: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-tile-pane { z-index: 2; }
|
|
||||||
.leaflet-objects-pane { z-index: 3; }
|
|
||||||
.leaflet-overlay-pane { z-index: 4; }
|
|
||||||
.leaflet-shadow-pane { z-index: 5; }
|
|
||||||
.leaflet-marker-pane { z-index: 6; }
|
|
||||||
.leaflet-popup-pane { z-index: 7; }
|
|
||||||
|
|
||||||
.leaflet-vml-shape {
|
|
||||||
width: 1px;
|
|
||||||
height: 1px;
|
|
||||||
}
|
|
||||||
.lvml {
|
|
||||||
behavior: url(#default#VML);
|
|
||||||
display: inline-block;
|
|
||||||
position: absolute;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* control positioning */
|
|
||||||
|
|
||||||
.leaflet-control {
|
|
||||||
position: relative;
|
|
||||||
z-index: 7;
|
|
||||||
pointer-events: auto;
|
|
||||||
}
|
|
||||||
.leaflet-top,
|
|
||||||
.leaflet-bottom {
|
|
||||||
position: absolute;
|
|
||||||
z-index: 1000;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
.leaflet-top {
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
.leaflet-right {
|
|
||||||
right: 0;
|
|
||||||
}
|
|
||||||
.leaflet-bottom {
|
|
||||||
bottom: 0;
|
|
||||||
}
|
|
||||||
.leaflet-left {
|
|
||||||
left: 0;
|
|
||||||
}
|
|
||||||
.leaflet-control {
|
|
||||||
float: left;
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
.leaflet-right .leaflet-control {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
.leaflet-top .leaflet-control {
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
.leaflet-bottom .leaflet-control {
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
.leaflet-left .leaflet-control {
|
|
||||||
margin-left: 10px;
|
|
||||||
}
|
|
||||||
.leaflet-right .leaflet-control {
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* zoom and fade animations */
|
|
||||||
|
|
||||||
.leaflet-fade-anim .leaflet-tile,
|
|
||||||
.leaflet-fade-anim .leaflet-popup {
|
|
||||||
opacity: 0;
|
|
||||||
-webkit-transition: opacity 0.2s linear;
|
|
||||||
-moz-transition: opacity 0.2s linear;
|
|
||||||
-o-transition: opacity 0.2s linear;
|
|
||||||
transition: opacity 0.2s linear;
|
|
||||||
}
|
|
||||||
.leaflet-fade-anim .leaflet-tile-loaded,
|
|
||||||
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-zoom-anim .leaflet-zoom-animated {
|
|
||||||
-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
|
|
||||||
-moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
|
|
||||||
-o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1);
|
|
||||||
transition: transform 0.25s cubic-bezier(0,0,0.25,1);
|
|
||||||
}
|
|
||||||
.leaflet-zoom-anim .leaflet-tile,
|
|
||||||
.leaflet-pan-anim .leaflet-tile,
|
|
||||||
.leaflet-touching .leaflet-zoom-animated {
|
|
||||||
-webkit-transition: none;
|
|
||||||
-moz-transition: none;
|
|
||||||
-o-transition: none;
|
|
||||||
transition: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-zoom-anim .leaflet-zoom-hide {
|
|
||||||
visibility: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* cursors */
|
|
||||||
|
|
||||||
.leaflet-clickable {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.leaflet-container {
|
|
||||||
cursor: -webkit-grab;
|
|
||||||
cursor: -moz-grab;
|
|
||||||
}
|
|
||||||
.leaflet-popup-pane,
|
|
||||||
.leaflet-control {
|
|
||||||
cursor: auto;
|
|
||||||
}
|
|
||||||
.leaflet-dragging .leaflet-container,
|
|
||||||
.leaflet-dragging .leaflet-clickable {
|
|
||||||
cursor: move;
|
|
||||||
cursor: -webkit-grabbing;
|
|
||||||
cursor: -moz-grabbing;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* visual tweaks */
|
|
||||||
|
|
||||||
.leaflet-container {
|
|
||||||
background: #ddd;
|
|
||||||
outline: 0;
|
|
||||||
}
|
|
||||||
.leaflet-container a {
|
|
||||||
color: #0078A8;
|
|
||||||
}
|
|
||||||
.leaflet-container a.leaflet-active {
|
|
||||||
outline: 2px solid orange;
|
|
||||||
}
|
|
||||||
.leaflet-zoom-box {
|
|
||||||
border: 2px dotted #38f;
|
|
||||||
background: rgba(255,255,255,0.5);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* general typography */
|
|
||||||
.leaflet-container {
|
|
||||||
font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* general toolbar styles */
|
|
||||||
|
|
||||||
.leaflet-bar {
|
|
||||||
box-shadow: 0 1px 5px rgba(0,0,0,0.65);
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
|
||||||
.leaflet-bar a,
|
|
||||||
.leaflet-bar a:hover {
|
|
||||||
background-color: #fff;
|
|
||||||
border-bottom: 1px solid #ccc;
|
|
||||||
width: 26px;
|
|
||||||
height: 26px;
|
|
||||||
line-height: 26px;
|
|
||||||
display: block;
|
|
||||||
text-align: center;
|
|
||||||
text-decoration: none;
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
.leaflet-bar a,
|
|
||||||
.leaflet-control-layers-toggle {
|
|
||||||
background-position: 50% 50%;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
.leaflet-bar a:hover {
|
|
||||||
background-color: #f4f4f4;
|
|
||||||
}
|
|
||||||
.leaflet-bar a:first-child {
|
|
||||||
border-top-left-radius: 4px;
|
|
||||||
border-top-right-radius: 4px;
|
|
||||||
}
|
|
||||||
.leaflet-bar a:last-child {
|
|
||||||
border-bottom-left-radius: 4px;
|
|
||||||
border-bottom-right-radius: 4px;
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
.leaflet-bar a.leaflet-disabled {
|
|
||||||
cursor: default;
|
|
||||||
background-color: #f4f4f4;
|
|
||||||
color: #bbb;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-touch .leaflet-bar a {
|
|
||||||
width: 30px;
|
|
||||||
height: 30px;
|
|
||||||
line-height: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* zoom control */
|
|
||||||
|
|
||||||
.leaflet-control-zoom-in,
|
|
||||||
.leaflet-control-zoom-out {
|
|
||||||
font: bold 18px 'Lucida Console', Monaco, monospace;
|
|
||||||
text-indent: 1px;
|
|
||||||
}
|
|
||||||
.leaflet-control-zoom-out {
|
|
||||||
font-size: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-touch .leaflet-control-zoom-in {
|
|
||||||
font-size: 22px;
|
|
||||||
}
|
|
||||||
.leaflet-touch .leaflet-control-zoom-out {
|
|
||||||
font-size: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* layers control */
|
|
||||||
|
|
||||||
.leaflet-control-layers {
|
|
||||||
box-shadow: 0 1px 5px rgba(0,0,0,0.4);
|
|
||||||
background: #fff;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers-toggle {
|
|
||||||
background-image: url(images/layers.png);
|
|
||||||
width: 36px;
|
|
||||||
height: 36px;
|
|
||||||
}
|
|
||||||
.leaflet-retina .leaflet-control-layers-toggle {
|
|
||||||
background-image: url(images/layers-2x.png);
|
|
||||||
background-size: 26px 26px;
|
|
||||||
}
|
|
||||||
.leaflet-touch .leaflet-control-layers-toggle {
|
|
||||||
width: 44px;
|
|
||||||
height: 44px;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers .leaflet-control-layers-list,
|
|
||||||
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers-expanded .leaflet-control-layers-list {
|
|
||||||
display: block;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers-expanded {
|
|
||||||
padding: 6px 10px 6px 6px;
|
|
||||||
color: #333;
|
|
||||||
background: #fff;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers-selector {
|
|
||||||
margin-top: 2px;
|
|
||||||
position: relative;
|
|
||||||
top: 1px;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers label {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers-separator {
|
|
||||||
height: 0;
|
|
||||||
border-top: 1px solid #ddd;
|
|
||||||
margin: 5px -10px 5px -6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* attribution and scale controls */
|
|
||||||
|
|
||||||
.leaflet-container .leaflet-control-attribution {
|
|
||||||
background: #fff;
|
|
||||||
background: rgba(255, 255, 255, 0.7);
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
.leaflet-control-attribution,
|
|
||||||
.leaflet-control-scale-line {
|
|
||||||
padding: 0 5px;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
.leaflet-control-attribution a {
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
.leaflet-control-attribution a:hover {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
.leaflet-container .leaflet-control-attribution,
|
|
||||||
.leaflet-container .leaflet-control-scale {
|
|
||||||
font-size: 11px;
|
|
||||||
}
|
|
||||||
.leaflet-left .leaflet-control-scale {
|
|
||||||
margin-left: 5px;
|
|
||||||
}
|
|
||||||
.leaflet-bottom .leaflet-control-scale {
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
.leaflet-control-scale-line {
|
|
||||||
border: 2px solid #777;
|
|
||||||
border-top: none;
|
|
||||||
line-height: 1.1;
|
|
||||||
padding: 2px 5px 1px;
|
|
||||||
font-size: 11px;
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
-moz-box-sizing: content-box;
|
|
||||||
box-sizing: content-box;
|
|
||||||
|
|
||||||
background: #fff;
|
|
||||||
background: rgba(255, 255, 255, 0.5);
|
|
||||||
}
|
|
||||||
.leaflet-control-scale-line:not(:first-child) {
|
|
||||||
border-top: 2px solid #777;
|
|
||||||
border-bottom: none;
|
|
||||||
margin-top: -2px;
|
|
||||||
}
|
|
||||||
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
|
|
||||||
border-bottom: 2px solid #777;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-touch .leaflet-control-attribution,
|
|
||||||
.leaflet-touch .leaflet-control-layers,
|
|
||||||
.leaflet-touch .leaflet-bar {
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
.leaflet-touch .leaflet-control-layers,
|
|
||||||
.leaflet-touch .leaflet-bar {
|
|
||||||
border: 2px solid rgba(0,0,0,0.2);
|
|
||||||
background-clip: padding-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* popup */
|
|
||||||
|
|
||||||
.leaflet-popup {
|
|
||||||
position: absolute;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.leaflet-popup-content-wrapper {
|
|
||||||
padding: 1px;
|
|
||||||
text-align: left;
|
|
||||||
border-radius: 12px;
|
|
||||||
}
|
|
||||||
.leaflet-popup-content {
|
|
||||||
margin: 13px 19px;
|
|
||||||
line-height: 1.4;
|
|
||||||
}
|
|
||||||
.leaflet-popup-content p {
|
|
||||||
margin: 18px 0;
|
|
||||||
}
|
|
||||||
.leaflet-popup-tip-container {
|
|
||||||
margin: 0 auto;
|
|
||||||
width: 40px;
|
|
||||||
height: 20px;
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
.leaflet-popup-tip {
|
|
||||||
width: 17px;
|
|
||||||
height: 17px;
|
|
||||||
padding: 1px;
|
|
||||||
|
|
||||||
margin: -10px auto 0;
|
|
||||||
|
|
||||||
-webkit-transform: rotate(45deg);
|
|
||||||
-moz-transform: rotate(45deg);
|
|
||||||
-ms-transform: rotate(45deg);
|
|
||||||
-o-transform: rotate(45deg);
|
|
||||||
transform: rotate(45deg);
|
|
||||||
}
|
|
||||||
.leaflet-popup-content-wrapper,
|
|
||||||
.leaflet-popup-tip {
|
|
||||||
background: white;
|
|
||||||
|
|
||||||
box-shadow: 0 3px 14px rgba(0,0,0,0.4);
|
|
||||||
}
|
|
||||||
.leaflet-container a.leaflet-popup-close-button {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
padding: 4px 4px 0 0;
|
|
||||||
text-align: center;
|
|
||||||
width: 18px;
|
|
||||||
height: 14px;
|
|
||||||
font: 16px/14px Tahoma, Verdana, sans-serif;
|
|
||||||
color: #c3c3c3;
|
|
||||||
text-decoration: none;
|
|
||||||
font-weight: bold;
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
.leaflet-container a.leaflet-popup-close-button:hover {
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
.leaflet-popup-scrolled {
|
|
||||||
overflow: auto;
|
|
||||||
border-bottom: 1px solid #ddd;
|
|
||||||
border-top: 1px solid #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-oldie .leaflet-popup-content-wrapper {
|
|
||||||
zoom: 1;
|
|
||||||
}
|
|
||||||
.leaflet-oldie .leaflet-popup-tip {
|
|
||||||
width: 24px;
|
|
||||||
margin: 0 auto;
|
|
||||||
|
|
||||||
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
|
|
||||||
filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
|
|
||||||
}
|
|
||||||
.leaflet-oldie .leaflet-popup-tip-container {
|
|
||||||
margin-top: -1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-oldie .leaflet-control-zoom,
|
|
||||||
.leaflet-oldie .leaflet-control-layers,
|
|
||||||
.leaflet-oldie .leaflet-popup-content-wrapper,
|
|
||||||
.leaflet-oldie .leaflet-popup-tip {
|
|
||||||
border: 1px solid #999;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* div icon */
|
|
||||||
|
|
||||||
.leaflet-div-icon {
|
|
||||||
background: #fff;
|
|
||||||
border: 1px solid #666;
|
|
||||||
}
|
|
||||||