publiclab/spectral-workbench

View on GitHub
app/views/spectrums/show/_tools.html.erb

Summary

Maintainability
Test Coverage
<div class="btn-group dropup pull-right"> 
  <a data-toggle="dropdown" class="btn btn-inverse"><i class="fa fa-white fa-briefcase"></i><span class="hidden-phone"> More tools</span></a>
  <ul class="dropdown-menu">
    <li><a onClick="$W.run_macro('warren','equalize_area')">Equalize area</a></li>
    <li><a onClick="$W.run_macro('warren','equalize-height')">Equalize height</a></li>
    <li><a onClick="$W.run_macro('warren','smooth_nosave')">Test smoothing data</a></li>
    <li><a onClick="$W.run_macro('warren','smooth_save')">Auto-smooth 10 rows below</a></li>
    <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 onClick="$W.set_sample_row()" data-toggle="modal">Enter percentage sample height</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>
</div>