mirror of
https://github.com/a2nt/webpack-bootstrap-ui-kit.git
synced 2024-10-22 11:05:45 +02:00
FIX: form basics initialization
This commit is contained in:
parent
f30b21d633
commit
6475a5a47b
2
dist/css/app.css
vendored
2
dist/css/app.css
vendored
File diff suppressed because one or more lines are too long
2
dist/css/app.css.map
vendored
2
dist/css/app.css.map
vendored
File diff suppressed because one or more lines are too long
2
dist/js/app.js
vendored
2
dist/js/app.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/app.js.map
vendored
2
dist/js/app.js.map
vendored
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@a2nt/ss-bootstrap-ui-webpack-boilerplate",
|
||||
"version": "2.2.1",
|
||||
"version": "2.2.2",
|
||||
"author": "Tony Air <tony@twma.pro>",
|
||||
"license": "MIT",
|
||||
"description": "This UI Kit allows you to build Bootstrap 4 webapp with some extra UI features. It's easy to extend and easy to convert HTML templates to CMS templates.",
|
||||
|
@ -25,6 +25,9 @@ const FormBasics = (($) => {
|
||||
const $el = $(el);
|
||||
|
||||
ui._el = el;
|
||||
ui.dispose();
|
||||
|
||||
console.log(`${NAME}: init`);
|
||||
$el.data(DATA_KEY, this);
|
||||
|
||||
//$('[data-inputmask]').inputmask();
|
||||
@ -36,7 +39,9 @@ const FormBasics = (($) => {
|
||||
new FormFieldUI(el);
|
||||
});
|
||||
|
||||
const $selectFields = $el.find('select:not([readonly])');
|
||||
const $selectFields = $el
|
||||
.find('select:not([readonly])')
|
||||
.not('.no-select2');
|
||||
const $radioOptions = $el.find('input[type="radio"]');
|
||||
|
||||
$selectFields.each((i, el) => {
|
||||
@ -90,16 +95,24 @@ const FormBasics = (($) => {
|
||||
|
||||
// Public methods
|
||||
dispose() {
|
||||
const $el = $(this._el);
|
||||
console.log(`${NAME}: dispose`);
|
||||
const ui = this;
|
||||
|
||||
const $selectFields = $el.find('select:not([readonly])');
|
||||
const $el = $(ui._el);
|
||||
|
||||
const $selectFields = $el
|
||||
.find('select:not([readonly])')
|
||||
.not('.no-select2');
|
||||
$selectFields.each((i, el) => {
|
||||
$(el).select2('destroy');
|
||||
const $el = $(el);
|
||||
if ($el.hasClass('select2-hidden-accessible')) {
|
||||
$el.select2('destroy');
|
||||
}
|
||||
});
|
||||
|
||||
$.removeData(ui._el, DATA_KEY);
|
||||
ui._el = null;
|
||||
$el.removeClass(`${NAME}-active`);
|
||||
$.removeData(this._el, DATA_KEY);
|
||||
this._el = null;
|
||||
}
|
||||
|
||||
static _jQueryInterface() {
|
||||
|
@ -29,6 +29,7 @@ img {
|
||||
|
||||
.a {
|
||||
cursor: pointer;
|
||||
color: $link-color;
|
||||
}
|
||||
|
||||
.a,
|
||||
|
Loading…
Reference in New Issue
Block a user