Bootstrap 5 works

This commit is contained in:
Micha
2025-02-21 17:25:26 +01:00
parent 94b34e6256
commit 263c9ab3c4
30 changed files with 14255 additions and 367 deletions

@ -1,7 +1,7 @@
/*! X-editable - v1.5.1
* In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery
* http://github.com/vitalets/x-editable
* Copyright (c) 2013 Vitaliy Potapov; Licensed MIT */
* Copyright (c) 2025 Vitaliy Potapov; Licensed MIT */
/**
Form with single input element, two buttons and two states: normal/loading.
Applied as jQuery method to DIV tag (not to form tag!). This is because form can be in loading state when spinner shown.
@ -1040,7 +1040,7 @@ Applied as jQuery method.
.on({
save: $.proxy(this.save, this), //click on submit button (value changed)
nochange: $.proxy(function(){ this.hide('nochange'); }, this), //click on submit button (value NOT changed)
cancel: $.proxy(function(){ this.hide('cancel'); }, this), //click on calcel button
cancel: $.proxy(function(){ this.hide('cancel'); }, this), //click on cancel button
show: $.proxy(function() {
if(this.delayedHide) {
this.hide(this.delayedHide.reason);
@ -1630,16 +1630,16 @@ Makes editable any HTML element on the page. Applied as jQuery method.
if(this.options.display === false) {
return;
}
//if input has `value2htmlFinal` method, we pass callback in third param to be called when source is loaded
if(this.input.value2htmlFinal) {
return this.input.value2html(this.value, this.$element[0], this.options.display, response);
//if display method defined --> use it
return this.input.value2html(this.value, this.$element[0], this.options.display, response);
//if display method defined --> use it
} else if(typeof this.options.display === 'function') {
return this.options.display.call(this.$element[0], this.value, response);
//else use input's original value2html() method
//else use input's original value2html() method
} else {
return this.input.value2html(this.value, this.$element[0]);
return this.input.value2html(this.value, this.$element[0]);
}
},
@ -2555,6 +2555,7 @@ List - abstract class for inputs that have source option loaded from js array or
$.extend(List.prototype, {
render: function () {
var deferred = $.Deferred();
this.error = null;
@ -3890,9 +3891,11 @@ $(function(){
},
destroy: function() {
if(this.$input.data('select2')) {
this.$input.select2('destroy');
}
if(this.$input) {
if(this.$input.data('select2')) {
this.$input.select2('destroy');
}
}
}
});
@ -4418,7 +4421,7 @@ $(function(){
//initial value, can be `new Date()`
value: null,
minYear: 1970,
maxYear: 2015,
maxYear: (new Date().getFullYear()),
yearDescending: true,
minuteStep: 5,
secondStep: 1,
@ -4429,6 +4432,7 @@ $(function(){
};
}(window.jQuery));
/**
Combodate input - dropdown date and time picker.
Based on [combodate](http://vitalets.github.com/combodate) plugin (included). To use it you should manually include [momentjs](http://momentjs.com).

File diff suppressed because one or more lines are too long