forked from ems-project/elasticms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(bootstrap 5): date field types, textareas and some fixes (em…
- Loading branch information
Showing
32 changed files
with
432 additions
and
398 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
form { | ||
div.has-error { | ||
border-color: var(--bs-form-invalid-border-color); | ||
border-style: solid; | ||
border-width: 1px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,44 @@ | ||
'use strict' | ||
import $ from 'jquery' | ||
import queryString from '../helpers/queryString' | ||
import { Modal as BSModal } from 'bootstrap' | ||
import ajaxModal from '../../../js/core/helpers/ajaxModal' | ||
|
||
export default class Modal { | ||
constructor () { | ||
this.autoOpenModal() | ||
this.closeModalNotification() | ||
this.intAjaxModalLinks() | ||
} | ||
|
||
autoOpenModal () { | ||
const queryStringObject = queryString() | ||
if (queryStringObject.open) { | ||
const modalElement = document.getElementById(`content_type_structure_fieldType${queryStringObject.open}`) | ||
const modal = BSModal.getOrCreateInstance(modalElement) | ||
const modal = window.bootstrap.Modal.getOrCreateInstance(modalElement) | ||
modal.show() | ||
} | ||
} | ||
|
||
closeModalNotification () { | ||
$('#modal-notification-close-button').on('click', function () { | ||
$('#modal-notifications .modal-body').empty() | ||
$('#modal-notifications').modal('hide') | ||
}) | ||
} | ||
|
||
intAjaxModalLinks () { | ||
const ajaxModalLinks = document.querySelectorAll('a[data-ajax-modal-url]'); | ||
[].forEach.call(ajaxModalLinks, function (link) { | ||
link.onclick = (event) => { | ||
ajaxModal.load({ | ||
url: event.target.dataset.ajaxModalUrl, | ||
size: event.target.dataset.ajaxModalSize | ||
}, (json) => { | ||
if (Object.prototype.hasOwnProperty.call(json, 'success') && json.success === true) { | ||
location.reload() | ||
} | ||
}) | ||
} | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.