Skip to content

Commit 72821e9

Browse files
author
kandaj
committed
variant browser size issues fixed
1 parent 9a18826 commit 72821e9

File tree

5 files changed

+41
-18
lines changed

5 files changed

+41
-18
lines changed

eva-web/src/css/eva.css

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -518,10 +518,12 @@ h4{
518518
color:#426783;
519519
font-style: italic;
520520
}
521-
pre {
522-
/*height: auto;*/
523-
/*max-height: 200px !important;*/
521+
.vcf-header pre {
522+
height: auto;
523+
width:950px;
524+
max-height: 200px !important;
524525
overflow: auto;
526+
overflow-y: scroll;
525527
background-color: #eeeeee;
526528
word-break: normal !important;
527529
word-wrap: normal !important;

eva-web/src/js/variant-widget/eva-variant-browser-grid.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ EvaVariantBrowserGrid.prototype = {
131131
animCollapse: false,
132132
height: this.height,
133133
overflowX:true,
134+
collapsible:true,
134135
features: [
135136
{ftype: 'summary'}
136137
],

eva-web/src/js/variant-widget/eva-variant-stats-panel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ EvaVariantStatsPanel.prototype = {
208208
var vcfHeaderId1 = Utils.genId("vcf-header1");
209209
var vcfHeaderView = Ext.create('Ext.view.View', {
210210
id:vcfHeaderId,
211-
tpl: new Ext.XTemplate('<div><pre>'+vcfHeaderData.escapeHTML()+'</pre></div>'),
211+
tpl: new Ext.XTemplate('<div class="vcf-header"><pre>'+vcfHeaderData.escapeHTML()+'</pre></div>'),
212212
hidden:true,
213213
margin: '5 10 10 10'
214214

eva-web/src/js/variant-widget/eva-variant-widget-panel.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ EvaVariantWidgetPanel.prototype = {
9595
align: 'left'
9696
},
9797
items: [view],
98-
height:3800,
98+
height:1200,
9999
cls: 'variant-widget-panel'
100100
});
101101

@@ -120,7 +120,8 @@ EvaVariantWidgetPanel.prototype = {
120120
title: 'Variant Data',
121121
headerConfig: {
122122
baseCls: 'eva-header-2'
123-
}
123+
},
124+
border:false
124125
},
125126
defaultToolConfig: {
126127
headerConfig: {
@@ -179,7 +180,7 @@ EvaVariantWidgetPanel.prototype = {
179180

180181
var studyFilter = new EvaStudyFilterFormPanel({
181182
border:false,
182-
collapsed: false,
183+
collapsed: true,
183184
height: 550,
184185
studiesStore: this.studiesStore,
185186
studyFilterTpl:'<tpl if="studyId"><div class="ocb-study-filter"><a href="?eva-study={studyId}" target="_blank">{studyName}</a> (<a href="http://www.ebi.ac.uk/ena/data/view/{studyId}" target="_blank">{studyId}</a>) </div><tpl else><div class="ocb-study-filter"><a href="?eva-study={studyId}" target="_blank">{studyName}</a></div></tpl>'
@@ -260,7 +261,7 @@ EvaVariantWidgetPanel.prototype = {
260261
submitButtonId: 'vb-submit-button',
261262
filters: [speciesFilter,positionFilter, conseqTypeFilter,populationFrequencyFilter,proteinSubScoreFilter,conservationScoreFilter,studyFilter],
262263
width: 300,
263-
// height: 1043,
264+
height: 1043,
264265
border: false,
265266
handlers: {
266267
'submit': function (e) {

eva-web/src/js/variant-widget/eva-variant-widget.js

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ function EvaVariantWidget(args) {
6464

6565
this.browserGridConfig = {
6666
title: 'variant browser grid',
67-
border: false
67+
border: true
6868
};
6969
this.toolPanelConfig = {
7070
title: 'Variant data',
71-
border: false
71+
border: true
7272
};
7373
this.toolsConfig = {
7474
headerConfig: {
@@ -393,7 +393,7 @@ EvaVariantWidget.prototype = {
393393
target: target,
394394
data: this.data,
395395
height:450,
396-
margin: '-8 0 0 0',
396+
margin: '5 0 0 0',
397397
border: this.browserGridConfig.border,
398398
dataParser: this.dataParser,
399399
responseRoot: this.responseRoot,
@@ -431,7 +431,8 @@ EvaVariantWidget.prototype = {
431431
['25'],
432432
['50'],
433433
['75'],
434-
['100']
434+
['100'],
435+
['200']
435436
]
436437
}),
437438
mode : 'local',
@@ -444,13 +445,14 @@ EvaVariantWidget.prototype = {
444445
forceSelection: true
445446
});
446447

447-
variantBrowserGrid.grid.addTool({
448+
variantBrowserGrid.grid.addDocked({
448449
xtype : 'toolbar',
449450
dock : 'bottom',
450451
border:false,
451452
items: [ 'Results per Page: ',resultsPerPage,{
452453
xtype : 'button',
453454
text : 'Export as CSV',
455+
margin: '5 10 10 10',
454456
listeners: {
455457
click: {
456458
element: 'el', //bind to the underlying el property on the panel
@@ -541,7 +543,7 @@ EvaVariantWidget.prototype = {
541543
// _this.grid.setLoading(false);
542544
}
543545
},
544-
height:1800,
546+
height:800,
545547
statsTpl : new Ext.XTemplate(
546548
'<table class="ocb-attributes-table">' +
547549
'<tr>' +
@@ -610,7 +612,7 @@ EvaVariantWidget.prototype = {
610612
// _this.grid.setLoading(false);
611613
}
612614
},
613-
height:2400,
615+
height:800,
614616
statsTpl : new Ext.XTemplate(
615617
'<table class="table table-bordered ocb-attributes-table">' +
616618
'<tr>' +
@@ -672,7 +674,7 @@ EvaVariantWidget.prototype = {
672674
align: 'stretch'
673675
}
674676
},
675-
height:3200,
677+
height:800,
676678
handlers: {
677679
"load:finish": function (e) {
678680

@@ -978,15 +980,32 @@ EvaVariantWidget.prototype = {
978980
/* Put the record object in somma seperated format */
979981
csvContent += snewLine;
980982
Ext.Object.each(records[i].data, function(key, value) {
983+
if(key == 'consequenceTypes'){
984+
var consqTypeArr = [];
985+
Ext.Object.each(records[i].data[key], function(k, v) {
986+
consqTypeArr.push(v.soTerms[0].soName)
987+
});
988+
value = consqTypeArr.join(" ");
989+
}
981990
if(_.indexOf(removeKeys, key) == -1){
982991
printableValue = ((noCsvSupport) && value == '') ? '&nbsp;' : value;
983992
printableValue = String(printableValue).replace(/,/g , "");
984993
printableValue = String(printableValue).replace(/(\r\n|\n|\r)/gm,"");
985994
csvContent += sdelimiter + printableValue + edelimiter;
986995
}
987996
});
988-
var speciesName = _.findWhere(speciesList, {taxonomyCode:params.species.split('_')[0]}).taxonomyEvaName;
989-
var species = speciesName.substr(0,1).toUpperCase()+speciesName.substr(1)+'/'+_.findWhere(speciesList, {taxonomyCode:params.species.split('_')[0]}).assemblyName;
997+
998+
console.log(csvContent)
999+
var speciesName;
1000+
var species;
1001+
if(!_.isEmpty(speciesList)){
1002+
speciesName = _.findWhere(speciesList, {taxonomyCode:params.species.split("_")[0]}).taxonomyEvaName;
1003+
species = speciesName.substr(0,1).toUpperCase()+speciesName.substr(1)+'/'+_.findWhere(speciesList, {taxonomyCode:params.species.split('_')[0]}).assemblyName;
1004+
1005+
} else {
1006+
species = params.species;
1007+
}
1008+
9901009
// var species = _.findWhere(speciesList, {value:params.species}).name;
9911010
speciesValue = ((noCsvSupport) && species == '') ? '&nbsp;' : species;
9921011
speciesValue = String(species).replace(/,/g , "");

0 commit comments

Comments
 (0)