bzr revid: apa@tinyerp.com-20120403085956-00lj6epnjz3j5z7n
This commit is contained in:
Amit Patel (OpenERP) 2012-04-03 14:29:56 +05:30
parent 8a71a7c2b2
commit abf8934ff9
4 changed files with 261 additions and 137 deletions

View File

@ -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:

View File

@ -173,7 +173,42 @@
<field name="task"/>
<field name="user_id"/>
<templates>
<t t-name="tasks">
<t t-name="kanban-box">
<script type="text/javascript">
function showElement(){
$('.dropdown-toggle').dropdown();
}
</script>
<!--<div class="content">-->
<div class="vignettes">
<li class="oe_kanban_vignette">
<a href="#" class="oe_kanban_action dropdown-toggle" onclick="javascript:showElement()"><span class="i">B</span></a>
<ul class="dropdown-menu">
<li><a href="#">Edit...</a></li>
<li><a href="#">Delete</a></li>
<li>
<ul class="color-chooser">
<li><a><span class="steelblue square"></span></a></li>
<li><a><span class="firebrick square"></span></a></li>
<li><a><span class="khaki square"></span></a></li>
<li><a><span class="thistle square"></span></a></li>
<li><a><span class="orange square"></span></a></li>
</ul>
</li>
</ul>
<h4><a href="project.html">Groupe S HRWeb</a></h4>
<p><a href="tasks.html">2 Tasks</a>, <a href="issues.html">3 Issues</a>, <a href="timesheets.html">1 Timesheet</a></p>
</li>
</div>
<!--</div>-->
</t>
<!--<t t-name="tasks">
<ul class="oe_kanban_tooltip">
<li><b>Tasks:</b> <field name="open_task"/></li>
</ul>
@ -231,7 +266,7 @@
</tr>
</table>
</div>
</t>
</t>-->
</templates>
</kanban>
</field>

View File

@ -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;
}
.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; }

View File

@ -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 );