mfiles: Added support for application platform property

This commit is contained in:
Arsène von Wyss
2017-09-12 17:13:34 +02:00
parent 3916519640
commit c5479ceab4
2 changed files with 7 additions and 1 deletions

View File

@@ -3,6 +3,8 @@
// Definitions by: Arsène von Wyss <https://github.com/avonwyss>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare const MFExtApplicationPlatformWeb: any;
interface IAccessControlEntry {
ChangePermissionsPermission: MFiles.MFPermission;
EditPermission: MFiles.MFPermission;
@@ -6175,6 +6177,7 @@ declare namespace MFiles {
const ApplicationPath: string;
const CLSID: ICLSIDs;
const CurrentApplicationPlatform: any;
function CreateInstance(name: string): any;
function CreateObjectCLR(assemblyFile: string, className: string): any;

View File

@@ -72,7 +72,10 @@ function setTheme(shellFrame: IShellFrame) {
function OnNewShellUI(shellUI: IShellUI) {
shellUI.Events.Register(MFiles.Event.NewShellFrame, newShellFrameHandler);
shellUI.Events.Register(MFiles.Event.NewNormalShellFrame, newShellFrameHandler);
const html = `<object classid='clsid:${MFiles.CLSID.ShellListingCtrl}' style='width: 400px; height: 300px;'> </object>`;
if (MFiles.CurrentApplicationPlatform !== MFExtApplicationPlatformWeb) {
// We are not executing on the web, AxtiveX is available
const html = `<object classid='clsid:${MFiles.CLSID.ShellListingCtrl}' style='width: 400px; height: 300px;'> </object>`;
}
}
function newShellFrameHandler(shellFrame: IShellFrame) {