From abf8934ff922e9d9b65567cf7469c14caf3b63f3 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Tue, 3 Apr 2012 14:29:56 +0530 Subject: [PATCH] [IMP] bzr revid: apa@tinyerp.com-20120403085956-00lj6epnjz3j5z7n --- addons/project/__openerp__.py | 1 + addons/project/project_view.xml | 39 +++- addons/project/static/src/css/project.css | 266 +++++++++++----------- addons/project/static/src/js/dropdown.js | 92 ++++++++ 4 files changed, 261 insertions(+), 137 deletions(-) create mode 100644 addons/project/static/src/js/dropdown.js diff --git a/addons/project/__openerp__.py b/addons/project/__openerp__.py index be4cc607b29..f438102d599 100644 --- a/addons/project/__openerp__.py +++ b/addons/project/__openerp__.py @@ -71,6 +71,7 @@ Dashboard for project members that includes: 'auto_install': False, 'application': True, 'css': ['static/src/css/project.css'], + 'js': ['static/src/js/dropdown.js'], 'certificate': '0075116868317', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 21d3e3b6295..b635b4cc805 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -173,7 +173,42 @@ - + + + +
+
  • + B + +

    Groupe S HRWeb

    +

    2 Tasks, 3 Issues, 1 Timesheet

    +
  • +
    + +
    + + + + + +
    diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index 840b0580033..70d220fd322 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -1,141 +1,137 @@ -.oe_to_invoice_buttons { - min-height: 33px; - min-width: 70px; - vertical-align: top; - -} +.vignettes { + margin: 4px; } + .vignettes li { + float: left; } + .vignettes .avatar { + margin-right: 2px; + width: 32px; + height: 32px; } + .vignettes .fields { + width: 100%; } + .vignettes .fields th { + font-weight: normal; } + .vignettes .fields td { + color: #888888; } + .vignettes h4 a { + color: #4c4c4c; } -.oe_to_invoice_buttons:hover { - cursor: pointer; -} - - -.oe_project_border{ - border-right: groove; - border-left: groove; -} -.oe_project_font:hover{ - text-decoration: underline; -} -.oe_project_members{ - padding-left: 5px !important; - text-align: left; -} -.oe_project_desc{ +.vignettes > li { + height: 160px; width: 250px; -} -.progress{ - width: auto; -} -.oe_project_font{ - color: #000000; - padding-left: 5px !important; - -} -.sequence { - padding-bottom: 4px !important; - padding-top: 3px !important; - border-bottom: groove; - /*font-size: 20px;*/ - text-align: center; -} + padding: 8px; + margin: 4px; } + .vignettes > li h4 { + margin-bottom: 2px; } -.project_icon{ - width: 30px; +.i { + font-family: "mnmliconsRegular" !important; + font-size: 21px; + font-weight: 300 !important; } + +.dropdown-menu { + display: none; + position: absolute; } + +.dropdown-toggle:after { + width: 0; + height: 0; + display: inline-block; + content: "&darr"; + text-indent: -99999px; + vertical-align: top; + margin-top: 8px; + margin-left: 4px; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 4px solid white; + filter: alpha(opacity=50); + -khtml-opacity: 0.5; + -moz-opacity: 0.5; + opacity: 0.5; } + +.open { + display: block; + background: #333333; } + .open .dropdown-menu { + display: block; } + + +a.oe_kanban_action { + position: absolute; + right: 0; + } + a.oe_kanban_action:hover { + text-decoration: none; + } + a.oe_kanban_action .i { + color: #4c4c4c; } + + +.oe_kanban_vignette { + position: relative; + display: block; + min-height: 50px; + background: white; + border: 1px solid #d8d8d8; + border-bottom-color: #b9b9b9; + padding: 6px; + margin: 6px 0; + display: block; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; } + .oe_kanban_vignette:last-child { + margin-bottom: 0; } + .oe_kanban_vignette:hover { + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.6); + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.6); + -box-shadow: 0 0 3px rgba(0, 0, 0, 0.6); } + .oe_kanban_vignette h4 { + margin: 0 0 2px; } + + +.oe_kanban_vignette .dropdown-menu { + top: 30px; + right: -140px; + padding: 4px; + border: 1px solid #afafb6; + width: 160px; + overflow-x: hidden; + z-index: 900; + background: white; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; + -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); + -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); + -box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); } + .oe_kanban_vignette .dropdown-menu p { + margin-left: 12px; } + .oe_kanban_vignette .dropdown-menu li { + float: none; display: block; - height: 30px; - text-align: center; -} + background-color: none; } + .oe_kanban_vignette .dropdown-menu li a { + display: block; + padding: 3px 6px; + clear: both; + font-weight: normal; + line-height: 14px; + color: #4c4c4c; + text-decoration: none; } + .oe_kanban_vignette .dropdown-menu li a:hover { + background: #f0f0fa; + background: -moz-linear-gradient(#f0f0fa, #eeeef6); + background: -webkit-gradient(linear, left top, left bottom, from(#f0f0fa), to(#eeeef6)); + background: -webkit-linear-gradient(#f0f0fa, #eeeef6); + -moz-box-shadow: none; + -webkit-box-shadow: none; + -box-shadow: none; } -.project_icon:hover { - cursor: pointer; - display: block; - height: 40px; - width: 40px; - text-align: center; -} - -.project_table{ - width:350px; -} -.td_image{ - width:60px; - text-align:center; - vertical-align:top; -} -.avatar{ - height:40px; - width:40px; -} -.td_name{ - text-align:left; - vertical-align:middle; - width:220px; -} -.td_deadline{ - width:70px; - text-align:center; -} -.td_member{ - text-align:right; - vertical-align:bottom; - width:130px; - height:20px; -} -.td_member_img{ - height:22px; - width:22px; -} -.img_member{ - height:20px; - width:20px; -} -.td_hours{ - text-align:center; - vertical-align:bottom; - width:120px -} -.task{ - text-align:left; - vertical-align:middle; -} -.invoiced{ - font-size: 10px; -} -.oe_project { - width: 55px; -} -.user { - color:rgb(192,192,192); - font-size: 10px; -} -.manager { - font-size: 9px; -} - -.oe_project_buttons { - display: inline-block; - padding: 0px 0px; - background-color: transparent; - border: hidden; - color: #0000FF; - min-height: 40px; - min-width: 40px; - text-align: center; -} - -.oe_project_buttons:hover { - cursor: pointer; - background-size: 100% 100%; -} - -.oe_project_font1{ - padding-left: 2px !important; - -webkit-margin-before: 0em; - -webkit-margin-after: 0em; -} - -div.oe_fold_column{ - padding:2px !important; -} \ No newline at end of file +.oe_kanban_vignette .dropdown-menu .color-chooser { + padding: 0 3px; } + .oe_kanban_vignette .dropdown-menu .color-chooser li { + float: left; } + .oe_kanban_vignette .dropdown-menu .color-chooser li a { + padding: 2px; } \ No newline at end of file diff --git a/addons/project/static/src/js/dropdown.js b/addons/project/static/src/js/dropdown.js new file mode 100644 index 00000000000..54b61c5e9d0 --- /dev/null +++ b/addons/project/static/src/js/dropdown.js @@ -0,0 +1,92 @@ +/* ============================================================ + * bootstrap-dropdown.js v2.0.2 + * http://twitter.github.com/bootstrap/javascript.html#dropdowns + * ============================================================ + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================ */ + + +!function( $ ){ + + "use strict" + + /* DROPDOWN CLASS DEFINITION + * ========================= */ + + var toggle = '[data-toggle="dropdown"]' + , Dropdown = function ( element ) { + var $el = $(element).on('click.dropdown.data-api', this.toggle) + $('html').on('click.dropdown.data-api', function () { + $el.parent().removeClass('open') + }) + } + + Dropdown.prototype = { + + constructor: Dropdown + + , toggle: function ( e ) { + var $this = $(this) + , selector = $this.attr('data-target') + , $parent + , isActive + + if (!selector) { + selector = $this.attr('href') + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 + } + + $parent = $(selector) + $parent.length || ($parent = $this.parent()) + + isActive = $parent.hasClass('open') + + clearMenus() + !isActive && $parent.toggleClass('open') + + return false + } + + } + + function clearMenus() { + $(toggle).parent().removeClass('open') + } + + + /* DROPDOWN PLUGIN DEFINITION + * ========================== */ + + $.fn.dropdown = function ( option ) { + return this.each(function () { + var $this = $(this) + , data = $this.data('dropdown') + if (!data) $this.data('dropdown', (data = new Dropdown(this))) + if (typeof option == 'string') data[option].call($this) + }) + } + + $.fn.dropdown.Constructor = Dropdown + + + /* APPLY TO STANDARD DROPDOWN ELEMENTS + * =================================== */ + + $(function () { + $('html').on('click.dropdown.data-api', clearMenus) + $('body').on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle) + }) + +}( window.jQuery ); \ No newline at end of file