better width/height for textarea editables
This commit is contained in:
parent
1b42a4e7f1
commit
9419e3972e
2 changed files with 7 additions and 1 deletions
|
@ -192,7 +192,12 @@ Ox.Editable = function(options, self) {
|
||||||
var height, width;
|
var height, width;
|
||||||
self.$test.css({display: 'inline-block'});
|
self.$test.css({display: 'inline-block'});
|
||||||
height = self.options.height || Ox.limit(self.$test.height(), self.minHeight, self.maxHeight);
|
height = self.options.height || Ox.limit(self.$test.height(), self.minHeight, self.maxHeight);
|
||||||
width = self.options.width || Ox.limit(self.$test.width(), self.minWidth, self.maxWidth);
|
width = self.$test.width();
|
||||||
|
//+Ox.UI.SCROLLBAR_SIZE to prevent scrollbar from showing up
|
||||||
|
if (self.options.type == 'textarea') {
|
||||||
|
width += Ox.UI.SCROLLBAR_SIZE;
|
||||||
|
}
|
||||||
|
width = self.options.width || Ox.limit(width, self.minWidth, self.maxWidth);
|
||||||
self.$test.css({display: 'none'});
|
self.$test.css({display: 'none'});
|
||||||
self.$input.options({
|
self.$input.options({
|
||||||
width: width,
|
width: width,
|
||||||
|
|
|
@ -212,6 +212,7 @@ Ox.AnnotationFolder = function(options, self) {
|
||||||
sort: self.sort,
|
sort: self.sort,
|
||||||
submitOnBlur: false,
|
submitOnBlur: false,
|
||||||
width: self.options.width,
|
width: self.options.width,
|
||||||
|
maxHeight: self.options.type == 'text' ? Infinity : void 0,
|
||||||
type: self.options.type == 'text' ? 'textarea' : 'input'
|
type: self.options.type == 'text' ? 'textarea' : 'input'
|
||||||
})
|
})
|
||||||
//.css({marginTop: '256px'})
|
//.css({marginTop: '256px'})
|
||||||
|
|
Loading…
Add table
Reference in a new issue