=== modified file 'src/docbkx/en/dhis2_user_man_apps.xml' --- src/docbkx/en/dhis2_user_man_apps.xml 2013-10-08 11:01:57 +0000 +++ src/docbkx/en/dhis2_user_man_apps.xml 2013-10-13 09:46:16 +0000 @@ -51,17 +51,30 @@ } The manifest.webapp file must be located at the root of - the project. Among the properties, the activities property - is an extension meant to differentiate between a standard Open Web App and an App that can be - installed in DHIS 2. The * value for icons→48 + property is used for the icon that is displayed on the list of apps that are installed on a + DHIS 2 instance. The activities property is an + dhis-specific extension meant to differentiate between a standard Open Web App and an App that + can be installed in DHIS 2. The * value for href is converted to the appropriate URL when the App is uploaded and installed in DHIS 2. This value can then be used by the application's JavaScript and HTML - files to make calls to the DHIS 2 Web API and identify the correct location of DHIS 2 server - on which the App has been installed. The icons→48 - property is used for the icon that is displayed on the list of apps that are installed on a - DHIS 2 instance. + files to make calls to the DHIS 2 Web API and identify the correct location of DHIS 2 server + on which the App has been installed. To clarify, the activities part will look similar to this after the App has been + installed: + "activities": { + "dhis": { + "href": "http://apps.dhis2.org/demo" + } + } + To read the JSON structure into Javascript you can use a regular AJAX request and parse + the JSON into an object. Most Javascript libraries provide support for this, for instance with + jQuery it can be done like this: + $.getJSON( "manifest.webapp", function( json ) { + var apiBaseUrl = json.activities.dhis.href + "/api"; +} The App can contain HTML, Javascript, CSS and image files. The file structure could look - like this: + something like this: / /manifest.webapp #manifest file (mandatory) /css/ #css stylesheets (optional) @@ -71,7 +84,7 @@ the developer to organize CSS, images and Javascript files inside the app. All the files in the project should be compressed into a standard zip archive. Note that the manifest.webapp file must be located on the root of the zip archive (do not include a - parent directory in the archive). This zip archive can then be installed into DHIS 2 as you + parent directory in the archive). The zip archive can then be installed into DHIS 2 as you will see in the next section.
@@ -82,21 +95,22 @@ The following settings can be configured: - App Installation Folder: The folder on the file system where apps are unpacked. By - default this is under the expanded DHIS folder suffixed by /apps. If you like to install - your apps in another location, say www folder of Apache 2, you can specify the absolute - path to that directory on the server, making your apps to be unpacked at that - location. - - - App Base URL: The URL through which the apps can be found on the Web. By default this - is the same as your DHIS 2 URL suffixed by /apps. If you are installing apps through a - different web server you need to provide the full URL for that web server. - - - App store URL: The app repository through which new apps can be downloaded and - installed. Each deployment can host their own, approved set of apps that can be installed - in DHIS 2. We plan to host the global DHIS 2 App store at App Installation Folder: The folder on the file + system where apps are unpacked. By default this is under the expanded DHIS folder suffixed + by /apps. If you like to install your apps in another location, say www folder of Apache + 2, you can specify the absolute path to that directory on the server, making your apps to + be unpacked at that location. + + + App Base URL: The URL through which the apps can be + found on the Web. By default this is the same as your DHIS 2 URL suffixed by /apps. If you + are installing apps through a different web server you need to provide the full URL for + that web server. + + + App store URL: The app repository through which new + apps can be downloaded and installed. Each deployment can host their own, approved set of + apps that can be installed in DHIS 2. The DHIS 2 App store can be found at https://appstore.dhis2.org @@ -113,7 +127,8 @@
Launching Apps - After installation your apps can be accessed from the home page of the apps module. Click - on an app in the list in order to launch it. + After installation your apps will be integrated with the menu system and can be accessed + under services and from the module overview page. It can also be accessed from the home page + of the apps module. Click on an app in the list in order to launch it.