summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorAnand Patel (OpenERP) <pan@tinyerp.com>2012-06-28 17:16:09 +0530
committerAnand Patel (OpenERP) <pan@tinyerp.com>2012-06-28 17:16:09 +0530
commit693ec72528d0bda2b254f5ca64e656755690a6b2 (patch)
treec5b677e5648f4582618d6eeb4fc1b82947818136 /addons/web/static/src
parentff179d6b98473b87f382c5a6ee2c3d3970d07e1e (diff)
added a bounce effect when On non editable page view, if click on the content of a field, bounce the Edit button
bzr revid: pan@tinyerp.com-20120628114609-xmj17x8t2pymftcf
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/css/base.css3
-rw-r--r--addons/web/static/src/js/view_form.js8
-rw-r--r--addons/web/static/src/xml/base.xml2
3 files changed, 11 insertions, 2 deletions
diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css
index d06c157696b..2f4111882c4 100644
--- a/addons/web/static/src/css/base.css
+++ b/addons/web/static/src/css/base.css
@@ -2216,3 +2216,6 @@
.kitten-mode-activated > * {
opacity: 0.7;
}
+.openerp .bounce {
+ float:left;
+}
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index 1941e48affd..2dc954c414d 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -92,7 +92,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
this._super();
},
on_loaded: function(data) {
- var self = this;
+ var self = this;
if (!data) {
throw new Error("No data provided.");
}
@@ -286,6 +286,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
},
on_record_loaded: function(record) {
var self = this, set_values = [];
+ self.on_invalidclick();
if (!record) {
this.do_warn("Form", "The record could not be found in the database.", true);
return $.Deferred().reject();
@@ -581,6 +582,11 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
self.set({mode: "view"});
});
},
+ on_invalidclick: function() {
+ this.$element.find(".oe_form_field").click(function () {
+ $(".oe_form_button_edit").effect("bounce", { times:3,distance:100 }, 500);
+ });
+ },
on_button_cancel: function(event) {
if (this.can_be_discarded()) {
this.set({mode: "view"});
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index 13be46806cb..641d37a818a 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -680,7 +680,7 @@
<div t-name="FormView.buttons" class="oe_form_buttons">
<t t-if="widget.options.action_buttons !== false">
<span class="oe_form_buttons_view">
- <button type="button" class="oe_button oe_form_button_edit">Edit</button>
+ <div class="bounce"><button type="button" class="oe_button oe_form_button_edit">Edit</button></div>
<button type="button" class="oe_button oe_form_button_create">Create</button>
</span>
<span class="oe_form_buttons_edit">