From c5e120373702bbca69fad9517e12094f6c9f4714 Mon Sep 17 00:00:00 2001 From: GleamTech Date: Wed, 5 Sep 2018 10:13:34 -0700 Subject: [PATCH] Version 6.2.0 ## Version 6.2.0 - September 5, 2018 - **Added:** New client-side events. Before events: ClientCreating, ClientDeleting, ClientRenaming, ClientCopying, ClientMoving, ClientCompressing, ClientExtracting, ClientUploading, ClientDownloading, ClientPreviewing. It's possible to stop a file action (and optionally display a message) by canceling the corresponding before event. After events: ClientFolderChanged, ClientSelectionChanged, ClientCreated, ClientDeleted, ClientRenamed, ClientCopied, ClientMoved, ClientCompressed, ClientExtracted, ClientUploaded. Refer to new "Client-side events" sample and updated docs for event handler usage. - **Improved:** Document Viewer stability, accuracy for Spreadsheet, Presentation, ProjectManagement and Email formats. - **Improved:** Updated Media Player. --- .../FileManagerController.ClientEvents.cs | 53 ++++ ... => FileManagerController.ServerEvents.cs} | 2 +- .../FileManager/ClientEvents.html | 43 ++++ .../FileManager/ServerEvents.html} | 10 +- .../Views/FileManager/Chooser.cshtml | 22 +- .../Views/FileManager/ClientEvents.cshtml | 194 +++++++++++++++ .../Views/FileManager/Display.cshtml | 2 +- .../Views/FileManager/Dynamic.cshtml | 2 +- .../{Events.cshtml => ServerEvents.cshtml} | 2 +- .../Views/FileManager/UsingLayout.cshtml | 2 +- .../Views/FileManager/UsingPartial.cshtml | 2 +- .../AspNetCore.CS/Views/Home/Index.cshtml | 15 +- Examples/AspNetCore.CS/Web.config | 11 +- .../FileManagerController.ClientEvents.cs | 53 ++++ ... => FileManagerController.ServerEvents.cs} | 2 +- .../FileManager/ClientEvents.html | 43 ++++ .../FileManager/ServerEvents.html} | 10 +- Examples/Mvc.CS/Mvc.CS.csproj | 21 +- .../Mvc.CS/Views/FileManager/Chooser.cshtml | 22 +- .../Views/FileManager/ClientEvents.cshtml | 194 +++++++++++++++ .../Mvc.CS/Views/FileManager/Display.cshtml | 2 +- .../Mvc.CS/Views/FileManager/Dynamic.cshtml | 2 +- .../{Events.cshtml => ServerEvents.cshtml} | 2 +- .../Views/FileManager/UsingLayout.cshtml | 2 +- .../Views/FileManager/UsingPartial.cshtml | 2 +- Examples/Mvc.CS/Views/Home/Index.cshtml | 15 +- Examples/Mvc.CS/packages.config | 10 +- .../FileManagerController.ClientEvents.vb | 48 ++++ ... => FileManagerController.ServerEvents.vb} | 2 +- .../FileManager/ClientEvents.html | 43 ++++ .../{Events.html => ServerEvents.html} | 10 +- Examples/Mvc.VB/Mvc.VB.vbproj | 19 +- .../Mvc.VB/Views/FileManager/Chooser.vbhtml | 22 +- .../Views/FileManager/ClientEvents.vbhtml | 194 +++++++++++++++ .../Mvc.VB/Views/FileManager/Display.vbhtml | 2 +- .../Mvc.VB/Views/FileManager/Dynamic.vbhtml | 2 +- .../{Events.vbhtml => ServerEvents.vbhtml} | 2 +- .../Views/FileManager/UsingLayout.vbhtml | 2 +- .../Views/FileManager/UsingPartial.vbhtml | 2 +- Examples/Mvc.VB/Views/Home/Index.vbhtml | 16 +- Examples/Mvc.VB/packages.config | 10 +- Examples/WebForms.CS/Default.aspx.cs | 15 +- .../FileManager/ClientEvents.html | 43 ++++ .../{Events.html => ServerEvents.html} | 10 +- Examples/WebForms.CS/FileManager/Chooser.aspx | 22 +- .../WebForms.CS/FileManager/ClientEvents.aspx | 226 ++++++++++++++++++ .../FileManager/ClientEvents.aspx.cs | 17 ++ ...igner.cs => ClientEvents.aspx.designer.cs} | 2 +- Examples/WebForms.CS/FileManager/Display.aspx | 2 +- Examples/WebForms.CS/FileManager/Dynamic.aspx | 2 +- .../WebForms.CS/FileManager/Programmatic.aspx | 2 +- .../{Events.aspx => ServerEvents.aspx} | 4 +- .../{Events.aspx.cs => ServerEvents.aspx.cs} | 2 +- .../FileManager/ServerEvents.aspx.designer.cs | 24 ++ Examples/WebForms.CS/WebForms.CS.csproj | 35 ++- Examples/WebForms.CS/packages.config | 10 +- Examples/WebForms.VB/Default.aspx.vb | 82 ++++--- .../FileManager/ClientEvents.html | 43 ++++ .../Descriptions/FileManager/Events.html | 37 --- .../FileManager/ServerEvents.html | 37 +++ Examples/WebForms.VB/FileManager/Chooser.aspx | 22 +- .../WebForms.VB/FileManager/ClientEvents.aspx | 226 ++++++++++++++++++ .../FileManager/ClientEvents.aspx.designer.vb | 24 ++ .../FileManager/ClientEvents.aspx.vb | 8 + Examples/WebForms.VB/FileManager/Display.aspx | 2 +- Examples/WebForms.VB/FileManager/Dynamic.aspx | 2 +- .../WebForms.VB/FileManager/Programmatic.aspx | 2 +- .../{Events.aspx => ServerEvents.aspx} | 4 +- ...igner.vb => ServerEvents.aspx.designer.vb} | 2 +- .../{Events.aspx.vb => ServerEvents.aspx.vb} | 2 +- Examples/WebForms.VB/WebForms.VB.vbproj | 34 ++- Examples/WebForms.VB/packages.config | 10 +- 72 files changed, 1779 insertions(+), 288 deletions(-) create mode 100644 Examples/AspNetCore.CS/Controllers/FileManagerController.ClientEvents.cs rename Examples/AspNetCore.CS/Controllers/{FileManagerController.Events.cs => FileManagerController.ServerEvents.cs} (99%) create mode 100644 Examples/AspNetCore.CS/Descriptions/FileManager/ClientEvents.html rename Examples/{Mvc.CS/Descriptions/FileManager/Events.html => AspNetCore.CS/Descriptions/FileManager/ServerEvents.html} (70%) create mode 100644 Examples/AspNetCore.CS/Views/FileManager/ClientEvents.cshtml rename Examples/AspNetCore.CS/Views/FileManager/{Events.cshtml => ServerEvents.cshtml} (93%) create mode 100644 Examples/Mvc.CS/Controllers/FileManagerController.ClientEvents.cs rename Examples/Mvc.CS/Controllers/{FileManagerController.Events.cs => FileManagerController.ServerEvents.cs} (99%) create mode 100644 Examples/Mvc.CS/Descriptions/FileManager/ClientEvents.html rename Examples/{AspNetCore.CS/Descriptions/FileManager/Events.html => Mvc.CS/Descriptions/FileManager/ServerEvents.html} (70%) create mode 100644 Examples/Mvc.CS/Views/FileManager/ClientEvents.cshtml rename Examples/Mvc.CS/Views/FileManager/{Events.cshtml => ServerEvents.cshtml} (93%) create mode 100644 Examples/Mvc.VB/Controllers/FileManagerController.ClientEvents.vb rename Examples/Mvc.VB/Controllers/{FileManagerController.Events.vb => FileManagerController.ServerEvents.vb} (99%) create mode 100644 Examples/Mvc.VB/Descriptions/FileManager/ClientEvents.html rename Examples/Mvc.VB/Descriptions/FileManager/{Events.html => ServerEvents.html} (70%) create mode 100644 Examples/Mvc.VB/Views/FileManager/ClientEvents.vbhtml rename Examples/Mvc.VB/Views/FileManager/{Events.vbhtml => ServerEvents.vbhtml} (93%) create mode 100644 Examples/WebForms.CS/Descriptions/FileManager/ClientEvents.html rename Examples/WebForms.CS/Descriptions/FileManager/{Events.html => ServerEvents.html} (70%) create mode 100644 Examples/WebForms.CS/FileManager/ClientEvents.aspx create mode 100644 Examples/WebForms.CS/FileManager/ClientEvents.aspx.cs rename Examples/WebForms.CS/FileManager/{Events.aspx.designer.cs => ClientEvents.aspx.designer.cs} (94%) rename Examples/WebForms.CS/FileManager/{Events.aspx => ServerEvents.aspx} (84%) rename Examples/WebForms.CS/FileManager/{Events.aspx.cs => ServerEvents.aspx.cs} (99%) create mode 100644 Examples/WebForms.CS/FileManager/ServerEvents.aspx.designer.cs create mode 100644 Examples/WebForms.VB/Descriptions/FileManager/ClientEvents.html delete mode 100644 Examples/WebForms.VB/Descriptions/FileManager/Events.html create mode 100644 Examples/WebForms.VB/Descriptions/FileManager/ServerEvents.html create mode 100644 Examples/WebForms.VB/FileManager/ClientEvents.aspx create mode 100644 Examples/WebForms.VB/FileManager/ClientEvents.aspx.designer.vb create mode 100644 Examples/WebForms.VB/FileManager/ClientEvents.aspx.vb rename Examples/WebForms.VB/FileManager/{Events.aspx => ServerEvents.aspx} (84%) rename Examples/WebForms.VB/FileManager/{Events.aspx.designer.vb => ServerEvents.aspx.designer.vb} (95%) rename Examples/WebForms.VB/FileManager/{Events.aspx.vb => ServerEvents.aspx.vb} (99%) diff --git a/Examples/AspNetCore.CS/Controllers/FileManagerController.ClientEvents.cs b/Examples/AspNetCore.CS/Controllers/FileManagerController.ClientEvents.cs new file mode 100644 index 0000000..4335b63 --- /dev/null +++ b/Examples/AspNetCore.CS/Controllers/FileManagerController.ClientEvents.cs @@ -0,0 +1,53 @@ +using GleamTech.FileUltimate.AspNet.UI; +using Microsoft.AspNetCore.Mvc; + +namespace GleamTech.FileUltimateExamples.AspNetCore.CS.Controllers +{ + public partial class FileManagerController + { + public IActionResult ClientEvents() + { + var fileManager = new FileManager + { + Width = 800, + Height = 600, + DisplayLanguage = "en", + ClientLoading = "fileManagerLoading", + ClientLoaded = "fileManagerLoaded", + ClientChosen = "fileManagerChosen", + ClientFolderChanged = "fileManagerFolderChanged", + ClientSelectionChanged = "fileManagerSelectionChanged", + ClientCreating = "fileManagerCreating", + ClientCreated = "fileManagerCreated", + ClientDeleting = "fileManagerDeleting", + ClientDeleted = "fileManagerDeleted", + ClientRenaming = "fileManagerRenaming", + ClientRenamed = "fileManagerRenamed", + ClientCopying = "fileManagerCopying", + ClientCopied = "fileManagerCopied", + ClientMoving = "fileManagerMoving", + ClientMoved = "fileManagerMoved", + ClientCompressing = "fileManagerCompressing", + ClientCompressed = "fileManagerCompressed", + ClientExtracting = "fileManagerExtracting", + ClientExtracted = "fileManagerExtracted", + ClientUploading = "fileManagerUploading", + ClientUploaded = "fileManagerUploaded", + ClientDownloading = "fileManagerDownloading", + ClientPreviewing = "fileManagerPreviewing" + }; + fileManager.RootFolders.Add(new FileManagerRootFolder + { + Name = "Root Folder 1", + Location = "~/App_Data/RootFolder1" + }); + fileManager.RootFolders[0].AccessControls.Add(new FileManagerAccessControl + { + Path = @"\", + AllowedPermissions = FileManagerPermissions.Full + }); + + return View(fileManager); + } + } +} diff --git a/Examples/AspNetCore.CS/Controllers/FileManagerController.Events.cs b/Examples/AspNetCore.CS/Controllers/FileManagerController.ServerEvents.cs similarity index 99% rename from Examples/AspNetCore.CS/Controllers/FileManagerController.Events.cs rename to Examples/AspNetCore.CS/Controllers/FileManagerController.ServerEvents.cs index a10c0c1..d6bd966 100644 --- a/Examples/AspNetCore.CS/Controllers/FileManagerController.Events.cs +++ b/Examples/AspNetCore.CS/Controllers/FileManagerController.ServerEvents.cs @@ -14,7 +14,7 @@ public partial class FileManagerController { private const string EventLogSessionKey = "EventLog.CS"; - public IActionResult Events() + public IActionResult ServerEvents() { var fileManager = new FileManager { diff --git a/Examples/AspNetCore.CS/Descriptions/FileManager/ClientEvents.html b/Examples/AspNetCore.CS/Descriptions/FileManager/ClientEvents.html new file mode 100644 index 0000000..e8ee2dd --- /dev/null +++ b/Examples/AspNetCore.CS/Descriptions/FileManager/ClientEvents.html @@ -0,0 +1,43 @@ +FileManager raises client-side before and after events for each file action. +

+Before events: + +It's possible to stop a file action (and optionally display a message) by canceling the corresponding before event: +
function sampleCancelEventHandler(sender, e) {
+    //Canceling a before event (stops the corresponding action):
+    e.isCanceled = true;
+    
+    //Optionally displaying a message to the user when canceling
+    e.message = e.eventName + " event is canceled!";
+}
+
+
+After events: + +After events can be used to save information about a completed file action. +For instance, the information can be logged on the client-side. \ No newline at end of file diff --git a/Examples/Mvc.CS/Descriptions/FileManager/Events.html b/Examples/AspNetCore.CS/Descriptions/FileManager/ServerEvents.html similarity index 70% rename from Examples/Mvc.CS/Descriptions/FileManager/Events.html rename to Examples/AspNetCore.CS/Descriptions/FileManager/ServerEvents.html index 79f53ca..4143611 100644 --- a/Examples/Mvc.CS/Descriptions/FileManager/Events.html +++ b/Examples/AspNetCore.CS/Descriptions/FileManager/ServerEvents.html @@ -1,7 +1,6 @@ - -Control raises before and after events for each file action. Event handlers are attached in code rather than markup. +FileManager raises server-side before and after events for each file action. Event handlers are attached in code rather than markup.

-Before events: +Before events: -After events: +It's possible to stop a file action (and optionally display a message) by canceling the corresponding before event. +

+After events: -It's possible to stop a file action by canceling the corresponding before event. After events can be used to save information about a completed file action. For instance, the information can be logged or sent via email. \ No newline at end of file diff --git a/Examples/AspNetCore.CS/Views/FileManager/Chooser.cshtml b/Examples/AspNetCore.CS/Views/FileManager/Chooser.cshtml index b93d0b5..e3ec1d8 100644 --- a/Examples/AspNetCore.CS/Views/FileManager/Chooser.cshtml +++ b/Examples/AspNetCore.CS/Views/FileManager/Chooser.cshtml @@ -6,26 +6,14 @@ - Chooser + File/Folder chooser @this.RenderHead(Model[0]) diff --git a/Examples/AspNetCore.CS/Views/FileManager/ClientEvents.cshtml b/Examples/AspNetCore.CS/Views/FileManager/ClientEvents.cshtml new file mode 100644 index 0000000..a59ce94 --- /dev/null +++ b/Examples/AspNetCore.CS/Views/FileManager/ClientEvents.cshtml @@ -0,0 +1,194 @@ +@using GleamTech.AspNet.Core +@using GleamTech.FileUltimate.AspNet.UI +@model FileManager + + + + + + Client-side events + @this.RenderHead(Model) + + + + + +
+

+ + @this.RenderBody(Model) + + diff --git a/Examples/AspNetCore.CS/Views/FileManager/Display.cshtml b/Examples/AspNetCore.CS/Views/FileManager/Display.cshtml index 6e9e76d..2d2e507 100644 --- a/Examples/AspNetCore.CS/Views/FileManager/Display.cshtml +++ b/Examples/AspNetCore.CS/Views/FileManager/Display.cshtml @@ -6,7 +6,7 @@ - Display + Displaying control on demand @this.RenderHead(Model[0]) diff --git a/Examples/AspNetCore.CS/Views/FileManager/Dynamic.cshtml b/Examples/AspNetCore.CS/Views/FileManager/Dynamic.cshtml index bca732d..a6908da 100644 --- a/Examples/AspNetCore.CS/Views/FileManager/Dynamic.cshtml +++ b/Examples/AspNetCore.CS/Views/FileManager/Dynamic.cshtml @@ -6,7 +6,7 @@ - Dynamic + Dynamic folder and permissions @this.RenderHead(Model) diff --git a/Examples/AspNetCore.CS/Views/FileManager/Events.cshtml b/Examples/AspNetCore.CS/Views/FileManager/ServerEvents.cshtml similarity index 93% rename from Examples/AspNetCore.CS/Views/FileManager/Events.cshtml rename to Examples/AspNetCore.CS/Views/FileManager/ServerEvents.cshtml index 9ac7afa..9979946 100644 --- a/Examples/AspNetCore.CS/Views/FileManager/Events.cshtml +++ b/Examples/AspNetCore.CS/Views/FileManager/ServerEvents.cshtml @@ -6,7 +6,7 @@ - Events + Server-side events @this.RenderHead(Model) diff --git a/Examples/AspNetCore.CS/Views/FileManager/UsingLayout.cshtml b/Examples/AspNetCore.CS/Views/FileManager/UsingLayout.cshtml index 4a5ab50..e32f5be 100644 --- a/Examples/AspNetCore.CS/Views/FileManager/UsingLayout.cshtml +++ b/Examples/AspNetCore.CS/Views/FileManager/UsingLayout.cshtml @@ -3,7 +3,7 @@ @model FileManager @{ - ViewBag.Title = "UsingLayout"; + ViewBag.Title = "Using MVC layout"; Layout = "~/Views/Shared/_Layout.cshtml"; } diff --git a/Examples/AspNetCore.CS/Views/FileManager/UsingPartial.cshtml b/Examples/AspNetCore.CS/Views/FileManager/UsingPartial.cshtml index 2c4daa0..c00a557 100644 --- a/Examples/AspNetCore.CS/Views/FileManager/UsingPartial.cshtml +++ b/Examples/AspNetCore.CS/Views/FileManager/UsingPartial.cshtml @@ -6,7 +6,7 @@ - UsingPartial + Using MVC partial view @this.RenderHead(Model) diff --git a/Examples/AspNetCore.CS/Views/Home/Index.cshtml b/Examples/AspNetCore.CS/Views/Home/Index.cshtml index 39de2a0..1d841f9 100644 --- a/Examples/AspNetCore.CS/Views/Home/Index.cshtml +++ b/Examples/AspNetCore.CS/Views/Home/Index.cshtml @@ -30,10 +30,17 @@ }, new Example { - Title = "Events", - Url = "FileManager/Events", - SourceFiles = new[] {"Views/FileManager/Events.cshtml", "Controllers/FileManagerController.Events.cs"}, - DescriptionFile = "Descriptions/FileManager/Events.html" + Title = "Server-side events", + Url = "FileManager/ServerEvents", + SourceFiles = new[] { "Views/FileManager/ServerEvents.cshtml", "Controllers/FileManagerController.ServerEvents.cs"}, + DescriptionFile = "Descriptions/FileManager/ServerEvents.html" + }, + new Example + { + Title = "Client-side events", + Url = "FileManager/ClientEvents", + SourceFiles = new[] { "Views/FileManager/ClientEvents.cshtml", "Controllers/FileManagerController.ClientEvents.cs"}, + DescriptionFile = "Descriptions/FileManager/ClientEvents.html" }, new Example { diff --git a/Examples/AspNetCore.CS/Web.config b/Examples/AspNetCore.CS/Web.config index f251b20..95c1f0f 100644 --- a/Examples/AspNetCore.CS/Web.config +++ b/Examples/AspNetCore.CS/Web.config @@ -12,7 +12,16 @@ --> - + + + + + + +