Add new files - warvox - VoIP based wardialing tool, forked from rapid7/warvox.
   DIR Log
   DIR Files
   DIR Refs
   DIR README
       ---
   DIR commit a1aa3fbbc918a8fca82cce9016edd571a0a87c73
   DIR parent e83feb465aa71b51e334b8fd374d88e98e0c01f9
  HTML Author: HD Moore <hd_moore@rapid7.com>
       Date:   Mon,  7 Jan 2013 03:27:47 -0600
       
       Add new files
       
       Diffstat:
         A app/assets/javascripts/analyze/vie… |      58 ++++++++++++++++++++++++++++++
         A app/views/analyze/_view.json.erb    |      17 +++++++++++++++++
         D app/views/shared/_audio_player.htm… |       0 
         A app/views/shared/_call_signal.html… |       2 ++
         A app/views/shared/_call_type.html.e… |      14 ++++++++++++++
       
       5 files changed, 91 insertions(+), 0 deletions(-)
       ---
   DIR diff --git a/app/assets/javascripts/analyze/view.coffee b/app/assets/javascripts/analyze/view.coffee
       @@ -0,0 +1,58 @@
       +jQuery ($) ->
       +  $ ->
       +    resultsPath = $('#results-path').html()
       +    $resultsTable = $('#results-table')
       +
       +    # Enable DataTable for the results list.
       +    $resultsDataTable = $resultsTable.table
       +      analysisTab: true
       +      controlBarLocation: $('.analysis-control-bar')
       +      searchInputHint:   'Search Calls'
       +      searchable: true
       +      datatableOptions:
       +        "sDom": "<'row'<'span6'l><'span6'f>r>t<'row'<'span6'i><'span6'p>>",
       +        "sPaginationType": "bootstrap",
       +        "oLanguage":
       +          "sEmptyTable":    "No analysis results."
       +        "sAjaxSource":      resultsPath
       +        "aaSorting":      [[1, 'asc']]
       +        "aoColumns": [
       +          {"mDataProp": "checkbox", "bSortable": false}
       +          {"mDataProp": "number"}
       +          {"mDataProp": "line_type"}
       +          {"mDataProp": "signal"}
       +        ]
       +        "fnServerData": ( sSource, aoData, fnCallback ) ->
       +          $.getJSON sSource, aoData, (json) ->
       +            fnCallback(json)
       +            $(".xtooltip").tooltip('fixTitle')
       +            $(".xpopover").popover
       +              html: true
       +              placement: 'right'
       +              trigger: 'hover'
       +              delay: { show: 300, hide: 300 }
       +              animation: false
       +
       +    # Gray out the table during loads.
       +    $("#results-table_processing").watch 'visibility', ->
       +      if $(this).css('visibility') == 'visible'
       +        $resultsTable.css opacity: 0.6
       +      else
       +        $resultsTable.css opacity: 1
       +
       +    # Display the search bar when the search icon is clicked
       +    $('.button .search').click (e) ->
       +      $filter = $('.dataTables_filter')
       +      $input = $('.dataTables_filter input')
       +      if $filter.css('bottom').charAt(0) == '-' # if (css matches -42px)
       +        # input box is visible, hide it
       +        # only allow user to hide if there is no search string
       +        if !$input.val() || $input.val().length < 1
       +          $filter.css('bottom', '99999999px')
       +      else # input box is invisible, display it
       +        $filter.css('bottom', '-42px')
       +        $input.focus()  # auto-focus input
       +      e.preventDefault()
       +
       +    searchVal = $('.dataTables_filter input').val()
       +    $('.button .search').click() if searchVal && searchVal.length > 0
   DIR diff --git a/app/views/analyze/_view.json.erb b/app/views/analyze/_view.json.erb
       @@ -0,0 +1,17 @@
       +<%- self.formats = ["html"] %>
       +{
       +  "sEcho": <%= echo_data_tables %>,
       +  "iTotalRecords": <%= @results_total_count.to_json %>,
       +  "iTotalDisplayRecords": <%= @results_total_display_count.to_json %>,
       +  "aaData": [
       +  <% @results.each_with_index do |result, index| -%>
       +    {
       +      "DT_RowId":   <%= dom_id(result).to_json.html_safe%>,
       +      "checkbox":   <%= call_checkbox_tag(result) %>,
       +      "number":     "<%= raw(escape_javascript_dq(render(:partial => 'shared/call_info', :layout => false,  :locals => { :call => result }))) %>",
       +      "line_type":  "<%= raw(escape_javascript_dq(render(:partial => 'shared/call_type', :layout => false,  :locals => { :call => result }))) %>",
       +      "signal":     "<%= raw(escape_javascript_dq(render(:partial => 'shared/call_signal', :layout => false,  :locals => { :call => result }))) %>"
       +    }<%= ',' unless index == (@results.size - 1) %>
       +  <% end -%>
       +  ]
       +}
   DIR diff --git a/app/views/shared/_audio_player.html.erb b/app/views/shared/_audio_player.html.erb
   DIR diff --git a/app/views/shared/_call_signal.html.erb b/app/views/shared/_call_signal.html.erb
       @@ -0,0 +1,2 @@
       +<span class='pull-left'><%= render :partial => 'shared/lightbox_sig', :locals => { :call => call } %></span>
       +<%= render :partial => 'shared/lightbox_freq', :locals => { :call => call } %>
   DIR diff --git a/app/views/shared/_call_type.html.erb b/app/views/shared/_call_type.html.erb
       @@ -0,0 +1,14 @@
       +<%
       +ttip = raw("<div class='task_args_formatted'>")
       +ttip << raw("<div class='task_args_var'>Call Time:</div> ")
       +ttip << raw("<div class='task_args_val'>") + h(call.created_at.strftime("%Y-%m-%d %H:%M:%S %Z")) + raw(" </div>")
       +ttip << raw("<div class='task_args_var'>CallerID:</div> ")
       +ttip << raw("<div class='task_args_val'>") + h(call.caller_id) + raw(" </div>")
       +ttip << raw("<div class='task_args_var'>Provider:</div> ")
       +ttip << raw("<div class='task_args_val'>") + h(call.provider.name) + raw(" </div>")
       +ttip << raw("<div class='task_args_var'>Audio:</div> ")
       +ttip << raw("<div class='task_args_val'>") + h(call.audio_length.to_s) + raw(" </div>")
       +ttip << raw("<div class='task_args_var'>Ring:</div> ")
       +ttip << raw("<div class='task_args_val'>") + h(call.ring_length.to_s) + raw(" </div>")
       +ttip << raw("</div>\n")
       +%><%= raw("<span class='xpopover' rel='popover' data-title=\"#{h call.number.to_s }\" data-content=\"#{ttip}\"><strong>#{h call.line_type.upcase }</strong></span>") -%>