Bootstrap 5 works
This commit is contained in:
@@ -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 */
|
||||
.editableform {
|
||||
margin-bottom: 0; /* overwrites bootstrap margin */
|
||||
}
|
||||
@@ -12,6 +12,16 @@
|
||||
line-height: 20px; /* overwriting bootstrap line-height. See #133 */
|
||||
}
|
||||
|
||||
/*
|
||||
BS3 fix: stop css from breaking when the form is inside a popup and inside a form with the class .form-horizontal
|
||||
See: https://github.com/vitalets/x-editable/issues/682
|
||||
*/
|
||||
.form-horizontal .editable-popup .editableform .form-group {
|
||||
margin-left:0;
|
||||
margin-right:0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
BS3 width:1005 for inputs breaks editable form in popup
|
||||
See: https://github.com/vitalets/x-editable/issues/393
|
||||
@@ -145,6 +155,7 @@
|
||||
.editable-pre-wrapped {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.editable-container.editable-popup {
|
||||
max-width: none !important; /* without this rule poshytip/tooltip does not stretch */
|
||||
}
|
||||
|
@@ -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: new Date().getFullYear(),
|
||||
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).
|
||||
@@ -6804,4 +6808,4 @@ Automatically shown in inline mode.
|
||||
|
||||
$.fn.editabletypes.datetimefield = DateTimeField;
|
||||
|
||||
}(window.jQuery));
|
||||
}(window.jQuery));
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user