app/views/match/search.html.erb
<%= render :partial => "clone" %>
<%= render :partial => "macros" %>
<%= render :partial => "select_row" %>
<%= render :partial => "compare" %>
<div class="container-fluid" style="clear:both;">
<div class="row-fluid" id="display">
<div id="graph" style="width:98%;height:200px;"></div>
<div class="navbar navbar-inverse navbar-static-bottom" style="margin:0;">
<div class="navbar-inner">
<a href="#embedmodal" class="btn btn-inverse hidden-phone" data-toggle="modal"><i class="fa fa-white fa-share"></i><span class="hidden-phone"> Embed</span></a>
<%= render :partial => "embed" %>
<a class="btn btn-inverse hidden-phone" id="createSet" href="javascript:void(0);"><i class="fa fa-white fa-list"></i><span class="hidden-phone"> Save as set</span></a>
<a data-toggle="modal" class="btn btn-inverse" href="#comparemodal"><i class="fa fa-white fa-align-left"></i><span class="hidden-phone"> Compare</span></a>
<a class="btn btn-inverse hidden-phone" id="clearPlot" href="javascript:void(0);"><i class="fa fa-white fa-remove"></i><span class="hidden-phone"> Clear Plot</span></a>
<script type="text/javascript">
$('#clearPlot').click(function() {
$W.data = []
spectra.push(<%= @spectrum.id %>)
$W.data.push({id: <%= @spectrum.id %>, label:"<%= @spectrum.title.gsub('"',"'") %> = 0%", data: spectrum_<%= @spectrum.id %>_data})
plot = $.plot($("#graph"),$W.data,flotoptions);
$W.init_hovers();
})
</script>
<% if logged_in? && current_user.id == 1 && @spectrum.calibrated %><a href="/key/<%= @spectrum.id %>" class="btn btn-inverse">Make key</a><% end %>
<a rel="popover" data-placement="left" class="pull-right btn btn-inverse" data-content='<ul class="nav nav-list"><li><a onClick="$W.units()">Toggle units</a></li><li><a onClick="$W.toggle_mode()">Toggle RGB</a></li><li><a onClick="$W.extract()"><i class="fa fa-refresh"></i> Re-extract from photo</a></li><li><a href="#selectrowmodal" data-toggle="modal">Set sample row</a></li><li><a href="/spectra/rotate/<%= @spectrum.id %>">Rotate image</a></li><li><a href="/spectra/reverse/<%= @spectrum.id %>"><i class="fa fa-resize-horizontal"></i> Flip image horizontally</a></li><li><a href="/spectra/find_brightest_row/<%= @spectrum.id %>">Auto-detect brightest spectrum</a></li><li><a href="#macrosmodal" data-toggle="modal"><i class="fa fa-forward"></i> Macros/scripting</a></li></ul>'><i class="fa fa-white fa-briefcase"></i><span class="hidden-phone"> More tools</span></a>
<b class="pull-right" style="padding-top:10px;margin-right:10px;"><span id="wavelength"></span> <span id="#unit_label">nm</span></b>
</div>
</div>
</div>
<h3>Closest Matches Found:</h3>
<form method="get" id="fitAdjustForm" class="form-search" action="javascript:void(0);">
<label id ="AdjustFit">Enter the required fit: </label>
<input placeholder="Adjust match fit" class='search-query input-medium' id='fitinput' type='text' name='fit' value=<%= @range %> />
<button class="btn btn-primary" type='submit' ><i class="fa fa-search fa-white"></i></button>
</form>
<div id="results">
<%= render :partial => "list_results" %>
</div>
</div>