From 1aa053d461201228807a47e5aca3175372cfa8ef Mon Sep 17 00:00:00 2001
From: Renaud Le Gac <legac@cppm.in2p3.fr>
Date: Thu, 12 Dec 2013 22:40:21 +0100
Subject: [PATCH] ExtJS 4.2: Polish the documentation.

---
 buildVersion.py                               |  7 ++++-
 static/plugin_dbui/CHANGELOG                  |  2 +-
 static/plugin_dbui/src/base.js                |  5 ++--
 .../plugin_dbui/src/basepanelwithselector.js  | 22 ++++++++-------
 static/plugin_dbui/src/combobox.js            |  2 +-
 static/plugin_dbui/src/comboboxmaster.js      | 24 ++++++++++-------
 static/plugin_dbui/src/comboboxslave.js       | 10 ++++---
 static/plugin_dbui/src/directproxy.js         | 14 +++++-----
 static/plugin_dbui/src/fielddict.js           |  3 ++-
 static/plugin_dbui/src/fieldeditor.js         |  2 +-
 static/plugin_dbui/src/fieldlist.js           |  5 ++--
 static/plugin_dbui/src/form.js                |  5 ++--
 static/plugin_dbui/src/grid.js                |  2 +-
 .../plugin_dbui/src/panelwithurlselector.js   | 27 +++++++++----------
 static/plugin_dbui/src/pformtooltip.js        |  4 +--
 static/plugin_dbui/src/pgridexpertmenu.js     |  2 +-
 static/plugin_dbui/src/pgridmathjax.js        |  3 +--
 static/plugin_dbui/src/pgridroweditorbase.js  |  5 ++--
 .../src/pgridroweditorcontextmenu.js          |  2 +-
 .../plugin_dbui/src/pgridroweditortoolbar.js  |  2 +-
 ...exceptionl.js => ppanelloaderexception.js} |  5 +++-
 static/plugin_dbui/src/ppanelmathjax.js       |  1 -
 static/plugin_dbui/src/pviewportlogin.js      |  2 +-
 static/plugin_dbui/src/viewport.js            | 17 ++++++------
 24 files changed, 93 insertions(+), 80 deletions(-)
 rename static/plugin_dbui/src/{ppanelloaderexceptionl.js => ppanelloaderexception.js} (94%)

diff --git a/buildVersion.py b/buildVersion.py
index d52c188c..41677e00 100755
--- a/buildVersion.py
+++ b/buildVersion.py
@@ -45,6 +45,7 @@ import urllib
 APP = os.path.basename(os.getcwd())
 CHANGELOG = 'static/plugin_dbui/CHANGELOG'
 DBUI_W2P = 'web2py.plugin.dbui.%s.w2p'
+EXTJSSRC = 'static/plugin_extjs/src'
 JSBASE = 'static/plugin_dbui/src/base.js'
 JSDOC = 'static/plugin_dbui/docs/jsduck'
 JSLIBDEBUG = 'static/plugin_dbui/dbui-debug.js'
@@ -176,7 +177,11 @@ def jsduck():
     subprocess.call(cmd)
 
     # run JsDuck
-    cmd = ["jsduck", JSLIBSRC, "--output", JSDOC, "--title", "plugin_dbui"]
+    cmd = ["jsduck", EXTJSSRC, JSLIBSRC, \
+           "--output", JSDOC, \
+           "--title", "plugin_dbui", \
+           "--warnings=-all:"+EXTJSSRC]
+    
     subprocess.call(cmd)
 
     print "JavaScript documentation in", JSDOC
diff --git a/static/plugin_dbui/CHANGELOG b/static/plugin_dbui/CHANGELOG
index d9c31275..f355adc7 100644
--- a/static/plugin_dbui/CHANGELOG
+++ b/static/plugin_dbui/CHANGELOG
@@ -1,7 +1,7 @@
 --------------------------------- CHANGE LOG ----------------------------------
 
 HEAD
-  - Improve the Selector.select method to handle field with operator.
+  - Release Candidate running with ExtJS 4.2.1
 
 0.4.15.2 (Oct 2013)
   - Release only compatible with ExtJS 3.4.1.1 but identical to 0.4.15.1.
diff --git a/static/plugin_dbui/src/base.js b/static/plugin_dbui/src/base.js
index 4975cc65..ec25efa7 100644
--- a/static/plugin_dbui/src/base.js
+++ b/static/plugin_dbui/src/base.js
@@ -1,7 +1,6 @@
 /**
  * Core utilities and functions.
  */
-/*global App, Dbui */
 Ext.define('App', {
 
     singleton: true,
@@ -104,13 +103,13 @@ Ext.define('App', {
         }
     },
     /**
-     * Return the Ext.dsata.Store identifies by its id.
+     * Return the Ext.data.Store identifies by its id.
      * If the store does not exit it is created and register in the store manager.
      *
      * **Note:** The storeId is defined by the server.
      * The syntax of the storeId is *nameStore* where *name* corresponds
      * to a database table.
-     * The store configuration is extract from the array App#storeCfgs.
+     * The store configuration is extract from the array App#config.stores.
      *
      * In the current framework, this function associates a unique store
      * to a database table. Therefore it can be shared by different widgets.
diff --git a/static/plugin_dbui/src/basepanelwithselector.js b/static/plugin_dbui/src/basepanelwithselector.js
index 5ae42943..44d5eb52 100644
--- a/static/plugin_dbui/src/basepanelwithselector.js
+++ b/static/plugin_dbui/src/basepanelwithselector.js
@@ -1,19 +1,21 @@
 /**
- *  A border layout with a panel and a selector.
+ *  A {@link Ext.layout.container.Border border} layout with a panel
+ * and a selector.
  *
- *  The selector is a collapsible panel appearing on the
- *  left/right/top/bottom side of the central panel.
- *  The selector contains a set of Fields usually organized in field sets.
- *  and two buttons Go and Reset.
+ * The selector is a collapsible panel appearing on the
+ * left/right/top/bottom side of the central panel.
+ * The selector contains a set of {@link Ext.form.Field fields} usually
+ * organized in {@link Ext.form.FieldSet field sets}
+ * and two {@link Ext.button.Button buttons} Go and Reset.
  *
- *  The configuration parameter **selectorRegion** defined the position
+ *  The configuration parameter #selectorRegion defined the position
  *  of the selector with respect to the central panel. Value are those
- *  of the border layout: east, west, south and north.
+ *  of the border layout: *east*, *west*, *south* and *north*.
  *  By default the selector is on the east side (right).
  *
- *  The size of the selector is determined by selectorHeight and selectorWidth.
- *  The former works when the selectorRegion is north and south while
- *  the latter is for region west and east.
+ *  The size of the selector is determined by #selectorHeight and #selectorWidth.
+ *  The former works when the #selectorRegion is *north* and *south* while
+ *  the latter is for region *west* and *east*.
  *
  *  The logic between the panel, the selector and the buttons
  *  is defined in inherited class.
diff --git a/static/plugin_dbui/src/combobox.js b/static/plugin_dbui/src/combobox.js
index 0270584f..5bd07465 100644
--- a/static/plugin_dbui/src/combobox.js
+++ b/static/plugin_dbui/src/combobox.js
@@ -2,7 +2,7 @@
  * This is Ext.form.field.ComboBox linked to a database table.
  *
  * The store attribute is equal the table name when the widget
- * is configured. It is replaced by an Ext.data.store.Direct
+ * is configured. It is replaced by an App.data.DirectStore
  * in the initialization phase of the component.
  *
  */
diff --git a/static/plugin_dbui/src/comboboxmaster.js b/static/plugin_dbui/src/comboboxmaster.js
index 8306a077..beffe515 100644
--- a/static/plugin_dbui/src/comboboxmaster.js
+++ b/static/plugin_dbui/src/comboboxmaster.js
@@ -1,24 +1,28 @@
 /**
- * The #ComboBoxMaster and the #ComboBoxSlave are two standard ComboBoxes
+ * The App.form.field.ComboBoxMaster and the App.form.field.ComboBoxSlave
+ * are two standard Ext.form.field.ComboBox.
  * linked together in such a way that the values available in the slave
  * depends on the selected value in the master.
  *
- * Both are bind to the unique store, the #refStore. It defines the
- * relation between master and slave values. It has to contain the
+ * Both are bind to the unique store, the
+ * {@link App.form.field.ComboBoxMaster#refStore refStore}.
+ * It defines the relation between master and slave values. It has to contain the
  * displayField and the valueField for the master and for the slave.
  *
  * The slave ComboBox has two additional configuration parameters:
  *
- *      - ComboBoxSlave#masterItemId.
- *        It is the itemId of the master widget.
- *        It is required to link the slave and the master widget in order to
- *        implement the logic between them.
+ * - {@link App.form.field.ComboBoxSlave#masterItemId masterItemId}.
+ *   It is the itemId of the master widget.
+ *   It is required to link the slave and the master widget in order to
+ *   implement the logic between them.
  *
- *      - ComboBoxSlave@masterValueField.
- *        The field name containing the valueField used by the master.
+ * - {@link App.form.field.ComboBoxSlave#masterValueField masterValueField}.
+ *   The field name containing the valueField used by the master.
  *
  * Several slaves can be bind to the same master.
  *
+ * @since 0.6.0.0
+ *
  */
 Ext.define('App.form.field.ComboBoxMaster', {
 
@@ -26,7 +30,7 @@ Ext.define('App.form.field.ComboBoxMaster', {
     alias: 'widget.xcomboboxmaster',
 
     /**
-     * @cfg {Ext.data.Store/String} [required]
+     * @cfg {Ext.data.Store/String} refStore (required)
      * The reference store shared by the master and by the slave.
      * It contains the relation between the master and slave values.
      * It has to contain the displayField and the valueField for the master
diff --git a/static/plugin_dbui/src/comboboxslave.js b/static/plugin_dbui/src/comboboxslave.js
index 4fef13b4..48fd2e32 100644
--- a/static/plugin_dbui/src/comboboxslave.js
+++ b/static/plugin_dbui/src/comboboxslave.js
@@ -1,5 +1,7 @@
 /**
- * The counter part of the EXt.form.field.ComboBoxMaster.
+ * The counter part of the App.form.field.ComboBoxMaster.
+ *
+ * @since 0.6.0.0
  *
  */
 Ext.define('App.form.field.ComboBoxSlave', {
@@ -8,19 +10,19 @@ Ext.define('App.form.field.ComboBoxSlave', {
     alias: 'widget.xcomboboxslave',
 
     /**
-     * @cfg {String} [required]
+     * @cfg {String} masterValueField (required)
      * The name of field containing master values.
      */
     masterValueField: undefined,
 
     /**
-     * @cfg {String} [required]
+     * @cfg {String} masterItemId (required)
      * The itemId of the master ComboBox.
      */
     masterItemId: undefined,
 
     /**
-     * @cfg {Ext.data.Store/String} [required]
+     * @cfg {Ext.data.Store/String} refStore (required)
      * The reference store shared by the master and by the slave.
      * It contains the relation between the master and slave values.
      * It has to contain the displayField and the valueField for the master
diff --git a/static/plugin_dbui/src/directproxy.js b/static/plugin_dbui/src/directproxy.js
index d48e5255..053b9261 100644
--- a/static/plugin_dbui/src/directproxy.js
+++ b/static/plugin_dbui/src/directproxy.js
@@ -21,16 +21,15 @@
  *      - records {Array}
  *        The content of the records depend of the operation.
  *        For create or update operation, the record is an Object containing
- *        the fields and their values. the field is encoded TableField.
- *        Fot a destroy operation it is just a list of ids.
+ *        the fields and their values. the field is encoded *TableField*.
+ *        For a destroy operation it is just a list of *ids*.
  *
- * the first two parameters are defined in the #extraParams attribute.
+ * the first two parameters are defined in the
+ * {@link Ext.data.proxy.Direct#extraParams extraParams} attribute.
  *
- * This method is a copy of the Ext.data.proxy.Direct.doRequest method
- * adapted to the create, update and destroy operation.
+ * @since 0.6.0.0
  *
  */
-/*global App */
 Ext.define('App.data.proxy.Direct', {
 
     extend: 'Ext.data.proxy.Direct',
@@ -78,6 +77,9 @@ Ext.define('App.data.proxy.Direct', {
      * Implement the server protocol for the create, read, update and
      * destroy operation.
      *
+     * **Note**: This method is a copy of the Ext.data.proxy.Direct.doRequest method
+     * adapted to the create, update and destroy operations.
+     *
      * @param {Ext.data.Operation} operation
      * @param {Object} callback
      * @param {Object} scope
diff --git a/static/plugin_dbui/src/fielddict.js b/static/plugin_dbui/src/fielddict.js
index 97a87c13..3a84a293 100644
--- a/static/plugin_dbui/src/fielddict.js
+++ b/static/plugin_dbui/src/fielddict.js
@@ -24,7 +24,8 @@ Ext.define('Ext.grid.JsonColumn', {
  * date, float and string objects.
  *
  * The default structure of the dictionary can be defined via
- * the property dictCfg. It is possible to add / delete key value pairs.
+ * the configuration option #dictCfg.
+ * It is possible to add / delete key value pairs.
  *
  * @experimental
  * @since 0.4.15.0
diff --git a/static/plugin_dbui/src/fieldeditor.js b/static/plugin_dbui/src/fieldeditor.js
index deddad36..fa7b7332 100644
--- a/static/plugin_dbui/src/fieldeditor.js
+++ b/static/plugin_dbui/src/fieldeditor.js
@@ -25,7 +25,7 @@ Ext.define('App.form.AceEditorField', {
     language: 'python',
 
     /**
-     * @cfg {Number} [required]
+     * @cfg {Number} editorHeight (required)
      * The height of the editor widget
      */
     editorHeight: 150,
diff --git a/static/plugin_dbui/src/fieldlist.js b/static/plugin_dbui/src/fieldlist.js
index 294263c3..07a41a5c 100644
--- a/static/plugin_dbui/src/fieldlist.js
+++ b/static/plugin_dbui/src/fieldlist.js
@@ -5,8 +5,9 @@
  * **Note** :The list can only contains string.
  *
  * **Note** : The onRender handle can be removed using the approach
- * describe in the url (see rixo):
- * http://stackoverflow.com/questions/6153362/how-to-create-custom-extjs-form-field-component
+ * describe
+ * [here](http://stackoverflow.com/questions/6153362/how-to-create-custom-extjs-form-field-component)
+ * (see rixo)
  *
  * @experimental
  * @since 0.4.15.0
diff --git a/static/plugin_dbui/src/form.js b/static/plugin_dbui/src/form.js
index c51ef7e8..fe3809bc 100644
--- a/static/plugin_dbui/src/form.js
+++ b/static/plugin_dbui/src/form.js
@@ -5,18 +5,17 @@
  * two buttons *Action* and *Reset*.
  *
  * The store attribute is equal the table name when the widget
- * is configured. It is replaced by an Ext.data.store.Direct
+ * is configured. It is replaced by an App.data.DirectStore
  * in the initialization phase of the component.
  *
  * It also comes with a set of methods to
- * create, duplicate, destroy and update record in the databaase table.
+ * create, duplicate, destroy and update record in the database table.
  * Therefore this component can be used as a classic form, a row editor
  * for a grid, a record browser, ....
  *
  * The action associated to the button is set via the #setAction method.
  *
  */
-/*global App */
 Ext.define('App.form.FormPanel', {
 
     extend: 'Ext.form.Panel',
diff --git a/static/plugin_dbui/src/grid.js b/static/plugin_dbui/src/grid.js
index f84fe055..56ea9798 100644
--- a/static/plugin_dbui/src/grid.js
+++ b/static/plugin_dbui/src/grid.js
@@ -2,7 +2,7 @@
  * The Grid is an Ext.grid.Panel links to a database table.
  *
  * The store attribute is equal the table name when the widget is configured.
- * It is replaced by the Ext.data.store.Direct associated to the database
+ * It is replaced by the App.data.DirectStore associated to the database
  * table in the initialization phase of the component.
  *
  * Many functionality can be added through plugins like the
diff --git a/static/plugin_dbui/src/panelwithurlselector.js b/static/plugin_dbui/src/panelwithurlselector.js
index aabf7f07..bd12da43 100644
--- a/static/plugin_dbui/src/panelwithurlselector.js
+++ b/static/plugin_dbui/src/panelwithurlselector.js
@@ -1,23 +1,20 @@
 /**
  * The Panel with URL selector is split in two parts a main panel and a selector.
- * The selector display a list of fields organized in Ext.form.Fieldset.
- * There values define the URL parameters. The main panel displays
- * the URL content.
+ * The selector display a list of {@link Ext.form.Field fields} organized in
+ * {@link Ext.form.FieldSet field set}.
+ * The URL content is displayed in the main panel.
  *
- * Configuration for the main panel and the selector are set via
- * the option panelCfg and selectorCfg.
- *
- * The URL display in the main panel is defined by the baseUrl option.
+ * The URL display in the main panel is defined by the #baseUrl option.
  * It can be modified dynamically by extracting the name of the
- * controller, function and/or  extension from the selector fields.
- * The options ctrlField, extField and funcField are used to determine
+ * *controller*, *function* and/or *extension* from the selector fields.
+ * The options #ctrlField, #extField and #funcField are used to determine
  * the associated fields.
  *
  * Mathematical symbols will be interpreted when the javascript library
- * mathjax is load and when the isMathJax property is true.
+ * [MathJax](http://www.mathjax.org/) is load and when the #isMathJax
+ * property is true.
  *
  */
-/*global MathJax */
 Ext.define('App.PanelWithUrlSelector', {
 
     extend: 'App.BasePanelWithSelector',
@@ -32,21 +29,21 @@ Ext.define('App.PanelWithUrlSelector', {
     /**
      * @cfg {String}
      * The name of the field defining the controller.
-     * The URL becomes baseUrl/ctrlFieldValue
+     * The URL becomes **baseUrl/ctrlFieldValue**.
      */
     ctrlField: undefined,
 
     /**
      * @cfg {String}
      * The name of the field defining the extension.
-     * The URL becomes baseUrl.extFieldValue
+     * The URL becomes **baseUrl.extFieldValue**.
      */
     extField: undefined,
 
     /**
      * @cfg {String}
      * The name of the field defining the function.
-     * The URL become baseUrl/funcFieldValue
+     * The URL becomes **baseUrl/funcFieldValue**.
      */
     funcField: undefined,
 
@@ -58,7 +55,7 @@ Ext.define('App.PanelWithUrlSelector', {
 
     /**
      * @cfg {Number}
-     * The time out for the Ajax request in millisecond.
+     * The time out for the {@link Ext.Ajax Ajax request} in millisecond.
      */
     timeout: 30000,
 
diff --git a/static/plugin_dbui/src/pformtooltip.js b/static/plugin_dbui/src/pformtooltip.js
index 15f085b8..8917ee07 100644
--- a/static/plugin_dbui/src/pformtooltip.js
+++ b/static/plugin_dbui/src/pformtooltip.js
@@ -2,9 +2,9 @@
  * The tooltip plugin for App.form.FormPanel.
  *
  * Activate tooltip associated to each field.
- * It can be used with App.form.FormPanel and Ext.form.Fieldset.
+ * It can be used with App.form.FormPanel and Ext.form.FieldSet.
  *
- * **Note**: It used the dedicated Field configuration option: *tipText*.
+ * **Note**: It used the custom Field configuration option: *tipText*.
  *
  */
 Ext.define('App.form.ToolTip', {
diff --git a/static/plugin_dbui/src/pgridexpertmenu.js b/static/plugin_dbui/src/pgridexpertmenu.js
index 6bbde7f2..db2bffe3 100644
--- a/static/plugin_dbui/src/pgridexpertmenu.js
+++ b/static/plugin_dbui/src/pgridexpertmenu.js
@@ -16,7 +16,7 @@ Ext.define('App.grid.ExpertMenu', {
     textReset: 'Reset',
 
     /**
-     * The plugin initialization
+     * Initialize the plugin
      *
      * @param {App.grid.Grid} grid
      *
diff --git a/static/plugin_dbui/src/pgridmathjax.js b/static/plugin_dbui/src/pgridmathjax.js
index 71667a91..fb2a8395 100644
--- a/static/plugin_dbui/src/pgridmathjax.js
+++ b/static/plugin_dbui/src/pgridmathjax.js
@@ -1,10 +1,9 @@
 /**
  * The plugin to render mathematics formula embedded in grid content.
- * The processing is performed by MathJax.
+ * The processing is performed by [MathJax](http://www.mathjax.org/).
  * The MathJax library is loaded by the framework
  *
  */
-/*global MathJax */
 Ext.define('App.grid.MathJax', {
 
     extend: 'Ext.AbstractPlugin',
diff --git a/static/plugin_dbui/src/pgridroweditorbase.js b/static/plugin_dbui/src/pgridroweditorbase.js
index 998b9ece..d7cef43b 100644
--- a/static/plugin_dbui/src/pgridroweditorbase.js
+++ b/static/plugin_dbui/src/pgridroweditorbase.js
@@ -7,7 +7,6 @@
  * **Note**: This plugin limits the number of selected row to one.
  *
  */
-/*global App, Dbui */
 Ext.define('App.grid.RowEditor',  {
 
     extend: 'Ext.AbstractPlugin',
@@ -225,7 +224,7 @@ Ext.define('App.grid.RowEditor',  {
      * Fire when the write transaction is successful.
      * Its main action is to hide the window.
      *
-     * @param {Ext.data.store} store
+     * @param {Ext.data.Store} store
      *
      * @param {String} action
      *
@@ -243,7 +242,7 @@ Ext.define('App.grid.RowEditor',  {
 
     /**
      * Get the index of the selected record and fill
-     * the property #formPanel.indexSelectedRecord
+     * the property #formPanel.indexSelectedRecord.
      */
     setCurrentIndex: function () {
 
diff --git a/static/plugin_dbui/src/pgridroweditorcontextmenu.js b/static/plugin_dbui/src/pgridroweditorcontextmenu.js
index 30527779..1a332744 100644
--- a/static/plugin_dbui/src/pgridroweditorcontextmenu.js
+++ b/static/plugin_dbui/src/pgridroweditorcontextmenu.js
@@ -130,7 +130,7 @@ Ext.define('App.grid.RowEditorContextMenu',  {
     /**
      * Show the context menu when right clicking in the non-empty grid.
      *
-     * @param {Ext.view.view} view
+     * @param {Ext.view.View} view
      * @param {Ext.data.Model} record
      * @param {HTMLElement} item
      * @param {Ext.EventObject} event
diff --git a/static/plugin_dbui/src/pgridroweditortoolbar.js b/static/plugin_dbui/src/pgridroweditortoolbar.js
index c8eb9ddb..da3bf78a 100644
--- a/static/plugin_dbui/src/pgridroweditortoolbar.js
+++ b/static/plugin_dbui/src/pgridroweditortoolbar.js
@@ -11,7 +11,7 @@ Ext.define('App.grid.RowEditorToolbar',  {
     alias: 'plugin.pGridRowEditorToolbar',
 
     /**
-     * Plugin initialization.
+     * Initailize the plugin.
      *
      * @param {App.grid.Grid} grid
      */
diff --git a/static/plugin_dbui/src/ppanelloaderexceptionl.js b/static/plugin_dbui/src/ppanelloaderexception.js
similarity index 94%
rename from static/plugin_dbui/src/ppanelloaderexceptionl.js
rename to static/plugin_dbui/src/ppanelloaderexception.js
index f455779a..642c3403 100644
--- a/static/plugin_dbui/src/ppanelloaderexceptionl.js
+++ b/static/plugin_dbui/src/ppanelloaderexception.js
@@ -1,5 +1,8 @@
 /**
  * Panel plugin to handle Ext.ComponentLoader exception
+ *
+ * @since 0.6.0.0
+ *
  */
 Ext.define('App.panel.plugin.LoaderException', {
 
@@ -34,7 +37,7 @@ Ext.define('App.panel.plugin.LoaderException', {
     /**
      * Handler call when the procedure loading the panel failed.
      *
-     * @param {Ext.ComponentLaoder} loader
+     * @param {Ext.ComponentLoader} loader
      * @param {Object} response
      * @param {Object} options
      */
diff --git a/static/plugin_dbui/src/ppanelmathjax.js b/static/plugin_dbui/src/ppanelmathjax.js
index b915258e..4c1c4540 100644
--- a/static/plugin_dbui/src/ppanelmathjax.js
+++ b/static/plugin_dbui/src/ppanelmathjax.js
@@ -3,7 +3,6 @@
  * The processing is performed by the [MathJax](http://www.mathjax.org/) library.
  *
  */
-/*global MathJax */
 Ext.define('App.panel.MathJax',  {
 
     extend: 'Ext.AbstractPlugin',
diff --git a/static/plugin_dbui/src/pviewportlogin.js b/static/plugin_dbui/src/pviewportlogin.js
index d6dd2626..c3feca71 100644
--- a/static/plugin_dbui/src/pviewportlogin.js
+++ b/static/plugin_dbui/src/pviewportlogin.js
@@ -10,7 +10,6 @@
  * @uses App.Viewport
  *
  */
-/*global App */
 Ext.define('App.ViewportLogin', {
 
     extend: 'Ext.AbstractPlugin',
@@ -75,6 +74,7 @@ Ext.define('App.ViewportLogin', {
     /**
      * Open the URL in a new window.
      *
+     * @param {Ext.button.Button} button
      * @param {String} button.href
      * The URL is relative to the application, e.g. "controller/function"
      *
diff --git a/static/plugin_dbui/src/viewport.js b/static/plugin_dbui/src/viewport.js
index 10e56abf..aef920bd 100644
--- a/static/plugin_dbui/src/viewport.js
+++ b/static/plugin_dbui/src/viewport.js
@@ -2,15 +2,16 @@
  * The ViewPort component is the main interface expose to the user.
  * It contains the Ext.tree.TreePanel, on the left side and the
  * Ext.TabPanel on the right side.
- * The TreePanel lists Ext.TreeNodes.
- * An action is triggered by clicking on a leaf.
+ * The TreePanel lists {@link Ext.data.NodeInterface node}.
+ * Actions are triggered by clicking on a node.
  *
- * Two actions are possible. In the first one a new Tab is create in the
+ * Two actions are possible when a leaf node is clicked.
+ * In the first case a new Tab is create in the
  * TabPanel displaying configuration parameters and the results of the operation.
  * In the second case a window pop-up containing information, wizard, ....
  *
- * The choice between the two action is determined by the component configuration
- * embedded in the TreeNode (TreeNode#text).
+ * The choice between the two action is determined by the xtype of the
+ * component configuration embedded in the node.
  * In the first case the xtype is *panel* while in the second one is *window*.
  *
  */
@@ -20,9 +21,9 @@ Ext.define('App.Viewport', {
     alias: 'widget.xviewport',
 
     /**
-     * @property {Ext.tree.TreeNode.text[]}
-     * The list of node.text attribute defining the path of the node
-     * to be opened at start up.
+     * @property {String[]}
+     * The list of {@link Ext.data.NodeInterface#text text} attribute
+     * defining the path of the nodes to be opened at start up.
      */
     defaultTabPath: null,
 
-- 
GitLab