Introduction
Introduction Statistics Contact Development Disclaimer Help
Cleanup - warvox - VoIP based wardialing tool, forked from rapid7/warvox.
Log
Files
Refs
README
---
commit 4ec2811346db3eb0dfc986bb0186f7e4f853ba25
parent 998186ba0c645f43c40f405c476b0747bba24f3f
Author: HD Moore <[email protected]>
Date: Mon, 7 Jan 2013 12:24:40 -0600
Cleanup
Diffstat:
M app/helpers/application_helper.rb | 52 -----------------------------…
M app/models/job.rb | 2 +-
M app/views/projects/index.html.erb | 6 +++---
M app/views/shared/_call_type.html.e… | 2 +-
4 files changed, 5 insertions(+), 57 deletions(-)
---
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper…
@@ -109,62 +109,10 @@ module ApplicationHelper
end
end
-
def escape_javascript_dq(str)
escape_javascript(str.strip).gsub("\\'", "'").gsub("\t", " …
end
- #
- # Generate pagination links
- #
- # Parameters:
- # :name:: the kind of the items we're paginating
- # :items:: the collection of items currently on the page
- # :count:: total count of items to paginate
- # :offset:: offset from the beginning where +items+ starts within the total
- # :page:: current page
- # :num_pages:: total number of pages
- #
- def page_links(opts={})
- link_method = opts[:link_method]
- if not link_method or not respond_to? link_method
- raise RuntimeError.new("Need a method for generating links")
- end
- name = opts[:name] || ""
- items = opts[:items] || []
- count = opts[:count] || 0
- offset = opts[:offset] || 0
- page = opts[:page] || 1
- num_pages = opts[:num_pages] || 1
-
- page_list = ""
- 1.upto(num_pages) do |p|
- if p == page
- page_list << content_tag(:span, :class=>"current") { h page }
- else
- page_list << self.send(link_method, p, { :page => p })
- end
- end
- content_tag(:div, :id => "page_links") do
- content_tag(:span, :class => "index") do
- if items.size > 0
- "#{offset + 1}-#{offset + items.size} of #{h pluralize(count, name)}…
- else
- h(name.pluralize)
- end.html_safe
- end +
- if num_pages > 1
- self.send(link_method, '', { :page => 0 }, { :class => 'start' }) +
- self.send(link_method, '', { :page => page-1 }, {:class => 'prev' …
- page_list +
- self.send(link_method, '', { :page => [page+1,num_pages].min }, { …
- self.send(link_method, '', { :page => num_pages }, { :class => 'en…
- else
- ""
- end
- end
- end
-
def submit_checkboxes_to(name, path, html={})
if html[:confirm]
confirm = html.delete(:confirm)
diff --git a/app/models/job.rb b/app/models/job.rb
@@ -107,7 +107,7 @@ class Job < ActiveRecord::Base
:scope => self.scope, # job / pr…
:force => !!(self.force), # true / f…
:target_id => self.target_id.to_i, # job_id o…
- :target_ids => self.target_ids.map{|x| x.to_i }
+ :target_ids => (self.target_ids || []).map{|x|…
})
return self.save
else
diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.…
@@ -20,9 +20,9 @@
<tr>
<td><%= link_to( h(project.name), project_path(project)) %></td>
<td><%=truncate(project.description, :length => 40, :separator => '') %></…
- <td><%= project.jobs.count %></td>
- <td><%= project.calls.count %></td>
- <td><%= project.calls.where('analysis_completed_at IS NOT NULL').count %><…
+ <td><%= number_with_delimiter(project.jobs.count) %></td>
+ <td><%= number_with_delimiter(project.calls.count) %></td>
+ <td><%= number_with_delimiter(project.calls.where('analysis_completed_at I…
<td><%= project.updated_at.localtime.strftime("%Y-%m-%d %H:%M:%S") %></td>
<td>
<a class="btn" href="<%= edit_project_path(project) %>"rel="tool…
diff --git a/app/views/shared/_call_type.html.erb b/app/views/shared/_call_type…
@@ -11,4 +11,4 @@ ttip << raw("<div class='task_args_val'>") + h(call.audio_len…
ttip << raw("<div class='task_args_var'>Ring:</div> ")
ttip << raw("<div class='task_args_val'>") + h(call.ring_length.to_s) + raw("&…
ttip << raw("</div>\n")
-%><%= raw("<span class='xpopover' rel='popover' data-title=\"#{h call.number.t…
+%><%= raw("<span class='xpopover' rel='popover' data-title=\"#{h call.number.t…
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.