cnes-export is loading, please wait...
'
+ waitjQueryExport(options);
-window.registerExtension('cnesexport/export', function (options) {
+
+ // return a function, which is called when the page is being closed
+ return function () {
+ isDisplayedExporting = false;
+ // clear elements of this page
+ options.el.textContent = '';
+ };
+})
+
+function waitjQueryExport(options){
+ // check if jquery is loaded...
+ if(window.jQuery == null){
+ setTimeout(waitjQueryExport, 100, options);
+ }
+ else{
+ registerCnesExport(options)
+ }
+}
+
+function registerCnesExport(options){
// let's create a flag telling if the page is still displayed
- var isDisplayedExporting = true;
+ isDisplayedExporting = true;
/**
* Log information in the bottom text area
@@ -150,6 +176,7 @@ window.registerExtension('cnesexport/export', function (options) {
// Add html template
var template = document.createElement("div");
template.setAttribute("id", "template");
+ options.el.innerHTML = "";
options.el.appendChild(template);
// retrieve template from html
$('#template').load('../../static/cnesexport/templates/exportForm.html', function(){
@@ -193,4 +220,4 @@ window.registerExtension('cnesexport/export', function (options) {
// clean elements of this page
options.el.textContent = '';
};
-});
\ No newline at end of file
+}
diff --git a/src/main/resources/static/jquery.min.js b/src/main/resources/static/jquery.min.js
new file mode 100644
index 0000000..a1c07fd
--- /dev/null
+++ b/src/main/resources/static/jquery.min.js
@@ -0,0 +1,2 @@
+/*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/license */
+!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,g=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.4.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0