Skip to content

Instantly share code, notes, and snippets.

@gourneau
Created March 7, 2013 00:57
Show Gist options
  • Select an option

  • Save gourneau/5104649 to your computer and use it in GitHub Desktop.

Select an option

Save gourneau/5104649 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" media="all" href="/site_media/resources/bootstrap/css/bootstrap.min.css" type="text/css">
<script type="text/javascript" src="/site_media/resources/jquery/jquery-1.8.2.js"></script>
<script type="text/javascript" src="/site_media/resources/bootstrap/js/bootstrap.min.js"></script>
<style type="text/css">
.help {
cursor: default;
border-bottom: 1px dotted #A9A9A9;
font-weight: bold;
}
.row {
margin-left: 30px;
margin-bottom: 8px;
}
.container {
width: 840px;
}
.zebra {
padding: 5px;
}
.zebra:nth-child(even) {
background: -moz-linear-gradient(top, rgba(244, 245, 247, 0.75) 0%, rgba(229, 230, 232, 0.75) 50%, rgba(244, 245, 247, 0.75) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(244, 245, 247, 0.75)), color-stop(50%, rgba(229, 230, 232, 0.75)), color-stop(100%, rgba(244, 245, 247, 0.75))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(244, 245, 247, 0.75) 0%, rgba(229, 230, 232, 0.75) 50%, rgba(244, 245, 247, 0.75) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(244, 245, 247, 0.75) 0%, rgba(229, 230, 232, 0.75) 50%, rgba(244, 245, 247, 0.75) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(244, 245, 247, 0.75) 0%, rgba(229, 230, 232, 0.75) 50%, rgba(244, 245, 247, 0.75) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(244, 245, 247, 0.75) 0%, rgba(229, 230, 232, 0.75) 50%, rgba(244, 245, 247, 0.75) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#bff4f5f7', endColorstr = '#bff4f5f7', GradientType = 0); /* IE6-9 */
}
</style>
<script type="text/javascript">
function serializeForm(){
var meta = {};
meta["padregions"] = $("#padregions").val();
return meta;
}
$(function () {
//this is a varaible for the pluginMedia directory, where all of your static files should be stored
window.pluginMedia = "/pluginMedia/" + TB_plugin["fields"]["name"] + "/";
//set the tooltips
$('.help').tooltip({"placement":"right"});
$('#postbutton').click(function () {
// serialize user selections and run the plugin
obj = serializeForm();
//print out the object for debugging
console.log(obj);
pluginAPIJSON = { "plugin":[TB_plugin.fields.name], "pluginconfig":obj };
pluginAPIJSON = JSON.stringify(pluginAPIJSON);
pluginURL = "/rundb/api/v1/results/" + TB_result + "/plugin/";
$.ajax({
type:'POST',
url:pluginURL,
async:false,
contentType:"application/json; charset=utf-8",
data:pluginAPIJSON, dataType:"json",
success:function (data) {
$("#json_result").html('<span><img src="/site_media/jquery/colorbox/images/loading.gif" alt="Running Plugin" style="float:center"></img> Running the Plugin... Check in the Plugin Summary</span>');
//close the modal window
setTimeout("parent.$.fn.colorbox.close()", 2000);
}
});
});
});
</script>
<title></title>
</head>
<body>
<div class="container">
<h1>
Torrent Plugin
</h1>
<div class="row zebra">
<div id="advancedSettings">
<h4>
Advanced Settings
</h4>
<form class="form-horizontal">
<div class="row zerba">
<div class="span3">
<span class="help"
title="Select the 'hotspot' regions (variant loci) matching your reference and enriched fragment library. See Description and Notes below.">
Regions:
</span>
</div>
<div class="span2">
<input class="input-mini" type="text" id="padregions" value="">
</div>
<div class="span4">
<ul>
<li>help
</li>
</ul>
</div>
</div>
</form>
</div>
</div>
<div class="row">
<div class="span3 offset8">
<input id="postbutton" class="btn btn-primary" type="submit" value="Submit">
</div>
</div>
<div id="json_result"></div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment