-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## 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.
- Loading branch information
Showing
72 changed files
with
1,779 additions
and
288 deletions.
There are no files selected for viewing
53 changes: 53 additions & 0 deletions
53
Examples/AspNetCore.CS/Controllers/FileManagerController.ClientEvents.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
Examples/AspNetCore.CS/Descriptions/FileManager/ClientEvents.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
FileManager raises client-side before and after events for each file action. | ||
<br /><br /> | ||
<b>Before events:</b> | ||
<ul> | ||
<li>ClientLoading</li> | ||
<li>ClientCreating</li> | ||
<li>ClientDeleting</li> | ||
<li>ClientRenaming</li> | ||
<li>ClientCopying</li> | ||
<li>ClientMoving</li> | ||
<li>ClientCompressing</li> | ||
<li>ClientExtracting</li> | ||
<li>ClientUploading</li> | ||
<li>ClientDownloading</li> | ||
<li>ClientPreviewing</li> | ||
</ul> | ||
It's possible to stop a file action (and optionally display a message) by canceling the corresponding before event: | ||
<pre style="font-family:Consolas;font-size:13px;color:black;background:white;"><span style="color:blue;">function</span> sampleCancelEventHandler(sender, e) { | ||
<span style="color:green;">//Canceling a before event (stops the corresponding action): | ||
</span> e.isCanceled = <span style="color:blue;">true</span>; | ||
| ||
<span style="color:green;">//Optionally displaying a message to the user when canceling | ||
</span> e.message = e.eventName + <span style="color:#a31515;">" event is canceled!"</span>; | ||
} | ||
</pre> | ||
<br /> | ||
<b>After events:</b> | ||
<ul> | ||
<li>ClientLoaded</li> | ||
<li>ClientChosen</li> | ||
<li>ClientFolderChanged</li> | ||
<li>ClientSelectionChanged</li> | ||
<li>ClientCreated</li> | ||
<li>ClientDeleted</li> | ||
<li>ClientRenamed</li> | ||
<li>ClientCopied</li> | ||
<li>ClientMoved</li> | ||
<li>ClientCompressed</li> | ||
<li>ClientExtracted</li> | ||
<li>ClientUploaded</li> | ||
</ul> | ||
After events can be used to save information about a completed file action. | ||
For instance, the information can be logged on the client-side. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
194 changes: 194 additions & 0 deletions
194
Examples/AspNetCore.CS/Views/FileManager/ClientEvents.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,194 @@ | ||
@using GleamTech.AspNet.Core | ||
@using GleamTech.FileUltimate.AspNet.UI | ||
@model FileManager | ||
|
||
<!DOCTYPE html> | ||
|
||
<html> | ||
<head> | ||
<title>Client-side events</title> | ||
@this.RenderHead(Model) | ||
|
||
<script type="text/javascript"> | ||
function fileManagerLoading(sender, e) { | ||
var fileManager = sender; | ||
logEvent(e); | ||
} | ||
function fileManagerLoaded(sender, e) { | ||
var fileManager = sender; | ||
logEvent(e); | ||
} | ||
function fileManagerChosen(sender, e) { | ||
var fileManager = sender; | ||
logEvent(e); | ||
} | ||
function fileManagerFolderChanged(sender, e) { | ||
var fileManager = sender; | ||
logEvent(e); | ||
} | ||
function fileManagerSelectionChanged(sender, e) { | ||
var fileManager = sender; | ||
logEvent(e); | ||
} | ||
function fileManagerCreating(sender, e) { | ||
var fileManager = sender; | ||
logEvent(e); | ||
} | ||
function fileManagerCreated(sender, e) { | ||
var fileManager = sender; | ||
logEvent(e); | ||
} | ||
function fileManagerDeleting(sender, e) { | ||
var fileManager = sender; | ||
logEvent(e); | ||
} | ||
function fileManagerDeleted(sender, e) { | ||
var fileManager = sender; | ||
logEvent(e); | ||
} | ||
function fileManagerRenaming(sender, e) { | ||
var fileManager = sender; | ||
logEvent(e); | ||
} | ||
function fileManagerRenamed(sender, e) { | ||
var fileManager = sender; | ||
logEvent(e); | ||
} | ||
function fileManagerCopying(sender, e) { | ||
var fileManager = sender; | ||
logEvent(e); | ||
} | ||
function fileManagerCopied(sender, e) { | ||
var fileManager = sender; | ||
logEvent(e); | ||
} | ||
function fileManagerMoving(sender, e) { | ||
var fileManager = sender; | ||
logEvent(e); | ||
} | ||
function fileManagerMoved(sender, e) { | ||
var fileManager = sender; | ||
logEvent(e); | ||
} | ||
function fileManagerCompressing(sender, e) { | ||
var fileManager = sender; | ||
logEvent(e); | ||
} | ||
function fileManagerCompressed(sender, e) { | ||
var fileManager = sender; | ||
logEvent(e); | ||
} | ||
function fileManagerExtracting(sender, e) { | ||
var fileManager = sender; | ||
logEvent(e); | ||
} | ||
function fileManagerExtracted(sender, e) { | ||
var fileManager = sender; | ||
logEvent(e); | ||
} | ||
function fileManagerUploading(sender, e) { | ||
var fileManager = sender; | ||
logEvent(e); | ||
} | ||
function fileManagerUploaded(sender, e) { | ||
var fileManager = sender; | ||
logEvent(e); | ||
} | ||
function fileManagerDownloading(sender, e) { | ||
var fileManager = sender; | ||
logEvent(e); | ||
} | ||
function fileManagerPreviewing(sender, e) { | ||
var fileManager = sender; | ||
logEvent(e); | ||
} | ||
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!"; | ||
} | ||
function logEvent(e) { | ||
var logTextBox = document.getElementById("LogTextBox"); | ||
var now = new Date().toLocaleTimeString(); | ||
var json = JSON.stringify(e, null, 2); | ||
logTextBox.value += "[" + now + "]" + "\nEvent arguments: " + json + "\n\n"; | ||
logTextBox.scrollTop = logTextBox.scrollHeight; | ||
} | ||
function clearLog() { | ||
var logTextBox = document.getElementById("LogTextBox"); | ||
logTextBox.value = ""; | ||
} | ||
</script> | ||
</head> | ||
<body style="margin: 20px;"> | ||
<textarea id="LogTextBox" style="width: 800px; height: 200px; background-color: white; border: 1px solid black"></textarea> | ||
<br /><input type="button" value="Clear" onclick="clearLog();" /> | ||
<br /><br /> | ||
|
||
@this.RenderBody(Model) | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.