N°3136 - Add creation and modification of n-n objects in object details (#378)

* Rebase onto develop

* Use exit condition instead of englobing condition

* Add informative modals that can be called from modal toolbox

* Refactor "apply_modify" and "apply_new" into own controller, handle ajax requests with a json response and handle these responses in linkset creation/edition

* Fix merge issues

* Remove inverted condition

* Move linkset create button to a better place, still needs to fix duplicate "New" button caused by a refactor

* Handle "Cancel" button in modals

* Do not display relations when editing an object in a modal

* More elegant way to add "New" button to relations lists

* Factorize vertical highlights in alerts and modal in a single mixin

* Replace button name with dict entry code

* Change route name to snake case

* More elegant way to add "Create in modal" button to relations lists

* Replace triple if with in_array

* Move listener to body

* Rename variable to match boolean rules

* Rename event

* Rename extra param

* Add phpdoc

* Revert changes

* Check indirect linkset rights before allowing creation in modal
This commit is contained in:
Stephen Abello
2023-01-18 13:35:48 +01:00
committed by GitHub
parent cc2881a7b0
commit e1ffa65d8b
21 changed files with 835 additions and 328 deletions

View File

@@ -1167,6 +1167,7 @@ let CombodoModal = {
{
id: null, // ID of the created modal
attributes: {}, // HTML attributes
classes: {}, // Classes for the created modal elements
base_modal: {
usage: 'clone', // Either 'clone' or 'replace'
selector: this._GetDefaultBaseModalSelector() // Either a selector of the modal element used to base this one on or the modal element itself
@@ -1304,5 +1305,18 @@ let CombodoModal = {
OpenConfirmationModal: function(oOptions) {
// Meant for overlaoding
CombodoJSConsole.Debug('CombodoModal.OpenConfirmationModal not implemented');
},
/**
* Open a standard informative modal.
*
* @param sMessage string Informative message to be displayed in the modal
* @param sSeverity string Severity of the information. Default values are success, information, warning, error.
* @param oOptions array @see CombodoModal.OpenModal
*/
OpenInformativeModal: function(sMessage,sSeverity, oOptions) {
// Meant for overlaoding
CombodoJSConsole.Debug('CombodoModal.OpenInformativeModal not implemented');
}
};