add class editable-popup, fix

This commit is contained in:
vitalets 2013-04-14 22:25:27 +04:00
parent 77def74313
commit b77a8c8ed6
3 changed files with 6 additions and 4 deletions

@ -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 */
}

@ -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.

@ -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) {