The name candlestick comes from the times when the telephone had just been invented. One of the first models of a telephone was a stick which was placed on a table where the speaker could talk into it.
A treeWalker walks through the whole DOM and collects all
textNodes. If a node
matches a phone number the number will be replaced with a
<a href="tel:phonenumber">Your phonenumber</a>
link. Existing links or input fields are not affected.
By default the candlestick.integration.js is loaded which converts all phone numbers in the body.
Table of Contents
- Client library
Plone 4.3.x Plone 5.1.x
- Add the package to your buildout configuration:
[instance] eggs += ... ftw.candlestick
- Fork this repo
- Clone your fork
- Shell: ln -s development.cfg buidlout.cfg
- Shell: python boostrap.py
- Shell: bin/buildout
Or start an instance by running bin/instance fg.
This package is copyright by 4teamwork.
ftw.candlestick is licensed under GNU General Public License, version 2.
The client library depends on Grunt. Assuming you already have Node.js installed on your system, run the following command:
sudo npm install -g grunt
To install the dependencies, run the following command:
And with npm you get the following packages:
Run the following command to re-build the library:
Run the following command to watch for changes which trigger a rebuild:
See https://github.com/substack/browserify-handbook for more information about browserify.
Browserify comes with a built-in support to generate source maps. It is already enabled by default, but feel free to disable source maps. Refer to this article to enable source maps in Google Chrome, if you haven’t already done so.
Run all tests
Run a specific test
grunt test --grep="Name of your test"
Converts all phone numbers to links
- Combine yarn watch and grunt watch [Nachtalb]
- Fix candlestick being run to early before DOM is ready [Nachtalb]
- Fix plone 5 resource bundle for production mode. [tinagerber]
- Add profile (and uninstall profile) for Plone 5. [djowett-ftw]
- Update README.rst to improve English and note Plone5.1 compatibility. [djowett-ftw]
- Test against Plone 5.1.x. [mbaechtold]
- Add HISTORY.txt to long description. [busykoala]
- IBAN number are no longer recognized as phone numbers. [Kevin Bieri]
Fix parson of phonenumbers.
- No longer allow too short phonenumbers
- Allow phone numbers with varying spaces around number groups
Move phonenumbers samples to testing section. [Kevin Bieri]
Fix readme. [Kevin Bieri]
Fix parse and replace issues.
- Parentheses should not be included in the phone links.
- Trailing text should not be ignored.
- Fix error in treeWalker on Internet Explorer >= 9. [Kevin Bieri]
- Initial implementation
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size ftw.candlestick-1.1.4.tar.gz (276.8 kB)||File type Source||Python version None||Upload date||Hashes View|