[FIX] Share wizard: unselectable url and embed code
authorFabien Meghazi <fme@openerp.com>
Mon, 13 Feb 2012 16:31:20 +0000 (17:31 +0100)
committerFabien Meghazi <fme@openerp.com>
Mon, 13 Feb 2012 16:31:20 +0000 (17:31 +0100)
I used to like Firefox... That was before webkit.

lp bug: https://launchpad.net/bugs/931364 fixed

bzr revid: fme@openerp.com-20120213163120-7qt0171h81uh8bvp

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

index 5201090..cc30213 100644 (file)
@@ -1439,10 +1439,13 @@ label.error {
 .openerp .oe_forms select{
     padding-top: 2px;
 }
+.openerp .oe_forms input[readonly],
+.openerp .oe_forms select[readonly],
+.openerp .oe_forms textarea[readonly],
 .openerp .oe_forms input[disabled],
 .openerp .oe_forms select[disabled],
 .openerp .oe_forms textarea[disabled]{
-    background: #E0E0E0;
+    background: #E0E0E0 !important;
 }
 .openerp .oe_forms textarea {
     resize:vertical;
index c1eea01..93acd16 100644 (file)
@@ -1457,7 +1457,7 @@ openerp.web.form.FieldChar = openerp.web.form.Field.extend({
     },
     update_dom: function() {
         this._super.apply(this, arguments);
-        this.$element.find('input').prop('disabled', this.readonly);
+        this.$element.find('input').prop('readonly', this.readonly);
     },
     set_value_from_ui: function() {
         this.value = openerp.web.parse_value(this.$element.find('input').val(), this);
@@ -1480,7 +1480,7 @@ openerp.web.form.FieldChar = openerp.web.form.Field.extend({
 openerp.web.form.FieldID = openerp.web.form.FieldChar.extend({
     update_dom: function() {
         this._super.apply(this, arguments);
-        this.$element.find('input').prop('disabled', true);
+        this.$element.find('input').prop('readonly', true);
     }
 });
 
@@ -1588,7 +1588,7 @@ openerp.web.DateTimeWidget = openerp.web.OldWidget.extend({
     },
     set_readonly: function(readonly) {
         this.readonly = readonly;
-        this.$input.prop('disabled', this.readonly);
+        this.$input.prop('readonly', this.readonly);
         this.$element.find('img.oe_datepicker_trigger').toggleClass('oe_input_icon_disabled', readonly);
     },
     is_valid: function(required) {
@@ -1677,7 +1677,7 @@ openerp.web.form.FieldText = openerp.web.form.Field.extend({
     },
     update_dom: function() {
         this._super.apply(this, arguments);
-        this.$element.find('textarea').prop('disabled', this.readonly);
+        this.$element.find('textarea').prop('readonly', this.readonly);
     },
     set_value_from_ui: function() {
         this.value = openerp.web.parse_value(this.$element.find('textarea').val(), this);
@@ -2194,7 +2194,7 @@ openerp.web.form.FieldMany2One = openerp.web.form.Field.extend({
     },
     update_dom: function() {
         this._super.apply(this, arguments);
-        this.$input.prop('disabled', this.readonly);
+        this.$input.prop('readonly', this.readonly);
     }
 });
 
@@ -3219,7 +3219,7 @@ openerp.web.form.FieldBinaryFile = openerp.web.form.FieldBinary.extend({
     update_dom: function() {
         this._super.apply(this, arguments);
         this.$element.find('.oe-binary-file-set, .oe-binary-file-clear').toggle(!this.readonly);
-        this.$element.find('input[type=text]').prop('disabled', this.readonly);
+        this.$element.find('input[type=text]').prop('readonly', this.readonly);
     },
     set_value: function(value) {
         this._super.apply(this, arguments);