Skip to main content

ftw.candlestick

Project description

Introduction

The name candlestick comes from the early times when the telephone has been invented. One of the first model of a telephone was a stick which has been placed on table where the speaker had to talk into.

https://upload.wikimedia.org/wikipedia/commons/thumb/0/00/JolsonTelephone.jpg/550px-JolsonTelephone.jpg

This module provides a javascript library for automatically generate phone links. 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 inputfields are not affected.

By default the candlestick.integration.js is being loaded which converts all phone numbers in the body initially.

Compatibility

Plone 4.3.x

Installation

  • Add the package to your buildout configuration:

[instance]
eggs +=
    ...
    ftw.candlestick

Development

Python:

  1. Fork this repo

  2. Clone your fork

  3. Shell: ln -s development.cfg buidlout.cfg

  4. Shell: python boostrap.py

  5. Shell: bin/buildout

Or start an instance by running bin/instance fg.

Client library

Getting Started

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:

npm install

And with npm you get the following packages:

  • Grunt - JavaScript task runner.

  • Babel - ES6 Transpiler.

  • Browserify - Dependency Bundler

  • Karma - JavaScript test runner.

  • Jasmine - JavaScript test suite.

  • Chai - JavaScript Assertion Library.

Usage

Run the following command to re-build the library:

grunt build

Run the following command to watch for changes which trigger a rebuild:

grunt

Build options

See https://github.com/substack/browserify-handbook for more information about browserify.

Source Maps

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.

Tests

Run all tests

grunt test

Run a specific test

grunt test --grep="Name of your test"

Initialization

Converts all phone numbers to links

window.candlestick();

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ftw.candlestick-1.0.2.tar.gz (95.4 kB view details)

Uploaded Source

File details

Details for the file ftw.candlestick-1.0.2.tar.gz.

File metadata

File hashes

Hashes for ftw.candlestick-1.0.2.tar.gz
Algorithm Hash digest
SHA256 aa1348c140097b6caaa01921aa163ef66e2a0478c256a1001a9c187e2698d860
MD5 0b3d8ea9b9ad073dde17d994ddd8af0c
BLAKE2b-256 2470ebf74a9c438081c4d717f2d377081c9114e63ea58f497ae666100a7151d9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page