Skip to content

A Javascript library for grouping, displaying and editing hierarchical data as items or lists of almost any combination of HTML elements, freely mixing lists and items of different types, interacting with lists and list items, using predefined or user defined plugin types and more. Greatly simplifies the building of content-rich websites / apps.

License

arnemorken/anyvista

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CodeQL

anyVista

anyVista is a Javascript/jQuery library that can view, manage and persist data as lists and/or items, and which will greatly simplify building content-rich websites and apps.

anyVista can group, manipulate, display, edit and store hierarchical data as items or lists and display the data as almost any combination of HTML elements, freely mixing lists and items of different types, interacting with lists and list items, using predefined or user defined types and more.

anyVista can read complex hierarchical and clustered data structures and display them in beautiful tables or forms. The data may be read from server or client databases (both included), Ajax, inline code or indeed any data source, as long as it follows a certain flexible data format.

The library is very versatile and can be used for displaying/editing data in web pages as well as in mobile apps, with or without a database back-end. Fully functional server (MySQL) and client (AlaSQL) databases are included for persistent data storage. And it can also be used as a Wordpress plugin.

Early versions of the library are being used in both commercial and non-commercial projects - see screenshots below:

Example 1: "Rulletour", a free online bicycle tournament:

alt text

Example 2: "Acumentor", a commercial Android app for professional acupuncturists:

alt text

jsFiddle examples coming soon.

Download

The library is currently in the last stages of development, but as this project does not have any funding, work is somewhat sporadic. To speed up development, consider making a contribution:

Donate

Find the library at Github: https://github.com/arnemorken/anyvista/.

Usage

  1. Include the anyVista script and CSS files:
<script src="/path/to/anyvista.js"></script>
<link  href="/path/to/anyvista.css" rel="stylesheet"/>
  1. Create a place for the view to live:
<div id="myview"></div>
  1. Provide some data, in this case a list (the data may come from any source as long as it's on the proper format):
let my_data = {
  0: {
    list: "foo",
    foo_name: "Hello world 1",
    foo_desc: "A simple hello to the world",
  },
  1: {
    foo_name: "Hello world 2",
    foo_desc: "Another hello to the world",
  },
};
  1. Feed the data to a model:
let my_model = new anyModel({ data: my_data });
  1. Provide filters to describe the data for the view:
let my_filters = {
  foo: {
    list: {
      foo_id  : { HEADER:"Id",          DISPLAY:0, TYPE:"label" },
      foo_name: { HEADER:"Message",     DISPLAY:1, TYPE:"label" },
      foo_desc: { HEADER:"Description", DISPLAY:1, TYPE:"text" },
    },
  },
};
  1. Give the model and filters to a view, tell the view where to live and display:
let my_view  = new anyView({
  model:   my_model,
  filters: my_filters,
  id:      "myview", // Id of div in which to display result
});
my_view.refresh();

As an alternative to the last step, one could do this:

$("#myview").anyView({
  model:   my_model,
  filters: my_filters,
  id:      "myview", // Id of div in which to display result
});
$("#myview").anyView("refresh");

The above will produce an output like this:

alt text

To make the view editable, give the following extra option to the anyView constructor:

  ...
  isEditable: true,
  ...

We will then get a view like this:

alt text

API

The documentation is currently being updated. Use with caution!

anyVista user's guide

The user's guide contains links to the classes of the API.

Improvements

Got an idea for improving anyVista? A cool new feature you'd like to see? Think you've found a bug? Contact us at software@balanse.info! We love pull requests!

License

AGPLv3.0 for open source use or anyVista Commercial License for commercial use.

Get licences here: https://anyvista.balanse.info/license/ (coming soon).

Donations

Donations are very welcome!

Donate

Contact

Feature requests, ideas, bug reports: software@balanse.info

License and other commercial inquiries: license@balanse.info

About

A Javascript library for grouping, displaying and editing hierarchical data as items or lists of almost any combination of HTML elements, freely mixing lists and items of different types, interacting with lists and list items, using predefined or user defined plugin types and more. Greatly simplifies the building of content-rich websites / apps.

Topics

Resources

License

Stars

Watchers

Forks

Languages