| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A plugin for the OKFN Annotator that improves the usability of the tool on touch devices. It has been tested on the following devices.
There is a demo available online.
The plugin requires the annotator.js and annotator.css to be included on the page. See the annotator Getting Started guide for instructions then simply include the annotator.touch.js and annotator.touch.css file in your page. These can be downloaded from the GitHub releases page.
<link rel="stylesheet" href="./annotator.css" />
<link rel="stylesheet" href="./annotator.touch.css" />
<script src="./jquery.js"></script>
<script src="./annotator.js"></script>
<script src="./annotator.touch.js"></script>Then set up the annotator as usual calling "addPlugin".
jQuery('#content').annotator().annotator("addPlugin", "Touch");There are a few options that can be provided to the "addPlugin" call.
jQuery('#content').annotator().annotator("addPlugin", "Touch", {
force: true,
useHighlighter: true
});The example.html file provided gives a demo of the plugin in action. The various options can be toggled by adding query string parameters.
For example http://localhost:8000/example.html?force&highlighter:
If you're interested in developing the plugin. You can install the developer dependancies by running the following command in the base directory:
$ npm install
Development requires node and npm binaries to be intalled on your system. It has been tested with node --version 0.10.7 and npm --version 1.2.21. Details on installation can be found on the node website.
Run the local server:
$ make serve
Then visit http://localhost:8000 in your browser.
There is a Makefile containing useful commands included.
$ make serve # serves the directory at http://localhost:8000 (requires python) $ make watch # compiles .coffee files into lib/*.js when they change $ make build # creates compiled JavaScript and CSS in the pkg directory $ make pkg # creates a zip file of production files
The development branch should always contain the latest version of the plugin but it is not guaranteed to be in working order. The master branch should always have the latest stable code and each release can be found under an appropriately versioned tag.
Unit tests are located in the test/ directory and can be run by visiting http://localhost:8000/test/index.html in your browser.
The plugin uses the following libraries for development:
This plugin was commissioned and open sourced by Compendio.
Copyright 2012, Compendio Bildungsmedien AG Neunbrunnenstrasse 50 8050 Zürich www.compendio.ch
Released under the [MIT license][#license]
| Back | FazBrowse Home | New Git URL |