added a bounce effect when On non editable page view, if click on the content of...
authorAnand Patel (OpenERP) <pan@tinyerp.com>
Thu, 28 Jun 2012 11:46:09 +0000 (17:16 +0530)
committerAnand Patel (OpenERP) <pan@tinyerp.com>
Thu, 28 Jun 2012 11:46:09 +0000 (17:16 +0530)
bzr revid: pan@tinyerp.com-20120628114609-xmj17x8t2pymftcf

addons/web/static/src/css/base.css
addons/web/static/src/js/view_form.js
addons/web/static/src/xml/base.xml

index d06c157..2f41118 100644 (file)
 .kitten-mode-activated > * {
   opacity: 0.7;
 }
+.openerp .bounce {
+    float:left;
+}
index 1941e48..2dc954c 100644 (file)
@@ -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"});
index 13be468..641d37a 100644 (file)
 <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">