Feature #67: Advanced document template events
OnGenerated and OnImportAttachment allow advanced users to enter expressions which will be evaluated whenever these document template/importing events are triggered. This enables greater automation.
This commit is contained in:
1 parent
c528a2be26
commit
1cc7e94646
32 files changed
+2176
-1471
No files matched your search
@@ -0,0 +1,478 @@
|
|||||||
|
using Disco.Models.Repository;
|
||||||
|
using Disco.Services.Logging;
|
||||||
|
using Disco.Services.Logging.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
namespace Disco.BI.DocumentTemplateBI
|
||||||
|
{
|
||||||
|
public class DocumentsLog : LogBase
|
||||||
|
{
|
||||||
|
public enum EventTypeIds
|
||||||
|
{
|
||||||
|
ImportStarting = 10,
|
||||||
|
ImportProgress,
|
||||||
|
ImportFinished,
|
||||||
|
ImportWarning = 15,
|
||||||
|
ImportError,
|
||||||
|
ImportAttachmentExpressionEvaluated = 50,
|
||||||
|
ImportPageStarting = 100,
|
||||||
|
ImportPageImageUpdate = 104,
|
||||||
|
ImportPageProgress,
|
||||||
|
ImportPageDetected = 110,
|
||||||
|
ImportPageUndetected = 115,
|
||||||
|
ImportPageError = 120,
|
||||||
|
ImportPageUndetectedStored = 150,
|
||||||
|
DocumentGenerated = 500,
|
||||||
|
DocumentGeneratedWithExpression
|
||||||
|
}
|
||||||
|
|
||||||
|
private const int _ModuleId = 40;
|
||||||
|
|
||||||
|
public static DocumentsLog Current
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (DocumentsLog)LogContext.LogModules[_ModuleId];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string ModuleDescription
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return "Documents";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public override int ModuleId
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _ModuleId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public override string ModuleName
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return "Documents";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private static void Log(DocumentsLog.EventTypeIds EventTypeId, params object[] Args)
|
||||||
|
{
|
||||||
|
DocumentsLog.Current.Log((int)EventTypeId, Args);
|
||||||
|
}
|
||||||
|
public static void LogImportStarting(string SessionId, string DocumentName)
|
||||||
|
{
|
||||||
|
DocumentsLog.Log(DocumentsLog.EventTypeIds.ImportStarting, new object[]
|
||||||
|
{
|
||||||
|
SessionId,
|
||||||
|
DocumentName
|
||||||
|
});
|
||||||
|
}
|
||||||
|
public static void LogImportProgress(string SessionId, int? Progress, string Status)
|
||||||
|
{
|
||||||
|
DocumentsLog.Log(DocumentsLog.EventTypeIds.ImportProgress, new object[]
|
||||||
|
{
|
||||||
|
SessionId,
|
||||||
|
Progress,
|
||||||
|
Status
|
||||||
|
});
|
||||||
|
}
|
||||||
|
public static void LogImportFinished(string SessionId)
|
||||||
|
{
|
||||||
|
DocumentsLog.Log(DocumentsLog.EventTypeIds.ImportFinished, new object[]
|
||||||
|
{
|
||||||
|
SessionId
|
||||||
|
});
|
||||||
|
}
|
||||||
|
public static void LogImportWarning(string SessionId, string Message)
|
||||||
|
{
|
||||||
|
DocumentsLog.Log(DocumentsLog.EventTypeIds.ImportWarning, new object[]
|
||||||
|
{
|
||||||
|
SessionId,
|
||||||
|
Message
|
||||||
|
});
|
||||||
|
}
|
||||||
|
public static void LogImportError(string SessionId, string Message)
|
||||||
|
{
|
||||||
|
DocumentsLog.Log(DocumentsLog.EventTypeIds.ImportError, new object[]
|
||||||
|
{
|
||||||
|
SessionId,
|
||||||
|
Message
|
||||||
|
});
|
||||||
|
}
|
||||||
|
public static void LogImportAttachmentExpressionEvaluated(DocumentTemplate template, Device device, DeviceAttachment attachment, string Result)
|
||||||
|
{
|
||||||
|
DocumentsLog.Log(DocumentsLog.EventTypeIds.ImportAttachmentExpressionEvaluated, new object[]
|
||||||
|
{
|
||||||
|
template.Id,
|
||||||
|
device.SerialNumber,
|
||||||
|
attachment.Id,
|
||||||
|
Result
|
||||||
|
});
|
||||||
|
}
|
||||||
|
public static void LogImportAttachmentExpressionEvaluated(DocumentTemplate template, Job job, JobAttachment attachment, string Result)
|
||||||
|
{
|
||||||
|
DocumentsLog.Log(DocumentsLog.EventTypeIds.ImportAttachmentExpressionEvaluated, new object[]
|
||||||
|
{
|
||||||
|
template.Id,
|
||||||
|
job.Id,
|
||||||
|
attachment.Id,
|
||||||
|
Result
|
||||||
|
});
|
||||||
|
}
|
||||||
|
public static void LogImportAttachmentExpressionEvaluated(DocumentTemplate template, User user, UserAttachment attachment, string Result)
|
||||||
|
{
|
||||||
|
DocumentsLog.Log(DocumentsLog.EventTypeIds.ImportAttachmentExpressionEvaluated, new object[]
|
||||||
|
{
|
||||||
|
template.Id,
|
||||||
|
user.UserId,
|
||||||
|
attachment.Id,
|
||||||
|
Result
|
||||||
|
});
|
||||||
|
}
|
||||||
|
public static void LogImportAttachmentExpressionEvaluated(DocumentTemplate Template, object Data, object Attachment, string Result)
|
||||||
|
{
|
||||||
|
if (Data is Job)
|
||||||
|
LogImportAttachmentExpressionEvaluated(Template, (Job)Data, (JobAttachment)Attachment, Result);
|
||||||
|
else if (Data is User)
|
||||||
|
LogImportAttachmentExpressionEvaluated(Template, (User)Data, (UserAttachment)Attachment, Result);
|
||||||
|
else if (Data is Device)
|
||||||
|
LogImportAttachmentExpressionEvaluated(Template, (Device)Data, (DeviceAttachment)Attachment, Result);
|
||||||
|
else
|
||||||
|
DocumentsLog.Log(DocumentsLog.EventTypeIds.ImportAttachmentExpressionEvaluated, new object[]
|
||||||
|
{
|
||||||
|
Template.Id,
|
||||||
|
Data.ToString(),
|
||||||
|
Attachment.ToString(),
|
||||||
|
Result
|
||||||
|
});
|
||||||
|
}
|
||||||
|
public static void LogImportPageStarting(string SessionId, int PageNumber)
|
||||||
|
{
|
||||||
|
DocumentsLog.Log(DocumentsLog.EventTypeIds.ImportPageStarting, new object[]
|
||||||
|
{
|
||||||
|
SessionId,
|
||||||
|
PageNumber
|
||||||
|
});
|
||||||
|
}
|
||||||
|
public static void LogImportPageImageUpdate(string SessionId, int PageNumber)
|
||||||
|
{
|
||||||
|
DocumentsLog.Log(DocumentsLog.EventTypeIds.ImportPageImageUpdate, new object[]
|
||||||
|
{
|
||||||
|
SessionId,
|
||||||
|
PageNumber
|
||||||
|
});
|
||||||
|
}
|
||||||
|
public static void LogImportPageProgress(string SessionId, int PageNumber, int? Progress, string Status)
|
||||||
|
{
|
||||||
|
DocumentsLog.Log(DocumentsLog.EventTypeIds.ImportPageProgress, new object[]
|
||||||
|
{
|
||||||
|
SessionId,
|
||||||
|
PageNumber,
|
||||||
|
Progress,
|
||||||
|
Status
|
||||||
|
});
|
||||||
|
}
|
||||||
|
public static void LogImportPageDetected(string SessionId, int PageNumber, string DocumentTypeId, string DocumentTypeName, string TargetType, string AssignedId, string AssignedName)
|
||||||
|
{
|
||||||
|
DocumentsLog.Log(DocumentsLog.EventTypeIds.ImportPageDetected, new object[]
|
||||||
|
{
|
||||||
|
SessionId,
|
||||||
|
PageNumber,
|
||||||
|
DocumentTypeId,
|
||||||
|
DocumentTypeName,
|
||||||
|
TargetType,
|
||||||
|
AssignedId,
|
||||||
|
AssignedName
|
||||||
|
});
|
||||||
|
}
|
||||||
|
public static void LogImportPageUndetected(string SessionId, int PageNumber)
|
||||||
|
{
|
||||||
|
DocumentsLog.Log(DocumentsLog.EventTypeIds.ImportPageUndetected, new object[]
|
||||||
|
{
|
||||||
|
SessionId,
|
||||||
|
PageNumber
|
||||||
|
});
|
||||||
|
}
|
||||||
|
public static void LogImportPageError(string SessionId, int PageNumber, string Message)
|
||||||
|
{
|
||||||
|
DocumentsLog.Log(DocumentsLog.EventTypeIds.ImportPageError, new object[]
|
||||||
|
{
|
||||||
|
SessionId,
|
||||||
|
PageNumber,
|
||||||
|
Message
|
||||||
|
});
|
||||||
|
}
|
||||||
|
public static void LogImportPageUndetectedStored(string SessionId, int PageNumber)
|
||||||
|
{
|
||||||
|
DocumentsLog.Log(DocumentsLog.EventTypeIds.ImportPageUndetectedStored, new object[]
|
||||||
|
{
|
||||||
|
SessionId,
|
||||||
|
PageNumber
|
||||||
|
});
|
||||||
|
}
|
||||||
|
public static void LogDocumentGenerated(DocumentTemplate Template, Device Device, User Author, string ExpressionResult)
|
||||||
|
{
|
||||||
|
DocumentsLog.Log(DocumentsLog.EventTypeIds.DocumentGeneratedWithExpression, new object[]
|
||||||
|
{
|
||||||
|
Template.Id,
|
||||||
|
Device.SerialNumber,
|
||||||
|
Author.UserId,
|
||||||
|
ExpressionResult
|
||||||
|
});
|
||||||
|
}
|
||||||
|
public static void LogDocumentGenerated(DocumentTemplate Template, Job Job, User Author, string ExpressionResult)
|
||||||
|
{
|
||||||
|
DocumentsLog.Log(DocumentsLog.EventTypeIds.DocumentGeneratedWithExpression, new object[]
|
||||||
|
{
|
||||||
|
Template.Id,
|
||||||
|
Job.Id,
|
||||||
|
Author.UserId,
|
||||||
|
ExpressionResult
|
||||||
|
});
|
||||||
|
}
|
||||||
|
public static void LogDocumentGenerated(DocumentTemplate Template, User User, User Author, string ExpressionResult)
|
||||||
|
{
|
||||||
|
DocumentsLog.Log(DocumentsLog.EventTypeIds.DocumentGeneratedWithExpression, new object[]
|
||||||
|
{
|
||||||
|
Template.Id,
|
||||||
|
User.UserId,
|
||||||
|
Author.UserId,
|
||||||
|
ExpressionResult
|
||||||
|
});
|
||||||
|
}
|
||||||
|
public static void LogDocumentGenerated(DocumentTemplate Template, object Data, User Author, string ExpressionResult)
|
||||||
|
{
|
||||||
|
if (Data is Job)
|
||||||
|
LogDocumentGenerated(Template, (Job)Data, Author, ExpressionResult);
|
||||||
|
else if (Data is User)
|
||||||
|
LogDocumentGenerated(Template, (User)Data, Author, ExpressionResult);
|
||||||
|
else if (Data is Device)
|
||||||
|
LogDocumentGenerated(Template, (Device)Data, Author, ExpressionResult);
|
||||||
|
else
|
||||||
|
DocumentsLog.Log(DocumentsLog.EventTypeIds.DocumentGeneratedWithExpression, new object[]
|
||||||
|
{
|
||||||
|
Template.Id,
|
||||||
|
"UNKNOWN",
|
||||||
|
Author.UserId,
|
||||||
|
ExpressionResult
|
||||||
|
});
|
||||||
|
}
|
||||||
|
public static void LogDocumentGenerated(DocumentTemplate Template, Device Device, User Author)
|
||||||
|
{
|
||||||
|
DocumentsLog.Log(DocumentsLog.EventTypeIds.DocumentGenerated, new object[]
|
||||||
|
{
|
||||||
|
Template.Id,
|
||||||
|
Device.SerialNumber,
|
||||||
|
Author.UserId
|
||||||
|
});
|
||||||
|
}
|
||||||
|
public static void LogDocumentGenerated(DocumentTemplate Template, Job Job, User Author)
|
||||||
|
{
|
||||||
|
DocumentsLog.Log(DocumentsLog.EventTypeIds.DocumentGenerated, new object[]
|
||||||
|
{
|
||||||
|
Template.Id,
|
||||||
|
Job.Id,
|
||||||
|
Author.UserId
|
||||||
|
});
|
||||||
|
}
|
||||||
|
public static void LogDocumentGenerated(DocumentTemplate Template, User User, User Author)
|
||||||
|
{
|
||||||
|
DocumentsLog.Log(DocumentsLog.EventTypeIds.DocumentGenerated, new object[]
|
||||||
|
{
|
||||||
|
Template.Id,
|
||||||
|
User.UserId,
|
||||||
|
Author.UserId
|
||||||
|
});
|
||||||
|
}
|
||||||
|
public static void LogDocumentGenerated(DocumentTemplate Template, object Data, User Author)
|
||||||
|
{
|
||||||
|
if (Data is Job)
|
||||||
|
LogDocumentGenerated(Template, (Job)Data, Author);
|
||||||
|
else if (Data is User)
|
||||||
|
LogDocumentGenerated(Template, (User)Data, Author);
|
||||||
|
else if (Data is Device)
|
||||||
|
LogDocumentGenerated(Template, (Device)Data, Author);
|
||||||
|
else
|
||||||
|
DocumentsLog.Log(DocumentsLog.EventTypeIds.DocumentGenerated, new object[]
|
||||||
|
{
|
||||||
|
Template.Id,
|
||||||
|
"UNKNOWN",
|
||||||
|
Author.UserId
|
||||||
|
});
|
||||||
|
}
|
||||||
|
protected override System.Collections.Generic.List<LogEventType> LoadEventTypes()
|
||||||
|
{
|
||||||
|
return new System.Collections.Generic.List<LogEventType>
|
||||||
|
{
|
||||||
|
new LogEventType
|
||||||
|
{
|
||||||
|
Id = (int)EventTypeIds.ImportStarting,
|
||||||
|
ModuleId = _ModuleId,
|
||||||
|
Name = "Import Starting",
|
||||||
|
Format = "Starting import of document: {1} (SessionId: {0})",
|
||||||
|
Severity = (int)LogEventType.Severities.Information,
|
||||||
|
UseLive = true,
|
||||||
|
UsePersist = true,
|
||||||
|
UseDisplay = true
|
||||||
|
},
|
||||||
|
new LogEventType
|
||||||
|
{
|
||||||
|
Id = (int)EventTypeIds.ImportProgress,
|
||||||
|
ModuleId = _ModuleId,
|
||||||
|
Name = "Import Progress",
|
||||||
|
Format = "Processing: {1}% Complete; Status: {2}",
|
||||||
|
Severity = (int)LogEventType.Severities.Information,
|
||||||
|
UseLive = true,
|
||||||
|
UsePersist = false,
|
||||||
|
UseDisplay = false
|
||||||
|
},
|
||||||
|
new LogEventType
|
||||||
|
{
|
||||||
|
Id = (int)EventTypeIds.ImportFinished,
|
||||||
|
ModuleId = _ModuleId,
|
||||||
|
Name = "Import Finished",
|
||||||
|
Format = "Import of document complete (SessionId: {0})",
|
||||||
|
Severity = (int)LogEventType.Severities.Information,
|
||||||
|
UseLive = true,
|
||||||
|
UsePersist = true,
|
||||||
|
UseDisplay = true
|
||||||
|
},
|
||||||
|
new LogEventType
|
||||||
|
{
|
||||||
|
Id = (int)EventTypeIds.ImportWarning,
|
||||||
|
ModuleId = _ModuleId,
|
||||||
|
Name = "Import Warning",
|
||||||
|
Format = "Import Warning: {1} (SessionId: {0})",
|
||||||
|
Severity = (int)LogEventType.Severities.Warning,
|
||||||
|
UseLive = true,
|
||||||
|
UsePersist = true,
|
||||||
|
UseDisplay = true
|
||||||
|
},
|
||||||
|
new LogEventType
|
||||||
|
{
|
||||||
|
Id = (int)EventTypeIds.ImportError,
|
||||||
|
ModuleId = _ModuleId,
|
||||||
|
Name = "Import Error",
|
||||||
|
Format = "Import Error: {1} (SessionId: {0})",
|
||||||
|
Severity = (int)LogEventType.Severities.Error,
|
||||||
|
UseLive = true,
|
||||||
|
UsePersist = true,
|
||||||
|
UseDisplay = true
|
||||||
|
},
|
||||||
|
new LogEventType
|
||||||
|
{
|
||||||
|
Id = (int)EventTypeIds.ImportAttachmentExpressionEvaluated,
|
||||||
|
ModuleId = _ModuleId,
|
||||||
|
Name = "Import Attachment Expression Evaluated",
|
||||||
|
Format = "The import attachment expression for '{0}' was evaluated for '{1}' (attachment id: {2}) with the result: {3}",
|
||||||
|
Severity = (int)LogEventType.Severities.Information,
|
||||||
|
UseLive = true,
|
||||||
|
UsePersist = true,
|
||||||
|
UseDisplay = true
|
||||||
|
},
|
||||||
|
new LogEventType
|
||||||
|
{
|
||||||
|
Id = (int)EventTypeIds.ImportPageStarting,
|
||||||
|
ModuleId = _ModuleId,
|
||||||
|
Name = "Import Page Starting",
|
||||||
|
Format = "Starting import of page: {1} (SessionId: {0})",
|
||||||
|
Severity = (int)LogEventType.Severities.Information,
|
||||||
|
UseLive = true,
|
||||||
|
UsePersist = true,
|
||||||
|
UseDisplay = true
|
||||||
|
},
|
||||||
|
new LogEventType
|
||||||
|
{
|
||||||
|
Id = (int)EventTypeIds.ImportPageImageUpdate,
|
||||||
|
ModuleId = _ModuleId,
|
||||||
|
Name = "Import Page Image Update",
|
||||||
|
Format = null,
|
||||||
|
Severity = (int)LogEventType.Severities.Information,
|
||||||
|
UseLive = true,
|
||||||
|
UsePersist = false,
|
||||||
|
UseDisplay = false
|
||||||
|
},
|
||||||
|
new LogEventType
|
||||||
|
{
|
||||||
|
Id = (int)EventTypeIds.ImportPageProgress,
|
||||||
|
ModuleId = _ModuleId,
|
||||||
|
Name = "Import Page Progress",
|
||||||
|
Format = "Processing: Page {1}; {2}% Complete; Status: {3}",
|
||||||
|
Severity = (int)LogEventType.Severities.Information,
|
||||||
|
UseLive = true,
|
||||||
|
UsePersist = false,
|
||||||
|
UseDisplay = false
|
||||||
|
},
|
||||||
|
new LogEventType
|
||||||
|
{
|
||||||
|
Id = (int)EventTypeIds.ImportPageDetected,
|
||||||
|
ModuleId = _ModuleId,
|
||||||
|
Name = "Import Page Assigned",
|
||||||
|
Format = "Page {1} of type '{3}' assigned to {4}: '{6}'",
|
||||||
|
Severity = (int)LogEventType.Severities.Information,
|
||||||
|
UseLive = true,
|
||||||
|
UsePersist = true,
|
||||||
|
UseDisplay = true
|
||||||
|
},
|
||||||
|
new LogEventType
|
||||||
|
{
|
||||||
|
Id = (int)EventTypeIds.ImportPageUndetected,
|
||||||
|
ModuleId = _ModuleId,
|
||||||
|
Name = "Import Page Undetected",
|
||||||
|
Format = "Page {1} not detected",
|
||||||
|
Severity = (int)LogEventType.Severities.Warning,
|
||||||
|
UseLive = true,
|
||||||
|
UsePersist = true,
|
||||||
|
UseDisplay = true
|
||||||
|
},
|
||||||
|
new LogEventType
|
||||||
|
{
|
||||||
|
Id = (int)EventTypeIds.ImportPageError,
|
||||||
|
ModuleId = _ModuleId,
|
||||||
|
Name = "Import Page Error",
|
||||||
|
Format = "Page {1}, Import Error: {2}",
|
||||||
|
Severity = (int)LogEventType.Severities.Error,
|
||||||
|
UseLive = true,
|
||||||
|
UsePersist = true,
|
||||||
|
UseDisplay = true
|
||||||
|
},
|
||||||
|
new LogEventType
|
||||||
|
{
|
||||||
|
Id = (int)EventTypeIds.ImportPageUndetectedStored,
|
||||||
|
ModuleId = _ModuleId,
|
||||||
|
Name = "Import Page Undetected Stored",
|
||||||
|
Format = null,
|
||||||
|
Severity = (int)LogEventType.Severities.Information,
|
||||||
|
UseLive = true,
|
||||||
|
UsePersist = false,
|
||||||
|
UseDisplay = false
|
||||||
|
},
|
||||||
|
new LogEventType
|
||||||
|
{
|
||||||
|
Id = (int)EventTypeIds.DocumentGenerated,
|
||||||
|
ModuleId = _ModuleId,
|
||||||
|
Name = "Document Generated",
|
||||||
|
Format = "A '{0}' document was generated for '{1}' by '{2}'",
|
||||||
|
Severity = (int)LogEventType.Severities.Information,
|
||||||
|
UseLive = true,
|
||||||
|
UsePersist = true,
|
||||||
|
UseDisplay = true
|
||||||
|
},
|
||||||
|
new LogEventType
|
||||||
|
{
|
||||||
|
Id = (int)EventTypeIds.DocumentGeneratedWithExpression,
|
||||||
|
ModuleId = _ModuleId,
|
||||||
|
Name = "Document Generated with Expression",
|
||||||
|
Format = "A '{0}' document was generated for '{1}' by '{2}'. The expression returned: {3}",
|
||||||
|
Severity = (int)LogEventType.Severities.Information,
|
||||||
|
UseLive = true,
|
||||||
|
UsePersist = true,
|
||||||
|
UseDisplay = true
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -28,12 +28,12 @@ namespace Disco.BI.DocumentTemplateBI.Importer
|
|||||||
if (!string.IsNullOrEmpty(friendlyFilename))
|
if (!string.IsNullOrEmpty(friendlyFilename))
|
||||||
friendlyFilename = System.IO.Path.GetFileName(friendlyFilename);
|
friendlyFilename = System.IO.Path.GetFileName(friendlyFilename);
|
||||||
|
|
||||||
DocumentImporterLog.LogImportStarting(sessionId, friendlyFilename);
|
DocumentsLog.LogImportStarting(sessionId, friendlyFilename);
|
||||||
|
|
||||||
if (!File.Exists(filename))
|
if (!File.Exists(filename))
|
||||||
{
|
{
|
||||||
DocumentImporterLog.LogImportWarning(sessionId, string.Format("File not found: {0}", filename));
|
DocumentsLog.LogImportWarning(sessionId, string.Format("File not found: {0}", filename));
|
||||||
DocumentImporterLog.LogImportFinished(sessionId);
|
DocumentsLog.LogImportFinished(sessionId);
|
||||||
context.Scheduler.DeleteJob(context.JobDetail.Key);
|
context.Scheduler.DeleteJob(context.JobDetail.Key);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -79,7 +79,7 @@ namespace Disco.BI.DocumentTemplateBI.Importer
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// To Many Errors
|
// To Many Errors
|
||||||
DocumentImporterLog.LogImportError(sessionId, string.Format("To many errors occurred trying to import '{1}' (SessionId: {0})", sessionId, friendlyFilename));
|
DocumentsLog.LogImportError(sessionId, string.Format("To many errors occurred trying to import '{1}' (SessionId: {0})", sessionId, friendlyFilename));
|
||||||
// Move to Errors Folder
|
// Move to Errors Folder
|
||||||
if (File.Exists(filename))
|
if (File.Exists(filename))
|
||||||
{
|
{
|
||||||
@@ -101,14 +101,14 @@ namespace Disco.BI.DocumentTemplateBI.Importer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DocumentImporterLog.LogImportFinished(sessionId);
|
DocumentsLog.LogImportFinished(sessionId);
|
||||||
|
|
||||||
// All Done
|
// All Done
|
||||||
context.Scheduler.DeleteJob(context.JobDetail.Key);
|
context.Scheduler.DeleteJob(context.JobDetail.Key);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
DocumentImporterLog.LogImportWarning(sessionId, string.Format("{0}; Will try again in 10 Seconds", ex.Message));
|
DocumentsLog.LogImportWarning(sessionId, string.Format("{0}; Will try again in 10 Seconds", ex.Message));
|
||||||
// Reschedule Job for 10 seconds
|
// Reschedule Job for 10 seconds
|
||||||
SimpleTriggerImpl trig = new SimpleTriggerImpl(Guid.NewGuid().ToString(), new DateTimeOffset(DateTime.Now.AddSeconds(10)));
|
SimpleTriggerImpl trig = new SimpleTriggerImpl(Guid.NewGuid().ToString(), new DateTimeOffset(DateTime.Now.AddSeconds(10)));
|
||||||
context.Scheduler.RescheduleJob(context.Trigger.Key, trig);
|
context.Scheduler.RescheduleJob(context.Trigger.Key, trig);
|
||||||
|
|||||||
@@ -1,304 +0,0 @@
|
|||||||
using Disco.Services.Logging;
|
|
||||||
using Disco.Services.Logging.Models;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
|
||||||
namespace Disco.BI.DocumentTemplateBI.Importer
|
|
||||||
{
|
|
||||||
public class DocumentImporterLog : LogBase
|
|
||||||
{
|
|
||||||
public enum EventTypeIds
|
|
||||||
{
|
|
||||||
ImportStarting = 10,
|
|
||||||
ImportProgress,
|
|
||||||
ImportFinished,
|
|
||||||
ImportWarning = 15,
|
|
||||||
ImportError,
|
|
||||||
ImportPageStarting = 100,
|
|
||||||
ImportPageImageUpdate = 104,
|
|
||||||
ImportPageProgress,
|
|
||||||
ImportPageDetected = 110,
|
|
||||||
ImportPageUndetected = 115,
|
|
||||||
ImportPageError = 120,
|
|
||||||
ImportPageUndetectedStored = 150
|
|
||||||
}
|
|
||||||
|
|
||||||
private const int _ModuleId = 40;
|
|
||||||
|
|
||||||
public static DocumentImporterLog Current
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return (DocumentImporterLog)LogContext.LogModules[_ModuleId];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string ModuleDescription
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return "Document Importer";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public override int ModuleId
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _ModuleId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public override string ModuleName
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return "DocumentImporter";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
private static void Log(DocumentImporterLog.EventTypeIds EventTypeId, params object[] Args)
|
|
||||||
{
|
|
||||||
DocumentImporterLog.Current.Log((int)EventTypeId, Args);
|
|
||||||
}
|
|
||||||
public static void LogImportStarting(string SessionId, string DocumentName)
|
|
||||||
{
|
|
||||||
DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportStarting, new object[]
|
|
||||||
{
|
|
||||||
SessionId,
|
|
||||||
DocumentName
|
|
||||||
});
|
|
||||||
}
|
|
||||||
public static void LogImportProgress(string SessionId, int? Progress, string Status)
|
|
||||||
{
|
|
||||||
DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportProgress, new object[]
|
|
||||||
{
|
|
||||||
SessionId,
|
|
||||||
Progress,
|
|
||||||
Status
|
|
||||||
});
|
|
||||||
}
|
|
||||||
public static void LogImportFinished(string SessionId)
|
|
||||||
{
|
|
||||||
DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportFinished, new object[]
|
|
||||||
{
|
|
||||||
SessionId
|
|
||||||
});
|
|
||||||
}
|
|
||||||
public static void LogImportWarning(string SessionId, string Message)
|
|
||||||
{
|
|
||||||
DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportWarning, new object[]
|
|
||||||
{
|
|
||||||
SessionId,
|
|
||||||
Message
|
|
||||||
});
|
|
||||||
}
|
|
||||||
public static void LogImportError(string SessionId, string Message)
|
|
||||||
{
|
|
||||||
DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportError, new object[]
|
|
||||||
{
|
|
||||||
SessionId,
|
|
||||||
Message
|
|
||||||
});
|
|
||||||
}
|
|
||||||
public static void LogImportPageStarting(string SessionId, int PageNumber)
|
|
||||||
{
|
|
||||||
DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportPageStarting, new object[]
|
|
||||||
{
|
|
||||||
SessionId,
|
|
||||||
PageNumber
|
|
||||||
});
|
|
||||||
}
|
|
||||||
public static void LogImportPageImageUpdate(string SessionId, int PageNumber)
|
|
||||||
{
|
|
||||||
DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportPageImageUpdate, new object[]
|
|
||||||
{
|
|
||||||
SessionId,
|
|
||||||
PageNumber
|
|
||||||
});
|
|
||||||
}
|
|
||||||
public static void LogImportPageProgress(string SessionId, int PageNumber, int? Progress, string Status)
|
|
||||||
{
|
|
||||||
DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportPageProgress, new object[]
|
|
||||||
{
|
|
||||||
SessionId,
|
|
||||||
PageNumber,
|
|
||||||
Progress,
|
|
||||||
Status
|
|
||||||
});
|
|
||||||
}
|
|
||||||
public static void LogImportPageDetected(string SessionId, int PageNumber, string DocumentTypeId, string DocumentTypeName, string TargetType, string AssignedId, string AssignedName)
|
|
||||||
{
|
|
||||||
DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportPageDetected, new object[]
|
|
||||||
{
|
|
||||||
SessionId,
|
|
||||||
PageNumber,
|
|
||||||
DocumentTypeId,
|
|
||||||
DocumentTypeName,
|
|
||||||
TargetType,
|
|
||||||
AssignedId,
|
|
||||||
AssignedName
|
|
||||||
});
|
|
||||||
}
|
|
||||||
public static void LogImportPageUndetected(string SessionId, int PageNumber)
|
|
||||||
{
|
|
||||||
DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportPageUndetected, new object[]
|
|
||||||
{
|
|
||||||
SessionId,
|
|
||||||
PageNumber
|
|
||||||
});
|
|
||||||
}
|
|
||||||
public static void LogImportPageError(string SessionId, int PageNumber, string Message)
|
|
||||||
{
|
|
||||||
DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportPageError, new object[]
|
|
||||||
{
|
|
||||||
SessionId,
|
|
||||||
PageNumber,
|
|
||||||
Message
|
|
||||||
});
|
|
||||||
}
|
|
||||||
public static void LogImportPageUndetectedStored(string SessionId, int PageNumber)
|
|
||||||
{
|
|
||||||
DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportPageUndetectedStored, new object[]
|
|
||||||
{
|
|
||||||
SessionId,
|
|
||||||
PageNumber
|
|
||||||
});
|
|
||||||
}
|
|
||||||
protected override System.Collections.Generic.List<LogEventType> LoadEventTypes()
|
|
||||||
{
|
|
||||||
return new System.Collections.Generic.List<LogEventType>
|
|
||||||
{
|
|
||||||
new LogEventType
|
|
||||||
{
|
|
||||||
Id = 10,
|
|
||||||
ModuleId = 40,
|
|
||||||
Name = "Import Starting",
|
|
||||||
Format = "Starting import of document: {1} (SessionId: {0})",
|
|
||||||
Severity = 0,
|
|
||||||
UseLive = true,
|
|
||||||
UsePersist = true,
|
|
||||||
UseDisplay = true
|
|
||||||
},
|
|
||||||
new LogEventType
|
|
||||||
{
|
|
||||||
Id = 11,
|
|
||||||
ModuleId = 40,
|
|
||||||
Name = "Import Progress",
|
|
||||||
Format = "Processing: {1}% Complete; Status: {2}",
|
|
||||||
Severity = 0,
|
|
||||||
UseLive = true,
|
|
||||||
UsePersist = false,
|
|
||||||
UseDisplay = false
|
|
||||||
},
|
|
||||||
new LogEventType
|
|
||||||
{
|
|
||||||
Id = 12,
|
|
||||||
ModuleId = 40,
|
|
||||||
Name = "Import Finished",
|
|
||||||
Format = "Import of document complete (SessionId: {0})",
|
|
||||||
Severity = 0,
|
|
||||||
UseLive = true,
|
|
||||||
UsePersist = true,
|
|
||||||
UseDisplay = true
|
|
||||||
},
|
|
||||||
new LogEventType
|
|
||||||
{
|
|
||||||
Id = 15,
|
|
||||||
ModuleId = 40,
|
|
||||||
Name = "Import Warning",
|
|
||||||
Format = "Import Warning: {1} (SessionId: {0})",
|
|
||||||
Severity = 1,
|
|
||||||
UseLive = true,
|
|
||||||
UsePersist = true,
|
|
||||||
UseDisplay = true
|
|
||||||
},
|
|
||||||
new LogEventType
|
|
||||||
{
|
|
||||||
Id = 16,
|
|
||||||
ModuleId = 40,
|
|
||||||
Name = "Import Error",
|
|
||||||
Format = "Import Error: {1} (SessionId: {0})",
|
|
||||||
Severity = 2,
|
|
||||||
UseLive = true,
|
|
||||||
UsePersist = true,
|
|
||||||
UseDisplay = true
|
|
||||||
},
|
|
||||||
new LogEventType
|
|
||||||
{
|
|
||||||
Id = 100,
|
|
||||||
ModuleId = 40,
|
|
||||||
Name = "Import Page Starting",
|
|
||||||
Format = "Starting import of page: {1} (SessionId: {0})",
|
|
||||||
Severity = 0,
|
|
||||||
UseLive = true,
|
|
||||||
UsePersist = true,
|
|
||||||
UseDisplay = true
|
|
||||||
},
|
|
||||||
new LogEventType
|
|
||||||
{
|
|
||||||
Id = 104,
|
|
||||||
ModuleId = 40,
|
|
||||||
Name = "Import Page Image Update",
|
|
||||||
Format = null,
|
|
||||||
Severity = 0,
|
|
||||||
UseLive = true,
|
|
||||||
UsePersist = false,
|
|
||||||
UseDisplay = false
|
|
||||||
},
|
|
||||||
new LogEventType
|
|
||||||
{
|
|
||||||
Id = 105,
|
|
||||||
ModuleId = 40,
|
|
||||||
Name = "Import Page Progress",
|
|
||||||
Format = "Processing: Page {1}; {2}% Complete; Status: {3}",
|
|
||||||
Severity = 0,
|
|
||||||
UseLive = true,
|
|
||||||
UsePersist = false,
|
|
||||||
UseDisplay = false
|
|
||||||
},
|
|
||||||
new LogEventType
|
|
||||||
{
|
|
||||||
Id = 110,
|
|
||||||
ModuleId = 40,
|
|
||||||
Name = "Import Page Assigned",
|
|
||||||
Format = "Page {1} of type '{3}' assigned to {4}: '{6}'",
|
|
||||||
Severity = 0,
|
|
||||||
UseLive = true,
|
|
||||||
UsePersist = true,
|
|
||||||
UseDisplay = true
|
|
||||||
},
|
|
||||||
new LogEventType
|
|
||||||
{
|
|
||||||
Id = 115,
|
|
||||||
ModuleId = 40,
|
|
||||||
Name = "Import Page Undetected",
|
|
||||||
Format = "Page {1} not detected",
|
|
||||||
Severity = 1,
|
|
||||||
UseLive = true,
|
|
||||||
UsePersist = true,
|
|
||||||
UseDisplay = true
|
|
||||||
},
|
|
||||||
new LogEventType
|
|
||||||
{
|
|
||||||
Id = 120,
|
|
||||||
ModuleId = 40,
|
|
||||||
Name = "Import Page Error",
|
|
||||||
Format = "Page {1}, Import Error: {2}",
|
|
||||||
Severity = 2,
|
|
||||||
UseLive = true,
|
|
||||||
UsePersist = true,
|
|
||||||
UseDisplay = true
|
|
||||||
},
|
|
||||||
new LogEventType
|
|
||||||
{
|
|
||||||
Id = 150,
|
|
||||||
ModuleId = 40,
|
|
||||||
Name = "Import Page Undetected Stored",
|
|
||||||
Format = null,
|
|
||||||
Severity = 0,
|
|
||||||
UseLive = true,
|
|
||||||
UsePersist = false,
|
|
||||||
UseDisplay = false
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -7,6 +7,7 @@ using Disco.Data.Repository;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using Disco.BI.DocumentTemplateBI;
|
using Disco.BI.DocumentTemplateBI;
|
||||||
using Disco.Services.Users;
|
using Disco.Services.Users;
|
||||||
|
using Disco.Services.Logging;
|
||||||
|
|
||||||
namespace Disco.BI.Extensions
|
namespace Disco.BI.Extensions
|
||||||
{
|
{
|
||||||
@@ -15,11 +16,11 @@ namespace Disco.BI.Extensions
|
|||||||
|
|
||||||
public static bool ImportPdfAttachment(this DocumentUniqueIdentifier UniqueIdentifier, DiscoDataContext Database, System.IO.Stream PdfContent, byte[] PdfThumbnail)
|
public static bool ImportPdfAttachment(this DocumentUniqueIdentifier UniqueIdentifier, DiscoDataContext Database, System.IO.Stream PdfContent, byte[] PdfThumbnail)
|
||||||
{
|
{
|
||||||
|
|
||||||
UniqueIdentifier.LoadComponents(Database);
|
UniqueIdentifier.LoadComponents(Database);
|
||||||
DocumentTemplate documentTemplate = UniqueIdentifier.DocumentTemplate;
|
DocumentTemplate documentTemplate = UniqueIdentifier.DocumentTemplate;
|
||||||
string filename;
|
string filename;
|
||||||
string comments;
|
string comments;
|
||||||
|
object attachment;
|
||||||
|
|
||||||
if (documentTemplate == null)
|
if (documentTemplate == null)
|
||||||
{
|
{
|
||||||
@@ -42,20 +43,33 @@ namespace Disco.BI.Extensions
|
|||||||
{
|
{
|
||||||
case DocumentTemplate.DocumentTemplateScopes.Device:
|
case DocumentTemplate.DocumentTemplateScopes.Device:
|
||||||
Device d = (Device)UniqueIdentifier.Data;
|
Device d = (Device)UniqueIdentifier.Data;
|
||||||
d.CreateAttachment(Database, creatorUser, filename, DocumentTemplate.PdfMimeType, comments, PdfContent, documentTemplate, PdfThumbnail);
|
attachment = d.CreateAttachment(Database, creatorUser, filename, DocumentTemplate.PdfMimeType, comments, PdfContent, documentTemplate, PdfThumbnail);
|
||||||
return true;
|
break;
|
||||||
case DocumentTemplate.DocumentTemplateScopes.Job:
|
case DocumentTemplate.DocumentTemplateScopes.Job:
|
||||||
Job j = (Job)UniqueIdentifier.Data;
|
Job j = (Job)UniqueIdentifier.Data;
|
||||||
j.CreateAttachment(Database, creatorUser, filename, DocumentTemplate.PdfMimeType, comments, PdfContent, documentTemplate, PdfThumbnail);
|
attachment = j.CreateAttachment(Database, creatorUser, filename, DocumentTemplate.PdfMimeType, comments, PdfContent, documentTemplate, PdfThumbnail);
|
||||||
return true;
|
break;
|
||||||
case DocumentTemplate.DocumentTemplateScopes.User:
|
case DocumentTemplate.DocumentTemplateScopes.User:
|
||||||
User u = (User)UniqueIdentifier.Data;
|
User u = (User)UniqueIdentifier.Data;
|
||||||
u.CreateAttachment(Database, creatorUser, filename, DocumentTemplate.PdfMimeType, comments, PdfContent, documentTemplate, PdfThumbnail);
|
attachment = u.CreateAttachment(Database, creatorUser, filename, DocumentTemplate.PdfMimeType, comments, PdfContent, documentTemplate, PdfThumbnail);
|
||||||
return true;
|
break;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (documentTemplate != null && !string.IsNullOrWhiteSpace(documentTemplate.OnImportAttachmentExpression))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var expressionResult = documentTemplate.EvaluateOnAttachmentImportExpression(attachment, Database, creatorUser, UniqueIdentifier.TimeStamp);
|
||||||
|
DocumentsLog.LogImportAttachmentExpressionEvaluated(documentTemplate, UniqueIdentifier.Data, attachment, expressionResult);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
SystemLog.LogException("Document Importer - OnImportAttachmentExpression", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string RepositoryFilename(this DeviceAttachment da, DiscoDataContext Database)
|
public static string RepositoryFilename(this DeviceAttachment da, DiscoDataContext Database)
|
||||||
|
|||||||
@@ -75,16 +75,29 @@ namespace Disco.BI.Extensions
|
|||||||
}
|
}
|
||||||
public static System.IO.Stream GeneratePdf(this DocumentTemplate dt, DiscoDataContext Database, object Data, User CreatorUser, System.DateTime TimeStamp, DocumentState State, bool FlattenFields = false)
|
public static System.IO.Stream GeneratePdf(this DocumentTemplate dt, DiscoDataContext Database, object Data, User CreatorUser, System.DateTime TimeStamp, DocumentState State, bool FlattenFields = false)
|
||||||
{
|
{
|
||||||
return Interop.Pdf.PdfGenerator.GenerateFromTemplate(dt, Database, Data, CreatorUser, TimeStamp, State, FlattenFields);
|
bool generateExpression = !string.IsNullOrEmpty(dt.OnGenerateExpression);
|
||||||
|
string generateExpressionResult = null;
|
||||||
|
|
||||||
|
if (generateExpression)
|
||||||
|
generateExpressionResult = dt.EvaluateOnGenerateExpression(Data, Database, CreatorUser, TimeStamp, State);
|
||||||
|
|
||||||
|
var pdfStream = Interop.Pdf.PdfGenerator.GenerateFromTemplate(dt, Database, Data, CreatorUser, TimeStamp, State, FlattenFields);
|
||||||
|
|
||||||
|
if (generateExpression)
|
||||||
|
DocumentsLog.LogDocumentGenerated(dt, Data, CreatorUser, generateExpressionResult);
|
||||||
|
else
|
||||||
|
DocumentsLog.LogDocumentGenerated(dt, Data, CreatorUser);
|
||||||
|
|
||||||
|
return pdfStream;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Expression FilterExpressionFromCache(this DocumentTemplate dt)
|
public static Expression FilterExpressionFromCache(this DocumentTemplate dt)
|
||||||
{
|
{
|
||||||
return ExpressionCache.GetValue("DocumentTemplateFilterExpression", dt.Id, () => { return Expression.TokenizeSingleDynamic(null, dt.FilterExpression, 0); });
|
return ExpressionCache.GetValue("DocumentTemplate_FilterExpression", dt.Id, () => { return Expression.TokenizeSingleDynamic(null, dt.FilterExpression, 0); });
|
||||||
}
|
}
|
||||||
public static void FilterExpressionInvalidateCache(this DocumentTemplate dt)
|
public static void FilterExpressionInvalidateCache(this DocumentTemplate dt)
|
||||||
{
|
{
|
||||||
ExpressionCache.InvalidateKey("DocumentTemplateFilterExpression", dt.Id);
|
ExpressionCache.InvalidateKey("DocumentTemplate_FilterExpression", dt.Id);
|
||||||
}
|
}
|
||||||
public static bool FilterExpressionMatches(this DocumentTemplate dt, object Data, DiscoDataContext Database, User User, System.DateTime TimeStamp, DocumentState State)
|
public static bool FilterExpressionMatches(this DocumentTemplate dt, object Data, DiscoDataContext Database, User User, System.DateTime TimeStamp, DocumentState State)
|
||||||
{
|
{
|
||||||
@@ -112,6 +125,64 @@ namespace Disco.BI.Extensions
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Expression OnImportAttachmentExpressionFromCache(this DocumentTemplate dt)
|
||||||
|
{
|
||||||
|
return ExpressionCache.GetValue("DocumentTemplate_OnImportExpression", dt.Id, () => { return Expression.TokenizeSingleDynamic(null, dt.OnImportAttachmentExpression, 0); });
|
||||||
|
}
|
||||||
|
public static void OnImportAttachmentExpressionInvalidateCache(this DocumentTemplate dt)
|
||||||
|
{
|
||||||
|
ExpressionCache.InvalidateKey("DocumentTemplate_OnImportExpression", dt.Id);
|
||||||
|
}
|
||||||
|
public static string EvaluateOnAttachmentImportExpression(this DocumentTemplate dt, object Data, DiscoDataContext Database, User User, System.DateTime TimeStamp)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(dt.OnImportAttachmentExpression))
|
||||||
|
{
|
||||||
|
Expression compiledExpression = dt.OnImportAttachmentExpressionFromCache();
|
||||||
|
System.Collections.IDictionary evaluatorVariables = Expression.StandardVariables(dt, Database, User, TimeStamp, null);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
object result = compiledExpression.EvaluateFirst<object>(Data, evaluatorVariables);
|
||||||
|
if (result == null)
|
||||||
|
return null;
|
||||||
|
else
|
||||||
|
return result.ToString();
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Expression OnGenerateExpressionFromCache(this DocumentTemplate dt)
|
||||||
|
{
|
||||||
|
return ExpressionCache.GetValue("DocumentTemplate_OnGenerateExpression", dt.Id, () => { return Expression.TokenizeSingleDynamic(null, dt.OnGenerateExpression, 0); });
|
||||||
|
}
|
||||||
|
public static void OnGenerateExpressionInvalidateCache(this DocumentTemplate dt)
|
||||||
|
{
|
||||||
|
ExpressionCache.InvalidateKey("DocumentTemplate_OnGenerateExpression", dt.Id);
|
||||||
|
}
|
||||||
|
public static string EvaluateOnGenerateExpression(this DocumentTemplate dt, object Data, DiscoDataContext Database, User User, System.DateTime TimeStamp, DocumentState State)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(dt.OnGenerateExpression))
|
||||||
|
{
|
||||||
|
Expression compiledExpression = dt.OnGenerateExpressionFromCache();
|
||||||
|
System.Collections.IDictionary evaluatorVariables = Expression.StandardVariables(dt, Database, User, TimeStamp, State);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
object result = compiledExpression.EvaluateFirst<object>(Data, evaluatorVariables);
|
||||||
|
return result.ToString();
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public static string GetDataId(this DocumentTemplate dt, object Data)
|
public static string GetDataId(this DocumentTemplate dt, object Data)
|
||||||
{
|
{
|
||||||
if (Data is string)
|
if (Data is string)
|
||||||
|
|||||||
@@ -307,7 +307,7 @@ namespace Disco.BI.Interop.Pdf
|
|||||||
{
|
{
|
||||||
DetectPageResult result = new DetectPageResult() { PageNumber = PageNumber };
|
DetectPageResult result = new DetectPageResult() { PageNumber = PageNumber };
|
||||||
|
|
||||||
DocumentImporterLog.LogImportPageProgress(SessionId, PageNumber, 10, "Loading Page Images");
|
DocumentsLog.LogImportPageProgress(SessionId, PageNumber, 10, "Loading Page Images");
|
||||||
|
|
||||||
using (DisposableImageCollection pageImages = pdfReader.PdfPageImages(PageNumber))
|
using (DisposableImageCollection pageImages = pdfReader.PdfPageImages(PageNumber))
|
||||||
{
|
{
|
||||||
@@ -317,13 +317,13 @@ namespace Disco.BI.Interop.Pdf
|
|||||||
var pageThumbnailFilename = Path.Combine(DataStoreSessionCacheLocation, string.Format("{0}-{1}", SessionId, PageNumber));
|
var pageThumbnailFilename = Path.Combine(DataStoreSessionCacheLocation, string.Format("{0}-{1}", SessionId, PageNumber));
|
||||||
|
|
||||||
result.ThumbnailImage.Montage.SavePng(pageThumbnailFilename);
|
result.ThumbnailImage.Montage.SavePng(pageThumbnailFilename);
|
||||||
DocumentImporterLog.LogImportPageImageUpdate(SessionId, PageNumber);
|
DocumentsLog.LogImportPageImageUpdate(SessionId, PageNumber);
|
||||||
|
|
||||||
double pageProgressInterval = 90 / pageImages.Count;
|
double pageProgressInterval = 90 / pageImages.Count;
|
||||||
|
|
||||||
foreach (var pageImageOriginal in pageImages)
|
foreach (var pageImageOriginal in pageImages)
|
||||||
{
|
{
|
||||||
DocumentImporterLog.LogImportPageProgress(SessionId, PageNumber, (int)(10 + (pageProgressInterval * pageImages.IndexOf(pageImageOriginal))), String.Format("Processing Page Image {0} of {1}", pageImages.IndexOf(pageImageOriginal) + 1, pageImages.Count));
|
DocumentsLog.LogImportPageProgress(SessionId, PageNumber, (int)(10 + (pageProgressInterval * pageImages.IndexOf(pageImageOriginal))), String.Format("Processing Page Image {0} of {1}", pageImages.IndexOf(pageImageOriginal) + 1, pageImages.Count));
|
||||||
|
|
||||||
using (var zxingResult = DetectImage(Database, pageImageOriginal, SessionId, detectDocumentTemplates, StateHints))
|
using (var zxingResult = DetectImage(Database, pageImageOriginal, SessionId, detectDocumentTemplates, StateHints))
|
||||||
{
|
{
|
||||||
@@ -343,7 +343,7 @@ namespace Disco.BI.Interop.Pdf
|
|||||||
}
|
}
|
||||||
|
|
||||||
result.ThumbnailImage.Montage.SavePng(pageThumbnailFilename);
|
result.ThumbnailImage.Montage.SavePng(pageThumbnailFilename);
|
||||||
DocumentImporterLog.LogImportPageImageUpdate(SessionId, PageNumber);
|
DocumentsLog.LogImportPageImageUpdate(SessionId, PageNumber);
|
||||||
|
|
||||||
result.AttachmentThumbnailImage = new MemoryStream();
|
result.AttachmentThumbnailImage = new MemoryStream();
|
||||||
using (var attachmentThumbImage = pageImages.BuildImageMontage(48, 48, true))
|
using (var attachmentThumbImage = pageImages.BuildImageMontage(48, 48, true))
|
||||||
@@ -381,7 +381,7 @@ namespace Disco.BI.Interop.Pdf
|
|||||||
{
|
{
|
||||||
var dataStoreUnassignedLocation = DataStore.CreateLocation(Database, "DocumentDropBox_Unassigned");
|
var dataStoreUnassignedLocation = DataStore.CreateLocation(Database, "DocumentDropBox_Unassigned");
|
||||||
|
|
||||||
DocumentImporterLog.LogImportProgress(SessionId, 0, "Reading File");
|
DocumentsLog.LogImportProgress(SessionId, 0, "Reading File");
|
||||||
|
|
||||||
using (FileStream fs = new FileStream(Filename, FileMode.Open, FileAccess.ReadWrite, FileShare.None))
|
using (FileStream fs = new FileStream(Filename, FileMode.Open, FileAccess.ReadWrite, FileShare.None))
|
||||||
{
|
{
|
||||||
@@ -398,8 +398,8 @@ namespace Disco.BI.Interop.Pdf
|
|||||||
|
|
||||||
for (int PageNumber = 1; PageNumber <= pdfReader.NumberOfPages; PageNumber++)
|
for (int PageNumber = 1; PageNumber <= pdfReader.NumberOfPages; PageNumber++)
|
||||||
{
|
{
|
||||||
DocumentImporterLog.LogImportProgress(SessionId, (int)(PageNumber * progressInterval), string.Format("Processing Page {0} of {1}", PageNumber, pdfReader.NumberOfPages));
|
DocumentsLog.LogImportProgress(SessionId, (int)(PageNumber * progressInterval), string.Format("Processing Page {0} of {1}", PageNumber, pdfReader.NumberOfPages));
|
||||||
DocumentImporterLog.LogImportPageStarting(SessionId, PageNumber);
|
DocumentsLog.LogImportPageStarting(SessionId, PageNumber);
|
||||||
|
|
||||||
using (var pageResult = DetectPage(Database, pdfReader, PageNumber, SessionId, dataStoreSessionPagesCacheLocation, detectDocumentTemplates, detectStateHints))
|
using (var pageResult = DetectPage(Database, pdfReader, PageNumber, SessionId, dataStoreSessionPagesCacheLocation, detectDocumentTemplates, detectStateHints))
|
||||||
{
|
{
|
||||||
@@ -409,19 +409,25 @@ namespace Disco.BI.Interop.Pdf
|
|||||||
pdfPagesAssigned.Add(PageNumber, new Tuple<DocumentUniqueIdentifier, byte[]>(docId, pageResult.AttachmentThumbnailImage.ToArray()));
|
pdfPagesAssigned.Add(PageNumber, new Tuple<DocumentUniqueIdentifier, byte[]>(docId, pageResult.AttachmentThumbnailImage.ToArray()));
|
||||||
|
|
||||||
docId.LoadComponents(Database);
|
docId.LoadComponents(Database);
|
||||||
DocumentImporterLog.LogImportPageDetected(SessionId, PageNumber, docId.TemplateTypeId, docId.DocumentTemplate.Description, docId.DocumentTemplate.Scope, docId.DataId, docId.DataDescription);
|
DocumentsLog.LogImportPageDetected(SessionId, PageNumber, docId.TemplateTypeId, docId.DocumentTemplate.Description, docId.DocumentTemplate.Scope, docId.DataId, docId.DataDescription);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Undetected Page - Write Preview-Images while still in Memory
|
// Undetected Page - Write Preview-Images while still in Memory
|
||||||
DocumentImporterLog.LogImportPageUndetected(SessionId, PageNumber);
|
DocumentsLog.LogImportPageUndetected(SessionId, PageNumber);
|
||||||
|
|
||||||
// Thumbnail:
|
// Thumbnail:
|
||||||
string unassignedImageThumbnailFilename = Path.Combine(dataStoreUnassignedLocation, string.Format("{0}_{1}_thumbnail.png", SessionId, PageNumber));
|
string unassignedImageThumbnailFilename = Path.Combine(dataStoreUnassignedLocation, string.Format("{0}_{1}_thumbnail.png", SessionId, PageNumber));
|
||||||
pageResult.ThumbnailImage.Montage.SavePng(unassignedImageThumbnailFilename);
|
if (pageResult.ThumbnailImage != null)
|
||||||
|
pageResult.ThumbnailImage.Montage.SavePng(unassignedImageThumbnailFilename);
|
||||||
|
else
|
||||||
|
Disco.Properties.Resources.MimeType_pdf48.SavePng(unassignedImageThumbnailFilename);
|
||||||
// Large Preview
|
// Large Preview
|
||||||
string unassignedImageFilename = Path.Combine(dataStoreUnassignedLocation, string.Format("{0}_{1}.jpg", SessionId, PageNumber));
|
string unassignedImageFilename = Path.Combine(dataStoreUnassignedLocation, string.Format("{0}_{1}.jpg", SessionId, PageNumber));
|
||||||
pageResult.UndetectedPageImage.Montage.SaveJpg(90, unassignedImageFilename);
|
if (pageResult.UndetectedPageImage != null)
|
||||||
|
pageResult.UndetectedPageImage.Montage.SaveJpg(90, unassignedImageFilename);
|
||||||
|
else
|
||||||
|
Disco.Properties.Resources.MimeType_pdf48.SaveJpg(90, unassignedImageFilename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -435,7 +441,7 @@ namespace Disco.BI.Interop.Pdf
|
|||||||
|
|
||||||
foreach (var documentPortion in assignedDocuments)
|
foreach (var documentPortion in assignedDocuments)
|
||||||
{
|
{
|
||||||
DocumentImporterLog.LogImportProgress(SessionId, (int)(70 + (assignedDocuments.IndexOf(documentPortion) * progressInterval)), string.Format("Importing Documents {0} of {1}", assignedDocuments.IndexOf(documentPortion) + 1, assignedDocuments.Count));
|
DocumentsLog.LogImportProgress(SessionId, (int)(70 + (assignedDocuments.IndexOf(documentPortion) * progressInterval)), string.Format("Importing Documents {0} of {1}", assignedDocuments.IndexOf(documentPortion) + 1, assignedDocuments.Count));
|
||||||
|
|
||||||
var documentPortionInfo = documentPortion.First().Value;
|
var documentPortionInfo = documentPortion.First().Value;
|
||||||
var documentPortionIdentifier = documentPortionInfo.Item1;
|
var documentPortionIdentifier = documentPortionInfo.Item1;
|
||||||
@@ -506,7 +512,7 @@ namespace Disco.BI.Interop.Pdf
|
|||||||
//dataStoreUnassignedLocation
|
//dataStoreUnassignedLocation
|
||||||
foreach (var PageNumber in pdfPagesUnassigned)
|
foreach (var PageNumber in pdfPagesUnassigned)
|
||||||
{
|
{
|
||||||
DocumentImporterLog.LogImportProgress(SessionId, (int)(90 + (pdfPagesUnassigned.IndexOf(PageNumber) * progressInterval)), string.Format("Processing Undetected Documents {0} of {1}", pdfPagesUnassigned.IndexOf(PageNumber) + 1, pdfPagesUnassigned.Count));
|
DocumentsLog.LogImportProgress(SessionId, (int)(90 + (pdfPagesUnassigned.IndexOf(PageNumber) * progressInterval)), string.Format("Processing Undetected Documents {0} of {1}", pdfPagesUnassigned.IndexOf(PageNumber) + 1, pdfPagesUnassigned.Count));
|
||||||
|
|
||||||
using (MemoryStream msBuilder = new MemoryStream())
|
using (MemoryStream msBuilder = new MemoryStream())
|
||||||
{
|
{
|
||||||
@@ -527,14 +533,14 @@ namespace Disco.BI.Interop.Pdf
|
|||||||
|
|
||||||
File.WriteAllBytes(Path.Combine(dataStoreUnassignedLocation, string.Format("{0}_{1}.pdf", SessionId, PageNumber)), msBuilder.ToArray());
|
File.WriteAllBytes(Path.Combine(dataStoreUnassignedLocation, string.Format("{0}_{1}.pdf", SessionId, PageNumber)), msBuilder.ToArray());
|
||||||
|
|
||||||
DocumentImporterLog.LogImportPageUndetectedStored(SessionId, PageNumber);
|
DocumentsLog.LogImportPageUndetectedStored(SessionId, PageNumber);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DocumentImporterLog.LogImportProgress(SessionId, 100, "Finished Importing Document");
|
DocumentsLog.LogImportProgress(SessionId, 100, "Finished Importing Document");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -152,7 +152,7 @@
|
|||||||
<Compile Include="BI\DocumentTemplateBI\Importer\DocumentDropBoxMonitor.cs" />
|
<Compile Include="BI\DocumentTemplateBI\Importer\DocumentDropBoxMonitor.cs" />
|
||||||
<Compile Include="BI\DocumentTemplateBI\Importer\DocumentImporterJob.cs" />
|
<Compile Include="BI\DocumentTemplateBI\Importer\DocumentImporterJob.cs" />
|
||||||
<Compile Include="BI\DocumentTemplateBI\Importer\DocumentImporterCleanCacheJob.cs" />
|
<Compile Include="BI\DocumentTemplateBI\Importer\DocumentImporterCleanCacheJob.cs" />
|
||||||
<Compile Include="BI\DocumentTemplateBI\Importer\DocumentImporterLog.cs" />
|
<Compile Include="BI\DocumentTemplateBI\DocumentsLog.cs" />
|
||||||
<Compile Include="BI\Expressions\ExpressionCache.cs" />
|
<Compile Include="BI\Expressions\ExpressionCache.cs" />
|
||||||
<Compile Include="BI\Interop\MimeTypes.cs" />
|
<Compile Include="BI\Interop\MimeTypes.cs" />
|
||||||
<Compile Include="BI\Interop\Pdf\PdfGenerator.cs" />
|
<Compile Include="BI\Interop\Pdf\PdfGenerator.cs" />
|
||||||
@@ -189,6 +189,7 @@
|
|||||||
<EmbeddedResource Include="Properties\Resources.resx">
|
<EmbeddedResource Include="Properties\Resources.resx">
|
||||||
<Generator>ResXFileCodeGenerator</Generator>
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -146,6 +146,10 @@
|
|||||||
<Compile Include="Migrations\201407100413342_DBv15.Designer.cs">
|
<Compile Include="Migrations\201407100413342_DBv15.Designer.cs">
|
||||||
<DependentUpon>201407100413342_DBv15.cs</DependentUpon>
|
<DependentUpon>201407100413342_DBv15.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Migrations\201407260624238_DBv16.cs" />
|
||||||
|
<Compile Include="Migrations\201407260624238_DBv16.Designer.cs">
|
||||||
|
<DependentUpon>201407260624238_DBv16.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Migrations\Configuration.cs" />
|
<Compile Include="Migrations\Configuration.cs" />
|
||||||
<Compile Include="Migrations\DiscoDataMigrator.cs" />
|
<Compile Include="Migrations\DiscoDataMigrator.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
@@ -206,6 +210,9 @@
|
|||||||
<EmbeddedResource Include="Migrations\201407100413342_DBv15.resx">
|
<EmbeddedResource Include="Migrations\201407100413342_DBv15.resx">
|
||||||
<DependentUpon>201407100413342_DBv15.cs</DependentUpon>
|
<DependentUpon>201407100413342_DBv15.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Migrations\201407260624238_DBv16.resx">
|
||||||
|
<DependentUpon>201407260624238_DBv16.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Properties\Resources.resx">
|
<EmbeddedResource Include="Properties\Resources.resx">
|
||||||
<Generator>ResXFileCodeGenerator</Generator>
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
@@ -219,7 +226,7 @@
|
|||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<ProjectExtensions>
|
<ProjectExtensions>
|
||||||
<VisualStudio>
|
<VisualStudio>
|
||||||
<UserProperties BuildVersion_BuildAction="Both" BuildVersion_UseGlobalSettings="False" BuildVersion_DetectChanges="False" BuildVersion_StartDate="2014/6/1" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_UpdateFileVersion="True" />
|
<UserProperties BuildVersion_UpdateFileVersion="True" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_StartDate="2014/6/1" BuildVersion_DetectChanges="False" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildAction="Both" />
|
||||||
</VisualStudio>
|
</VisualStudio>
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
namespace Disco.Data.Migrations
|
||||||
|
{
|
||||||
|
using System.Data.Entity.Migrations;
|
||||||
|
using System.Data.Entity.Migrations.Infrastructure;
|
||||||
|
using System.Resources;
|
||||||
|
|
||||||
|
public sealed partial class DBv16 : IMigrationMetadata
|
||||||
|
{
|
||||||
|
private readonly ResourceManager Resources = new ResourceManager(typeof(DBv16));
|
||||||
|
|
||||||
|
string IMigrationMetadata.Id
|
||||||
|
{
|
||||||
|
get { return "201407260624238_DBv16"; }
|
||||||
|
}
|
||||||
|
|
||||||
|
string IMigrationMetadata.Source
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
string IMigrationMetadata.Target
|
||||||
|
{
|
||||||
|
get { return Resources.GetString("Target"); }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
namespace Disco.Data.Migrations
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
using System.Data.Entity.Migrations;
|
||||||
|
|
||||||
|
public partial class DBv16 : DbMigration
|
||||||
|
{
|
||||||
|
public override void Up()
|
||||||
|
{
|
||||||
|
AddColumn("dbo.DocumentTemplates", "OnGenerateExpression", c => c.String());
|
||||||
|
AddColumn("dbo.DocumentTemplates", "OnImportAttachmentExpression", c => c.String());
|
||||||
|
AlterColumn("dbo.DocumentTemplates", "FilterExpression", c => c.String());
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Down()
|
||||||
|
{
|
||||||
|
AlterColumn("dbo.DocumentTemplates", "FilterExpression", c => c.String(maxLength: 250));
|
||||||
|
DropColumn("dbo.DocumentTemplates", "OnImportAttachmentExpression");
|
||||||
|
DropColumn("dbo.DocumentTemplates", "OnGenerateExpression");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,123 @@
|
|||||||
|
<?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>
|
||||||
|
<data name="Target" xml:space="preserve">
|
||||||
|
<value>H4sIAAAAAAAEAO19WXPcSJLm+5rtf6DxaXfMRtRVKqlNmjGWKFWTLYlsUlX9SIMygySmkEAOgFSL/df2YX/S/oWNwBmHe1wIHMniS5WY4fBw9/jC43b/f//n/779zx+b5OA7yYs4S98dPnvy9PCApKtsHae37w535c2/vz78z//4n//j7Yf15sfB7y3dC0ZHv0yLd4d3Zbn9y9FRsbojm6h4solXeVZkN+WTVbY5itbZ0fOnT98cPXt2RCiLQ8rr4ODt5S4t4w2p/qB/vs/SFdmWuyj5nK1JUjS/05KriuvBl2hDim20Iu8OT+JilT05icroySXZZkVcZvn94cFxEkdUmCuS3BwebF/+5beCXJV5lt5ebaMyjpKv91tCy2+ipCCN6H/ZvrSV/ulzJv1RlKZZSdllqZf2h51eVLMP1ALlPROr0u7dITXCTXy7yyv+pyURyOkHfyP3wg/0p4s825K8vL8kNw2TqxX95fDgyExJ2cl0b4/kOrrvRPZMavpHmVOUHB58jH+Q9SeS3pZ3nYE/Rz/aX15TqPyWxhRT9Jsy39HSL7skib4lpCM/0tZaiTpxnb9Hyc5VU/pPTbX133ytb496EGihcZKtdhuSll/JZptEJfFBxunavbnZN04WeDHY7iekWOXxtu5jTnU//2lw5T7wfjW00o9xUpL8w49tTorCXW1X0KkCnKe/kpRQv0NmFeJ0s83y8rgso9UdA/uMwnyknawk6ccs37R1/5JlCYlSDzx/j1ek+BSnf5D1r3m2206uDR0K82kF+BJ9j2+rcUwS5Sz7drX7Vo3FhweXJKloirt4W4/cT2RHdy188DHPNpdZAjhEnu76KtvlK9aNMwvir1F+S0pPv9wzCuORQTJaCathEv/9fLAL5aR1qvmn+QaOZ0/dtUYR3vuvkVHeAtcK5W2X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3JIx+Cveu5V3zgtOp9RuYyhk6kmNDrF4fs7ZtdL8t+7OFD4VYz3PAcKsjRWZ03ejJeh40UUj6Ii4zuPhu087Dxf0+lpFAd6XQuwXYJ+niPG86BShJqpKkznsfBp+j2r3vysSBzooFRiOdeBKUvtWqfnmHyG0VYebtbUcpxv1tRKMNKsSTc62j4/0fPQvkvRfYpNw6y/dz6LxYZQX0NgR7bW3/mYwP+AFxtffdXvv3fSvv3MR/nuW1fdkaHXVnX0c63myFc2imOfDtLbZjcCFUKzJ2H8xllj7f6ETl9gkLTVFvxUqyvwhY2m0Gceb4HDvh60kHvwsphpKoYXfkh3NVrthi6+57xPuPe3Ih/KxcTpsqAY44+7BB2v6Y2Bx9lPYPBLjNYndnroYOmW8ga+IgjUAk47dXQ2oo93bxCoDLk+qKe00SLYZcIOzA9ogHq8TPjQLxMy1M6awIoJMEcerbGSaLiMZ5bJNISxz8s38cnXJwzgPHJ6jQVEeH5MtTFlXjlDDL4mZwYWUFkoRgIpizQBgqc/zAAn8wc1foyPMmnNs78sfmDxUYy+jI+8gfgzhQTxaSpd0FfQSiXQe2iUyCzzuNFTVBNpAqgYiS1aYIQEHVzy+Ic0yNA/v8drDxf/6uVQV9FVna7Jj2F7sz6PGF4P3gpMS+5x8i9xGrEb+6Yp4qsXr186X+FLGe3gu/PVS7aqbwa5FpQk7D1OyDDgk851/IcNzhWg44ZKg7gtgHCQtzrelXdZHv+rEp1V9JC81TxbZVM+tIRurBdnxegPz3B8Line truncated
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
@@ -20,14 +20,14 @@ namespace Disco.Models.Repository
|
|||||||
[Required, StringLength(10)]
|
[Required, StringLength(10)]
|
||||||
public string ShortName { get; set; }
|
public string ShortName { get; set; }
|
||||||
|
|
||||||
[StringLength(500)]
|
[StringLength(500), DataType(DataType.MultilineText)]
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
|
|
||||||
public int? DefaultOrganisationAddress { get; set; }
|
public int? DefaultOrganisationAddress { get; set; }
|
||||||
|
|
||||||
// Migration from DeviceProfile Configuration
|
// Migration from DeviceProfile Configuration
|
||||||
// 2012-06-14 G#
|
// 2012-06-14 G#
|
||||||
[Required]
|
[Required, DataType(DataType.MultilineText)]
|
||||||
public string ComputerNameTemplate { get; set; }
|
public string ComputerNameTemplate { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
|
|||||||
@@ -18,8 +18,12 @@ namespace Disco.Models.Repository
|
|||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
[Required, StringLength(6)]
|
[Required, StringLength(6)]
|
||||||
public string Scope { get; set; }
|
public string Scope { get; set; }
|
||||||
[StringLength(250), DataType(DataType.MultilineText)]
|
[DataType(DataType.MultilineText)]
|
||||||
public string FilterExpression { get; set; }
|
public string FilterExpression { get; set; }
|
||||||
|
[DataType(DataType.MultilineText)]
|
||||||
|
public string OnGenerateExpression { get; set; }
|
||||||
|
[DataType(DataType.MultilineText)]
|
||||||
|
public string OnImportAttachmentExpression { get; set; }
|
||||||
|
|
||||||
// Feature Request 2012-05-10 by G#: https://disco.uservoice.com/forums/159707-feedback/suggestions/2811092-document-template-option-flatten-form-on-generate
|
// Feature Request 2012-05-10 by G#: https://disco.uservoice.com/forums/159707-feedback/suggestions/2811092-document-template-option-flatten-form-on-generate
|
||||||
public bool FlattenForm { get; set; }
|
public bool FlattenForm { get; set; }
|
||||||
|
|||||||
@@ -45,8 +45,8 @@ namespace Disco.Services.Authorization
|
|||||||
{ "Config.DeviceProfile.Delete", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DeviceProfile.Delete, (c, v) => c.Config.DeviceProfile.Delete = v, "Delete Device Profiles", "Can delete device profiles", false) },
|
{ "Config.DeviceProfile.Delete", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DeviceProfile.Delete, (c, v) => c.Config.DeviceProfile.Delete = v, "Delete Device Profiles", "Can delete device profiles", false) },
|
||||||
{ "Config.DeviceProfile.Show", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DeviceProfile.Show, (c, v) => c.Config.DeviceProfile.Show = v, "Show Device Profiles", "Can show device profiles", false) },
|
{ "Config.DeviceProfile.Show", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DeviceProfile.Show, (c, v) => c.Config.DeviceProfile.Show = v, "Show Device Profiles", "Can show device profiles", false) },
|
||||||
{ "Config.DocumentTemplate.BulkGenerate", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DocumentTemplate.BulkGenerate, (c, v) => c.Config.DocumentTemplate.BulkGenerate = v, "Bulk Generate Document Templates", "Can bulk generate document templates", false) },
|
{ "Config.DocumentTemplate.BulkGenerate", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DocumentTemplate.BulkGenerate, (c, v) => c.Config.DocumentTemplate.BulkGenerate = v, "Bulk Generate Document Templates", "Can bulk generate document templates", false) },
|
||||||
|
{ "Config.DocumentTemplate.ConfigureFilterExpression", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DocumentTemplate.ConfigureFilterExpression, (c, v) => c.Config.DocumentTemplate.ConfigureFilterExpression = v, "Configure Advanced Expression", "Can configure filter, generate and import expressions for document templates", false) },
|
||||||
{ "Config.DocumentTemplate.Configure", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DocumentTemplate.Configure, (c, v) => c.Config.DocumentTemplate.Configure = v, "Configure Document Templates", "Can configure document templates", false) },
|
{ "Config.DocumentTemplate.Configure", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DocumentTemplate.Configure, (c, v) => c.Config.DocumentTemplate.Configure = v, "Configure Document Templates", "Can configure document templates", false) },
|
||||||
{ "Config.DocumentTemplate.ConfigureFilterExpression", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DocumentTemplate.ConfigureFilterExpression, (c, v) => c.Config.DocumentTemplate.ConfigureFilterExpression = v, "Configure Filter Expression", "Can configure filter expressions for document templates", false) },
|
|
||||||
{ "Config.DocumentTemplate.Create", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DocumentTemplate.Create, (c, v) => c.Config.DocumentTemplate.Create = v, "Create Document Templates", "Can create document templates", false) },
|
{ "Config.DocumentTemplate.Create", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DocumentTemplate.Create, (c, v) => c.Config.DocumentTemplate.Create = v, "Create Document Templates", "Can create document templates", false) },
|
||||||
{ "Config.DocumentTemplate.Delete", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DocumentTemplate.Delete, (c, v) => c.Config.DocumentTemplate.Delete = v, "Delete Document Templates", "Can delete document templates", false) },
|
{ "Config.DocumentTemplate.Delete", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DocumentTemplate.Delete, (c, v) => c.Config.DocumentTemplate.Delete = v, "Delete Document Templates", "Can delete document templates", false) },
|
||||||
{ "Config.DocumentTemplate.UndetectedPages", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DocumentTemplate.UndetectedPages, (c, v) => c.Config.DocumentTemplate.UndetectedPages = v, "Process Undetected Pages", "Can show and assign imported documents which were not undetected", false) },
|
{ "Config.DocumentTemplate.UndetectedPages", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DocumentTemplate.UndetectedPages, (c, v) => c.Config.DocumentTemplate.UndetectedPages = v, "Process Undetected Pages", "Can show and assign imported documents which were not undetected", false) },
|
||||||
@@ -253,8 +253,8 @@ namespace Disco.Services.Authorization
|
|||||||
}),
|
}),
|
||||||
new ClaimNavigatorItem("Config.DocumentTemplate", "Document Templates", "Permissions related to Document Templates", false, new List<IClaimNavigatorItem>() {
|
new ClaimNavigatorItem("Config.DocumentTemplate", "Document Templates", "Permissions related to Document Templates", false, new List<IClaimNavigatorItem>() {
|
||||||
new ClaimNavigatorItem("Config.DocumentTemplate.BulkGenerate", false),
|
new ClaimNavigatorItem("Config.DocumentTemplate.BulkGenerate", false),
|
||||||
new ClaimNavigatorItem("Config.DocumentTemplate.Configure", false),
|
|
||||||
new ClaimNavigatorItem("Config.DocumentTemplate.ConfigureFilterExpression", false),
|
new ClaimNavigatorItem("Config.DocumentTemplate.ConfigureFilterExpression", false),
|
||||||
|
new ClaimNavigatorItem("Config.DocumentTemplate.Configure", false),
|
||||||
new ClaimNavigatorItem("Config.DocumentTemplate.Create", false),
|
new ClaimNavigatorItem("Config.DocumentTemplate.Create", false),
|
||||||
new ClaimNavigatorItem("Config.DocumentTemplate.Delete", false),
|
new ClaimNavigatorItem("Config.DocumentTemplate.Delete", false),
|
||||||
new ClaimNavigatorItem("Config.DocumentTemplate.UndetectedPages", false),
|
new ClaimNavigatorItem("Config.DocumentTemplate.UndetectedPages", false),
|
||||||
@@ -559,8 +559,8 @@ namespace Disco.Services.Authorization
|
|||||||
c.Config.DeviceProfile.Delete = true;
|
c.Config.DeviceProfile.Delete = true;
|
||||||
c.Config.DeviceProfile.Show = true;
|
c.Config.DeviceProfile.Show = true;
|
||||||
c.Config.DocumentTemplate.BulkGenerate = true;
|
c.Config.DocumentTemplate.BulkGenerate = true;
|
||||||
c.Config.DocumentTemplate.Configure = true;
|
|
||||||
c.Config.DocumentTemplate.ConfigureFilterExpression = true;
|
c.Config.DocumentTemplate.ConfigureFilterExpression = true;
|
||||||
|
c.Config.DocumentTemplate.Configure = true;
|
||||||
c.Config.DocumentTemplate.Create = true;
|
c.Config.DocumentTemplate.Create = true;
|
||||||
c.Config.DocumentTemplate.Delete = true;
|
c.Config.DocumentTemplate.Delete = true;
|
||||||
c.Config.DocumentTemplate.UndetectedPages = true;
|
c.Config.DocumentTemplate.UndetectedPages = true;
|
||||||
@@ -897,16 +897,16 @@ namespace Disco.Services.Authorization
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public const string BulkGenerate = "Config.DocumentTemplate.BulkGenerate";
|
public const string BulkGenerate = "Config.DocumentTemplate.BulkGenerate";
|
||||||
|
|
||||||
|
/// <summary>Configure Advanced Expression
|
||||||
|
/// <para>Can configure filter, generate and import expressions for document templates</para>
|
||||||
|
/// </summary>
|
||||||
|
public const string ConfigureFilterExpression = "Config.DocumentTemplate.ConfigureFilterExpression";
|
||||||
|
|
||||||
/// <summary>Configure Document Templates
|
/// <summary>Configure Document Templates
|
||||||
/// <para>Can configure document templates</para>
|
/// <para>Can configure document templates</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const string Configure = "Config.DocumentTemplate.Configure";
|
public const string Configure = "Config.DocumentTemplate.Configure";
|
||||||
|
|
||||||
/// <summary>Configure Filter Expression
|
|
||||||
/// <para>Can configure filter expressions for document templates</para>
|
|
||||||
/// </summary>
|
|
||||||
public const string ConfigureFilterExpression = "Config.DocumentTemplate.ConfigureFilterExpression";
|
|
||||||
|
|
||||||
/// <summary>Create Document Templates
|
/// <summary>Create Document Templates
|
||||||
/// <para>Can create document templates</para>
|
/// <para>Can create document templates</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ namespace Disco.Services.Authorization.Roles.ClaimGroups.Configuration.DocumentT
|
|||||||
[ClaimDetails("Configure Document Templates", "Can configure document templates")]
|
[ClaimDetails("Configure Document Templates", "Can configure document templates")]
|
||||||
public bool Configure { get; set; }
|
public bool Configure { get; set; }
|
||||||
|
|
||||||
[ClaimDetails("Configure Filter Expression", "Can configure filter expressions for document templates")]
|
[ClaimDetails("Configure Advanced Expression", "Can configure filter, generate and import expressions for document templates")]
|
||||||
public bool ConfigureFilterExpression { get; set; }
|
public bool ConfigureFilterExpression { get; set; }
|
||||||
|
|
||||||
[ClaimDetails("Upload Document Templates", "Can upload document templates")]
|
[ClaimDetails("Upload Document Templates", "Can upload document templates")]
|
||||||
|
|||||||
@@ -54,9 +54,11 @@ namespace Disco.Services.Logging
|
|||||||
LogModules = new Dictionary<int, LogBase>();
|
LogModules = new Dictionary<int, LogBase>();
|
||||||
// Load all LogModules (Only from Disco Assemblies)
|
// Load all LogModules (Only from Disco Assemblies)
|
||||||
var appDomain = AppDomain.CurrentDomain;
|
var appDomain = AppDomain.CurrentDomain;
|
||||||
|
var servicesAssemblyName = typeof(LogContext).Assembly.GetName().Name;
|
||||||
|
|
||||||
var logModuleTypes = (from a in appDomain.GetAssemblies()
|
var logModuleTypes = (from a in appDomain.GetAssemblies()
|
||||||
where !a.GlobalAssemblyCache && !a.IsDynamic && a.FullName.StartsWith("Disco.", StringComparison.OrdinalIgnoreCase)
|
where !a.GlobalAssemblyCache && !a.IsDynamic &&
|
||||||
|
(a.GetName().Name == servicesAssemblyName || a.GetReferencedAssemblies().Any(ra => ra.Name == servicesAssemblyName))
|
||||||
from type in a.GetTypes()
|
from type in a.GetTypes()
|
||||||
where typeof(LogBase).IsAssignableFrom(type) && !type.IsAbstract
|
where typeof(LogBase).IsAssignableFrom(type) && !type.IsAbstract
|
||||||
select type);
|
select type);
|
||||||
|
|||||||
@@ -32,12 +32,12 @@ namespace Disco.Services.Tasks
|
|||||||
{
|
{
|
||||||
// Discover DiscoScheduledTask
|
// Discover DiscoScheduledTask
|
||||||
var appDomain = AppDomain.CurrentDomain;
|
var appDomain = AppDomain.CurrentDomain;
|
||||||
var scheduledTasksHostAssemblyName = typeof(ScheduledTask).Assembly.GetName().Name;
|
var servicesAssemblyName = typeof(ScheduledTask).Assembly.GetName().Name;
|
||||||
|
|
||||||
var scheduledTaskTypes = (from a in appDomain.GetAssemblies()
|
var scheduledTaskTypes = (from a in appDomain.GetAssemblies()
|
||||||
where !a.GlobalAssemblyCache &&
|
where !a.GlobalAssemblyCache &&
|
||||||
!a.IsDynamic &&
|
!a.IsDynamic &&
|
||||||
(a.GetName().Name == scheduledTasksHostAssemblyName || a.GetReferencedAssemblies().Any(ra => ra.Name == scheduledTasksHostAssemblyName))
|
(a.GetName().Name == servicesAssemblyName || a.GetReferencedAssemblies().Any(ra => ra.Name == servicesAssemblyName))
|
||||||
from type in a.GetTypes()
|
from type in a.GetTypes()
|
||||||
where typeof(ScheduledTask).IsAssignableFrom(type) && !type.IsAbstract
|
where typeof(ScheduledTask).IsAssignableFrom(type) && !type.IsAbstract
|
||||||
select type);
|
select type);
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
const string pDescription = "description";
|
const string pDescription = "description";
|
||||||
const string pScope = "scope";
|
const string pScope = "scope";
|
||||||
const string pFilterExpression = "filterexpression";
|
const string pFilterExpression = "filterexpression";
|
||||||
|
const string pOnGenerateExpression = "ongenerateexpression";
|
||||||
|
const string pOnImportAttachmentExpression = "onimportattachmentexpression";
|
||||||
const string pFlattenForm = "flattenform";
|
const string pFlattenForm = "flattenform";
|
||||||
|
|
||||||
[DiscoAuthorize(Claims.Config.DocumentTemplate.Configure)]
|
[DiscoAuthorize(Claims.Config.DocumentTemplate.Configure)]
|
||||||
@@ -50,6 +52,12 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
Authorization.Require(Claims.Config.DocumentTemplate.ConfigureFilterExpression);
|
Authorization.Require(Claims.Config.DocumentTemplate.ConfigureFilterExpression);
|
||||||
UpdateFilterExpression(documentTemplate, value);
|
UpdateFilterExpression(documentTemplate, value);
|
||||||
break;
|
break;
|
||||||
|
case pOnGenerateExpression:
|
||||||
|
UpdateOnGenerateExpression(documentTemplate, value);
|
||||||
|
break;
|
||||||
|
case pOnImportAttachmentExpression:
|
||||||
|
UpdateOnImportAttachmentExpression(documentTemplate, value);
|
||||||
|
break;
|
||||||
case pFlattenForm:
|
case pFlattenForm:
|
||||||
UpdateFlattenForm(documentTemplate, value);
|
UpdateFlattenForm(documentTemplate, value);
|
||||||
break;
|
break;
|
||||||
@@ -141,6 +149,16 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
{
|
{
|
||||||
return Update(id, pFilterExpression, FilterExpression, redirect);
|
return Update(id, pFilterExpression, FilterExpression, redirect);
|
||||||
}
|
}
|
||||||
|
[DiscoAuthorizeAll(Claims.Config.DocumentTemplate.Configure, Claims.Config.DocumentTemplate.ConfigureFilterExpression)]
|
||||||
|
public virtual ActionResult UpdateOnGenerateExpression(string id, string OnGenerateExpression = null, bool redirect = false)
|
||||||
|
{
|
||||||
|
return Update(id, pOnGenerateExpression, OnGenerateExpression, redirect);
|
||||||
|
}
|
||||||
|
[DiscoAuthorizeAll(Claims.Config.DocumentTemplate.Configure, Claims.Config.DocumentTemplate.ConfigureFilterExpression)]
|
||||||
|
public virtual ActionResult UpdateOnImportAttachmentExpression(string id, string OnImportAttachmentExpression = null, bool redirect = false)
|
||||||
|
{
|
||||||
|
return Update(id, pOnImportAttachmentExpression, OnImportAttachmentExpression, redirect);
|
||||||
|
}
|
||||||
[DiscoAuthorize(Claims.Config.DocumentTemplate.Configure)]
|
[DiscoAuthorize(Claims.Config.DocumentTemplate.Configure)]
|
||||||
public virtual ActionResult UpdateFlattenForm(string id, string FlattenForm = null, bool redirect = false)
|
public virtual ActionResult UpdateFlattenForm(string id, string FlattenForm = null, bool redirect = false)
|
||||||
{
|
{
|
||||||
@@ -303,6 +321,36 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
|
|
||||||
Database.SaveChanges();
|
Database.SaveChanges();
|
||||||
}
|
}
|
||||||
|
private void UpdateOnGenerateExpression(Disco.Models.Repository.DocumentTemplate documentTemplate, string OnGenerateExpression)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(OnGenerateExpression))
|
||||||
|
{
|
||||||
|
documentTemplate.OnGenerateExpression = null;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
documentTemplate.OnGenerateExpression = OnGenerateExpression.Trim();
|
||||||
|
}
|
||||||
|
// Invalidate Cache
|
||||||
|
documentTemplate.OnGenerateExpressionInvalidateCache();
|
||||||
|
|
||||||
|
Database.SaveChanges();
|
||||||
|
}
|
||||||
|
private void UpdateOnImportAttachmentExpression(Disco.Models.Repository.DocumentTemplate documentTemplate, string OnImportAttachmentExpression)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(OnImportAttachmentExpression))
|
||||||
|
{
|
||||||
|
documentTemplate.OnImportAttachmentExpression = null;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
documentTemplate.OnImportAttachmentExpression = OnImportAttachmentExpression.Trim();
|
||||||
|
}
|
||||||
|
// Invalidate Cache
|
||||||
|
documentTemplate.OnImportAttachmentExpressionInvalidateCache();
|
||||||
|
|
||||||
|
Database.SaveChanges();
|
||||||
|
}
|
||||||
private void UpdateFlattenForm(Disco.Models.Repository.DocumentTemplate documentTemplate, string FlattenForm)
|
private void UpdateFlattenForm(Disco.Models.Repository.DocumentTemplate documentTemplate, string FlattenForm)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(FlattenForm))
|
if (string.IsNullOrWhiteSpace(FlattenForm))
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
var canConfig = Authorization.Has(Claims.Config.DeviceProfile.Configure);
|
var canConfig = Authorization.Has(Claims.Config.DeviceProfile.Configure);
|
||||||
var canConfigExpression = Authorization.Has(Claims.Config.DeviceProfile.ConfigureComputerNameTemplate);
|
var canConfigExpression = Authorization.Has(Claims.Config.DeviceProfile.ConfigureComputerNameTemplate);
|
||||||
var canDelete = (Authorization.Has(Claims.Config.DeviceProfile.Delete) && Model.CanDelete);
|
var canDelete = (Authorization.Has(Claims.Config.DeviceProfile.Delete) && Model.CanDelete);
|
||||||
|
var canViewPlugins = Authorization.Has(Claims.Config.Plugin.Install);
|
||||||
|
|
||||||
var hideAdvanced =
|
var hideAdvanced =
|
||||||
Model.DeviceProfile.AssignedUsersLinkedGroup == null &&
|
Model.DeviceProfile.AssignedUsersLinkedGroup == null &&
|
||||||
@@ -18,6 +19,7 @@
|
|||||||
{
|
{
|
||||||
Html.BundleDeferred("~/Style/Fancytree");
|
Html.BundleDeferred("~/Style/Fancytree");
|
||||||
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-Fancytree");
|
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-Fancytree");
|
||||||
|
Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
<div id="configurationDeviceProfileShow" class="form@(hideAdvanced ? " Config_HideAdvanced" : null)" style="width: 640px">
|
<div id="configurationDeviceProfileShow" class="form@(hideAdvanced ? " Config_HideAdvanced" : null)" style="width: 640px">
|
||||||
@@ -39,41 +41,12 @@
|
|||||||
@AjaxHelpers.AjaxLoader()
|
@AjaxHelpers.AjaxLoader()
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function () {
|
$(function () {
|
||||||
var $Name = $('#DeviceProfile_Name');
|
document.DiscoFunctions.PropertyChangeHelper(
|
||||||
var $NameAjaxSave = $Name.next('.ajaxSave');
|
$('#DeviceProfile_Name'),
|
||||||
$Name
|
'Name',
|
||||||
.watermark('Profile Short Name')
|
'@Url.Action(MVC.API.DeviceProfile.UpdateName(Model.DeviceProfile.Id))',
|
||||||
.focus(function () { $Name.select() })
|
'ProfileName'
|
||||||
.keydown(function (e) {
|
);
|
||||||
$NameAjaxSave.show();
|
|
||||||
if (e.which == 13) {
|
|
||||||
$(this).blur();
|
|
||||||
}
|
|
||||||
}).blur(function () {
|
|
||||||
$NameAjaxSave.hide();
|
|
||||||
})
|
|
||||||
.change(function () {
|
|
||||||
$NameAjaxSave.hide();
|
|
||||||
var $ajaxLoading = $NameAjaxSave.next('.ajaxLoading').show();
|
|
||||||
var data = { ProfileName: $Name.val() };
|
|
||||||
$.ajax({
|
|
||||||
url: '@Url.Action(MVC.API.DeviceProfile.UpdateName(Model.DeviceProfile.Id))',
|
|
||||||
dataType: 'json',
|
|
||||||
data: data,
|
|
||||||
success: function (d) {
|
|
||||||
if (d == 'OK') {
|
|
||||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
|
||||||
} else {
|
|
||||||
$ajaxLoading.hide();
|
|
||||||
alert('Unable to update name: ' + d);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
error: function (jqXHR, textStatus, errorThrown) {
|
|
||||||
alert('Unable to update name: ' + textStatus);
|
|
||||||
$ajaxLoading.hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
@@ -93,41 +66,12 @@
|
|||||||
@AjaxHelpers.AjaxLoader()
|
@AjaxHelpers.AjaxLoader()
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function () {
|
$(function () {
|
||||||
var $ShortName = $('#DeviceProfile_ShortName');
|
document.DiscoFunctions.PropertyChangeHelper(
|
||||||
var $ShortNameAjaxSave = $ShortName.next('.ajaxSave');
|
$('#DeviceProfile_ShortName'),
|
||||||
$ShortName
|
'Short Name',
|
||||||
.watermark('Profile Short Name')
|
'@Url.Action(MVC.API.DeviceProfile.UpdateShortName(Model.DeviceProfile.Id))',
|
||||||
.focus(function () { $ShortName.select() })
|
'ShortName'
|
||||||
.keydown(function (e) {
|
);
|
||||||
$ShortNameAjaxSave.show();
|
|
||||||
if (e.which == 13) {
|
|
||||||
$(this).blur();
|
|
||||||
}
|
|
||||||
}).blur(function () {
|
|
||||||
$ShortNameAjaxSave.hide();
|
|
||||||
})
|
|
||||||
.change(function () {
|
|
||||||
$ShortNameAjaxSave.hide();
|
|
||||||
var $ajaxLoading = $ShortNameAjaxSave.next('.ajaxLoading').show();
|
|
||||||
var data = { ShortName: $ShortName.val() };
|
|
||||||
$.ajax({
|
|
||||||
url: '@Url.Action(MVC.API.DeviceProfile.UpdateShortName(Model.DeviceProfile.Id))',
|
|
||||||
dataType: 'json',
|
|
||||||
data: data,
|
|
||||||
success: function (d) {
|
|
||||||
if (d == 'OK') {
|
|
||||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
|
||||||
} else {
|
|
||||||
$ajaxLoading.hide();
|
|
||||||
alert('Unable to update short name: ' + d);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
error: function (jqXHR, textStatus, errorThrown) {
|
|
||||||
alert('Unable to update short name: ' + textStatus);
|
|
||||||
$ajaxLoading.hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
@@ -142,46 +86,17 @@
|
|||||||
</th>
|
</th>
|
||||||
<td>@if (canConfig)
|
<td>@if (canConfig)
|
||||||
{
|
{
|
||||||
@Html.TextBoxFor(model => model.DeviceProfile.Description)
|
@Html.EditorFor(model => model.DeviceProfile.Description)
|
||||||
@AjaxHelpers.AjaxSave()
|
@AjaxHelpers.AjaxSave()
|
||||||
@AjaxHelpers.AjaxLoader()
|
@AjaxHelpers.AjaxLoader()
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function () {
|
$(function () {
|
||||||
var $Description = $('#DeviceProfile_Description');
|
document.DiscoFunctions.PropertyChangeHelper(
|
||||||
var $DescriptionAjaxSave = $Description.next('.ajaxSave');
|
$('#DeviceProfile_Description'),
|
||||||
$Description
|
'Description',
|
||||||
.watermark('Profile Description')
|
'@Url.Action(MVC.API.DeviceProfile.UpdateDescription(Model.DeviceProfile.Id))',
|
||||||
.focus(function () { $Description.select() })
|
'Description'
|
||||||
.keydown(function (e) {
|
);
|
||||||
$DescriptionAjaxSave.show();
|
|
||||||
if (e.which == 13) {
|
|
||||||
$(this).blur();
|
|
||||||
}
|
|
||||||
}).blur(function () {
|
|
||||||
$DescriptionAjaxSave.hide();
|
|
||||||
})
|
|
||||||
.change(function () {
|
|
||||||
$DescriptionAjaxSave.hide();
|
|
||||||
var $ajaxLoading = $DescriptionAjaxSave.next('.ajaxLoading').show();
|
|
||||||
var data = { Description: $Description.val() };
|
|
||||||
$.ajax({
|
|
||||||
url: '@Url.Action(MVC.API.DeviceProfile.UpdateDescription(Model.DeviceProfile.Id))',
|
|
||||||
dataType: 'json',
|
|
||||||
data: data,
|
|
||||||
success: function (d) {
|
|
||||||
if (d == 'OK') {
|
|
||||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
|
||||||
} else {
|
|
||||||
$ajaxLoading.hide();
|
|
||||||
alert('Unable to update description: ' + d);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
error: function (jqXHR, textStatus, errorThrown) {
|
|
||||||
alert('Unable to update description: ' + textStatus);
|
|
||||||
$ajaxLoading.hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
@@ -210,19 +125,12 @@
|
|||||||
@AjaxHelpers.AjaxLoader()
|
@AjaxHelpers.AjaxLoader()
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function () {
|
$(function () {
|
||||||
$('#DeviceProfile_DistributionType').change(function () {
|
document.DiscoFunctions.PropertyChangeHelper(
|
||||||
var $this = $(this);
|
$('#DeviceProfile_DistributionType'),
|
||||||
var $ajaxLoading = $this.next('.ajaxLoading').show();
|
null,
|
||||||
var data = { DistributionType: $this.val() };
|
'@Url.Action(MVC.API.DeviceProfile.UpdateDistributionType(Model.DeviceProfile.Id))',
|
||||||
$.getJSON('@Url.Action(MVC.API.DeviceProfile.UpdateDistributionType(Model.DeviceProfile.Id))', data, function (response, result) {
|
'DistributionType'
|
||||||
if (result != 'success' || response != 'OK') {
|
);
|
||||||
alert('Unable to change Distribution Type:\n' + response);
|
|
||||||
$ajaxLoading.hide();
|
|
||||||
} else {
|
|
||||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
@@ -241,19 +149,12 @@
|
|||||||
@AjaxHelpers.AjaxLoader()
|
@AjaxHelpers.AjaxLoader()
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function () {
|
$(function () {
|
||||||
$('#DeviceProfile_DefaultOrganisationAddress').change(function () {
|
document.DiscoFunctions.PropertyChangeHelper(
|
||||||
var $this = $(this);
|
$('#DeviceProfile_DefaultOrganisationAddress'),
|
||||||
var $ajaxLoading = $this.next('.ajaxLoading').show();
|
null,
|
||||||
var data = { DefaultOrganisationAddress: $this.val() };
|
'@Url.Action(MVC.API.DeviceProfile.UpdateDefaultOrganisationAddress(Model.DeviceProfile.Id))',
|
||||||
$.getJSON('@Url.Action(MVC.API.DeviceProfile.UpdateDefaultOrganisationAddress(Model.DeviceProfile.Id))', data, function (response, result) {
|
'DefaultOrganisationAddress'
|
||||||
if (result != 'success' || response != 'OK') {
|
);
|
||||||
alert('Unable to change Address:\n' + response);
|
|
||||||
$ajaxLoading.hide();
|
|
||||||
} else {
|
|
||||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
@@ -273,36 +174,18 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th>Allocate Certificates:
|
<th>Allocate Certificates:
|
||||||
</th>
|
</th>
|
||||||
<td>@if (canConfig)
|
<td>@if (canConfig && Model.CertificateProviders.Count > 0)
|
||||||
{
|
{
|
||||||
@Html.DropDownListFor(model => model.DeviceProfile.CertificateProviderId, Model.CertificateProviders.ToSelectListItems(null, true, "Not Allocated"))
|
@Html.DropDownListFor(model => model.DeviceProfile.CertificateProviderId, Model.CertificateProviders.ToSelectListItems(null, true, "Not Allocated"))
|
||||||
@AjaxHelpers.AjaxLoader()
|
@AjaxHelpers.AjaxLoader()
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function () {
|
$(function () {
|
||||||
var $field = $('#DeviceProfile_CertificateProviderId');
|
document.DiscoFunctions.PropertyChangeHelper(
|
||||||
var $ajaxLoading = $field.next('.ajaxLoading');
|
$('#DeviceProfile_CertificateProviderId'),
|
||||||
$field
|
null,
|
||||||
.change(function () {
|
'@Url.Action(MVC.API.DeviceProfile.UpdateCertificateProviderId(Model.DeviceProfile.Id))',
|
||||||
$ajaxLoading.show();
|
'CertificateProviderId'
|
||||||
var data = { CertificateProviderId: $field.val() };
|
);
|
||||||
$.ajax({
|
|
||||||
url: '@Url.Action(MVC.API.DeviceProfile.UpdateCertificateProviderId(Model.DeviceProfile.Id))',
|
|
||||||
dataType: 'json',
|
|
||||||
data: data,
|
|
||||||
success: function (d) {
|
|
||||||
if (d == 'OK') {
|
|
||||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
|
||||||
} else {
|
|
||||||
$ajaxLoading.hide();
|
|
||||||
alert('Unable to update Certificate Provider Id: ' + d);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
error: function (jqXHR, textStatus, errorThrown) {
|
|
||||||
alert('Unable to update Certificate Provider Id: ' + textStatus);
|
|
||||||
$ajaxLoading.hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
@@ -325,6 +208,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@if (canViewPlugins)
|
||||||
|
{
|
||||||
|
<div class="info-box">
|
||||||
|
<p class="fa-p">
|
||||||
|
<i class="fa fa-info-circle"></i>View the <a href="@(Url.Action(MVC.Config.Plugins.Install()))">Plugin Catalogue</a> to discover and install certificate provider plugins.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -333,46 +224,29 @@
|
|||||||
</th>
|
</th>
|
||||||
<td>@if (canConfig && canConfigExpression)
|
<td>@if (canConfig && canConfigExpression)
|
||||||
{
|
{
|
||||||
@Html.TextBoxFor(model => model.DeviceProfile.ComputerNameTemplate)
|
@Html.EditorFor(model => model.DeviceProfile.ComputerNameTemplate)
|
||||||
@AjaxHelpers.AjaxSave()
|
@AjaxHelpers.AjaxSave()
|
||||||
@AjaxHelpers.AjaxLoader()
|
@AjaxHelpers.AjaxLoader()
|
||||||
<a id="expressionBrowserAnchor" href="@(Url.Action(MVC.Config.DocumentTemplate.ExpressionBrowser()))"> </a>
|
<a id="expressionBrowserAnchor" href="@(Url.Action(MVC.Config.DocumentTemplate.ExpressionBrowser()))"> </a>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function () {
|
$(function () {
|
||||||
var $ComputerNameTemplate = $('#DeviceProfile_ComputerNameTemplate');
|
var field = $('#DeviceProfile_ComputerNameTemplate');
|
||||||
var $ajaxSave = $ComputerNameTemplate.next('.ajaxSave');
|
var fieldOriginalWidth, fieldOriginalHeight;
|
||||||
$ComputerNameTemplate
|
|
||||||
.focus(function () { $ComputerNameTemplate.select() })
|
document.DiscoFunctions.PropertyChangeHelper(
|
||||||
.keydown(function (e) {
|
field,
|
||||||
$ajaxSave.show();
|
'None',
|
||||||
if (e.which == 13) {
|
'@Url.Action(MVC.API.DeviceProfile.UpdateComputerNameTemplate(Model.DeviceProfile.Id))',
|
||||||
$(this).blur();
|
'ComputerNameTemplate'
|
||||||
}
|
);
|
||||||
}).blur(function () {
|
|
||||||
$ajaxSave.hide();
|
field.focus(function () {
|
||||||
})
|
fieldOriginalWidth = field.width();
|
||||||
.change(function () {
|
fieldOriginalHeight = field.height();
|
||||||
$ajaxSave.hide();
|
field.css('overflow', 'visible').animate({ width: field.parent().width() - 52, height: 75 }, 200);
|
||||||
var $ajaxLoading = $ajaxSave.next('.ajaxLoading').show();
|
}).blur(function () {
|
||||||
var data = { ComputerNameTemplate: $ComputerNameTemplate.val() };
|
field.css('overflow', 'hidden').animate({ width: fieldOriginalWidth, height: fieldOriginalHeight }, 200);
|
||||||
$.ajax({
|
}).attr('placeholder', 'None').attr('spellcheck', 'false');
|
||||||
url: '@(Url.Action(MVC.API.DeviceProfile.UpdateComputerNameTemplate(Model.DeviceProfile.Id)))',
|
|
||||||
dataType: 'json',
|
|
||||||
data: data,
|
|
||||||
success: function (d) {
|
|
||||||
if (d == 'OK') {
|
|
||||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
|
||||||
} else {
|
|
||||||
$ajaxLoading.hide();
|
|
||||||
alert('Unable to update computer name template: ' + d);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
error: function (jqXHR, textStatus, errorThrown) {
|
|
||||||
alert('Unable to update computer name template: ' + textStatus);
|
|
||||||
$ajaxLoading.hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
@@ -395,19 +269,12 @@
|
|||||||
<input id="DeviceProfile_EnforceComputerNameConvention" type="checkbox" @(Model.DeviceProfile.EnforceComputerNameConvention ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty))/>
|
<input id="DeviceProfile_EnforceComputerNameConvention" type="checkbox" @(Model.DeviceProfile.EnforceComputerNameConvention ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty))/>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function () {
|
$(function () {
|
||||||
$('#DeviceProfile_EnforceComputerNameConvention').click(function () {
|
document.DiscoFunctions.PropertyChangeHelper(
|
||||||
var $this = $(this);
|
$('#DeviceProfile_EnforceComputerNameConvention'),
|
||||||
var $ajaxLoading = $this.nextAll('.ajaxLoading').show();
|
null,
|
||||||
var data = { EnforceComputerNameConvention: $this.is(':checked') };
|
'@Url.Action(MVC.API.DeviceProfile.UpdateEnforceComputerNameConvention(Model.DeviceProfile.Id))',
|
||||||
$.getJSON('@Url.Action(MVC.API.DeviceProfile.UpdateEnforceComputerNameConvention(Model.DeviceProfile.Id))', data, function (response, result) {
|
'EnforceComputerNameConvention'
|
||||||
if (result != 'success' || response != 'OK') {
|
);
|
||||||
alert('Unable to change Enforce Computer Name Convention:\n' + response);
|
|
||||||
$ajaxLoading.hide();
|
|
||||||
} else {
|
|
||||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
@@ -434,19 +301,12 @@
|
|||||||
<input id="DeviceProfile_ProvisionADAccount" type="checkbox" @(Model.DeviceProfile.ProvisionADAccount ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty))/>
|
<input id="DeviceProfile_ProvisionADAccount" type="checkbox" @(Model.DeviceProfile.ProvisionADAccount ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty))/>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function () {
|
$(function () {
|
||||||
$('#DeviceProfile_ProvisionADAccount').click(function () {
|
document.DiscoFunctions.PropertyChangeHelper(
|
||||||
var $this = $(this);
|
$('#DeviceProfile_ProvisionADAccount'),
|
||||||
var $ajaxLoading = $this.nextAll('.ajaxLoading').show();
|
null,
|
||||||
var data = { ProvisionADAccount: $this.is(':checked') };
|
'@Url.Action(MVC.API.DeviceProfile.UpdateProvisionADAccount(Model.DeviceProfile.Id))',
|
||||||
$.getJSON('@Url.Action(MVC.API.DeviceProfile.UpdateProvisionADAccount(Model.DeviceProfile.Id))', data, function (response, result) {
|
'ProvisionADAccount'
|
||||||
if (result != 'success' || response != 'OK') {
|
);
|
||||||
alert('Unable to change Provision AD Account:\n' + response);
|
|
||||||
$ajaxLoading.hide();
|
|
||||||
} else {
|
|
||||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
@@ -465,19 +325,12 @@
|
|||||||
<input id="DeviceProfile_AssignedUserLocalAdmin" type="checkbox" @(Model.DeviceProfile.AssignedUserLocalAdmin ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty))/>
|
<input id="DeviceProfile_AssignedUserLocalAdmin" type="checkbox" @(Model.DeviceProfile.AssignedUserLocalAdmin ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty))/>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function () {
|
$(function () {
|
||||||
$('#DeviceProfile_AssignedUserLocalAdmin').click(function () {
|
document.DiscoFunctions.PropertyChangeHelper(
|
||||||
var $this = $(this);
|
$('#DeviceProfile_AssignedUserLocalAdmin'),
|
||||||
var $ajaxLoading = $this.nextAll('.ajaxLoading').show();
|
null,
|
||||||
var data = { AssignedUserLocalAdmin: $this.is(':checked') };
|
'@Url.Action(MVC.API.DeviceProfile.UpdateAssignedUserLocalAdmin(Model.DeviceProfile.Id))',
|
||||||
$.getJSON('@Url.Action(MVC.API.DeviceProfile.UpdateAssignedUserLocalAdmin(Model.DeviceProfile.Id))', data, function (response, result) {
|
'AssignedUserLocalAdmin'
|
||||||
if (result != 'success' || response != 'OK') {
|
);
|
||||||
alert('Unable to change Assigned User Is Local Administrator:\n' + response);
|
|
||||||
$ajaxLoading.hide();
|
|
||||||
} else {
|
|
||||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
@@ -496,19 +349,12 @@
|
|||||||
<input id="DeviceProfile_AllowUntrustedReimageJobEnrolment" type="checkbox" @(Model.DeviceProfile.AllowUntrustedReimageJobEnrolment ? new MvcHtmlString("checked=\"checked\" ") : null)/>
|
<input id="DeviceProfile_AllowUntrustedReimageJobEnrolment" type="checkbox" @(Model.DeviceProfile.AllowUntrustedReimageJobEnrolment ? new MvcHtmlString("checked=\"checked\" ") : null)/>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function () {
|
$(function () {
|
||||||
$('#DeviceProfile_AllowUntrustedReimageJobEnrolment').click(function () {
|
document.DiscoFunctions.PropertyChangeHelper(
|
||||||
var $this = $(this);
|
$('#DeviceProfile_AllowUntrustedReimageJobEnrolment'),
|
||||||
var $ajaxLoading = $this.nextAll('.ajaxLoading').show();
|
null,
|
||||||
var data = { AllowUntrustedReimageJobEnrolment: $this.is(':checked') };
|
'@Url.Action(MVC.API.DeviceProfile.UpdateAllowUntrustedReimageJobEnrolment(Model.DeviceProfile.Id))',
|
||||||
$.getJSON('@Url.Action(MVC.API.DeviceProfile.UpdateAllowUntrustedReimageJobEnrolment(Model.DeviceProfile.Id))', data, function (response, result) {
|
'AllowUntrustedReimageJobEnrolment'
|
||||||
if (result != 'success' || response != 'OK') {
|
);
|
||||||
alert('Unable to change Allow Untrusted Reimage Job Enrolment:\n' + response);
|
|
||||||
$ajaxLoading.hide();
|
|
||||||
} else {
|
|
||||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
@@ -668,19 +514,12 @@
|
|||||||
<input id="DeviceProfile_EnforceOrganisationalUnit" type="checkbox" @(Model.DeviceProfile.EnforceOrganisationalUnit ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty))/>
|
<input id="DeviceProfile_EnforceOrganisationalUnit" type="checkbox" @(Model.DeviceProfile.EnforceOrganisationalUnit ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty))/>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function () {
|
$(function () {
|
||||||
$('#DeviceProfile_EnforceOrganisationalUnit').click(function () {
|
document.DiscoFunctions.PropertyChangeHelper(
|
||||||
var $this = $(this);
|
$('#DeviceProfile_EnforceOrganisationalUnit'),
|
||||||
var $ajaxLoading = $this.nextAll('.ajaxLoading').show();
|
null,
|
||||||
var data = { EnforceOrganisationalUnit: $this.is(':checked') };
|
'@Url.Action(MVC.API.DeviceProfile.UpdateEnforceOrganisationalUnit(Model.DeviceProfile.Id))',
|
||||||
$.getJSON('@Url.Action(MVC.API.DeviceProfile.UpdateEnforceOrganisationalUnit(Model.DeviceProfile.Id))', data, function (response, result) {
|
'EnforceOrganisationalUnit'
|
||||||
if (result != 'success' || response != 'OK') {
|
);
|
||||||
alert('Unable to change Enforce Organisation Unit:\n' + response);
|
|
||||||
$ajaxLoading.hide();
|
|
||||||
} else {
|
|
||||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
@@ -35,12 +35,12 @@
|
|||||||
<h3 data-bind="text: title"></h3>
|
<h3 data-bind="text: title"></h3>
|
||||||
<div data-bind="visible: undetected">
|
<div data-bind="visible: undetected">
|
||||||
Disco QR-Code not found<br />
|
Disco QR-Code not found<br />
|
||||||
<a target="_blank" data-bind="attr: { href: manuallyAssignUrl }, visible: $parent.sessionEnded">Manually Assign Page</a>
|
<a target="_blank" href="#" data-bind="attr: { href: manuallyAssignUrl }, visible: $parent.sessionEnded">Manually Assign Page</a>
|
||||||
</div>
|
</div>
|
||||||
<div data-bind="visible: detected">
|
<div data-bind="visible: detected">
|
||||||
Document: <a target="_blank" data-bind="text: documentTemplate, attr: { href: documentTemplateUrl }"></a>
|
Document: <a target="_blank" href="#" data-bind="text: documentTemplate, attr: { href: documentTemplateUrl }"></a>
|
||||||
<br />
|
<br />
|
||||||
Target: <a target="_blank" data-bind="text: assignedData, attr: { href: assignedDataUrl }"></a>
|
Target: <a target="_blank" href="#" data-bind="text: assignedData, attr: { href: assignedDataUrl }"></a>
|
||||||
</div>
|
</div>
|
||||||
<div data-bind="visible: !(detected() || undetected())">
|
<div data-bind="visible: !(detected() || undetected())">
|
||||||
<p class="sessionStatus" data-bind="text: progressStatus">
|
<p class="sessionStatus" data-bind="text: progressStatus">
|
||||||
@@ -306,7 +306,7 @@
|
|||||||
logHub = $.connection.logNotifications;
|
logHub = $.connection.logNotifications;
|
||||||
logHub.client.receiveLog = parseLog
|
logHub.client.receiveLog = parseLog
|
||||||
|
|
||||||
$.connection.hub.qs = { LogModules: '@(Disco.BI.DocumentTemplateBI.Importer.DocumentImporterLog.Current.LiveLogGroupName)' };
|
$.connection.hub.qs = { LogModules: '@(Disco.BI.DocumentTemplateBI.DocumentsLog.Current.LiveLogGroupName)' };
|
||||||
$.connection.hub.error(function (error) {
|
$.connection.hub.error(function (error) {
|
||||||
alert('Live-Log Error: ' + error);
|
alert('Live-Log Error: ' + error);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -144,6 +144,8 @@ WriteLiteral(">\r\n Disco QR-Code not found<br />\r\n
|
|||||||
|
|
||||||
WriteLiteral(" target=\"_blank\"");
|
WriteLiteral(" target=\"_blank\"");
|
||||||
|
|
||||||
|
WriteLiteral(" href=\"#\"");
|
||||||
|
|
||||||
WriteLiteral(" data-bind=\"attr: { href: manuallyAssignUrl }, visible: $parent.sessionEnded\"");
|
WriteLiteral(" data-bind=\"attr: { href: manuallyAssignUrl }, visible: $parent.sessionEnded\"");
|
||||||
|
|
||||||
WriteLiteral(">Manually Assign Page</a>\r\n </div>\r\n " +
|
WriteLiteral(">Manually Assign Page</a>\r\n </div>\r\n " +
|
||||||
@@ -155,6 +157,8 @@ WriteLiteral(">\r\n Document: <a");
|
|||||||
|
|
||||||
WriteLiteral(" target=\"_blank\"");
|
WriteLiteral(" target=\"_blank\"");
|
||||||
|
|
||||||
|
WriteLiteral(" href=\"#\"");
|
||||||
|
|
||||||
WriteLiteral(" data-bind=\"text: documentTemplate, attr: { href: documentTemplateUrl }\"");
|
WriteLiteral(" data-bind=\"text: documentTemplate, attr: { href: documentTemplateUrl }\"");
|
||||||
|
|
||||||
WriteLiteral("></a>\r\n <br />\r\n Target: <a" +
|
WriteLiteral("></a>\r\n <br />\r\n Target: <a" +
|
||||||
@@ -162,6 +166,8 @@ WriteLiteral("></a>\r\n <br />\r\n
|
|||||||
|
|
||||||
WriteLiteral(" target=\"_blank\"");
|
WriteLiteral(" target=\"_blank\"");
|
||||||
|
|
||||||
|
WriteLiteral(" href=\"#\"");
|
||||||
|
|
||||||
WriteLiteral(" data-bind=\"text: assignedData, attr: { href: assignedDataUrl }\"");
|
WriteLiteral(" data-bind=\"text: assignedData, attr: { href: assignedDataUrl }\"");
|
||||||
|
|
||||||
WriteLiteral("></a>\r\n </div>\r\n <div");
|
WriteLiteral("></a>\r\n </div>\r\n <div");
|
||||||
@@ -460,7 +466,7 @@ WriteLiteral(@"',
|
|||||||
|
|
||||||
|
|
||||||
#line 309 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
|
#line 309 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
|
||||||
Write(Disco.BI.DocumentTemplateBI.Importer.DocumentImporterLog.Current.LiveLogGroupName);
|
Write(Disco.BI.DocumentTemplateBI.DocumentsLog.Current.LiveLogGroupName);
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
|
|||||||
@@ -11,6 +11,8 @@
|
|||||||
Model.DocumentTemplate.UsersLinkedGroup == null &&
|
Model.DocumentTemplate.UsersLinkedGroup == null &&
|
||||||
Model.DocumentTemplate.DevicesLinkedGroup == null &&
|
Model.DocumentTemplate.DevicesLinkedGroup == null &&
|
||||||
Model.DocumentTemplate.FilterExpression == null &&
|
Model.DocumentTemplate.FilterExpression == null &&
|
||||||
|
Model.DocumentTemplate.OnGenerateExpression == null &&
|
||||||
|
Model.DocumentTemplate.OnImportAttachmentExpression == null &&
|
||||||
Model.TemplateExpressions.All(e => e.All(p => !p.ParseError));
|
Model.TemplateExpressions.All(e => e.All(p => !p.ParseError));
|
||||||
|
|
||||||
#region Can Bulk Generate
|
#region Can Bulk Generate
|
||||||
@@ -35,6 +37,11 @@
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates", MVC.Config.DocumentTemplate.Index(null), Model.DocumentTemplate.Description);
|
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates", MVC.Config.DocumentTemplate.Index(null), Model.DocumentTemplate.Description);
|
||||||
|
|
||||||
|
if (canConfig)
|
||||||
|
{
|
||||||
|
Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
<div id="Config_DocumentTemplates_Show" class="@(hideAdvanced ? "Config_HideAdvanced" : null)">
|
<div id="Config_DocumentTemplates_Show" class="@(hideAdvanced ? "Config_HideAdvanced" : null)">
|
||||||
<div class="form" style="width: 650px; margin: 10px auto 20px;">
|
<div class="form" style="width: 650px; margin: 10px auto 20px;">
|
||||||
@@ -63,41 +70,12 @@
|
|||||||
@AjaxHelpers.AjaxLoader()
|
@AjaxHelpers.AjaxLoader()
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function () {
|
$(function () {
|
||||||
var $Description = $('#DocumentTemplate_Description');
|
document.DiscoFunctions.PropertyChangeHelper(
|
||||||
var $DescriptionAjaxSave = $Description.next('.ajaxSave');
|
$('#DocumentTemplate_Description'),
|
||||||
$Description
|
'Description',
|
||||||
.watermark('Description')
|
'@Url.Action(MVC.API.DocumentTemplate.UpdateDescription(Model.DocumentTemplate.Id))',
|
||||||
.focus(function () { $Description.select() })
|
'Description'
|
||||||
.keydown(function (e) {
|
);
|
||||||
$DescriptionAjaxSave.show();
|
|
||||||
if (e.which == 13) {
|
|
||||||
$(this).blur();
|
|
||||||
}
|
|
||||||
}).blur(function () {
|
|
||||||
$DescriptionAjaxSave.hide();
|
|
||||||
})
|
|
||||||
.change(function () {
|
|
||||||
$DescriptionAjaxSave.hide();
|
|
||||||
var $ajaxLoading = $DescriptionAjaxSave.next('.ajaxLoading').show();
|
|
||||||
var data = { Description: $Description.val() };
|
|
||||||
$.ajax({
|
|
||||||
url: '@Url.Action(MVC.API.DocumentTemplate.UpdateDescription(Model.DocumentTemplate.Id))',
|
|
||||||
dataType: 'json',
|
|
||||||
data: data,
|
|
||||||
success: function (d) {
|
|
||||||
if (d == 'OK') {
|
|
||||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
|
||||||
} else {
|
|
||||||
$ajaxLoading.hide();
|
|
||||||
alert('Unable to update description: ' + d);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
error: function (jqXHR, textStatus, errorThrown) {
|
|
||||||
alert('Unable to update description: ' + textStatus);
|
|
||||||
$ajaxLoading.hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
@@ -123,19 +101,12 @@
|
|||||||
@AjaxHelpers.AjaxLoader()
|
@AjaxHelpers.AjaxLoader()
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function () {
|
$(function () {
|
||||||
$('#DocumentTemplate_FlattenForm').click(function () {
|
document.DiscoFunctions.PropertyChangeHelper(
|
||||||
var $this = $(this);
|
$('#DocumentTemplate_FlattenForm'),
|
||||||
var $ajaxLoading = $this.next('.ajaxLoading').show();
|
null,
|
||||||
var data = { FlattenForm: $this.is(':checked') };
|
'@Url.Action(MVC.API.DocumentTemplate.UpdateFlattenForm(Model.DocumentTemplate.Id))',
|
||||||
$.getJSON('@(Url.Action(MVC.API.DocumentTemplate.UpdateFlattenForm(Model.DocumentTemplate.Id)))', data, function (response, result) {
|
'FlattenForm'
|
||||||
if (result != 'success' || response != 'OK') {
|
);
|
||||||
alert('Unable to change Flatten Form:\n' + response);
|
|
||||||
$ajaxLoading.hide();
|
|
||||||
} else {
|
|
||||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
@@ -429,54 +400,46 @@
|
|||||||
</th>
|
</th>
|
||||||
<td>@if (canConfig && Authorization.Has(Claims.Config.DocumentTemplate.ConfigureFilterExpression))
|
<td>@if (canConfig && Authorization.Has(Claims.Config.DocumentTemplate.ConfigureFilterExpression))
|
||||||
{
|
{
|
||||||
@Html.TextBoxFor(model => model.DocumentTemplate.FilterExpression)
|
@Html.EditorFor(model => model.DocumentTemplate.FilterExpression)
|
||||||
@AjaxHelpers.AjaxRemove()
|
@AjaxHelpers.AjaxRemove()
|
||||||
|
@AjaxHelpers.AjaxSave()
|
||||||
@AjaxHelpers.AjaxLoader()
|
@AjaxHelpers.AjaxLoader()
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function () {
|
$(function () {
|
||||||
var $FilterExpression = $('#DocumentTemplate_FilterExpression');
|
var field = $('#DocumentTemplate_FilterExpression');
|
||||||
var $ajaxLoading = $FilterExpression.nextAll('.ajaxLoading').first();
|
var fieldRemove = field.next('.ajaxRemove');
|
||||||
var $ajaxRemove = $FilterExpression.nextAll('.ajaxRemove').first();
|
var fieldOriginalWidth, fieldOriginalHeight;
|
||||||
$FilterExpression
|
|
||||||
.watermark('Filter Expression')
|
document.DiscoFunctions.PropertyChangeHelper(
|
||||||
.focus(function () { $FilterExpression.select() })
|
field,
|
||||||
.keydown(function (e) {
|
'None',
|
||||||
if (e.which == 13) {
|
'@Url.Action(MVC.API.DocumentTemplate.UpdateFilterExpression(Model.DocumentTemplate.Id))',
|
||||||
$(this).blur();
|
'FilterExpression'
|
||||||
}
|
);
|
||||||
}).change(function () {
|
|
||||||
updateFilterExpression($FilterExpression.val());
|
field.focus(function () {
|
||||||
});
|
fieldOriginalWidth = field.width();
|
||||||
if ($FilterExpression.val() != '')
|
fieldOriginalHeight = field.height();
|
||||||
$ajaxRemove.show();
|
field.css('overflow', 'visible').animate({ width: field.parent().width() - 42, height: 75 }, 200);
|
||||||
$ajaxRemove.click(function () {
|
}).blur(function () {
|
||||||
updateFilterExpression('');
|
field.css('overflow', 'hidden').animate({ width: fieldOriginalWidth, height: fieldOriginalHeight }, 200);
|
||||||
$FilterExpression.val('');
|
}).change(function () {
|
||||||
|
if (!!field.val()) {
|
||||||
|
fieldRemove.show();
|
||||||
|
} else {
|
||||||
|
fieldRemove.hide();
|
||||||
|
}
|
||||||
|
}).attr('placeholder', 'None').attr('spellcheck', 'false');
|
||||||
|
|
||||||
|
fieldRemove.click(function () {
|
||||||
|
field.val('').change();
|
||||||
});
|
});
|
||||||
var updateFilterExpression = function (filterExpression) {
|
|
||||||
$ajaxLoading.show();
|
if (!!field.val()) {
|
||||||
$ajaxRemove.hide();
|
fieldRemove.show();
|
||||||
var data = { FilterExpression: filterExpression };
|
} else {
|
||||||
$.ajax({
|
fieldRemove.hide();
|
||||||
url: '@Url.Action(MVC.API.DocumentTemplate.UpdateFilterExpression(Model.DocumentTemplate.Id))',
|
}
|
||||||
dataType: 'json',
|
|
||||||
data: data,
|
|
||||||
success: function (d) {
|
|
||||||
if (d == 'OK') {
|
|
||||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
|
||||||
if (data.FilterExpression != '')
|
|
||||||
$ajaxRemove.fadeIn('fast');
|
|
||||||
} else {
|
|
||||||
$ajaxLoading.hide();
|
|
||||||
alert('Unable to update filter expression: ' + d);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
error: function (jqXHR, textStatus, errorThrown) {
|
|
||||||
alert('Unable to update filter expression: ' + textStatus);
|
|
||||||
$ajaxLoading.hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
@@ -493,6 +456,147 @@
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
<div class="info-box">
|
||||||
|
<p class="fa-p">
|
||||||
|
<i class="fa fa-fw fa-info-circle"></i>This expression will be evaluated to determine if this template is shown in the <em>Generate Document</em> drop-down list.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>On Generated Expression:
|
||||||
|
</th>
|
||||||
|
<td>@if (canConfig && Authorization.Has(Claims.Config.DocumentTemplate.ConfigureFilterExpression))
|
||||||
|
{
|
||||||
|
@Html.EditorFor(model => model.DocumentTemplate.OnGenerateExpression)
|
||||||
|
@AjaxHelpers.AjaxRemove()
|
||||||
|
@AjaxHelpers.AjaxSave()
|
||||||
|
@AjaxHelpers.AjaxLoader()
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function () {
|
||||||
|
var field = $('#DocumentTemplate_OnGenerateExpression');
|
||||||
|
var fieldRemove = field.next('.ajaxRemove');
|
||||||
|
var fieldOriginalWidth, fieldOriginalHeight;
|
||||||
|
|
||||||
|
document.DiscoFunctions.PropertyChangeHelper(
|
||||||
|
field,
|
||||||
|
'None',
|
||||||
|
'@Url.Action(MVC.API.DocumentTemplate.UpdateOnGenerateExpression(Model.DocumentTemplate.Id))',
|
||||||
|
'OnGenerateExpression'
|
||||||
|
);
|
||||||
|
|
||||||
|
field.focus(function () {
|
||||||
|
fieldOriginalWidth = field.width();
|
||||||
|
fieldOriginalHeight = field.height();
|
||||||
|
field.css('overflow', 'visible').animate({ width: field.parent().width() - 42, height: 75 }, 200);
|
||||||
|
}).blur(function () {
|
||||||
|
field.css('overflow', 'hidden').animate({ width: fieldOriginalWidth, height: fieldOriginalHeight }, 200);
|
||||||
|
}).change(function () {
|
||||||
|
if (!!field.val()) {
|
||||||
|
fieldRemove.show();
|
||||||
|
} else {
|
||||||
|
fieldRemove.hide();
|
||||||
|
}
|
||||||
|
}).attr('placeholder', 'None').attr('spellcheck', 'false');
|
||||||
|
|
||||||
|
fieldRemove.click(function () {
|
||||||
|
field.val('').change();
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!!field.val()) {
|
||||||
|
fieldRemove.show();
|
||||||
|
} else {
|
||||||
|
fieldRemove.hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(Model.DocumentTemplate.OnGenerateExpression))
|
||||||
|
{
|
||||||
|
<span class="smallMessage"><None Specified></span>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<div class="code">
|
||||||
|
@Model.DocumentTemplate.OnGenerateExpression
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
<div class="info-box">
|
||||||
|
<p class="fa-p">
|
||||||
|
<i class="fa fa-fw fa-info-circle"></i>This expression will be evaluated each time a document is generated from this template.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>On Import Expression:
|
||||||
|
</th>
|
||||||
|
<td>@if (canConfig && Authorization.Has(Claims.Config.DocumentTemplate.ConfigureFilterExpression))
|
||||||
|
{
|
||||||
|
@Html.EditorFor(model => model.DocumentTemplate.OnImportAttachmentExpression)
|
||||||
|
@AjaxHelpers.AjaxRemove()
|
||||||
|
@AjaxHelpers.AjaxSave()
|
||||||
|
@AjaxHelpers.AjaxLoader()
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function () {
|
||||||
|
var field = $('#DocumentTemplate_OnImportAttachmentExpression');
|
||||||
|
var fieldRemove = field.next('.ajaxRemove');
|
||||||
|
var fieldOriginalWidth, fieldOriginalHeight;
|
||||||
|
|
||||||
|
document.DiscoFunctions.PropertyChangeHelper(
|
||||||
|
field,
|
||||||
|
'None',
|
||||||
|
'@Url.Action(MVC.API.DocumentTemplate.UpdateOnImportAttachmentExpression(Model.DocumentTemplate.Id))',
|
||||||
|
'OnImportAttachmentExpression'
|
||||||
|
);
|
||||||
|
|
||||||
|
field.focus(function () {
|
||||||
|
fieldOriginalWidth = field.width();
|
||||||
|
fieldOriginalHeight = field.height();
|
||||||
|
field.css('overflow', 'visible').animate({ width: field.parent().width() - 42, height: 75 }, 200);
|
||||||
|
}).blur(function () {
|
||||||
|
field.css('overflow', 'hidden').animate({ width: fieldOriginalWidth, height: fieldOriginalHeight }, 200);
|
||||||
|
}).change(function () {
|
||||||
|
if (!!field.val()) {
|
||||||
|
fieldRemove.show();
|
||||||
|
} else {
|
||||||
|
fieldRemove.hide();
|
||||||
|
}
|
||||||
|
}).attr('placeholder', 'None').attr('spellcheck', 'false');
|
||||||
|
|
||||||
|
fieldRemove.click(function () {
|
||||||
|
field.val('').change();
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!!field.val()) {
|
||||||
|
fieldRemove.show();
|
||||||
|
} else {
|
||||||
|
fieldRemove.hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(Model.DocumentTemplate.OnImportAttachmentExpression))
|
||||||
|
{
|
||||||
|
<span class="smallMessage"><None Specified></span>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<div class="code">
|
||||||
|
@Model.DocumentTemplate.OnImportAttachmentExpression
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
<div class="info-box">
|
||||||
|
<p class="fa-p">
|
||||||
|
<i class="fa fa-fw fa-info-circle"></i>This expression will be evaluated each time a document is imported (as an attachment) where it is determined the document was based on this template.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
@@ -61,7 +61,9 @@ if (!document.DiscoFunctions.PropertyChangeHelper) {
|
|||||||
if (PropertyField[0].nodeName.toLowerCase() == 'textarea') {
|
if (PropertyField[0].nodeName.toLowerCase() == 'textarea') {
|
||||||
PropertyField.keydown(function () {
|
PropertyField.keydown(function () {
|
||||||
$ajaxSave.show();
|
$ajaxSave.show();
|
||||||
})
|
}).blur(function () {
|
||||||
|
$ajaxSave.hide();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
if(document.DiscoFunctions||(document.DiscoFunctions={}),document.DiscoFunctions.PropertyChangeHelper||(document.DiscoFunctions.PropertyValue=function(n){return n[0].nodeName.toLowerCase()=="input"&&n.attr("type")=="checkbox"?n.is(":checked"):n.val()},document.DiscoFunctions.PropertyChangeHelper=function(n,t,i,r){var e=document.DiscoFunctions.PropertyValue(n),u=null,f=n.nextAll(".ajaxSave").first(),o=n.nextAll(".ajaxLoading").first(),s=function(){f.hide();var t=document.DiscoFunctions.PropertyValue(n);e!=t&&(e=t,u&&window.clearTimeout(u),u=window.setTimeout(function(){o.show();var n={};n[r]=e;$.getJSON(i,n,function(n,t){t!="success"||n!="OK"?(alert('Unable to change property "'+r+'":\n'+n),o.hide()):o.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow")});u=null},500))};n[0].nodeName.toLowerCase()=="input"&&n.attr("type")=="checkbox"?n.click(s):n.change(s);n[0].nodeName.toLowerCase()=="input"&&n.attr("type")=="text"&&n.keydown(function(n){f.show();n.which==13&&$(this).blur()}).watermark(t).blur(function(){f.hide()}).focus(function(){$(this).select()});n[0].nodeName.toLowerCase()=="textarea"&&n.keydown(function(){f.show()})}),document.DiscoFunctions.DateChangeUserHelper||(document.DiscoFunctions.DateChangeUserHelper=function(n,t,i,r,u,f,e){var s=n.val(),o=null,h=t.next(".ajaxLoading");n.watermark(i).change(function(){var i=n.val();s.toLowerCase()!=i.toLowerCase()&&(s=i,o&&window.clearTimeout(o),o=window.setTimeout(function(){h.show();var n={};n[u]=s;$.getJSON(r,n,function(n,i){i!="success"||n.Result!="OK"?(alert("Unable to change Date:\n"+n),h.hide()):(t.text("by "+n.UserDescription),h.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow"))});o=null},500))}).focus(function(){$(this).select()});e?n.datepicker({defaultDate:new Date,minDate:moment(f).toDate(),changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n);$input.val()||$input.datepicker("setDate",new Date)}}):n.datetimepicker({defaultDate:new Date,ampm:!0,minDate:moment(f).toDate(),changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n);$input.val()||$input.datetimepicker("setDate",new Date)}})}),document.DiscoFunctions.DateChangeHelper||(document.DiscoFunctions.DateChangeHelper=function(n,t,i,r,u,f){var o=n.val(),e=null,s=n.next(".ajaxLoading");n.watermark(t).change(function(){var t=n.val();o.toLowerCase()!=t.toLowerCase()&&(o=t,e&&window.clearTimeout(e),e=window.setTimeout(function(){s.show();var n={};n[r]=o;$.getJSON(i,n,function(n,t){t!="success"||n!="OK"?(alert("Unable to change Date:\n"+n),s.hide()):s.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow")});e=null},500))}).focus(function(){$(this).select()});f?n.datepicker({defaultDate:new Date,minDate:moment(u).toDate(),changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n);$input.val()||$input.datepicker("setDate",new Date)}}):n.datetimepicker({defaultDate:new Date,ampm:!0,minDate:moment(u).toDate(),changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n);$input.val()||$input.datetimepicker("setDate",new Date)}})}),!document.DiscoFunctions.DateDialogCreateUpdater){var dialog,dialogForm,dialogHeader,dialogDateBox,dialogDatePropertyNameBox,updateUrl,friendlyName,dateField,userField,updatePropertyName,notSetDisplay,minDate,useAjax;function dateDialogGet(){if(!dialog){dialog=$("<div>").attr({"class":"dialog"});dialogForm=$("<form>").attr({action:"/",method:"post"}).appendTo(dialog);var n=$("<p>").appendTo(dialogForm);dialogHeader=$("<h3>").attr("autofocus","autofocus").appendTo(n);dialogDatePropertyNameBox=$("<input>").attr({type:"hidden",name:"key"}).appendTo(n);dialogDateBox=$("<input>").attr({type:"datetime",name:"value"}).css({display:"block","margin-top":15,"margin-left":"auto","margin-right":"auto"}).appendTo(n);$("<input>").attr({type:"hidden",name:"redirect"}).val("true").appendTo(n);dialog.dialog({resizable:!1,modal:!0,autoOpen:!1,buttons:{Update:dateDialogUpdate,Cancel:function(){$(this).dialog("close")}},open:function(){dialog.dialog("widget").find(".ui-dialog-buttonpane :tabbable:first").focus()}});dialogDateBox.datetimepicker({defaultDate:new Date,ampm:!0,changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd"})}return dialog}function dateDialogUpdate(){var u=dialogDateBox.val(),t,n,i,r;useAjax?(t=$("#"+dateField),userField&&(n=$("#"+userField)),dialog.dialog("close"),i=(n?n.next(".ajaxLoading"):t.next(".ajaxLoading")).show(),r={key:updatePropertyName,value:u},$.getJSON(updateUrl,r,function(r,u){u!="success"||r.Result!="OK"?(alert("Unable to change "+friendlyName+" Date:\n"+r),i.hide()):(r.DateTimeFull?t.attr("data-isodate",r.DateTimeISO8601).attr("data-livestamp",r.DateTimeUnixEpoc).attr("title",r.DateTimeFull).text(r.DateTimeFriendly):t.attr("data-isodate","").attr("data-livestamp","-1").attr("title",notSetDisplay).text(notSetDisplay),n&&n.text("by "+r.UserDescription),i.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow"))})):(dialog.dialog("disLine truncated
|
if(document.DiscoFunctions||(document.DiscoFunctions={}),document.DiscoFunctions.PropertyChangeHelper||(document.DiscoFunctions.PropertyValue=function(n){return n[0].nodeName.toLowerCase()=="input"&&n.attr("type")=="checkbox"?n.is(":checked"):n.val()},document.DiscoFunctions.PropertyChangeHelper=function(n,t,i,r){var e=document.DiscoFunctions.PropertyValue(n),f=null,u=n.nextAll(".ajaxSave").first(),o=n.nextAll(".ajaxLoading").first(),s=function(){u.hide();var t=document.DiscoFunctions.PropertyValue(n);e!=t&&(e=t,f&&window.clearTimeout(f),f=window.setTimeout(function(){o.show();var n={};n[r]=e;$.getJSON(i,n,function(n,t){t!="success"||n!="OK"?(alert('Unable to change property "'+r+'":\n'+n),o.hide()):o.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow")});f=null},500))};n[0].nodeName.toLowerCase()=="input"&&n.attr("type")=="checkbox"?n.click(s):n.change(s);n[0].nodeName.toLowerCase()=="input"&&n.attr("type")=="text"&&n.keydown(function(n){u.show();n.which==13&&$(this).blur()}).watermark(t).blur(function(){u.hide()}).focus(function(){$(this).select()});n[0].nodeName.toLowerCase()=="textarea"&&n.keydown(function(){u.show()}).blur(function(){u.hide()})}),document.DiscoFunctions.DateChangeUserHelper||(document.DiscoFunctions.DateChangeUserHelper=function(n,t,i,r,u,f,e){var s=n.val(),o=null,h=t.next(".ajaxLoading");n.watermark(i).change(function(){var i=n.val();s.toLowerCase()!=i.toLowerCase()&&(s=i,o&&window.clearTimeout(o),o=window.setTimeout(function(){h.show();var n={};n[u]=s;$.getJSON(r,n,function(n,i){i!="success"||n.Result!="OK"?(alert("Unable to change Date:\n"+n),h.hide()):(t.text("by "+n.UserDescription),h.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow"))});o=null},500))}).focus(function(){$(this).select()});e?n.datepicker({defaultDate:new Date,minDate:moment(f).toDate(),changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n);$input.val()||$input.datepicker("setDate",new Date)}}):n.datetimepicker({defaultDate:new Date,ampm:!0,minDate:moment(f).toDate(),changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n);$input.val()||$input.datetimepicker("setDate",new Date)}})}),document.DiscoFunctions.DateChangeHelper||(document.DiscoFunctions.DateChangeHelper=function(n,t,i,r,u,f){var o=n.val(),e=null,s=n.next(".ajaxLoading");n.watermark(t).change(function(){var t=n.val();o.toLowerCase()!=t.toLowerCase()&&(o=t,e&&window.clearTimeout(e),e=window.setTimeout(function(){s.show();var n={};n[r]=o;$.getJSON(i,n,function(n,t){t!="success"||n!="OK"?(alert("Unable to change Date:\n"+n),s.hide()):s.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow")});e=null},500))}).focus(function(){$(this).select()});f?n.datepicker({defaultDate:new Date,minDate:moment(u).toDate(),changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n);$input.val()||$input.datepicker("setDate",new Date)}}):n.datetimepicker({defaultDate:new Date,ampm:!0,minDate:moment(u).toDate(),changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n);$input.val()||$input.datetimepicker("setDate",new Date)}})}),!document.DiscoFunctions.DateDialogCreateUpdater){var dialog,dialogForm,dialogHeader,dialogDateBox,dialogDatePropertyNameBox,updateUrl,friendlyName,dateField,userField,updatePropertyName,notSetDisplay,minDate,useAjax;function dateDialogGet(){if(!dialog){dialog=$("<div>").attr({"class":"dialog"});dialogForm=$("<form>").attr({action:"/",method:"post"}).appendTo(dialog);var n=$("<p>").appendTo(dialogForm);dialogHeader=$("<h3>").attr("autofocus","autofocus").appendTo(n);dialogDatePropertyNameBox=$("<input>").attr({type:"hidden",name:"key"}).appendTo(n);dialogDateBox=$("<input>").attr({type:"datetime",name:"value"}).css({display:"block","margin-top":15,"margin-left":"auto","margin-right":"auto"}).appendTo(n);$("<input>").attr({type:"hidden",name:"redirect"}).val("true").appendTo(n);dialog.dialog({resizable:!1,modal:!0,autoOpen:!1,buttons:{Update:dateDialogUpdate,Cancel:function(){$(this).dialog("close")}},open:function(){dialog.dialog("widget").find(".ui-dialog-buttonpane :tabbable:first").focus()}});dialogDateBox.datetimepicker({defaultDate:new Date,ampm:!0,changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd"})}return dialog}function dateDialogUpdate(){var u=dialogDateBox.val(),t,n,i,r;useAjax?(t=$("#"+dateField),userField&&(n=$("#"+userField)),dialog.dialog("close"),i=(n?n.next(".ajaxLoading"):t.next(".ajaxLoading")).show(),r={key:updatePropertyName,value:u},$.getJSON(updateUrl,r,function(r,u){u!="success"||r.Result!="OK"?(alert("Unable to change "+friendlyName+" Date:\n"+r),i.hide()):(r.DateTimeFull?t.attr("data-isodate",r.DateTimeISO8601).attr("data-livestamp",r.DateTimeUnixEpoc).attr("title",r.DateTimeFull).text(r.DateTimeFriendly):t.attr("data-isodate","").attr("data-livestamp","-1").attr("title",notSetDisplay).text(notSetDisplay),n&&n.text("by "+r.UserDescription),i.hide().next(".ajaxOk").show().delay("fast").fadeOut("sloLine truncated
|
||||||
/*
|
/*
|
||||||
//# sourceMappingURL=Disco-PropertyChangeHelpers.min.js.map
|
//# sourceMappingURL=Disco-PropertyChangeHelpers.min.js.map
|
||||||
*/
|
*/
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
"version":3,
|
"version":3,
|
||||||
"file":"Disco-PropertyChangeHelpers.min.js",
|
"file":"Disco-PropertyChangeHelpers.min.js",
|
||||||
"lineCount":1,
|
"lineCount":1,
|
||||||
"mappings":"AAqMA,GArMKA,QAAQC,e,GACTD,QAAQC,eAAgB,CAAE,CAAA,EAAE,CAE3BD,QAAQC,eAAeC,qB,GACxBF,QAAQC,eAAeE,cAAe,CAAEC,QAAS,CAACC,CAAD,CAAgB,CAI7D,OAHIA,CAAc,CAAA,CAAA,CAAEC,SAASC,YAAY,CAAA,CAAG,EAAG,OAAQ,EAAGF,CAAaG,KAAK,CAAC,MAAD,CAAS,EAAG,UAApF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0BAA2B,CAAEF,CAA9B,CAAuC,CAC5CX,CAAYE,KAAK,CAAA,EAFrB,CAIIF,CAAYE,KAAK,CAAA,CAAEY,KAAK,CAAC,SAAD,CAAWP,KAAK,CAAA,CAAEQ,MAAM,CAAC,MAAD,CAAQC,QAAQ,CAAC,MAAD,CALjB,CAA9C,C,CAQTkB,CAAqB,CAAE,IAZ0B,CAapD,CAAE,GAbqC,EAN5B,CAAb,CAqBLV,MAAM,CAAC,QAAS,CAAA,CAAG,CACjBf,CAAC,CAAC,IAAD,CAAMgB,OAAO,CAAA,CADG,CAAb,CAEN,CAEFO,CAALine truncated
|
||||||
"sources":["/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers/disco.propertychangehelpers.js"],
|
"sources":["/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers/disco.propertychangehelpers.js"],
|
||||||
"names":["document","DiscoFunctions","PropertyChangeHelper","PropertyValue","document.DiscoFunctions.PropertyValue","PropertyField","nodeName","toLowerCase","attr","is","val","document.DiscoFunctions.PropertyChangeHelper","FieldWatermark","UpdateUrl","UpdatePropertyName","fieldValue","fieldChangeToken","$ajaxSave","nextAll","first","$ajaxLoading","fieldChangeFunction","hide","changedValue","window","clearTimeout","setTimeout","show","data","$","getJSON","response","result","alert","next","delay","fadeOut","click","change","keydown","e","which","blur","watermark","focus","select","DateChangeUserHelper","document.DiscoFunctions.DateChangeUserHelper","DateField","UserField","DateFieldWatermark","minDate","dateOnly","dateFieldValue","dateFieldChangeToken","dateText","Result","text","UserDescription","datepicker","Date","moment","toDate","beforeShow","input","$input","datetimepicker","DateChangeHelper","document.DiscoFunctions.DateChangeHelper","DateDialogCreateUpdater","dialog","dialogForm","dialogHeader","dialogDateBox","dialogDatePropertyNameBox","updateUrl","friendlyName","dateField","userField","updatePropertyName","notSetDisplay","useAjax","dateDialogGet","appendTo","dialogBody","css","dateDialogUpdate","Cancel","open","find","dateValue","$dateField","$userField","DateTimeFull","DateTimeISO8601","DateTimeUnixEpoc","DateTimeFriendly","submit","dateDialogOpen","FriendlyName","NotSetDisplay","MinDate","UseAjax","d","dfVal","dateDialogCreateUpdater","event","preventDefault","insertBefore"]
|
"names":["document","DiscoFunctions","PropertyChangeHelper","PropertyValue","document.DiscoFunctions.PropertyValue","PropertyField","nodeName","toLowerCase","attr","is","val","document.DiscoFunctions.PropertyChangeHelper","FieldWatermark","UpdateUrl","UpdatePropertyName","fieldValue","fieldChangeToken","$ajaxSave","nextAll","first","$ajaxLoading","fieldChangeFunction","hide","changedValue","window","clearTimeout","setTimeout","show","data","$","getJSON","response","result","alert","next","delay","fadeOut","click","change","keydown","e","which","blur","watermark","focus","select","DateChangeUserHelper","document.DiscoFunctions.DateChangeUserHelper","DateField","UserField","DateFieldWatermark","minDate","dateOnly","dateFieldValue","dateFieldChangeToken","dateText","Result","text","UserDescription","datepicker","Date","moment","toDate","beforeShow","input","$input","datetimepicker","DateChangeHelper","document.DiscoFunctions.DateChangeHelper","DateDialogCreateUpdater","dialog","dialogForm","dialogHeader","dialogDateBox","dialogDatePropertyNameBox","updateUrl","friendlyName","dateField","userField","updatePropertyName","notSetDisplay","useAjax","dateDialogGet","appendTo","dialogBody","css","dateDialogUpdate","Cancel","open","find","dateValue","$dateField","$userField","DateTimeFull","DateTimeISO8601","DateTimeUnixEpoc","DateTimeFriendly","submit","dateDialogOpen","FriendlyName","NotSetDisplay","MinDate","UseAjax","d","dfVal","dateDialogCreateUpdater","event","preventDefault","insertBefore"]
|
||||||
}
|
}
|
||||||
+3
-1
@@ -60,7 +60,9 @@ if (!document.DiscoFunctions.PropertyChangeHelper) {
|
|||||||
if (PropertyField[0].nodeName.toLowerCase() == 'textarea') {
|
if (PropertyField[0].nodeName.toLowerCase() == 'textarea') {
|
||||||
PropertyField.keydown(function () {
|
PropertyField.keydown(function () {
|
||||||
$ajaxSave.show();
|
$ajaxSave.show();
|
||||||
})
|
}).blur(function () {
|
||||||
|
$ajaxSave.hide();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -287,8 +287,12 @@ table.deviceProfileTable th.type {
|
|||||||
table.deviceProfileTable th.deviceCount {
|
table.deviceProfileTable th.deviceCount {
|
||||||
width: 120px;
|
width: 120px;
|
||||||
}
|
}
|
||||||
#configurationDeviceProfileShow #ComputerNameTemplate {
|
#configurationDeviceProfileShow #DeviceProfile_ComputerNameTemplate {
|
||||||
width: 300px;
|
height: 16px;
|
||||||
|
min-height: 16px;
|
||||||
|
width: calc(100% - 32px);
|
||||||
|
overflow: hidden;
|
||||||
|
font-family: Consolas, "Courier New", monospace;
|
||||||
}
|
}
|
||||||
#configurationDeviceProfileShow #expressionBrowserAnchor {
|
#configurationDeviceProfileShow #expressionBrowserAnchor {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@@ -622,6 +626,14 @@ div.logEventsViewport table.logEventsViewport > tbody > tr > td.eventType {
|
|||||||
#Config_DocumentTemplates_Show > div.form > table > tbody > tr > th {
|
#Config_DocumentTemplates_Show > div.form > table > tbody > tr > th {
|
||||||
width: 140px;
|
width: 140px;
|
||||||
}
|
}
|
||||||
|
#Config_DocumentTemplates_Show #DocumentTemplate_FilterExpression,
|
||||||
|
#Config_DocumentTemplates_Show #DocumentTemplate_OnGenerateExpression,
|
||||||
|
#Config_DocumentTemplates_Show #DocumentTemplate_OnImportAttachmentExpression {
|
||||||
|
height: 16px;
|
||||||
|
min-height: 16px;
|
||||||
|
overflow: hidden;
|
||||||
|
font-family: Consolas, "Courier New", monospace;
|
||||||
|
}
|
||||||
#Config_DocumentTemplates_Show #Config_DocumentTemplates_Scope_Button {
|
#Config_DocumentTemplates_Show #Config_DocumentTemplates_Scope_Button {
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -228,8 +228,12 @@ table.deviceProfileTable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#configurationDeviceProfileShow {
|
#configurationDeviceProfileShow {
|
||||||
#ComputerNameTemplate {
|
#DeviceProfile_ComputerNameTemplate {
|
||||||
width: 300px;
|
height: 16px;
|
||||||
|
min-height: 16px;
|
||||||
|
width: calc(~"100% - 32px");
|
||||||
|
overflow: hidden;
|
||||||
|
font-family: @FontFamilyMono;
|
||||||
}
|
}
|
||||||
|
|
||||||
#expressionBrowserAnchor {
|
#expressionBrowserAnchor {
|
||||||
@@ -656,6 +660,13 @@ div.logEventsViewport {
|
|||||||
width: 140px;
|
width: 140px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#DocumentTemplate_FilterExpression, #DocumentTemplate_OnGenerateExpression, #DocumentTemplate_OnImportAttachmentExpression {
|
||||||
|
height: 16px;
|
||||||
|
min-height: 16px;
|
||||||
|
overflow: hidden;
|
||||||
|
font-family: @FontFamilyMono;
|
||||||
|
}
|
||||||
|
|
||||||
#Config_DocumentTemplates_Scope_Button {
|
#Config_DocumentTemplates_Scope_Button {
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
.tableData{border:solid 1px #f4f4f4;border-collapse:collapse}.tableData>tbody>tr>td{border:solid 1px #f4f4f4;background-color:#fff}.tableData>tbody>tr:nth-child(odd)>td{background-color:#fcfcfc}.tableData>thead>tr>th,.tableData>tbody>tr>th{background-color:#f4f4f4;border:solid 1px #f4f4f4}.tableData>tbody>tr:hover>td{background-color:#fefefe}.tableData>tbody>tr:hover:nth-child(odd)>td{background-color:#fafafa}.tableData>tfoot>tr>th,.tableData>tfoot>tr>td{background-color:#f4f4f4}.tableDataDark{border:solid 1px #d8d8d8;border-collapse:collapse}.tableDataDark td{border:solid 1px #d8d8d8;background-color:#fff}.tableDataDark th{background-color:#eee;border:solid 1px #d8d8d8}.tableDataContainer{background-color:#fff}.tableDataVertical{border:solid 1px #f4f4f4;border-collapse:collapse}.tableDataVertical>tbody>tr:nth-child(odd){background-color:#f4f4f4;margin:0;padding:0}.tableDataVertical>tbody>tr>th.name{width:170px;text-align:right}.tableDataVertical table.sub>tbody>tr:not(:first-child)>th,.tableDataVertical table.sub>tbody>tr:not(:first-child)>td{border-top:1px dashed #aaa}.tableDataVertical table.sub>tbody>tr>th{font-weight:normal;text-align:right}.tableDataVertical table.sub>tbody>tr>th.name{text-align:right}.icon16{display:inline-block;height:16px;width:16px;margin-left:2px;cursor:pointer}.subtleUntilHover{-moz-opacity:.3;opacity:.3}.subtleUntilHover:hover{-moz-opacity:1;opacity:1}#updateAvailableContainer{float:right;border:1px dashed #ddd;background-color:#fff;font-size:.6em;line-height:1em;padding:10px 10px 4px 70px;text-align:right;height:50px}#updateAvailableContainer i{position:absolute;display:block;height:64px;width:64px;vertical-align:middle;margin-left:-70px;font-size:50px;color:#e51400}#updateAvailableContainer a.button{font-size:12px;margin-top:8px}.Config_HideAdvanced .Config_HideAdvanced_Item{display:none}.Config_LinkedGroup_Instance{margin:4px 0 8px 4px;padding:4px 0 4px 6px;border-left:4px solid #ccc;background-color:#fff}.Config_LinkedGroup_Instance div.code{margin-left:2px}#Config_LinkedGroup_Dialog h3{margin-bottom:6px}#Config_LinkedGroup_Dialog div.input{margin-top:12px}#expressionEditor #expressionEditorExceptionContainer{display:none;border:1px dashed #ff9696;background-color:#ffd8d8;margin:10px 0;padding:10px}#expressionEditor #expressionEditorContainer{border:1px solid #1e6dab;background-color:#f4f4f4;height:100px}.expressionTree span.dynatree-node span.dynatree-icon{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAAQCAYAAACm53kpAAAGFklEQVRYw+WVe1BUVRzHvwE+QE0ZLF1Y3gTGSxIl4rk85KHFe0cUiIc8IjNx8gUmLJAFpbIKKJmmCSOi4q48zAe6LqAoioiIMlpOqYWxKCroWFNzO2eXXRdYCBqmf/rNfPece+6598738/ud3wJjHPV8WNwphoSO+L+F3HznWaTVbcGDsYQggkhjJPucWIhcGYYP5xnAKnkh0n1skcGxRobzLGx0MsYmR2MUO5qBMzEAiXhvxmL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E1sTPTGQADKEPp1/T4AcgjUvCHIO0YYPGSVC1FRWI1qfg5y8w6hPGkpEk6kI6MuDnH9ADA8aFApHj54UB3qk0M9zUijM42yRgTDxiSdE6q/ZLYoWTnj0rmhTyH0vfaQD5RBn1MBPfeTJPu10HNpgFVK2EAAcgj9FpQA0JCaj68tQbyIPfD8C0sRFvcBQlnWCAHbdqnsCGyYRyAIjqKyoAKVW2MQ25yJzLoVSGkk82sc8ncO9nz3QQB4PDUsJz0soH0KFt+ZIVU0Yzo0AFPuR4OyLW16jaTpndaDH2l6nPNmcK63gHOjFWanRaoCMCiUAVDT1HwWkwiPYzUDIQxdBTzbLGQLDqCsiGZ9LdY1RCPmeglKLKUb9H1dZUmMipKKIUdZPldWFPPmsABId9eESbCiB8DQuxAGpAL0PA7A85yptAJoD6AVMFoAyuaXX8+Wzu2/ZkZ6FHKRa0ErIRZLmyMR2c4H31ZxU9+n/xE4SP7FSBNHkGgaQm6wwG03RsRNG8Qxs4cHYNsyCd6npsLrog6czr1Osq0Lb9LxXepMiMzhdcGSyBauDXNGBYBKlfkRVoA88pFvswQRt7OQZd/vRh8ARaa5zHjVFfBs7vAAqHldZwuwA21gnjAPs9e64C2eNxy+fBeOeSFw2hGu0EgBKJe/077Gf2t+2DAKfLtfBTCMpkJHGB3wGANkMJbIYWyGB0ANjVajCWp6rM3T0Ji2ifxUQV2rQqHxU4i0KomqoKHZN06sGhrAfxVjbX4M4m/gZza+uQwOHQAAAABJRU5ErkJggg==);background-position-y:0}.expressionTree span.dynatree-node.object span.dynatree-icon{background-position-x:0}.expressionTree span.dynatree-node.parameter span.dynatree-icon{background-position-x:-16px}.expressionTree span.dynatree-node.function span.dynatree-icon{background-position-x:-32px}.expressionTree span.dynatree-node.property span.dynatree-icon{backgrounLine truncated
|
.tableData{border:solid 1px #f4f4f4;border-collapse:collapse}.tableData>tbody>tr>td{border:solid 1px #f4f4f4;background-color:#fff}.tableData>tbody>tr:nth-child(odd)>td{background-color:#fcfcfc}.tableData>thead>tr>th,.tableData>tbody>tr>th{background-color:#f4f4f4;border:solid 1px #f4f4f4}.tableData>tbody>tr:hover>td{background-color:#fefefe}.tableData>tbody>tr:hover:nth-child(odd)>td{background-color:#fafafa}.tableData>tfoot>tr>th,.tableData>tfoot>tr>td{background-color:#f4f4f4}.tableDataDark{border:solid 1px #d8d8d8;border-collapse:collapse}.tableDataDark td{border:solid 1px #d8d8d8;background-color:#fff}.tableDataDark th{background-color:#eee;border:solid 1px #d8d8d8}.tableDataContainer{background-color:#fff}.tableDataVertical{border:solid 1px #f4f4f4;border-collapse:collapse}.tableDataVertical>tbody>tr:nth-child(odd){background-color:#f4f4f4;margin:0;padding:0}.tableDataVertical>tbody>tr>th.name{width:170px;text-align:right}.tableDataVertical table.sub>tbody>tr:not(:first-child)>th,.tableDataVertical table.sub>tbody>tr:not(:first-child)>td{border-top:1px dashed #aaa}.tableDataVertical table.sub>tbody>tr>th{font-weight:normal;text-align:right}.tableDataVertical table.sub>tbody>tr>th.name{text-align:right}.icon16{display:inline-block;height:16px;width:16px;margin-left:2px;cursor:pointer}.subtleUntilHover{-moz-opacity:.3;opacity:.3}.subtleUntilHover:hover{-moz-opacity:1;opacity:1}#updateAvailableContainer{float:right;border:1px dashed #ddd;background-color:#fff;font-size:.6em;line-height:1em;padding:10px 10px 4px 70px;text-align:right;height:50px}#updateAvailableContainer i{position:absolute;display:block;height:64px;width:64px;vertical-align:middle;margin-left:-70px;font-size:50px;color:#e51400}#updateAvailableContainer a.button{font-size:12px;margin-top:8px}.Config_HideAdvanced .Config_HideAdvanced_Item{display:none}.Config_LinkedGroup_Instance{margin:4px 0 8px 4px;padding:4px 0 4px 6px;border-left:4px solid #ccc;background-color:#fff}.Config_LinkedGroup_Instance div.code{margin-left:2px}#Config_LinkedGroup_Dialog h3{margin-bottom:6px}#Config_LinkedGroup_Dialog div.input{margin-top:12px}#expressionEditor #expressionEditorExceptionContainer{display:none;border:1px dashed #ff9696;background-color:#ffd8d8;margin:10px 0;padding:10px}#expressionEditor #expressionEditorContainer{border:1px solid #1e6dab;background-color:#f4f4f4;height:100px}.expressionTree span.dynatree-node span.dynatree-icon{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAAQCAYAAACm53kpAAAGFklEQVRYw+WVe1BUVRzHvwE+QE0ZLF1Y3gTGSxIl4rk85KHFe0cUiIc8IjNx8gUmLJAFpbIKKJmmCSOi4q48zAe6LqAoioiIMlpOqYWxKCroWFNzO2eXXRdYCBqmf/rNfPece+6598738/ud3wJjHPV8WNwphoSO+L+F3HznWaTVbcGDsYQggkhjJPucWIhcGYYP5xnAKnkh0n1skcGxRobzLGx0MsYmR2MUO5qBMzEAiXhvxmLZU94tq/rJqzUV3q08zL+ei/lt+fC9sRt+N0vh334U/rdOYMEtMRnPqzL/4CxSu46jQFIJgSoI93FfZ7Tmi1FsVoSitWuwhv1Pe51ZcO0+g0BHNkqYH7BVrueXsPlhDYou7cYhrh2OOCzCdhQg7SWAcCYK4X/GIPyPBHBfJIP7fAWCe1chuGc9Qp5kIfhRDgIfbkHQo0IESnaCI74yKPNnkNZ5HPldxLxEiEuSw7i7fgl65BCo+Soc2zkaCHLzZSgLpeM2bBsWAscSM90McID5GTuy41BKzfdexOYn51Ao+R5lvwpR9bsAP65chr0z+TijqgLWw7dtI/zatsoy315GVA2/WyJp1uVyr7k6oOxT5ea7BGgk5u+pMt+N7pCRQtiP/VbUdA1qPLrxNLgFrR/T6wLsMlRscj+bpZAdn+tph5SeBvDi/HGYQjCfjObHtdj+8CRKOwQQ/XIIVyT78GhRFAQ6n6NJ9hKrZeGKF3IZdXDIefO/PQH2l7UQUD8FLnXaZG060Uy8c14PnAYjsJwa6Xb5me86KSv7LpL5riEyT8334FmSCOK8T7D6mrLZjhaEpacjFKzxoTAOWE2W1KhZUgFBj9ETRp+juozmFXQ9D3ksBYBIJgJOe32o+S4xPp1riKqGPdho+BrKKQQWxtXe3IMm8SbcFeWi8zMuJDPsIdLNxg3Z1y2T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kJHGB3wGANkMJbIYWyGB0ANjVajCWp6rM3T0Ji2ifxUQV2rQqHxU4i0KomqoKHZN06sGhrAfxVjbX4M4m/gZza+uQwOHQAAAABJRU5ErkJggg==);background-position-y:0}.expressionTree span.dynatree-node.object span.dynatree-icon{background-position-x:0}.expressionTree span.dynatree-node.parameter span.dynatree-icon{background-position-x:-16px}.expressionTree span.dynatree-node.function span.dynatree-icon{background-position-x:-32px}.expressionTree span.dynatree-node.property span.dynatree-icon{backgrounLine truncated
|
||||||
@@ -83,6 +83,18 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
}
|
}
|
||||||
[NonAction]
|
[NonAction]
|
||||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
public virtual System.Web.Mvc.ActionResult UpdateOnGenerateExpression()
|
||||||
|
{
|
||||||
|
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateOnGenerateExpression);
|
||||||
|
}
|
||||||
|
[NonAction]
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
public virtual System.Web.Mvc.ActionResult UpdateOnImportAttachmentExpression()
|
||||||
|
{
|
||||||
|
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateOnImportAttachmentExpression);
|
||||||
|
}
|
||||||
|
[NonAction]
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
public virtual System.Web.Mvc.ActionResult UpdateFlattenForm()
|
public virtual System.Web.Mvc.ActionResult UpdateFlattenForm()
|
||||||
{
|
{
|
||||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateFlattenForm);
|
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateFlattenForm);
|
||||||
@@ -173,6 +185,8 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
public readonly string Template = "Template";
|
public readonly string Template = "Template";
|
||||||
public readonly string UpdateDescription = "UpdateDescription";
|
public readonly string UpdateDescription = "UpdateDescription";
|
||||||
public readonly string UpdateFilterExpression = "UpdateFilterExpression";
|
public readonly string UpdateFilterExpression = "UpdateFilterExpression";
|
||||||
|
public readonly string UpdateOnGenerateExpression = "UpdateOnGenerateExpression";
|
||||||
|
public readonly string UpdateOnImportAttachmentExpression = "UpdateOnImportAttachmentExpression";
|
||||||
public readonly string UpdateFlattenForm = "UpdateFlattenForm";
|
public readonly string UpdateFlattenForm = "UpdateFlattenForm";
|
||||||
public readonly string UpdateScope = "UpdateScope";
|
public readonly string UpdateScope = "UpdateScope";
|
||||||
public readonly string UpdateJobSubTypes = "UpdateJobSubTypes";
|
public readonly string UpdateJobSubTypes = "UpdateJobSubTypes";
|
||||||
@@ -195,6 +209,8 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
public const string Template = "Template";
|
public const string Template = "Template";
|
||||||
public const string UpdateDescription = "UpdateDescription";
|
public const string UpdateDescription = "UpdateDescription";
|
||||||
public const string UpdateFilterExpression = "UpdateFilterExpression";
|
public const string UpdateFilterExpression = "UpdateFilterExpression";
|
||||||
|
public const string UpdateOnGenerateExpression = "UpdateOnGenerateExpression";
|
||||||
|
public const string UpdateOnImportAttachmentExpression = "UpdateOnImportAttachmentExpression";
|
||||||
public const string UpdateFlattenForm = "UpdateFlattenForm";
|
public const string UpdateFlattenForm = "UpdateFlattenForm";
|
||||||
public const string UpdateScope = "UpdateScope";
|
public const string UpdateScope = "UpdateScope";
|
||||||
public const string UpdateJobSubTypes = "UpdateJobSubTypes";
|
public const string UpdateJobSubTypes = "UpdateJobSubTypes";
|
||||||
@@ -252,6 +268,26 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
public readonly string FilterExpression = "FilterExpression";
|
public readonly string FilterExpression = "FilterExpression";
|
||||||
public readonly string redirect = "redirect";
|
public readonly string redirect = "redirect";
|
||||||
}
|
}
|
||||||
|
static readonly ActionParamsClass_UpdateOnGenerateExpression s_params_UpdateOnGenerateExpression = new ActionParamsClass_UpdateOnGenerateExpression();
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
public ActionParamsClass_UpdateOnGenerateExpression UpdateOnGenerateExpressionParams { get { return s_params_UpdateOnGenerateExpression; } }
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
public class ActionParamsClass_UpdateOnGenerateExpression
|
||||||
|
{
|
||||||
|
public readonly string id = "id";
|
||||||
|
public readonly string OnGenerateExpression = "OnGenerateExpression";
|
||||||
|
public readonly string redirect = "redirect";
|
||||||
|
}
|
||||||
|
static readonly ActionParamsClass_UpdateOnImportAttachmentExpression s_params_UpdateOnImportAttachmentExpression = new ActionParamsClass_UpdateOnImportAttachmentExpression();
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
public ActionParamsClass_UpdateOnImportAttachmentExpression UpdateOnImportAttachmentExpressionParams { get { return s_params_UpdateOnImportAttachmentExpression; } }
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
public class ActionParamsClass_UpdateOnImportAttachmentExpression
|
||||||
|
{
|
||||||
|
public readonly string id = "id";
|
||||||
|
public readonly string OnImportAttachmentExpression = "OnImportAttachmentExpression";
|
||||||
|
public readonly string redirect = "redirect";
|
||||||
|
}
|
||||||
static readonly ActionParamsClass_UpdateFlattenForm s_params_UpdateFlattenForm = new ActionParamsClass_UpdateFlattenForm();
|
static readonly ActionParamsClass_UpdateFlattenForm s_params_UpdateFlattenForm = new ActionParamsClass_UpdateFlattenForm();
|
||||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
public ActionParamsClass_UpdateFlattenForm UpdateFlattenFormParams { get { return s_params_UpdateFlattenForm; } }
|
public ActionParamsClass_UpdateFlattenForm UpdateFlattenFormParams { get { return s_params_UpdateFlattenForm; } }
|
||||||
@@ -457,6 +493,34 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
return callInfo;
|
return callInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[NonAction]
|
||||||
|
partial void UpdateOnGenerateExpressionOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, string id, string OnGenerateExpression, bool redirect);
|
||||||
|
|
||||||
|
[NonAction]
|
||||||
|
public override System.Web.Mvc.ActionResult UpdateOnGenerateExpression(string id, string OnGenerateExpression, bool redirect)
|
||||||
|
{
|
||||||
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateOnGenerateExpression);
|
||||||
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
||||||
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "OnGenerateExpression", OnGenerateExpression);
|
||||||
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
||||||
|
UpdateOnGenerateExpressionOverride(callInfo, id, OnGenerateExpression, redirect);
|
||||||
|
return callInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
[NonAction]
|
||||||
|
partial void UpdateOnImportAttachmentExpressionOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, string id, string OnImportAttachmentExpression, bool redirect);
|
||||||
|
|
||||||
|
[NonAction]
|
||||||
|
public override System.Web.Mvc.ActionResult UpdateOnImportAttachmentExpression(string id, string OnImportAttachmentExpression, bool redirect)
|
||||||
|
{
|
||||||
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateOnImportAttachmentExpression);
|
||||||
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
||||||
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "OnImportAttachmentExpression", OnImportAttachmentExpression);
|
||||||
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
||||||
|
UpdateOnImportAttachmentExpressionOverride(callInfo, id, OnImportAttachmentExpression, redirect);
|
||||||
|
return callInfo;
|
||||||
|
}
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
partial void UpdateFlattenFormOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, string id, string FlattenForm, bool redirect);
|
partial void UpdateFlattenFormOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, string id, string FlattenForm, bool redirect);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user