← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-documenters/dhis2/dhis2-docbook-docs] Rev 1086: Plugin docs updated.

 

------------------------------------------------------------
revno: 1086
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2-docbook-docs
timestamp: Wed 2014-05-28 11:19:08 +0200
message:
  Plugin docs updated.
modified:
  src/docbkx/en/dhis2_user_man_web_api.xml


--
lp:~dhis2-documenters/dhis2/dhis2-docbook-docs
https://code.launchpad.net/~dhis2-documenters/dhis2/dhis2-docbook-docs

Your team DHIS 2 developers is subscribed to branch lp:~dhis2-documenters/dhis2/dhis2-docbook-docs.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-documenters/dhis2/dhis2-docbook-docs/+edit-subscription
=== modified file 'src/docbkx/en/dhis2_user_man_web_api.xml'
--- src/docbkx/en/dhis2_user_man_web_api.xml	2014-05-28 08:29:53 +0000
+++ src/docbkx/en/dhis2_user_man_web_api.xml	2014-05-28 09:19:08 +0000
@@ -1863,7 +1863,7 @@
   <section><title>Plugins</title>
   <para>DHIS 2 comes with plugins which enables you to embed live data directly in your web portal or web site. Currently, plugins exist for charts, maps and pivot tables.</para>  
   <section>
-    <title>Embedding pivot tables with the Pivot table plug-in</title>
+    <title>Embedding pivot tables with the Pivot Table plug-in</title>
     
     <para>In this example we will see how we can embed good-looking, light-weight html pivot tables with data served from a DHIS back-end into a Web page. To accomplish this we will use the Pivot table plug-in. The plug-in is written in Javascript and depends on the Ext JS library only. A complete working example can be found at <ulink url="http://apps.dhis2.org/portal/table.html"/>. Open the page in a web browser and view the source to see how it is set up.</para>
 
@@ -1871,9 +1871,9 @@
 	<screen>&lt;!DOCTYPE html&gt;
 &lt;html&gt;
 &lt;head&gt;
-  &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://dhis2-cdn.org/v214/ext/resources/css/ext-plugin-gray.css&quot; /&gt;
-  &lt;script src=&quot;http://dhis2-cdn.org/v214/ext/ext-all.js&quot;&gt;&lt;/script&gt;
-  &lt;script src=&quot;http://dhis2-cdn.org/v214/plugin/table.js&quot;&gt;&lt;/script&gt;
+  &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://dhis2-cdn.org/v215/ext/resources/css/ext-plugin-gray.css&quot; /&gt;
+  &lt;script src=&quot;http://dhis2-cdn.org/v215/ext/ext-all.js&quot;&gt;&lt;/script&gt;
+  &lt;script src=&quot;http://dhis2-cdn.org/v215/plugin/table.js&quot;&gt;&lt;/script&gt;
 
   &lt;script&gt;
     var base = &quot;http://apps.dhis2.org/demo&quot;;
@@ -1891,15 +1891,15 @@
 
     function setLinks() {
 
-      // Referring to an existing table through the id parameter, render to &quot;tableA1&quot; div
+      // Referring to an existing table through the id parameter, render to &quot;table1&quot; div
       
-      DHIS.getTable({ url: base, el: &quot;tableA1&quot;, id: &quot;R0DVGvXDUNP&quot; });
+      DHIS.getTable({ url: base, el: &quot;table1&quot;, id: &quot;R0DVGvXDUNP&quot; });
 
-      // Full table configuration, render to &quot;tableB1&quot; div
+      // Full table configuration, render to &quot;table2&quot; div
       
       DHIS.getTable({
         url: base,
-        el: &quot;tableB1&quot;,
+        el: &quot;table2&quot;,
         columns: [
           {dimension: &quot;de&quot;, items: [{id: &quot;YtbsuPPo010&quot;}, {id: &quot;l6byfWFUGaP&quot;}]}
         ],
@@ -1924,8 +1924,8 @@
 &lt;/head&gt;
 
 &lt;body&gt;
-  &lt;div id=&quot;tableA1&quot;&gt;&lt;/div&gt;
-  &lt;div id=&quot;tableB1&quot;&gt;&lt;/div&gt;
+  &lt;div id=&quot;table1&quot;&gt;&lt;/div&gt;
+  &lt;div id=&quot;table2&quot;&gt;&lt;/div&gt;
 &lt;/body&gt;
 &lt;/html&gt;</screen>
     </para>
@@ -1934,9 +1934,9 @@
       two files are the Ext JS javascript library (we use the DHIS 2 content delivery network in
       this case) and its css stylesheet. The third file is the Pivot table plug-in. Make sure the
       path is pointing to your DHIS server installation.</para>
-    <screen>&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://dhis2-cdn.org/v214/ext/resources/css/ext-plugin-gray.css&quot; /&gt;
-&lt;script src=&quot;http://dhis2-cdn.org/v214/ext/ext-all.js&quot;&gt;&lt;/script&gt;
-&lt;script src=&quot;http://dhis2-cdn.org/v214/plugin/table.js&quot;&gt;&lt;/script&gt;</screen>
+    <screen>&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://dhis2-cdn.org/v215/ext/resources/css/ext-plugin-gray.css&quot; /&gt;
+&lt;script src=&quot;http://dhis2-cdn.org/v215/ext/ext-all.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;http://dhis2-cdn.org/v215/plugin/table.js&quot;&gt;&lt;/script&gt;</screen>
     <para>To authenticate with the DHIS server we use the same approach as in the previous section. In the header of the HTML document we include the following Javascript inside a script element. The <emphasis role="italic">setLinks</emphasis> method will be implemented later. Make sure the <emphasis role="italic">base</emphasis> variable is pointing to your DHIS installation.</para>
     <screen>var base = &quot;http://apps.dhis2.org/demo/&quot;;
 
@@ -2079,11 +2079,11 @@
     </table>
     <para>We continue by adding one pre-defined and one dynamic pivot table to our HTML document. You can browse the list of available pivot tables using the Web API here: <ulink url="http://apps.dhis2.org/demo/api/reportTables"/>.</para>
     <screen>function setLinks() {  
-  DHIS.getTable({ url: base, el: &quot;tableA1&quot;, id: &quot;R0DVGvXDUNP&quot; });
+  DHIS.getTable({ url: base, el: &quot;table1&quot;, id: &quot;R0DVGvXDUNP&quot; });
 
   DHIS.getTable({
 	url: base,
-	el: &quot;tableB1&quot;,
+	el: &quot;table2&quot;,
 	columns: [
 	  {dimension: &quot;de&quot;, items: [{id: &quot;YtbsuPPo010&quot;}, {id: &quot;l6byfWFUGaP&quot;}]}
 	],
@@ -2105,8 +2105,8 @@
   });
 }</screen>
     <para>Finally we include some <emphasis role="italic">div</emphasis> elements in the body section of the HTML document with the identifiers referred to in the plug-in Javascript.</para>
-    <screen>&lt;div id=&quot;tableA1&quot;&gt;&lt;/div&gt;
-&lt;div id=&quot;tableB1&quot;&gt;&lt;/div&gt;</screen>
+    <screen>&lt;div id=&quot;table1&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;table2&quot;&gt;&lt;/div&gt;</screen>
     <para>To see a complete working example please visit <ulink url="http://apps.dhis2.org/portal/table.html"/>.</para>
   </section>
   <section>
@@ -2117,9 +2117,9 @@
 	<screen>&lt;!DOCTYPE html&gt;
 &lt;html&gt;
 &lt;head&gt;
-  &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://dhis2-cdn.org/v214/ext/resources/css/ext-plugin-gray.css&quot; /&gt;
-  &lt;script src=&quot;http://dhis2-cdn.org/v214/ext/ext-all.js&quot;&gt;&lt;/script&gt;
-  &lt;script src=&quot;http://dhis2-cdn.org/v214/plugin/chart.js&quot;&gt;&lt;/script&gt;
+  &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://dhis2-cdn.org/v215/ext/resources/css/ext-plugin-gray.css&quot; /&gt;
+  &lt;script src=&quot;http://dhis2-cdn.org/v215/ext/ext-all.js&quot;&gt;&lt;/script&gt;
+  &lt;script src=&quot;http://dhis2-cdn.org/v215/plugin/chart.js&quot;&gt;&lt;/script&gt;
 
   &lt;script&gt;
     var base = &quot;http://apps.dhis2.org/demo&quot;;
@@ -2137,15 +2137,15 @@
 
     function setLinks() {
 
-      // Referring to an existing chart through the id parameter, render to "chartA1" div
+      // Referring to an existing chart through the id parameter, render to "chart1" div
       
-      DHIS.getChart({ url: base, el: &quot;chartA1&quot;, id: &quot;R0DVGvXDUNP&quot; });
+      DHIS.getChart({ url: base, el: &quot;chart1&quot;, id: &quot;R0DVGvXDUNP&quot; });
 
-      // Full chart configuration, render to "chartB1" div
+      // Full chart configuration, render to "chart2" div
       
       DHIS.getChart({
         url: base,
-        el: &quot;chartB1&quot;,
+        el: &quot;chart2&quot;,
         type: &quot;stackedBar&quot;,
         columns: [ // Chart series
           {dimension: &quot;de&quot;, items: [{id: &quot;YtbsuPPo010&quot;}, {id: &quot;l6byfWFUGaP&quot;}]}
@@ -2171,8 +2171,8 @@
 &lt;/head&gt;
 
 &lt;body&gt;
-  &lt;div id=&quot;chartA1&quot;&gt;&lt;/div&gt;
-  &lt;div id=&quot;chartB1&quot;&gt;&lt;/div&gt;
+  &lt;div id=&quot;chart1&quot;&gt;&lt;/div&gt;
+  &lt;div id=&quot;chart2&quot;&gt;&lt;/div&gt;
 &lt;/body&gt;
 &lt;/html&gt;</screen>
     </para>
@@ -2181,9 +2181,9 @@
         two files are the Ext JS javascript library (we use the DHIS 2 content delivery network in
         this case) and its stylesheet. The third file is the Visualizer plug-in. Make sure the path
         is pointing to your DHIS server installation.</para>
-    <screen>&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://dhis2-cdn.org/v213/ext/resources/css/ext-plugin-gray.css&quot; /&gt;
-&lt;script src=&quot;http://dhis2-cdn.org/v213/ext/ext-all.js&quot;&gt;&lt;/script&gt;
-&lt;script src=&quot;http://dhis2-cdn.org/v213/plugin/chart.js&quot;&gt;&lt;/script&gt;</screen>
+    <screen>&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://dhis2-cdn.org/v215/ext/resources/css/ext-plugin-gray.css&quot; /&gt;
+&lt;script src=&quot;http://dhis2-cdn.org/v215/ext/ext-all.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;http://dhis2-cdn.org/v215/plugin/chart.js&quot;&gt;&lt;/script&gt;</screen>
     <para>To authenticate with the DHIS server we use the same approach as in the previous section. In the header of the HTML document we include the following Javascript inside a script element. The <emphasis role="italic">setLinks</emphasis> method will be implemented later. Make sure the <emphasis role="italic">base</emphasis> variable is pointing to your DHIS installation.</para>
     <screen>var base = &quot;http://apps.dhis2.org/demo/&quot;;
 
@@ -2361,11 +2361,11 @@
     </table>
     <para>We continue by including two pre-defined charts and to dynamic charts to our HTML document. You can browse the list of available charts using the Web API here: <ulink url="http://apps.dhis2.org/demo/api/charts"/>.</para>
     <screen>function setLinks() {
-  DHIS.getChart({ url: base, el: &quot;chartA1&quot;, id: &quot;R0DVGvXDUNP&quot; });
+  DHIS.getChart({ url: base, el: &quot;chart1&quot;, id: &quot;R0DVGvXDUNP&quot; });
 
   DHIS.getChart({
 	url: base,
-	el: &quot;chartB1&quot;,
+	el: &quot;chart2&quot;,
 	type: &quot;stackedBar&quot;,
 	columns: [ // Chart series
 	  {dimension: &quot;de&quot;, items: [{id: &quot;YtbsuPPo010&quot;}, {id: &quot;l6byfWFUGaP&quot;}]}
@@ -2388,8 +2388,8 @@
   });
 }</screen>
     <para>Finally we include some <emphasis role="italic">div</emphasis> elements in the body section of the HTML document with the identifiers referred to in the plug-in Javascript.</para>
-    <screen>&lt;div id=&quot;chartA1&quot;&gt;&lt;/div&gt;
-&lt;div id=&quot;chartB1&quot;&gt;&lt;/div&gt;
+    <screen>&lt;div id=&quot;chart1&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;chart2&quot;&gt;&lt;/div&gt;
 </screen>
     <para>To see a complete working example please visit <ulink url="http://apps.dhis2.org/portal/chart.html"/>.</para>
   </section>
@@ -2401,11 +2401,11 @@
     <screen>&lt;!DOCTYPE html&gt;
 &lt;html&gt;
 &lt;head&gt;
-  &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://dhis2-cdn.org/v214/ext/resources/css/ext-plugin-gray.css&quot; /&gt;
-  &lt;script src=&quot;http://dhis2-cdn.org/v214/ext/ext-all.js&quot;&gt;&lt;/script&gt;
+  &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://dhis2-cdn.org/v215/ext/resources/css/ext-plugin-gray.css&quot; /&gt;
+  &lt;script src=&quot;http://dhis2-cdn.org/v215/ext/ext-all.js&quot;&gt;&lt;/script&gt;
   &lt;script src=&quot;https://maps.google.com/maps/api/js?sensor=false&quot;&gt;&lt;/script&gt;
-  &lt;script src=&quot;http://dhis2-cdn.org/v214/openlayers/OpenLayers.js&quot;&gt;&lt;/script&gt;
-  &lt;script src=&quot;http://dhis2-cdn.org/v214/plugin/map.js&quot;&gt;&lt;/script&gt;
+  &lt;script src=&quot;http://dhis2-cdn.org/v215/openlayers/OpenLayers.js&quot;&gt;&lt;/script&gt;
+  &lt;script src=&quot;http://dhis2-cdn.org/v215/plugin/map.js&quot;&gt;&lt;/script&gt;
 
   &lt;script&gt;
     var base = &quot;http://apps.dhis2.org/demo&quot;;
@@ -2422,11 +2422,11 @@
     });
 
     function setLinks() {
-      DHIS.getMap({ url: base, el: &quot;mapA1&quot;, id: &quot;ytkZY3ChM6J&quot; });
+      DHIS.getMap({ url: base, el: &quot;map1&quot;, id: &quot;ytkZY3ChM6J&quot; });
 
       DHIS.getMap({
         url: base,
-        el: &quot;mapB1&quot;,
+        el: &quot;map2&quot;,
         mapViews: [{
           columns: [{dimension: &quot;in&quot;, items: [{id: &quot;Uvn6LCg7dVU&quot;}]}], // data
           rows: [{dimension: &quot;ou&quot;, items: [{id: &quot;LEVEL-3&quot;}, {id: &quot;ImspTQPwCqd&quot;}]}], // organisation units,
@@ -2444,8 +2444,8 @@
 &lt;/head&gt;
 
 &lt;body&gt;
-  &lt;div id=&quot;mapA1&quot;&gt;&lt;/div&gt;
-  &lt;div id=&quot;mapB1&quot;&gt;&lt;/div&gt;
+  &lt;div id=&quot;map1&quot;&gt;&lt;/div&gt;
+  &lt;div id=&quot;map2&quot;&gt;&lt;/div&gt;
 &lt;/body&gt;
 &lt;/html&gt;</screen></para>
     <para>Four files and Google Maps are included in the header section of the HTML
@@ -2453,11 +2453,11 @@
         delivery network in this case) and its stylesheet. The third file is the OpenLayers
         javascript mapping framework (<ulink url="http://openlayers.org"/>) and finally we include
         the GIS map plug-in. Make sure the path is pointing to your DHIS server installation.</para>
-	<screen>&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://dhis2-cdn.org/v214/ext/resources/css/ext-plugin-gray.css&quot; /&gt;
-&lt;script src=&quot;http://dhis2-cdn.org/v214/ext/ext-all.js&quot;&gt;&lt;/script&gt;
+	<screen>&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://dhis2-cdn.org/v215/ext/resources/css/ext-plugin-gray.css&quot; /&gt;
+&lt;script src=&quot;http://dhis2-cdn.org/v215/ext/ext-all.js&quot;&gt;&lt;/script&gt;
 &lt;script src=&quot;https://maps.google.com/maps/api/js?sensor=false&quot;&gt;&lt;/script&gt;
-&lt;script src=&quot;http://dhis2-cdn.org/v214/openlayers/OpenLayers.js&quot;&gt;&lt;/script&gt;
-&lt;script src=&quot;http://dhis2-cdn.org/v214/plugin/map.js&quot;&gt;&lt;/script&gt;</screen>
+&lt;script src=&quot;http://dhis2-cdn.org/v215/openlayers/OpenLayers.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;http://dhis2-cdn.org/v215/plugin/map.js&quot;&gt;&lt;/script&gt;</screen>
 
     <para>To authenticate with the DHIS server we use the same approach as in the previous section. In the header of the HTML document we include the following Javascript inside a script element. The <emphasis role="italic">setLinks</emphasis> method will be implemented later. Make sure the <emphasis role="italic">base</emphasis> variable is pointing to your DHIS installation.</para>
     <screen>Ext.onReady( function() {
@@ -2654,11 +2654,11 @@
     </table>
     <para>We continue by adding one pre-defined and one dynamically configured map to our HTML document. You can browse the list of available maps using the Web API here: <ulink url="http://apps.dhis2.org/demo/api/maps"/>.</para>
     <screen>function setLinks() {
-  DHIS.getMap({ url: base, el: &quot;mapA1&quot;, id: &quot;ytkZY3ChM6J&quot; });
+  DHIS.getMap({ url: base, el: &quot;map1&quot;, id: &quot;ytkZY3ChM6J&quot; });
 
   DHIS.getMap({
 	url: base,
-	el: &quot;mapB1&quot;,
+	el: &quot;map2&quot;,
 	mapViews: [
 	  columns: [ // Chart series
 		columns: [{dimension: &quot;in&quot;, items: [{id: &quot;Uvn6LCg7dVU&quot;}]}], // data
@@ -2679,8 +2679,8 @@
   });
 }</screen>
     <para>Finally we include some <emphasis role="italic">div</emphasis> elements in the body section of the HTML document with the identifiers referred to in the plug-in Javascript.</para>
-    <screen>&lt;div id=&quot;mapA1&quot;&gt;&lt;/div&gt;
-&lt;div id=&quot;mapB1&quot;&gt;&lt;/div&gt;
+    <screen>&lt;div id=&quot;map1&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;map2&quot;&gt;&lt;/div&gt;
 </screen>
     <para>To see a complete working example please visit <ulink url="http://apps.dhis2.org/portal/map.html"/>.</para>
   </section>