Skip to content

Commit

Permalink
Issue #14 Current behavior left-click: navigates to gene page, right-…
Browse files Browse the repository at this point in the history
…click: gives context menu where details option can be selected
  • Loading branch information
putmantime committed Jul 19, 2017
1 parent 1c353fc commit ac0af66
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 5 deletions.
6 changes: 5 additions & 1 deletion scripts/jbrowse_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ def generate_tracklist(self):
"storeClass": "JBrowse/Store/SeqFeature/GFF3",
"urlTemplate": "{}_genes.gff".format(self.taxid),
"key": "genes_canvas_mod",
"onClick": {
"label": "right-click for more options",
"action": "function( track, feature, div ){var top_url = (window.location != window.parent.location)? document.referrer: document.location.href; var pre_url = top_url.split('/'); var taxid = pre_url[4]; var new_url = ['http:/' , pre_url[2], 'organism', taxid, 'gene', this.feature.data.id].join('/'); return window.parent.location=new_url}"
},
"menuTemplate": [
{
"label": "View Details",
Expand All @@ -82,7 +86,7 @@ def generate_tracklist(self):
{
"label": "load this gene page",
"iconClass": "dijitIconDatabase",
"action": "function( track, feature, div ){var top_url = (window.location != window.parent.location)? document.referrer: document.location.href; var pre_url = top_url.split('/'); var taxid = pre_url[4]; var new_url = ['http:/' , pre_url[2], 'organism', taxid, 'gene', this.feature.data.id].join('/'); ; return window.parent.location=new_url}"
"action": "function( track, feature, div ){var top_url = (window.location != window.parent.location)? document.referrer: document.location.href; var pre_url = top_url.split('/'); var taxid = pre_url[4]; var new_url = ['http:/' , pre_url[2], 'organism', taxid, 'gene', this.feature.data.id].join('/'); return window.parent.location=new_url}"
}
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
"urlTemplate": "115713_genes.gff",
"key": "genes_canvas_mod",
"label": "genes_canvas_mod",
"onClick": {
"label": "right-click for more options",
"action": "function( track, feature, div ){var top_url = (window.location != window.parent.location)? document.referrer: document.location.href; var pre_url = top_url.split('/'); var taxid = pre_url[4]; var new_url = ['http:/' , pre_url[2], 'organism', taxid, 'gene', this.feature.data.id].join('/'); return window.parent.location=new_url}"
},
"menuTemplate": [
{
"label": "View Details",
Expand All @@ -42,7 +46,7 @@
{
"label": "load this gene page",
"iconClass": "dijitIconDatabase",
"action": "function( track, feature, div ){var top_url = (window.location != window.parent.location)? document.referrer: document.location.href; var pre_url = top_url.split('/'); var taxid = pre_url[4]; var new_url = ['http:/' , pre_url[2], 'organism', taxid, 'gene', this.feature.data.id].join('/'); ; return window.parent.location=new_url}"
"action": "function( track, feature, div ){var top_url = (window.location != window.parent.location)? document.referrer: document.location.href; var pre_url = top_url.split('/'); var taxid = pre_url[4]; var new_url = ['http:/' , pre_url[2], 'organism', taxid, 'gene', this.feature.data.id].join('/'); return window.parent.location=new_url}"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
"urlTemplate": "243161_genes.gff",
"key": "genes_canvas_mod",
"label": "genes_canvas_mod",
"onClick": {
"label": "right-click for more options",
"action": "function( track, feature, div ){var top_url = (window.location != window.parent.location)? document.referrer: document.location.href; var pre_url = top_url.split('/'); var taxid = pre_url[4]; var new_url = ['http:/' , pre_url[2], 'organism', taxid, 'gene', this.feature.data.id].join('/'); return window.parent.location=new_url}"
},
"menuTemplate": [
{
"label": "View Details",
Expand All @@ -42,7 +46,7 @@
{
"label": "load this gene page",
"iconClass": "dijitIconDatabase",
"action": "function( track, feature, div ){var top_url = (window.location != window.parent.location)? document.referrer: document.location.href; var pre_url = top_url.split('/'); var taxid = pre_url[4]; var new_url = ['http:/' , pre_url[2], 'organism', taxid, 'gene', this.feature.data.id].join('/'); ; return window.parent.location=new_url}"
"action": "function( track, feature, div ){var top_url = (window.location != window.parent.location)? document.referrer: document.location.href; var pre_url = top_url.split('/'); var taxid = pre_url[4]; var new_url = ['http:/' , pre_url[2], 'organism', taxid, 'gene', this.feature.data.id].join('/'); return window.parent.location=new_url}"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
"urlTemplate": "272561_genes.gff",
"key": "genes_canvas_mod",
"label": "genes_canvas_mod",
"onClick": {
"label": "right-click for more options",
"action": "function( track, feature, div ){var top_url = (window.location != window.parent.location)? document.referrer: document.location.href; var pre_url = top_url.split('/'); var taxid = pre_url[4]; var new_url = ['http:/' , pre_url[2], 'organism', taxid, 'gene', this.feature.data.id].join('/'); return window.parent.location=new_url}"
},
"menuTemplate": [
{
"label": "View Details",
Expand All @@ -42,7 +46,7 @@
{
"label": "load this gene page",
"iconClass": "dijitIconDatabase",
"action": "function( track, feature, div ){var top_url = (window.location != window.parent.location)? document.referrer: document.location.href; var pre_url = top_url.split('/'); var taxid = pre_url[4]; var new_url = ['http:/' , pre_url[2], 'organism', taxid, 'gene', this.feature.data.id].join('/'); ; return window.parent.location=new_url}"
"action": "function( track, feature, div ){var top_url = (window.location != window.parent.location)? document.referrer: document.location.href; var pre_url = top_url.split('/'); var taxid = pre_url[4]; var new_url = ['http:/' , pre_url[2], 'organism', taxid, 'gene', this.feature.data.id].join('/'); return window.parent.location=new_url}"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
"urlTemplate": "471472_genes.gff",
"key": "genes_canvas_mod",
"label": "genes_canvas_mod",
"onClick": {
"label": "right-click for more options",
"action": "function( track, feature, div ){var top_url = (window.location != window.parent.location)? document.referrer: document.location.href; var pre_url = top_url.split('/'); var taxid = pre_url[4]; var new_url = ['http:/' , pre_url[2], 'organism', taxid, 'gene', this.feature.data.id].join('/'); return window.parent.location=new_url}"
},
"menuTemplate": [
{
"label": "View Details",
Expand All @@ -42,7 +46,7 @@
{
"label": "load this gene page",
"iconClass": "dijitIconDatabase",
"action": "function( track, feature, div ){var top_url = (window.location != window.parent.location)? document.referrer: document.location.href; var pre_url = top_url.split('/'); var taxid = pre_url[4]; var new_url = ['http:/' , pre_url[2], 'organism', taxid, 'gene', this.feature.data.id].join('/'); ; return window.parent.location=new_url}"
"action": "function( track, feature, div ){var top_url = (window.location != window.parent.location)? document.referrer: document.location.href; var pre_url = top_url.split('/'); var taxid = pre_url[4]; var new_url = ['http:/' , pre_url[2], 'organism', taxid, 'gene', this.feature.data.id].join('/'); return window.parent.location=new_url}"
}
]
},
Expand Down

0 comments on commit ac0af66

Please sign in to comment.