forked from 0x2620/oxjs
fix Ox.Edidable textarea height, dont add title to links in parseHTML
This commit is contained in:
parent
f7755eb303
commit
7475ef0124
3 changed files with 21 additions and 16 deletions
|
|
@ -110,7 +110,6 @@ Ox.Editable = function(options, self) {
|
|||
self.options.editing = true;
|
||||
that.addClass('OxEditing');
|
||||
self.originalValue = self.options.value;
|
||||
self.$value.hide();
|
||||
if (!self.$input) {
|
||||
self.$input = Ox.Input({
|
||||
changeOnKeypress: true,
|
||||
|
|
@ -141,6 +140,7 @@ Ox.Editable = function(options, self) {
|
|||
? self.minHeight
|
||||
: self.options.maxHeight || that.parent().height();
|
||||
setSizes();
|
||||
self.$value.hide();
|
||||
self.$input.show();
|
||||
if (!self.options.blurred) {
|
||||
setTimeout(function() {
|
||||
|
|
@ -194,14 +194,14 @@ Ox.Editable = function(options, self) {
|
|||
|
||||
function setSizes() {
|
||||
var height, width;
|
||||
self.$test.show();
|
||||
self.$test.css({display: 'inline-block'});
|
||||
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);
|
||||
self.$test.hide();
|
||||
self.$test.css({display: 'none'});
|
||||
self.$input.options({
|
||||
width: width,
|
||||
height: height
|
||||
});
|
||||
width: width,
|
||||
height: height
|
||||
});
|
||||
self.$input.find(self.options.type).css({
|
||||
height: height + 'px',
|
||||
width: width + 'px'
|
||||
|
|
|
|||
|
|
@ -397,9 +397,14 @@ Ox.AnnotationFolder = function(options, self) {
|
|||
if (self.widget && self.options.items.length) {
|
||||
self.$annotations.find('.OxEditableElement').each(function() {
|
||||
var $element = $(this);
|
||||
if (!Ox.getObjectById(
|
||||
self.options.items, $element.data('id')
|
||||
)[self.options.type]) {
|
||||
// We don't want to catch an eventual placeholder,
|
||||
// which is an EditableElement without .data('id')
|
||||
if (
|
||||
$element.data('id')
|
||||
&& !Ox.getObjectById(
|
||||
self.options.items, $element.data('id')
|
||||
)[self.options.type]
|
||||
) {
|
||||
$element.addClass('OxWarning');
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue