@@ -114,6 +114,7 @@ div.stat-label { | |||
position: relative; | |||
padding: 3px; | |||
text-align: center; | |||
font-size: 11px; | |||
} | |||
div.stat-label, div.stat-label a { | |||
z-index: 5; | |||
@@ -123,17 +124,24 @@ div.stat-item { | |||
position: relative; | |||
margin-bottom: 7px; | |||
background-color: #fff; | |||
height: 22px; | |||
height: 18px; | |||
border: 2px solid #aaa; | |||
border-radius: 11px; | |||
border-radius: 9px; | |||
overflow: hidden; | |||
} | |||
div.stat-bar { | |||
position: absolute; | |||
left: 0px; | |||
background-color: #DEF9A7; | |||
border-radius: 11px 0px 0px 11px; | |||
height: 100%; | |||
z-index: 0; | |||
background: #e0ff84; /* Old browsers */ | |||
background: -moz-linear-gradient(top, #e0ff84 0%, #a4e567 100%); /* FF3.6+ */ | |||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#e0ff84), color-stop(100%,#a4e567)); /* Chrome,Safari4+ */ | |||
background: -webkit-linear-gradient(top, #e0ff84 0%,#a4e567 100%); /* Chrome10+,Safari5.1+ */ | |||
background: -o-linear-gradient(top, #e0ff84 0%,#a4e567 100%); /* Opera 11.10+ */ | |||
background: -ms-linear-gradient(top, #e0ff84 0%,#a4e567 100%); /* IE10+ */ | |||
background: linear-gradient(top, #e0ff84 0%,#a4e567 100%); /* W3C */ | |||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e0ff84', endColorstr='#a4e567',GradientType=0 ); /* IE6-9 */ | |||
} |
@@ -6,17 +6,17 @@ classes should alter those! | |||
*/ | |||
.slick-header-columns { | |||
background: url('lib/js/lib/slickgrid/images/header-columns-bg.gif') repeat-x center bottom; | |||
background: url('js/lib/slickgrid/images/header-columns-bg.gif') repeat-x center bottom; | |||
border-bottom: 1px solid silver; | |||
} | |||
.slick-header-column { | |||
background: url('lib/js/lib/slickgrid/images/header-columns-bg.gif') repeat-x center bottom; | |||
background: url('js/lib/slickgrid/images/header-columns-bg.gif') repeat-x center bottom; | |||
border-right: 1px solid silver; | |||
} | |||
.slick-header-column:hover, .slick-header-column-active { | |||
background: white url('lib/js/lib/slickgrid/images/header-columns-over-bg.gif') repeat-x center bottom; | |||
background: white url('js/lib/slickgrid/images/header-columns-over-bg.gif') repeat-x center bottom; | |||
} | |||
.slick-headerrow { | |||
@@ -61,11 +61,11 @@ classes should alter those! | |||
} | |||
.slick-group-toggle.expanded { | |||
background: url(lib/js/lib/slickgrid/images/collapse.gif) no-repeat center center; | |||
background: url(js/lib/slickgrid/images/collapse.gif) no-repeat center center; | |||
} | |||
.slick-group-toggle.collapsed { | |||
background: url(lib/js/lib/slickgrid/images/expand.gif) no-repeat center center; | |||
background: url(js/lib/slickgrid/images/expand.gif) no-repeat center center; | |||
} | |||
.slick-group-totals { | |||
@@ -107,7 +107,7 @@ classes should alter those! | |||
border: 1px solid gray; | |||
border-bottom: 0; | |||
border-top: 0; | |||
background: url('lib/js/lib/slickgrid/images/header-bg.gif') repeat-x center top; | |||
background: url('js/lib/slickgrid/images/header-bg.gif') repeat-x center top; | |||
color: black; | |||
height: 24px; | |||
line-height: 24px; | |||
@@ -229,7 +229,7 @@ input.editor-percentcomplete { | |||
display: inline-block; | |||
width: 16px; | |||
height: 100%; | |||
background: url("lib/js/lib/slickgrid/images/pencil.gif") no-repeat center center; | |||
background: url("js/lib/slickgrid/images/pencil.gif") no-repeat center center; | |||
overflow: visible; | |||
z-index: 1000; | |||
float: right; | |||
@@ -240,7 +240,7 @@ input.editor-percentcomplete { | |||
position: absolute; | |||
top: -2px; | |||
left: -9px; | |||
background: url("lib/js/lib/slickgrid/images/editor-helper-bg.gif") no-repeat top left; | |||
background: url("js/lib/slickgrid/images/editor-helper-bg.gif") no-repeat top left; | |||
padding-left: 9px; | |||
width: 120px; | |||
@@ -195,23 +195,50 @@ wn.views.ReportView = wn.ui.Listing.extend({ | |||
build_columns: function() { | |||
var me = this; | |||
return $.map(this.columns, function(c) { | |||
return { | |||
var docfield = wn.meta.docfield_map[c[1] || me.doctype][c[0]]; | |||
coldef = { | |||
id: c[0], | |||
field: c[0], | |||
name: (wn.meta.docfield_map[c[1] || me.doctype][c[0]] ? | |||
wn.meta.docfield_map[c[1] || me.doctype][c[0]].label : toTitle(c[0])), | |||
width: 120 | |||
docfield: docfield, | |||
name: (docfield ? docfield.label : toTitle(c[0])), | |||
width: (docfield ? cint(docfield.width) : 120) || 120 | |||
} | |||
console.log(docfield && docfield.width); | |||
if(c[0]=='name') { | |||
coldef.formatter = function(row, cell, value, columnDef, dataContext) { | |||
return repl("<a href='#!Form/%(doctype)s/%(name)s'>%(name)s</a>", { | |||
doctype: me.doctype, | |||
name: value | |||
}); | |||
} | |||
} else if(docfield && docfield.fieldtype=='Link') { | |||
coldef.formatter = function(row, cell, value, columnDef, dataContext) { | |||
if(value) { | |||
return repl("<a href='#!Form/%(doctype)s/%(name)s'>%(name)s</a>", { | |||
doctype: columnDef.docfield.options, | |||
name: value | |||
}); | |||
} else { | |||
return ''; | |||
} | |||
} | |||
} | |||
return coldef; | |||
}); | |||
}, | |||
// render data | |||
render_list: function() { | |||
var me = this; | |||
//this.gridid = wn.dom.set_unique_id() | |||
var columns = [{id:'_idx', field:'_idx', name: 'Sr.', width: 40}].concat(this.build_columns()); | |||
// add sr in data | |||
$.each(this.data, function(i, v) { | |||
// add index | |||
v._idx = i+1; | |||
}); | |||