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: AndroidWebapp.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, Insert } from '@ephox/sugar'; import AndroidMode from '../android/core/AndroidMode'; import TapToEditMask from '../touch/view/TapToEditMask'; import MobileSchema from './MobileSchema'; import { MobileWebApp } from 'tinymce/themes/mobile/api/IosWebapp'; // TODO: Remove dupe with IosWebapp const produce = function (raw: {any}): MobileWebApp { const mobile = ValueSchema.asRawOrDie( 'Getting AndroidWebapp schema', MobileSchema, raw ); /* Make the toolbar */ Css.set(mobile.toolstrip, 'width', '100%'); // We do not make the Android container relative, because we aren't positioning the toolbar absolutely. const onTap = function () { mobile.setReadOnly(mobile.readOnlyOnInit()); mode.enter(); }; const mask = GuiFactory.build( TapToEditMask.sketch(onTap, mobile.translate) ); mobile.alloy.add(mask); const maskApi = { show () { mobile.alloy.add(mask); }, hide () { mobile.alloy.remove(mask); } }; Insert.append(mobile.container, mask.element()); const mode = AndroidMode.create(mobile, maskApi); return { setReadOnly: mobile.setReadOnly, // Not used. refreshStructure: Fun.noop, enter: mode.enter, exit: mode.exit, destroy: Fun.noop }; }; export default { produce };