[MERGE] forward port of branch saas-3 up to revid 4000 dle@openerp.com-20140415130951-ckuv8nsl17qkb300

bzr revid: chs@openerp.com-20140415142910-c3fqzce7wju83f5e
This commit is contained in:
Christophe Simonis 2014-04-15 16:29:10 +02:00
commit 457b877160
5 changed files with 69 additions and 5 deletions

View File

@ -166,7 +166,7 @@ instance.web.Dialog = instance.web.Widget.extend({
$dialog_content.openerpClass();
this.$dialog_box.on('hidden.bs.modal', this, function(){
self.trigger("closing");
self.close();
});
this.$dialog_box.modal('show');
@ -178,8 +178,11 @@ instance.web.Dialog = instance.web.Widget.extend({
Closes the popup, if destroy_on_close was passed to the constructor, it is also destroyed.
*/
close: function(reason) {
if (this.dialog_inited && this.$el.is(":data(bs.modal)")) {
this.$el.parents('.modal').modal('hide');
if (this.dialog_inited) {
this.trigger("closing", reason);
if (this.$el.is(":data(bs.modal)")) { // may have been destroyed by closing signal
this.$el.parents('.modal').modal('hide');
}
}
},
_closing: function() {

View File

@ -631,6 +631,9 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
});
}
return $.when();
}).fail(function() {
self.save_list.pop();
return $.when();
});
}
return iterate();

View File

@ -0,0 +1,58 @@
(function() {
/*
* object.watch polyfill
*
* 2012-04-03
*
* By Eli Grey, http://eligrey.com
* Public Domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/
// object.watch
if (!Object.prototype.watch) {
Object.defineProperty(Object.prototype, "watch", {
enumerable: false
, configurable: true
, writable: false
, value: function (prop, handler) {
var
oldval = this[prop]
, newval = oldval
, getter = function () {
return newval;
}
, setter = function (val) {
oldval = newval;
return newval = handler.call(this, prop, oldval, val);
}
;
if (delete this[prop]) { // can't watch constants
Object.defineProperty(this, prop, {
get: getter
, set: setter
, enumerable: true
, configurable: true
});
}
}
});
}
// object.unwatch
if (!Object.prototype.unwatch) {
Object.defineProperty(Object.prototype, "unwatch", {
enumerable: false
, configurable: true
, writable: false
, value: function (prop) {
var val = this[prop];
delete this[prop]; // remove accessors
this[prop] = val;
}
});
}
})();

View File

@ -162,7 +162,7 @@
padding: 0px;
background: white;
}
.openerp .oe_kanban_view .oe_kanban_column, .openerp .oe_kanban_view .oe_kanban_column_cards {
.openerp .oe_kanban_view .oe_kanban_column {
height: 100%;
}
.openerp .oe_kanban_view .oe_kanban_aggregates {

View File

@ -179,7 +179,7 @@
padding: 0px
background: #ffffff
.oe_kanban_column, .oe_kanban_column_cards
.oe_kanban_column
height: 100%
.oe_kanban_aggregates
padding: 0