Antony Lesuisse (OpenERP) has proposed merging 
lp:~openerp-dev/openerp-web/trunk-empty-list-message-xmo into lp:openerp-web.

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

For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-empty-list-message-xmo/+merge/102206
-- 
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-empty-list-message-xmo/+merge/102206
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openerp-web/trunk-empty-list-message-xmo.
=== modified file 'addons/web/static/src/css/base.css'
--- addons/web/static/src/css/base.css	2012-04-16 11:49:53 +0000
+++ addons/web/static/src/css/base.css	2012-04-16 23:49:19 +0000
@@ -599,6 +599,7 @@
   -webkit-box-shadow: none;
   -box-shadow: none;
 }
+<<<<<<< TREE
 .openerp .oe_menu {
   float: left;
   padding: 0;
@@ -1824,3 +1825,14 @@
   top: 3px;
   right: 2px;
 }
+=======
+.openerp2 .oe-listview .oe_listview_nocontent > img {
+  float: left;
+  margin-right: 1.5em;
+}
+.openerp2 .oe-listview .oe_listview_nocontent > div {
+  overflow: hidden;
+  font-size: 150%;
+  width: 60ex;
+}
+>>>>>>> MERGE-SOURCE

=== modified file 'addons/web/static/src/css/base.sass'
--- addons/web/static/src/css/base.sass	2012-04-16 11:49:53 +0000
+++ addons/web/static/src/css/base.sass	2012-04-16 23:49:19 +0000
@@ -1476,6 +1476,7 @@
             padding: 0 0 4px 0
             margin: 5px 0 0 15px
             li
+<<<<<<< TREE
                 list-style: circle
         .oe_tooltip_technical_title
             font-weight: bold
@@ -1517,6 +1518,37 @@
     // }}}
 
 // Transitional overrides for old styles {{{
+=======
+                float: none
+                display: block
+                background-color: none
+                a
+                    display: block
+                    padding: 4px 15px
+                    clear: both
+                    font-weight: normal
+                    line-height: 18px
+                    color: #eee
+                    &:hover
+                        @include vertical-gradient(#292929, #191919)
+                        @include box-shadow(none)
+    // }}}
+
+
+    // ListView {{{
+    .oe-listview
+        .oe_listview_nocontent
+            > img
+                float: left
+                margin-right: 1.5em
+            > div
+                // don't encroach on my arrow
+                overflow: hidden
+                font-size: 150%
+                width: 60ex
+    // }}}
+
+>>>>>>> MERGE-SOURCE
 .openerp
     .oe_form_field_many2one
         td:first-child

=== added file 'addons/web/static/src/img/empty-list-arrow.png'
Binary files addons/web/static/src/img/empty-list-arrow.png	1970-01-01 00:00:00 +0000 and addons/web/static/src/img/empty-list-arrow.png	2012-04-16 23:49:19 +0000 differ
=== modified file 'addons/web/static/src/js/view_list.js'
--- addons/web/static/src/js/view_list.js	2012-04-10 11:26:56 +0000
+++ addons/web/static/src/js/view_list.js	2012-04-16 23:49:19 +0000
@@ -770,6 +770,19 @@
                     .attr('colspan', this.previous_colspan);
             this.previous_colspan = null;
         }
+    },
+    no_result: function () {
+        if (this.groups.group_by
+            || !this.options.action
+            || !this.options.action.help) {
+            return;
+        }
+        this.$element.children('table').replaceWith(
+            $('<div class="oe_listview_nocontent">')
+                .append($('<img>', {
+                    src: '/web/static/src/img/empty-list-arrow.png',
+                    alt: _t("This list is empty")}))
+                .append($('<div>').html(this.options.action.help)));
     }
 });
 openerp.web.ListView.List = openerp.web.Class.extend( /** @lends openerp.web.ListView.List# */{
@@ -1367,6 +1380,9 @@
             self.records.add(records, {silent: true});
             list.render();
             d.resolve(list);
+            if (_.isEmpty(records)) {
+                view.no_result();
+            }
         });});
         return d.promise();
     },

_______________________________________________
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