Introduction
Introduction Statistics Contact Development Disclaimer Help
Continue sloughing through screens - warvox - VoIP based wardialing tool, forke…
Log
Files
Refs
README
---
commit 267f835bb1298e0aafcfa095971be2f03573f3bd
parent 951083434c6a1646d60513f8a2b5810ee03f5136
Author: HD Moore <[email protected]>
Date: Sun, 13 Jan 2013 16:28:01 -0600
Continue sloughing through screens
Diffstat:
A app/assets/javascripts/analyze/_in… | 58 +++++++++++++++++++++++++++…
A app/views/analyze/_index.json.erb | 17 +++++++++++++++++
A app/views/jobs/new_analyze.html.erb | 12 ++++++++++++
3 files changed, 87 insertions(+), 0 deletions(-)
---
diff --git a/app/assets/javascripts/analyze/_index.coffee b/app/assets/javascri…
@@ -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, "sWidth": "22px"}
+ {"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
diff --git a/app/views/analyze/_index.json.erb b/app/views/analyze/_index.json.…
@@ -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/c…
+ "line_type": "<%= raw(escape_javascript_dq(render(:partial => 'shared/c…
+ "signal": "<%= raw(escape_javascript_dq(render(:partial => 'shared/c…
+ }<%= ',' unless index == (@results.size - 1) %>
+ <% end -%>
+ ]
+}
diff --git a/app/views/jobs/new_analyze.html.erb b/app/views/jobs/new_analyze.h…
@@ -0,0 +1,12 @@
+<h1 class='title'>Call Analysis</h1>
+
+<%= semantic_form_for(@job, :url => analyze_project_job_path(@project) ) do |f…
+ <%= f.input :project, :as => :select %>
+ <br/>
+ <%= f.input :force, :as => :boolean, :label => 'Process previously an…
+ <%= f.action :submit, :label => 'Analyze', :button_html => { :class =>…
+
+ <a class="btn btn-link" href="<%= project_path(@project) %>" rel="tool…
+<% end %>
+
+<%= set_focus('job_submit') %>
You are viewing proxied material from jay.scot. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.