diff --git a/src/containers/editable-container.css b/src/containers/editable-container.css index 8b644e2..5f36d6d 100644 --- a/src/containers/editable-container.css +++ b/src/containers/editable-container.css @@ -1,9 +1,8 @@ -.editable-container { +.editable-container.editable-popup { max-width: none !important; /* without this rule poshytip/tooltip does not stretch */ } .editable-container.popover { -/* width: 300px;*/ /* debug */ width: auto; /* without this rule popover does not stretch */ } diff --git a/src/containers/editable-container.js b/src/containers/editable-container.js index 83d1018..609cfea 100644 --- a/src/containers/editable-container.js +++ b/src/containers/editable-container.js @@ -22,6 +22,7 @@ Applied as jQuery method. Popup.prototype = { containerName: 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) { this.$element = $(element); //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); }, + /* call native method of underlying container, e.g. this.$element.popover('method') */ call: function() { this.$element[this.containerName].apply(this.$element, arguments); }, @@ -166,7 +168,7 @@ Applied as jQuery method. //show container itself this.innerShow(); - this.tip().addClass('editable-container'); + this.tip().addClass(this.containerClass); /* Currently, form is re-rendered on every show. diff --git a/src/containers/editable-inline.js b/src/containers/editable-inline.js index 96327fb..f592ffd 100644 --- a/src/containers/editable-inline.js +++ b/src/containers/editable-inline.js @@ -10,10 +10,11 @@ $.extend($.fn.editableContainer.Inline.prototype, $.fn.editableContainer.Popup.prototype, { containerName: 'editableform', innerCss: '.editable-inline', + containerClass: 'editable-container editable-inline', //css class applied to container element initContainer: function(){ //container is <span> element - this.$tip = $('<span></span>').addClass('editable-inline'); + this.$tip = $('<span></span>'); //convert anim to miliseconds (int) if(!this.options.anim) {