add class editable-popup, fix #192
This commit is contained in:
parent
77def74313
commit
b77a8c8ed6
@ -1,9 +1,8 @@
|
|||||||
.editable-container {
|
.editable-container.editable-popup {
|
||||||
max-width: none !important; /* without this rule poshytip/tooltip does not stretch */
|
max-width: none !important; /* without this rule poshytip/tooltip does not stretch */
|
||||||
}
|
}
|
||||||
|
|
||||||
.editable-container.popover {
|
.editable-container.popover {
|
||||||
/* width: 300px;*/ /* debug */
|
|
||||||
width: auto; /* without this rule popover does not stretch */
|
width: auto; /* without this rule popover does not stretch */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@ Applied as jQuery method.
|
|||||||
Popup.prototype = {
|
Popup.prototype = {
|
||||||
containerName: null, //tbd in child class
|
containerName: null, //tbd in child class
|
||||||
innerCss: null, //tbd in child class
|
innerCss: null, //tbd in child class
|
||||||
|
containerClass: 'editable-container editable-popup', //css class applied to container element
|
||||||
init: function(element, options) {
|
init: function(element, options) {
|
||||||
this.$element = $(element);
|
this.$element = $(element);
|
||||||
//since 1.4.1 container do not use data-* directly as they already merged into options.
|
//since 1.4.1 container do not use data-* directly as they already merged into options.
|
||||||
@ -115,6 +116,7 @@ Applied as jQuery method.
|
|||||||
return this.$element.data(this.containerDataName || this.containerName);
|
return this.$element.data(this.containerDataName || this.containerName);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/* call native method of underlying container, e.g. this.$element.popover('method') */
|
||||||
call: function() {
|
call: function() {
|
||||||
this.$element[this.containerName].apply(this.$element, arguments);
|
this.$element[this.containerName].apply(this.$element, arguments);
|
||||||
},
|
},
|
||||||
@ -166,7 +168,7 @@ Applied as jQuery method.
|
|||||||
|
|
||||||
//show container itself
|
//show container itself
|
||||||
this.innerShow();
|
this.innerShow();
|
||||||
this.tip().addClass('editable-container');
|
this.tip().addClass(this.containerClass);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Currently, form is re-rendered on every show.
|
Currently, form is re-rendered on every show.
|
||||||
|
@ -10,10 +10,11 @@
|
|||||||
$.extend($.fn.editableContainer.Inline.prototype, $.fn.editableContainer.Popup.prototype, {
|
$.extend($.fn.editableContainer.Inline.prototype, $.fn.editableContainer.Popup.prototype, {
|
||||||
containerName: 'editableform',
|
containerName: 'editableform',
|
||||||
innerCss: '.editable-inline',
|
innerCss: '.editable-inline',
|
||||||
|
containerClass: 'editable-container editable-inline', //css class applied to container element
|
||||||
|
|
||||||
initContainer: function(){
|
initContainer: function(){
|
||||||
//container is <span> element
|
//container is <span> element
|
||||||
this.$tip = $('<span></span>').addClass('editable-inline');
|
this.$tip = $('<span></span>');
|
||||||
|
|
||||||
//convert anim to miliseconds (int)
|
//convert anim to miliseconds (int)
|
||||||
if(!this.options.anim) {
|
if(!this.options.anim) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user