Skip to content

Commit

Permalink
rename snippetDialog to xhrDialog
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuels committed Aug 9, 2012
1 parent 087ab35 commit fa753ad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/tutorial/conf_files/volvox.json
Expand Up @@ -82,7 +82,7 @@
"label" : "Open popup with XHR HTML snippet (btw this is feature {name})",
"title": "function(track,feature,div) { return 'Random XHR HTML '+Math.random()+' title!'; }",
"iconClass" : "dijitIconDatabase",
"action": "snippetDialog",
"action": "xhrDialog",
"url" : "sample_data/test_snippet.html?featurename={name}:{start}-{end}"
},
{
Expand Down
12 changes: 6 additions & 6 deletions src/JBrowse/View/Track/HTMLFeatures.js
Expand Up @@ -888,10 +888,10 @@ var HTMLFeatures = declare( BlockBased,
};
var dialog;

// if dialog == snippet, open the link in a dialog
// if dialog == xhr, open the link in a dialog
// with the html from the URL just shoved in it
if( type == 'snippet' || type == 'content' ) {
if( type == 'snippet' )
if( type == 'xhr' || type == 'content' ) {
if( type == 'xhr' )
dialogOpts.href = spec.url;
else
dialogOpts.content = this._evalConf( context, spec.content, null );
Expand Down Expand Up @@ -968,15 +968,15 @@ var HTMLFeatures = declare( BlockBased,
iframe: 'iframeDialog',
contentdialog: 'contentDialog',
content: 'content',
snippetdialog: 'snippetDialog',
snippet: 'snippet',
xhrdialog: 'xhrDialog',
xhr: 'xhr',
newwindow: 'newWindow',
"_blank": 'newWindow'
}[(''+spec.action).toLowerCase()];

if( spec.action == 'newWindow' )
window.open( url, '_blank' );
else if( spec.action in { iframeDialog:1, contentDialog:1, snippetDialog:1} )
else if( spec.action in { iframeDialog:1, contentDialog:1, xhrDialog:1} )
track._openDialog( spec, evt, ctx );
}
else if( typeof spec.action == 'function' ) {
Expand Down

0 comments on commit fa753ad

Please sign in to comment.