The goal is to have a "one page loading" javascript application.
For this the only html page will contains a div with id "main-content" this div will be populated
by jquery template execution (see template loading).
The server will be contacted only for REST request/response (see details).
All UI rendering will be done only on client side.
As we are not designer :-), the application will use the twitter bootstrap css.
The application is designed to use http cache mechanism for css, javascript. Except REST call to get datas which will never use cache as a query timestamp parameter is used. But as this can cause issue in developpement phase, two system properties (disabled by default) prevent can prevent caching and/or help debuging
We use some well known javascript framework librairies :
Sources are located in src/main/webapp of the archiva-webapp module :
Root directory contains external libraries.
archiva directory contains archiva js files with a subdirectory templates which contains templates
redback directory contains redback js files with a subdirectory templates which contains templates
The main page will load javascript files, load i18n, load templates and insert menu.
This main page is divided in 3 parts:
Link are visible/hide depending on needed redback karmas. You can configure redback operations needed for a link using the attribute redback-permissions in your html element (by default element needed karma must be marked display: none):
Support array: at least one operation is needed: <div .... redback-permissions="{permissions: ['archiva-manage-users','archiva-manage-configuration']}" style="display: none"> Support single value: <li style="display: none" redback-permissions="{permissions: ['archiva-manage-users']}">
We use a tab/pill models to display grid of datas and edit/add form: