mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-01-11 01:48:40 +00:00
fix name
This commit is contained in:
parent
4ddb64e55b
commit
a4dcd29cf7
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
## Code Style & Best Practices
|
||||
|
||||
For the code style and best practices please have a look at the developer-guide [https://github.comkaraka-management/Developer-Guide](https://github.comkaraka-management/Developer-Guide). Especially the `standards` should be followed for a successful pull request.
|
||||
For the code style and best practices please have a look at the developer-guide [https://github.com/karaka-management/Developer-Guide](https://github.com/karaka-management/Developer-Guide). Especially the `standards` should be followed for a successful pull request.
|
||||
|
||||
## How Can I Contribute
|
||||
|
||||
|
|
@ -12,7 +12,7 @@ If you have a good idea for improvement feel free to create a new issue with all
|
|||
|
||||
### Issues
|
||||
|
||||
Feel free to grab any open issue implement it and create a new pull request. Most issues can be found in the code marked with `@todo` or in the [PROJECT.md](https://github.comkaraka-management/Docs/blob/master/Project/PROJECT.md) file.
|
||||
Feel free to grab any open issue implement it and create a new pull request. Most issues can be found in the code marked with `@todo` or in the [PROJECT.md](https://github.com/karaka-management/Docs/blob/master/Project/PROJECT.md) file.
|
||||
|
||||
### Code Style
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ export function removeButtonAction (action, callback, id)
|
|||
}
|
||||
|
||||
/**
|
||||
* @todo Orange-Management/jsOMS#68
|
||||
* @todo Karaka/jsOMS#68
|
||||
* Adding a remove action to a list of elements will stop working after removing the first element.
|
||||
* This could be because after removing the first sibling the action or the listener is removed for the siblings?
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -8,12 +8,12 @@ import { Logger } from '../Log/Logger.js';
|
|||
* @version 1.0.0
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @todo Orange-Management/jsOMS#26
|
||||
* @todo Karaka/jsOMS#26
|
||||
* Sync/Async events
|
||||
* Events so far can be created sync and async depending on the implementation.
|
||||
* It would be better to make it sync/async depending on a option flag.
|
||||
*
|
||||
* @todo Orange-Management/jsOMS#35
|
||||
* @todo Karaka/jsOMS#35
|
||||
* Template actions cannot be overwritten
|
||||
* Templates by nature get added and removed from a page (often in order to reuse existing html to minimize the html load).
|
||||
* The problem with templates is that they need to register in the ActionManager.js.
|
||||
|
|
@ -99,7 +99,7 @@ export class ActionManager
|
|||
}
|
||||
|
||||
/**
|
||||
* @todo Orange-Management/jsOMS#69
|
||||
* @todo Karaka/jsOMS#69
|
||||
* If a element has a selector defined this means the action is defined for all child elements of this selector.
|
||||
* This usually is done in order to avoid defining the same behavior multiple times for similar elements (e.g. elements in a list).
|
||||
* However, in this case it's not unusual that the child elements get changed dynamically (added, changed, removed).
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ export class AdvancedInput
|
|||
const self = this;
|
||||
this.inputField.addEventListener('focusout', function(e) {
|
||||
/**
|
||||
* @todo Orange-Management/Modules#63
|
||||
* @todo Karaka/Modules#63
|
||||
* If you click anything outside of the input element the dropdown list closes.
|
||||
* This is also true if you click something inside of the dropdown list e.g. sort/filter etc.
|
||||
* This might be fixable by changing the focus from the input element to the dropdown element and keep the dropdown element visible if it has focus.
|
||||
|
|
@ -70,11 +70,11 @@ export class AdvancedInput
|
|||
jsOMS.preventAll(e);
|
||||
|
||||
/**
|
||||
* @todo Orange-Management/jsOMS#61
|
||||
* @todo Karaka/jsOMS#61
|
||||
* Jumping out of the dropdown list is a little bit annoying for handheld users.
|
||||
* A solution could be to add a exit/none element which closes the dropdown when clicked.
|
||||
*
|
||||
* @todo Orange-Management/jsOMS#62
|
||||
* @todo Karaka/jsOMS#62
|
||||
* If the data for the input element is only locally defined the filter or sort should be done by the best match.
|
||||
*/
|
||||
if (e.keyCode === 27 || e.keyCode === 46 || e.keyCode === 8) {
|
||||
|
|
@ -239,7 +239,7 @@ export class AdvancedInput
|
|||
e.focus();
|
||||
|
||||
/**
|
||||
* @todo Orange-Management/jsOMS#70
|
||||
* @todo Karaka/jsOMS#70
|
||||
* Implement external styles for selections instead of inline css
|
||||
*/
|
||||
e.setAttribute('style', 'background: #f00');
|
||||
|
|
@ -263,7 +263,7 @@ export class AdvancedInput
|
|||
for (let i = 0; i < length; ++i) {
|
||||
|
||||
/**
|
||||
* @todo Orange-Management/jsOMS#70
|
||||
* @todo Karaka/jsOMS#70
|
||||
* Implement external styles for selections instead of inline css
|
||||
*/
|
||||
list[i].setAttribute('style', '');
|
||||
|
|
@ -292,7 +292,7 @@ export class AdvancedInput
|
|||
|
||||
if (self.tagElement !== null && self.tagElement.getAttribute('data-active') === 'true') {
|
||||
/**
|
||||
* @todo Orange-Management/jsOMS#71
|
||||
* @todo Karaka/jsOMS#71
|
||||
* Make badges removable
|
||||
*/
|
||||
const newTag = self.tagTpl.content.cloneNode(true);
|
||||
|
|
@ -314,7 +314,7 @@ export class AdvancedInput
|
|||
}
|
||||
|
||||
/**
|
||||
* @todo Orange-Management/jsOMS#72
|
||||
* @todo Karaka/jsOMS#72
|
||||
* Allow duplication
|
||||
* Create a `data-duplicat=true` attribute to allow duplication and then have a count as part of the uuid (maybe row id).
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ export class AdvancedSelect
|
|||
const self = this;
|
||||
this.selectField.addEventListener('focusout', function (e) {
|
||||
/**
|
||||
* @todo Orange-Management/Modules#63
|
||||
* @todo Karaka/Modules#63
|
||||
* If you click anything outside of the input element the dropdown list closes.
|
||||
* This is also true if you click something inside of the dropdown list e.g. sort/filter etc.
|
||||
* This might be fixable by changing the focus from the input element to the dropdown element and keep the dropdown element visible if it has focus.
|
||||
|
|
@ -76,10 +76,10 @@ export class AdvancedSelect
|
|||
jsOMS.preventAll(e);
|
||||
|
||||
/**
|
||||
* @todo Orange-Management/jsOMS#73
|
||||
* @todo Karaka/jsOMS#73
|
||||
* Consider to add a none element which allows phone users to undo a selection (if this is allowed).
|
||||
*
|
||||
* @todo Orange-Management/jsOMS#74
|
||||
* @todo Karaka/jsOMS#74
|
||||
* Implement auto filtering on client side (for remote data and client side data).
|
||||
*/
|
||||
if (e.keyCode === 27 || e.keyCode === 46 || e.keyCode === 8) {
|
||||
|
|
@ -218,7 +218,7 @@ export class AdvancedSelect
|
|||
selectOption(e) {
|
||||
e.focus();
|
||||
/**
|
||||
* @todo Orange-Management/jsOMS#70
|
||||
* @todo Karaka/jsOMS#70
|
||||
* Implement external styles for selections instead of inline css
|
||||
*/
|
||||
e.setAttribute('style', 'background: #f00');
|
||||
|
|
@ -240,7 +240,7 @@ export class AdvancedSelect
|
|||
|
||||
for (let i = 0; i < length; ++i) {
|
||||
/**
|
||||
* @todo Orange-Management/jsOMS#70
|
||||
* @todo Karaka/jsOMS#70
|
||||
* Implement external styles for selections instead of inline css
|
||||
*/
|
||||
list[i].setAttribute('style', '');
|
||||
|
|
@ -266,7 +266,7 @@ export class AdvancedSelect
|
|||
|
||||
if (self.tagElement.getAttribute('data-active') === 'true') {
|
||||
/**
|
||||
* @todo Orange-Management/jsOMS#71
|
||||
* @todo Karaka/jsOMS#71
|
||||
* Make badges removable
|
||||
*/
|
||||
const newTag = self.tagTpl.content.cloneNode(true);
|
||||
|
|
@ -285,7 +285,7 @@ export class AdvancedSelect
|
|||
}
|
||||
|
||||
/**
|
||||
* @todo Orange-Management/jsOMS#72
|
||||
* @todo Karaka/jsOMS#72
|
||||
* Allow duplication
|
||||
* Create a `data-duplicat=true` attribute to allow duplication and then have a count as part of the uuid (maybe row id).
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import { UriFactory } from '../../Uri/UriFactory.js';
|
|||
* data-ui-content = what is the main parent
|
||||
* data-ui-element = what are the elements to replace
|
||||
*
|
||||
* @todo Orange-Management/jsOMS#60
|
||||
* @todo Karaka/jsOMS#60
|
||||
* On change listener
|
||||
* Allow to add a on change listener in a form. This should result in automatic submits after changing a form.
|
||||
* Consider the following cases to submit the form:
|
||||
|
|
@ -484,7 +484,7 @@ export class Form
|
|||
const self = this;
|
||||
|
||||
/**
|
||||
* @todo Orange-Management/jsOMS#75
|
||||
* @todo Karaka/jsOMS#75
|
||||
* Currently only one add button is allowed per form. Allow multiple/different add buttons in a form.
|
||||
*/
|
||||
create.addEventListener('click', function () {
|
||||
|
|
@ -584,7 +584,7 @@ export class Form
|
|||
});
|
||||
|
||||
/**
|
||||
* @todo Orange-Management/jsOMS#85
|
||||
* @todo Karaka/jsOMS#85
|
||||
* Invalid backend/api responses (!201) should undo/stop UI changes
|
||||
*/
|
||||
};
|
||||
|
|
@ -595,7 +595,7 @@ export class Form
|
|||
const request = new Request(e);
|
||||
request.setResultCallback(200, function(xhr) {
|
||||
/**
|
||||
* @todo Orange-Management/jsOMS#84
|
||||
* @todo Karaka/jsOMS#84
|
||||
* Remote data responses need to be parsed
|
||||
* The data coming from the backend/api usually is not directly usable in the frontend.
|
||||
* For that purpose some kind of value path should be defined to handle json responses in order to get only the data that is needed.
|
||||
|
|
@ -739,7 +739,7 @@ export class Form
|
|||
: formElement.querySelector(formElement.getAttribute('data-add-content'));
|
||||
|
||||
/**
|
||||
* @todo Orange-Management/jsOMS#76
|
||||
* @todo Karaka/jsOMS#76
|
||||
* In the beginning there was a fixed amount of templates required (even if some were not used) for adding new dom elements to a lest, table etc.
|
||||
* This no longer works especially for inline editing
|
||||
* ```js
|
||||
|
|
@ -766,7 +766,7 @@ export class Form
|
|||
subMain.appendChild(newEle.firstElementChild);
|
||||
|
||||
/**
|
||||
* @todo Orange-Management/jsOMS#82
|
||||
* @todo Karaka/jsOMS#82
|
||||
* The container element for inline adding isn't always tbody
|
||||
*/
|
||||
self.app.uiManager.getFormManager().get(eleId + '-form').injectSubmit(function () {
|
||||
|
|
@ -776,21 +776,21 @@ export class Form
|
|||
});
|
||||
|
||||
/**
|
||||
* @todo Orange-Management/jsOMS#78
|
||||
* @todo Karaka/jsOMS#78
|
||||
* After adding a new element some require a binding for removal
|
||||
*
|
||||
* @todo Orange-Management/jsOMS#79
|
||||
* @todo Karaka/jsOMS#79
|
||||
* After adding a new element some require a binding for editing
|
||||
*/
|
||||
});
|
||||
|
||||
/**
|
||||
* @todo Orange-Management/jsOMS#80
|
||||
* @todo Karaka/jsOMS#80
|
||||
* Consider to do UI action as success inject after a backend response.
|
||||
* This will prevent bugs where the backand couldn't complete a action but the user sees it in the frontend.
|
||||
* This should be probably optional optional because sometimes there will be no calls to the backend.
|
||||
*
|
||||
* @todo Orange-Management/jsOMS#81
|
||||
* @todo Karaka/jsOMS#81
|
||||
* A template can contain elements which must/should have an id (e.g. a form).
|
||||
* If this element gets added to the DOM the id should be changed to a unique id because it could be added multiple times to the DOM.
|
||||
* In order to bind these elements (e.g. forms) they must have a unique id.
|
||||
|
|
@ -965,7 +965,7 @@ export class Form
|
|||
});
|
||||
|
||||
/**
|
||||
* @todo Orange-Management/jsOMS#85
|
||||
* @todo Karaka/jsOMS#85
|
||||
* Invalid backend/api responses (!201) should undo/stop UI changes
|
||||
*/
|
||||
};
|
||||
|
|
@ -1367,10 +1367,10 @@ export class Form
|
|||
});
|
||||
|
||||
/**
|
||||
* @todo Orange-Management/jsOMS#85
|
||||
* @todo Karaka/jsOMS#85
|
||||
* Invalid backend/api responses (!201) should undo/stop UI changes
|
||||
*
|
||||
* @todo Orange-Management/jsOMS#87
|
||||
* @todo Karaka/jsOMS#87
|
||||
* On edit highlight the data which is changed
|
||||
*/
|
||||
});
|
||||
|
|
|
|||
|
|
@ -10,20 +10,20 @@ import { ResponseType } from '../../Message/Response/ResponseType.js';
|
|||
* @version 1.0.0
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @todo Orange-Management/jsOMS#50
|
||||
* @todo Karaka/jsOMS#50
|
||||
* Add basic table handling (no db and pagination)
|
||||
*
|
||||
* @todo Orange-Management/jsOMS#55
|
||||
* @todo Karaka/jsOMS#55
|
||||
* Implement filtering and sorting based on backend
|
||||
*
|
||||
* @todo Orange-Management/jsOMS#57
|
||||
* @todo Karaka/jsOMS#57
|
||||
* Advanced filtering
|
||||
* The current filtering implementation is only column by column connected with &&.
|
||||
* Consider to implement a much more advanced filtering where different combinations are possible such as || &&, different ordering with parenthesis etc.
|
||||
* This can be extremely powerful but will be complex for standard users.
|
||||
* This advanced filtering should probably be a little bit hidden?
|
||||
*
|
||||
* @todo Orange-Management/jsOMS#59
|
||||
* @todo Karaka/jsOMS#59
|
||||
* Data download
|
||||
* There is a small icon in the top right corner of tables which allows (not yet to be honest) to download the data in the table.
|
||||
* Whether the backend should be queried for this or only the frontend data should be collected (current situation) should depend on if the table has an api endpoint defined.
|
||||
|
|
@ -112,7 +112,7 @@ export class Table
|
|||
this.bindExport(this.tables[id]);
|
||||
|
||||
/**
|
||||
* @todo Orange-Management/jsOMS#89
|
||||
* @todo Karaka/jsOMS#89
|
||||
* Implement local and remote filtering
|
||||
* Options:
|
||||
* * alphanumeric
|
||||
|
|
@ -181,7 +181,7 @@ export class Table
|
|||
{
|
||||
console.log(exports.serialize());
|
||||
/**
|
||||
* @todo Orange-Management/jsOMS#90
|
||||
* @todo Karaka/jsOMS#90
|
||||
* Implement export
|
||||
* Either create download in javascript 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, ...
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import { FormView } from './../Views/FormView.js';
|
|||
* @version 1.0.0
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @todo Orange-Management/phpOMS#239
|
||||
* @todo Karaka/phpOMS#239
|
||||
* Optional parameters
|
||||
* Sometimes we need to define a list of optional parameters that will be filled if they exist and only if they exist.
|
||||
* E.g. `u=` for unit `filter=` for filtering etc.
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import { Input } from '../UI/Component/Input.js';
|
|||
* @version 1.0.0
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @tood Orange-Management/jsOMS#60
|
||||
* @tood Karaka/jsOMS#60
|
||||
* On change listener
|
||||
* Allow to add a on change listener in a form. This should result in automatic submits after changing a form.
|
||||
* Consider the following cases to submit the form:
|
||||
|
|
|
|||
|
|
@ -6,20 +6,20 @@
|
|||
* @version 1.0.0
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @todo Orange-Management/jsOMS#50
|
||||
* @todo Karaka/jsOMS#50
|
||||
* Add basic table handling (no db and pagination)
|
||||
*
|
||||
* @todo Orange-Management/jsOMS#55
|
||||
* @todo Karaka/jsOMS#55
|
||||
* Implement filtering and sorting based on backend
|
||||
*
|
||||
* @todo Orange-Management/jsOMS#57
|
||||
* @todo Karaka/jsOMS#57
|
||||
* Advanced filtering
|
||||
* The current filtering implementation is only column by column connected with &&.
|
||||
* Consider to implement a much more advanced filtering where different combinations are possible such as || &&, different ordering with parenthesis etc.
|
||||
* This can be extremely powerful but will be complex for standard users.
|
||||
* This advanced filtering should probably be a little bit hidden?
|
||||
*
|
||||
* @todo Orange-Management/jsOMS#59
|
||||
* @todo Karaka/jsOMS#59
|
||||
* Data download
|
||||
* There is a small icon in the top right corner of tables which allows (not yet to be honest) to download the data in the table.
|
||||
* Whether the backend should be queried for this or only the frontend data should be collected (current situation) should depend on if the table has an api endpoint defined.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user