[MERGE] Merged with web/trunk.

bzr revid: tde@openerp.com-20120807100902-plhjlmx7dry92fcj
This commit is contained in:
Thibault Delavallée 2012-08-07 12:09:02 +02:00
commit 547bd10553
7 changed files with 52 additions and 7 deletions

View File

@ -27,7 +27,7 @@
var $tip = this.tip();
$tip.find('.tipsy-inner')[this.options.html ? 'html' : 'text'](title);
$tip[0].className = 'tipsy'; // reset classname in case of dynamic gravity
$tip[0].className = 'tipsy openerp oe_tooltip '; // reset classname in case of dynamic gravity
$tip.remove().css({top: 0, left: 0, visibility: 'hidden', display: 'block'}).prependTo(document.body);
var pos = $.extend({}, this.$element.offset(), {
@ -63,7 +63,7 @@
}
}
$tip.css(tp).addClass('openerp oe_tooltip tipsy-' + gravity);
$tip.css(tp).addClass('tipsy-' + gravity);
$tip.find('.tipsy-arrow')[0].className = 'tipsy-arrow tipsy-arrow-' + gravity.charAt(0);
if (this.options.className) {
$tip.addClass(maybeCall(this.options.className, this.$element[0]));

View File

@ -610,6 +610,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;

View File

@ -475,6 +475,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

View File

@ -400,6 +400,9 @@ instance.web.DatabaseManager = instance.web.Widget.extend({
'db': form_obj['db_name'],
'login': 'admin',
'password': form_obj['create_admin_pwd'],
'login_successful': function() {
instance.webclient.show_application();
},
},
};
self.do_action(client_action);
@ -979,6 +982,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');
}

View File

@ -2698,6 +2698,7 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
this.on("change:value", this, function() {
this.floating = false;
this.render_value();
this.$('.oe_m2o_cm_button').css({'visibility': this.is_false() ? 'hidden' : 'visible'});
});
},
initialize_content: function() {
@ -2711,10 +2712,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 +2779,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) {

View File

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

View File

@ -256,7 +256,7 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
scroll: false
});
} else {
this.$element.find('.oe_kanban_draghandle').removeClass('oe_kanban_draghandle').removeClass('oe_kanban_card');
this.$element.find('.oe_kanban_draghandle').removeClass('oe_kanban_draghandle');
}
},
on_record_moved : function(record, old_group, old_index, new_group, new_index) {
@ -320,7 +320,7 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
},
open_record: function(id, editable) {
if (this.dataset.select_id(id)) {
this.do_switch_view('form', null);
this.do_switch_view('form', null, { editable: editable });
} else {
this.do_warn("Kanban: could not find id#" + id);
}
@ -606,7 +606,7 @@ instance.web_kanban.KanbanRecord = instance.web.OldWidget.extend({
// If no draghandle is found, make the whole card as draghandle
if (!this.$element.find('.oe_kanban_draghandle').length) {
this.$element.children(':first').addClass('oe_kanban_draghandle').addClass('oe_kanban_card');
this.$element.children(':first').addClass('oe_kanban_draghandle');
}
this.$element.find('.oe_kanban_action').click(function() {