Vidhin Mehta  (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-improve-dashboard into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-improve-dashboard/+merge/123519

Shown Proper title,reset button shown on debug mode enable and css for change 
layout.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-improve-dashboard/+merge/123519
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-improve-dashboard.
=== modified file 'board/static/src/css/dashboard.css'
--- board/static/src/css/dashboard.css	2012-09-06 10:46:24 +0000
+++ board/static/src/css/dashboard.css	2012-09-10 10:13:25 +0000
@@ -1,3 +1,36 @@
+.openerp .oe_dashboard_layout_1 .oe_dashboard_column.index_0 {
+  width: 100%;
+}
+.openerp .oe_dashboard_layout_1 .oe_dashboard_column.index_1, .openerp .oe_dashboard_layout_1 .oe_dashboard_column.index_2 {
+  display: none;
+}
+.openerp .oe_dashboard_layout_1-1 .oe_dashboard_column {
+  width: 50%;
+}
+.openerp .oe_dashboard_layout_1-1 .oe_dashboard_column.index_2 {
+  display: none;
+}
+.openerp .oe_dashboard_layout_1-1-1 .oe_dashboard_column {
+  width: 33%;
+}
+.openerp .oe_dashboard_layout_2-1 .oe_dashboard_column.index_0 {
+  width: 70%;
+}
+.openerp .oe_dashboard_layout_2-1 .oe_dashboard_column.index_1 {
+  width: 30%;
+}
+.openerp .oe_dashboard_layout_2-1 .oe_dashboard_column.index_2 {
+  display: none;
+}
+.openerp .oe_dashboard_layout_1-2 .oe_dashboard_column.index_0 {
+  width: 30%;
+}
+.openerp .oe_dashboard_layout_1-2 .oe_dashboard_column.index_1 {
+  width: 70%;
+}
+.openerp .oe_dashboard_layout_1-2 .oe_dashboard_column.index_2 {
+  display: none;
+}
 .openerp .oe_dashboard_links {
   text-align: right;
   margin: 0 4px 6px 0;

=== modified file 'board/static/src/css/dashboard.sass'
--- board/static/src/css/dashboard.sass	2012-09-06 10:46:24 +0000
+++ board/static/src/css/dashboard.sass	2012-09-10 10:13:25 +0000
@@ -9,6 +9,31 @@
   box-shadow: $bsval
 
 .openerp
+  .oe_dashboard_layout_1 .oe_dashboard_column
+    &.index_0
+      width: 100%
+    &.index_1, &.index_2
+      display: none
+  .oe_dashboard_layout_1-1 .oe_dashboard_column
+    width: 50% 
+    &.index_2
+      display: none
+  .oe_dashboard_layout_1-1-1 .oe_dashboard_column
+    width: 33% 
+  .oe_dashboard_layout_2-1 .oe_dashboard_column
+    &.index_0
+      width: 70%
+    &.index_1
+      width: 30%
+    &.index_2
+      display: none
+  .oe_dashboard_layout_1-2 .oe_dashboard_column
+    &.index_0
+      width: 30%
+    &.index_1
+      width: 70%
+    &.index_2
+      display: none
   .oe_dashboard_links
     text-align: right
     margin: 0 4px 6px 0
@@ -91,3 +116,4 @@
           > tbody
             tr:nth-child(odd)
               background: transparent
+

=== modified file 'board/static/src/js/dashboard.js'
--- board/static/src/js/dashboard.js	2012-09-10 09:31:52 +0000
+++ board/static/src/js/dashboard.js	2012-09-10 10:13:25 +0000
@@ -17,13 +17,20 @@
     start: function() {
         var self = this;
         this._super.apply(this, arguments);
-
+        
+        if(!this.session.debug)
+            this.$el.find(".oe_dashboard_links button:first").css("display", "none");
+            
         this.$el.find('.oe_dashboard_column').sortable({
             connectWith: '.oe_dashboard_column',
             handle: '.oe_header',
             scroll: false
         }).bind('sortstop', self.do_save_dashboard);
 
+        var old_title = this.__parentedParent.get('title');
+        this.__parentedParent.on_record_loaded.add_last(function(){
+            self.__parentedParent.set({ 'title' : old_title});
+        });
         // Events
         this.$el.find('.oe_dashboard_link_reset').click(this.on_reset);
         this.$el.find('.oe_dashboard_link_change_layout').click(this.on_change_layout);

_______________________________________________
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