report builder with links and width
This commit is contained in:
parent
078867c411
commit
03262e0c12
@ -3675,6 +3675,7 @@ div.stat-label {
|
||||
position: relative;
|
||||
padding: 3px;
|
||||
text-align: center;
|
||||
font-size: 11px;
|
||||
}
|
||||
div.stat-label, div.stat-label a {
|
||||
z-index: 5;
|
||||
@ -3684,19 +3685,26 @@ 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 */
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2427,6 +2427,7 @@ div.stat-label {
|
||||
position: relative;
|
||||
padding: 3px;
|
||||
text-align: center;
|
||||
font-size: 11px;
|
||||
}
|
||||
div.stat-label, div.stat-label a {
|
||||
z-index: 5;
|
||||
@ -2436,19 +2437,26 @@ 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 */
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1035,7 +1035,9 @@ wn.views.ReportView=wn.ui.Listing.extend({init:function(doctype,docname){var me=
|
||||
+' '+this.sort_order_select.val()
|
||||
if(this.sort_by_next_select.val()){order_by+=', '+this.get_full_column_name([this.sort_by_next_select.val()])
|
||||
+' '+this.sort_order_next_select.val()}
|
||||
return order_by;},get_full_column_name:function(v){return(v[1]?('`tab'+v[1]+'`'):this.tab_name)+'.'+v[0];},build_columns:function(){var me=this;return $.map(this.columns,function(c){return{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}});},render_list:function(){var columns=[{id:'_idx',field:'_idx',name:'Sr.',width:40}].concat(this.build_columns());$.each(this.data,function(i,v){v._idx=i+1;});var options={enableCellNavigation:true,enableColumnReorder:false};var grid=new Slick.Grid(this.$w.find('.result-list').css('border','1px solid grey').css('height','500px').get(0),this.data,columns,options);},make_column_picker:function(){var me=this;this.column_picker=new wn.ui.ColumnPicker(this);this.page.appframe.add_button('Pick Columns',function(){me.column_picker.show(me.columns);},'icon-th-list');},make_sorter:function(){var me=this;this.sort_dialog=new wn.ui.Dialog({title:'Sorting Preferences'});$(this.sort_dialog.body).html('<p class="help">Sort By</p>\
|
||||
return order_by;},get_full_column_name:function(v){return(v[1]?('`tab'+v[1]+'`'):this.tab_name)+'.'+v[0];},build_columns:function(){var me=this;return $.map(this.columns,function(c){var docfield=wn.meta.docfield_map[c[1]||me.doctype][c[0]];coldef={id:c[0],field:c[0],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_list:function(){var me=this;var columns=[{id:'_idx',field:'_idx',name:'Sr.',width:40}].concat(this.build_columns());$.each(this.data,function(i,v){v._idx=i+1;});var options={enableCellNavigation:true,enableColumnReorder:false};var grid=new Slick.Grid(this.$w.find('.result-list').css('border','1px solid grey').css('height','500px').get(0),this.data,columns,options);},make_column_picker:function(){var me=this;this.column_picker=new wn.ui.ColumnPicker(this);this.page.appframe.add_button('Pick Columns',function(){me.column_picker.show(me.columns);},'icon-th-list');},make_sorter:function(){var me=this;this.sort_dialog=new wn.ui.Dialog({title:'Sorting Preferences'});$(this.sort_dialog.body).html('<p class="help">Sort By</p>\
|
||||
<div class="sort-column"></div>\
|
||||
<div><select class="sort-order" style="margin-top: 10px; width: 60%;">\
|
||||
<option value="asc">Ascending</option>\
|
||||
|
Loading…
x
Reference in New Issue
Block a user