PHP Classes

File: public/js/tinymce/src/themes/mobile/src/main/js/api/AndroidWebapp.js

Recommend this page to a friend!
  Classes of Abed Nego Ragil Putra   GoLavaCMS   public/js/tinymce/src/themes/mobile/src/main/js/api/AndroidWebapp.js   Download  
File: public/js/tinymce/src/themes/mobile/src/main/js/api/AndroidWebapp.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: GoLavaCMS
Publish content on Web pages with SEO support
Author: By
Last change:
Date: 6 years ago
Size: 1,667 bytes
 

Contents

Class file image Download
define( 'tinymce.themes.mobile.api.AndroidWebapp', [ 'ephox.alloy.api.component.GuiFactory', 'ephox.boulder.api.ValueSchema', 'ephox.katamari.api.Fun', 'ephox.sugar.api.dom.Insert', 'ephox.sugar.api.properties.Css', 'tinymce.themes.mobile.android.core.AndroidMode', 'tinymce.themes.mobile.api.MobileSchema', 'tinymce.themes.mobile.touch.view.TapToEditMask' ], function (GuiFactory, ValueSchema, Fun, Insert, Css, AndroidMode, MobileSchema, TapToEditMask) { // TODO: Remove dupe with IosWebapp var produce = function (raw) { var 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. var onTap = function () { mobile.setReadOnly(true); mode.enter(); }; var mask = GuiFactory.build( TapToEditMask.sketch(onTap, mobile.translate) ); mobile.alloy.add(mask); var maskApi = { show: function () { mobile.alloy.add(mask); }, hide: function () { mobile.alloy.remove(mask); } }; Insert.append(mobile.container, mask.element()); var mode = AndroidMode.create(mobile, maskApi); return { setReadOnly: mobile.setReadOnly, // Not used. refreshStructure: Fun.noop, enter: mode.enter, exit: mode.exit, destroy: Fun.noop }; }; return { produce: produce }; } );