Merge pull request #8917 from MrPetovan/task/8914-replace-jquery-textcomplete

Replace jquery-textcomplete with yuku/old-textcomplete
This commit is contained in:
Michael Vogel 2020-07-23 05:16:40 +02:00 committed by GitHub
commit 0a6bb20bc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 241 additions and 1923 deletions

View File

@ -62,6 +62,7 @@
"npm-asset/jgrowl": "^1.4", "npm-asset/jgrowl": "^1.4",
"npm-asset/moment": "^2.24", "npm-asset/moment": "^2.24",
"npm-asset/perfect-scrollbar": "0.6.16", "npm-asset/perfect-scrollbar": "0.6.16",
"npm-asset/textcomplete": "^0.18.2",
"npm-asset/typeahead.js": "^0.11.1" "npm-asset/typeahead.js": "^0.11.1"
}, },
"repositories": [ "repositories": [

270
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "ded67f7e680a122d0cd3512c2738be97", "content-hash": "7d1fe40c28d815b56d0b5cb323860b26",
"packages": [ "packages": [
{ {
"name": "asika/simple-console", "name": "asika/simple-console",
@ -1276,6 +1276,63 @@
], ],
"time": "2017-07-06T13:46:38+00:00" "time": "2017-07-06T13:46:38+00:00"
}, },
{
"name": "npm-asset/eventemitter3",
"version": "2.0.3",
"dist": {
"type": "tar",
"url": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-2.0.3.tgz",
"shasum": "b5e1079b59fb5e1ba2771c0a993be060a58c99ba"
},
"type": "npm-asset-library",
"extra": {
"npm-asset-bugs": {
"url": "https://github.com/primus/eventemitter3/issues"
},
"npm-asset-main": "index.js",
"npm-asset-directories": [],
"npm-asset-repository": {
"type": "git",
"url": "git://github.com/primus/eventemitter3.git"
},
"npm-asset-scripts": {
"build": "mkdir -p umd && browserify index.js -s EventEmitter3 | uglifyjs -m -o umd/eventemitter3.min.js",
"benchmark": "find benchmarks/run -name '*.js' -exec benchmarks/start.sh {} \\;",
"test": "nyc --reporter=html --reporter=text mocha",
"test-browser": "zuul -- test.js",
"prepublish": "npm run build",
"sync": "node versions.js"
}
},
"license": [
"MIT"
],
"authors": [
{
"name": "Arnout Kazemier"
}
],
"description": "EventEmitter3 focuses on performance while maintaining a Node.js AND browser compatible interface.",
"homepage": "https://github.com/primus/eventemitter3#readme",
"keywords": [
"EventEmitter",
"EventEmitter2",
"EventEmitter3",
"Events",
"addEventListener",
"addListener",
"emit",
"emits",
"emitter",
"event",
"once",
"pub/sub",
"publish",
"reactor",
"subscribe"
],
"time": "2017-03-31T14:51:09+00:00"
},
{ {
"name": "npm-asset/fullcalendar", "name": "npm-asset/fullcalendar",
"version": "3.10.2", "version": "3.10.2",
@ -1792,64 +1849,6 @@
], ],
"time": "2017-01-10T01:03:05+00:00" "time": "2017-01-10T01:03:05+00:00"
}, },
{
"name": "npm-asset/perfect-scrollbar",
"version": "0.6.16",
"dist": {
"type": "tar",
"url": "https://registry.npmjs.org/perfect-scrollbar/-/perfect-scrollbar-0.6.16.tgz",
"shasum": "b1d61a5245cf3962bb9a8407a3fc669d923212fc"
},
"type": "npm-asset-library",
"extra": {
"npm-asset-bugs": {
"url": "https://github.com/noraesae/perfect-scrollbar/issues"
},
"npm-asset-files": [
"dist",
"src",
"index.js",
"jquery.js",
"perfect-scrollbar.d.ts"
],
"npm-asset-main": "./index.js",
"npm-asset-directories": [],
"npm-asset-repository": {
"type": "git",
"url": "git+https://github.com/noraesae/perfect-scrollbar.git"
},
"npm-asset-scripts": {
"test": "gulp",
"before-deploy": "gulp && gulp compress",
"release": "rm -rf dist && gulp && npm publish"
},
"npm-asset-engines": {
"node": ">= 0.12.0"
}
},
"license": [
"MIT"
],
"authors": [
{
"name": "Hyunje Jun",
"email": "me@noraesae.net"
},
{
"name": "Hyunje Jun",
"email": "me@noraesae.net"
}
],
"description": "Minimalistic but perfect custom scrollbar plugin",
"homepage": "https://github.com/noraesae/perfect-scrollbar#readme",
"keywords": [
"frontend",
"jquery-plugin",
"scroll",
"scrollbar"
],
"time": "2017-01-10T01:03:05+00:00"
},
{ {
"name": "npm-asset/php-date-formatter", "name": "npm-asset/php-date-formatter",
"version": "v1.3.6", "version": "v1.3.6",
@ -1888,6 +1887,100 @@
"homepage": "https://github.com/kartik-v/php-date-formatter", "homepage": "https://github.com/kartik-v/php-date-formatter",
"time": "2020-04-14T10:16:32+00:00" "time": "2020-04-14T10:16:32+00:00"
}, },
{
"name": "npm-asset/textarea-caret",
"version": "3.1.0",
"dist": {
"type": "tar",
"url": "https://registry.npmjs.org/textarea-caret/-/textarea-caret-3.1.0.tgz",
"shasum": "5d5a35bb035fd06b2ff0e25d5359e97f2655087f"
},
"type": "npm-asset-library",
"extra": {
"npm-asset-bugs": {
"url": "https://github.com/component/textarea-caret-position/issues"
},
"npm-asset-files": [
"index.js"
],
"npm-asset-main": "index.js",
"npm-asset-directories": [],
"npm-asset-repository": {
"type": "git",
"url": "git+https://github.com/component/textarea-caret-position.git"
}
},
"license": [
"MIT"
],
"description": "(x, y) coordinates of the caret in a textarea or input type='text'",
"homepage": "https://github.com/component/textarea-caret-position#readme",
"keywords": [
"caret",
"position",
"textarea"
],
"time": "2018-02-20T06:11:03+00:00"
},
{
"name": "npm-asset/textcomplete",
"version": "0.18.2",
"dist": {
"type": "tar",
"url": "https://registry.npmjs.org/textcomplete/-/textcomplete-0.18.2.tgz",
"shasum": "de0d806567102f7e32daffcbcc3db05af1515eb5"
},
"require": {
"npm-asset/eventemitter3": ">=2.0.3,<3.0.0",
"npm-asset/textarea-caret": ">=3.0.1,<4.0.0",
"npm-asset/undate": ">=0.2.3,<0.3.0"
},
"type": "npm-asset-library",
"extra": {
"npm-asset-bugs": {
"url": "https://github.com/yuku-t/textcomplete/issues"
},
"npm-asset-main": "lib/index.js",
"npm-asset-directories": [],
"npm-asset-repository": {
"type": "git",
"url": "git+ssh://git@github.com/yuku-t/textcomplete.git"
},
"npm-asset-scripts": {
"build": "yarn run clean && run-p build:*",
"build:dist": "webpack && webpack --env=min && run-p print-dist-gz-size",
"build:docs": "run-p build:docs:*",
"build:docs:html": "webpack --config webpack.doc.config.js && pug -o docs src/doc/index.pug",
"build:docs:md": "documentation build src/*.js -f md -o doc/api.md",
"build:lib": "babel src -d lib -s && for js in src/*.js; do cp $js lib/${js##*/}.flow; done",
"clean": "rm -fr dist docs lib",
"format": "prettier --no-semi --trailing-comma all --write 'src/*.js' 'test/**/*.js'",
"gh-release": "npm pack textcomplete && gh-release -a textcomplete-$(cat package.json|jq -r .version).tgz",
"opener": "wait-on http://localhost:8082 && opener http://localhost:8082",
"print-dist-gz-size": "printf 'dist/textcomplete.min.js.gz: %d bytes\\n' \"$(gzip -9kc dist/textcomplete.min.js | wc -c)\"",
"start": "run-p watch opener",
"test": "run-p test:*",
"test:bundlesize": "yarn run build:dist && bundlesize",
"test:e2e": "NODE_ENV=test karma start --single-run",
"test:lint": "eslint src/*.js test/**/*.js",
"test:typecheck": "flow check",
"watch": "run-p watch:*",
"watch:webpack": "webpack-dev-server --config webpack.doc.config.js",
"watch:pug": "pug -o docs --watch src/doc/index.pug"
}
},
"license": [
"MIT"
],
"authors": [
{
"name": "Yuku Takahashi"
}
],
"description": "Autocomplete for textarea elements",
"homepage": "https://github.com/yuku-t/textcomplete#readme",
"time": "2020-06-10T06:11:00+00:00"
},
{ {
"name": "npm-asset/typeahead.js", "name": "npm-asset/typeahead.js",
"version": "0.11.1", "version": "0.11.1",
@ -1940,6 +2033,48 @@
], ],
"time": "2015-04-27T04:03:42+00:00" "time": "2015-04-27T04:03:42+00:00"
}, },
{
"name": "npm-asset/undate",
"version": "0.2.4",
"dist": {
"type": "tar",
"url": "https://registry.npmjs.org/undate/-/undate-0.2.4.tgz",
"shasum": "ccb2a8cf38edc035d1006fcb2909c4c6024a8400"
},
"type": "npm-asset-library",
"extra": {
"npm-asset-bugs": {
"url": "https://github.com/yuku-t/undate/issues"
},
"npm-asset-main": "lib/index.js",
"npm-asset-directories": [],
"npm-asset-repository": {
"type": "git",
"url": "git+https://github.com/yuku-t/undate.git"
},
"npm-asset-scripts": {
"build": "babel src -d lib && for js in src/*.js; do cp $js lib/${js##*/}.flow; done",
"test": "run-p test:*",
"test:eslint": "eslint src/*.js test/*.js",
"test:flow": "flow check",
"test:karma": "karma start --single-run"
}
},
"license": [
"MIT"
],
"authors": [
{
"name": "Yuku Takahashi"
}
],
"description": "Undoable update for HTMLTextAreaElement",
"homepage": "https://github.com/yuku-t/undate#readme",
"keywords": [
"textarea"
],
"time": "2018-01-24T10:49:39+00:00"
},
{ {
"name": "paragonie/certainty", "name": "paragonie/certainty",
"version": "v2.6.1", "version": "v2.6.1",
@ -4669,6 +4804,20 @@
"polyfill", "polyfill",
"portable" "portable"
], ],
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2020-05-12T16:14:59+00:00" "time": "2020-05-12T16:14:59+00:00"
}, },
{ {
@ -4801,5 +4950,6 @@
"platform-dev": [], "platform-dev": [],
"platform-overrides": { "platform-overrides": {
"php": "7.0" "php": "7.0"
} },
"plugin-api-version": "1.1.0"
} }

View File

@ -197,6 +197,23 @@ function string2bb(element) {
* jQuery plugin 'editor_autocomplete' * jQuery plugin 'editor_autocomplete'
*/ */
(function( $ ) { (function( $ ) {
let textcompleteObjects = [];
// jQuery wrapper for yuku/old-textcomplete
// uses a local object directory to avoid recreating Textcomplete objects
$.fn.textcomplete = function (strategies, options) {
if (!(this.data('textcompleteId') in textcompleteObjects)) {
let editor = new Textcomplete.editors.Textarea(this.get(0));
this.data('textcompleteId', textcompleteObjects.length);
textcompleteObjects.push(new Textcomplete(editor, options));
}
textcompleteObjects[this.data('textcompleteId')].register(strategies);
return this;
};
/** /**
* This function should be called immediately after $.textcomplete() to prevent the escape key press to propagate * This function should be called immediately after $.textcomplete() to prevent the escape key press to propagate
* after the autocompletion dropdown has closed. * after the autocompletion dropdown has closed.
@ -278,13 +295,10 @@ function string2bb(element) {
this.attr('autocomplete','off'); this.attr('autocomplete','off');
this.textcomplete([contacts, forums, smilies, tags], {className:'acpopup', zIndex:10000}); this.textcomplete([contacts, forums, smilies, tags], {className:'acpopup', zIndex:10000});
this.fixTextcompleteEscape(); this.fixTextcompleteEscape();
};
})( jQuery );
/** return this;
* jQuery plugin 'search_autocomplete' };
*/
(function( $ ) {
$.fn.search_autocomplete = function(backend_url) { $.fn.search_autocomplete = function(backend_url) {
// Autocomplete contacts // Autocomplete contacts
contacts = { contacts = {
@ -317,10 +331,10 @@ function string2bb(element) {
this.textcomplete([contacts, community, tags], {className:'acpopup', maxCount:100, zIndex: 10000, appendTo:'nav'}); this.textcomplete([contacts, community, tags], {className:'acpopup', maxCount:100, zIndex: 10000, appendTo:'nav'});
this.fixTextcompleteEscape(); this.fixTextcompleteEscape();
this.on('textComplete:select', function(e, value, strategy) { submit_form(this); }); this.on('textComplete:select', function(e, value, strategy) { submit_form(this); });
};
})( jQuery );
(function( $ ) { return this;
};
$.fn.name_autocomplete = function(backend_url, typ, autosubmit, onselect) { $.fn.name_autocomplete = function(backend_url, typ, autosubmit, onselect) {
if(typeof typ === 'undefined') typ = ''; if(typeof typ === 'undefined') typ = '';
if(typeof autosubmit === 'undefined') autosubmit = false; if(typeof autosubmit === 'undefined') autosubmit = false;
@ -345,10 +359,10 @@ function string2bb(element) {
if(typeof onselect !== 'undefined') { if(typeof onselect !== 'undefined') {
this.on('textComplete:select', function(e, value, strategy) { onselect(value); }); this.on('textComplete:select', function(e, value, strategy) { onselect(value); });
} }
};
})( jQuery );
(function( $ ) { return this;
};
$.fn.bbco_autocomplete = function(type) { $.fn.bbco_autocomplete = function(type) {
if (type === 'bbcode') { if (type === 'bbcode') {
var open_close_elements = ['bold', 'italic', 'underline', 'overline', 'strike', 'quote', 'code', 'spoiler', 'map', 'img', 'url', 'audio', 'video', 'embed', 'youtube', 'vimeo', 'list', 'ul', 'ol', 'li', 'table', 'tr', 'th', 'td', 'center', 'color', 'font', 'size', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'nobb', 'noparse', 'pre', 'abstract']; var open_close_elements = ['bold', 'italic', 'underline', 'overline', 'strike', 'quote', 'code', 'spoiler', 'map', 'img', 'url', 'audio', 'video', 'embed', 'youtube', 'vimeo', 'list', 'ul', 'ol', 'li', 'table', 'tr', 'th', 'td', 'center', 'color', 'font', 'size', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'nobb', 'noparse', 'pre', 'abstract'];
@ -399,6 +413,8 @@ function string2bb(element) {
} }
} }
}); });
return this;
}; };
})( jQuery ); })( jQuery );
// @license-end // @license-end

View File

@ -1,340 +0,0 @@
# Change Log
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/) by version 1.0.0.
This change log adheres to [keepachangelog.com](http://keepachangelog.com).
## [Unreleased]
## [1.3.4] - 2016-04-20
### Fixed
- Fix endless loop when RTL ([#247](https://github.com/yuku-t/jquery-textcomplete/pull/247))
## [1.3.3] - 2016-04-04
### Fixed
- Fix uncaught TypeError.
## [1.3.2] - 2016-03-27
### Fixed
- Fix dropdown position problem with `line-height: normal`.
## [1.3.1] - 2016-03-23
### Fixed
- Fix `input[type=search]` support.
## [1.3.0] - 2016-03-20
### Added
- Add optional "id" strategy parameter.
## [1.2.2] - 2016-03-19
### Fixed
- Remove dropdown element after `textcomplete('destroy')`.
- Skip search after pressing tab.
- Fix dropdown-menu positioning problem using textarea-caret package.
## [1.2.1] - 2016-03-14
### Fixed
- Build dist files.
## [1.2.0] - 2016-03-14
### Added
- Support `input[type=search]` ([#236](https://github.com/yuku-t/jquery-textcomplete/pull/236))
## [1.1.0] - 2016-03-10
### Added
- Add the ability to insert HTML into a "contenteditable" field. ([#217](https://github.com/yuku-t/jquery-textcomplete/pull/217))
### Fixed
- Position relative to appendTo element. ([#234](https://github.com/yuku-t/jquery-textcomplete/pull/234))
- Avoid dropdown bumping into right edge of window. ([#235](https://github.com/yuku-t/jquery-textcomplete/pull/235))
- Fix top position issue when window is scrolled up and parents has fix position. ([#229](https://github.com/yuku-t/jquery-textcomplete/pull/229))
## [1.0.0] - 2016-02-29
### Changed
- Adheres keepachangelog.com.
## [0.8.2] - 2016-02-29
### Added
- Add deactivate method to Completer. ([#233](https://github.com/yuku-t/jquery-textcomplete/pull/233))
## [0.8.1] - 2015-10-22
### Added
- Add condition to ignore skipUnchangedTerm for empty text. ([#210](https://github.com/yuku-t/jquery-textcomplete/pull/210))
## [0.8.0] - 2015-08-31
### Changed
- If undefined is returned from a replace callback dont replace the text. ([#204](https://github.com/yuku-t/jquery-textcomplete/pull/204))
## [0.7.3] - 2015-08-27
### Added
- Add `Strategy#el` and `Strategy#$el` which returns current input/textarea element and corresponding jquery object respectively.
## [0.7.2] - 2015-08-26
### Fixed
- Reset \_term after selected ([#170](https://github.com/yuku-t/jquery-textcomplete/pull/170))
## [0.7.1] - 2015-08-19
### Changed
- Remove RTL support because of some bugs.
## [0.7.0] - 2015-07-02
### Add
- Add support for a "no results" message like the header/footer. ([#179](https://github.com/yuku-t/jquery-textcomplete/pull/179))
- Yield the search term to the template function. ([#177](https://github.com/yuku-t/jquery-textcomplete/pull/177))
- Add amd wrapper. ([#167](https://github.com/yuku-t/jquery-textcomplete/pull/167))
- Add touch devices support. ([#163](https://github.com/yuku-t/jquery-textcomplete/pull/163))
### Changed
- Stop sharing a dropdown element.
## [0.6.1] - 2015-06-30
### Fixed
- Fix bug that Dropdown.\_fitToBottom does not consider window scroll
## [0.6.0] - 2015-06-30
### Added
- Now dropdown elements have "textcomplete-dropdown" class.
## [0.5.2] - 2015-06-29
### Fixed
- Keep dropdown list in browser window. ([#172](https://github.com/yuku-t/jquery-textcomplete/pull/172))
## [0.5.1] - 2015-06-08
### Changed
- Now a replace function is invoked with a user event.
## [0.5.0] - 2015-06-08
### Added
- Support `onKeydown` option.
## [0.4.0] - 2015-03-10
### Added
- Publish to [npmjs](https://www.npmjs.com/package/jquery-textcomplete).
- Support giving a function which returns a regexp to `match` option for dynamic matching.
## [0.3.9] - 2015-03-03
### Fixed
- Deactivate dropdown on escape. ([#155](https://github.com/yuku-t/jquery-textcomplete/pull/155))
## [0.3.8] - 2015-02-26
### Fixed
- Fix completion with enter key. ([#154](https://github.com/yuku-t/jquery-textcomplete/pull/154))
- Fix empty span node is inserted. ([#153](https://github.com/yuku-t/jquery-textcomplete/pull/153))
## [0.3.7] - 2015-01-21
### Added
- Support input([type=text]. [#149](https://github.com/yuku-t/jquery-textcomplete/pull/149))
## [0.3.6] - 2014-12-11
### Added
- Support element.contentEditable compatibility check. ([#147](https://github.com/yuku-t/jquery-textcomplete/pull/147))
### Fixed
- Fixes the fire function for events with additional parameters. ([#145](https://github.com/yuku-t/jquery-textcomplete/pull/145))
## [0.3.5] - 2014-12-11
### Added
- Adds functionality to complete selection on space key. ([#141](https://github.com/yuku-t/jquery-textcomplete/pull/141))
### Fixed
- Loading script in head and destroy method bugfixes. ([#143](https://github.com/yuku-t/jquery-textcomplete/pull/143))
## [0.3.4] - 2014-12-03
### Fixed
- Fix error when destroy is called before the field is focused. ([#138](https://github.com/yuku-t/jquery-textcomplete/pull/138))
- Fix IE bug where it would only trigger when tha carrot was at the end of the line. ([#133](https://github.com/yuku-t/jquery-textcomplete/pull/133))
## [0.3.3] - 2014-09-25
### Added
- Add `className` option.
- Add `match` as the third argument of a search function.
### Fixed
- Ignore `.textcomplete('destory')` on non-initialized elements. ([#118](https://github.com/yuku-t/jquery-textcomplete/pull/118))
- Trigger completer with the current text by default. ([#119](https://github.com/yuku-t/jquery-textcomplete/pull/119))
- Hide dropdown before destroying it. ([#120](https://github.com/yuku-t/jquery-textcomplete/pull/120))
- Don't throw an exception even if a jquery click event is manually triggered. ([#121](https://github.com/yuku-t/jquery-textcomplete/pull/121))
## [0.3.2] - 2014-09-16
### Added
- Add `IETextarea` adapter which supports IE8
- Add `idProperty` option.
- Add `adapter` option.
### Changed
- Rename `Input` as `Adapter`.
## [0.3.1] - 2014-09-10
### Added
- Add `context` strategy option.
- Add `debounce` option.
### Changed
- Recycle `.dropdown-menu` element if available.
## [0.3.0] - 2014-09-10
### Added
- Consider the `tab-size` of textarea.
- Add `zIndex` option.
### Fixed
- Revive `header` and `footer` options.
- Revive `height` option.
## [0.3.0-beta2] - 2014-09-09
### Fixed
- Make sure that all demos work fine.
## [0.3.0-beta1] - 2014-08-31
### Fixed
- Huge refactoring.
## [0.2.6] - 2014-08-16
### Fixed
- Repair contenteditable.
## [0.2.5] - 2014-08-07
### Added
- Enhance contenteditable support. ([#98](https://github.com/yuku-t/jquery-textcomplete/pull/98))
- Support absolute left/right placement. ([#96](https://github.com/yuku-t/jquery-textcomplete/pull/96))
- Support absolute height, scrollbar, pageup and pagedown. ([#87](https://github.com/yuku-t/jquery-textcomplete/pull/87))
## [0.2.4] - 2014-07-02
### Fixed
- Fix horizonal position on contentEditable elements. ([#92](https://github.com/yuku-t/jquery-textcomplete/pull/92))
## [0.2.3] - 2014-06-24
### Added
- Option to supply list view position function. ([#88](https://github.com/yuku-t/jquery-textcomplete/pull/88))
## [0.2.2] - 2014-06-08
### Added
- Append dropdown element to body element by default.
- Tiny refactoring. [#84]
- Ignore tab key when modifier keys are being pushed. ([#85](https://github.com/yuku-t/jquery-textcomplete/pull/85))
- Manual triggering.
## [0.2.1] - 2014-05-15
### Added
- Support `appendTo` option.
- `header` and `footer` supports a function.
### Changed
- Remove textcomplate-wrapper element.
## [0.2.0] - 2014-05-02
### Added
- Contenteditable support.
- Several bugfixes.
- Support `header` and `footer` setting.
## [0.1.4.1] - 2014-04-04
### Added
- Support placement option.
- Emacs-style prev/next keybindings.
- Replay searchFunc for the last term on slow network env.
### Fixed
- Several bugfixes.
## [0.1.3] - 2014-04-07
### Added
- Support RTL positioning.
### Fixed
- Several bugfixes.
## [0.1.2] - 2014-02-08
### Added
- Enable to append strategies on the fly.
- Enable to stop autocompleting.
- Enable to apply multiple textareas at once.
- Don't show popup on pressing arrow up and down keys.
- Hide dropdown by pressing ESC key.
- Prevent showing a dropdown when it just autocompleted.
## [0.1.1] - 2014-02-02
### Added
- Introduce `textComplete:show`, `textComplete:hide` and `textComplete:select` events.
## [0.1.0] - 2013-10-28
### Added
- Now strategies argument is an Array of strategy objects.
## [0.0.4] - 2013-10-28
### Added
- Up and Down arrows cycle instead of exit.
- Support Zepto.
- Support jQuery.overlay.
### Fixed
- Several bugfixes.
## [0.0.3] - 2013-09-11
### Added
- Some performance improvement.
- Implement lazy callbacking on search function.
## [0.0.2] - 2013-09-08
### Added
- Support IE8.
- Some performance improvement.
- Implement cache option.
## 0.0.1 - 2013-09-02
### Added
- Initial release.
[Unreleased]: https://github.com/yuku-t/jquery-textcomplete/compare/v1.3.4...HEAD
[1.3.4]: https://github.com/yuku-t/jquery-textcomplete/compare/v1.3.3...v1.3.4
[1.3.3]: https://github.com/yuku-t/jquery-textcomplete/compare/v1.3.2...v1.3.3
[1.3.2]: https://github.com/yuku-t/jquery-textcomplete/compare/v1.3.1...v1.3.2
[1.3.1]: https://github.com/yuku-t/jquery-textcomplete/compare/v1.3.0...v1.3.1
[1.3.0]: https://github.com/yuku-t/jquery-textcomplete/compare/v1.2.2...v1.3.0
[1.2.2]: https://github.com/yuku-t/jquery-textcomplete/compare/v1.2.1...v1.2.2
[1.2.1]: https://github.com/yuku-t/jquery-textcomplete/compare/v1.2.0...v1.2.1
[1.2.0]: https://github.com/yuku-t/jquery-textcomplete/compare/v1.1.0...v1.2.0
[1.1.0]: https://github.com/yuku-t/jquery-textcomplete/compare/v1.0.0...v1.1.0
[1.0.0]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.8.2...v1.0.0
[0.8.2]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.8.1...v0.8.2
[0.8.1]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.8.0...v0.8.1
[0.8.0]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.7.3...v0.8.0
[0.7.3]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.7.2...v0.7.3
[0.7.2]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.7.1...v0.7.2
[0.7.1]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.7.0...v0.7.1
[0.7.0]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.6.1...v0.7.0
[0.6.1]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.6.0...v0.6.1
[0.6.0]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.5.2...v0.6.0
[0.5.2]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.5.1...v0.5.2
[0.5.1]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.5.0...v0.5.1
[0.5.0]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.4.0...v0.5.0
[0.4.0]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.3.9...v0.4.0
[0.3.9]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.3.8...v0.3.9
[0.3.8]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.3.7...v0.3.8
[0.3.7]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.3.6...v0.3.7
[0.3.6]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.3.5...v0.3.6
[0.3.5]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.3.4...v0.3.5
[0.3.4]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.3.3...v0.3.4
[0.3.3]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.3.2...v0.3.3
[0.3.2]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.3.1...v0.3.2
[0.3.1]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.3.0...v0.3.1
[0.3.0]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.3.0-beta2...v0.3.0
[0.3.0-beta2]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.3.0-beta1...v0.3.0-beta2
[0.3.0-beta1]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.2.6...v0.3.0-beta1
[0.2.6]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.2.5...v0.2.6
[0.2.5]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.2.4...v0.2.5
[0.2.4]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.2.3...v0.2.4
[0.2.3]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.2.2...v0.2.3
[0.2.2]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.2.1...v0.2.2
[0.2.1]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.2.0...v0.2.1
[0.2.0]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.1.4.1...v0.2.0
[0.1.4.1]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.1.3...v0.1.4.1
[0.1.3]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.1.2...v0.1.3
[0.1.2]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.1.1...v0.1.2
[0.1.1]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.1.0...v0.1.1
[0.1.0]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.0.4...v0.1.0
[0.0.4]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.0.3...v0.0.4
[0.0.3]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.0.2...v0.0.3
[0.0.2]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.0.1...v0.0.2

View File

@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2013-2014 Yuku Takahashi
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@ -1,46 +0,0 @@
# Autocomplete for Textarea
[![npm version](https://badge.fury.io/js/jquery-textcomplete.svg)](http://badge.fury.io/js/jquery-textcomplete)
[![Bower version](https://badge.fury.io/bo/jquery-textcomplete.svg)](http://badge.fury.io/bo/jquery-textcomplete)
[![Analytics](https://ga-beacon.appspot.com/UA-4932407-14/jquery-textcomplete/readme)](https://github.com/igrigorik/ga-beacon)
Introduces autocompleting power to textareas, like a GitHub comment form has.
![Demo](http://yuku-t.com/jquery-textcomplete/media/images/demo.gif)
[Demo](http://yuku-t.com/jquery-textcomplete/).
## Synopsis
```js
$('textarea').textcomplete([{
match: /(^|\b)(\w{2,})$/,
search: function (term, callback) {
var words = ['google', 'facebook', 'github', 'microsoft', 'yahoo'];
callback($.map(words, function (word) {
return word.indexOf(term) === 0 ? word : null;
}));
},
replace: function (word) {
return word + ' ';
}
}]);
```
## Dependencies
- jQuery (>= 1.7.0) OR Zepto (>= 1.0)
## Documents
See [doc](https://github.com/yuku-t/jquery-textcomplete/tree/master/doc) dir.
## License
Licensed under the MIT License.
## Contributors
Patches and code improvements were contributed by:
https://github.com/yuku-t/jquery-textcomplete/graphs/contributors

View File

@ -1,33 +0,0 @@
/* Sample */
.dropdown-menu {
border: 1px solid #ddd;
background-color: white;
}
.dropdown-menu li {
border-top: 1px solid #ddd;
padding: 2px 5px;
}
.dropdown-menu li:first-child {
border-top: none;
}
.dropdown-menu li:hover,
.dropdown-menu .active {
background-color: rgb(110, 183, 219);
}
/* SHOULD not modify */
.dropdown-menu {
list-style: none;
padding: 0;
margin: 0;
}
.dropdown-menu a:hover {
cursor: pointer;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -35,7 +35,7 @@
<script type="text/javascript" src="view/js/modernizr.js?v={{$smarty.const.FRIENDICA_VERSION}}" ></script> <script type="text/javascript" src="view/js/modernizr.js?v={{$smarty.const.FRIENDICA_VERSION}}" ></script>
<script type="text/javascript" src="view/asset/jquery/dist/jquery.min.js?v={{$smarty.const.FRIENDICA_VERSION}}" ></script> <script type="text/javascript" src="view/asset/jquery/dist/jquery.min.js?v={{$smarty.const.FRIENDICA_VERSION}}" ></script>
<script type="text/javascript" src="view/js/jquery.textinputs.js?v={{$smarty.const.FRIENDICA_VERSION}}" ></script> <script type="text/javascript" src="view/js/jquery.textinputs.js?v={{$smarty.const.FRIENDICA_VERSION}}" ></script>
<script type="text/javascript" src="view/js/jquery-textcomplete/jquery.textcomplete.min.js?v={{$smarty.const.FRIENDICA_VERSION}}" ></script> <script type="text/javascript" src="view/asset/textcomplete/dist/textcomplete.min.js?v={{$smarty.const.FRIENDICA_VERSION}}" ></script>
<script type="text/javascript" src="view/js/autocomplete.js?v={{$smarty.const.FRIENDICA_VERSION}}" ></script> <script type="text/javascript" src="view/js/autocomplete.js?v={{$smarty.const.FRIENDICA_VERSION}}" ></script>
<script type="text/javascript" src="view/asset/jquery-colorbox/jquery.colorbox-min.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script> <script type="text/javascript" src="view/asset/jquery-colorbox/jquery.colorbox-min.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script>
<script type="text/javascript" src="view/asset/jgrowl/jquery.jgrowl.min.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script> <script type="text/javascript" src="view/asset/jgrowl/jquery.jgrowl.min.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script>

View File

@ -56,7 +56,7 @@
<script type="text/javascript" src="view/js/modernizr.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script> <script type="text/javascript" src="view/js/modernizr.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script>
<script type="text/javascript" src="view/asset/jquery/dist/jquery.min.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script> <script type="text/javascript" src="view/asset/jquery/dist/jquery.min.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script>
<script type="text/javascript" src="view/js/jquery.textinputs.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script> <script type="text/javascript" src="view/js/jquery.textinputs.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script>
<script type="text/javascript" src="view/js/jquery-textcomplete/jquery.textcomplete.min.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script> <script type="text/javascript" src="view/asset/textcomplete/dist/textcomplete.min.js?v={{$smarty.const.FRIENDICA_VERSION}}" ></script>
<script type="text/javascript" src="view/js/autocomplete.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script> <script type="text/javascript" src="view/js/autocomplete.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script>
<script type="text/javascript" src="view/asset/jquery-colorbox/jquery.colorbox-min.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script> <script type="text/javascript" src="view/asset/jquery-colorbox/jquery.colorbox-min.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script>
<script type="text/javascript" src="view/asset/jgrowl/jquery.jgrowl.min.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script> <script type="text/javascript" src="view/asset/jgrowl/jquery.jgrowl.min.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script>