[ADD] Added an openerpBounce jquery plugin
bzr revid: fme@openerp.com-20121219151217-bxp1p04gmbccckys
This commit is contained in:
parent
d234a24de0
commit
31592e96aa
|
@ -477,6 +477,11 @@ $.fn.openerpClass = function(additionalClass) {
|
||||||
$(this).addClass('openerp ' + additionalClass);
|
$(this).addClass('openerp ' + additionalClass);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
$.fn.openerpBounce = function() {
|
||||||
|
return this.each(function() {
|
||||||
|
$(this).css('box-sizing', 'content-box').effect('bounce', {distance: 18, times: 5}, 250);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
/** Jquery extentions */
|
/** Jquery extentions */
|
||||||
$.Mutex = (function() {
|
$.Mutex = (function() {
|
||||||
|
|
|
@ -206,7 +206,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
|
||||||
this.$el.find(".oe_form_group_row,.oe_form_field,label").on('click', function (e) {
|
this.$el.find(".oe_form_group_row,.oe_form_field,label").on('click', function (e) {
|
||||||
if(self.get("actual_mode") == "view") {
|
if(self.get("actual_mode") == "view") {
|
||||||
var $button = self.options.$buttons.find(".oe_form_button_edit");
|
var $button = self.options.$buttons.find(".oe_form_button_edit");
|
||||||
$button.css('box-sizing', 'content-box').effect('bounce', {distance: 18, times: 5}, 250);
|
$button.openerpBounce();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
instance.web.bus.trigger('click', e);
|
instance.web.bus.trigger('click', e);
|
||||||
}
|
}
|
||||||
|
@ -215,7 +215,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
|
||||||
this.$el.find(".oe_form_field_status:not(.oe_form_status_clickable)").on('click', function (e) {
|
this.$el.find(".oe_form_field_status:not(.oe_form_status_clickable)").on('click', function (e) {
|
||||||
if((self.get("actual_mode") == "view")) {
|
if((self.get("actual_mode") == "view")) {
|
||||||
var $button = self.$el.find(".oe_highlight:not(.oe_form_invisible)").css({'float':'left','clear':'none'});
|
var $button = self.$el.find(".oe_highlight:not(.oe_form_invisible)").css({'float':'left','clear':'none'});
|
||||||
$button.effect('bounce', {distance:18, times: 5}, 250);
|
$button.openerpBounce();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -833,7 +833,7 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
|
||||||
);
|
);
|
||||||
var create_nocontent = this.$buttons;
|
var create_nocontent = this.$buttons;
|
||||||
this.$el.find('.oe_view_nocontent').click(function() {
|
this.$el.find('.oe_view_nocontent').click(function() {
|
||||||
create_nocontent.effect('bounce', {distance: 18, times: 5}, 250);
|
create_nocontent.openerpBounce();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -52,7 +52,7 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
this.$el.on('click', '.oe_kanban_dummy_cell', function() {
|
this.$el.on('click', '.oe_kanban_dummy_cell', function() {
|
||||||
if (self.$buttons) {
|
if (self.$buttons) {
|
||||||
self.$buttons.find('.oe_kanban_add_column').effect('bounce', {distance: 18, times: 5}, 250);
|
self.$buttons.find('.oe_kanban_add_column').openerpBounce();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -471,7 +471,7 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
|
||||||
);
|
);
|
||||||
var create_nocontent = this.$buttons;
|
var create_nocontent = this.$buttons;
|
||||||
this.$el.find('.oe_view_nocontent').click(function() {
|
this.$el.find('.oe_view_nocontent').click(function() {
|
||||||
create_nocontent.effect('bounce', {distance: 18, times: 5}, 250);
|
create_nocontent.openerpBounce();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -615,7 +615,7 @@ instance.web_kanban.KanbanGroup = instance.web.Widget.extend({
|
||||||
this.$records.find(".oe_kanban_column_cards").click(function (ev) {
|
this.$records.find(".oe_kanban_column_cards").click(function (ev) {
|
||||||
if (ev.target == ev.currentTarget) {
|
if (ev.target == ev.currentTarget) {
|
||||||
if (!self.state.folded) {
|
if (!self.state.folded) {
|
||||||
add_btn.effect('bounce', {distance: 18, times: 5}, 250);
|
add_btn.openerpBounce();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue