mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-01-11 01:48:40 +00:00
bug fixes
This commit is contained in:
parent
1bba6cf8a7
commit
a038d97a36
|
|
@ -3,7 +3,7 @@ import { AssetManager } from './Asset/AssetManager.js';
|
||||||
/**
|
/**
|
||||||
* Autoloader.
|
* Autoloader.
|
||||||
*
|
*
|
||||||
* The autoloader is responsible for defining namespaces and dynamically loading javascript
|
* The autoloader is responsible for defining namespaces and dynamically loading js
|
||||||
* files that are not yet included. The intention is to provide a similar functionality as
|
* files that are not yet included. The intention is to provide a similar functionality as
|
||||||
* include, import etc. Contrary to it's name the autoloader is not able to truly autoload
|
* include, import etc. Contrary to it's name the autoloader is not able to truly autoload
|
||||||
* referenced classes.
|
* referenced classes.
|
||||||
|
|
@ -55,7 +55,7 @@ Autoloader.defineNamespace = function (namespace)
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Collect all loaded javascript files
|
* Collect all loaded JS files
|
||||||
*
|
*
|
||||||
* @return {void}
|
* @return {void}
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,10 @@ export class AppNotification
|
||||||
|
|
||||||
const logs = document.getElementsByClassName('log-msg');
|
const logs = document.getElementsByClassName('log-msg');
|
||||||
const lastElementAdded = logs[logs.length - 1];
|
const lastElementAdded = logs[logs.length - 1];
|
||||||
window.navigator.vibrate(msg.vibrate ? 200 : 0);
|
|
||||||
|
if (typeof window.navigator.vibrate !== 'undefined') {
|
||||||
|
window.navigator.vibrate(msg.vibrate ? 200 : 0);
|
||||||
|
}
|
||||||
|
|
||||||
if (msg.isSticky) {
|
if (msg.isSticky) {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -1207,7 +1207,11 @@ export class Form
|
||||||
let statusCode = null;
|
let statusCode = null;
|
||||||
let responseData = null;
|
let responseData = null;
|
||||||
|
|
||||||
if (xhr.getResponseHeader('content-type').includes('application/octet-stream')) {
|
const contentType = xhr.getResponseHeader('content-type');
|
||||||
|
|
||||||
|
if (contentType !== null
|
||||||
|
&& contentType.includes('application/octet-stream')
|
||||||
|
) {
|
||||||
responseData = new Blob([xhr.response], { type: 'application/octet-stream' });
|
responseData = new Blob([xhr.response], { type: 'application/octet-stream' });
|
||||||
const doc = document.createElement('a');
|
const doc = document.createElement('a');
|
||||||
doc.style = 'display: none';
|
doc.style = 'display: none';
|
||||||
|
|
@ -1231,7 +1235,7 @@ export class Form
|
||||||
doc.click();
|
doc.click();
|
||||||
window.URL.revokeObjectURL(url);
|
window.URL.revokeObjectURL(url);
|
||||||
document.body.removeChild(doc);
|
document.body.removeChild(doc);
|
||||||
} else if (xhr.getResponseHeader('content-type').includes('text/html')) {
|
} else if (contentType.includes('text/html')) {
|
||||||
// window.location = UriFactory.build(uri);
|
// window.location = UriFactory.build(uri);
|
||||||
|
|
||||||
responseData = xhr.response;
|
responseData = xhr.response;
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ export class SmartTextInput
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// @bug This is never getting run?!
|
// @bug This never runs?!
|
||||||
this.dataList.addEventListener('keydown', function (e) {
|
this.dataList.addEventListener('keydown', function (e) {
|
||||||
jsOMS.preventAll(e);
|
jsOMS.preventAll(e);
|
||||||
|
|
||||||
|
|
@ -136,7 +136,11 @@ export class SmartTextInput
|
||||||
|
|
||||||
this.dataList.addEventListener('click', function (e) {
|
this.dataList.addEventListener('click', function (e) {
|
||||||
self.clearDataListSelection(self);
|
self.clearDataListSelection(self);
|
||||||
self.addToResultList(self, self.elementContainer === '' ? e.target : e.target.closest('.' + self.elementContainer));
|
self.addToResultList(
|
||||||
|
self, self.elementContainer === ''
|
||||||
|
? e.target
|
||||||
|
: e.target.closest('.' + self.elementContainer)
|
||||||
|
);
|
||||||
self.dataList.classList.add('vh');
|
self.dataList.classList.add('vh');
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
@ -280,13 +284,17 @@ export class SmartTextInput
|
||||||
* This can add the selected dropdown elements to a table, badge list etc. depending on the template structure.
|
* This can add the selected dropdown elements to a table, badge list etc. depending on the template structure.
|
||||||
*
|
*
|
||||||
* @param {SmartTextInput} self This reference
|
* @param {SmartTextInput} self This reference
|
||||||
* @param {Element} e Element
|
* @param {Element} e Element
|
||||||
*
|
*
|
||||||
* @return {void}
|
* @return {void}
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
addToResultList (self, e) {
|
addToResultList (self, e) {
|
||||||
|
// @bug There is sometimes a situation when text is in the input field and you then want to switch
|
||||||
|
// to a different drop down element. When you click on that drop down element, it doesn't fill into the input text
|
||||||
|
// you then have to click it over and over until it works
|
||||||
|
// https://github.com/Karaka-Management/jsOMS/issues/142
|
||||||
const data = JSON.parse(e.getAttribute('data-data'));
|
const data = JSON.parse(e.getAttribute('data-data'));
|
||||||
|
|
||||||
if (self.inputField.getAttribute('data-autocomplete') === 'true') {
|
if (self.inputField.getAttribute('data-autocomplete') === 'true') {
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,7 @@ export class Table
|
||||||
/**
|
/**
|
||||||
* @todo Karaka/jsOMS#90
|
* @todo Karaka/jsOMS#90
|
||||||
* Implement export
|
* Implement export
|
||||||
* Either create download in javascript from this data or make round trip to server who then sends the data.
|
* Either create download in JS from this data or make round trip to server who then sends the data.
|
||||||
* The export should be possible (if available) in json, csv, excel, word, pdf, ...
|
* The export should be possible (if available) in json, csv, excel, word, pdf, ...
|
||||||
* If no endpoint is specified or reachable the client side should create a json or csv export.
|
* If no endpoint is specified or reachable the client side should create a json or csv export.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user