OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
_backup
/
tinymce
/
tinymce
/
src
/
themes
/
mobile
/
main
/
ts
/
api
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/20/2020 06:45:48 AM
rwxr-xr-x
📄
AndroidWebapp.ts
1.64 KB
02/20/2020 06:32:19 AM
rw-r--r--
📄
IosWebapp.ts
1.57 KB
02/20/2020 06:32:19 AM
rw-r--r--
📄
MobileSchema.ts
2.16 KB
02/20/2020 06:32:20 AM
rw-r--r--
📄
Settings.ts
583 bytes
02/20/2020 06:32:20 AM
rw-r--r--
Editing: IosWebapp.ts
Close
/** * Copyright (c) Tiny Technologies, Inc. All rights reserved. * Licensed under the LGPL or a commercial license. * For LGPL see License.txt in the project root for license information. * For commercial licenses see https://www.tiny.cloud/ */ import { GuiFactory } from '@ephox/alloy'; import { ValueSchema } from '@ephox/boulder'; import { Fun } from '@ephox/katamari'; import { Css } from '@ephox/sugar'; import MobileSchema from './MobileSchema'; import IosMode from '../ios/core/IosMode'; import TapToEditMask from '../touch/view/TapToEditMask'; export interface MobileWebApp { setReadOnly(): void; refreshStructure(): void; enter(): void; exit(): void; destroy(): void; } const produce = function (raw: {any}): MobileWebApp { const mobile = ValueSchema.asRawOrDie( 'Getting IosWebapp schema', MobileSchema, raw ); /* Make the toolbar */ Css.set(mobile.toolstrip, 'width', '100%'); Css.set(mobile.container, 'position', 'relative'); const onView = function () { mobile.setReadOnly(mobile.readOnlyOnInit()); mode.enter(); }; const mask = GuiFactory.build( TapToEditMask.sketch(onView, mobile.translate) ); mobile.alloy.add(mask); const maskApi = { show () { mobile.alloy.add(mask); }, hide () { mobile.alloy.remove(mask); } }; const mode = IosMode.create(mobile, maskApi); return { setReadOnly: mobile.setReadOnly, refreshStructure: mode.refreshStructure, enter: mode.enter, exit: mode.exit, destroy: Fun.noop // TODO: lifecycle hookup }; }; export default { produce };