├── .dockerignore ├── .gitignore ├── .gitmodules ├── Dockerfile ├── Procfile ├── README.md ├── app.js ├── attic ├── kadhttprpc.js ├── kadwsrpc.js └── sockets.js ├── data ├── tata └── toto ├── data2 ├── titi └── tutu ├── example.p2pws ├── index.html ├── js ├── api.js ├── hash.js ├── jsencrypt ├── jsencryptsign.js ├── jssha ├── jssign.js ├── keygen.js ├── keytools.js ├── loaded.js ├── localStorage.js ├── main.js ├── metaheaders.js ├── model │ └── localsitelist.js ├── moment ├── parsehtml.js ├── pure ├── r.js ├── require.js ├── router.js ├── sha1hex.js ├── showhide.js ├── sign.js ├── signedheader.js ├── tinymce ├── tinymce-dev │ ├── Jakefile.js │ ├── LICENSE.TXT │ ├── changelog.txt │ ├── js │ │ └── tinymce │ │ │ ├── classes │ │ │ ├── AddOnManager.js │ │ │ ├── Compat.js │ │ │ ├── Editor.js │ │ │ ├── EditorCommands.js │ │ │ ├── EditorManager.js │ │ │ ├── EditorObservable.js │ │ │ ├── EnterKey.js │ │ │ ├── Env.js │ │ │ ├── FocusManager.js │ │ │ ├── ForceBlocks.js │ │ │ ├── Formatter.js │ │ │ ├── LegacyInput.js │ │ │ ├── Shortcuts.js │ │ │ ├── UndoManager.js │ │ │ ├── WindowManager.js │ │ │ ├── dom │ │ │ │ ├── BookmarkManager.js │ │ │ │ ├── ControlSelection.js │ │ │ │ ├── DOMUtils.js │ │ │ │ ├── DomQuery.js │ │ │ │ ├── ElementUtils.js │ │ │ │ ├── EventUtils.js │ │ │ │ ├── Range.js │ │ │ │ ├── RangeUtils.js │ │ │ │ ├── ScriptLoader.js │ │ │ │ ├── Selection.js │ │ │ │ ├── Serializer.js │ │ │ │ ├── Sizzle.jQuery.js │ │ │ │ ├── Sizzle.js │ │ │ │ ├── StyleSheetLoader.js │ │ │ │ ├── TreeWalker.js │ │ │ │ └── TridentSelection.js │ │ │ ├── fmt │ │ │ │ └── Preview.js │ │ │ ├── html │ │ │ │ ├── DomParser.js │ │ │ │ ├── Entities.js │ │ │ │ ├── Node.js │ │ │ │ ├── SaxParser.js │ │ │ │ ├── Schema.js │ │ │ │ ├── Serializer.js │ │ │ │ ├── Styles.js │ │ │ │ └── Writer.js │ │ │ ├── jquery.tinymce.js │ │ │ ├── ui │ │ │ │ ├── AbsoluteLayout.js │ │ │ │ ├── Button.js │ │ │ │ ├── ButtonGroup.js │ │ │ │ ├── Checkbox.js │ │ │ │ ├── Collection.js │ │ │ │ ├── ColorButton.js │ │ │ │ ├── ComboBox.js │ │ │ │ ├── Container.js │ │ │ │ ├── Control.js │ │ │ │ ├── DomUtils.js │ │ │ │ ├── DragHelper.js │ │ │ │ ├── ElementPath.js │ │ │ │ ├── Factory.js │ │ │ │ ├── FieldSet.js │ │ │ │ ├── FilePicker.js │ │ │ │ ├── FitLayout.js │ │ │ │ ├── FlexLayout.js │ │ │ │ ├── FloatPanel.js │ │ │ │ ├── FlowLayout.js │ │ │ │ ├── Form.js │ │ │ │ ├── FormItem.js │ │ │ │ ├── FormatControls.js │ │ │ │ ├── GridLayout.js │ │ │ │ ├── Iframe.js │ │ │ │ ├── KeyboardNavigation.js │ │ │ │ ├── Label.js │ │ │ │ ├── Layout.js │ │ │ │ ├── ListBox.js │ │ │ │ ├── Menu.js │ │ │ │ ├── MenuBar.js │ │ │ │ ├── MenuButton.js │ │ │ │ ├── MenuItem.js │ │ │ │ ├── MessageBox.js │ │ │ │ ├── Movable.js │ │ │ │ ├── Panel.js │ │ │ │ ├── PanelButton.js │ │ │ │ ├── Path.js │ │ │ │ ├── Radio.js │ │ │ │ ├── Resizable.js │ │ │ │ ├── ResizeHandle.js │ │ │ │ ├── Scrollable.js │ │ │ │ ├── Selector.js │ │ │ │ ├── Spacer.js │ │ │ │ ├── SplitButton.js │ │ │ │ ├── StackLayout.js │ │ │ │ ├── TabPanel.js │ │ │ │ ├── TextBox.js │ │ │ │ ├── Throbber.js │ │ │ │ ├── Toolbar.js │ │ │ │ ├── Tooltip.js │ │ │ │ ├── Widget.js │ │ │ │ └── Window.js │ │ │ └── util │ │ │ │ ├── Class.js │ │ │ │ ├── EventDispatcher.js │ │ │ │ ├── I18n.js │ │ │ │ ├── JSON.js │ │ │ │ ├── JSONP.js │ │ │ │ ├── JSONRequest.js │ │ │ │ ├── LocalStorage.js │ │ │ │ ├── Observable.js │ │ │ │ ├── Quirks.js │ │ │ │ ├── Tools.js │ │ │ │ ├── URI.js │ │ │ │ ├── VK.js │ │ │ │ └── XHR.js │ │ │ ├── jquery.tinymce.min.js │ │ │ ├── langs │ │ │ └── readme.md │ │ │ ├── license.txt │ │ │ ├── plugins │ │ │ ├── advlist │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── anchor │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── autolink │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── autoresize │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── autosave │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── bbcode │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── charmap │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── code │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── compat3x │ │ │ │ ├── css │ │ │ │ │ └── dialog.css │ │ │ │ ├── img │ │ │ │ │ ├── buttons.png │ │ │ │ │ ├── icons.gif │ │ │ │ │ ├── items.gif │ │ │ │ │ ├── menu_arrow.gif │ │ │ │ │ ├── menu_check.gif │ │ │ │ │ ├── progress.gif │ │ │ │ │ └── tabs.gif │ │ │ │ ├── plugin.js │ │ │ │ ├── plugin.min.js │ │ │ │ ├── tiny_mce_popup.js │ │ │ │ └── utils │ │ │ │ │ ├── editable_selects.js │ │ │ │ │ ├── form_utils.js │ │ │ │ │ ├── mctabs.js │ │ │ │ │ └── validate.js │ │ │ ├── contextmenu │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── directionality │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── emoticons │ │ │ │ ├── img │ │ │ │ │ ├── smiley-cool.gif │ │ │ │ │ ├── smiley-cry.gif │ │ │ │ │ ├── smiley-embarassed.gif │ │ │ │ │ ├── smiley-foot-in-mouth.gif │ │ │ │ │ ├── smiley-frown.gif │ │ │ │ │ ├── smiley-innocent.gif │ │ │ │ │ ├── smiley-kiss.gif │ │ │ │ │ ├── smiley-laughing.gif │ │ │ │ │ ├── smiley-money-mouth.gif │ │ │ │ │ ├── smiley-sealed.gif │ │ │ │ │ ├── smiley-smile.gif │ │ │ │ │ ├── smiley-surprised.gif │ │ │ │ │ ├── smiley-tongue-out.gif │ │ │ │ │ ├── smiley-undecided.gif │ │ │ │ │ ├── smiley-wink.gif │ │ │ │ │ └── smiley-yell.gif │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── example │ │ │ │ ├── dialog.html │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── example_dependency │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── fullpage │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── fullscreen │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── hr │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── image │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── importcss │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── insertdatetime │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── layer │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── legacyoutput │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── link │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── lists │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── media │ │ │ │ ├── moxieplayer.swf │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── nonbreaking │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── noneditable │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── pagebreak │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── paste │ │ │ │ ├── classes │ │ │ │ │ ├── Clipboard.js │ │ │ │ │ ├── Plugin.js │ │ │ │ │ ├── Quirks.js │ │ │ │ │ ├── Utils.js │ │ │ │ │ └── WordFilter.js │ │ │ │ ├── plugin.dev.js │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── preview │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── print │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── save │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── searchreplace │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── spellchecker │ │ │ │ ├── classes │ │ │ │ │ ├── DomTextMatcher.js │ │ │ │ │ └── Plugin.js │ │ │ │ ├── plugin.dev.js │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── tabfocus │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── table │ │ │ │ ├── classes │ │ │ │ │ ├── CellSelection.js │ │ │ │ │ ├── Plugin.js │ │ │ │ │ ├── Quirks.js │ │ │ │ │ └── TableGrid.js │ │ │ │ ├── plugin.dev.js │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── template │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── textcolor │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── visualblocks │ │ │ │ ├── css │ │ │ │ │ └── visualblocks.css │ │ │ │ ├── img │ │ │ │ │ ├── address.gif │ │ │ │ │ ├── article.gif │ │ │ │ │ ├── aside.gif │ │ │ │ │ ├── blockquote.gif │ │ │ │ │ ├── div.gif │ │ │ │ │ ├── dl.gif │ │ │ │ │ ├── figure.gif │ │ │ │ │ ├── h1.gif │ │ │ │ │ ├── h2.gif │ │ │ │ │ ├── h3.gif │ │ │ │ │ ├── h4.gif │ │ │ │ │ ├── h5.gif │ │ │ │ │ ├── h6.gif │ │ │ │ │ ├── hgroup.gif │ │ │ │ │ ├── ol.gif │ │ │ │ │ ├── p.gif │ │ │ │ │ ├── pre.gif │ │ │ │ │ ├── section.gif │ │ │ │ │ └── ul.gif │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── visualchars │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ └── wordcount │ │ │ │ ├── plugin.js │ │ │ │ └── plugin.min.js │ │ │ ├── skins │ │ │ └── lightgray │ │ │ │ ├── AbsoluteLayout.less │ │ │ │ ├── Animations.less │ │ │ │ ├── Button.less │ │ │ │ ├── ButtonGroup.less │ │ │ │ ├── Checkbox.less │ │ │ │ ├── ColorButton.less │ │ │ │ ├── ComboBox.less │ │ │ │ ├── Container.less │ │ │ │ ├── Content.Inline.less │ │ │ │ ├── Content.Objects.less │ │ │ │ ├── Content.less │ │ │ │ ├── FieldSet.less │ │ │ │ ├── FitLayout.less │ │ │ │ ├── FloatPanel.less │ │ │ │ ├── FlowLayout.less │ │ │ │ ├── Icons.Ie7.less │ │ │ │ ├── Icons.less │ │ │ │ ├── Iframe.less │ │ │ │ ├── Label.less │ │ │ │ ├── ListBox.less │ │ │ │ ├── Menu.less │ │ │ │ ├── MenuBar.less │ │ │ │ ├── MenuButton.less │ │ │ │ ├── MenuItem.less │ │ │ │ ├── Mixins.less │ │ │ │ ├── Panel.less │ │ │ │ ├── Path.less │ │ │ │ ├── Radio.less │ │ │ │ ├── Reset.less │ │ │ │ ├── ResizeHandle.less │ │ │ │ ├── Scrollable.less │ │ │ │ ├── Spacer.less │ │ │ │ ├── SplitButton.less │ │ │ │ ├── StackLayout.less │ │ │ │ ├── TabPanel.less │ │ │ │ ├── TextBox.less │ │ │ │ ├── Throbber.less │ │ │ │ ├── TinyMCE.less │ │ │ │ ├── ToolTip.less │ │ │ │ ├── Variables.less │ │ │ │ ├── Window.less │ │ │ │ ├── content.inline.min.css │ │ │ │ ├── content.min.css │ │ │ │ ├── fonts │ │ │ │ ├── readme.md │ │ │ │ ├── tinymce-small.dev.svg │ │ │ │ ├── tinymce-small.eot │ │ │ │ ├── tinymce-small.json │ │ │ │ ├── tinymce-small.svg │ │ │ │ ├── tinymce-small.ttf │ │ │ │ ├── tinymce-small.woff │ │ │ │ ├── tinymce.dev.svg │ │ │ │ ├── tinymce.eot │ │ │ │ ├── tinymce.json │ │ │ │ ├── tinymce.svg │ │ │ │ ├── tinymce.ttf │ │ │ │ └── tinymce.woff │ │ │ │ ├── img │ │ │ │ ├── anchor.gif │ │ │ │ ├── loader.gif │ │ │ │ ├── object.gif │ │ │ │ └── trans.gif │ │ │ │ ├── skin.dev.less │ │ │ │ ├── skin.ie7.less │ │ │ │ ├── skin.ie7.min.css │ │ │ │ ├── skin.less │ │ │ │ └── skin.min.css │ │ │ ├── themes │ │ │ └── modern │ │ │ │ ├── theme.js │ │ │ │ └── theme.min.js │ │ │ ├── tinymce.dev.js │ │ │ ├── tinymce.jquery.dev.js │ │ │ ├── tinymce.jquery.js │ │ │ ├── tinymce.jquery.min.js │ │ │ ├── tinymce.js │ │ │ └── tinymce.min.js │ ├── package.json │ ├── readme.md │ ├── tests │ │ ├── coverage │ │ │ ├── index.html │ │ │ └── js │ │ │ │ ├── JSCovReporter.js │ │ │ │ ├── backbone-min.js │ │ │ │ ├── reporter.css │ │ │ │ ├── reporter.js │ │ │ │ └── underscore-min.js │ │ ├── index.html │ │ ├── js │ │ │ ├── init.js │ │ │ ├── qunit │ │ │ │ ├── QUnit.LICENSE │ │ │ │ ├── qunit.css │ │ │ │ └── qunit.js │ │ │ ├── runner.js │ │ │ ├── tinymce_loader.js │ │ │ └── utils.js │ │ ├── manual │ │ │ ├── accessibility.html │ │ │ ├── classic.html │ │ │ ├── css │ │ │ │ ├── custom_theme_content.css │ │ │ │ ├── development.css │ │ │ │ ├── gecko_caret.css │ │ │ │ └── noneditable_manual.css │ │ │ ├── custom_theme.html │ │ │ ├── development.html │ │ │ ├── focus.html │ │ │ ├── gecko_caret.html │ │ │ ├── index.html │ │ │ ├── inline.html │ │ │ ├── jquery.html │ │ │ ├── media.html │ │ │ ├── noneditable.html │ │ │ ├── paste.html │ │ │ ├── performance.html │ │ │ ├── removeformat.html │ │ │ ├── resize.html │ │ │ ├── tests.js │ │ │ └── visualblocks.html │ │ ├── plugins │ │ │ ├── autolink.js │ │ │ ├── autosave.js │ │ │ ├── fullpage.js │ │ │ ├── importcss.js │ │ │ ├── jquery_plugin.js │ │ │ ├── legacyoutput.js │ │ │ ├── lists.js │ │ │ ├── media.js │ │ │ ├── noneditable.js │ │ │ ├── paste.js │ │ │ ├── searchreplace.js │ │ │ ├── spellchecker.js │ │ │ ├── table.js │ │ │ └── wordcount.js │ │ └── tinymce │ │ │ ├── AddOnManager.js │ │ │ ├── Editor.js │ │ │ ├── EditorCommands.js │ │ │ ├── EditorManager.js │ │ │ ├── EnterKey.js │ │ │ ├── ForceBlocks.js │ │ │ ├── Formatter_apply.js │ │ │ ├── Formatter_check.js │ │ │ ├── Formatter_remove.js │ │ │ ├── Shortcuts.js │ │ │ ├── UndoManager.js │ │ │ ├── dom │ │ │ ├── DOMUtils.js │ │ │ ├── EventUtils.js │ │ │ ├── Range.js │ │ │ ├── Selection.js │ │ │ ├── Serializer.js │ │ │ ├── TridentSelection.js │ │ │ └── test.css │ │ │ ├── html │ │ │ ├── DomParser.js │ │ │ ├── Entities.js │ │ │ ├── Node.js │ │ │ ├── SaxParser.js │ │ │ ├── Schema.js │ │ │ ├── Serializer.js │ │ │ ├── Styles.js │ │ │ └── Writer.js │ │ │ ├── ui │ │ │ ├── AbsoluteLayout.js │ │ │ ├── Button.js │ │ │ ├── Collection.js │ │ │ ├── ColorButton.js │ │ │ ├── Control.js │ │ │ ├── FitLayout.js │ │ │ ├── FlexLayout.js │ │ │ ├── GridLayout.js │ │ │ ├── MenuButton.js │ │ │ ├── Panel.js │ │ │ ├── Selector.js │ │ │ ├── SplitButton.js │ │ │ ├── TabPanel.js │ │ │ ├── TextBox.js │ │ │ ├── Window.js │ │ │ ├── css │ │ │ │ └── ui-overrides.css │ │ │ └── img │ │ │ │ └── raster.gif │ │ │ └── util │ │ │ ├── EventDispatcher.js │ │ │ ├── JSON.js │ │ │ ├── JSONRequest.js │ │ │ ├── LocalStorage.js │ │ │ ├── Observable.js │ │ │ ├── Quirks_webkit.js │ │ │ ├── URI.js │ │ │ ├── XHR.js │ │ │ ├── json_rpc_error.js │ │ │ ├── json_rpc_ok.js │ │ │ └── test.xml │ └── tools │ │ ├── BuildTools.js │ │ ├── docs │ │ ├── tinymce.CommandEvent.js │ │ ├── tinymce.ContentEvent.js │ │ ├── tinymce.Editor.js │ │ ├── tinymce.Event.js │ │ ├── tinymce.FocusEvent.js │ │ ├── tinymce.ProgressStateEvent.js │ │ └── tinymce.ResizeEvent.js │ │ ├── nuget │ │ ├── TinyMCE.jQuery.nuspec │ │ └── TinyMCE.nuspec │ │ └── saucelabs.js └── ui │ ├── editor.js │ ├── menu.js │ ├── moments.js │ ├── site.js │ ├── sitepage.js │ └── template.js ├── nattraveraltest.js ├── nattraversal.js ├── nodewebkit_api.js ├── nodewebkit_main.js ├── p2pweb.do ├── p2pweb.nw.do ├── p2pwebseedsclient.html ├── package.json ├── prepare-nw.sh ├── random.js ├── readall.js ├── rpc.js ├── run-server-1.sh ├── run-server-2.sh ├── run-server-3.sh ├── run-server-4.sh ├── run-server-seed.sh ├── run100.sh ├── seedserver.js ├── server-cli.js ├── server.js ├── storage.js ├── style.css ├── sysvservice.sh ├── tcp2udp.js ├── testsock.js ├── tinymce-skin-p2pweb ├── Variables.less ├── content.inline.min.css ├── content.min.css ├── fonts │ ├── readme.md │ ├── tinymce-small.eot │ ├── tinymce-small.json │ ├── tinymce-small.svg │ ├── tinymce-small.ttf │ ├── tinymce-small.woff │ ├── tinymce.eot │ ├── tinymce.json │ ├── tinymce.svg │ ├── tinymce.ttf │ └── tinymce.woff ├── img │ ├── anchor.gif │ ├── loader.gif │ ├── object.gif │ ├── trans.gif │ └── wline.gif ├── skin.ie7.min.css ├── skin.json └── skin.min.css ├── tools-ws.html ├── update.sh ├── utp_msg.js └── verifysign.js /.dockerignore: -------------------------------------------------------------------------------- 1 | data 2 | data2 3 | data100 4 | *~ 5 | .redo 6 | .git 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules/ 2 | /data2/ 3 | /js/tinymce-dev/ 4 | /data100/ 5 | *~ 6 | .redo/ 7 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "js/filesaver"] 2 | path = js/filesaver 3 | url = https://github.com/eligrey/FileSaver.js.git 4 | [submodule "js/blob"] 5 | path = js/blob 6 | url = https://github.com/eligrey/Blob.js.git 7 | [submodule "js/jsrsasign"] 8 | path = js/jsrsasign 9 | url = https://github.com/kjur/jsrsasign.git 10 | [submodule "node_modules/utp"] 11 | path = node_modules/utp 12 | url = https://github.com/mildred/utp 13 | [submodule "node_modules/kademlia-dht"] 14 | path = node_modules/kademlia-dht 15 | url = http://github.com/mildred/kademlia-dht.git 16 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node 2 | MAINTAINER mildred 3 | 4 | ADD . /opt/p2pweb 5 | WORKDIR /opt/p2pweb 6 | 7 | # install your application's dependencies 8 | RUN npm install 9 | RUN mkdir -p /var/lib/p2pweb/data 10 | RUN mkdir -p /var/cache/p2pweb 11 | 12 | # replace this with your application's default port 13 | EXPOSE 8888/tcp 8888/udp 14 | 15 | VOLUME /var/lib/p2pweb 16 | VOLUME /var/cache/p2pweb 17 | 18 | # replace this with your main "server" script file 19 | CMD [ "node", "server-cli.js", "-port", "8888", "-data", "/var/lib/p2pweb/data" ] 20 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: node seedserver.js 2 | -------------------------------------------------------------------------------- /attic/sockets.js: -------------------------------------------------------------------------------- 1 | var websocket = require('websocket'); 2 | 3 | function Sockets() { 4 | this._sockets = {}; 5 | } 6 | 7 | Sockets.prototype.request = function (uri, callback) { 8 | this._sockets[uri] = callback; 9 | }; 10 | 11 | Sockets.prototype.connect = function (uri, callback) { 12 | this._sockets[uri] = function(request){ 13 | var socket = request.accept(null, request.origin); 14 | return callback(request, socket); 15 | }; 16 | }; 17 | 18 | Sockets.prototype.listen = function(httpServer, options){ 19 | var self = this; 20 | if(!options) { 21 | options = { autoAcceptConnections: false } 22 | } 23 | options.httpServer = httpServer; 24 | this._server = new websocket.server(options); 25 | this._server.on('request', function(request) { 26 | var uri = request.resourceURL.path; 27 | var handler = self._sockets[uri]; 28 | if(handler) { 29 | handler(request); 30 | } else { 31 | request.reject(404, uri + " Not Found"); 32 | } 33 | }) 34 | } 35 | 36 | module.exports = {server: Sockets}; 37 | -------------------------------------------------------------------------------- /data/tata: -------------------------------------------------------------------------------- 1 | tata 2 | -------------------------------------------------------------------------------- /data/toto: -------------------------------------------------------------------------------- 1 | toto 2 | -------------------------------------------------------------------------------- /data2/titi: -------------------------------------------------------------------------------- 1 | titi 2 | -------------------------------------------------------------------------------- /data2/tutu: -------------------------------------------------------------------------------- 1 | tutu 2 | -------------------------------------------------------------------------------- /example.p2pws: -------------------------------------------------------------------------------- 1 | Format: P2P Website 2 | PublicKey:: 3 | Algorithm: RSA 4 | RSA-Length: 4096 5 | Signature:: 6 | 7 | Version: 1 8 | Index: { 9 | "/": { 10 | "Content-Type": "text/html; encoding=utf-8", 11 | "filehash": "" 12 | }, 13 | "/index.html": { 14 | "Content-Type": "text/html; encoding=utf-8", 15 | "filehash": "" 16 | } 17 | } 18 | Refresh: 19 | Signature:: 20 | 21 | 22 | 23 | ============ 24 | 25 | new lines are ignored 26 | 27 | PublicKey header cannot be redefined (other definitions are ignored) 28 | Signature header separate different sections 29 | Only signed headers are considered, and only if the signature is good 30 | Line continuation is "\n " or "\n\t" 31 | 32 | 33 | Private Key format .p2pwk 34 | ========================= 35 | 36 | Format: P2P Website Private Key 37 | PrivateKey:: 38 | PublicKey:: 39 | Algorithm: RSA 40 | RSA-Length: 4096 41 | 42 | -------------------------------------------------------------------------------- /js/api.js: -------------------------------------------------------------------------------- 1 | var MetaHeaders = require('./metaheaders'); 2 | 3 | var api = {}; 4 | 5 | api.removeSeed = function(id, cb) { 6 | cb(new Error("not supported as remote operation")); 7 | }; 8 | 9 | var blobCache = {}; 10 | 11 | api.sendBlob = function(blob, blobid, mh, cb){ 12 | blobCache[blobid] = {data: blob, mh: mh}; 13 | var r = new XMLHttpRequest(); 14 | r.open("PUT", "/obj/" + blobid); 15 | mh.setRequestHeaders(r); 16 | r.onreadystatechange = function(){ 17 | if(!r.status || !r.responseText) return; 18 | if(r.status >= 400) { 19 | var e = new Error(r.responseText); 20 | e.statusCode = r.status; 21 | e.statusMessage = r.statusText; 22 | cb(e); 23 | } 24 | else cb(null, blobid); 25 | r.onreadystatechange = undefined; 26 | }; 27 | r.send(blob); 28 | }; 29 | 30 | api.getBlob = function(blobid, cache, cb) { // cb(err, data:string, metaheaders) 31 | if(blobid === undefined) throw new Error("id is undefined"); 32 | if(typeof cache == "function") { 33 | cb = cache; 34 | cache = true; 35 | } 36 | if(cache && blobCache[blobid]) { 37 | return cb(null, blobCache[blobid].data, blobCache[blobid].mh); 38 | } 39 | var r = new XMLHttpRequest(); 40 | r.open("GET", "/obj/" + blobid); 41 | r.onreadystatechange = function(){ 42 | if(r.readyState < 4) return; 43 | if(r.status >= 400) { 44 | cb(new Error(r.status + " " + r.statusText + ":\n" + r.responseText)); 45 | } else { 46 | var mh = new MetaHeaders(r.getResponseHeader.bind(r)); 47 | blobCache[blobid] = {mh: mh, data: r.responseText}; 48 | cb(null, r.responseText, mh); 49 | } 50 | r.onreadystatechange = undefined; 51 | }; 52 | r.send(); 53 | }; 54 | 55 | api.getBlobCache = function(blobid, cb) { 56 | return api.getBlob(blobid, true, cb); 57 | }; 58 | 59 | api.getBlobNoCache = function(blobid, cb) { 60 | return api.getBlob(blobid, false, cb); 61 | }; 62 | 63 | module.exports = api; 64 | -------------------------------------------------------------------------------- /js/hash.js: -------------------------------------------------------------------------------- 1 | var sha1hex = require('./sha1hex.js'); 2 | var MetaHeaders = require('./metaheaders'); 3 | 4 | if(typeof process == "object" && process.versions.node) { 5 | 6 | var crypto = (global.require || require)('crypto'); 7 | 8 | module.exports.make = function(h) { 9 | if(!h.metaHeaders) throw new Error("hash.make should take a MetaHeaders instance"); 10 | h = h.toString(); 11 | return function(x){ 12 | var sum = crypto.createHash('sha1'); 13 | sum.update(h); 14 | sum.update(x); 15 | return sum.digest('hex'); 16 | }; 17 | }; 18 | 19 | module.exports.makeStream = function(h) { 20 | if(!h.metaHeaders) throw new Error("hash.make should take a MetaHeaders instance"); 21 | var sum = crypto.createHash('sha1'); 22 | sum.update(h.toString()); 23 | sum.getHex = function(){ 24 | return this.digest('hex'); 25 | } 26 | return sum; 27 | }; 28 | 29 | } else { 30 | 31 | module.exports.make = function(h) { 32 | if(!h.metaHeaders) throw new Error("hash.make should take a MetaHeaders instance"); 33 | h = h.toString(); 34 | return function(x) { 35 | return sha1hex(h + x); 36 | }; 37 | }; 38 | 39 | module.exports.makeStream = function(h) { 40 | throw new Error("makeStream not supported on non node platforms"); 41 | }; 42 | 43 | } 44 | 45 | -------------------------------------------------------------------------------- /js/jsencrypt: -------------------------------------------------------------------------------- 1 | ../node_modules/jsencrypt/bin -------------------------------------------------------------------------------- /js/jssha: -------------------------------------------------------------------------------- 1 | ../node_modules/jssha/src -------------------------------------------------------------------------------- /js/loaded.js: -------------------------------------------------------------------------------- 1 | var $r = require('./r'); 2 | var mod = $r.module(module); 3 | 4 | if(!mod || mod.engine !== 'r.js') 5 | throw new Error("loaded.js: doesn't work if not loaded with r.js"); 6 | 7 | mod.loaded = false; 8 | 9 | var loaded = function(){ 10 | console.log("loaded.js: Page is loaded"); 11 | mod.loaded = true; 12 | } 13 | 14 | if(window.loaded) loaded(); 15 | else window.addEventListener('load', loaded); 16 | -------------------------------------------------------------------------------- /js/model/localsitelist.js: -------------------------------------------------------------------------------- 1 | 2 | require('./../localStorage'); 3 | 4 | // 5 | // Local storage 6 | // 7 | 8 | window.localStorage.P2PWS = window.localStorage.P2PWS || {}; 9 | 10 | // 11 | // Model: Site List 12 | // 13 | 14 | function getSiteList(){ 15 | var siteList = []; 16 | try { 17 | siteList = JSON.parse(window.localStorage.getItem("P2PWS.siteList")) || []; 18 | } catch(e) {console.log(e);} 19 | if(siteList instanceof Array) siteList = {}; 20 | return siteList; 21 | }; 22 | 23 | function saveSiteList(siteList){ 24 | window.localStorage.setItem("P2PWS.siteList", JSON.stringify(siteList)) 25 | } 26 | 27 | function getServerSiteList(cb){ 28 | var r = new XMLHttpRequest(); 29 | r.open("GET", "/rpc/storage/sites"); 30 | r.onreadystatechange = function(){ 31 | if(r.readyState < 4) return; 32 | if(r.status >= 400) { 33 | cb(r); 34 | } else { 35 | var res = {}; 36 | r.responseText.split('\n').forEach(function(s){ 37 | s = s.split('\t'); 38 | var id = s[0] || ""; 39 | if(id.length == 0) return; 40 | res[id] = { 41 | id: id, 42 | signed_ids: (s[1] || "").split(' '), 43 | extra_ids: (s[2] || "").split(' ') 44 | }; 45 | }); 46 | cb(null, res); 47 | } 48 | r.onreadystatechange = undefined; 49 | }; 50 | r.send(); 51 | 52 | } 53 | 54 | function updateSiteInList(siteKey, site) { 55 | var siteList = getSiteList(); 56 | siteList[siteKey] = siteList[siteKey] || {}; 57 | siteList[siteKey].key = siteKey; 58 | siteList[siteKey].title = site.getLastHeader("Title"); 59 | saveSiteList(siteList); 60 | } 61 | 62 | module.exports.getList = getSiteList; 63 | module.exports.getServerList = getServerSiteList; 64 | module.exports.updateSite = updateSiteInList; 65 | 66 | 67 | -------------------------------------------------------------------------------- /js/moment: -------------------------------------------------------------------------------- 1 | ../node_modules/moment/ -------------------------------------------------------------------------------- /js/parsehtml.js: -------------------------------------------------------------------------------- 1 | module.exports = function(htmlCode) { 2 | var htmlCode = htmlCode || ""; 3 | var doc = (new DOMParser()).parseFromString(htmlCode, "text/html"); 4 | if(!doc) { 5 | doc = document.implementation.createHTMLDocument(""); 6 | doc.documentElement.innerHTML = htmlCode; 7 | } 8 | return doc; 9 | } 10 | -------------------------------------------------------------------------------- /js/pure: -------------------------------------------------------------------------------- 1 | ../node_modules/pure/libs -------------------------------------------------------------------------------- /js/router.js: -------------------------------------------------------------------------------- 1 | function Router(win){ 2 | this._window = win || window; 3 | this._window.router = this; 4 | var self = this; 5 | this._routes = []; 6 | this._router = function(){ 7 | var h = self._window.location.hash; 8 | var c = /^\#\!(\/.*)$/.exec(h); 9 | if(c) { 10 | var p = c[1]; 11 | var params = { 12 | hash: h, 13 | path: p 14 | }; 15 | for(var i = 0; i < self._routes.length; i++) { 16 | var r = self._routes[i]; 17 | if(typeof r.matcher === 'string' && r.matcher == p) { 18 | console.log("Routing to " + p); 19 | r.callback.apply(self, [params]); 20 | return; 21 | } else if (r.matcher.exec) { 22 | var c = r.matcher.exec(p); 23 | if(c) { 24 | console.log("Routing to " + r.matcher.toString()); 25 | c.hash = h; 26 | c.path = p; 27 | r.callback.apply(self, [c]); 28 | return; 29 | } 30 | } 31 | } 32 | } 33 | console.warn("Failed to route to " + p); 34 | if(self._fallback) { 35 | self._fallback.apply(self, [params]); 36 | } 37 | }; 38 | }; 39 | 40 | Router.prototype.on = function(matcher, callback){ 41 | this._routes.push({matcher: matcher, callback: callback}); 42 | } 43 | 44 | Router.prototype.fallback = function(callback){ 45 | this._fallback = callback; 46 | } 47 | 48 | Router.prototype.run = function(){ 49 | console.log("router.js: run"); 50 | this._window.addEventListener('load', this._router); 51 | this._window.addEventListener('hashchange', this._router); 52 | if(this._window.loaded) this._router(); 53 | } 54 | 55 | Router.prototype.go = function(location) { 56 | console.log("Router: go to " + location); 57 | if(this._window.location.hash == location) { 58 | console.log("Router: (run _router())"); 59 | this._router(); 60 | } else { 61 | this._window.location = location; 62 | }; 63 | } 64 | 65 | module.exports = Router; 66 | 67 | -------------------------------------------------------------------------------- /js/sha1hex.js: -------------------------------------------------------------------------------- 1 | var jsSHA = require('./jssha/sha.js'); 2 | 3 | if(typeof process == "object" && process.versions.node) { 4 | 5 | var crypto = (global.require || require)('crypto'); 6 | 7 | module.exports = function(data) { 8 | var sum = crypto.createHash('sha1'); 9 | sum.update(data); 10 | return sum.digest('hex'); 11 | }; 12 | 13 | } else { 14 | 15 | module.exports = function(x) { 16 | return (new jsSHA(x, "TEXT")).getHash("SHA-1", "HEX"); 17 | }; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /js/showhide.js: -------------------------------------------------------------------------------- 1 | Node.prototype.show = function(show){ 2 | if(show === undefined || show){ 3 | this.style.display = this._display ? this._display : null; 4 | } else if (this.style.display != 'none') { 5 | this._display = this.style.display; 6 | this.style.display = 'none'; 7 | } 8 | } 9 | 10 | Node.prototype.hide = function(){ 11 | this.show(false); 12 | } 13 | 14 | NodeList.prototype.show = function(show){ 15 | for(var i = 0; i < this.length; i++){ 16 | this[i].show(show); 17 | } 18 | } 19 | 20 | NodeList.prototype.hide = function(){ 21 | this.show(false); 22 | } 23 | -------------------------------------------------------------------------------- /js/sign.js: -------------------------------------------------------------------------------- 1 | // './jsencrypt/jsencrypt.min.js' 2 | //require(['./jsrsasign/jsrsasign-latest-all-min.js'], function(){ 3 | 4 | // 5 | // Hashing and signing 6 | // 7 | 8 | module.exports.sign = function(crypt) { 9 | var key = (typeof crypt == "string") ? crypt : crypt.getPrivateKey(); 10 | var rsa = new RSAKey(); 11 | rsa.readPrivateKeyFromPEMString(key); 12 | return function(text){ 13 | //return crypt.sign(text, sha1hex); 14 | return rsa.signString(text, "sha1"); 15 | }; 16 | }; 17 | 18 | module.exports.checksign = function(text, sign, pubkey) { 19 | //var crypt = new JSEncrypt(); 20 | //crypt.setKey(pubkey); 21 | //return crypt.verify(text, sign, sha1hex); 22 | var rsa = KEYUTIL.getKey("-----BEGIN PUBLIC KEY-----\n" + pubkey + "\n-----END PUBLIC KEY-----"); 23 | return rsa.verifyString(text, sign); 24 | }; 25 | 26 | //}); 27 | -------------------------------------------------------------------------------- /js/tinymce: -------------------------------------------------------------------------------- 1 | ../node_modules/tinymce -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/classes/LegacyInput.js: -------------------------------------------------------------------------------- 1 | /** 2 | * LegacyInput.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | define("tinymce/LegacyInput", [ 12 | "tinymce/EditorManager", 13 | "tinymce/util/Tools" 14 | ], function(EditorManager, Tools) { 15 | var each = Tools.each, explode = Tools.explode; 16 | 17 | EditorManager.on('AddEditor', function(e) { 18 | var editor = e.editor; 19 | 20 | editor.on('preInit', function() { 21 | var filters, fontSizes, dom, settings = editor.settings; 22 | 23 | function replaceWithSpan(node, styles) { 24 | each(styles, function(value, name) { 25 | if (value) { 26 | dom.setStyle(node, name, value); 27 | } 28 | }); 29 | 30 | dom.rename(node, 'span'); 31 | } 32 | 33 | function convert(e) { 34 | dom = editor.dom; 35 | 36 | if (settings.convert_fonts_to_spans) { 37 | each(dom.select('font,u,strike', e.node), function(node) { 38 | filters[node.nodeName.toLowerCase()](dom, node); 39 | }); 40 | } 41 | } 42 | 43 | if (settings.inline_styles) { 44 | fontSizes = explode(settings.font_size_legacy_values); 45 | 46 | filters = { 47 | font: function(dom, node) { 48 | replaceWithSpan(node, { 49 | backgroundColor: node.style.backgroundColor, 50 | color: node.color, 51 | fontFamily: node.face, 52 | fontSize: fontSizes[parseInt(node.size, 10) - 1] 53 | }); 54 | }, 55 | 56 | u: function(dom, node) { 57 | replaceWithSpan(node, { 58 | textDecoration: 'underline' 59 | }); 60 | }, 61 | 62 | strike: function(dom, node) { 63 | replaceWithSpan(node, { 64 | textDecoration: 'line-through' 65 | }); 66 | } 67 | }; 68 | 69 | editor.on('PreProcess SetContent', convert); 70 | } 71 | }); 72 | }); 73 | }); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/classes/dom/Sizzle.jQuery.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Sizzle.jQuery.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /*global jQuery:true */ 12 | 13 | /* 14 | * Fake Sizzle using jQuery. 15 | */ 16 | define("tinymce/dom/Sizzle", [], function() { 17 | // Detect if jQuery is loaded 18 | if (!window.jQuery) { 19 | throw new Error("Load jQuery first"); 20 | } 21 | 22 | return jQuery.find; 23 | }); 24 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/classes/dom/TreeWalker.js: -------------------------------------------------------------------------------- 1 | /** 2 | * TreeWalker.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /** 12 | * TreeWalker class enables you to walk the DOM in a linear manner. 13 | * 14 | * @class tinymce.dom.TreeWalker 15 | */ 16 | define("tinymce/dom/TreeWalker", [], function() { 17 | return function(start_node, root_node) { 18 | var node = start_node; 19 | 20 | function findSibling(node, start_name, sibling_name, shallow) { 21 | var sibling, parent; 22 | 23 | if (node) { 24 | // Walk into nodes if it has a start 25 | if (!shallow && node[start_name]) { 26 | return node[start_name]; 27 | } 28 | 29 | // Return the sibling if it has one 30 | if (node != root_node) { 31 | sibling = node[sibling_name]; 32 | if (sibling) { 33 | return sibling; 34 | } 35 | 36 | // Walk up the parents to look for siblings 37 | for (parent = node.parentNode; parent && parent != root_node; parent = parent.parentNode) { 38 | sibling = parent[sibling_name]; 39 | if (sibling) { 40 | return sibling; 41 | } 42 | } 43 | } 44 | } 45 | } 46 | 47 | /** 48 | * Returns the current node. 49 | * 50 | * @method current 51 | * @return {Node} Current node where the walker is. 52 | */ 53 | this.current = function() { 54 | return node; 55 | }; 56 | 57 | /** 58 | * Walks to the next node in tree. 59 | * 60 | * @method next 61 | * @return {Node} Current node where the walker is after moving to the next node. 62 | */ 63 | this.next = function(shallow) { 64 | node = findSibling(node, 'firstChild', 'nextSibling', shallow); 65 | return node; 66 | }; 67 | 68 | /** 69 | * Walks to the previous node in tree. 70 | * 71 | * @method prev 72 | * @return {Node} Current node where the walker is after moving to the previous node. 73 | */ 74 | this.prev = function(shallow) { 75 | node = findSibling(node, 'lastChild', 'previousSibling', shallow); 76 | return node; 77 | }; 78 | }; 79 | }); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/classes/ui/AbsoluteLayout.js: -------------------------------------------------------------------------------- 1 | /** 2 | * AbsoluteLayout.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /** 12 | * LayoutManager for absolute positioning. This layout manager is more of 13 | * a base class for other layouts but can be created and used directly. 14 | * 15 | * @-x-less AbsoluteLayout.less 16 | * @class tinymce.ui.AbsoluteLayout 17 | * @extends tinymce.ui.Layout 18 | */ 19 | define("tinymce/ui/AbsoluteLayout", [ 20 | "tinymce/ui/Layout" 21 | ], function(Layout) { 22 | "use strict"; 23 | 24 | return Layout.extend({ 25 | Defaults: { 26 | containerClass: 'abs-layout', 27 | controlClass: 'abs-layout-item' 28 | }, 29 | 30 | /** 31 | * Recalculates the positions of the controls in the specified container. 32 | * 33 | * @method recalc 34 | * @param {tinymce.ui.Container} container Container instance to recalc. 35 | */ 36 | recalc: function(container) { 37 | container.items().filter(':visible').each(function(ctrl) { 38 | var settings = ctrl.settings; 39 | 40 | ctrl.layoutRect({ 41 | x: settings.x, 42 | y: settings.y, 43 | w: settings.w, 44 | h: settings.h 45 | }); 46 | 47 | if (ctrl.recalc) { 48 | ctrl.recalc(); 49 | } 50 | }); 51 | }, 52 | 53 | /** 54 | * Renders the specified container and any layout specific HTML. 55 | * 56 | * @method renderHtml 57 | * @param {tinymce.ui.Container} container Container to render HTML for. 58 | */ 59 | renderHtml: function(container) { 60 | return '
' + this._super(container); 61 | } 62 | }); 63 | }); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/classes/ui/ButtonGroup.js: -------------------------------------------------------------------------------- 1 | /** 2 | * ButtonGroup.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /** 12 | * This control enables you to put multiple buttons into a group. This is 13 | * useful when you want to combine similar toolbar buttons into a group. 14 | * 15 | * @example 16 | * // Create and render a buttongroup with two buttons to the body element 17 | * tinymce.ui.Factory.create({ 18 | * type: 'buttongroup', 19 | * items: [ 20 | * {text: 'Button A'}, 21 | * {text: 'Button B'} 22 | * ] 23 | * }).renderTo(document.body); 24 | * 25 | * @-x-less ButtonGroup.less 26 | * @class tinymce.ui.ButtonGroup 27 | * @extends tinymce.ui.Container 28 | */ 29 | define("tinymce/ui/ButtonGroup", [ 30 | "tinymce/ui/Container" 31 | ], function(Container) { 32 | "use strict"; 33 | 34 | return Container.extend({ 35 | Defaults: { 36 | defaultType: 'button', 37 | role: 'group' 38 | }, 39 | 40 | /** 41 | * Renders the control as a HTML string. 42 | * 43 | * @method renderHtml 44 | * @return {String} HTML representing the control. 45 | */ 46 | renderHtml: function() { 47 | var self = this, layout = self._layout; 48 | 49 | self.addClass('btn-group'); 50 | self.preRender(); 51 | layout.preRender(self); 52 | 53 | return ( 54 | '
' + 55 | '
' + 56 | (self.settings.html || '') + layout.renderHtml(self) + 57 | '
' + 58 | '
' 59 | ); 60 | } 61 | }); 62 | }); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/classes/ui/FieldSet.js: -------------------------------------------------------------------------------- 1 | /** 2 | * FieldSet.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /** 12 | * This class creates fieldset containers. 13 | * 14 | * @-x-less FieldSet.less 15 | * @class tinymce.ui.FieldSet 16 | * @extends tinymce.ui.Form 17 | */ 18 | define("tinymce/ui/FieldSet", [ 19 | "tinymce/ui/Form" 20 | ], function(Form) { 21 | "use strict"; 22 | 23 | return Form.extend({ 24 | Defaults: { 25 | containerCls: 'fieldset', 26 | layout: 'flex', 27 | direction: 'column', 28 | align: 'stretch', 29 | flex: 1, 30 | padding: "25 15 5 15", 31 | labelGap: 30, 32 | spacing: 10, 33 | border: 1 34 | }, 35 | 36 | /** 37 | * Renders the control as a HTML string. 38 | * 39 | * @method renderHtml 40 | * @return {String} HTML representing the control. 41 | */ 42 | renderHtml: function() { 43 | var self = this, layout = self._layout, prefix = self.classPrefix; 44 | 45 | self.preRender(); 46 | layout.preRender(self); 47 | 48 | return ( 49 | '
' + 50 | (self.settings.title ? ('' + 51 | self.settings.title + '') : '') + 52 | '
' + 53 | (self.settings.html || '') + layout.renderHtml(self) + 54 | '
' + 55 | '
' 56 | ); 57 | } 58 | }); 59 | }); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/classes/ui/FilePicker.js: -------------------------------------------------------------------------------- 1 | /** 2 | * FilePicker.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /*global tinymce:true */ 12 | 13 | /** 14 | * This class creates a file picker control. 15 | * 16 | * @class tinymce.ui.FilePicker 17 | * @extends tinymce.ui.ComboBox 18 | */ 19 | define("tinymce/ui/FilePicker", [ 20 | "tinymce/ui/ComboBox", 21 | "tinymce/util/Tools" 22 | ], function(ComboBox, Tools) { 23 | "use strict"; 24 | 25 | return ComboBox.extend({ 26 | /** 27 | * Constructs a new control instance with the specified settings. 28 | * 29 | * @constructor 30 | * @param {Object} settings Name/value object with settings. 31 | */ 32 | init: function(settings) { 33 | var self = this, editor = tinymce.activeEditor, fileBrowserCallback, fileBrowserCallbackTypes; 34 | 35 | settings.spellcheck = false; 36 | 37 | fileBrowserCallbackTypes = editor.settings.file_browser_callback_types; 38 | if (fileBrowserCallbackTypes) { 39 | fileBrowserCallbackTypes = Tools.makeMap(fileBrowserCallbackTypes, /[, ]/); 40 | } 41 | 42 | fileBrowserCallback = editor.settings.file_browser_callback; 43 | if (fileBrowserCallback && (!fileBrowserCallbackTypes || fileBrowserCallbackTypes[settings.filetype])) { 44 | settings.icon = 'browse'; 45 | 46 | settings.onaction = function() { 47 | fileBrowserCallback( 48 | self.getEl('inp').id, 49 | self.getEl('inp').value, 50 | settings.filetype, 51 | window 52 | ); 53 | }; 54 | } 55 | 56 | self._super(settings); 57 | } 58 | }); 59 | }); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/classes/ui/FitLayout.js: -------------------------------------------------------------------------------- 1 | /** 2 | * FitLayout.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /** 12 | * This layout manager will resize the control to be the size of it's parent container. 13 | * In other words width: 100% and height: 100%. 14 | * 15 | * @-x-less FitLayout.less 16 | * @class tinymce.ui.FitLayout 17 | * @extends tinymce.ui.AbsoluteLayout 18 | */ 19 | define("tinymce/ui/FitLayout", [ 20 | "tinymce/ui/AbsoluteLayout" 21 | ], function(AbsoluteLayout) { 22 | "use strict"; 23 | 24 | return AbsoluteLayout.extend({ 25 | /** 26 | * Recalculates the positions of the controls in the specified container. 27 | * 28 | * @method recalc 29 | * @param {tinymce.ui.Container} container Container instance to recalc. 30 | */ 31 | recalc: function(container) { 32 | var contLayoutRect = container.layoutRect(), paddingBox = container.paddingBox(); 33 | 34 | container.items().filter(':visible').each(function(ctrl) { 35 | ctrl.layoutRect({ 36 | x: paddingBox.left, 37 | y: paddingBox.top, 38 | w: contLayoutRect.innerW - paddingBox.right - paddingBox.left, 39 | h: contLayoutRect.innerH - paddingBox.top - paddingBox.bottom 40 | }); 41 | 42 | if (ctrl.recalc) { 43 | ctrl.recalc(); 44 | } 45 | }); 46 | } 47 | }); 48 | }); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/classes/ui/FlowLayout.js: -------------------------------------------------------------------------------- 1 | /** 2 | * FlowLayout.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /** 12 | * This layout manager will place the controls by using the browsers native layout. 13 | * 14 | * @-x-less FlowLayout.less 15 | * @class tinymce.ui.FlowLayout 16 | * @extends tinymce.ui.Layout 17 | */ 18 | define("tinymce/ui/FlowLayout", [ 19 | "tinymce/ui/Layout" 20 | ], function(Layout) { 21 | return Layout.extend({ 22 | Defaults: { 23 | containerClass: 'flow-layout', 24 | controlClass: 'flow-layout-item', 25 | endClass : 'break' 26 | }, 27 | 28 | /** 29 | * Recalculates the positions of the controls in the specified container. 30 | * 31 | * @method recalc 32 | * @param {tinymce.ui.Container} container Container instance to recalc. 33 | */ 34 | recalc: function(container) { 35 | container.items().filter(':visible').each(function(ctrl) { 36 | if (ctrl.recalc) { 37 | ctrl.recalc(); 38 | } 39 | }); 40 | } 41 | }); 42 | }); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/classes/ui/FormItem.js: -------------------------------------------------------------------------------- 1 | /** 2 | * FormItem.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /** 12 | * This class is a container created by the form element with 13 | * a label and control item. 14 | * 15 | * @class tinymce.ui.FormItem 16 | * @extends tinymce.ui.Container 17 | * @setting {String} label Label to display for the form item. 18 | */ 19 | define("tinymce/ui/FormItem", [ 20 | "tinymce/ui/Container" 21 | ], function(Container) { 22 | "use strict"; 23 | 24 | return Container.extend({ 25 | Defaults: { 26 | layout: 'flex', 27 | align: 'center', 28 | defaults: { 29 | flex: 1 30 | } 31 | }, 32 | 33 | /** 34 | * Renders the control as a HTML string. 35 | * 36 | * @method renderHtml 37 | * @return {String} HTML representing the control. 38 | */ 39 | renderHtml: function() { 40 | var self = this, layout = self._layout, prefix = self.classPrefix; 41 | 42 | self.addClass('formitem'); 43 | layout.preRender(self); 44 | 45 | return ( 46 | '
' + 47 | (self.settings.title ? ('
' + 48 | self.settings.title + '
') : '') + 49 | '
' + 50 | (self.settings.html || '') + layout.renderHtml(self) + 51 | '
' + 52 | '
' 53 | ); 54 | } 55 | }); 56 | }); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/classes/ui/Iframe.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Iframe.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /*jshint scripturl:true */ 12 | 13 | /** 14 | * This class creates an iframe. 15 | * 16 | * @setting {String} url Url to open in the iframe. 17 | * 18 | * @-x-less Iframe.less 19 | * @class tinymce.ui.Iframe 20 | * @extends tinymce.ui.Widget 21 | */ 22 | define("tinymce/ui/Iframe", [ 23 | "tinymce/ui/Widget" 24 | ], function(Widget) { 25 | "use strict"; 26 | 27 | return Widget.extend({ 28 | /** 29 | * Renders the control as a HTML string. 30 | * 31 | * @method renderHtml 32 | * @return {String} HTML representing the control. 33 | */ 34 | renderHtml: function() { 35 | var self = this; 36 | 37 | self.addClass('iframe'); 38 | self.canFocus = false; 39 | 40 | /*eslint no-script-url:0 */ 41 | return ( 42 | '' 44 | ); 45 | }, 46 | 47 | /** 48 | * Setter for the iframe source. 49 | * 50 | * @method src 51 | * @param {String} src Source URL for iframe. 52 | */ 53 | src: function(src) { 54 | this.getEl().src = src; 55 | }, 56 | 57 | /** 58 | * Inner HTML for the iframe. 59 | * 60 | * @method html 61 | * @param {String} html HTML string to set as HTML inside the iframe. 62 | * @param {function} callback Optional callback to execute when the iframe body is filled with contents. 63 | * @return {tinymce.ui.Iframe} Current iframe control. 64 | */ 65 | html: function(html, callback) { 66 | var self = this, body = this.getEl().contentWindow.document.body; 67 | 68 | // Wait for iframe to initialize IE 10 takes time 69 | if (!body) { 70 | setTimeout(function() { 71 | self.html(html); 72 | }, 0); 73 | } else { 74 | body.innerHTML = html; 75 | 76 | if (callback) { 77 | callback(); 78 | } 79 | } 80 | 81 | return this; 82 | } 83 | }); 84 | }); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/classes/ui/MenuBar.js: -------------------------------------------------------------------------------- 1 | /** 2 | * MenuBar.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /** 12 | * Creates a new menubar. 13 | * 14 | * @-x-less MenuBar.less 15 | * @class tinymce.ui.MenuBar 16 | * @extends tinymce.ui.Container 17 | */ 18 | define("tinymce/ui/MenuBar", [ 19 | "tinymce/ui/Toolbar" 20 | ], function(Toolbar) { 21 | "use strict"; 22 | 23 | return Toolbar.extend({ 24 | Defaults: { 25 | role: 'menubar', 26 | containerCls: 'menubar', 27 | ariaRoot: true, 28 | defaults: { 29 | type: 'menubutton' 30 | } 31 | } 32 | }); 33 | }); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/classes/ui/Panel.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Panel.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /** 12 | * Creates a new panel. 13 | * 14 | * @-x-less Panel.less 15 | * @class tinymce.ui.Panel 16 | * @extends tinymce.ui.Container 17 | * @mixes tinymce.ui.Scrollable 18 | */ 19 | define("tinymce/ui/Panel", [ 20 | "tinymce/ui/Container", 21 | "tinymce/ui/Scrollable" 22 | ], function(Container, Scrollable) { 23 | "use strict"; 24 | 25 | return Container.extend({ 26 | Defaults: { 27 | layout: 'fit', 28 | containerCls: 'panel' 29 | }, 30 | 31 | Mixins: [Scrollable], 32 | 33 | /** 34 | * Renders the control as a HTML string. 35 | * 36 | * @method renderHtml 37 | * @return {String} HTML representing the control. 38 | */ 39 | renderHtml: function() { 40 | var self = this, layout = self._layout, innerHtml = self.settings.html; 41 | 42 | self.preRender(); 43 | layout.preRender(self); 44 | 45 | if (typeof(innerHtml) == "undefined") { 46 | innerHtml = ( 47 | '
' + 48 | layout.renderHtml(self) + 49 | '
' 50 | ); 51 | } else { 52 | if (typeof(innerHtml) == 'function') { 53 | innerHtml = innerHtml.call(self); 54 | } 55 | 56 | self._hasBody = false; 57 | } 58 | 59 | return ( 60 | '
' + 61 | (self._preBodyHtml || '') + 62 | innerHtml + 63 | '
' 64 | ); 65 | } 66 | }); 67 | }); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/classes/ui/Radio.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Radio.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /** 12 | * Creates a new radio button. 13 | * 14 | * @-x-less Radio.less 15 | * @class tinymce.ui.Radio 16 | * @extends tinymce.ui.Checkbox 17 | */ 18 | define("tinymce/ui/Radio", [ 19 | "tinymce/ui/Checkbox" 20 | ], function(Checkbox) { 21 | "use strict"; 22 | 23 | return Checkbox.extend({ 24 | Defaults: { 25 | classes: "radio", 26 | role: "radio" 27 | } 28 | }); 29 | }); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/classes/ui/Resizable.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Resizable.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /** 12 | * Resizable mixin. Enables controls to be resized. 13 | * 14 | * @mixin tinymce.ui.Resizable 15 | */ 16 | define("tinymce/ui/Resizable", [ 17 | "tinymce/ui/DomUtils" 18 | ], function(DomUtils) { 19 | "use strict"; 20 | 21 | return { 22 | /** 23 | * Resizes the control to contents. 24 | * 25 | * @method resizeToContent 26 | */ 27 | resizeToContent: function() { 28 | this._layoutRect.autoResize = true; 29 | this._lastRect = null; 30 | this.reflow(); 31 | }, 32 | 33 | /** 34 | * Resizes the control to a specific width/height. 35 | * 36 | * @method resizeTo 37 | * @param {Number} w Control width. 38 | * @param {Number} h Control height. 39 | * @return {tinymce.ui.Control} Current control instance. 40 | */ 41 | resizeTo: function(w, h) { 42 | // TODO: Fix hack 43 | if (w <= 1 || h <= 1) { 44 | var rect = DomUtils.getWindowSize(); 45 | 46 | w = w <= 1 ? w * rect.w : w; 47 | h = h <= 1 ? h * rect.h : h; 48 | } 49 | 50 | this._layoutRect.autoResize = false; 51 | return this.layoutRect({minW: w, minH: h, w: w, h: h}).reflow(); 52 | }, 53 | 54 | /** 55 | * Resizes the control to a specific relative width/height. 56 | * 57 | * @method resizeBy 58 | * @param {Number} dw Relative control width. 59 | * @param {Number} dh Relative control height. 60 | * @return {tinymce.ui.Control} Current control instance. 61 | */ 62 | resizeBy: function(dw, dh) { 63 | var self = this, rect = self.layoutRect(); 64 | 65 | return self.resizeTo(rect.w + dw, rect.h + dh); 66 | } 67 | }; 68 | }); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/classes/ui/ResizeHandle.js: -------------------------------------------------------------------------------- 1 | /** 2 | * ResizeHandle.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /** 12 | * Renders a resize handle that fires ResizeStart, Resize and ResizeEnd events. 13 | * 14 | * @-x-less ResizeHandle.less 15 | * @class tinymce.ui.ResizeHandle 16 | * @extends tinymce.ui.Widget 17 | */ 18 | define("tinymce/ui/ResizeHandle", [ 19 | "tinymce/ui/Widget", 20 | "tinymce/ui/DragHelper" 21 | ], function(Widget, DragHelper) { 22 | "use strict"; 23 | 24 | return Widget.extend({ 25 | /** 26 | * Renders the control as a HTML string. 27 | * 28 | * @method renderHtml 29 | * @return {String} HTML representing the control. 30 | */ 31 | renderHtml: function() { 32 | var self = this, prefix = self.classPrefix; 33 | 34 | self.addClass('resizehandle'); 35 | 36 | if (self.settings.direction == "both") { 37 | self.addClass('resizehandle-both'); 38 | } 39 | 40 | self.canFocus = false; 41 | 42 | return ( 43 | '
' + 44 | '' + 45 | '
' 46 | ); 47 | }, 48 | 49 | /** 50 | * Called after the control has been rendered. 51 | * 52 | * @method postRender 53 | */ 54 | postRender: function() { 55 | var self = this; 56 | 57 | self._super(); 58 | 59 | self.resizeDragHelper = new DragHelper(this._id, { 60 | start: function() { 61 | self.fire('ResizeStart'); 62 | }, 63 | 64 | drag: function(e) { 65 | if (self.settings.direction != "both") { 66 | e.deltaX = 0; 67 | } 68 | 69 | self.fire('Resize', e); 70 | }, 71 | 72 | stop: function() { 73 | self.fire('ResizeEnd'); 74 | } 75 | }); 76 | }, 77 | 78 | remove: function() { 79 | if (this.resizeDragHelper) { 80 | this.resizeDragHelper.destroy(); 81 | } 82 | 83 | return this._super(); 84 | } 85 | }); 86 | }); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/classes/ui/Spacer.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Spacer.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /** 12 | * Creates a spacer. This control is used in flex layouts for example. 13 | * 14 | * @-x-less Spacer.less 15 | * @class tinymce.ui.Spacer 16 | * @extends tinymce.ui.Widget 17 | */ 18 | define("tinymce/ui/Spacer", [ 19 | "tinymce/ui/Widget" 20 | ], function(Widget) { 21 | "use strict"; 22 | 23 | return Widget.extend({ 24 | /** 25 | * Renders the control as a HTML string. 26 | * 27 | * @method renderHtml 28 | * @return {String} HTML representing the control. 29 | */ 30 | renderHtml: function() { 31 | var self = this; 32 | 33 | self.addClass('spacer'); 34 | self.canFocus = false; 35 | 36 | return '
'; 37 | } 38 | }); 39 | }); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/classes/ui/StackLayout.js: -------------------------------------------------------------------------------- 1 | /** 2 | * StackLayout.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /** 12 | * This layout uses the browsers layout when the items are blocks. 13 | * 14 | * @-x-less StackLayout.less 15 | * @class tinymce.ui.StackLayout 16 | * @extends tinymce.ui.FlowLayout 17 | */ 18 | define("tinymce/ui/StackLayout", [ 19 | "tinymce/ui/FlowLayout" 20 | ], function(FlowLayout) { 21 | "use strict"; 22 | 23 | return FlowLayout.extend({ 24 | Defaults: { 25 | containerClass: 'stack-layout', 26 | controlClass: 'stack-layout-item', 27 | endClass : 'break' 28 | } 29 | }); 30 | }); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/classes/ui/Throbber.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Throbber.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /** 12 | * This class enables you to display a Throbber for any element. 13 | * 14 | * @-x-less Throbber.less 15 | * @class tinymce.ui.Throbber 16 | */ 17 | define("tinymce/ui/Throbber", [ 18 | "tinymce/ui/DomUtils", 19 | "tinymce/ui/Control" 20 | ], function(DomUtils, Control) { 21 | "use strict"; 22 | 23 | /** 24 | * Constructs a new throbber. 25 | * 26 | * @constructor 27 | * @param {Element} elm DOM Html element to display throbber in. 28 | * @param {Boolean} inline Optional true/false state if the throbber should be appended to end of element for infinite scroll. 29 | */ 30 | return function(elm, inline) { 31 | var self = this, state, classPrefix = Control.classPrefix; 32 | 33 | /** 34 | * Shows the throbber. 35 | * 36 | * @method show 37 | * @param {Number} [time] Time to wait before showing. 38 | * @return {tinymce.ui.Throbber} Current throbber instance. 39 | */ 40 | self.show = function(time) { 41 | self.hide(); 42 | 43 | state = true; 44 | 45 | window.setTimeout(function() { 46 | if (state) { 47 | elm.appendChild(DomUtils.createFragment( 48 | '
' 49 | )); 50 | } 51 | }, time || 0); 52 | 53 | return self; 54 | }; 55 | 56 | /** 57 | * Hides the throbber. 58 | * 59 | * @method hide 60 | * @return {tinymce.ui.Throbber} Current throbber instance. 61 | */ 62 | self.hide = function() { 63 | var child = elm.lastChild; 64 | 65 | if (child && child.className.indexOf('throbber') != -1) { 66 | child.parentNode.removeChild(child); 67 | } 68 | 69 | state = false; 70 | 71 | return self; 72 | }; 73 | }; 74 | }); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/classes/ui/Toolbar.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Toolbar.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /** 12 | * Creates a new toolbar. 13 | * 14 | * @class tinymce.ui.Toolbar 15 | * @extends tinymce.ui.Container 16 | */ 17 | define("tinymce/ui/Toolbar", [ 18 | "tinymce/ui/Container" 19 | ], function(Container) { 20 | "use strict"; 21 | 22 | return Container.extend({ 23 | Defaults: { 24 | role: 'toolbar', 25 | layout: 'flow' 26 | }, 27 | 28 | /** 29 | * Constructs a instance with the specified settings. 30 | * 31 | * @constructor 32 | * @param {Object} settings Name/value object with settings. 33 | */ 34 | init: function(settings) { 35 | var self = this; 36 | 37 | self._super(settings); 38 | self.addClass('toolbar'); 39 | }, 40 | 41 | /** 42 | * Called after the control has been rendered. 43 | * 44 | * @method postRender 45 | */ 46 | postRender: function() { 47 | var self = this; 48 | 49 | self.items().addClass('toolbar-item'); 50 | 51 | return self._super(); 52 | } 53 | }); 54 | }); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/classes/ui/Tooltip.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Tooltip.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /** 12 | * Creates a tooltip instance. 13 | * 14 | * @-x-less ToolTip.less 15 | * @class tinymce.ui.ToolTip 16 | * @extends tinymce.ui.Control 17 | * @mixes tinymce.ui.Movable 18 | */ 19 | define("tinymce/ui/Tooltip", [ 20 | "tinymce/ui/Control", 21 | "tinymce/ui/Movable" 22 | ], function(Control, Movable) { 23 | return Control.extend({ 24 | Mixins: [Movable], 25 | 26 | Defaults: { 27 | classes: 'widget tooltip tooltip-n' 28 | }, 29 | 30 | /** 31 | * Sets/gets the current label text. 32 | * 33 | * @method text 34 | * @param {String} [text] New label text. 35 | * @return {String|tinymce.ui.Tooltip} Current text or current label instance. 36 | */ 37 | text: function(value) { 38 | var self = this; 39 | 40 | if (typeof(value) != "undefined") { 41 | self._value = value; 42 | 43 | if (self._rendered) { 44 | self.getEl().lastChild.innerHTML = self.encode(value); 45 | } 46 | 47 | return self; 48 | } 49 | 50 | return self._value; 51 | }, 52 | 53 | /** 54 | * Renders the control as a HTML string. 55 | * 56 | * @method renderHtml 57 | * @return {String} HTML representing the control. 58 | */ 59 | renderHtml: function() { 60 | var self = this, prefix = self.classPrefix; 61 | 62 | return ( 63 | '' 67 | ); 68 | }, 69 | 70 | /** 71 | * Repaints the control after a layout operation. 72 | * 73 | * @method repaint 74 | */ 75 | repaint: function() { 76 | var self = this, style, rect; 77 | 78 | style = self.getEl().style; 79 | rect = self._layoutRect; 80 | 81 | style.left = rect.x + 'px'; 82 | style.top = rect.y + 'px'; 83 | style.zIndex = 0xFFFF + 0xFFFF; 84 | } 85 | }); 86 | }); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/classes/util/I18n.js: -------------------------------------------------------------------------------- 1 | /** 2 | * I18n.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /** 12 | * I18n class that handles translation of TinyMCE UI. 13 | * Uses po style with csharp style parameters. 14 | * 15 | * @class tinymce.util.I18n 16 | */ 17 | define("tinymce/util/I18n", [], function() { 18 | "use strict"; 19 | 20 | var data = {}; 21 | 22 | return { 23 | /** 24 | * Property gets set to true if a RTL language pack was loaded. 25 | * 26 | * @property rtl 27 | * @type Boolean 28 | */ 29 | rtl: false, 30 | 31 | /** 32 | * Adds translations for a specific language code. 33 | * 34 | * @method add 35 | * @param {String} code Language code like sv_SE. 36 | * @param {Array} items Name/value array with English en_US to sv_SE. 37 | */ 38 | add: function(code, items) { 39 | for (var name in items) { 40 | data[name] = items[name]; 41 | } 42 | 43 | this.rtl = this.rtl || data._dir === 'rtl'; 44 | }, 45 | 46 | /** 47 | * Translates the specified text. 48 | * 49 | * It has a few formats: 50 | * I18n.translate("Text"); 51 | * I18n.translate(["Text {0}/{1}", 0, 1]); 52 | * I18n.translate({raw: "Raw string"}); 53 | * 54 | * @method translate 55 | * @param {String/Object/Array} text Text to translate. 56 | * @return {String} String that got translated. 57 | */ 58 | translate: function(text) { 59 | if (typeof(text) == "undefined") { 60 | return text; 61 | } 62 | 63 | if (typeof(text) != "string" && text.raw) { 64 | return text.raw; 65 | } 66 | 67 | if (text.push) { 68 | var values = text.slice(1); 69 | 70 | text = (data[text[0]] || text[0]).replace(/\{([^\}]+)\}/g, function(match1, match2) { 71 | return values[match2]; 72 | }); 73 | } 74 | 75 | return data[text] || text; 76 | }, 77 | 78 | data: data 79 | }; 80 | }); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/classes/util/JSONP.js: -------------------------------------------------------------------------------- 1 | /** 2 | * JSONP.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | define("tinymce/util/JSONP", [ 12 | "tinymce/dom/DOMUtils" 13 | ], function(DOMUtils) { 14 | return { 15 | callbacks: {}, 16 | count: 0, 17 | 18 | send: function(settings) { 19 | var self = this, dom = DOMUtils.DOM, count = settings.count !== undefined ? settings.count : self.count; 20 | var id = 'tinymce_jsonp_' + count; 21 | 22 | self.callbacks[count] = function(json) { 23 | dom.remove(id); 24 | delete self.callbacks[count]; 25 | 26 | settings.callback(json); 27 | }; 28 | 29 | dom.add(dom.doc.body, 'script', { 30 | id: id, 31 | src: settings.url, 32 | type: 'text/javascript' 33 | }); 34 | 35 | self.count++; 36 | } 37 | }; 38 | }); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/classes/util/VK.js: -------------------------------------------------------------------------------- 1 | /** 2 | * VK.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /** 12 | * This file exposes a set of the common KeyCodes for use. Please grow it as needed. 13 | */ 14 | define("tinymce/util/VK", [ 15 | "tinymce/Env" 16 | ], function(Env) { 17 | return { 18 | BACKSPACE: 8, 19 | DELETE: 46, 20 | DOWN: 40, 21 | ENTER: 13, 22 | LEFT: 37, 23 | RIGHT: 39, 24 | SPACEBAR: 32, 25 | TAB: 9, 26 | UP: 38, 27 | 28 | modifierPressed: function(e) { 29 | return e.shiftKey || e.ctrlKey || e.altKey; 30 | }, 31 | 32 | metaKeyPressed: function(e) { 33 | // Check if ctrl or meta key is pressed. Edge case for AltGr on Windows where it produces ctrlKey+altKey states 34 | return (Env.mac ? e.metaKey : e.ctrlKey && !e.altKey); 35 | } 36 | }; 37 | }); 38 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/langs/readme.md: -------------------------------------------------------------------------------- 1 | This is where language files should be placed. 2 | 3 | Please DO NOT translate these directly use this service: https://www.transifex.com/projects/p/tinymce/ 4 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/advlist/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("advlist",function(t){function e(t,e){var n=[];return tinymce.each(e.split(/[ ,]/),function(t){n.push({text:t.replace(/\-/g," ").replace(/\b\w/g,function(t){return t.toUpperCase()}),data:"default"==t?"":t})}),n}function n(e,n){var o,l=t.dom,a=t.selection;o=l.getParent(a.getNode(),"ol,ul"),o&&o.nodeName==e&&n!==!1||t.execCommand("UL"==e?"InsertUnorderedList":"InsertOrderedList"),n=n===!1?i[e]:n,i[e]=n,o=l.getParent(a.getNode(),"ol,ul"),o&&(l.setStyle(o,"listStyleType",n),o.removeAttribute("data-mce-style")),t.focus()}function o(e){var n=t.dom.getStyle(t.dom.getParent(t.selection.getNode(),"ol,ul"),"listStyleType")||"";e.control.items().each(function(t){t.active(t.settings.data===n)})}var l,a,i={};l=e("OL",t.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman")),a=e("UL",t.getParam("advlist_bullet_styles","default,circle,disc,square")),t.addButton("numlist",{type:"splitbutton",tooltip:"Numbered list",menu:l,onshow:o,onselect:function(t){n("OL",t.control.settings.data)},onclick:function(){n("OL",!1)}}),t.addButton("bullist",{type:"splitbutton",tooltip:"Bullet list",menu:a,onshow:o,onselect:function(t){n("UL",t.control.settings.data)},onclick:function(){n("UL",!1)}})}); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/anchor/plugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * plugin.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /*global tinymce:true */ 12 | 13 | tinymce.PluginManager.add('anchor', function(editor) { 14 | function showDialog() { 15 | var selectedNode = editor.selection.getNode(); 16 | 17 | editor.windowManager.open({ 18 | title: 'Anchor', 19 | body: {type: 'textbox', name: 'name', size: 40, label: 'Name', value: selectedNode.name || selectedNode.id}, 20 | onsubmit: function(e) { 21 | editor.execCommand('mceInsertContent', false, editor.dom.createHTML('a', { 22 | id: e.data.name 23 | })); 24 | } 25 | }); 26 | } 27 | 28 | editor.addButton('anchor', { 29 | icon: 'anchor', 30 | tooltip: 'Anchor', 31 | onclick: showDialog, 32 | stateSelector: 'a:not([href])' 33 | }); 34 | 35 | editor.addMenuItem('anchor', { 36 | icon: 'anchor', 37 | text: 'Anchor', 38 | context: 'insert', 39 | onclick: showDialog 40 | }); 41 | }); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/anchor/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("anchor",function(n){function e(){var e=n.selection.getNode();n.windowManager.open({title:"Anchor",body:{type:"textbox",name:"name",size:40,label:"Name",value:e.name||e.id},onsubmit:function(e){n.execCommand("mceInsertContent",!1,n.dom.createHTML("a",{id:e.data.name}))}})}n.addButton("anchor",{icon:"anchor",tooltip:"Anchor",onclick:e,stateSelector:"a:not([href])"}),n.addMenuItem("anchor",{icon:"anchor",text:"Anchor",context:"insert",onclick:e})}); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/autolink/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("autolink",function(t){function n(t){o(t,-1,"(",!0)}function e(t){o(t,0,"",!0)}function i(t){o(t,-1,"",!1)}function o(t,n,e){function i(t,n){if(0>n&&(n=0),3==t.nodeType){var e=t.data.length;n>e&&(n=e)}return n}function o(t,n){f.setStart(t,i(t,n))}function r(t,n){f.setEnd(t,i(t,n))}var f,d,a,s,c,l,u,g,h;if(f=t.selection.getRng(!0).cloneRange(),f.startOffset<5){if(g=f.endContainer.previousSibling,!g){if(!f.endContainer.firstChild||!f.endContainer.firstChild.nextSibling)return;g=f.endContainer.firstChild.nextSibling}if(h=g.length,o(g,h),r(g,h),f.endOffset<5)return;d=f.endOffset,s=g}else{if(s=f.endContainer,3!=s.nodeType&&s.firstChild){for(;3!=s.nodeType&&s.firstChild;)s=s.firstChild;3==s.nodeType&&(o(s,0),r(s,s.nodeValue.length))}d=1==f.endOffset?2:f.endOffset-1-n}a=d;do o(s,d>=2?d-2:0),r(s,d>=1?d-1:0),d-=1;while(" "!=f.toString()&&""!==f.toString()&&160!=f.toString().charCodeAt(0)&&d-2>=0&&f.toString()!=e);f.toString()==e||160==f.toString().charCodeAt(0)?(o(s,d),r(s,a),d+=1):0===f.startOffset?(o(s,0),r(s,a)):(o(s,d),r(s,a)),l=f.toString(),"."==l.charAt(l.length-1)&&r(s,a-1),l=f.toString(),u=l.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i),u&&("www."==u[1]?u[1]="http://www.":/@$/.test(u[1])&&!/^mailto:/.test(u[1])&&(u[1]="mailto:"+u[1]),c=t.selection.getBookmark(),t.selection.setRng(f),t.execCommand("createlink",!1,u[1]+u[2]),t.selection.moveToBookmark(c),t.nodeChanged())}var r;return t.on("keydown",function(n){return 13==n.keyCode?i(t):void 0}),tinymce.Env.ie?void t.on("focus",function(){if(!r){r=!0;try{t.execCommand("AutoUrlDetect",!1,!0)}catch(n){}}}):(t.on("keypress",function(e){return 41==e.keyCode?n(t):void 0}),void t.on("keyup",function(n){return 32==n.keyCode?e(t):void 0}))}); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/autoresize/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("autoresize",function(e){function t(){return e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen()}function i(n){var s,r,g,u,l,m,h,d,f=tinymce.DOM;if(r=e.getDoc()){if(g=r.body,u=r.documentElement,l=o.autoresize_min_height,!g||n&&"setcontent"===n.type&&n.initial||t())return void(g&&u&&(g.style.overflowY="auto",u.style.overflowY="auto"));h=e.dom.getStyle(g,"margin-top",!0),d=e.dom.getStyle(g,"margin-bottom",!0),m=g.offsetHeight+parseInt(h,10)+parseInt(d,10),(isNaN(m)||0>=m)&&(m=tinymce.Env.ie?g.scrollHeight:tinymce.Env.webkit&&0===g.clientHeight?0:g.offsetHeight),m>o.autoresize_min_height&&(l=m),o.autoresize_max_height&&m>o.autoresize_max_height?(l=o.autoresize_max_height,g.style.overflowY="auto",u.style.overflowY="auto"):(g.style.overflowY="hidden",u.style.overflowY="hidden",g.scrollTop=0),l!==a&&(s=l-a,f.setStyle(f.get(e.id+"_ifr"),"height",l+"px"),a=l,tinymce.isWebKit&&0>s&&i(n))}}function n(e,t,o){setTimeout(function(){i({}),e--?n(e,t,o):o&&o()},t)}var o=e.settings,a=0;e.settings.inline||(o.autoresize_min_height=parseInt(e.getParam("autoresize_min_height",e.getElement().offsetHeight),10),o.autoresize_max_height=parseInt(e.getParam("autoresize_max_height",0),10),e.on("init",function(){var t=e.getParam("autoresize_overflow_padding",1);e.dom.setStyles(e.getBody(),{paddingBottom:e.getParam("autoresize_bottom_margin",50),paddingLeft:t,paddingRight:t})}),e.on("nodechange setcontent keyup FullscreenStateChanged",i),e.getParam("autoresize_on_init",!0)&&e.on("init",function(){n(20,100,function(){n(5,1e3)})}),e.addCommand("mceAutoResize",i))}); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/autosave/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("autosave",function(e){function t(e,t){var n={s:1e3,m:6e4};return e=/^(\d+)([ms]?)$/.exec(""+(e||t)),(e[2]?n[e[2]]:1)*parseInt(e,10)}function n(){var e=parseInt(l.getItem(d+"time"),10)||0;return(new Date).getTime()-e>v.autosave_retention?(a(!1),!1):!0}function a(t){l.removeItem(d+"draft"),l.removeItem(d+"time"),t!==!1&&e.fire("RemoveDraft")}function r(){!c()&&e.isDirty()&&(l.setItem(d+"draft",e.getContent({format:"raw",no_events:!0})),l.setItem(d+"time",(new Date).getTime()),e.fire("StoreDraft"))}function o(){n()&&(e.setContent(l.getItem(d+"draft"),{format:"raw"}),e.fire("RestoreDraft"))}function i(){m||(setInterval(function(){e.removed||r()},v.autosave_interval),m=!0)}function s(){var t=this;t.disabled(!n()),e.on("StoreDraft RestoreDraft RemoveDraft",function(){t.disabled(!n())}),i()}function u(){e.undoManager.beforeChange(),o(),a(),e.undoManager.add()}function f(){var e;return tinymce.each(tinymce.editors,function(t){t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&t.getParam("autosave_ask_before_unload",!0)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))}),e}function c(t){var n=e.settings.forced_root_block;return t=tinymce.trim("undefined"==typeof t?e.getBody().innerHTML:t),""===t||new RegExp("^<"+n+"[^>]*>(( | |[ ]|]*>)+?|)|
$","i").test(t)}var d,m,v=e.settings,l=tinymce.util.LocalStorage;d=v.autosave_prefix||"tinymce-autosave-{path}{query}-{id}-",d=d.replace(/\{path\}/g,document.location.pathname),d=d.replace(/\{query\}/g,document.location.search),d=d.replace(/\{id\}/g,e.id),v.autosave_interval=t(v.autosave_interval,"30s"),v.autosave_retention=t(v.autosave_retention,"20m"),e.addButton("restoredraft",{title:"Restore last draft",onclick:u,onPostRender:s}),e.addMenuItem("restoredraft",{text:"Restore last draft",onclick:u,onPostRender:s,context:"file"}),e.settings.autosave_restore_when_empty!==!1&&(e.on("init",function(){n()&&c()&&o()}),e.on("saveContent",function(){a()})),window.onbeforeunload=f,this.hasDraft=n,this.storeDraft=r,this.restoreDraft=o,this.removeDraft=a,this.isEmpty=c}); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/code/plugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * plugin.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /*global tinymce:true */ 12 | 13 | tinymce.PluginManager.add('code', function(editor) { 14 | function showDialog() { 15 | editor.windowManager.open({ 16 | title: "Source code", 17 | body: { 18 | type: 'textbox', 19 | name: 'code', 20 | multiline: true, 21 | minWidth: editor.getParam("code_dialog_width", 600), 22 | minHeight: editor.getParam("code_dialog_height", Math.min(tinymce.DOM.getViewPort().h - 200, 500)), 23 | value: editor.getContent({source_view: true}), 24 | spellcheck: false, 25 | style: 'direction: ltr; text-align: left' 26 | }, 27 | onSubmit: function(e) { 28 | // We get a lovely "Wrong document" error in IE 11 if we 29 | // don't move the focus to the editor before creating an undo 30 | // transation since it tries to make a bookmark for the current selection 31 | editor.focus(); 32 | 33 | editor.undoManager.transact(function() { 34 | editor.setContent(e.data.code); 35 | }); 36 | 37 | editor.selection.setCursorLocation(); 38 | editor.nodeChanged(); 39 | } 40 | }); 41 | } 42 | 43 | editor.addCommand("mceCodeEditor", showDialog); 44 | 45 | editor.addButton('code', { 46 | icon: 'code', 47 | tooltip: 'Source code', 48 | onclick: showDialog 49 | }); 50 | 51 | editor.addMenuItem('code', { 52 | icon: 'code', 53 | text: 'Source code', 54 | context: 'tools', 55 | onclick: showDialog 56 | }); 57 | }); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/code/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("code",function(e){function o(){e.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:e.getParam("code_dialog_width",600),minHeight:e.getParam("code_dialog_height",Math.min(tinymce.DOM.getViewPort().h-200,500)),value:e.getContent({source_view:!0}),spellcheck:!1,style:"direction: ltr; text-align: left"},onSubmit:function(o){e.focus(),e.undoManager.transact(function(){e.setContent(o.data.code)}),e.selection.setCursorLocation(),e.nodeChanged()}})}e.addCommand("mceCodeEditor",o),e.addButton("code",{icon:"code",tooltip:"Source code",onclick:o}),e.addMenuItem("code",{icon:"code",text:"Source code",context:"tools",onclick:o})}); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/compat3x/img/buttons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/plugins/compat3x/img/buttons.png -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/compat3x/img/icons.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/plugins/compat3x/img/icons.gif -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/compat3x/img/items.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/plugins/compat3x/img/items.gif -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/compat3x/img/menu_arrow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/plugins/compat3x/img/menu_arrow.gif -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/compat3x/img/menu_check.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/plugins/compat3x/img/menu_check.gif -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/compat3x/img/progress.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/plugins/compat3x/img/progress.gif -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/compat3x/img/tabs.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/plugins/compat3x/img/tabs.gif -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/compat3x/utils/editable_selects.js: -------------------------------------------------------------------------------- 1 | /** 2 | * editable_selects.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | var TinyMCE_EditableSelects = { 12 | editSelectElm : null, 13 | 14 | init : function() { 15 | var nl = document.getElementsByTagName("select"), i, d = document, o; 16 | 17 | for (i=0; i'; 35 | }); 36 | 37 | emoticonsHtml += ''; 38 | }); 39 | 40 | emoticonsHtml += ''; 41 | 42 | return emoticonsHtml; 43 | } 44 | 45 | editor.addButton('emoticons', { 46 | type: 'panelbutton', 47 | panel: { 48 | role: 'application', 49 | autohide: true, 50 | html: getHtml, 51 | onclick: function(e) { 52 | var linkElm = editor.dom.getParent(e.target, 'a'); 53 | 54 | if (linkElm) { 55 | editor.insertContent( 56 | '' + linkElm.getAttribute('data-mce-alt') + '' 57 | ); 58 | 59 | this.hide(); 60 | } 61 | } 62 | }, 63 | tooltip: 'Emoticons' 64 | }); 65 | }); 66 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/emoticons/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("emoticons",function(t,e){function a(){var t;return t='',tinymce.each(i,function(a){t+="",tinymce.each(a,function(a){var i=e+"/img/smiley-"+a+".gif";t+=''}),t+=""}),t+="
"}var i=[["cool","cry","embarassed","foot-in-mouth"],["frown","innocent","kiss","laughing"],["money-mouth","sealed","smile","surprised"],["tongue-out","undecided","wink","yell"]];t.addButton("emoticons",{type:"panelbutton",panel:{role:"application",autohide:!0,html:a,onclick:function(e){var a=t.dom.getParent(e.target,"a");a&&(t.insertContent(''+a.getAttribute('),this.hide())}},tooltip:"Emoticons"})}); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/example/dialog.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |

Custom dialog

5 | Input some text: 6 | 7 | 8 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/example/plugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * plugin.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /*jshint unused:false */ 12 | /*global tinymce:true */ 13 | 14 | /** 15 | * Example plugin that adds a toolbar button and menu item. 16 | */ 17 | tinymce.PluginManager.add('example', function(editor, url) { 18 | // Add a button that opens a window 19 | editor.addButton('example', { 20 | text: 'My button', 21 | icon: false, 22 | onclick: function() { 23 | // Open window 24 | editor.windowManager.open({ 25 | title: 'Example plugin', 26 | body: [ 27 | {type: 'textbox', name: 'title', label: 'Title'} 28 | ], 29 | onsubmit: function(e) { 30 | // Insert content when the window form is submitted 31 | editor.insertContent('Title: ' + e.data.title); 32 | } 33 | }); 34 | } 35 | }); 36 | 37 | // Adds a menu item to the tools menu 38 | editor.addMenuItem('example', { 39 | text: 'Example plugin', 40 | context: 'tools', 41 | onclick: function() { 42 | // Open window with a specific url 43 | editor.windowManager.open({ 44 | title: 'TinyMCE site', 45 | url: url + '/dialog.html', 46 | width: 600, 47 | height: 400, 48 | buttons: [ 49 | { 50 | text: 'Insert', 51 | onclick: function() { 52 | // Top most window object 53 | var win = editor.windowManager.getWindows()[0]; 54 | 55 | // Insert the contents of the dialog.html textarea into the editor 56 | editor.insertContent(win.getContentWindow().document.getElementById('content').value); 57 | 58 | // Close the window 59 | win.close(); 60 | } 61 | }, 62 | 63 | {text: 'Close', onclick: 'close'} 64 | ] 65 | }); 66 | } 67 | }); 68 | }); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/example/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("example",function(t,e){t.addButton("example",{text:"My button",icon:!1,onclick:function(){t.windowManager.open({title:"Example plugin",body:[{type:"textbox",name:"title",label:"Title"}],onsubmit:function(e){t.insertContent("Title: "+e.data.title)}})}}),t.addMenuItem("example",{text:"Example plugin",context:"tools",onclick:function(){t.windowManager.open({title:"TinyMCE site",url:e+"/dialog.html",width:600,height:400,buttons:[{text:"Insert",onclick:function(){var e=t.windowManager.getWindows()[0];t.insertContent(e.getContentWindow().document.getElementById("content").value),e.close()}},{text:"Close",onclick:"close"}]})}})}); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/example_dependency/plugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * plugin.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /*jshint unused:false */ 12 | /*global tinymce:true */ 13 | 14 | /** 15 | * Register the plugin, specifying the list of the plugins that this plugin depends on. They are specified in a list, 16 | * with the list loaded in order. plugins in this list will be initialised when this plugin is initialized. (before the 17 | * init method is called). plugins in a depends list should typically be specified using the short name). If necessary 18 | * this can be done with an object which has the url to the plugin and the shortname. 19 | */ 20 | tinymce.PluginManager.add('example_dependency', function() { 21 | // Example logic here 22 | }, ['example']); 23 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/example_dependency/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("example_dependency",function(){},["example"]); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/fullscreen/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("fullscreen",function(e){function t(){var e,t,n=window,i=document,l=i.body;return l.offsetWidth&&(e=l.offsetWidth,t=l.offsetHeight),n.innerWidth&&n.innerHeight&&(e=n.innerWidth,t=n.innerHeight),{w:e,h:t}}function n(){function n(){d.setStyle(a,"height",t().h-(h.clientHeight-a.clientHeight))}var u,h,a,f,m=document.body,g=document.documentElement;s=!s,h=e.getContainer(),u=h.style,a=e.getContentAreaContainer().firstChild,f=a.style,s?(i=f.width,l=f.height,f.width=f.height="100%",c=u.width,o=u.height,u.width=u.height="",d.addClass(m,"mce-fullscreen"),d.addClass(g,"mce-fullscreen"),d.addClass(h,"mce-fullscreen"),d.bind(window,"resize",n),n(),r=n):(f.width=i,f.height=l,c&&(u.width=c),o&&(u.height=o),d.removeClass(m,"mce-fullscreen"),d.removeClass(g,"mce-fullscreen"),d.removeClass(h,"mce-fullscreen"),d.unbind(window,"resize",r)),e.fire("FullscreenStateChanged",{state:s})}var i,l,r,c,o,s=!1,d=tinymce.DOM;return e.settings.inline?void 0:(e.on("init",function(){e.addShortcut("Ctrl+Alt+F","",n)}),e.on("remove",function(){r&&d.unbind(window,"resize",r)}),e.addCommand("mceFullScreen",n),e.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Alt+F",selectable:!0,onClick:n,onPostRender:function(){var t=this;e.on("FullscreenStateChanged",function(e){t.active(e.state)})},context:"view"}),e.addButton("fullscreen",{tooltip:"Fullscreen",shortcut:"Ctrl+Alt+F",onClick:n,onPostRender:function(){var t=this;e.on("FullscreenStateChanged",function(e){t.active(e.state)})}}),{isFullscreen:function(){return s}})}); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/hr/plugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * plugin.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /*global tinymce:true */ 12 | 13 | tinymce.PluginManager.add('hr', function(editor) { 14 | editor.addCommand('InsertHorizontalRule', function() { 15 | editor.execCommand('mceInsertContent', false, '
'); 16 | }); 17 | 18 | editor.addButton('hr', { 19 | icon: 'hr', 20 | tooltip: 'Horizontal line', 21 | cmd: 'InsertHorizontalRule' 22 | }); 23 | 24 | editor.addMenuItem('hr', { 25 | icon: 'hr', 26 | text: 'Horizontal line', 27 | cmd: 'InsertHorizontalRule', 28 | context: 'insert' 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/hr/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("hr",function(n){n.addCommand("InsertHorizontalRule",function(){n.execCommand("mceInsertContent",!1,"
")}),n.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),n.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})}); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/importcss/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("importcss",function(t){function e(t){return"string"==typeof t?function(e){return-1!==e.indexOf(t)}:t instanceof RegExp?function(e){return t.test(e)}:t}function n(e,n){function i(t,e){var c,o=t.href;if(o&&n(o,e)){s(t.imports,function(t){i(t,!0)});try{c=t.cssRules||t.rules}catch(a){}s(c,function(t){t.styleSheet?i(t.styleSheet,!0):t.selectorText&&s(t.selectorText.split(","),function(t){r.push(tinymce.trim(t))})})}}var r=[],c={};s(t.contentCSS,function(t){c[t]=!0}),n||(n=function(t,e){return e||c[t]});try{s(e.styleSheets,function(t){i(t)})}catch(o){}return r}function i(e){var n,i=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(e);if(i){var r=i[1],s=i[2].substr(1).split(".").join(" "),c=tinymce.makeMap("a,img");return i[1]?(n={title:e},t.schema.getTextBlockElements()[r]?n.block=r:t.schema.getBlockElements()[r]||c[r.toLowerCase()]?n.selector=r:n.inline=r):i[2]&&(n={inline:"span",title:e.substr(1),classes:s}),t.settings.importcss_merge_classes!==!1?n.classes=s:n.attributes={"class":s},n}}var r=this,s=tinymce.each;t.on("renderFormatsMenu",function(c){var o=t.settings,a={},l=o.importcss_selector_converter||i,f=e(o.importcss_selector_filter),m=c.control;t.settings.importcss_append||m.items().remove();var u=[];tinymce.each(o.importcss_groups,function(t){t=tinymce.extend({},t),t.filter=e(t.filter),u.push(t)}),s(n(c.doc||t.getDoc(),e(o.importcss_file_filter)),function(e){if(-1===e.indexOf(".mce-")&&!a[e]&&(!f||f(e))){var n,i=l.call(r,e);if(i){var s=i.name||tinymce.DOM.uniqueId();if(u)for(var c=0;c'+n+"";var i=e.dom.getParent(e.selection.getStart(),"time");if(i)return void e.dom.setOuterHTML(i,n)}e.insertContent(n)}var n,r,i="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),d="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),c="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),m="January February March April May June July August September October November December".split(" "),u=[];e.addCommand("mceInsertDate",function(){a(e.getParam("insertdatetime_dateformat",e.translate("%Y-%m-%d")))}),e.addCommand("mceInsertTime",function(){a(e.getParam("insertdatetime_timeformat",e.translate("%H:%M:%S")))}),e.addButton("insertdatetime",{type:"splitbutton",title:"Insert date/time",onclick:function(){a(n||r)},menu:u}),tinymce.each(e.settings.insertdatetime_formats||["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"],function(e){r||(r=e),u.push({text:t(e),onclick:function(){n=e,a(e)}})}),e.addMenuItem("insertdatetime",{icon:"date",text:"Insert date/time",menu:u,context:"insert"})}); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/legacyoutput/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(e){e.on("AddEditor",function(e){e.editor.settings.inline_styles=!1}),e.PluginManager.add("legacyoutput",function(t){t.on("init",function(){var i="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",n=e.explode(t.settings.font_size_style_values),l=t.schema;t.formatter.register({alignleft:{selector:i,attributes:{align:"left"}},aligncenter:{selector:i,attributes:{align:"center"}},alignright:{selector:i,attributes:{align:"right"}},alignjustify:{selector:i,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:!0}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:!0}],fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(t){return e.inArray(n,t.value)+1}}},forecolor:{inline:"font",attributes:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}}),e.each("b,i,u,strike".split(","),function(e){l.addValidElements(e+"[*]")}),l.getElementRule("font")||l.addValidElements("font[face|size|color|style]"),e.each(i.split(","),function(e){var t=l.getElementRule(e);t&&(t.attributes.align||(t.attributes.align={},t.attributesOrder.push("align")))})})})}(tinymce); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/media/moxieplayer.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/plugins/media/moxieplayer.swf -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/nonbreaking/plugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * plugin.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /*global tinymce:true */ 12 | 13 | tinymce.PluginManager.add('nonbreaking', function(editor) { 14 | var setting = editor.getParam('nonbreaking_force_tab'); 15 | 16 | editor.addCommand('mceNonBreaking', function() { 17 | editor.insertContent( 18 | (editor.plugins.visualchars && editor.plugins.visualchars.state) ? 19 | ' ' : ' ' 20 | ); 21 | 22 | editor.dom.setAttrib(editor.dom.select('span.mce-nbsp'), 'data-mce-bogus', '1'); 23 | }); 24 | 25 | editor.addButton('nonbreaking', { 26 | title: 'Insert nonbreaking space', 27 | cmd: 'mceNonBreaking' 28 | }); 29 | 30 | editor.addMenuItem('nonbreaking', { 31 | text: 'Nonbreaking space', 32 | cmd: 'mceNonBreaking', 33 | context: 'insert' 34 | }); 35 | 36 | if (setting) { 37 | var spaces = +setting > 1 ? +setting : 3; // defaults to 3 spaces if setting is true (or 1) 38 | 39 | editor.on('keydown', function(e) { 40 | if (e.keyCode == 9) { 41 | 42 | if (e.shiftKey) { 43 | return; 44 | } 45 | 46 | e.preventDefault(); 47 | for (var i = 0; i < spaces; i++) { 48 | editor.execCommand('mceNonBreaking'); 49 | } 50 | } 51 | }); 52 | } 53 | }); 54 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/nonbreaking/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("nonbreaking",function(n){var e=n.getParam("nonbreaking_force_tab");if(n.addCommand("mceNonBreaking",function(){n.insertContent(n.plugins.visualchars&&n.plugins.visualchars.state?' ':" "),n.dom.setAttrib(n.dom.select("span.mce-nbsp"),"data-mce-bogus","1")}),n.addButton("nonbreaking",{title:"Insert nonbreaking space",cmd:"mceNonBreaking"}),n.addMenuItem("nonbreaking",{text:"Nonbreaking space",cmd:"mceNonBreaking",context:"insert"}),e){var a=+e>1?+e:3;n.on("keydown",function(e){if(9==e.keyCode){if(e.shiftKey)return;e.preventDefault();for(var t=0;a>t;t++)n.execCommand("mceNonBreaking")}})}}); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/pagebreak/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("pagebreak",function(e){var a="mce-pagebreak",t=e.getParam("pagebreak_separator",""),n=new RegExp(t.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(e){return"\\"+e}),"gi"),r='';e.addCommand("mcePageBreak",function(){e.insertContent(e.settings.pagebreak_split_block?"

"+r+"

":r)}),e.addButton("pagebreak",{title:"Page break",cmd:"mcePageBreak"}),e.addMenuItem("pagebreak",{text:"Page break",icon:"pagebreak",cmd:"mcePageBreak",context:"insert"}),e.on("ResolveName",function(t){"IMG"==t.target.nodeName&&e.dom.hasClass(t.target,a)&&(t.name="pagebreak")}),e.on("click",function(t){t=t.target,"IMG"===t.nodeName&&e.dom.hasClass(t,a)&&e.selection.select(t)}),e.on("BeforeSetContent",function(e){e.content=e.content.replace(n,r)}),e.on("PreInit",function(){e.serializer.addNodeFilter("img",function(a){for(var n,r,c=a.length;c--;)if(n=a[c],r=n.attr("class"),r&&-1!==r.indexOf("mce-pagebreak")){var o=n.parent;if(e.schema.getBlockElements()[o.name]&&e.settings.pagebreak_split_block){o.type=3,o.value=t,o.raw=!0,n.remove();continue}n.type=3,n.value=t,n.raw=!0}})})}); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/preview/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("preview",function(e){var t=e.settings,i=!tinymce.Env.ie;e.addCommand("mcePreview",function(){e.windowManager.open({title:"Preview",width:parseInt(e.getParam("plugin_preview_width","650"),10),height:parseInt(e.getParam("plugin_preview_height","500"),10),html:'",buttons:{text:"Close",onclick:function(){this.parent().parent().close()}},onPostRender:function(){var n,a="";a+='',tinymce.each(e.contentCSS,function(t){a+=''});var r=t.body_id||"tinymce";-1!=r.indexOf("=")&&(r=e.getParam("body_id","","hash"),r=r[e.id]||r);var d=t.body_class||"";-1!=d.indexOf("=")&&(d=e.getParam("body_class","","hash"),d=d[e.id]||"");var o=e.settings.directionality?' dir="'+e.settings.directionality+'"':"";if(n=""+a+'"+e.getContent()+"",i)this.getEl("body").firstChild.src="data:text/html;charset=utf-8,"+encodeURIComponent(n);else{var s=this.getEl("body").firstChild.contentWindow.document;s.open(),s.write(n),s.close()}}})}),e.addButton("preview",{title:"Preview",cmd:"mcePreview"}),e.addMenuItem("preview",{text:"Preview",cmd:"mcePreview",context:"view"})}); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/print/plugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * plugin.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /*global tinymce:true */ 12 | 13 | tinymce.PluginManager.add('print', function(editor) { 14 | editor.addCommand('mcePrint', function() { 15 | editor.getWin().print(); 16 | }); 17 | 18 | editor.addButton('print', { 19 | title: 'Print', 20 | cmd: 'mcePrint' 21 | }); 22 | 23 | editor.addShortcut('Ctrl+P', '', 'mcePrint'); 24 | 25 | editor.addMenuItem('print', { 26 | text: 'Print', 27 | cmd: 'mcePrint', 28 | icon: 'print', 29 | shortcut: 'Ctrl+P', 30 | context: 'file' 31 | }); 32 | }); 33 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/print/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("print",function(t){t.addCommand("mcePrint",function(){t.getWin().print()}),t.addButton("print",{title:"Print",cmd:"mcePrint"}),t.addShortcut("Ctrl+P","","mcePrint"),t.addMenuItem("print",{text:"Print",cmd:"mcePrint",icon:"print",shortcut:"Ctrl+P",context:"file"})}); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/save/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("save",function(e){function a(){var a;return a=tinymce.DOM.getParent(e.id,"form"),!e.getParam("save_enablewhendirty",!0)||e.isDirty()?(tinymce.triggerSave(),e.getParam("save_onsavecallback")?void(e.execCallback("save_onsavecallback",e)&&(e.startContent=tinymce.trim(e.getContent({format:"raw"})),e.nodeChanged())):void(a?(e.isNotDirty=!0,(!a.onsubmit||a.onsubmit())&&("function"==typeof a.submit?a.submit():e.windowManager.alert("Error: Form submit field collision.")),e.nodeChanged()):e.windowManager.alert("Error: No form element found."))):void 0}function n(){var a=tinymce.trim(e.startContent);return e.getParam("save_oncancelcallback")?void e.execCallback("save_oncancelcallback",e):(e.setContent(a),e.undoManager.clear(),void e.nodeChanged())}function t(){var a=this;e.on("nodeChange",function(){a.disabled(e.getParam("save_enablewhendirty",!0)&&!e.isDirty())})}e.addCommand("mceSave",a),e.addCommand("mceCancel",n),e.addButton("save",{icon:"save",text:"Save",cmd:"mceSave",disabled:!0,onPostRender:t}),e.addButton("cancel",{text:"Cancel",icon:!1,cmd:"mceCancel",disabled:!0,onPostRender:t}),e.addShortcut("ctrl+s","","mceSave")}); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/tabfocus/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("tabfocus",function(e){function n(e){9!==e.keyCode||e.ctrlKey||e.altKey||e.metaKey||e.preventDefault()}function t(n){function t(n){function t(e){return"BODY"===e.nodeName||"hidden"!=e.type&&"none"!=e.style.display&&"hidden"!=e.style.visibility&&t(e.parentNode)}function r(e){return e.tabIndex||"INPUT"==e.nodeName||"TEXTAREA"==e.nodeName}function c(e){return!r(e)&&"-1"!=e.getAttribute("tabindex")&&t(e)}if(u=i.select(":input:enabled,*[tabindex]:not(iframe)"),o(u,function(n,t){return n.id==e.id?(a=t,!1):void 0}),n>0){for(d=a+1;d=0;d--)if(c(u[d]))return u[d];return null}var a,u,c,d;if(!(9!==n.keyCode||n.ctrlKey||n.altKey||n.metaKey)&&(c=r(e.getParam("tab_focus",e.getParam("tabfocus_elements",":prev,:next"))),1==c.length&&(c[1]=c[0],c[0]=":prev"),u=n.shiftKey?":prev"==c[0]?t(-1):i.get(c[0]):":next"==c[1]?t(1):i.get(c[1]))){var y=tinymce.get(u.id||u.name);u.id&&y?y.focus():window.setTimeout(function(){tinymce.Env.webkit||window.focus(),u.focus()},10),n.preventDefault()}}var i=tinymce.DOM,o=tinymce.each,r=tinymce.explode;e.on("init",function(){e.inline&&tinymce.DOM.setAttrib(e.getBody(),"tabIndex",null)}),e.on("keyup",n),tinymce.Env.gecko?e.on("keypress keydown",t):e.on("keydown",t)}); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/textcolor/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("textcolor",function(e){function t(){var t,o,l=[];for(o=e.settings.textcolor_map||["000000","Black","993300","Burnt orange","333300","Dark olive","003300","Dark green","003366","Dark azure","000080","Navy Blue","333399","Indigo","333333","Very dark gray","800000","Maroon","FF6600","Orange","808000","Olive","008000","Green","008080","Teal","0000FF","Blue","666699","Grayish blue","808080","Gray","FF0000","Red","FF9900","Amber","99CC00","Yellow green","339966","Sea green","33CCCC","Turquoise","3366FF","Royal blue","800080","Purple","999999","Medium gray","FF00FF","Magenta","FFCC00","Gold","FFFF00","Yellow","00FF00","Lime","00FFFF","Aqua","00CCFF","Sky blue","993366","Red violet","C0C0C0","Silver","FF99CC","Pink","FFCC99","Peach","FFFF99","Light yellow","CCFFCC","Pale green","CCFFFF","Pale cyan","99CCFF","Light sky blue","CC99FF","Plum","FFFFFF","White"],t=0;t',a=o.length-1,c=e.settings.textcolor_rows||5,i=e.settings.textcolor_cols||8,F=0;c>F;F++){for(r+="",n=0;i>n;n++)d=F*i+n,d>a?r+="":(l=o[d],r+='
');r+=""}return r+=""}function l(t){var o,l=this.parent();(o=t.target.getAttribute("data-mce-color"))&&(this.lastId&&document.getElementById(this.lastId).setAttribute("aria-selected",!1),t.target.setAttribute("aria-selected",!0),this.lastId=t.target.id,l.hidePanel(),o="#"+o,l.color(o),e.execCommand(l.settings.selectcmd,!1,o))}function r(){var t=this;t._color&&e.execCommand(t.settings.selectcmd,!1,t._color)}e.addButton("forecolor",{type:"colorbutton",tooltip:"Text color",selectcmd:"ForeColor",panel:{role:"application",ariaRemember:!0,html:o,onclick:l},onclick:r}),e.addButton("backcolor",{type:"colorbutton",tooltip:"Background color",selectcmd:"HiliteColor",panel:{role:"application",ariaRemember:!0,html:o,onclick:l},onclick:r})}); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/visualblocks/img/address.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/plugins/visualblocks/img/address.gif -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/visualblocks/img/article.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/plugins/visualblocks/img/article.gif -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/visualblocks/img/aside.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/plugins/visualblocks/img/aside.gif -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/visualblocks/img/blockquote.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/plugins/visualblocks/img/blockquote.gif -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/visualblocks/img/div.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/plugins/visualblocks/img/div.gif -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/visualblocks/img/dl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/plugins/visualblocks/img/dl.gif -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/visualblocks/img/figure.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/plugins/visualblocks/img/figure.gif -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/visualblocks/img/h1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/plugins/visualblocks/img/h1.gif -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/visualblocks/img/h2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/plugins/visualblocks/img/h2.gif -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/visualblocks/img/h3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/plugins/visualblocks/img/h3.gif -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/visualblocks/img/h4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/plugins/visualblocks/img/h4.gif -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/visualblocks/img/h5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/plugins/visualblocks/img/h5.gif -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/visualblocks/img/h6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/plugins/visualblocks/img/h6.gif -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/visualblocks/img/hgroup.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/plugins/visualblocks/img/hgroup.gif -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/visualblocks/img/ol.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/plugins/visualblocks/img/ol.gif -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/visualblocks/img/p.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/plugins/visualblocks/img/p.gif -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/visualblocks/img/pre.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/plugins/visualblocks/img/pre.gif -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/visualblocks/img/section.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/plugins/visualblocks/img/section.gif -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/visualblocks/img/ul.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/plugins/visualblocks/img/ul.gif -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/visualblocks/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("visualblocks",function(e,s){function o(){var s=this;s.active(a),e.on("VisualBlocks",function(){s.active(e.dom.hasClass(e.getBody(),"mce-visualblocks"))})}var l,t,a;window.NodeList&&(e.addCommand("mceVisualBlocks",function(){var o,c=e.dom;l||(l=c.uniqueId(),o=c.create("link",{id:l,rel:"stylesheet",href:s+"/css/visualblocks.css"}),e.getDoc().getElementsByTagName("head")[0].appendChild(o)),e.on("PreviewFormats AfterPreviewFormats",function(s){a&&c.toggleClass(e.getBody(),"mce-visualblocks","afterpreviewformats"==s.type)}),c.toggleClass(e.getBody(),"mce-visualblocks"),a=e.dom.hasClass(e.getBody(),"mce-visualblocks"),t&&t.active(c.hasClass(e.getBody(),"mce-visualblocks")),e.fire("VisualBlocks")}),e.addButton("visualblocks",{title:"Show blocks",cmd:"mceVisualBlocks",onPostRender:o}),e.addMenuItem("visualblocks",{text:"Show blocks",cmd:"mceVisualBlocks",onPostRender:o,selectable:!0,context:"view",prependToContext:!0}),e.on("init",function(){e.settings.visualblocks_default_state&&e.execCommand("mceVisualBlocks",!1,null,{skip_focus:!0})}),e.on("remove",function(){e.dom.removeClass(e.getBody(),"mce-visualblocks")}))}); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/visualchars/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("visualchars",function(e){function a(a){var t,s,i,r,c,d,l=e.getBody(),m=e.selection;if(n=!n,o.state=n,e.fire("VisualChars",{state:n}),a&&(d=m.getBookmark()),n)for(s=[],tinymce.walk(l,function(e){3==e.nodeType&&e.nodeValue&&-1!=e.nodeValue.indexOf(" ")&&s.push(e)},"childNodes"),i=0;i$1'),c=e.dom.create("div",null,r);t=c.lastChild;)e.dom.insertAfter(t,s[i]);e.dom.remove(s[i])}else for(s=e.dom.select("span.mce-nbsp",l),i=s.length-1;i>=0;i--)e.dom.remove(s[i],1);m.moveToBookmark(d)}function t(){var a=this;e.on("VisualChars",function(e){a.active(e.state)})}var n,o=this;e.addCommand("mceVisualChars",a),e.addButton("visualchars",{title:"Show invisible characters",cmd:"mceVisualChars",onPostRender:t}),e.addMenuItem("visualchars",{text:"Show invisible characters",cmd:"mceVisualChars",onPostRender:t,selectable:!0,context:"view",prependToContext:!0}),e.on("beforegetcontent",function(e){n&&"raw"!=e.format&&!e.draft&&(n=!0,a(!1))})}); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/wordcount/plugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * plugin.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /*global tinymce:true */ 12 | 13 | tinymce.PluginManager.add('wordcount', function(editor) { 14 | var self = this, countre, cleanre; 15 | 16 | // Included most unicode blocks see: http://en.wikipedia.org/wiki/Unicode_block 17 | // Latin-1_Supplement letters, a-z, u2019 == ’ 18 | countre = editor.getParam('wordcount_countregex', /[\w\u2019\x27\-\u00C0-\u1FFF]+/g); 19 | cleanre = editor.getParam('wordcount_cleanregex', /[0-9.(),;:!?%#$?\x27\x22_+=\\\/\-]*/g); 20 | 21 | function update() { 22 | editor.theme.panel.find('#wordcount').text(['Words: {0}', self.getCount()]); 23 | } 24 | 25 | editor.on('init', function() { 26 | var statusbar = editor.theme.panel && editor.theme.panel.find('#statusbar')[0]; 27 | 28 | if (statusbar) { 29 | window.setTimeout(function() { 30 | statusbar.insert({ 31 | type: 'label', 32 | name: 'wordcount', 33 | text: ['Words: {0}', self.getCount()], 34 | classes: 'wordcount', 35 | disabled: editor.settings.readonly 36 | }, 0); 37 | 38 | editor.on('setcontent beforeaddundo', update); 39 | 40 | editor.on('keyup', function(e) { 41 | if (e.keyCode == 32) { 42 | update(); 43 | } 44 | }); 45 | }, 0); 46 | } 47 | }); 48 | 49 | self.getCount = function() { 50 | var tx = editor.getContent({format: 'raw'}); 51 | var tc = 0; 52 | 53 | if (tx) { 54 | tx = tx.replace(/\.\.\./g, ' '); // convert ellipses to spaces 55 | tx = tx.replace(/<.[^<>]*?>/g, ' ').replace(/ | /gi, ' '); // remove html tags and space chars 56 | 57 | // deal with html entities 58 | tx = tx.replace(/(\w+)(&#?[a-z0-9]+;)+(\w+)/i, "$1$3").replace(/&.+?;/g, ' '); 59 | tx = tx.replace(cleanre, ''); // remove numbers and punctuation 60 | 61 | var wordArray = tx.match(countre); 62 | if (wordArray) { 63 | tc = wordArray.length; 64 | } 65 | } 66 | 67 | return tc; 68 | }; 69 | }); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/plugins/wordcount/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("wordcount",function(e){function t(){e.theme.panel.find("#wordcount").text(["Words: {0}",a.getCount()])}var n,o,a=this;n=e.getParam("wordcount_countregex",/[\w\u2019\x27\-\u00C0-\u1FFF]+/g),o=e.getParam("wordcount_cleanregex",/[0-9.(),;:!?%#$?\x27\x22_+=\\\/\-]*/g),e.on("init",function(){var n=e.theme.panel&&e.theme.panel.find("#statusbar")[0];n&&window.setTimeout(function(){n.insert({type:"label",name:"wordcount",text:["Words: {0}",a.getCount()],classes:"wordcount",disabled:e.settings.readonly},0),e.on("setcontent beforeaddundo",t),e.on("keyup",function(e){32==e.keyCode&&t()})},0)}),a.getCount=function(){var t=e.getContent({format:"raw"}),a=0;if(t){t=t.replace(/\.\.\./g," "),t=t.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," "),t=t.replace(/(\w+)(&#?[a-z0-9]+;)+(\w+)/i,"$1$3").replace(/&.+?;/g," "),t=t.replace(o,"");var r=t.match(n);r&&(a=r.length)}return a}}); -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/AbsoluteLayout.less: -------------------------------------------------------------------------------- 1 | // AbsoluteLayout 2 | 3 | .@{prefix}-abs-layout { 4 | position: relative; 5 | } 6 | 7 | body .@{prefix}-abs-layout-item, .@{prefix}-abs-end { 8 | position: absolute; 9 | } 10 | 11 | .@{prefix}-abs-end { 12 | width: 1px; height: 1px; 13 | } 14 | 15 | .@{prefix}-container-body.@{prefix}-abs-layout { 16 | overflow: hidden; 17 | } 18 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/Animations.less: -------------------------------------------------------------------------------- 1 | // Animations 2 | 3 | .@{prefix}-fade { 4 | opacity: 0; 5 | .transition(opacity .15s linear); 6 | 7 | &.@{prefix}-in { 8 | opacity: 1; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/ButtonGroup.less: -------------------------------------------------------------------------------- 1 | // ButtonGroup 2 | 3 | .@{prefix}-btn-group .@{prefix}-btn { 4 | border-width: 1px 0 1px 0; 5 | margin: 0; 6 | .border-radius(0); 7 | } 8 | 9 | .@{prefix}-btn-group .@{prefix}-first { 10 | border-left: 1px solid mix(rgb(red(@btn-border-left), green(@btn-border-left), blue(@btn-border-left)), @panel-bg, 30%); 11 | border-left: 1px solid @btn-border-left; 12 | .border-radius(3px 0 0 3px); 13 | } 14 | 15 | .@{prefix}-btn-group .@{prefix}-last { 16 | border-right: 1px solid mix(rgb(red(@btn-border-right), green(@btn-border-right), blue(@btn-border-right)), @panel-bg, 30%); 17 | border-right: 1px solid @btn-border-right; 18 | .border-radius(0 3px 3px 0); 19 | } 20 | 21 | .@{prefix}-btn-group .@{prefix}-first.@{prefix}-last { 22 | .border-radius(3px); 23 | } 24 | 25 | .@{prefix}-btn-group .@{prefix}-btn.@{prefix}-flow-layout-item { 26 | margin: 0; 27 | } 28 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/Checkbox.less: -------------------------------------------------------------------------------- 1 | // Checkbox 2 | 3 | .@{prefix}-checkbox { 4 | cursor: pointer; 5 | } 6 | 7 | i.@{prefix}-i-checkbox { 8 | margin: 0 3px 0 0; 9 | border: 1px solid @checkbox-border; 10 | .border-radius(3px); 11 | .box-shadow(@checkbox-box-shadow); 12 | .vertical-gradient(@checkbox-bg, @checkbox-bg-hlight); 13 | text-indent: -10em; 14 | *font-size: 0; 15 | *line-height: 0; 16 | *text-indent: 0; 17 | overflow: hidden; 18 | } 19 | 20 | .@{prefix}-checked i.@{prefix}-i-checkbox { 21 | color: @btn-text; 22 | font-size: 16px; 23 | line-height: 16px; 24 | text-indent: 0; 25 | } 26 | 27 | .@{prefix}-checkbox:focus i.@{prefix}-i-checkbox, .@{prefix}-checkbox.@{prefix}-focus i.@{prefix}-i-checkbox { 28 | border: 1px solid @checkbox-border-focus; 29 | .box-shadow(inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px fadeout(@checkbox-border-focus, 15%)); 30 | } 31 | 32 | .@{prefix}-checkbox.@{prefix}-disabled .@{prefix}-label, .@{prefix}-checkbox.@{prefix}-disabled i.@{prefix}-i-checkbox { 33 | color: mix(@text, @panel-bg, 40%); 34 | } 35 | 36 | // RTL 37 | 38 | .@{prefix}-rtl .@{prefix}-checkbox { 39 | direction: rtl; 40 | text-align: right; 41 | } 42 | 43 | .@{prefix}-rtl i.@{prefix}-i-checkbox { 44 | margin: 0 0 0 3px; 45 | } 46 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/ColorButton.less: -------------------------------------------------------------------------------- 1 | // ColorButton 2 | 3 | .@{prefix}-colorbutton .@{prefix}-ico { 4 | position: relative; 5 | } 6 | 7 | .@{prefix}-colorbutton-grid { 8 | margin: 4px; 9 | } 10 | 11 | .@{prefix}-colorbutton button { 12 | padding-right: 4px; 13 | } 14 | 15 | .@{prefix}-colorbutton .@{prefix}-preview { 16 | padding-right: 3px; 17 | display: block; 18 | position: absolute; 19 | left: 50%; 20 | top: 50%; 21 | margin-left: -14px; 22 | margin-top: 7px; 23 | background: gray; 24 | width: 13px; 25 | height: 2px; 26 | overflow: hidden; 27 | } 28 | 29 | .@{prefix}-colorbutton.@{prefix}-btn-small .@{prefix}-preview { 30 | margin-left: -16px; 31 | padding-right: 0; 32 | width: 16px; 33 | } 34 | 35 | .@{prefix}-colorbutton .@{prefix}-open { 36 | padding-left: 4px; 37 | border-left: 1px solid transparent; 38 | border-right: 1px solid transparent; 39 | } 40 | 41 | .@{prefix}-colorbutton:hover .@{prefix}-open { 42 | border-left-color: @btn-split-border; 43 | border-right-color: @btn-split-border; 44 | } 45 | 46 | .@{prefix}-colorbutton.@{prefix}-btn-small .@{prefix}-open { 47 | padding: 0 3px 0 3px; 48 | } 49 | 50 | // RTL 51 | 52 | .@{prefix}-rtl .@{prefix}-colorbutton { 53 | direction: rtl; 54 | } 55 | 56 | .@{prefix}-rtl .@{prefix}-colorbutton .@{prefix}-preview { 57 | margin-left: 0; 58 | padding-right: 0; 59 | padding-left: 4px; 60 | margin-right: -14px; 61 | } 62 | 63 | .@{prefix}-rtl .@{prefix}-colorbutton.@{prefix}-btn-small .@{prefix}-preview { 64 | margin-left: 0; 65 | padding-right: 0; 66 | margin-right: -17px; 67 | padding-left: 0; 68 | } 69 | 70 | .@{prefix}-rtl .@{prefix}-colorbutton button { 71 | padding-right: 10px; 72 | padding-left: 10px; 73 | } 74 | 75 | .@{prefix}-rtl .@{prefix}-colorbutton .@{prefix}-open { 76 | padding-left: 4px; 77 | padding-right: 4px; 78 | } 79 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/ComboBox.less: -------------------------------------------------------------------------------- 1 | // ComboBox 2 | 3 | .@{prefix}-combobox { 4 | .inline-block(); 5 | .border-radius(3px); 6 | .box-shadow(@textbox-box-shadow); 7 | *height: 32px; 8 | } 9 | 10 | .@{prefix}-combobox input { 11 | border: 1px solid @textbox-border; 12 | border-right-color: @combobox-border; 13 | height: 28px; 14 | } 15 | 16 | .@{prefix}-combobox.@{prefix}-disabled input { 17 | color: mix(@text, @textbox-bg, 40%); 18 | } 19 | 20 | .@{prefix}-combobox.@{prefix}-has-open input { 21 | .border-radius(4px 0 0 4px); 22 | } 23 | 24 | .@{prefix}-combobox .@{prefix}-btn { 25 | border-left: 0; 26 | .border-radius(0 4px 4px 0); 27 | } 28 | 29 | .@{prefix}-combobox button { 30 | padding-right: 8px; 31 | padding-left: 8px; 32 | } 33 | 34 | .@{prefix}-combobox.@{prefix}-disabled .@{prefix}-btn button { 35 | cursor: default; 36 | .box-shadow(none); 37 | .opacity(@btn-box-disabled-opacity); 38 | } 39 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/Container.less: -------------------------------------------------------------------------------- 1 | // Container 2 | 3 | .@{prefix}-container, .@{prefix}-container-body { 4 | display: block; 5 | } 6 | 7 | .@{prefix}-autoscroll { 8 | overflow: hidden; 9 | } 10 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/Content.Inline.less: -------------------------------------------------------------------------------- 1 | /* Content.Inline.less */ 2 | 3 | @import "Content.Objects.less"; 4 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/Content.Objects.less: -------------------------------------------------------------------------------- 1 | /* Content.Objects.less */ 2 | 3 | .mce-object { 4 | border: 1px dotted #3A3A3A; 5 | background: #D5D5D5 url(img/object.gif) no-repeat center; 6 | } 7 | 8 | .mce-pagebreak { 9 | cursor: default; 10 | display: block; 11 | border: 0; 12 | width: 100%; 13 | height: 5px; 14 | border: 1px dashed #666; 15 | margin-top: 15px; 16 | page-break-before: always; 17 | } 18 | 19 | @media print { 20 | .mce-pagebreak { 21 | border: 0px; 22 | } 23 | } 24 | 25 | .mce-item-anchor { 26 | cursor: default; 27 | display: inline-block; 28 | -webkit-user-select: all; 29 | -webkit-user-modify: read-only; 30 | -moz-user-select: all; 31 | -moz-user-modify: read-only; 32 | user-select: all; 33 | user-modify: read-only; 34 | width: 9px !important; 35 | height: 9px !important; 36 | border: 1px dotted #3A3A3A; 37 | background: #D5D5D5 url(img/anchor.gif) no-repeat center; 38 | } 39 | 40 | .mce-nbsp { 41 | background: #AAA; 42 | } 43 | 44 | hr { 45 | cursor: default; 46 | } 47 | 48 | .mce-match-marker { 49 | background: #AAA; 50 | color: #fff; 51 | } 52 | 53 | .mce-match-marker-selected { 54 | background: #3399ff; 55 | color: #fff; 56 | } 57 | 58 | .mce-spellchecker-word { 59 | border-bottom: 2px solid #F00; 60 | cursor: default; 61 | } 62 | 63 | .mce-spellchecker-grammar { 64 | border-bottom: 2px solid #008000; 65 | cursor: default; 66 | } 67 | 68 | .mce-item-table, .mce-item-table td, .mce-item-table th, .mce-item-table caption { 69 | border: 1px dashed #BBB; 70 | } 71 | 72 | td.mce-item-selected, th.mce-item-selected { 73 | background-color: #3399ff !important; 74 | } 75 | 76 | .mce-edit-focus { 77 | outline: 1px dotted #333; 78 | } 79 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/Content.less: -------------------------------------------------------------------------------- 1 | /* Content.less */ 2 | 3 | @font-family: Verdana, Arial, Helvetica, sans-serif; 4 | @font-size: 11px; 5 | 6 | body { 7 | background-color: #FFFFFF; 8 | color: #000000; 9 | font-family: @font-family; 10 | font-size: @font-size; 11 | scrollbar-3dlight-color: #F0F0EE; 12 | scrollbar-arrow-color: #676662; 13 | scrollbar-base-color: #F0F0EE; 14 | scrollbar-darkshadow-color: #DDDDDD; 15 | scrollbar-face-color: #E0E0DD; 16 | scrollbar-highlight-color: #F0F0EE; 17 | scrollbar-shadow-color: #F0F0EE; 18 | scrollbar-track-color: #F5F5F5; 19 | } 20 | 21 | td, th { 22 | font-family: @font-family; 23 | font-size: @font-size; 24 | } 25 | 26 | @import "Content.Objects.less"; 27 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/FieldSet.less: -------------------------------------------------------------------------------- 1 | // FieldSet 2 | 3 | .@{prefix}-fieldset { 4 | border: 0 solid #9E9E9E; 5 | .border-radius(3px); 6 | } 7 | 8 | .@{prefix}-fieldset > .@{prefix}-container-body { 9 | margin-top: -15px; 10 | } 11 | 12 | .@{prefix}-fieldset-title { 13 | margin-left: 5px; 14 | padding: 0 5px 0 5px; 15 | } -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/FitLayout.less: -------------------------------------------------------------------------------- 1 | // FitLayout 2 | 3 | .@{prefix}-fit-layout { 4 | .inline-block(); 5 | } 6 | 7 | .@{prefix}-fit-layout-item { 8 | position: absolute; 9 | } 10 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/FloatPanel.less: -------------------------------------------------------------------------------- 1 | // FloatPanel 2 | 3 | .@{prefix}-floatpanel { 4 | position: absolute; 5 | .box-shadow(@floatpanel-box-shadow); 6 | } 7 | 8 | .@{prefix}-floatpanel.@{prefix}-fixed { 9 | position: fixed; 10 | } 11 | 12 | // Popover panel 13 | 14 | .@{prefix}-floatpanel .@{prefix}-arrow, 15 | .@{prefix}-floatpanel .@{prefix}-arrow:after { 16 | position: absolute; 17 | display: block; 18 | width: 0; 19 | height: 0; 20 | border-color: transparent; 21 | border-style: solid; 22 | } 23 | 24 | .@{prefix}-floatpanel .@{prefix}-arrow { 25 | border-width: @popover-arrow-outer-width; 26 | } 27 | 28 | .@{prefix}-floatpanel .@{prefix}-arrow:after { 29 | border-width: @popover-arrow-width; 30 | content: ""; 31 | } 32 | 33 | .@{prefix}-floatpanel.@{prefix}-popover { 34 | .reset-gradient(); 35 | .border-radius(6px); 36 | .box-shadow(@floatpanel-box-shadow); 37 | top: 0; 38 | left: 0; 39 | background: @popover-bg; 40 | border: 1px solid @panel-border; 41 | border: 1px solid @popover-arrow-outer; 42 | 43 | &.@{prefix}-bottom { 44 | margin-top: @popover-arrow-width; 45 | *margin-top: 0; 46 | 47 | & > .@{prefix}-arrow { 48 | left: 50%; 49 | margin-left: -@popover-arrow-outer-width; 50 | border-top-width: 0; 51 | border-bottom-color: @panel-border; 52 | border-bottom-color: @popover-arrow-outer; 53 | top: -@popover-arrow-outer-width; 54 | 55 | &:after { 56 | top: 1px; 57 | margin-left: -@popover-arrow-width; 58 | border-top-width: 0; 59 | border-bottom-color: @popover-arrow; 60 | } 61 | } 62 | 63 | &.@{prefix}-start { margin-left: -22px; } 64 | &.@{prefix}-start > .@{prefix}-arrow { left: 20px; } 65 | 66 | &.@{prefix}-end { margin-left: 22px; } 67 | &.@{prefix}-end > .@{prefix}-arrow { right: 10px; left: auto; } 68 | } 69 | } -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/FlowLayout.less: -------------------------------------------------------------------------------- 1 | // FlowLayout 2 | 3 | .@{prefix}-flow-layout-item { 4 | .inline-block(); 5 | } 6 | 7 | .@{prefix}-flow-layout-item { 8 | margin: 2px 0 2px 2px; 9 | } 10 | 11 | .@{prefix}-flow-layout-item.@{prefix}-last { 12 | margin-right: 2px; 13 | } 14 | 15 | .@{prefix}-flow-layout { 16 | white-space: normal; 17 | } 18 | 19 | .@{prefix}-tinymce-inline .@{prefix}-flow-layout { 20 | white-space: nowrap; 21 | } 22 | 23 | // RTL 24 | 25 | .@{prefix}-rtl .@{prefix}-flow-layout { 26 | text-align: right; 27 | direction: rtl; 28 | } 29 | 30 | .@{prefix}-rtl .@{prefix}-flow-layout-item { 31 | margin: 2px 2px 2px 0; 32 | } 33 | 34 | .@{prefix}-rtl .@{prefix}-flow-layout-item.@{prefix}-last { 35 | margin-left: 2px; 36 | } 37 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/Iframe.less: -------------------------------------------------------------------------------- 1 | // Iframe 2 | 3 | .@{prefix}-iframe { 4 | border: 0 solid @iframe-border; 5 | width: 100%; height: 100%; 6 | } 7 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/Label.less: -------------------------------------------------------------------------------- 1 | // Label 2 | 3 | .@{prefix}-label { 4 | .inline-block(); 5 | text-shadow: @text-shadow; 6 | overflow: hidden; 7 | } 8 | 9 | .@{prefix}-label.@{prefix}-autoscroll { 10 | overflow: auto; 11 | } 12 | 13 | .@{prefix}-label.@{prefix}-disabled { 14 | color: @text-disabled; 15 | } 16 | 17 | .@{prefix}-label.@{prefix}-multiline { 18 | white-space: pre-wrap; 19 | } 20 | 21 | .@{prefix}-label.@{prefix}-error { 22 | color: @text-error; 23 | } 24 | 25 | // RTL 26 | 27 | .@{prefix}-rtl .@{prefix}-label { 28 | text-align: right; 29 | direction: rtl; 30 | } 31 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/ListBox.less: -------------------------------------------------------------------------------- 1 | // ListBox 2 | 3 | .@{prefix}-listbox button { 4 | text-align: left; 5 | padding-right: 20px; 6 | position: relative; 7 | } 8 | 9 | .@{prefix}-listbox .@{prefix}-caret { 10 | position: absolute; 11 | margin-top: -2px; 12 | right: 8px; 13 | top: 50%; 14 | } 15 | 16 | // RTL 17 | 18 | .@{prefix}-rtl .@{prefix}-listbox .@{prefix}-caret { 19 | right: auto; 20 | left: 8px; 21 | } 22 | 23 | .@{prefix}-rtl .@{prefix}-listbox button { 24 | padding-right: 10px; 25 | padding-left: 20px; 26 | } 27 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/Menu.less: -------------------------------------------------------------------------------- 1 | // Menu 2 | 3 | .@{prefix}-menu { 4 | position: absolute; 5 | left: 0; top: 0; 6 | .reset-gradient(); 7 | z-index: 1000; 8 | padding: 5px 0 5px 0; 9 | margin: 2px 0 0; 10 | min-width: 160px; 11 | background: @menu-bg; 12 | border: 1px solid mix(rgb(red(@menu-border), green(@menu-border), blue(@menu-border)), @panel-bg, round(alpha(@menu-border) * 200)); 13 | border: 1px solid @menu-border; 14 | z-index: 1002; 15 | .border-radius(6px); 16 | .box-shadow(0 5px 10px rgba(0,0,0,.2)); 17 | max-height: 400px; 18 | overflow: auto; 19 | overflow-x: hidden; 20 | } 21 | 22 | .@{prefix}-menu i { 23 | display: none; 24 | } 25 | 26 | .@{prefix}-menu-has-icons i { 27 | display: inline-block; 28 | *display: inline; 29 | } 30 | 31 | .@{prefix}-menu-sub-tr-tl { margin: -6px 0 0 -1px; } 32 | .@{prefix}-menu-sub-br-bl { margin: 6px 0 0 -1px; } 33 | .@{prefix}-menu-sub-tl-tr { margin: -6px 0 0 1px; } 34 | .@{prefix}-menu-sub-bl-br { margin: 6px 0 0 1px; } 35 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/MenuBar.less: -------------------------------------------------------------------------------- 1 | /* MenuBar */ 2 | 3 | .@{prefix}-menubar .@{prefix}-menubtn { 4 | border-color: transparent; 5 | background: transparent; 6 | .border-radius(0); 7 | .box-shadow(none); 8 | filter: none; 9 | } 10 | 11 | .@{prefix}-menubar { 12 | border: 1px solid @menubar-border; 13 | } 14 | 15 | .@{prefix}-menubar .@{prefix}-menubtn button span { 16 | color: @text; 17 | } 18 | 19 | .@{prefix}-menubar .@{prefix}-caret { 20 | border-top-color: @text; 21 | } 22 | 23 | .@{prefix}-menubar .@{prefix}-menubtn:hover, .@{prefix}-menubar .@{prefix}-menubtn.@{prefix}-active, .@{prefix}-menubar .@{prefix}-menubtn:focus { 24 | border-color: transparent; 25 | background: @menubar-bg-active; 26 | filter: none; 27 | .box-shadow(none); 28 | } 29 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/MenuButton.less: -------------------------------------------------------------------------------- 1 | /* MenuButton */ 2 | 3 | .@{prefix}-menubtn span { 4 | color: @btn-text; 5 | margin-right: 2px; 6 | line-height: @line-height; 7 | *line-height: @line-height - 4px; 8 | } 9 | 10 | .@{prefix}-menubtn.@{prefix}-btn-small span { 11 | font-size: @font-size - 2px; 12 | } 13 | 14 | .@{prefix}-menubtn.@{prefix}-fixed-width span { 15 | display: inline-block; 16 | overflow-x: hidden; 17 | text-overflow: ellipsis; 18 | width: 90px; 19 | } 20 | 21 | .@{prefix}-menubtn.@{prefix}-fixed-width.@{prefix}-btn-small span { 22 | width: 70px; 23 | } 24 | 25 | .@{prefix}-menubtn .@{prefix}-caret { 26 | *margin-top: 6px; 27 | } 28 | 29 | // RTL 30 | 31 | .@{prefix}-rtl .@{prefix}-menubtn button { 32 | direction: rtl; 33 | text-align: right; 34 | } 35 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/Mixins.less: -------------------------------------------------------------------------------- 1 | // Mixins 2 | 3 | .opacity(@opacity) { 4 | opacity: @opacity; 5 | @opacityie: @opacity * 100; 6 | filter: ~"alpha(opacity=@{opacityie})"; 7 | zoom: 1; 8 | } 9 | 10 | .vertical-gradient(@startColor, @endColor) when (@has-gradients = true) { 11 | background-color: mix(@startColor, @endColor, 60%); 12 | background-image: -moz-linear-gradient(top, @startColor, @endColor); // FF 3.6+ 13 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+ 14 | background-image: -webkit-linear-gradient(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+ 15 | background-image: -o-linear-gradient(top, @startColor, @endColor); // Opera 11.10 16 | background-image: linear-gradient(to bottom, @startColor, @endColor); // Standard, IE10 17 | background-repeat: repeat-x; 18 | filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)", argb(@startColor), argb(@endColor))); 19 | zoom: 1; 20 | } 21 | 22 | .vertical-gradient(@startColor, @endColor) when (@has-gradients = false) { 23 | background-color: mix(@startColor, @endColor, 60%); 24 | } 25 | 26 | .border-radius(@radius) when (@has-radius = true) { 27 | -webkit-border-radius: @radius; 28 | -moz-border-radius: @radius; 29 | border-radius: @radius; 30 | } 31 | 32 | .box-shadow(@shadowA, @shadowB:X, ...) when (@has-boxshadow = true) { 33 | // Multiple shadow solution from http://toekneestuck.com/blog/2012/05/15/less-css-arguments-variable/ 34 | @props: ~`"@{arguments}".replace(/[\[\]]|\,\sX/g, '')`; 35 | -webkit-box-shadow: @props; 36 | -moz-box-shadow: @props; 37 | box-shadow: @props; 38 | } 39 | 40 | .transition(@transition) { 41 | -webkit-transition: @transition; 42 | transition: @transition; 43 | } 44 | 45 | .inline-block() { 46 | display: inline-block; 47 | *display: inline; 48 | *zoom: 1; 49 | } 50 | 51 | .reset-gradient() { 52 | filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)")); 53 | background: transparent; 54 | } 55 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/Panel.less: -------------------------------------------------------------------------------- 1 | // Panel 2 | 3 | .@{prefix}-panel { 4 | border: 0 solid @panel-border; 5 | .vertical-gradient(@panel-bg, @panel-bg-hlight); 6 | } 7 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/Path.less: -------------------------------------------------------------------------------- 1 | // Path 2 | 3 | .@{prefix}-path { 4 | .inline-block(); 5 | padding: 8px; 6 | white-space: normal; 7 | } 8 | 9 | .@{prefix}-path .@{prefix}-txt { 10 | display: inline-block; 11 | padding-right: 3px; 12 | } 13 | 14 | .@{prefix}-path .@{prefix}-path-body { 15 | display: inline-block; 16 | } 17 | 18 | .@{prefix}-path-item { 19 | .inline-block(); 20 | cursor: pointer; 21 | color: @path-text; 22 | } 23 | 24 | .@{prefix}-path-item:hover { 25 | text-decoration: underline; 26 | } 27 | 28 | .@{prefix}-path-item:focus { 29 | background: @path-bg-focus; 30 | color: @path-text-focus; 31 | } 32 | 33 | .@{prefix}-path .@{prefix}-divider { 34 | display: inline; 35 | } 36 | 37 | .@{prefix}-disabled .@{prefix}-path-item { 38 | color: @text-disabled; 39 | } 40 | 41 | // RTL 42 | 43 | .@{prefix}-rtl .@{prefix}-path { 44 | direction: rtl; 45 | } 46 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/Radio.less: -------------------------------------------------------------------------------- 1 | // Radio - not implemented yet 2 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/Reset.less: -------------------------------------------------------------------------------- 1 | // Reset 2 | 3 | .@{prefix}-container, .@{prefix}-container *, .@{prefix}-widget, .@{prefix}-widget *, .@{prefix}-reset { 4 | margin: 0; padding: 0; border: 0; outline: 0; 5 | vertical-align: top; background: transparent; 6 | text-decoration: none; color: @text; 7 | font-family: @font-family; 8 | font-size: @font-size; text-shadow: none; float: none; 9 | position: static; width: auto; height: auto; 10 | white-space: nowrap; cursor: inherit; 11 | -webkit-tap-highlight-color: transparent; 12 | line-height: normal; font-weight: normal; 13 | text-align: left; 14 | -moz-box-sizing: content-box; 15 | -webkit-box-sizing: content-box; 16 | box-sizing: content-box; 17 | direction: ltr; 18 | } 19 | 20 | .@{prefix}-widget button { 21 | -moz-box-sizing: border-box; 22 | -webkit-box-sizing: border-box; 23 | box-sizing: border-box; 24 | } 25 | 26 | .@{prefix}-container *[unselectable] { 27 | -moz-user-select: none; 28 | -webkit-user-select: none; 29 | -o-user-select: none; 30 | user-select: none; 31 | } 32 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/ResizeHandle.less: -------------------------------------------------------------------------------- 1 | .@{prefix}-container-body .@{prefix}-resizehandle { 2 | position: absolute; 3 | right: 0; 4 | bottom: 0; 5 | width: 16px; 6 | height: 16px; 7 | visibility: visible; 8 | cursor: s-resize; 9 | margin: 0; 10 | } 11 | 12 | .@{prefix}-container-body .@{prefix}-resizehandle-both { 13 | cursor: se-resize; 14 | } 15 | 16 | i.@{prefix}-i-resize { 17 | color: @text; 18 | } 19 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/Scrollable.less: -------------------------------------------------------------------------------- 1 | // Scrollbar 2 | 3 | .@{prefix}-scrollbar { 4 | position: absolute; 5 | width: 7px; 6 | height: 100%; 7 | top: 2px; 8 | right: 2px; 9 | .opacity(0.4); 10 | } 11 | 12 | .@{prefix}-scrollbar-h { 13 | top: auto; 14 | right: auto; 15 | left: 2px; 16 | bottom: 2px; 17 | width: 100%; 18 | height: 7px; 19 | } 20 | 21 | .@{prefix}-scrollbar-thumb { 22 | position: absolute; 23 | background-color: #000; 24 | border: 1px solid #888; 25 | border-color: rgba(85, 85, 85, .6); 26 | width: 5px; 27 | height: 100%; 28 | .border-radius(7px); 29 | } 30 | 31 | .@{prefix}-scrollbar-h .@{prefix}-scrollbar-thumb { 32 | width: 100%; 33 | height: 5px; 34 | } 35 | 36 | .@{prefix}-scrollbar:hover, .@{prefix}-scrollbar.@{prefix}-active { 37 | background-color: #AAA; 38 | .opacity(0.6); 39 | .border-radius(7px); 40 | } 41 | 42 | .@{prefix}-scroll { 43 | position: relative; 44 | } 45 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/Spacer.less: -------------------------------------------------------------------------------- 1 | // Spacer 2 | 3 | .@{prefix}-spacer { 4 | visibility: hidden; 5 | } 6 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/SplitButton.less: -------------------------------------------------------------------------------- 1 | // SplitButton 2 | 3 | .@{prefix}-splitbtn .@{prefix}-open { 4 | border-left: 1px solid transparent; 5 | border-right: 1px solid transparent; 6 | } 7 | 8 | .@{prefix}-splitbtn:hover .@{prefix}-open { 9 | border-left-color: @btn-split-border; 10 | border-right-color: @btn-split-border; 11 | } 12 | 13 | .@{prefix}-splitbtn button { 14 | padding-right: 4px; 15 | } 16 | 17 | .@{prefix}-splitbtn .@{prefix}-open { 18 | padding-left: 4px; 19 | } 20 | 21 | .@{prefix}-splitbtn .@{prefix}-open.@{prefix}-active { 22 | .box-shadow(inset 0 2px 4px rgba(0, 0, 0, .15), 0 1px 2px rgba(0, 0, 0 ,.05)); 23 | } 24 | 25 | .@{prefix}-splitbtn.@{prefix}-btn-small .@{prefix}-open { 26 | padding: 0 3px 0 3px; 27 | } 28 | 29 | // RTL 30 | 31 | .@{prefix}-rtl .@{prefix}-splitbtn { 32 | direction: rtl; 33 | text-align: right; 34 | } 35 | 36 | .@{prefix}-rtl .@{prefix}-splitbtn button { 37 | padding-right: 10px; 38 | padding-left: 10px; 39 | } 40 | 41 | .@{prefix}-rtl .@{prefix}-splitbtn .@{prefix}-open { 42 | padding-left: 4px; 43 | padding-right: 4px; 44 | } 45 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/StackLayout.less: -------------------------------------------------------------------------------- 1 | // StackLayout 2 | 3 | .@{prefix}-stack-layout-item { 4 | display: block; 5 | } 6 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/TabPanel.less: -------------------------------------------------------------------------------- 1 | // TabPanel 2 | 3 | .@{prefix}-tabs { 4 | display: block; 5 | border-bottom: 1px solid @tab-border; 6 | } 7 | 8 | .@{prefix}-tab { 9 | .inline-block(); 10 | border: 1px solid @tab-border; 11 | border-width: 0 1px 0 0; 12 | background: @tab-bg; 13 | padding: 8px; 14 | text-shadow: @text-shadow; 15 | height: 13px; 16 | cursor: pointer; 17 | } 18 | 19 | .@{prefix}-tab:hover { 20 | background: @tab-bg-hover; 21 | } 22 | 23 | .@{prefix}-tab.@{prefix}-active { 24 | background: @tab-bg-active; 25 | border-bottom-color: transparent; 26 | margin-bottom: -1px; 27 | height: 14px; 28 | } 29 | 30 | // RTL 31 | 32 | .@{prefix}-rtl .@{prefix}-tabs { 33 | text-align: right; 34 | direction: rtl; 35 | } 36 | 37 | .@{prefix}-rtl .@{prefix}-tab { 38 | border-width: 0 0 0 1px; 39 | } 40 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/TextBox.less: -------------------------------------------------------------------------------- 1 | // TextBox 2 | 3 | .@{prefix}-textbox { 4 | background: @textbox-bg; 5 | border: 1px solid @textbox-border; 6 | .border-radius(3px); 7 | .box-shadow(@textbox-box-shadow); 8 | display: inline-block; 9 | .transition(~"border linear .2s, box-shadow linear .2s"); 10 | height: 28px; 11 | resize: none; 12 | padding: 0 4px 0 4px; 13 | white-space: pre-wrap; 14 | *white-space: pre; 15 | color: @text; 16 | } 17 | 18 | .@{prefix}-textbox:focus, .@{prefix}-textbox.@{prefix}-focus { 19 | border-color: @textbox-border-focus; 20 | .box-shadow(inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px fadeout(@textbox-border-focus, 15%)); 21 | } 22 | 23 | .@{prefix}-placeholder .@{prefix}-textbox { 24 | color: @textbox-text-placeholder; 25 | } 26 | 27 | .@{prefix}-textbox.@{prefix}-multiline { 28 | padding: 4px; 29 | } 30 | 31 | .@{prefix}-textbox.@{prefix}-disabled { 32 | color: mix(@text, @textbox-bg, 40%); 33 | } 34 | 35 | // RTL 36 | 37 | .@{prefix}-rtl .@{prefix}-textbox { 38 | text-align: right; 39 | direction: rtl; 40 | } 41 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/Throbber.less: -------------------------------------------------------------------------------- 1 | // Throbber 2 | 3 | .@{prefix}-throbber { 4 | position: absolute; 5 | top: 0; left: 0; 6 | width: 100%; height: 100%; 7 | .opacity(0.6); 8 | background: @throbber-bg; 9 | } 10 | 11 | .@{prefix}-throbber-inline { 12 | position: static; 13 | height: 50px; 14 | } 15 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/content.inline.min.css: -------------------------------------------------------------------------------- 1 | .mce-object{border:1px dotted #3A3A3A;background:#d5d5d5 url(img/object.gif) no-repeat center}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px;page-break-before:always}@media print{.mce-pagebreak{border:0px}}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px !important;height:9px !important;border:1px dotted #3A3A3A;background:#d5d5d5 url(img/anchor.gif) no-repeat center}.mce-nbsp{background:#AAA}hr{cursor:default}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#3399ff;color:#fff}.mce-spellchecker-word{border-bottom:2px solid #F00;cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid #008000;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td.mce-item-selected,th.mce-item-selected{background-color:#3399ff !important}.mce-edit-focus{outline:1px dotted #333} -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/content.min.css: -------------------------------------------------------------------------------- 1 | body{background-color:#FFFFFF;color:#000000;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px;scrollbar-3dlight-color:#F0F0EE;scrollbar-arrow-color:#676662;scrollbar-base-color:#F0F0EE;scrollbar-darkshadow-color:#DDDDDD;scrollbar-face-color:#E0E0DD;scrollbar-highlight-color:#F0F0EE;scrollbar-shadow-color:#F0F0EE;scrollbar-track-color:#F5F5F5}td,th{font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px}.mce-object{border:1px dotted #3A3A3A;background:#d5d5d5 url(img/object.gif) no-repeat center}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px;page-break-before:always}@media print{.mce-pagebreak{border:0px}}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px !important;height:9px !important;border:1px dotted #3A3A3A;background:#d5d5d5 url(img/anchor.gif) no-repeat center}.mce-nbsp{background:#AAA}hr{cursor:default}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#3399ff;color:#fff}.mce-spellchecker-word{border-bottom:2px solid #F00;cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid #008000;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td.mce-item-selected,th.mce-item-selected{background-color:#3399ff !important}.mce-edit-focus{outline:1px dotted #333} -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/fonts/readme.md: -------------------------------------------------------------------------------- 1 | Icons are generated and provided by the http://icomoon.io service. 2 | -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/fonts/tinymce-small.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/skins/lightgray/fonts/tinymce-small.eot -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/fonts/tinymce-small.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/skins/lightgray/fonts/tinymce-small.ttf -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/fonts/tinymce-small.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/skins/lightgray/fonts/tinymce-small.woff -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/fonts/tinymce.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/skins/lightgray/fonts/tinymce.eot -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/fonts/tinymce.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/skins/lightgray/fonts/tinymce.ttf -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/fonts/tinymce.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/skins/lightgray/fonts/tinymce.woff -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/img/anchor.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/skins/lightgray/img/anchor.gif -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/img/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/skins/lightgray/img/loader.gif -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/img/object.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/skins/lightgray/img/object.gif -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/img/trans.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/js/tinymce/skins/lightgray/img/trans.gif -------------------------------------------------------------------------------- /js/tinymce-dev/js/tinymce/skins/lightgray/skin.dev.less: -------------------------------------------------------------------------------- 1 | @import "Reset.less"; 2 | @import "Variables.less"; 3 | @import "Mixins.less"; 4 | @import "Animations.less"; 5 | @import "TinyMCE.less"; 6 | @import "Container.less"; 7 | @import "Scrollable.less"; 8 | @import "Panel.less"; 9 | @import "FloatPanel.less"; 10 | @import "Window.less"; 11 | @import "AbsoluteLayout.less"; 12 | @import "ToolTip.less"; 13 | @import "Button.less"; 14 | @import "ButtonGroup.less"; 15 | @import "Checkbox.less"; 16 | @import "ColorButton.less"; 17 | @import "ComboBox.less"; 18 | @import "Path.less"; 19 | @import "FieldSet.less"; 20 | @import "FitLayout.less"; 21 | @import "FlowLayout.less"; 22 | @import "Iframe.less"; 23 | @import "Label.less"; 24 | @import "MenuBar.less"; 25 | @import "MenuButton.less"; 26 | @import "ListBox.less"; 27 | @import "MenuItem.less"; 28 | @import "Menu.less"; 29 | @import "Radio.less"; 30 | @import "ResizeHandle.less"; 31 | @import "Spacer.less"; 32 | @import "SplitButton.less"; 33 | @import "StackLayout.less"; 34 | @import "TabPanel.less"; 35 | @import "TextBox.less"; 36 | @import "Throbber.less"; 37 | @import "Icons.less"; 38 | -------------------------------------------------------------------------------- /js/tinymce-dev/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tinymce", 3 | "version": "4.0.0", 4 | "repository": { 5 | "type" : "git", 6 | "url" : "https://github.com/tinymce/tinymce.git" 7 | }, 8 | "description": "TinyMCE rich text editor", 9 | "author": "Johan Sörlin ", 10 | "bugs": { "url" : "http://www.tinymce.com/develop/bugtracker.php" }, 11 | "private": true, 12 | "engines": { 13 | "node" : ">=0.10.26" 14 | }, 15 | "devDependencies": { 16 | "jake": ">= 0.7.0", 17 | "amdlc": ">= 0.0.2", 18 | "jshint": ">= 2.1.4", 19 | "eslint": ">= 0.4.2", 20 | "uglify-js": ">= 2.0.0", 21 | "glob": ">= 3.1.12", 22 | "moxie-zip": ">= 0.0.1", 23 | "less": ">= 1.3.1", 24 | "coverjs": ">= 0.0.14", 25 | "request": "~2.33.0", 26 | "q": "~1.0.0", 27 | "sauce-tunnel": ">= 2.0.2", 28 | "mime": "~1.2.11", 29 | "chalk": "~0.4.0" 30 | }, 31 | "scripts": { 32 | "test": "jake jshint eslint minify less phantomjs-tests" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /js/tinymce-dev/readme.md: -------------------------------------------------------------------------------- 1 | TinyMCE - The JavaScript Rich Text editor 2 | ========================================== 3 | 4 | Building TinyMCE 5 | ----------------- 6 | 1. Install Node.js 7 | 2. Open a console and go to the project directory 8 | 3. Write "npm i -g jake" to install the jake tool globally. 9 | 4. Write "npm i" to install all package dependencies 10 | 4. Build TinyMCE by writing "jake" 11 | 12 | Build tasks 13 | ------------ 14 | `jake` 15 | Runs the minifyjs, less, jshint build tasks. 16 | 17 | `jake -T` 18 | List all build tasks. 19 | 20 | `jake minify` 21 | Compiles the core classes, plugins and themes into minified versions. 22 | 23 | `jake less` 24 | Compiles all LESS based skins into css files that can be included in the browser. 25 | 26 | `jake jshint` 27 | Runs all js code though jshint. 28 | 29 | `jake eslint` 30 | Runs all js code though eslint. 31 | 32 | `jake release` 33 | Builds release packages with the version specified in changelog.txt. 34 | 35 | `jake bundle[themes:*]` 36 | Bundles all themes into the tinymce core js files. 37 | 38 | `jake bundle[plugins:*]` 39 | Bundles all plugins into the tinymce core js files. 40 | 41 | `jake phantomjs-tests` 42 | Runs all qunit tests in a headless WebKit. 43 | 44 | Bundle themes and plugins into core example 45 | ------------------------------------------- 46 | `jake minify bundle[themes:modern,plugins:table,paste]` 47 | Minifies the core, adds the modern theme and adds the table and paste plugin into tinymce.min.js. 48 | 49 | Run code coverage on TinyMCE core 50 | ---------------------------------- 51 | `jake minify-core[coverage]` 52 | Compiles the core classes with jscoverage data. 53 | 54 | Run the unit tests on the minified TinyMCE core and click the coverage report button. 55 | `tests/index.html?min=true` 56 | 57 | Contributing to the TinyMCE project 58 | ------------------------------------ 59 | You can read more about how to contribute to this project at [http://www.tinymce.com/develop/contributing.php](http://www.tinymce.com/develop/contributing.php) 60 | 61 | [![Build Status](https://travis-ci.org/tinymce/tinymce.png?branch=master)](https://travis-ci.org/tinymce/tinymce) 62 | -------------------------------------------------------------------------------- /js/tinymce-dev/tests/coverage/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Code Coverage 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /js/tinymce-dev/tests/coverage/js/reporter.js: -------------------------------------------------------------------------------- 1 | headings = []; 2 | 3 | onload = function(){ 4 | headings = document.querySelectorAll('h2'); 5 | }; 6 | 7 | onscroll = function(e){ 8 | var heading = find(window.scrollY); 9 | if (!heading) return; 10 | var links = document.querySelectorAll('#menu a') 11 | , link; 12 | 13 | for (var i = 0, len = links.length; i < len; ++i) { 14 | link = links[i]; 15 | link.className = link.getAttribute('href') == '#' + heading.id 16 | ? 'active' 17 | : ''; 18 | } 19 | }; 20 | 21 | function find(y) { 22 | var i = headings.length 23 | , heading; 24 | 25 | while (i--) { 26 | heading = headings[i]; 27 | if (y > heading.offsetTop) { 28 | return heading; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /js/tinymce-dev/tests/js/qunit/QUnit.LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010 John Resig, http://jquery.com/ 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /js/tinymce-dev/tests/js/tinymce_loader.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | var baseURL; 3 | 4 | // Get base where the tinymce script is located 5 | var scripts = document.getElementsByTagName('script'); 6 | for (var i = 0; i < scripts.length; i++) { 7 | var src = scripts[i].src; 8 | 9 | if (/tinymce_loader\.js/.test(src)) { 10 | baseURL = src.substring(0, src.lastIndexOf('/')); 11 | break; 12 | } 13 | } 14 | 15 | if (document.location.search.indexOf('min=true') > 0) { 16 | document.write(''); 17 | } else { 18 | document.write(''); 19 | } 20 | })(); 21 | -------------------------------------------------------------------------------- /js/tinymce-dev/tests/manual/css/custom_theme_content.css: -------------------------------------------------------------------------------- 1 | body, div, h1 { font-family: 'trebuchet ms', verdana, arial } 2 | body {font-size: 10pt; } 3 | -------------------------------------------------------------------------------- /js/tinymce-dev/tests/manual/css/development.css: -------------------------------------------------------------------------------- 1 | .example1 { 2 | font-weight: bold; 3 | font-size: 14px 4 | } 5 | 6 | .example2 { 7 | font-weight: bold; 8 | font-size: 12px; 9 | color: #FF0000 10 | } 11 | 12 | tr.tablerow1 { 13 | background-color: #BBBBBB; 14 | } 15 | 16 | p.red {color:red;} 17 | strong.red {color: red;} 18 | strong.red.italic {color: red; font-style: italic;} 19 | -------------------------------------------------------------------------------- /js/tinymce-dev/tests/manual/css/gecko_caret.css: -------------------------------------------------------------------------------- 1 | *[contentEditable]:focus { 2 | outline: 1px solid red; 3 | } -------------------------------------------------------------------------------- /js/tinymce-dev/tests/manual/css/noneditable_manual.css: -------------------------------------------------------------------------------- 1 | .mceNonEditable { 2 | background: yellow; 3 | } 4 | 5 | .mceEditable { 6 | background: white; 7 | } 8 | 9 | *[contentEditable]:focus { 10 | outline: 1px dotted gray; 11 | } 12 | -------------------------------------------------------------------------------- /js/tinymce-dev/tests/manual/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Manual test files 5 | 6 | 7 | 8 |

Manual tests

9 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /js/tinymce-dev/tests/manual/jquery.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | jQuery test file 5 | 6 | 7 | 8 | 15 | 16 | 17 |
18 |
19 |
20 | 21 |
22 | 23 |
24 | 25 |
26 | 27 | 28 |
29 |
30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /js/tinymce-dev/tests/manual/tests.js: -------------------------------------------------------------------------------- 1 | { 2 | "title": "tinymce", 3 | "tests": [ 4 | {"title": "Gecko caret", "url": "gecko_caret.html", "manual": true}, 5 | {"title": "Noneditable", "url": "noneditable.html", "manual": true}, 6 | {"title": "Removeformat", "url": "removeformat.html", "manual": true}, 7 | {"title": "Resize", "url": "resize.html", "manual": true}, 8 | {"title": "Visual blocks", "url": "visualblocks.html", "manual": true}, 9 | {"title": "Custom theme", "url": "custom_theme.html", "manual": true}, 10 | {"title": "Development", "url": "development.html", "manual": true}, 11 | {"title": "Classic theme", "url": "classic.html", "manual": true}, 12 | {"title": "Inline editing", "url": "inline.html", "manual": true} 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /js/tinymce-dev/tests/plugins/wordcount.js: -------------------------------------------------------------------------------- 1 | module("tinymce.plugins.Wordcount", { 2 | setupModule: function() { 3 | QUnit.stop(); 4 | 5 | tinymce.init({ 6 | selector: "textarea", 7 | add_unload_trigger: false, 8 | skin: false, 9 | wordcount_target_id: 'current-count', 10 | plugins: 'wordcount', 11 | init_instance_callback: function(ed) { 12 | window.editor = ed; 13 | QUnit.start(); 14 | } 15 | }); 16 | } 17 | }); 18 | 19 | test("Blank document has 0 words", function() { 20 | expect(1); 21 | 22 | editor.setContent(''); 23 | var result = editor.plugins.wordcount.getCount(); 24 | equal(result, 0); 25 | }); 26 | 27 | test("Simple word count", function() { 28 | expect(1); 29 | 30 | editor.setContent('

My sentence is this.

'); 31 | var result = editor.plugins.wordcount.getCount(); 32 | equal(result, 4); 33 | }); 34 | 35 | test("Does not count dashes", function() { 36 | expect(1); 37 | 38 | editor.setContent('

Something -- ok

'); 39 | var result = editor.plugins.wordcount.getCount(); 40 | equal(result, 2); 41 | }); 42 | 43 | test("Does not count asterisks, non-word characters", function() { 44 | expect(1); 45 | 46 | editor.setContent('

* something\n\u00b7 something else

'); 47 | var result = editor.plugins.wordcount.getCount(); 48 | equal(result, 3); 49 | }); 50 | 51 | test("Does not count numbers", function() { 52 | expect(1); 53 | 54 | editor.setContent('

Something 123 ok

'); 55 | var result = editor.plugins.wordcount.getCount(); 56 | equal(result, 2); 57 | }); 58 | 59 | test("Does not count htmlentities", function() { 60 | expect(1); 61 | 62 | editor.setContent('

It’s my life – – – don\'t you forget.

'); 63 | var result = editor.plugins.wordcount.getCount(); 64 | equal(result, 6); 65 | }); 66 | 67 | test("Counts hyphenated words as one word", function() { 68 | expect(1); 69 | 70 | editor.setContent('

Hello some-word here.

'); 71 | var result = editor.plugins.wordcount.getCount(); 72 | equal(result, 3); 73 | }); 74 | 75 | test("Counts words between blocks as two words", function() { 76 | expect(1); 77 | 78 | editor.setContent('

Hello

world

'); 79 | var result = editor.plugins.wordcount.getCount(); 80 | equal(result, 2); 81 | }); 82 | -------------------------------------------------------------------------------- /js/tinymce-dev/tests/tinymce/AddOnManager.js: -------------------------------------------------------------------------------- 1 | module("tinymce.AddOnManager", { 2 | teardown: function() { 3 | Utils.unpatch(tinymce.dom.ScriptLoader.ScriptLoader); 4 | tinymce.AddOnManager.languageLoad = true; 5 | tinymce.AddOnManager.language = 'en'; 6 | } 7 | }); 8 | 9 | test('requireLangPack', function() { 10 | var languagePackUrl; 11 | 12 | Utils.patch(tinymce.dom.ScriptLoader.ScriptLoader, 'add', function(origFunc, url) { 13 | languagePackUrl = url; 14 | }); 15 | 16 | function getLanguagePackUrl(language, languages) { 17 | languagePackUrl = null; 18 | tinymce.AddOnManager.language = language; 19 | tinymce.AddOnManager.PluginManager.requireLangPack('plugin', languages); 20 | return languagePackUrl; 21 | } 22 | 23 | tinymce.AddOnManager.PluginManager.urls.plugin = '/root'; 24 | 25 | equal(getLanguagePackUrl('sv_SE'), '/root/langs/sv_SE.js'); 26 | equal(getLanguagePackUrl('sv_SE', 'sv,en,us'), '/root/langs/sv.js'); 27 | equal(getLanguagePackUrl('sv_SE', 'sv_SE,en_US'), '/root/langs/sv_SE.js'); 28 | equal(getLanguagePackUrl('sv'), '/root/langs/sv.js'); 29 | equal(getLanguagePackUrl('sv', 'sv'), '/root/langs/sv.js'); 30 | equal(getLanguagePackUrl('sv', 'sv,en,us'), '/root/langs/sv.js'); 31 | equal(getLanguagePackUrl('sv', 'en,sv,us'), '/root/langs/sv.js'); 32 | equal(getLanguagePackUrl('sv', 'en,us,sv'), '/root/langs/sv.js'); 33 | strictEqual(getLanguagePackUrl('sv', 'en,us'), null); 34 | strictEqual(getLanguagePackUrl(null, 'en,us'), null); 35 | strictEqual(getLanguagePackUrl(null), null); 36 | 37 | tinymce.AddOnManager.languageLoad = false; 38 | strictEqual(getLanguagePackUrl('sv', 'sv'), null); 39 | }); 40 | -------------------------------------------------------------------------------- /js/tinymce-dev/tests/tinymce/Shortcuts.js: -------------------------------------------------------------------------------- 1 | module("tinymce.Shortcuts", { 2 | setupModule: function() { 3 | QUnit.stop(); 4 | 5 | tinymce.init({ 6 | selector: "textarea", 7 | add_unload_trigger: false, 8 | disable_nodechange: true, 9 | indent: false, 10 | skin: false, 11 | entities: 'raw', 12 | schema: 'html5', 13 | init_instance_callback: function(ed) { 14 | window.editor = ed; 15 | QUnit.start(); 16 | } 17 | }); 18 | } 19 | }); 20 | 21 | test('Shortcuts formats', function() { 22 | function assertShortcut(shortcut, args) { 23 | var called; 24 | 25 | editor.shortcuts.add(shortcut, '', function() { 26 | called = true; 27 | }); 28 | 29 | args = tinymce.extend({ 30 | ctrlKey: false, 31 | altKey: false, 32 | shiftKey: false 33 | }, args); 34 | 35 | if (tinymce.Env.mac && args.ctrlKey) { 36 | args.metaKey = true; 37 | args.ctrlKey = false; 38 | } 39 | 40 | editor.fire('keydown', args); 41 | 42 | ok(called, 'Shortcut wasn\'t called: ' + shortcut); 43 | } 44 | 45 | assertShortcut('ctrl+d', {ctrlKey: true, keyCode: 68}); 46 | assertShortcut('ctrl+shift+d', {ctrlKey: true, shiftKey: true, keyCode: 68}); 47 | assertShortcut('ctrl+shift+alt+d', {ctrlKey: true, shiftKey: true, altKey: true, keyCode: 68}); 48 | assertShortcut('ctrl+221', {ctrlKey: true, keyCode: 221}); 49 | }); 50 | -------------------------------------------------------------------------------- /js/tinymce-dev/tests/tinymce/html/Serializer.js: -------------------------------------------------------------------------------- 1 | module("tinymce.html.Serializer"); 2 | 3 | test('Basic serialization', function() { 4 | var serializer = new tinymce.html.Serializer(); 5 | 6 | expect(6); 7 | 8 | equal(serializer.serialize(new tinymce.html.DomParser().parse('texttext')), 'text'); 10 | equal(serializer.serialize(new tinymce.html.DomParser().parse('')), ''); 11 | equal(serializer.serialize(new tinymce.html.DomParser().parse('')), ''); 12 | equal(serializer.serialize(new tinymce.html.DomParser().parse('')), ''); 13 | equal(serializer.serialize(new tinymce.html.DomParser().parse('')), ''); 14 | }); 15 | 16 | test('Sorting of attributes', function() { 17 | var serializer = new tinymce.html.Serializer(); 18 | 19 | expect(1); 20 | 21 | equal(serializer.serialize(new tinymce.html.DomParser().parse('x')), 'x'); 22 | }); 23 | -------------------------------------------------------------------------------- /js/tinymce-dev/tests/tinymce/ui/AbsoluteLayout.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | module("tinymce.ui.AbsoluteLayout", { 3 | setup: function() { 4 | document.getElementById('view').innerHTML = ''; 5 | }, 6 | 7 | teardown: function() { 8 | tinymce.dom.Event.clean(document.getElementById('view')); 9 | } 10 | }); 11 | 12 | function createPanel(settings) { 13 | return tinymce.ui.Factory.create(tinymce.extend({ 14 | type: 'panel', 15 | layout: 'absolute', 16 | width: 200, 17 | height: 200 18 | }, settings)).renderTo(document.getElementById('view')).reflow(); 19 | } 20 | 21 | test("spacer x:10, y:20, minWidth: 100, minHeight: 100", function() { 22 | var panel = createPanel({ 23 | items: [ 24 | {type: 'spacer', x: 10, y: 20, w: 100, h: 120, classes: 'red'} 25 | ] 26 | }); 27 | 28 | deepEqual(Utils.rect(panel), [0, 0, 200, 200]); 29 | deepEqual(Utils.rect(panel.find('spacer')[0]), [10, 20, 100, 120]); 30 | }); 31 | })(); -------------------------------------------------------------------------------- /js/tinymce-dev/tests/tinymce/ui/FitLayout.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | var panel; 3 | 4 | module("tinymce.ui.FitLayout", { 5 | setup: function() { 6 | document.getElementById('view').innerHTML = ''; 7 | }, 8 | 9 | teardown: function() { 10 | tinymce.dom.Event.clean(document.getElementById('view')); 11 | } 12 | }); 13 | 14 | function createFitPanel(settings) { 15 | return tinymce.ui.Factory.create(tinymce.extend({ 16 | type: 'panel', 17 | layout: 'fit', 18 | width: 200, 19 | height: 200, 20 | border: 1 21 | }, settings)).renderTo(document.getElementById('view')).reflow(); 22 | } 23 | 24 | test("fit with spacer inside", function() { 25 | panel = createFitPanel({ 26 | items: [ 27 | {type: 'spacer', classes: 'red'} 28 | ] 29 | }); 30 | 31 | deepEqual(Utils.rect(panel), [0, 0, 200, 200]); 32 | deepEqual(Utils.rect(panel.find('spacer')[0]), [1, 1, 198, 198]); 33 | }); 34 | 35 | test("fit with padding and spacer inside", function() { 36 | panel = createFitPanel({ 37 | padding: 3, 38 | items: [ 39 | {type: 'spacer', classes: 'red'} 40 | ] 41 | }); 42 | 43 | deepEqual(Utils.rect(panel), [0, 0, 200, 200]); 44 | deepEqual(Utils.rect(panel.find('spacer')[0]), [4, 4, 192, 192]); 45 | }); 46 | 47 | test("fit with panel inside", function() { 48 | panel = createFitPanel({ 49 | items: [ 50 | {type: 'panel', border: 1} 51 | ] 52 | }); 53 | 54 | deepEqual(Utils.rect(panel), [0, 0, 200, 200]); 55 | deepEqual(Utils.rect(panel.find('panel')[0]), [1, 1, 198, 198]); 56 | }); 57 | })(); -------------------------------------------------------------------------------- /js/tinymce-dev/tests/tinymce/ui/Panel.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | var panel; 3 | 4 | module("tinymce.ui.Panel", { 5 | setup: function() { 6 | document.getElementById('view').innerHTML = ''; 7 | }, 8 | 9 | teardown: function() { 10 | tinymce.dom.Event.clean(document.getElementById('view')); 11 | } 12 | }); 13 | 14 | function createPanel(settings) { 15 | return tinymce.ui.Factory.create(tinymce.extend({ 16 | type: 'panel' 17 | }, settings)).renderTo(document.getElementById('view')).reflow(); 18 | } 19 | 20 | test("panel width: 100, height: 100", function() { 21 | panel = createPanel({ 22 | width: 100, 23 | height: 100 24 | }); 25 | 26 | Utils.nearlyEqualRects(Utils.rect(panel), [0, 0, 100, 100], 4); 27 | }); 28 | 29 | test("panel border: 1, width: 100, height: 100", function() { 30 | panel = createPanel({ 31 | width: 100, 32 | height: 100, 33 | border: 1 34 | }); 35 | 36 | Utils.nearlyEqualRects(Utils.rect(panel), [0, 0, 100, 100], 4); 37 | }); 38 | })(); 39 | -------------------------------------------------------------------------------- /js/tinymce-dev/tests/tinymce/ui/TextBox.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | module("tinymce.ui.TextBox", { 3 | setup: function() { 4 | document.getElementById('view').innerHTML = ''; 5 | }, 6 | 7 | teardown: function() { 8 | tinymce.dom.Event.clean(document.getElementById('view')); 9 | } 10 | }); 11 | 12 | function createTextBox(settings) { 13 | return tinymce.ui.Factory.create(tinymce.extend({ 14 | type: 'textbox' 15 | }, settings)).renderTo(document.getElementById('view')); 16 | } 17 | 18 | test("textbox text, size chars: 5", function() { 19 | var textBox = createTextBox({text: 'X', size: 5}); 20 | 21 | Utils.nearlyEqualRects(Utils.size(textBox), [69, 30], 30); 22 | }); 23 | 24 | test("textbox text, size 100x100", function() { 25 | var textBox = createTextBox({text: 'X', width: 100, height: 100}); 26 | 27 | deepEqual(Utils.size(textBox), [100, 100]); 28 | }); 29 | })(); 30 | -------------------------------------------------------------------------------- /js/tinymce-dev/tests/tinymce/ui/css/ui-overrides.css: -------------------------------------------------------------------------------- 1 | /* Hardcodes sizes since fonts vary on platforms */ 2 | 3 | .mce-spacer { 4 | width: 20px; 5 | height: 20px; 6 | visibility: visible; 7 | border: 0 solid black; 8 | } 9 | 10 | .mce-head .mce-title { 11 | width: 100px; 12 | height: 20px; 13 | display: inline-block; 14 | } 15 | 16 | .mce-btn .mce-txt { 17 | width: 20px; 18 | } 19 | 20 | /* Colors used for debugging */ 21 | 22 | .mce-red {background-color: red;} 23 | .mce-green {background-color: green;} 24 | .mce-blue {background-color: blue;} 25 | .mce-yellow {background-color: yellow;} 26 | .mce-magenta {background-color: magenta;} 27 | .mce-cyan {background-color: cyan;} 28 | .mce-dotted {background-image: url(../img/raster.gif);} 29 | .mce-i-test {background: red;} 30 | -------------------------------------------------------------------------------- /js/tinymce-dev/tests/tinymce/ui/img/raster.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/tests/tinymce/ui/img/raster.gif -------------------------------------------------------------------------------- /js/tinymce-dev/tests/tinymce/util/JSON.js: -------------------------------------------------------------------------------- 1 | module("tinymce.util.JSON"); 2 | 3 | test('serialize', 2, function() { 4 | equal( 5 | tinymce.util.JSON.serialize({ 6 | arr1 : [1, 2, 3, [1, 2, 3]], 7 | bool1 : true, 8 | float1: 3.14, 9 | int1 : 123, 10 | null1 : null, 11 | obj1 : {key1 : "val1", key2 : "val2"}, str1 : '\"\'abc\u00C5123\\'} 12 | ), 13 | '{"arr1":[1,2,3,[1,2,3]],"bool1":true,"float1":3.14,"int1":123,"null1":null,"obj1":{"key1":"val1","key2":"val2"},"str1":"\\"\'abc\\u00c5123\\\\"}' 14 | ); 15 | 16 | equal( 17 | tinymce.util.JSON.serialize({ 18 | arr1 : [1, 2, 3, [1, 2, 3]], 19 | bool1 : true, 20 | float1: 3.14, 21 | int1 : 123, 22 | null1 : null, 23 | obj1 : {key1 : "val1", key2 : "val2"}, str1 : '\"\'abc\u00C5123'}, "'" 24 | ), 25 | "{'arr1':[1,2,3,[1,2,3]],'bool1':true,'float1':3.14,'int1':123,'null1':null,'obj1':{'key1':'val1','key2':'val2'},'str1':'\\\"\\'abc\\u00c5123'}" 26 | ); 27 | }); 28 | 29 | test('parse', 1, function() { 30 | equal(tinymce.util.JSON.parse('{"arr1":[1,2,3,[1,2,3]],"bool1":true,"float1":3.14,"int1":123,"null1":null,"obj1":{"key1":"val1","key2":"val2"},"str1":"abc\\u00c5123"}').str1, 'abc\u00c5123'); 31 | }); 32 | -------------------------------------------------------------------------------- /js/tinymce-dev/tests/tinymce/util/JSONRequest.js: -------------------------------------------------------------------------------- 1 | if (location.protocol != "file:") { 2 | module("tinymce.util.JSONRequest"); 3 | 4 | asyncTest("Successful request - send method", function() { 5 | expect(1); 6 | 7 | new tinymce.util.JSONRequest({}).send({ 8 | type : 'GET', 9 | url : 'tinymce/util/json_rpc_ok.js', 10 | success: function(data) { 11 | equal(data, 'Hello JSON-RPC'); 12 | start(); 13 | } 14 | }); 15 | }); 16 | 17 | asyncTest("Successful request - sendRPC static method", function() { 18 | expect(1); 19 | 20 | tinymce.util.JSONRequest.sendRPC({ 21 | type : 'GET', 22 | url : 'tinymce/util/json_rpc_ok.js', 23 | success: function(data) { 24 | equal(data, 'Hello JSON-RPC'); 25 | start(); 26 | } 27 | }); 28 | }); 29 | 30 | asyncTest("Error request - send method", function() { 31 | expect(1); 32 | 33 | new tinymce.util.JSONRequest({}).send({ 34 | type : 'GET', 35 | url : 'tinymce/util/json_rpc_error.js', 36 | error: function(error) { 37 | equal(error.code, 42); 38 | start(); 39 | } 40 | }); 41 | }); 42 | 43 | asyncTest("Error request - sendRPC static method", function() { 44 | expect(1); 45 | 46 | tinymce.util.JSONRequest.sendRPC({ 47 | type : 'GET', 48 | url : 'tinymce/util/json_rpc_error.js', 49 | error: function(error) { 50 | equal(error.code, 42); 51 | start(); 52 | } 53 | }); 54 | }); 55 | } 56 | -------------------------------------------------------------------------------- /js/tinymce-dev/tests/tinymce/util/Observable.js: -------------------------------------------------------------------------------- 1 | module("tinymce.util.Observable"); 2 | 3 | test("Event bubbling/removed state", function() { 4 | var lastName, lastState, data = ''; 5 | 6 | function Class(parentObj) { 7 | this.toggleNativeEvent = function(name, state) { 8 | lastName = name; 9 | lastState = state; 10 | }; 11 | 12 | this.parent = function() { 13 | return parentObj; 14 | }; 15 | } 16 | 17 | tinymce.util.Tools.extend(Class.prototype, tinymce.util.Observable); 18 | 19 | var inst1 = new Class(); 20 | 21 | inst1.on('click', function() { data += 'a'; }); 22 | strictEqual(lastName, 'click'); 23 | strictEqual(lastState, true); 24 | 25 | lastName = lastState = null; 26 | inst1.on('click', function() { data += 'b'; }); 27 | strictEqual(lastName, null); 28 | strictEqual(lastState, null); 29 | 30 | var inst2 = new Class(inst1); 31 | inst2.on('click', function() { data += 'c'; }); 32 | 33 | inst2.fire('click'); 34 | strictEqual(data, 'cab'); 35 | 36 | inst2.on('click', function(e) { e.stopPropagation(); }); 37 | 38 | inst2.fire('click'); 39 | strictEqual(data, 'cabc'); 40 | 41 | inst1.on('remove', function() { data += 'r'; }); 42 | inst1.removed = true; 43 | inst1.fire('click'); 44 | inst1.fire('remove'); 45 | strictEqual(data, 'cabcr'); 46 | }); 47 | -------------------------------------------------------------------------------- /js/tinymce-dev/tests/tinymce/util/XHR.js: -------------------------------------------------------------------------------- 1 | if (location.protocol != "file:") { 2 | module("tinymce.util.XHR"); 3 | 4 | asyncTest("Successful request", function() { 5 | expect(3); 6 | 7 | tinymce.util.XHR.send({ 8 | url : 'tinymce/util/json_rpc_ok.js', 9 | success: function(data, xhr, input) { 10 | equal(tinymce.trim(data), '{"result": "Hello JSON-RPC", "error": null, "id": 1}'); 11 | ok(!!xhr.status); 12 | equal(input.url, 'tinymce/util/json_rpc_ok.js'); 13 | start(); 14 | } 15 | }); 16 | }); 17 | 18 | asyncTest("Unsuccessful request", function() { 19 | expect(3); 20 | 21 | tinymce.util.XHR.send({ 22 | url : 'tinymce/util/404.js', 23 | error: function(type, xhr, input) { 24 | equal(type, 'GENERAL'); 25 | ok(!!xhr.status); 26 | equal(input.url, 'tinymce/util/404.js'); 27 | start(); 28 | } 29 | }); 30 | }); 31 | } 32 | -------------------------------------------------------------------------------- /js/tinymce-dev/tests/tinymce/util/json_rpc_error.js: -------------------------------------------------------------------------------- 1 | {"result": null, "error": {"message":"General failure","code":42}, "id": 1} -------------------------------------------------------------------------------- /js/tinymce-dev/tests/tinymce/util/json_rpc_ok.js: -------------------------------------------------------------------------------- 1 | {"result": "Hello JSON-RPC", "error": null, "id": 1} -------------------------------------------------------------------------------- /js/tinymce-dev/tests/tinymce/util/test.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/js/tinymce-dev/tests/tinymce/util/test.xml -------------------------------------------------------------------------------- /js/tinymce-dev/tools/docs/tinymce.CommandEvent.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This class is the event object send when the BeforeExecCommand and ExecCommand event occurs. 3 | * 4 | * @class tinymce.CommandEvent 5 | * @extends tinymce.Event 6 | * @example 7 | * tinymce.activeEditor.on('ExecCommand', function(e) { 8 | * console.log(e.command, e.ui, e.value); 9 | * }); 10 | */ 11 | 12 | /** 13 | * Name of the command to execute. 14 | * 15 | * @property {String} command 16 | */ 17 | 18 | /** 19 | * User interface state. Normally false. 20 | * 21 | * @property {Boolean} ui User interface state. 22 | */ 23 | 24 | /** 25 | * Value object for the execCommand call. 26 | * 27 | * @property {Object} value 28 | */ 29 | -------------------------------------------------------------------------------- /js/tinymce-dev/tools/docs/tinymce.ContentEvent.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This class is the event object send when the content events occurs such as GetContent/SetContent. 3 | * 4 | * @class tinymce.ContentEvent 5 | * @extends tinymce.Event 6 | * @example 7 | * tinymce.activeEditor.on('GetContent', function(e) { 8 | * console.log(e.content); 9 | * }); 10 | */ 11 | 12 | /** 13 | * Optional state gets added for the load event then it's set to true. 14 | * 15 | * @property {Boolean} load 16 | */ 17 | 18 | /** 19 | * Optional state gets added for the save event then it's set to true. 20 | * 21 | * @property {Boolean} save 22 | */ 23 | 24 | /** 25 | * Optional state gets added for the getContent event then it's set to true. 26 | * 27 | * @property {Boolean} set 28 | */ 29 | 30 | /** 31 | * Optional state gets added for the setContent event then it's set to true. 32 | * 33 | * @property {Boolean} get 34 | */ 35 | 36 | /** 37 | * Optional element that the load/save event is for. This element is the textarea/div element that the 38 | * contents gets parsed from or serialized to. 39 | * 40 | * @property {DOMElement} element 41 | */ 42 | 43 | /** 44 | * Editor contents to be set or the content that was returned from the editor. 45 | * 46 | * @property {String} content HTML contents from the editor or to be put into the editor. 47 | */ 48 | 49 | /** 50 | * Format of the contents normally "html". 51 | * 52 | * @property {String} format Format of the contents normally "html". 53 | */ 54 | -------------------------------------------------------------------------------- /js/tinymce-dev/tools/docs/tinymce.Event.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This is the base class for all TinyMCE events. 3 | * 4 | * @class tinymce.Event 5 | */ 6 | 7 | /** 8 | * Prevents the default action of an event to be executed. 9 | * 10 | * @method preventDefault 11 | */ 12 | 13 | /** 14 | * Prevents the default action of an event to be executed. 15 | * 16 | * @method preventDefault 17 | */ 18 | 19 | /** 20 | * Stops the event from propagating up to listeners on parent objects. 21 | * 22 | * @method stopPropagation 23 | */ 24 | 25 | /** 26 | * Prevents the event from propagating to listeners on the same object. 27 | * 28 | * @method stopImmediatePropagation 29 | */ 30 | 31 | /** 32 | * Returns true/false if the default action is to be prevented or not. 33 | * 34 | * @method isDefaultPrevented 35 | * @return {Boolean} True/false if the event is to be execured or not. 36 | */ 37 | 38 | /** 39 | * Returns true/false if the event propagation is stopped or not. 40 | * 41 | * @method isPropagationStopped 42 | * @return {Boolean} True/false if the event propagation is stopped or not. 43 | */ 44 | 45 | /** 46 | * Returns true/false if the event immediate propagation is stopped or not. 47 | * 48 | * @method isImmediatePropagationStopped 49 | * @return {Boolean} True/false if the event immediate propagation is stopped or not. 50 | */ 51 | 52 | /** 53 | * The event type name for example "click". 54 | * 55 | * @property {String} type 56 | */ 57 | 58 | /** 59 | * @include tinymce.ContentEvent.js 60 | * @include tinymce.CommandEvent.js 61 | * @include tinymce.ProgressStateEvent.js 62 | * @include tinymce.FocusEvent.js 63 | * @include tinymce.ResizeEvent.js 64 | */ 65 | -------------------------------------------------------------------------------- /js/tinymce-dev/tools/docs/tinymce.FocusEvent.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This class is the event object sent when editors are focused/blurred. 3 | * 4 | * @class tinymce.FocusEvent 5 | * @extends tinymce.Event 6 | * @example 7 | * tinymce.activeEditor.on('focus', function(e) { 8 | * console.log(e.blurredEditor); 9 | * }); 10 | * 11 | * tinymce.activeEditor.on('blur', function(e) { 12 | * console.log(e.focusedEditor); 13 | * }); 14 | */ 15 | 16 | /** 17 | * Optional editor instance that got the focus when the blur event occurs. 18 | * 19 | * @property {tinymce.Editor} focusedEditor 20 | */ 21 | 22 | /** 23 | * Optional editor instance that got blurred when the focus event occurs. 24 | * 25 | * @property {tinymce.Editor} blurredEditor 26 | */ 27 | -------------------------------------------------------------------------------- /js/tinymce-dev/tools/docs/tinymce.ProgressStateEvent.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This class is the event object send when the ProgressState event occurs. 3 | * 4 | * @class tinymce.ProgressStateEvent 5 | * @extends tinymce.Event 6 | */ 7 | 8 | /** 9 | * True/false state when to show/hide the progress/throbber state for the editor. 10 | * 11 | * @property {Boolean} state State if the progress/throbber should be shown/hidden. 12 | */ 13 | 14 | /** 15 | * Time to wait before the progress/throbber is shown. 16 | * 17 | * @property {Number} time 18 | */ 19 | -------------------------------------------------------------------------------- /js/tinymce-dev/tools/docs/tinymce.ResizeEvent.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This class is the event object sent when objects gets resized within the editor. 3 | * 4 | * @class tinymce.ResizeEvent 5 | * @extends tinymce.Event 6 | * @example 7 | * tinymce.activeEditor.on('ObjectResizeStart', function(e) { 8 | * if (e.target.nodeName == 'IMG') { 9 | * // Prevent resize 10 | * e.preventDefault(); 11 | * } 12 | * }); 13 | * 14 | * tinymce.activeEditor.on('ObjectResized', function(e) { 15 | * console.log(e.target, e.width, e.height); 16 | * }); 17 | */ 18 | 19 | /** 20 | * Current element that is to be resized or has been resized. 21 | * 22 | * @property {DOMElement} target 23 | */ 24 | 25 | /** 26 | * Current width of the object before or after resize. 27 | * 28 | * @property {Number} width 29 | */ 30 | 31 | /** 32 | * Current height of the object before or after resize. 33 | * 34 | * @property {Number} height 35 | */ 36 | -------------------------------------------------------------------------------- /js/tinymce-dev/tools/nuget/TinyMCE.jQuery.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | TinyMCE.jQuery 5 | 4.0.0 6 | Moxiecode Systems AB 7 | Moxiecode Systems AB, Tugberk Ugurlu 8 | http://www.tinymce.com/license 9 | http://www.tinymce.com/ 10 | http://www.tinymce.com/favicon.ico 11 | true 12 | TinyMCE.jQuery is special jQuery build of TinyMCE and a jQuery integration plugin. TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL by Moxiecode Systems AB. TinyMCE has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances. TinyMCE is very easy to integrate into other Content Management Systems. 13 | TinyMCE.jQuery is special jQuery build of TinyMCE and a jQuery integration plugin. 14 | Editor TinyMCE HTML HTMLEditor JQuery 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /js/tinymce-dev/tools/nuget/TinyMCE.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | TinyMCE 5 | 4.0.0 6 | Moxiecode Systems AB 7 | Moxiecode Systems AB, Tugberk Ugurlu 8 | http://www.tinymce.com/license 9 | http://www.tinymce.com/ 10 | http://www.tinymce.com/favicon.ico 11 | true 12 | The best WYSIWYG editor! TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL by Moxiecode Systems AB. TinyMCE has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances. TinyMCE is very easy to integrate into other Content Management Systems. 13 | TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL by Moxiecode Systems AB. 14 | Editor TinyMCE HTML HTMLEditor 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /js/ui/editor.js: -------------------------------------------------------------------------------- 1 | // 2 | // Rich text editor 3 | // 4 | 5 | module.exports.init = function (selector, callbacks){ 6 | //console.log('tinymce init: ' + selector); 7 | tinymce.remove(selector); 8 | tinymce.init({ 9 | selector: selector, 10 | skin: "p2pweb", 11 | content_css: "style.css", 12 | plugins: "save autolink autoresize code hr link fullpage media image paste table", 13 | browser_spellcheck : true, 14 | 15 | // http://www.tinymce.com/wiki.php/Controls 16 | toolbar: "save fullpage code | undo redo | formatselect styleselect removeformat | bullist numlist | blockquote | link image media table hr", 17 | menubar : false, 18 | 19 | target_list: false, // link 20 | paste_data_images: true, // paste 21 | 22 | formats: { 23 | alignleft: {selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes: 'left'}, 24 | aligncenter: {selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes: 'center'}, 25 | alignright: {selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes: 'right'}, 26 | alignfull: {selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes: 'justify'}, 27 | bold: {inline: 'strong'}, 28 | italic: {inline: 'em'}, 29 | underline: {inline: 'add'}, 30 | strikethrough: {inline: 'del'} 31 | }, 32 | 33 | save_enablewhendirty: false, 34 | save_onsavecallback: callbacks.save, 35 | 36 | link_list: callbacks.link_list, 37 | init_instance_callback: callbacks.init, 38 | setup: callbacks.setup, 39 | }); 40 | }; 41 | 42 | -------------------------------------------------------------------------------- /js/ui/menu.js: -------------------------------------------------------------------------------- 1 | var template = require('./template'); 2 | 3 | module.exports = function(siteList){ 4 | template.menu.push({ 5 | sites: siteList 6 | }); 7 | } 8 | -------------------------------------------------------------------------------- /js/ui/moments.js: -------------------------------------------------------------------------------- 1 | var moment = require("./../moment/min/moment-with-locales.js"); 2 | 3 | function updateMoment(){ 4 | var times = document.querySelectorAll("time.updated.momentFromNow[datetime]"); 5 | for(var i = 0; i < times.length; i++) { 6 | var time = times[i]; 7 | time.textContent = moment(time.getAttribute("datetime")).fromNow(); 8 | } 9 | } 10 | 11 | updateMoment(); 12 | setInterval(updateMoment, 10000); 13 | -------------------------------------------------------------------------------- /nattraveraltest.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var net = require('net'); 4 | var natt = require('./nattraversal'); 5 | 6 | var tcp = new natt.PublicTCP(); 7 | tcp.on('refresh', function(data){ 8 | 9 | sock = net.createServer(function(c){}); 10 | sock.listen(data.local.port, data.local.host); 11 | 12 | console.log("Local listening socket:"); 13 | console.log(sock.address()); 14 | 15 | setTimeout(function(){ 16 | console.log("timeout"); 17 | tcp.close(); 18 | //setTimeout(function(){}, 100000); 19 | }, 5000); 20 | 21 | tcp.on('close', function(){ 22 | sock.close(); 23 | }); 24 | 25 | }); 26 | 27 | tcp.start("stun.stunprotocol.org"); 28 | //tcp.start("stunserver.org"); 29 | //tcp.start('provserver.televolution.net'); 30 | //tcp.start('stun.ipshka.com'); 31 | //tcp.start("perrin.mildred.fr"); 32 | 33 | 34 | -------------------------------------------------------------------------------- /nodewebkit_api.js: -------------------------------------------------------------------------------- 1 | var kad = require('kademlia-dht'); 2 | var MetaHeaders = require('./js/metaheaders'); 3 | 4 | module.exports = function(srv){ 5 | 6 | var api = {}; 7 | 8 | api.removeSeed = function(id, cb) { 9 | if(!srv.dht) return cb(new Error("DHT not initialized")); 10 | if(srv.dht.getRoutes().remove(kad.Id.fromHex(id))) { 11 | return cb(); 12 | } else { 13 | return cb(new Error("Node " + id + " not found in routing table")); 14 | } 15 | }; 16 | 17 | api.sendBlob = function(blob, blobid, mh, cb){ 18 | var headers = mh.toHeaders(); // FIXME 19 | srv.putObjectBuffered(blobid, headers, blob, cb) 20 | }; 21 | 22 | api.getBlob = function(blobid, cache, cb) { // cb(err, data:string, metaheaders) 23 | srv.getObjectBuffered(blobid, function(err, data, metadata){ 24 | var mh = data ? new MetaHeaders(metadata.headers) : null; 25 | cb(err, data && data.toString(), mh); 26 | }); 27 | }; 28 | 29 | api.getBlobCache = function (blobid, cb) { 30 | return api.getBlob(blobid, true, cb); 31 | }; 32 | 33 | api.getBlobNoCache = function (blobid, cb) { 34 | return api.getBlob(blobid, false, cb); 35 | }; 36 | 37 | return api; 38 | 39 | }; 40 | -------------------------------------------------------------------------------- /p2pweb.do: -------------------------------------------------------------------------------- 1 | redo-ifchange p2pweb.nw 2 | cp $(which nw-0.8.4) $3 3 | cat p2pweb.nw >>$3 4 | -------------------------------------------------------------------------------- /p2pweb.nw.do: -------------------------------------------------------------------------------- 1 | zip -r $3 . -x '*.nw' -x '*~' -x data100 -x '.*' -x '*.log' 2 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "p2pweb", 3 | "description": "Peer to Peer web", 4 | "dependencies" : { 5 | "express": "*", 6 | "pure": "*", 7 | "tmp": "*", 8 | "jssha": "git://github.com/Caligatio/jsSHA.git", 9 | "weld": "*", 10 | "tinymce": "*", 11 | "moment": "*", 12 | "mkdirp": "*", 13 | "jsencrypt": "git://github.com/travist/jsencrypt.git", 14 | "utp": "git://github.com/mildred/utp.git", 15 | "kademlia-dht": "git://github.com/mildred/kademlia-dht.git" 16 | }, 17 | "engines": { 18 | "node": "0.10.x" 19 | }, 20 | "main": "index.html" 21 | } 22 | -------------------------------------------------------------------------------- /prepare-nw.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cd "$(dirname "$0")" 3 | root="$PWD" 4 | cd js 5 | ln -sfn ../node_modules/tinymce tinymce 6 | ln -sfn $root/tinymce-skin-p2pweb tinymce/skins/p2pweb 7 | ln -sfn $root/tinymce-skin-p2pweb tinymce-dev/js/tinymce/skins/p2pweb 8 | ln -sfn ../node_modules/jsencrypt/bin jsencrypt 9 | ln -sfn ../node_modules/jssha/src jssha 10 | ln -sfn ../node_modules/pure/libs pure 11 | ln -sfn ../node_modules/moment/ moment 12 | 13 | -------------------------------------------------------------------------------- /random.js: -------------------------------------------------------------------------------- 1 | module.exports.int = function (low, high) { 2 | return Math.floor(Math.random() * (high - low) + low); 3 | } 4 | 5 | module.exports.key = function (array) { 6 | var keys = Object.keys(array); 7 | var key = module.exports.int(0, keys.length); 8 | return keys[key]; 9 | } 10 | 11 | module.exports.value = function (array) { 12 | return array[module.exports.key(array)]; 13 | } 14 | 15 | module.exports.shuffle = function(array) { 16 | var currentIndex = array.length; 17 | 18 | // While there remain elements to shuffle... 19 | while (0 !== currentIndex) { 20 | 21 | // Pick a remaining element... 22 | var randomIndex = Math.floor(Math.random() * currentIndex); 23 | currentIndex -= 1; 24 | 25 | // And swap it with the current element. 26 | var tmp = array[currentIndex]; 27 | array[currentIndex] = array[randomIndex]; 28 | array[randomIndex] = tmp; 29 | } 30 | 31 | return array; 32 | } 33 | -------------------------------------------------------------------------------- /readall.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = function(stream, callback){ 3 | var dataList = []; 4 | 5 | stream.on('data', onData); 6 | stream.on('end', onEnd); 7 | stream.on('error', onError); 8 | 9 | function onData(chunk) { 10 | if(typeof chunk == "string") chunk = new Buffer(chunk); 11 | dataList.push(chunk); 12 | } 13 | 14 | function onEnd() { 15 | callback(null, Buffer.concat(dataList)); 16 | } 17 | 18 | function onError(err) { 19 | stream.removeListener('data', onData); 20 | stream.removeListener('end', onData); 21 | stream.removeListener('error', onData); 22 | callback(err, Buffer.concat(dataList)); 23 | } 24 | }; 25 | 26 | -------------------------------------------------------------------------------- /run-server-1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exec ./server.js -seedurl ws://localhost:8881/ws/p2pwebseeds -data data -port 1337 4 | -------------------------------------------------------------------------------- /run-server-2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -ex 2 | 3 | exec ./server.js -seedurl ws://localhost:8881/ws/p2pwebseeds -data data2 -port 1338 4 | -------------------------------------------------------------------------------- /run-server-3.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exec ./server.js -seedurl ws://perrin.mildred.fr:81/ws/p2pwebseeds -data data -port 1337 4 | -------------------------------------------------------------------------------- /run-server-4.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exec ./server.js -seedurl ws://perrin.mildred.fr:81/ws/p2pwebseeds -data data2 -port 1338 4 | -------------------------------------------------------------------------------- /run-server-seed.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -ex 2 | 3 | exec ./seedserver.js 8881 4 | -------------------------------------------------------------------------------- /seedserver.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var port = process.env.PORT || parseInt(process.argv[2]) || 81; 4 | 5 | var http = require('http'); 6 | var express = require('express'); 7 | var sockets = require('./sockets'); 8 | 9 | var app = express(); 10 | var websock = new sockets.server(); 11 | 12 | var seeds = []; 13 | 14 | websock.connect('/ws/p2pwebseeds', function(request, socket){ 15 | var seedaddr; 16 | if(request.httpRequest.headers['x-forwarded-for']) { 17 | seedaddr = [request.httpRequest.headers['x-forwarded-for'], request.socket.remotePort]; 18 | console.log(request.httpRequest.headers); 19 | } else { 20 | seedaddr = [request.socket.remoteAddress.replace(/^::ffff:/, ""), request.socket.remotePort]; 21 | } 22 | var seedaddr_s = JSON.stringify(seedaddr); 23 | 24 | var sendSeeds = function() { 25 | socket.send(JSON.stringify({ 26 | seeds: seeds, 27 | address: seedaddr 28 | })); 29 | } 30 | 31 | seeds.push(seedaddr); 32 | sendSeeds(); 33 | console.log("+ " + seedaddr_s); 34 | 35 | socket.on('message', function(message) { 36 | //var data = JSON.parse(message.utf8Data || message.binaryData); 37 | //console.log(data); 38 | sendSeeds(); 39 | }); 40 | 41 | socket.on('close', function(reasonCode, description){ 42 | // Remove all occurences of seedaddr 43 | var seeds2 = []; 44 | for(var i = 0; i < seeds.length; i++) { 45 | if(JSON.stringify(seeds[i]) != seedaddr_s) seeds2.push(seeds[i]); 46 | } 47 | seeds = seeds2; 48 | console.log("- " + seedaddr_s); 49 | }); 50 | }); 51 | 52 | var server = http.Server(app); 53 | websock.listen(server); 54 | server.listen(port, function(){ 55 | console.log('* Server running at http://localhost:' + port + '/'); 56 | console.log('* Seeds at ws://localhost:' + port + '/ws/p2pwebseeds'); 57 | }); 58 | 59 | 60 | -------------------------------------------------------------------------------- /server-cli.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var server = require('./server'); 4 | 5 | var srv = new server(); 6 | 7 | if(exports.parsed) return; 8 | exports.parsed = true; 9 | for(var i = 2; i < process.argv.length; i++){ 10 | var arg = process.argv[i]; 11 | if(arg == "-port") { 12 | srv.setPort(parseInt(process.argv[++i])); 13 | } else if(arg == "-data") { 14 | srv.setDataDir(process.argv[++i]); 15 | } else if(arg == "-seedlist") { 16 | throw new Error("-seedlist not implemented"); 17 | } else if(arg == "-seed") { 18 | srv.addSeed(process.argv[++i]); 19 | } else if(parseInt(arg)) { 20 | srv.setPort(parseInt(arg)); 21 | } else { 22 | if(arg != "-help") console.log("Unknown argument " + arg); 23 | console.log(process.argv[1] + " [-port PORTNUM] [-data DATADIR] [-seed URL] [-seedlist FILE] [PORTNUM]"); 24 | console.log(process.argv[1] + " -help"); 25 | return; 26 | } 27 | } 28 | 29 | srv.start(); 30 | 31 | -------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | textarea.rich { 2 | width: 100%; 3 | height: 10em; 4 | } 5 | .template:not(.evaluated) { 6 | display: none; 7 | } 8 | .left { 9 | text-align: left; 10 | } 11 | .center { 12 | text-align: center; 13 | } 14 | .right { 15 | text-align: right; 16 | } 17 | .justify { 18 | text-align: justify; 19 | } 20 | input { 21 | font: inherit; 22 | } 23 | input[type=text], input[type=datetime] { 24 | border-top: none; 25 | border-left: none; 26 | border-right: none; 27 | } 28 | .mce-btn-group button { 29 | height: 24px; 30 | } 31 | .pageitem.unsigned { 32 | font-style: italic; 33 | } 34 | aside { 35 | font-style: italic; 36 | } 37 | nav { 38 | float: right; 39 | } 40 | .hidden { 41 | display: none; 42 | } 43 | 44 | #section-status .data dl { 45 | margin-top: 0; 46 | } 47 | -------------------------------------------------------------------------------- /tcp2udp.js: -------------------------------------------------------------------------------- 1 | module.exports = function(sock, debug){ 2 | 3 | sock.send = function(data, offset, length, port, host, callback){ 4 | var sendData = data.slice(offset, offset + length); 5 | this.write(sendData); 6 | if(debug){ 7 | console.log("TCP2UDP Send:"); 8 | console.log(sendData); 9 | } 10 | if(callback) callback(); 11 | }; 12 | 13 | sock.on('data', function(data){ 14 | var rinfo = {address: this.remoteAddress, port: this.remotePort}; 15 | if(!this.concatData) this.concatData = data; 16 | else this.concatData = Buffer.concat([this.concatData, data]); 17 | while(this.concatData.length >= 4) { 18 | var len = this.concatData.readUInt16BE(2) + 20; 19 | if(this.concatData.length < len) break; 20 | var msg = this.concatData.slice(0, len); 21 | if(debug){ 22 | console.log("TCP2UDP Message:"); 23 | console.log(msg); 24 | } 25 | this.emit('message', msg, rinfo); 26 | this.concatData = this.concatData.slice(len); 27 | } 28 | }); 29 | 30 | return sock; 31 | } 32 | -------------------------------------------------------------------------------- /testsock.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var net = require('net'); 4 | var addon = require('sock'); 5 | 6 | //console.log(addon.hello()); 7 | //console.log(addon.socket('AF_INET', 'SOCK_STREAM')); // 'world' 8 | var sockfd = addon.socket({node: '0.0.0.0', service: 100, socktype: 'SOCK_STREAM'}) 9 | 10 | var sock = new net.Socket({fd: sockfd}) 11 | sock.connect(1234); 12 | console.log(sock); 13 | -------------------------------------------------------------------------------- /tinymce-skin-p2pweb/content.inline.min.css: -------------------------------------------------------------------------------- 1 | .mce-object{border:1px dotted #3A3A3A;background:#d5d5d5 url(img/object.gif) no-repeat center}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px;page-break-before:always}@media print{.mce-pagebreak{border:0px}}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px !important;height:9px !important;border:1px dotted #3A3A3A;background:#d5d5d5 url(img/anchor.gif) no-repeat center}.mce-nbsp{background:#AAA}/*hr{cursor:default}*/.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#3399ff;color:#fff}.mce-spellchecker-word{border-bottom:2px solid #F00;cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid #008000;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td.mce-item-selected,th.mce-item-selected{background-color:#3399ff !important}.mce-edit-focus{outline:1px dotted #333} 2 | -------------------------------------------------------------------------------- /tinymce-skin-p2pweb/content.min.css: -------------------------------------------------------------------------------- 1 | /*body{background-color:#FFFFFF;color:#000000;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px;scrollbar-3dlight-color:#F0F0EE;scrollbar-arrow-color:#676662;scrollbar-base-color:#F0F0EE;scrollbar-darkshadow-color:#DDDDDD;scrollbar-face-color:#E0E0DD;scrollbar-highlight-color:#F0F0EE;scrollbar-shadow-color:#F0F0EE;scrollbar-track-color:#F5F5F5}td,th{font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px}*/.mce-object{border:1px dotted #3A3A3A;background:#d5d5d5 url(img/object.gif) no-repeat center}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px;page-break-before:always}@media print{.mce-pagebreak{border:0px}}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px !important;height:9px !important;border:1px dotted #3A3A3A;background:#d5d5d5 url(img/anchor.gif) no-repeat center}.mce-nbsp{background:#AAA}/*hr{cursor:default}*/.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#3399ff;color:#fff}.mce-spellchecker-word{border-bottom:2px solid #F00;cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid #008000;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td.mce-item-selected,th.mce-item-selected{background-color:#3399ff !important}.mce-edit-focus{outline:1px dotted #333} 2 | -------------------------------------------------------------------------------- /tinymce-skin-p2pweb/fonts/readme.md: -------------------------------------------------------------------------------- 1 | Icons are generated and provided by the http://icomoon.io service. 2 | -------------------------------------------------------------------------------- /tinymce-skin-p2pweb/fonts/tinymce-small.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/tinymce-skin-p2pweb/fonts/tinymce-small.eot -------------------------------------------------------------------------------- /tinymce-skin-p2pweb/fonts/tinymce-small.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/tinymce-skin-p2pweb/fonts/tinymce-small.ttf -------------------------------------------------------------------------------- /tinymce-skin-p2pweb/fonts/tinymce-small.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/tinymce-skin-p2pweb/fonts/tinymce-small.woff -------------------------------------------------------------------------------- /tinymce-skin-p2pweb/fonts/tinymce.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/tinymce-skin-p2pweb/fonts/tinymce.eot -------------------------------------------------------------------------------- /tinymce-skin-p2pweb/fonts/tinymce.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/tinymce-skin-p2pweb/fonts/tinymce.ttf -------------------------------------------------------------------------------- /tinymce-skin-p2pweb/fonts/tinymce.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/tinymce-skin-p2pweb/fonts/tinymce.woff -------------------------------------------------------------------------------- /tinymce-skin-p2pweb/img/anchor.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/tinymce-skin-p2pweb/img/anchor.gif -------------------------------------------------------------------------------- /tinymce-skin-p2pweb/img/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/tinymce-skin-p2pweb/img/loader.gif -------------------------------------------------------------------------------- /tinymce-skin-p2pweb/img/object.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/tinymce-skin-p2pweb/img/object.gif -------------------------------------------------------------------------------- /tinymce-skin-p2pweb/img/trans.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/tinymce-skin-p2pweb/img/trans.gif -------------------------------------------------------------------------------- /tinymce-skin-p2pweb/img/wline.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildred/p2pweb/86b269f8378ff98c76853916fee7949c80a9db5e/tinymce-skin-p2pweb/img/wline.gif -------------------------------------------------------------------------------- /tinymce-skin-p2pweb/skin.json: -------------------------------------------------------------------------------- 1 | { 2 | "skin-name": "p2pweb", 3 | "preview-bg": "#eeeeee", 4 | "text": "#333333", 5 | "text-inverse": "#ffffff", 6 | "text-disabled": "#aaaaaa", 7 | "has-gradients": false, 8 | "has-radius": true, 9 | "has-boxshadow": true, 10 | "btn-text": "#333333", 11 | "btn-text-shadow": "#ffffff", 12 | "btn-bg": "#ffffff", 13 | "btn-bg-hlight": "#d9d9d9", 14 | "btn-border-top": "rgba(0,0,0,0.1)", 15 | "btn-border-right": "rgba(0,0,0,0.1)", 16 | "btn-border-bottom": "rgba(0,0,0,0.25)", 17 | "btn-border-left": "rgba(0,0,0,0.25)", 18 | "btn-split-border": "#bdbdbd", 19 | "btn-primary-text": "#ffffff", 20 | "btn-primary-text-shadow": "#333333", 21 | "btn-primary-bg": "#0088cc", 22 | "btn-primary-bg-hlight": "#0044cc", 23 | "menu-bg": "#ffffff", 24 | "menu-border": "rgba(0,0,0,0.2)", 25 | "menuitem-text": "#333333", 26 | "menuitem-bg-selected": "#0088cc", 27 | "menuitem-bg-selected-hlight": "#0077b3", 28 | "menuitem-separator-top": "#cbcbcb", 29 | "menuitem-separator-bottom": "#ffffff", 30 | "menuitem-text-inverse": "#ffffff", 31 | "menuitem-bg-active": "#c8def4", 32 | "menuitem-text-active": "#333333", 33 | "menuitem-preview-border-active": "#aaaaaa", 34 | "checkbox-border": "#c5c5c5", 35 | "checkbox-border-focus": "#59a5e1", 36 | "panel-border": "#9e9e9e", 37 | "panel-bg": "transparent", 38 | "panel-bg-hlight": "transparent", 39 | "textbox-bg": "#ffffff", 40 | "textbox-border": "#c5c5c5", 41 | "textbox-border-focus": "#59a5e1", 42 | "window-bg": "#ffffff", 43 | "window-border": "#c4c4c4", 44 | "tab-bg": "#e3e3e3", 45 | "tab-bg-hover": "#fdfdfd", 46 | "tab-bg-active": "#fdfdfd", 47 | "tab-border": "#c5c5c5", 48 | "colorbtn-backcolor-bg": "#bbbbbb", 49 | "grid-border": "#d6d6d6", 50 | "grid-border-active": "#a1a1a1" 51 | } -------------------------------------------------------------------------------- /tools-ws.html: -------------------------------------------------------------------------------- 1 |

WebSockets Tools

2 | 3 | 72 | -------------------------------------------------------------------------------- /update.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | zero="$0" 4 | root="$(dirname "$0")" 5 | set -e 6 | 7 | pull(){ 8 | ( cd "$root" 9 | git pull --ff-only 10 | ) 11 | if "$zero" the-rest; then 12 | echo "Success" 13 | else 14 | echo "Failure" 15 | fi 16 | } 17 | 18 | case "$1" in 19 | the-rest) 20 | cd "$root" 21 | npm install 22 | git submodule update --init --checkout --force 23 | "$PWD/sysvservice.sh" install-deps 24 | "$PWD/sysvservice.sh" install-init.d 25 | "$PWD/sysvservice.sh" enable || echo "Error ignored" 26 | "$PWD/sysvservice.sh" restart 27 | exit 0 28 | ;; 29 | *) 30 | date 31 | pull 32 | ;; 33 | esac 34 | 35 | -------------------------------------------------------------------------------- /verifysign.js: -------------------------------------------------------------------------------- 1 | var crypto = require('crypto'); 2 | 3 | var wordwrap = function (str, width) { 4 | width = width || 64; 5 | if (!str) { 6 | return str; 7 | } 8 | var regex = '(.{1,' + width + '})( +|$\n?)|(.{1,' + width + '})'; 9 | return str.match(RegExp(regex, 'g')).join('\n'); 10 | }; 11 | 12 | module.exports = function(text, sign, pubkey){ 13 | var v = crypto.createVerify("RSA-SHA1"); 14 | v.update(text); 15 | pubkey = "-----BEGIN PUBLIC KEY-----\n" + wordwrap(pubkey) + "\n-----END PUBLIC KEY-----"; 16 | return v.verify(pubkey, sign, 'hex'); 17 | }; 18 | --------------------------------------------------------------------------------