create comments and todo tasks

This commit is contained in:
Dennis Eichhorn 2019-06-06 21:45:27 +02:00
parent 52f8b4d6e1
commit 7c2f204ba6
3 changed files with 71 additions and 2 deletions

View File

@ -0,0 +1,6 @@
// remote data
// select data could be template layout per element
// multi select
// isn't this very similar to the advanced input? just a little different?
// maybe not...

View File

@ -422,10 +422,10 @@ export class Form {
}; };
/** /**
* Create the table row * Create the new input
* *
* @param {string} createForm Create form * @param {string} createForm Create form
* @param {Object} id Table id * @param {Object} id Id
* *
* @return {void} * @return {void}
* *
@ -472,6 +472,16 @@ export class Form {
// todo: if a column has a form in the template the id of the form needs to be set unique somehow (e.g. remove button in form) // todo: if a column has a form in the template the id of the form needs to be set unique somehow (e.g. remove button in form)
}; };
/**
* Bind edit button
*
* @param {string} update Update button
* @param {Object} id Id
*
* @return {void}
*
* @since 1.0.0
*/
bindUpdatable(update, id) bindUpdatable(update, id)
{ {
if (document.getElementById(id).getAttribute('data-ui-form') === null) { if (document.getElementById(id).getAttribute('data-ui-form') === null) {
@ -481,6 +491,16 @@ export class Form {
} }
}; };
/**
* Bind inline edit button
*
* @param {string} update Update button
* @param {Object} id Id
*
* @return {void}
*
* @since 1.0.0
*/
bindUpdatableInline(update, id) bindUpdatableInline(update, id)
{ {
const self = this; const self = this;
@ -601,6 +621,16 @@ export class Form {
}); });
}; };
/**
* Bind inline cancel button
*
* @param {string} cancel Cancel button
* @param {Object} id Id
*
* @return {void}
*
* @since 1.0.0
*/
bindCancelInline(cancel, id) bindCancelInline(cancel, id)
{ {
const self = this; const self = this;
@ -610,6 +640,16 @@ export class Form {
}); });
}; };
/**
* Bind inline save button
*
* @param {string} save Save button
* @param {Object} id Id
*
* @return {void}
*
* @since 1.0.0
*/
bindSaveInline(save, id) bindSaveInline(save, id)
{ {
const self = this; const self = this;
@ -694,6 +734,16 @@ export class Form {
}); });
} }
/**
* Remove inline edit template
*
* @param {string} ele Inline edit element
* @param {Object} id Id
*
* @return {void}
*
* @since 1.0.0
*/
removeEditTemplate(ele, id) removeEditTemplate(ele, id)
{ {
const formElement = document.getElementById(id); const formElement = document.getElementById(id);
@ -741,6 +791,16 @@ export class Form {
} }
}; };
/**
* Bind edit button where data is edited externally
*
* @param {string} update Update button
* @param {Object} id Id
*
* @return {void}
*
* @since 1.0.0
*/
bindUpdatableExternal(update, id) bindUpdatableExternal(update, id)
{ {
update.addEventListener('click', function () { update.addEventListener('click', function () {

View File

@ -221,6 +221,9 @@
} }
}; };
/**
* @todo: implement
*/
jsOMS.nearest = function (e, selector) jsOMS.nearest = function (e, selector)
{ {