diff --git a/api/js/jquery/etherpad/README.md b/api/js/jquery/etherpad/README.md deleted file mode 100644 index 548133aa31..0000000000 --- a/api/js/jquery/etherpad/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# Description - -The Etherpad jQuery Plugin easily allows you to embed and access a pad from Etherpad in a web page. The plugin injects the pad contents into a div using iframes. It can also read the contents of a Pad and write it to a div. - -# Usage & Examples -

Include jQuery.js, include etherpad.js, assign a pad to a div. If you get confused look at the examples in index.html

- -### Sets the pad id and puts the pad in the div -`$('#examplePadBasic').pad({'padId':'test'});` -
- -### Sets the pad id, some more parameters and puts the pad in the div -`$('#examplePadBasic').pad({'padId':'test','showChat':true});` -
- -### Sets the pad id, some plugin parameters and puts the pad in the div -`$('#examplePadPlugins').pad({'padId':'test','plugins':{'pageview':'true'}});` -
- -### Gets the padContents from Example #2 and writes it to the target div "exampleGetContents" -`$('#examplePadBasic').pad({'getContents':'exampleGetContents'});` - -# Available options and parameters -
-'host'             : 'http://beta.etherpad.org', // the host and port of the Etherpad instance, by default the foundation will host your pads for you
-'baseUrl'          : '/p/', // The base URL of the pads
-'showControls'     : false, // If you want to show controls IE bold, italic, etc.
-'showChat'         : false, // If you want to show the chat button or not
-'showLineNumbers'  : false, // If you want to show the line numbers or not
-'userName'         : 'unnamed', // The username you want to pass to the pad
-'useMonospaceFont' : false, // Use monospaced fonts
-'noColors'         : false, // Disable background colors on author text
-'userColor'        : false, // The background color of this authors text in hex format IE #000
-'hideQRCode'       : false, // Hide QR code
-'alwaysShowChat'   : false, // Always show the chat on the UI
-'width'            : 100, // The width of the embedded IFrame
-'height'           : 100,  // The height of the embedded IFrame
-'border'           : 0,    // The width of the border (make sure to append px to a numerical value)
-'borderStyle'      : 'solid', // The CSS style of the border	[none, dotted, dashed, solid, double, groove, ridge, inset, outset]
-'plugins'          : {}, // The options related to the plugins, not to the basic Etherpad configuration
-'rtl'              : false // Show text from right to left
-
- -# Copyright -jQuery Etherpad plugin written by John McLear (c) Primary Technology 2011
-Development funded by the Etherpad Foundation. -Feel free to re-use, distribute, butcher, edit and whatever else you want. -It's under the Apache licence. diff --git a/api/js/jquery/etherpad/etherpad.jquery.json b/api/js/jquery/etherpad/etherpad.jquery.json deleted file mode 100644 index 4082283785..0000000000 --- a/api/js/jquery/etherpad/etherpad.jquery.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "etherpad", - "title": "jQuery Etherpad", - "description": "jQuery plugin for embedding Etherpad", - "keywords": [ - "color", - "animation" - ], - "version": "1.0.2", - "author": { - "name": "John McLear", - "url": "https://github.com/ether/etherpad-lite-jquery-plugin" - }, - "licenses": [ - { - "type": "Apache 2", - "url": "http://www.apache.org/licenses/LICENSE-2.0.html" - } - ], - "bugs": "https://github.com/ether/etherpad-lite-jquery-plugin/issues/", - "homepage": "https://github.com/ether/etherpad-lite-jquery-plugin", - "dependencies": { - "jquery": ">=1.5" - } -} diff --git a/api/js/jquery/etherpad/index.html b/api/js/jquery/etherpad/index.html deleted file mode 100644 index 5dde6c2387..0000000000 --- a/api/js/jquery/etherpad/index.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - Etherpad jQuery Plugin Example - - - - - - -

Etherpad jQuery Plugin Example

- -

Usage:

-

Include jQuery.js, include etherpad.js

- -

Example #1: Sets the pad id and puts the pad in the div

-
$('#examplePadBasic').pad({'padId':'test'});
-
- -

Example #2: Sets the pad id, some more parameters and puts the pad in the div

-
$('#examplePadIntense').pad({'padId':'test2','showChat':'true'});
-
- -

Example #3: Sets the pad id, some plugin parameters and puts the pad in the div

-
$('#examplePadPlugins').pad({'padId':'test3','plugins':{'pageview':'true'}});
-
- -

Example #4: Gets the padContents from Example #2

-
$('#examplePadIntense').pad({'getContents':'exampleGetContents'});
-
Click me to Replace me with the pad contents
- -

Available options and parameters

-
-               'host'             : 'http://beta.etherpad.org', // the host and port of the Etherpad instance, by default the foundation will host your pads for you
-               'baseUrl'          : '/p/',                      // The base URL of the pads
-               'showControls'     : false,                      // If you want to show controls IE bold, italic, etc.
-               'showChat'         : false,                      // If you want to show the chat button or not
-               'showLineNumbers'  : false,                      // If you want to show the line numbers or not
-               'userName'         : 'unnamed',                  // The username you want to pass to the pad
-               'useMonospaceFont' : false,                      // Use monospaced fonts
-               'noColors'         : false,                      // Disable background colors on author text
-               'userColor'        : false,                      // The background color of this authors text in hex format IE #000
-               'hideQRCode'       : false,                      // Hide QR code
-               'alwaysShowChat'   : false,                      // Always show the chat on the UI
-               'width'            : 100,                        // The width of the embedded IFrame
-               'height'           : 100,                        // The height of the embedded IFrame
-               'border'           : 0,                          // The width of the border (make sure to append px to a numerical value)
-               'borderStyle'      : 'solid'                     // The CSS style of the border [none, dotted, dashed, solid, double, groove, ridge, inset, outset]
-               'plugins'          : {},                         // The options related to the plugins, not to the basic Etherpad configuration
-               'rtl'              : false                       // Show right to left text
-        
- - - -

If you are confused, view the source code for examples

- - diff --git a/api/js/jquery/etherpad/js/etherpad.js b/api/js/jquery/etherpad/js/etherpad.js deleted file mode 100644 index 4ab1f81b31..0000000000 --- a/api/js/jquery/etherpad/js/etherpad.js +++ /dev/null @@ -1,113 +0,0 @@ -(function( $ ){ - - $.fn.pad = function( options ) { - var settings = { - 'host' : 'http://localhost:9001', - 'baseUrl' : '/p/', - 'showControls' : false, - 'showChat' : false, - 'showLineNumbers' : false, - 'userName' : 'unnamed', - 'lang' : '', - 'useMonospaceFont' : false, - 'noColors' : false, - 'userColor' : false, - 'hideQRCode' : false, - 'alwaysShowChat' : false, - 'width' : 100, - 'height' : 100, - 'border' : 0, - 'borderStyle' : 'solid', - 'toggleTextOn' : 'Disable Rich-text', - 'toggleTextOff' : 'Enable Rich-text', - 'plugins' : {}, - 'rtl' : false - }; - - var $self = this; - if (!$self.length) return; - if (!$self.attr('id')) throw new Error('No "id" attribute'); - - var useValue = $self[0].tagName.toLowerCase() == 'textarea'; - var selfId = $self.attr('id'); - var epframeId = 'epframe'+ selfId; - // This writes a new frame if required - if ( !options.getContents ) { - if ( options ) { - $.extend( settings, options ); - } - - var pluginParams = ''; - for(var option in settings.plugins) { - pluginParams += '&' + option + '=' + settings.plugins[option] - } - - var iFrameLink = ''; - - - var $iFrameLink = $(iFrameLink); - - if (useValue) { - var $toggleLink = $(''+ settings.toggleTextOn +'').click(function(){ - var $this = $(this); - $this.toggleClass('active'); - if ($this.hasClass('active')) $this.text(settings.toggleTextOff); - $self.pad({getContents: true}); - return false; - }); - $self - .hide() - .after($toggleLink) - .after($iFrameLink) - ; - } - else { - $self.html(iFrameLink); - } - } - - // This reads the etherpad contents if required - else { - var frameUrl = $('#'+ epframeId).attr('src').split('?')[0]; - var contentsUrl = frameUrl + "/export/html"; - var target = $('#'+ options.getContents); - - // perform an ajax call on contentsUrl and write it to the parent - $.get(contentsUrl, function(data) { - - if (target.is(':input')) { - target.val(data).show(); - } - else { - target.html(data); - } - - $('#'+ epframeId).remove(); - }); - } - - - return $self; - }; -})( jQuery );