This is a set of jQuery utilities and simple widgets, intended to help web developers with their work with USOS-related projects (primarily, the USOSweb project).
Official project homepage: https://github.com/MUCI/jquery-usos.
To install all dependencies type:
-
npm install
-
Then do
npm run release
to build release in lib/ folder -
Then you can start static server with
npm run server
-
Examples can be previewed at localhost:3000 while the server is running.
Other useful commands are:
-
npm run dev
- build developer version of the library -
npm run export
- export the library (bundled and minified) to USOSweb
- $.usosCore.init - you need to call this before using any other functions.
- $.usosCore.usosapiFetch - fetch/post data from/to USOS API.
- $.usosCore.lang - primary language-helper.
- $.usosCore.panic - display a "panic" screen.
- $.usosEntity.label - display a label with the name of an entity.
- $.usosEntity.link - display a link pointing to an entity.
- $.usosEntity.url - get an URL of entity's home page.
- $.usosUtils.makeParagraphs - sanitize multi-line user-supplied input.
- $.usosUtils.requireFields - verify signatures of complex input objects.
jQuery-UI widgets (see here)
- usosBadge widget - display a badge when user hovers over USOS entities.
- usosValue widget - a base class for all widgets which hold a value.
- usosSelector widget - allow the user to search for an entity and get its ID.
- usosCheckbox widget - usosValue equivalent of
<input type='checkbox'>
with a label. - usosRadioboxes widget - usosValue equivalent of a set of
<input type='radio'>
with labels. - usosSelectbox widget - usosValue equivalent of
<select>
input. - usosTextbox widget - usosValue equivalent of
<input type='text'>
and<textarea>
inputs.
- usosNotice widget - display notices or errors on form elements.
- usosTip widget - display "info" icon with a message on hover.
- usosProgressOverlay widget - display a progress indicator over an element.
- .usosForms(...) - utility functions for working with usosValue forms (i.e. server-side validation).