adding files of assets
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
"use strict";
|
||||
|
||||
// Class definition
|
||||
var KTFormRepeaterAdvanced = function () {
|
||||
// Private functions
|
||||
var example1 = function () {
|
||||
$('#kt_docs_repeater_advanced').repeater({
|
||||
initEmpty: false,
|
||||
|
||||
defaultValues: {
|
||||
'text-input': 'foo'
|
||||
},
|
||||
|
||||
show: function () {
|
||||
$(this).slideDown();
|
||||
|
||||
// Re-init select2
|
||||
$(this).find('[data-kt-repeater="select2"]').select2();
|
||||
|
||||
// Re-init flatpickr
|
||||
$(this).find('[data-kt-repeater="datepicker"]').flatpickr();
|
||||
|
||||
// Re-init tagify
|
||||
new Tagify(this.querySelector('[data-kt-repeater="tagify"]'));
|
||||
},
|
||||
|
||||
hide: function (deleteElement) {
|
||||
$(this).slideUp(deleteElement);
|
||||
},
|
||||
|
||||
ready: function(){
|
||||
// Init select
|
||||
$('[data-kt-repeater="select2"]').select2();
|
||||
|
||||
// Init flatpickr
|
||||
$('[data-kt-repeater="datepicker"]').flatpickr();
|
||||
|
||||
// Init Tagify
|
||||
new Tagify(document.querySelector('[data-kt-repeater="tagify"]'));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
// Public Functions
|
||||
init: function () {
|
||||
example1();
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
// On document ready
|
||||
KTUtil.onDOMContentLoaded(function () {
|
||||
KTFormRepeaterAdvanced.init();
|
||||
});
|
||||
@@ -0,0 +1,35 @@
|
||||
"use strict";
|
||||
|
||||
// Class definition
|
||||
var KTFormRepeaterBasic = function () {
|
||||
// Private functions
|
||||
var example1 = function () {
|
||||
$('#kt_docs_repeater_basic').repeater({
|
||||
initEmpty: false,
|
||||
|
||||
defaultValues: {
|
||||
'text-input': 'foo'
|
||||
},
|
||||
|
||||
show: function () {
|
||||
$(this).slideDown();
|
||||
},
|
||||
|
||||
hide: function (deleteElement) {
|
||||
$(this).slideUp(deleteElement);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
// Public Functions
|
||||
init: function () {
|
||||
example1();
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
// On document ready
|
||||
KTUtil.onDOMContentLoaded(function () {
|
||||
KTFormRepeaterBasic.init();
|
||||
});
|
||||
@@ -0,0 +1,47 @@
|
||||
"use strict";
|
||||
|
||||
// Class definition
|
||||
var KTFormRepeaterNested = function() {
|
||||
// Private functions
|
||||
var example1 = function() {
|
||||
$('#kt_docs_repeater_nested').repeater({
|
||||
// (Required if there is a nested repeater)
|
||||
// Specify the configuration of the nested repeaters.
|
||||
// Nested configuration follows the same format as the base configuration,
|
||||
// supporting options "defaultValues", "show", "hide", etc.
|
||||
// Nested repeaters additionally require a "selector" field.
|
||||
repeaters: [{
|
||||
// (Required)
|
||||
// Specify the jQuery selector for this nested repeater
|
||||
selector: '.inner-repeater',
|
||||
show: function () {
|
||||
$(this).slideDown();
|
||||
},
|
||||
|
||||
hide: function (deleteElement) {
|
||||
$(this).slideUp(deleteElement);
|
||||
}
|
||||
}],
|
||||
|
||||
show: function () {
|
||||
$(this).slideDown();
|
||||
},
|
||||
|
||||
hide: function (deleteElement) {
|
||||
$(this).slideUp(deleteElement);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
// Public Functions
|
||||
init: function() {
|
||||
example1();
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
// On document ready
|
||||
KTUtil.onDOMContentLoaded(function() {
|
||||
KTFormRepeaterNested.init();
|
||||
});
|
||||
Reference in New Issue
Block a user