Sha256: da9383ac60ae7d9c9da0886f0324c8dec44e950a4970696910697966f58de2fd

Contents?: true

Size: 759 Bytes

Versions: 2

Compression:

Stored size: 759 Bytes

Contents

<form id="script" class="clearfix script" method="post">
  <div class="form-group">
    <textarea name="script" class="form-control" placeholder="Your Script..." rows="8"></textarea>
  </div>
  <div class="pull-right">
    <select name="type" class="form-control">
      <option value="ruby">Ruby</option>
      <option value="bash">Bash</option>
    </select>
    <button type="submit" class="btn btn-primary">Submit</button>
  </div>
</form>

<div id="content"></div>

<script type="text/javascript">
  var $content = $("#content");

  $('#script').ajaxForm(function(json) {
    try {
      var data = JSON.parse(json);
      $content
        .html('<hr>')
        .append(data.content);
    } catch (error) {
      console.log(error)
    }
  });
</script>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tailog-0.3.1 app/views/script/index.erb
tailog-0.3.0 app/views/script/index.erb