[IMP] Improved m2o tooltip
bzr revid: fme@openerp.com-20120806140044-mgo3git8zi9xrqbh
This commit is contained in:
parent
6b8c1d2828
commit
0cecacd43e
|
@ -602,6 +602,19 @@
|
|||
.openerp.oe_tooltip .oe_tooltip_technical_title {
|
||||
font-weight: bold;
|
||||
}
|
||||
.openerp.oe_tooltip .oe_tooltip_close {
|
||||
margin: -5px 0 0 2px;
|
||||
cursor: default;
|
||||
float: right;
|
||||
color: white;
|
||||
}
|
||||
.openerp.oe_tooltip .oe_tooltip_close:hover {
|
||||
color: #999999;
|
||||
cursor: pointer;
|
||||
}
|
||||
.openerp.oe_tooltip .oe_tooltip_message {
|
||||
max-width: 310px;
|
||||
}
|
||||
.openerp .oe_notebook {
|
||||
margin: 8px 0;
|
||||
padding: 0 16px;
|
||||
|
|
|
@ -469,6 +469,16 @@ $sheet-max-width: 860px
|
|||
list-style: circle
|
||||
.oe_tooltip_technical_title
|
||||
font-weight: bold
|
||||
.oe_tooltip_close
|
||||
margin: -5px 0 0 2px
|
||||
cursor: default
|
||||
float: right
|
||||
color: white
|
||||
&:hover
|
||||
color: #999
|
||||
cursor: pointer
|
||||
.oe_tooltip_message
|
||||
max-width: 310px
|
||||
// }}}
|
||||
// Notebook {{{
|
||||
.oe_notebook
|
||||
|
|
|
@ -979,6 +979,7 @@ instance.web.Client = instance.web.Widget.extend({
|
|||
}, 0);
|
||||
});
|
||||
instance.web.bus.on('click', this, function(ev) {
|
||||
$.fn.tipsy.clear();
|
||||
if (!$(ev.target).is('input[type=file]')) {
|
||||
self.$element.find('.oe_dropdown_menu.oe_opened').removeClass('oe_opened');
|
||||
}
|
||||
|
|
|
@ -2711,10 +2711,20 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
|
|||
|
||||
self.$input.tipsy({
|
||||
title: function() {
|
||||
return "No element was selected, you should create or select one from the dropdown list.";
|
||||
return QWeb.render('Tipsy.alert', {
|
||||
message: "No element was selected, you should create or select one from the dropdown list."
|
||||
});
|
||||
},
|
||||
trigger:'manual',
|
||||
fade: true,
|
||||
gravity: 's',
|
||||
html: true,
|
||||
opacity: 1,
|
||||
offset: 4,
|
||||
});
|
||||
|
||||
self.$input.on('focus', function() {
|
||||
self.$input.tipsy("hide");
|
||||
});
|
||||
|
||||
this.$drop_down = this.$element.find(".oe_m2o_drop_down_button");
|
||||
|
@ -2768,7 +2778,7 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
|
|||
var tip_def = $.Deferred();
|
||||
var untip_def = $.Deferred();
|
||||
var tip_delay = 200;
|
||||
var tip_duration = 3000;
|
||||
var tip_duration = 15000;
|
||||
var anyoneLoosesFocus = function() {
|
||||
var used = false;
|
||||
if (self.floating) {
|
||||
|
|
|
@ -25,6 +25,13 @@
|
|||
</div>
|
||||
</div>
|
||||
</t>
|
||||
<t t-name="Tipsy.alert">
|
||||
<a class="oe_tooltip_close oe_e">[</a>
|
||||
<span style="float:left; margin:2px 5px 0 0;" class="ui-icon ui-icon-alert ui-state-error"></span>
|
||||
<div class="oe_tooltip_message">
|
||||
<t t-esc="message"/>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
<t t-name="CrashManager.warning">
|
||||
<table cellspacing="0" cellpadding="0" border="0" class="oe_dialog_warning">
|
||||
|
|
Loading…
Reference in New Issue