Bhumi Thakkar (Open ERP) has proposed merging 
lp:~openerp-dev/openerp-web/trunk-improve-css-FF-IE-selection-bth into 
lp:~openerp-dev/openerp-web/trunk-improve-css-FF-IE.

Requested reviews:
  OpenERP R&D Team (openerp-dev)

For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-improve-css-FF-IE-selection-bth/+merge/125120

Hello,

   For IE browser css file is added which contains 1 class for selection field. 
Selection field is working fine with IE,FF and Opera browsers. In Database 
manager, content also displayed in center for create,Drop,backup.

Thanks.
-- 
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-improve-css-FF-IE-selection-bth/+merge/125120
Your team OpenERP R&D Team is requested to review the proposed merge of 
lp:~openerp-dev/openerp-web/trunk-improve-css-FF-IE-selection-bth into 
lp:~openerp-dev/openerp-web/trunk-improve-css-FF-IE.
=== modified file 'addons/web/__openerp__.py'
--- addons/web/__openerp__.py	2012-09-11 06:36:07 +0000
+++ addons/web/__openerp__.py	2012-09-19 07:42:41 +0000
@@ -61,6 +61,7 @@
         "static/lib/jquery.tipsy/tipsy.css",
         "static/lib/jquery.textext/jquery.textext.css",
         "static/src/css/base.css",
+        "static/src/css/base-ie.css",
         "static/src/css/data_export.css",
         "static/lib/cleditor/jquery.cleditor.css",
     ],

=== added file 'addons/web/static/src/css/base-ie.css'
--- addons/web/static/src/css/base-ie.css	1970-01-01 00:00:00 +0000
+++ addons/web/static/src/css/base-ie.css	2012-09-19 07:42:41 +0000
@@ -0,0 +1,3 @@
+.openerp .oe_form .oe_form_field_selection {
+    width/*\**/:60%\9;
+}
\ No newline at end of file

=== modified file 'addons/web/static/src/css/base.css'
--- addons/web/static/src/css/base.css	2012-09-17 13:24:57 +0000
+++ addons/web/static/src/css/base.css	2012-09-19 07:42:41 +0000
@@ -25,7 +25,6 @@
     display: none !important;
   }
 }
-
 .openerp.openerp_webclient_container {
   height: 100%;
   position: relative;
@@ -41,7 +40,7 @@
   text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
   /* http://www.quirksmode.org/dom/inputfile.html
    * http://stackoverflow.com/questions/2855589/replace-input-type-file-by-an-image
-   */ */
+   */
 }
 .openerp :-moz-placeholder {
   color: #afafb6 !important;
@@ -1154,7 +1153,7 @@
   color: white;
   padding: 2px 4px;
   margin: 1px 6px 0 0;
-  border: 1px solid lightGray;
+  border: 1px solid lightgrey;
   text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
   -moz-border-radius: 4px;
   -webkit-border-radius: 4px;
@@ -1179,7 +1178,7 @@
   transform: scale(1.1);
 }
 .openerp .oe_secondary_submenu .oe_active {
-  border-top: 1px solid lightGray;
+  border-top: 1px solid lightgrey;
   border-bottom: 1px solid #dedede;
   text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
   -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2), inset 0 -1px 3px rgba(40, 40, 40, 0.2);
@@ -1523,6 +1522,7 @@
   font-size: 1px;
   letter-spacing: -1px;
   color: transparent;
+  font-weight: normal;
   -moz-box-shadow: none;
   -webkit-box-shadow: none;
   box-shadow: none;
@@ -1959,6 +1959,9 @@
   background-image: -o-linear-gradient(top, #fcfcfc, #dedede);
   background-image: linear-gradient(to bottom, #fcfcfc, #dedede);
 }
+.openerp .oe_form header > span {
+  margin-left: 4px;
+}
 .openerp .oe_form header ul {
   display: inline-block;
   float: right;
@@ -2003,6 +2006,8 @@
 .openerp .oe_form .oe_subtotal_footer .oe_subtotal_footer_separator {
   width: 108px;
   border-top: 1px solid #cacaca;
+  margin-top: 4px;
+  padding-top: 4px;
   font-weight: bold;
   font-size: 18px;
 }
@@ -2045,7 +2050,7 @@
 }
 .openerp .oe_form .oe_form_label_help[for] span, .openerp .oe_form .oe_form_label[for] span {
   font-size: 80%;
-  color: darkGreen;
+  color: darkgreen;
   vertical-align: top;
   position: relative;
   top: -4px;
@@ -2640,20 +2645,24 @@
 }
 .openerp .oe_list_content td.oe_list_field_handle {
   width: 1em;
+  padding: 0 !important;
   cursor: ns-resize;
 }
 .openerp .oe_list_content td.oe_list_field_handle .oe_list_handle {
   font-size: 1px;
   letter-spacing: -1px;
   color: transparent;
+  font-weight: normal;
+  margin-right: 7px;
 }
 .openerp .oe_list_content td.oe_list_field_handle .oe_list_handle:before {
-  font: 21px "mnmliconsRegular";
-  content: "ö";
-  color: #404040;
+  font: 18px "entypoRegular";
+  content: "}";
+  color: #e0e0e0;
 }
 .openerp .oe_list_cannot_edit .oe_list_header_handle, .openerp .oe_list_cannot_edit .oe_list_field_handle {
   display: none !important;
+  padding: 0 !important;
 }
 .openerp .oe_list_cannot_delete .oe_list_record_delete {
   display: none !important;

=== modified file 'addons/web/static/src/css/base.sass'
--- addons/web/static/src/css/base.sass	2012-09-17 11:32:18 +0000
+++ addons/web/static/src/css/base.sass	2012-09-19 07:42:41 +0000
@@ -119,11 +119,22 @@
     font-size: 1px
     letter-spacing: -1px
     color: transparent
+    font-weight: normal 
     &:before
         font: 21px "mnmliconsRegular"
         content: $icon-name
         color: $color
 
+@mixin text-to-entypo-icon($icon-name, $color: #404040, $size: 21px)
+    font-size: 1px
+    letter-spacing: -1px
+    color: transparent
+    font-weight: normal 
+    &:before
+        font: $size "entypoRegular"
+        content: $icon-name
+        color: $color
+
 // }}}
 
 @media print
@@ -1541,6 +1552,8 @@
             border-bottom: 1px solid #cacaca
             padding-left: 2px
             @include vertical-gradient(#fcfcfc, #dedede)
+            > span
+                margin-left: 4px
             ul
                 display: inline-block
                 float: right
@@ -1575,6 +1588,8 @@
             .oe_subtotal_footer_separator
                 width: 108px
                 border-top: 1px solid #cacaca
+                margin-top: 4px
+                padding-top: 4px
                 font-weight: bold
                 font-size: 18px
             label:after
@@ -2069,13 +2084,16 @@
             text-indent: -9001px
         td.oe_list_field_handle
             width: 1em
+            padding: 0 !important
             cursor: ns-resize
             .oe_list_handle
-                @include text-to-icon("ö")
+                @include text-to-entypo-icon("}",#E0E0E0,18px)
+                margin-right: 7px
 
     .oe_list_cannot_edit
         .oe_list_header_handle, .oe_list_field_handle
             display: none !important
+            padding: 0 !important
     .oe_list_cannot_delete
         .oe_list_record_delete
             display: none !important

=== modified file 'addons/web/static/src/js/chrome.js'
--- addons/web/static/src/js/chrome.js	2012-09-06 13:26:02 +0000
+++ addons/web/static/src/js/chrome.js	2012-09-19 07:42:41 +0000
@@ -79,6 +79,9 @@
             }
         }
         if (options) {
+            if (options.buttons) {
+                this.params_buttons = true;
+            }
             _.extend(this.dialog_options, options);
         }
     },
@@ -123,7 +126,13 @@
         if (! this.dialog_inited)
             this.init_dialog();
         var o = this.get_options(options);
+        if (! this.params_buttons) {
+            this.$buttons.appendTo($("body"));
+        }
         instance.web.dialog(this.$el, o).dialog('open');
+        if (! this.params_buttons) {
+            this.$buttons.appendTo(this.$el.dialog("widget"));
+        }
         if (o.height === 'auto' && o.max_height) {
             this.$el.css({ 'max-height': o.max_height, 'overflow-y': 'auto' });
         }
@@ -133,6 +142,10 @@
         this.renderElement();
         var o = this.get_options(options);
         instance.web.dialog(this.$el, o);
+        if (! this.params_buttons) {
+            this.$buttons = $('<div class="ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" />');
+            this.$el.dialog("widget").append(this.$buttons);
+        }
         var res = this.start();
         this.dialog_inited = true;
         return res;

=== modified file 'addons/web/static/src/js/view_form.js'
--- addons/web/static/src/js/view_form.js	2012-09-18 11:18:37 +0000
+++ addons/web/static/src/js/view_form.js	2012-09-19 07:42:41 +0000
@@ -421,12 +421,11 @@
         this.do_update_pager();
     },
     do_update_pager: function(hide_index) {
-        var index = hide_index ? '-' : this.dataset.index + 1;
         this.$pager.find('button').prop('disabled', this.dataset.ids.length < 2);
-        if (this.dataset.ids.length <= 1) {
+        if (hide_index || this.dataset.ids.length <= 1) {
             $(".oe_form_pager_state", this.$pager).html("");
         } else {
-            $(".oe_form_pager_state", this.$pager).html(_.str.sprintf(_t("%d / %d"), index, this.dataset.ids.length));
+            $(".oe_form_pager_state", this.$pager).html(_.str.sprintf(_t("%d / %d"), this.dataset.index + 1, this.dataset.ids.length));
         }
     },
     parse_on_change: function (on_change, widget) {
@@ -2617,6 +2616,7 @@
 
         var dataset = new instance.web.DataSet(this, this.field.relation, self.build_context());
         var blacklist = this.get_search_blacklist();
+        this.last_query = search_val;
 
         return this.orderer.add(dataset.name_search(
                 search_val, new instance.web.CompoundDomain(self.build_domain(), [["id", "not in", blacklist]]),
@@ -2724,6 +2724,32 @@
     },
 };
 
+instance.web.form.M2ODialog = instance.web.Dialog.extend({
+    template: "M2ODialog",
+    init: function(parent) {
+        this._super(parent, {
+            title: _.str.sprintf(_t("Add %s"), parent.string),
+            width: 312,
+        });
+    },
+    start: function() {
+        var self = this;
+        this.$buttons.html(QWeb.render("M2ODialog.buttons"));
+        this.$("input").val(this.getParent().last_query);
+        this.$buttons.find(".oe_form_m2o_qc_button").click(function(){
+            self.getParent()._quick_create(self.$("input").val());
+            self.destroy();
+        });
+        this.$buttons.find(".oe_form_m2o_sc_button").click(function(){
+            self.getParent()._search_create_popup("form", undefined, self.getParent()._create_context(self.$("input").val()));
+            self.destroy();
+        });
+        this.$buttons.find(".oe_form_m2o_cancel_button").click(function(){
+            self.destroy();
+        });
+    },
+});
+
 instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instance.web.form.CompletionFieldMixin, instance.web.form.ReinitializeFieldMixin, {
     template: "FieldMany2One",
     init: function(field_manager, node) {
@@ -2754,26 +2780,23 @@
             this.render_editable();
         this.render_value();
     },
+    init_error_displayer: function() {
+        // nothing
+    },
+    hide_error_displayer: function() {
+        // doesn't work
+    },
+    show_error_displayer: function() {
+        new instance.web.form.M2ODialog(this).open();
+    },
     render_editable: function() {
         var self = this;
         this.$input = this.$el.find("input");
 
-        self.$input.tipsy({
-            title: function() {
-                return QWeb.render('Tipsy.alert', {
-                    message: "No element was selected, you should create or select one from the dropdown list."
-                });
-            },
-            trigger:'manual',
-            fade: true,
-            gravity: 's',
-            html: true,
-            opacity: 1,
-            offset: 4,
-        });
+        this.init_error_displayer();
 
         self.$input.on('focus', function() {
-            self.$input.tipsy("hide");
+            self.hide_error_displayer();
         });
 
         this.$drop_down = this.$el.find(".oe_m2o_drop_down_button");
@@ -2827,10 +2850,10 @@
                 }
             }
         });
-        self.tip_def = $.Deferred();
-        self.untip_def = $.Deferred();
-        var tip_delay = 200;
-        var tip_duration = 15000;
+        self.ed_def = $.Deferred();
+        self.uned_def = $.Deferred();
+        var ed_delay = 200;
+        var ed_duration = 15000;
         var anyoneLoosesFocus = function() {
             var used = false;
             if (self.floating) {
@@ -2850,25 +2873,25 @@
                 }
                 self.floating = false;
             }
-            if (used && self.get("value") === false && ! self.no_tipsy) {
-                self.tip_def.reject();
-                self.untip_def.reject();
-                self.tip_def = $.Deferred();
-                self.tip_def.then(function() {
-                    self.$input.tipsy("show");
+            if (used && self.get("value") === false && ! self.no_ed) {
+                self.ed_def.reject();
+                self.uned_def.reject();
+                self.ed_def = $.Deferred();
+                self.ed_def.then(function() {
+                    self.show_error_displayer();
                 });
                 setTimeout(function() {
-                    self.tip_def.resolve();
-                    self.untip_def.reject();
-                    self.untip_def = $.Deferred();
-                    self.untip_def.then(function() {
-                        self.$input.tipsy("hide");
+                    self.ed_def.resolve();
+                    self.uned_def.reject();
+                    self.uned_def = $.Deferred();
+                    self.uned_def.then(function() {
+                        self.hide_error_displayer();
                     });
-                    setTimeout(function() {self.untip_def.resolve();}, tip_duration);
-                }, tip_delay);
+                    setTimeout(function() {self.uned_def.resolve();}, ed_duration);
+                }, ed_delay);
             } else {
-                self.no_tipsy = false;
-                self.tip_def.reject();
+                self.no_ed = false;
+                self.ed_def.reject();
             }
         };
         var ignore_blur = false;
@@ -3008,13 +3031,13 @@
         this.$input.focus();
     },
     _quick_create: function() {
-        this.no_tipsy = true;
-        this.tip_def.reject();
+        this.no_ed = true;
+        this.ed_def.reject();
         return instance.web.form.CompletionFieldMixin._quick_create.apply(this, arguments);
     },
     _search_create_popup: function() {
-        this.no_tipsy = true;
-        this.tip_def.reject();
+        this.no_ed = true;
+        this.ed_def.reject();
         return instance.web.form.CompletionFieldMixin._search_create_popup.apply(this, arguments);
     },
 });

=== modified file 'addons/web/static/src/xml/base.xml'
--- addons/web/static/src/xml/base.xml	2012-09-18 10:12:47 +0000
+++ addons/web/static/src/xml/base.xml	2012-09-19 07:42:41 +0000
@@ -919,6 +919,7 @@
                 t-att-tabindex="widget.node.attrs.tabindex"
                 t-att-autofocus="widget.node.attrs.autofocus"
                 t-att-placeholder="widget.node.attrs.placeholder"
+                t-att-maxlength="widget.field.size"
             /><img class="oe_field_translate oe_input_icon" t-if="widget.field.translate" t-att-src='_s + "/web/static/src/img/icons/terp-translate.png"' width="16" height="16" border="0"/>
         </t>
     </span>
@@ -933,6 +934,7 @@
                     t-att-tabindex="widget.node.attrs.tabindex"
                     t-att-autofocus="widget.node.attrs.autofocus"
                     t-att-placeholder="widget.node.attrs.placeholder"
+                t-att-maxlength="widget.field.size"
                 />
             </div>
         </t>
@@ -951,6 +953,7 @@
             t-att-tabindex="widget.node.attrs.tabindex"
             t-att-autofocus="widget.node.attrs.autofocus"
             t-att-placeholder="! widget.get('effective_readonly') ? widget.node.attrs.placeholder : ''"
+            t-att-maxlength="widget.field.size"
         ></textarea><img class="oe_field_translate oe_input_icon"
                         t-if="widget.field.translate and !widget.get('effective_readonly')"
                         t-att-src='_s + "/web/static/src/img/icons/terp-translate.png"' width="16" height="16" border="0"
@@ -1700,4 +1703,14 @@
         <div class="oe_throbber_message" style="color:white"></div>
     </div>
 </t>
+<t t-name="M2ODialog">
+    <div>
+        Name: <input class="oe_form_m2o_input_name" type="text"/>
+    </div>
+</t>
+<t t-name="M2ODialog.buttons">
+    <button class="oe_form_m2o_qc_button oe_button oe_highlight">Quick Add</button>
+    <button class="oe_form_m2o_sc_button oe_button">Add All Info...</button>
+    <button class="oe_form_m2o_cancel_button oe_button">Cancel</button>
+</t>
 </templates>

=== modified file 'addons/web_kanban/static/src/css/kanban.css'
--- addons/web_kanban/static/src/css/kanban.css	2012-09-17 06:36:13 +0000
+++ addons/web_kanban/static/src/css/kanban.css	2012-09-19 07:42:41 +0000
@@ -347,8 +347,8 @@
   position: relative;
   display: block;
   background: white;
-  border: 1px solid #d8d8d8;
-  border-bottom-color: #b9b9b9;
+  border: 1px solid rgba(0, 0, 0, 0.16);
+  border-bottom-color: rgba(0, 0, 0, 0.3);
   padding: 8px;
   display: block;
   -moz-border-radius: 4px;

=== modified file 'addons/web_kanban/static/src/css/kanban.sass'
--- addons/web_kanban/static/src/css/kanban.sass	2012-09-16 17:26:12 +0000
+++ addons/web_kanban/static/src/css/kanban.sass	2012-09-19 07:42:41 +0000
@@ -311,8 +311,8 @@
         position: relative
         display: block
         background: white
-        border: 1px solid #d8d8d8
-        border-bottom-color: #b9b9b9
+        border: 1px solid rgba(0,0,0,0.16)
+        border-bottom-color: rgba(0,0,0,0.3)
         padding: 8px
         display: block
         @include radius(4px)

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to