position clear button via css
This commit is contained in:
parent
2c89198cc9
commit
25bf2a360f
src
@ -113,7 +113,11 @@
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
|
|
||||||
|
top: 50%;
|
||||||
|
right: 5px;
|
||||||
|
margin-top: -7px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.editable-clear-x:hover {
|
.editable-clear-x:hover {
|
||||||
|
@ -136,16 +136,16 @@ Number
|
|||||||
},
|
},
|
||||||
postrender: function() {
|
postrender: function() {
|
||||||
if(this.$clear) {
|
if(this.$clear) {
|
||||||
|
//increase right ffset for up/down arrows
|
||||||
|
this.$clear.css({right: 24});
|
||||||
|
/*
|
||||||
//can position clear button only here, when form is shown and height can be calculated
|
//can position clear button only here, when form is shown and height can be calculated
|
||||||
var h = this.$input.outerHeight() || 20,
|
var h = this.$input.outerHeight(true) || 20,
|
||||||
delta = (h - this.$clear.height()) / 2;
|
delta = (h - this.$clear.height()) / 2;
|
||||||
|
|
||||||
//workaround for plain-popup
|
|
||||||
if(delta < 3) {
|
|
||||||
delta = 3;
|
|
||||||
}
|
|
||||||
//add 12px to offset right for up/down arrows
|
//add 12px to offset right for up/down arrows
|
||||||
this.$clear.css({bottom: delta, right: delta + 12});
|
this.$clear.css({top: delta, right: delta + 16});
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -67,18 +67,17 @@ $(function(){
|
|||||||
},
|
},
|
||||||
|
|
||||||
postrender: function() {
|
postrender: function() {
|
||||||
|
/*
|
||||||
|
//now `clear` is positioned via css
|
||||||
if(this.$clear) {
|
if(this.$clear) {
|
||||||
//can position clear button only here, when form is shown and height can be calculated
|
//can position clear button only here, when form is shown and height can be calculated
|
||||||
var h = this.$input.outerHeight() || 20,
|
// var h = this.$input.outerHeight(true) || 20,
|
||||||
|
var h = this.$clear.parent().height(),
|
||||||
delta = (h - this.$clear.height()) / 2;
|
delta = (h - this.$clear.height()) / 2;
|
||||||
|
|
||||||
//workaround for plain-popup
|
|
||||||
if(delta < 3) {
|
|
||||||
delta = 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$clear.css({bottom: delta, right: delta});
|
//this.$clear.css({bottom: delta, right: delta});
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
},
|
},
|
||||||
|
|
||||||
//show / hide clear button
|
//show / hide clear button
|
||||||
|
Loading…
x
Reference in New Issue
Block a user