diff --git a/src/doc/extension/module.md b/src/doc/extension/module.md index d4f9b56db508d7c3be9dc0a52953de5c82bf310d..7986010181ce53902ba88add90a623d3576930b3 100644 --- a/src/doc/extension/module.md +++ b/src/doc/extension/module.md @@ -23,16 +23,16 @@ Create a new file in `src/core/js` starting with `ext_`. E.g. `ext_flight_previe * @requires somelibrary * (pass the dependencies as arguments) */ -var ext_flight_preview = function (somelibrary) { +const ext_flight_preview = function (libA, libB) { - var init = function (toolbox) { + const init = function () { /* initialization of the module */ } /** * doc string */ - var some_function = function (arg1, arg2) { + const some_function = function (arg1, arg2) { } /* the main function must return the initialization of the module */ @@ -40,7 +40,7 @@ var ext_flight_preview = function (somelibrary) { init: init, }; //pass the dependencies as arguments here as well -}(somelibrary); +}(libA, libB); // this will be replaced by require.js in the future. $(document).ready(function() { @@ -52,16 +52,6 @@ $(document).ready(function() { } }); ``` -## Update xml -Add a section to `src/core/xsl/main.xsl` to include your new file. - -```xsl -<xsl:element name="script"> - <xsl:attribute name="src"> - <xsl:value-of select="concat($basepath,'webinterface/${BUILD_NUMBER}/js/ext_sss_markdown.js')"/> - </xsl:attribute> -</xsl:element> -``` ## Add to index.html in test If you have unittests (and you should), you need to add a line in : @@ -69,4 +59,4 @@ If you have unittests (and you should), you need to add a line in : ## Update the changelog -## Create a merge request \ No newline at end of file +## Create a merge request