This repository contains extensions to the Google closure library
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
css
src/plana/ui
LICENSE
README.md

README.md

closure-js

This repository contains extensions to the Google closure library

plana.ui.ac.Autocomplete

This class is a wrapper around the autocomplete component provided in closure. It uses a cached remote object matcher. The remote object matcher can retrieve autocomplete suggestions as plain strings or custom objects. It is best if objects have a 'caption' property. This property is used to display the suggestions. If an object does not have a 'caption' property, 'toString' is used instead.

The class also displays 'Loading' and 'No matches found' messages, if a search is in progress or a token does not match anything. A user can configure how these messages are displayed, disable them completely, or provide their own DOM structure to use instead of text messages.

Here is a demo of the class.

The JSDoc for this class is here.

To get a list of matched items, use the getModel method. To get a list of tokens entered by a user that do not match suggestions from the server use getNonMatches.

plana.ui.TypeaheadSearch

This class extends the autocomplete class to provide an additional search button that can be used to trigger a fulltext search by adding the 'fulltextsearch' parameter to server requests.

An event is fired when the fulltext search completed. The event contains the search token, results of the search, as well as an indication of whether the server found any matches.

Here is a demo of the class.

The JSDoc for this class is here.

plana.ui.tags.TagsInput

This class provides a component to manage tags. It was inspired by the the jquery plugin from Tim Schlechter. It requires bootstrap css to render nicely.

Here is a demo of the class.

The JSDoc for this class is here.

plana.ui.BootstrapDialog

This class is a re-implementation of goog.ui.Dialog to create a bootstrap (css style) compatible modal dialog. It supports decorating existing elements.

Here is a demo of the class.

The JSDoc for this class is here.

==========

Licence

All software is released under the Apache License v2

Donations

PayPal: PayPal