sunrise-votes 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +5 -0
- data/README.rdoc +14 -0
- data/Rakefile +46 -0
- data/app/controllers/manage/ballot_box/votes_controller.rb +36 -0
- data/app/views/manage/ballot_box/votes/_model_filter.html.erb +34 -0
- data/app/views/manage/ballot_box/votes/_vote.html.erb +48 -0
- data/app/views/manage/ballot_box/votes/index.html.erb +29 -0
- data/app/views/manage/ballot_box/votes/show.html.erb +112 -0
- data/config/locales/ru.yml +5 -0
- data/config/locales/uk.yml +5 -0
- data/config/routes.rb +8 -0
- data/lib/generators/sunrise/votes/USAGE +5 -0
- data/lib/generators/sunrise/votes/install_generator.rb +16 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/excanvas.min.js +35 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/jquery.jqplot.css +226 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/jquery.jqplot.min.js +30 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.BezierCurveRenderer.js +312 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.BezierCurveRenderer.min.js +30 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.barRenderer.js +702 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.barRenderer.min.js +30 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.blockRenderer.js +234 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.blockRenderer.min.js +30 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.bubbleRenderer.js +748 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.bubbleRenderer.min.js +30 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.canvasAxisLabelRenderer.js +199 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.canvasAxisLabelRenderer.min.js +30 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.canvasAxisTickRenderer.js +238 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.canvasAxisTickRenderer.min.js +30 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.canvasOverlay.js +614 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.canvasOverlay.min.js +30 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.canvasTextRenderer.js +420 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.canvasTextRenderer.min.js +30 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.categoryAxisRenderer.js +634 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.categoryAxisRenderer.min.js +30 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.ciParser.js +115 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.ciParser.min.js +30 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.cursor.js +1002 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.cursor.min.js +30 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.dateAxisRenderer.js +439 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.dateAxisRenderer.min.js +30 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.donutRenderer.js +904 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.donutRenderer.min.js +30 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.dragable.js +218 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.dragable.min.js +30 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.enhancedLegendRenderer.js +199 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.enhancedLegendRenderer.min.js +30 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.funnelRenderer.js +932 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.funnelRenderer.min.js +30 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.highlighter.js +406 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.highlighter.min.js +30 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.json2.js +475 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.json2.min.js +30 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.logAxisRenderer.js +446 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.logAxisRenderer.min.js +30 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.mekkoAxisRenderer.js +607 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.mekkoAxisRenderer.min.js +30 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.mekkoRenderer.js +432 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.mekkoRenderer.min.js +30 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.meterGaugeRenderer.js +1142 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.meterGaugeRenderer.min.js +30 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.ohlcRenderer.js +372 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.ohlcRenderer.min.js +30 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.pieRenderer.js +797 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.pieRenderer.min.js +30 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.pointLabels.js +337 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.pointLabels.min.js +30 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.trendline.js +220 -0
- data/lib/generators/sunrise/votes/templates/javascripts/ballot_box/plugins/jqplot.trendline.min.js +30 -0
- data/lib/sunrise-votes.rb +2 -0
- data/lib/sunrise/votes.rb +12 -0
- data/lib/sunrise/votes/engine.rb +18 -0
- data/lib/sunrise/votes/version.rb +5 -0
- metadata +164 -0
data/Gemfile
ADDED
data/README.rdoc
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
= Sunrise Votes
|
2
|
+
|
3
|
+
== Install
|
4
|
+
|
5
|
+
Copy javascripts files, need for drow chars via jqPlot.
|
6
|
+
jqPlot is a plotting and charting plugin for the jQuery Javascript framework.
|
7
|
+
jqPlot produces beautiful line, bar and pie charts with many features.
|
8
|
+
http://www.jqplot.com/index.php
|
9
|
+
|
10
|
+
rails generate sunrise:votes:install
|
11
|
+
|
12
|
+
== Usage
|
13
|
+
|
14
|
+
<%= link_to 'charts', manage_ballot_box_vote_path(:id => 'charts', :idea_id => idea.id) %>
|
data/Rakefile
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'rake'
|
3
|
+
require 'rake/testtask'
|
4
|
+
require 'rake/rdoctask'
|
5
|
+
require File.join(File.dirname(__FILE__), 'lib', 'sunrise', 'votes', 'version')
|
6
|
+
|
7
|
+
desc 'Default: run unit tests.'
|
8
|
+
task :default => :test
|
9
|
+
|
10
|
+
desc 'Test the sunrise plugin.'
|
11
|
+
Rake::TestTask.new(:test) do |t|
|
12
|
+
t.libs << 'lib'
|
13
|
+
t.libs << 'test'
|
14
|
+
t.pattern = 'test/**/*_test.rb'
|
15
|
+
t.verbose = true
|
16
|
+
end
|
17
|
+
|
18
|
+
desc 'Generate documentation for the sunrise plugin.'
|
19
|
+
Rake::RDocTask.new(:rdoc) do |rdoc|
|
20
|
+
rdoc.rdoc_dir = 'rdoc'
|
21
|
+
rdoc.title = 'Sunrise Votes'
|
22
|
+
rdoc.options << '--line-numbers' << '--inline-source'
|
23
|
+
rdoc.rdoc_files.include('README')
|
24
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
25
|
+
end
|
26
|
+
|
27
|
+
begin
|
28
|
+
require 'jeweler'
|
29
|
+
Jeweler::Tasks.new do |s|
|
30
|
+
s.name = "sunrise-votes"
|
31
|
+
s.version = Sunrise::Votes::VERSION.dup
|
32
|
+
s.summary = "Rails CMS"
|
33
|
+
s.description = "Sunrise is a Aimbulance CMS"
|
34
|
+
s.email = "galeta.igor@gmail.com"
|
35
|
+
s.homepage = "https://github.com/galetahub/sunrise-votes"
|
36
|
+
s.authors = ["Igor Galeta", "Pavlo Galeta"]
|
37
|
+
s.files = FileList["[A-Z]*", "{app,config,lib}/**/*"]
|
38
|
+
s.extra_rdoc_files = FileList["[A-Z]*"] - %w(Gemfile Rakefile)
|
39
|
+
|
40
|
+
s.add_dependency('sunrise')
|
41
|
+
end
|
42
|
+
|
43
|
+
Jeweler::GemcutterTasks.new
|
44
|
+
rescue LoadError
|
45
|
+
puts "Jeweler not available. Install it with: gem install jeweler"
|
46
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
class Manage::BallotBox::VotesController < Manage::BaseController
|
2
|
+
inherit_resources
|
3
|
+
|
4
|
+
belongs_to :idea, :polymorphic => true
|
5
|
+
actions :index, :show, :destroy
|
6
|
+
defaults :route_prefix => 'manage', :resource_class => BallotBox::Vote,
|
7
|
+
:collection_name => 'votes', :instance_name => 'vote'
|
8
|
+
|
9
|
+
respond_to :json, :only => [:show]
|
10
|
+
|
11
|
+
before_filter :make_filter, :only=>[:index]
|
12
|
+
|
13
|
+
load_and_authorize_resource :idea, :through => :challenge
|
14
|
+
|
15
|
+
def destroy
|
16
|
+
destroy!{ manage_ballot_box_votes_path(:"#{parent_type}_id" => parent.id) }
|
17
|
+
end
|
18
|
+
|
19
|
+
def show
|
20
|
+
respond_with(parent) do |format|
|
21
|
+
format.json { render :json => parent.votes.chart(params[:id]) }
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
protected
|
26
|
+
|
27
|
+
def collection
|
28
|
+
@votes = (@votes || end_of_association_chain).page(params[:page]).merge(@search.scoped)
|
29
|
+
end
|
30
|
+
|
31
|
+
def make_filter
|
32
|
+
@search = Sunrise::ModelFilter.new(BallotBox::Vote, :attributes => [ :voter_type, :voter_id, :ip_address,
|
33
|
+
:browser_name, :browser_version, :browser_platform])
|
34
|
+
@search.update_attributes(params[:search])
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<div class="bot-bg">
|
2
|
+
<div class="filt-bl">
|
3
|
+
<%= link_to_function t('manage.model_filter.title'), "Manage.toggle_element('block_filter')", :class=>"dark-arr" %>
|
4
|
+
|
5
|
+
<%= cookie_content_tag(:div, :id=>"block_filter", :class=>"filt") do %>
|
6
|
+
<%= form_for @search, :as => :search, :url => manage_ballot_box_votes_path, :html=>{:method=>:get, :id=>"form_filter"} do |f| %>
|
7
|
+
<%= hidden_field_tag "#{parent_type}_id", parent.id %>
|
8
|
+
|
9
|
+
<%= f.label :ip_address, t('activerecord.attributes.vote.ip_address') %>
|
10
|
+
<%= f.text_field :ip_address, :class=>"text" %>
|
11
|
+
|
12
|
+
<%= f.label :browser_name, t('activerecord.attributes.vote.browser_name') %>
|
13
|
+
<%= f.text_field :browser_name, :class=>"text" %>
|
14
|
+
|
15
|
+
<%= f.label :browser_platform, t('activerecord.attributes.vote.browser_platform') %>
|
16
|
+
<%= f.text_field :browser_platform, :class=>"text" %>
|
17
|
+
|
18
|
+
<div class="buts">
|
19
|
+
<%= f.submit t('manage.model_filter.search'), :style=>"display:none;" %>
|
20
|
+
<%= link_to_function content_tag(:span, t('manage.model_filter.search')), "$('#form_filter').submit()", :class=>"gr" %>
|
21
|
+
<%= link_to t('manage.model_filter.clear'), manage_ballot_box_votes_path(:"#{parent_type}_id" => parent.id), :class=>"erase" %>
|
22
|
+
</div>
|
23
|
+
<% end %>
|
24
|
+
<% end %>
|
25
|
+
</div>
|
26
|
+
<div class="sort">
|
27
|
+
<label><%= t('manage.sort') %></label>
|
28
|
+
<div class="select-input"><%= link_to_function t("votes.#{@search.order_column}_#{@search.order_type}", :scope => [:manage, :sort_columns], :default => :"#{@search.order_column}_#{@search.order_type}"), "SelectList.toggle(event)", :class=>"corn", :id=>'sort_select' %></div>
|
29
|
+
<div id='sort_select_list' class="select-list" style='display:none;'>
|
30
|
+
<%= link_to_sort(t('votes.created_at_desc', :scope => [:manage, :sort_columns], :default => :created_at_desc), :name => "created_at", :order_type => 'desc') %>
|
31
|
+
<%= link_to_sort(t('votes.created_at_asc', :scope => [:manage, :sort_columns], :default => :created_at_asc), :name => "created_at", :order_type => 'asc') %>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
</div>
|
@@ -0,0 +1,48 @@
|
|
1
|
+
<%= content_tag(:div, :id=>dom_id(vote), :class=>"dinamic-bl") do %>
|
2
|
+
<div class="act-bl" style="display:none;">
|
3
|
+
<%= link_to image_tag("manage/ico_del.gif", :title=>t('manage.delete')),
|
4
|
+
manage_ballot_box_vote_path(:id => vote.id, :"#{parent_type}_id" => parent.id),
|
5
|
+
:method=>:delete, :confirm=>t("manage.confirm_delete"), :class=>"icons" %>
|
6
|
+
</div>
|
7
|
+
|
8
|
+
<div class="bot-bg">
|
9
|
+
<div class="dinamic-container">
|
10
|
+
<div class="right-data">
|
11
|
+
<div class="right-data-cont">
|
12
|
+
<div class="dinamic-inner">
|
13
|
+
<div class="block">
|
14
|
+
<div class="r-block-cont">
|
15
|
+
<%= content_tag(:span, "#{vote.ip} (#{vote.ip_address})", :class=>"title") %>
|
16
|
+
|
17
|
+
<table border="0" width="100%" cellspacing="0" cellpadding="0" class="inf">
|
18
|
+
<tbody>
|
19
|
+
<tr>
|
20
|
+
<td class="left">Browser</td>
|
21
|
+
<td><%= vote.browser_name %> <%= vote.browser_version %> (<%= vote.browser_platform %>)</td>
|
22
|
+
</tr>
|
23
|
+
<tr>
|
24
|
+
<td class="left">Voter:</td>
|
25
|
+
<td><%= vote.voter_type %>:<%= vote.voter_id %></td>
|
26
|
+
</tr>
|
27
|
+
<tr>
|
28
|
+
<td class="left">User agent:</td>
|
29
|
+
<td><%= vote.user_agent %></td>
|
30
|
+
</tr>
|
31
|
+
<tr>
|
32
|
+
<td class="left">Refferer:</td>
|
33
|
+
<td><%= vote.referrer %></td>
|
34
|
+
</tr>
|
35
|
+
</tbody>
|
36
|
+
</table>
|
37
|
+
|
38
|
+
</div>
|
39
|
+
</div>
|
40
|
+
</div>
|
41
|
+
</div>
|
42
|
+
</div>
|
43
|
+
<div class="left-data">
|
44
|
+
<span class="data"><%= raw I18n.l(vote.created_at, :format=>"<span>%d/%m</span>%Y") %></span>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
<% end %>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<div class="duo-bl">
|
2
|
+
<div class="left-part">
|
3
|
+
<div class="content">
|
4
|
+
<div class="row-container">
|
5
|
+
<div class="white-row">
|
6
|
+
<div class="r-corn">
|
7
|
+
<%= link_to parent.title, manage_ballot_box_votes_path(:"#{parent_type}_id" => parent.id), :class=>"dark-text" %>
|
8
|
+
</div>
|
9
|
+
</div>
|
10
|
+
</div>
|
11
|
+
<div id="votes" class="stage">
|
12
|
+
<%= render :partial=>"manage/ballot_box/votes/vote", :collection => @votes %>
|
13
|
+
<%= paginate @votes %>
|
14
|
+
</div>
|
15
|
+
|
16
|
+
<script type='text/javascript'>
|
17
|
+
$(document).ready(function(){
|
18
|
+
Manage.init_collection('votes', 'dinamic-bl');
|
19
|
+
});
|
20
|
+
</script>
|
21
|
+
</div>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<div class="right-part">
|
25
|
+
<div class="filter-right">
|
26
|
+
<%= render :partial=>"manage/ballot_box/votes/model_filter" %>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
</div>
|
@@ -0,0 +1,112 @@
|
|
1
|
+
<%= content_for(:head) do %>
|
2
|
+
<!--[if lt IE 9]><%= javascript_include_tag "ballot_box/excanvas.min" %><![endif]-->
|
3
|
+
<%= javascript_include_tag "ballot_box/jquery.jqplot.min", "ballot_box/plugins/jqplot.json2.min" %>
|
4
|
+
<%= javascript_include_tag "ballot_box/plugins/jqplot.cursor.min", "ballot_box/plugins/jqplot.pieRenderer.min" %>
|
5
|
+
<%= javascript_include_tag "ballot_box/plugins/jqplot.highlighter.min", "ballot_box/plugins/jqplot.dateAxisRenderer.min" %>
|
6
|
+
<%= stylesheet_link_tag "/javascripts/ballot_box/jquery.jqplot.css" %>
|
7
|
+
<% end %>
|
8
|
+
|
9
|
+
<div class="edit-bl">
|
10
|
+
<div class="bot-bg">
|
11
|
+
<div id="voteable_title" class="block-title"><%= parent.title %></div>
|
12
|
+
|
13
|
+
<div class="edit-cont">
|
14
|
+
<%= link_to t('manage.sunrise.votes.view'), manage_ballot_box_votes_path(:"#{parent_type}_id" => parent.id) %>
|
15
|
+
|
16
|
+
<div id="chart_dates" style="height:400px;width:800px;"></div>
|
17
|
+
</div>
|
18
|
+
|
19
|
+
<div class="edit-cont">
|
20
|
+
<div id="chart_browsers" style="height:400px;width:800px;"></div>
|
21
|
+
</div>
|
22
|
+
|
23
|
+
<div class="edit-cont">
|
24
|
+
<div id="chart_platforms" style="height:400px;width:800px;"></div>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
|
29
|
+
<script type="text/javascript">
|
30
|
+
$(document).ready(function(){
|
31
|
+
var ajaxDataRenderer = function(url, plot, options) {
|
32
|
+
var ret = null;
|
33
|
+
$.ajax({
|
34
|
+
// have to use synchronous here, else the function
|
35
|
+
// will return before the data is fetched
|
36
|
+
async: false,
|
37
|
+
url: url,
|
38
|
+
dataType:"json",
|
39
|
+
success: function(data) {
|
40
|
+
ret = data;
|
41
|
+
}
|
42
|
+
});
|
43
|
+
return ret;
|
44
|
+
};
|
45
|
+
|
46
|
+
// The url for our json data
|
47
|
+
var dates_url = window.location.href.replace('/charts', '/dates');
|
48
|
+
|
49
|
+
var dates_plot = $.jqplot('chart_dates', dates_url, {
|
50
|
+
title: $('#voteable_title').text() + " dates",
|
51
|
+
dataRenderer: ajaxDataRenderer,
|
52
|
+
dataRendererOptions: {
|
53
|
+
unusedOptionalUrl: dates_url
|
54
|
+
},
|
55
|
+
|
56
|
+
axes:{
|
57
|
+
xaxis:{
|
58
|
+
renderer:$.jqplot.DateAxisRenderer,
|
59
|
+
tickOptions:{
|
60
|
+
formatString:'%b %#d'
|
61
|
+
}
|
62
|
+
}
|
63
|
+
},
|
64
|
+
highlighter: {
|
65
|
+
show: true,
|
66
|
+
sizeAdjust: 7.5
|
67
|
+
},
|
68
|
+
cursor: {
|
69
|
+
show: false
|
70
|
+
}
|
71
|
+
});
|
72
|
+
|
73
|
+
var browsers_url = window.location.href.replace('/charts', '/browsers');
|
74
|
+
var browsers_plot = $.jqplot('chart_browsers', browsers_url, {
|
75
|
+
title: $('#voteable_title').text() + " browsers",
|
76
|
+
dataRenderer: ajaxDataRenderer,
|
77
|
+
dataRendererOptions: {
|
78
|
+
unusedOptionalUrl: browsers_url
|
79
|
+
},
|
80
|
+
|
81
|
+
seriesDefaults: {
|
82
|
+
// Make this a pie chart.
|
83
|
+
renderer: $.jqplot.PieRenderer,
|
84
|
+
rendererOptions: {
|
85
|
+
// Put data labels on the pie slices.
|
86
|
+
// By default, labels show the percentage of the slice.
|
87
|
+
showDataLabels: true
|
88
|
+
}
|
89
|
+
},
|
90
|
+
|
91
|
+
legend: { show:true, location: 'e' }
|
92
|
+
});
|
93
|
+
|
94
|
+
var platforms_url = window.location.href.replace('/charts', '/platforms');
|
95
|
+
var platforms_plot = $.jqplot('chart_platforms', platforms_url, {
|
96
|
+
title: $('#voteable_title').text() + " platforms",
|
97
|
+
dataRenderer: ajaxDataRenderer,
|
98
|
+
dataRendererOptions: {
|
99
|
+
unusedOptionalUrl: platforms_url
|
100
|
+
},
|
101
|
+
|
102
|
+
seriesDefaults: {
|
103
|
+
renderer: $.jqplot.PieRenderer,
|
104
|
+
rendererOptions: {
|
105
|
+
showDataLabels: true
|
106
|
+
}
|
107
|
+
},
|
108
|
+
|
109
|
+
legend: { show:true, location: 'e' }
|
110
|
+
});
|
111
|
+
});
|
112
|
+
</script>
|
data/config/routes.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
|
3
|
+
module Sunrise
|
4
|
+
module Votes
|
5
|
+
class InstallGenerator < Rails::Generators::Base
|
6
|
+
|
7
|
+
source_root File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
|
8
|
+
|
9
|
+
desc "Copy javascript chart files"
|
10
|
+
|
11
|
+
def copy_javascripts
|
12
|
+
directory "javascripts/ballot_box", "public/javascripts/ballot_box"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
// Copyright 2006 Google Inc.
|
2
|
+
//
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
// you may not use this file except in compliance with the License.
|
5
|
+
// You may obtain a copy of the License at
|
6
|
+
//
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
//
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
// See the License for the specific language governing permissions and
|
13
|
+
// limitations under the License.
|
14
|
+
document.createElement("canvas").getContext||(function(){var s=Math,j=s.round,F=s.sin,G=s.cos,V=s.abs,W=s.sqrt,k=10,v=k/2;function X(){return this.context_||(this.context_=new H(this))}var L=Array.prototype.slice;function Y(b,a){var c=L.call(arguments,2);return function(){return b.apply(a,c.concat(L.call(arguments)))}}var M={init:function(b){if(/MSIE/.test(navigator.userAgent)&&!window.opera){var a=b||document;a.createElement("canvas");a.attachEvent("onreadystatechange",Y(this.init_,this,a))}},init_:function(b){b.namespaces.g_vml_||
|
15
|
+
b.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML");b.namespaces.g_o_||b.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML");if(!b.styleSheets.ex_canvas_){var a=b.createStyleSheet();a.owningElement.id="ex_canvas_";a.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}g_vml_\\:*{behavior:url(#default#VML)}g_o_\\:*{behavior:url(#default#VML)}"}var c=b.getElementsByTagName("canvas"),d=0;for(;d<c.length;d++)this.initElement(c[d])},
|
16
|
+
initElement:function(b){if(!b.getContext){b.getContext=X;b.innerHTML="";b.attachEvent("onpropertychange",Z);b.attachEvent("onresize",$);var a=b.attributes;if(a.width&&a.width.specified)b.style.width=a.width.nodeValue+"px";else b.width=b.clientWidth;if(a.height&&a.height.specified)b.style.height=a.height.nodeValue+"px";else b.height=b.clientHeight}return b}};function Z(b){var a=b.srcElement;switch(b.propertyName){case "width":a.style.width=a.attributes.width.nodeValue+"px";a.getContext().clearRect();
|
17
|
+
break;case "height":a.style.height=a.attributes.height.nodeValue+"px";a.getContext().clearRect();break}}function $(b){var a=b.srcElement;if(a.firstChild){a.firstChild.style.width=a.clientWidth+"px";a.firstChild.style.height=a.clientHeight+"px"}}M.init();var N=[],B=0;for(;B<16;B++){var C=0;for(;C<16;C++)N[B*16+C]=B.toString(16)+C.toString(16)}function I(){return[[1,0,0],[0,1,0],[0,0,1]]}function y(b,a){var c=I(),d=0;for(;d<3;d++){var f=0;for(;f<3;f++){var h=0,g=0;for(;g<3;g++)h+=b[d][g]*a[g][f];c[d][f]=
|
18
|
+
h}}return c}function O(b,a){a.fillStyle=b.fillStyle;a.lineCap=b.lineCap;a.lineJoin=b.lineJoin;a.lineWidth=b.lineWidth;a.miterLimit=b.miterLimit;a.shadowBlur=b.shadowBlur;a.shadowColor=b.shadowColor;a.shadowOffsetX=b.shadowOffsetX;a.shadowOffsetY=b.shadowOffsetY;a.strokeStyle=b.strokeStyle;a.globalAlpha=b.globalAlpha;a.arcScaleX_=b.arcScaleX_;a.arcScaleY_=b.arcScaleY_;a.lineScale_=b.lineScale_}function P(b){var a,c=1;b=String(b);if(b.substring(0,3)=="rgb"){var d=b.indexOf("(",3),f=b.indexOf(")",d+
|
19
|
+
1),h=b.substring(d+1,f).split(",");a="#";var g=0;for(;g<3;g++)a+=N[Number(h[g])];if(h.length==4&&b.substr(3,1)=="a")c=h[3]}else a=b;return{color:a,alpha:c}}function aa(b){switch(b){case "butt":return"flat";case "round":return"round";case "square":default:return"square"}}function H(b){this.m_=I();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.fillStyle=this.strokeStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=k*1;this.globalAlpha=1;this.canvas=b;
|
20
|
+
var a=b.ownerDocument.createElement("div");a.style.width=b.clientWidth+"px";a.style.height=b.clientHeight+"px";a.style.overflow="hidden";a.style.position="absolute";b.appendChild(a);this.element_=a;this.lineScale_=this.arcScaleY_=this.arcScaleX_=1}var i=H.prototype;i.clearRect=function(){this.element_.innerHTML=""};i.beginPath=function(){this.currentPath_=[]};i.moveTo=function(b,a){var c=this.getCoords_(b,a);this.currentPath_.push({type:"moveTo",x:c.x,y:c.y});this.currentX_=c.x;this.currentY_=c.y};
|
21
|
+
i.lineTo=function(b,a){var c=this.getCoords_(b,a);this.currentPath_.push({type:"lineTo",x:c.x,y:c.y});this.currentX_=c.x;this.currentY_=c.y};i.bezierCurveTo=function(b,a,c,d,f,h){var g=this.getCoords_(f,h),l=this.getCoords_(b,a),e=this.getCoords_(c,d);Q(this,l,e,g)};function Q(b,a,c,d){b.currentPath_.push({type:"bezierCurveTo",cp1x:a.x,cp1y:a.y,cp2x:c.x,cp2y:c.y,x:d.x,y:d.y});b.currentX_=d.x;b.currentY_=d.y}i.quadraticCurveTo=function(b,a,c,d){var f=this.getCoords_(b,a),h=this.getCoords_(c,d),g={x:this.currentX_+
|
22
|
+
0.6666666666666666*(f.x-this.currentX_),y:this.currentY_+0.6666666666666666*(f.y-this.currentY_)};Q(this,g,{x:g.x+(h.x-this.currentX_)/3,y:g.y+(h.y-this.currentY_)/3},h)};i.arc=function(b,a,c,d,f,h){c*=k;var g=h?"at":"wa",l=b+G(d)*c-v,e=a+F(d)*c-v,m=b+G(f)*c-v,r=a+F(f)*c-v;if(l==m&&!h)l+=0.125;var n=this.getCoords_(b,a),o=this.getCoords_(l,e),q=this.getCoords_(m,r);this.currentPath_.push({type:g,x:n.x,y:n.y,radius:c,xStart:o.x,yStart:o.y,xEnd:q.x,yEnd:q.y})};i.rect=function(b,a,c,d){this.moveTo(b,
|
23
|
+
a);this.lineTo(b+c,a);this.lineTo(b+c,a+d);this.lineTo(b,a+d);this.closePath()};i.strokeRect=function(b,a,c,d){var f=this.currentPath_;this.beginPath();this.moveTo(b,a);this.lineTo(b+c,a);this.lineTo(b+c,a+d);this.lineTo(b,a+d);this.closePath();this.stroke();this.currentPath_=f};i.fillRect=function(b,a,c,d){var f=this.currentPath_;this.beginPath();this.moveTo(b,a);this.lineTo(b+c,a);this.lineTo(b+c,a+d);this.lineTo(b,a+d);this.closePath();this.fill();this.currentPath_=f};i.createLinearGradient=function(b,
|
24
|
+
a,c,d){var f=new D("gradient");f.x0_=b;f.y0_=a;f.x1_=c;f.y1_=d;return f};i.createRadialGradient=function(b,a,c,d,f,h){var g=new D("gradientradial");g.x0_=b;g.y0_=a;g.r0_=c;g.x1_=d;g.y1_=f;g.r1_=h;return g};i.drawImage=function(b){var a,c,d,f,h,g,l,e,m=b.runtimeStyle.width,r=b.runtimeStyle.height;b.runtimeStyle.width="auto";b.runtimeStyle.height="auto";var n=b.width,o=b.height;b.runtimeStyle.width=m;b.runtimeStyle.height=r;if(arguments.length==3){a=arguments[1];c=arguments[2];h=g=0;l=d=n;e=f=o}else if(arguments.length==
|
25
|
+
5){a=arguments[1];c=arguments[2];d=arguments[3];f=arguments[4];h=g=0;l=n;e=o}else if(arguments.length==9){h=arguments[1];g=arguments[2];l=arguments[3];e=arguments[4];a=arguments[5];c=arguments[6];d=arguments[7];f=arguments[8]}else throw Error("Invalid number of arguments");var q=this.getCoords_(a,c),t=[];t.push(" <g_vml_:group",' coordsize="',k*10,",",k*10,'"',' coordorigin="0,0"',' style="width:',10,"px;height:",10,"px;position:absolute;");if(this.m_[0][0]!=1||this.m_[0][1]){var E=[];E.push("M11=",
|
26
|
+
this.m_[0][0],",","M12=",this.m_[1][0],",","M21=",this.m_[0][1],",","M22=",this.m_[1][1],",","Dx=",j(q.x/k),",","Dy=",j(q.y/k),"");var p=q,z=this.getCoords_(a+d,c),w=this.getCoords_(a,c+f),x=this.getCoords_(a+d,c+f);p.x=s.max(p.x,z.x,w.x,x.x);p.y=s.max(p.y,z.y,w.y,x.y);t.push("padding:0 ",j(p.x/k),"px ",j(p.y/k),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",E.join(""),", sizingmethod='clip');")}else t.push("top:",j(q.y/k),"px;left:",j(q.x/k),"px;");t.push(' ">','<g_vml_:image src="',b.src,
|
27
|
+
'"',' style="width:',k*d,"px;"," height:",k*f,'px;"',' cropleft="',h/n,'"',' croptop="',g/o,'"',' cropright="',(n-h-l)/n,'"',' cropbottom="',(o-g-e)/o,'"'," />","</g_vml_:group>");this.element_.insertAdjacentHTML("BeforeEnd",t.join(""))};i.stroke=function(b){var a=[],c=P(b?this.fillStyle:this.strokeStyle),d=c.color,f=c.alpha*this.globalAlpha;a.push("<g_vml_:shape",' filled="',!!b,'"',' style="position:absolute;width:',10,"px;height:",10,'px;"',' coordorigin="0 0" coordsize="',k*10," ",k*10,'"',' stroked="',
|
28
|
+
!b,'"',' path="');var h={x:null,y:null},g={x:null,y:null},l=0;for(;l<this.currentPath_.length;l++){var e=this.currentPath_[l];switch(e.type){case "moveTo":a.push(" m ",j(e.x),",",j(e.y));break;case "lineTo":a.push(" l ",j(e.x),",",j(e.y));break;case "close":a.push(" x ");e=null;break;case "bezierCurveTo":a.push(" c ",j(e.cp1x),",",j(e.cp1y),",",j(e.cp2x),",",j(e.cp2y),",",j(e.x),",",j(e.y));break;case "at":case "wa":a.push(" ",e.type," ",j(e.x-this.arcScaleX_*e.radius),",",j(e.y-this.arcScaleY_*e.radius),
|
29
|
+
" ",j(e.x+this.arcScaleX_*e.radius),",",j(e.y+this.arcScaleY_*e.radius)," ",j(e.xStart),",",j(e.yStart)," ",j(e.xEnd),",",j(e.yEnd));break}if(e){if(h.x==null||e.x<h.x)h.x=e.x;if(g.x==null||e.x>g.x)g.x=e.x;if(h.y==null||e.y<h.y)h.y=e.y;if(g.y==null||e.y>g.y)g.y=e.y}}a.push(' ">');if(b)if(typeof this.fillStyle=="object"){var m=this.fillStyle,r=0,n={x:0,y:0},o=0,q=1;if(m.type_=="gradient"){var t=m.x1_/this.arcScaleX_,E=m.y1_/this.arcScaleY_,p=this.getCoords_(m.x0_/this.arcScaleX_,m.y0_/this.arcScaleY_),
|
30
|
+
z=this.getCoords_(t,E);r=Math.atan2(z.x-p.x,z.y-p.y)*180/Math.PI;if(r<0)r+=360;if(r<1.0E-6)r=0}else{var p=this.getCoords_(m.x0_,m.y0_),w=g.x-h.x,x=g.y-h.y;n={x:(p.x-h.x)/w,y:(p.y-h.y)/x};w/=this.arcScaleX_*k;x/=this.arcScaleY_*k;var R=s.max(w,x);o=2*m.r0_/R;q=2*m.r1_/R-o}var u=m.colors_;u.sort(function(ba,ca){return ba.offset-ca.offset});var J=u.length,da=u[0].color,ea=u[J-1].color,fa=u[0].alpha*this.globalAlpha,ga=u[J-1].alpha*this.globalAlpha,S=[],l=0;for(;l<J;l++){var T=u[l];S.push(T.offset*q+
|
31
|
+
o+" "+T.color)}a.push('<g_vml_:fill type="',m.type_,'"',' method="none" focus="100%"',' color="',da,'"',' color2="',ea,'"',' colors="',S.join(","),'"',' opacity="',ga,'"',' g_o_:opacity2="',fa,'"',' angle="',r,'"',' focusposition="',n.x,",",n.y,'" />')}else a.push('<g_vml_:fill color="',d,'" opacity="',f,'" />');else{var K=this.lineScale_*this.lineWidth;if(K<1)f*=K;a.push("<g_vml_:stroke",' opacity="',f,'"',' joinstyle="',this.lineJoin,'"',' miterlimit="',this.miterLimit,'"',' endcap="',aa(this.lineCap),
|
32
|
+
'"',' weight="',K,'px"',' color="',d,'" />')}a.push("</g_vml_:shape>");this.element_.insertAdjacentHTML("beforeEnd",a.join(""))};i.fill=function(){this.stroke(true)};i.closePath=function(){this.currentPath_.push({type:"close"})};i.getCoords_=function(b,a){var c=this.m_;return{x:k*(b*c[0][0]+a*c[1][0]+c[2][0])-v,y:k*(b*c[0][1]+a*c[1][1]+c[2][1])-v}};i.save=function(){var b={};O(this,b);this.aStack_.push(b);this.mStack_.push(this.m_);this.m_=y(I(),this.m_)};i.restore=function(){O(this.aStack_.pop(),
|
33
|
+
this);this.m_=this.mStack_.pop()};function ha(b){var a=0;for(;a<3;a++){var c=0;for(;c<2;c++)if(!isFinite(b[a][c])||isNaN(b[a][c]))return false}return true}function A(b,a,c){if(!!ha(a)){b.m_=a;if(c)b.lineScale_=W(V(a[0][0]*a[1][1]-a[0][1]*a[1][0]))}}i.translate=function(b,a){A(this,y([[1,0,0],[0,1,0],[b,a,1]],this.m_),false)};i.rotate=function(b){var a=G(b),c=F(b);A(this,y([[a,c,0],[-c,a,0],[0,0,1]],this.m_),false)};i.scale=function(b,a){this.arcScaleX_*=b;this.arcScaleY_*=a;A(this,y([[b,0,0],[0,a,
|
34
|
+
0],[0,0,1]],this.m_),true)};i.transform=function(b,a,c,d,f,h){A(this,y([[b,a,0],[c,d,0],[f,h,1]],this.m_),true)};i.setTransform=function(b,a,c,d,f,h){A(this,[[b,a,0],[c,d,0],[f,h,1]],true)};i.clip=function(){};i.arcTo=function(){};i.createPattern=function(){return new U};function D(b){this.type_=b;this.r1_=this.y1_=this.x1_=this.r0_=this.y0_=this.x0_=0;this.colors_=[]}D.prototype.addColorStop=function(b,a){a=P(a);this.colors_.push({offset:b,color:a.color,alpha:a.alpha})};function U(){}G_vmlCanvasManager=
|
35
|
+
M;CanvasRenderingContext2D=H;CanvasGradient=D;CanvasPattern=U})();
|
@@ -0,0 +1,226 @@
|
|
1
|
+
/*rules for the plot target div. These will be cascaded down to all plot elements according to css rules*/
|
2
|
+
.jqplot-target {
|
3
|
+
position: relative;
|
4
|
+
color: #666666;
|
5
|
+
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
|
6
|
+
font-size: 1em;
|
7
|
+
/* height: 300px;
|
8
|
+
width: 400px;*/
|
9
|
+
}
|
10
|
+
|
11
|
+
/*rules applied to all axes*/
|
12
|
+
.jqplot-axis {
|
13
|
+
font-size: 0.75em;
|
14
|
+
}
|
15
|
+
|
16
|
+
.jqplot-xaxis {
|
17
|
+
margin-top: 10px;
|
18
|
+
}
|
19
|
+
|
20
|
+
.jqplot-x2axis {
|
21
|
+
margin-bottom: 10px;
|
22
|
+
}
|
23
|
+
|
24
|
+
.jqplot-yaxis {
|
25
|
+
margin-right: 10px;
|
26
|
+
}
|
27
|
+
|
28
|
+
.jqplot-y2axis, .jqplot-y3axis, .jqplot-y4axis, .jqplot-y5axis, .jqplot-y6axis, .jqplot-y7axis, .jqplot-y8axis, .jqplot-y9axis {
|
29
|
+
margin-left: 10px;
|
30
|
+
margin-right: 10px;
|
31
|
+
}
|
32
|
+
|
33
|
+
/*rules applied to all axis tick divs*/
|
34
|
+
.jqplot-axis-tick, .jqplot-xaxis-tick, .jqplot-yaxis-tick, .jqplot-x2axis-tick, .jqplot-y2axis-tick, .jqplot-y3axis-tick, .jqplot-y4axis-tick, .jqplot-y5axis-tick, .jqplot-y6axis-tick, .jqplot-y7axis-tick, .jqplot-y8axis-tick, .jqplot-y9axis-tick {
|
35
|
+
position: absolute;
|
36
|
+
}
|
37
|
+
|
38
|
+
|
39
|
+
.jqplot-xaxis-tick {
|
40
|
+
top: 0px;
|
41
|
+
/* initial position untill tick is drawn in proper place */
|
42
|
+
left: 15px;
|
43
|
+
/* padding-top: 10px;*/
|
44
|
+
vertical-align: top;
|
45
|
+
}
|
46
|
+
|
47
|
+
.jqplot-x2axis-tick {
|
48
|
+
bottom: 0px;
|
49
|
+
/* initial position untill tick is drawn in proper place */
|
50
|
+
left: 15px;
|
51
|
+
/* padding-bottom: 10px;*/
|
52
|
+
vertical-align: bottom;
|
53
|
+
}
|
54
|
+
|
55
|
+
.jqplot-yaxis-tick {
|
56
|
+
right: 0px;
|
57
|
+
/* initial position untill tick is drawn in proper place */
|
58
|
+
top: 15px;
|
59
|
+
/* padding-right: 10px;*/
|
60
|
+
text-align: right;
|
61
|
+
}
|
62
|
+
|
63
|
+
.jqplot-yaxis-tick.jqplot-breakTick {
|
64
|
+
right: -20px;
|
65
|
+
margin-right: 0px;
|
66
|
+
padding:1px 5px 1px 5px;
|
67
|
+
/* background-color: white;*/
|
68
|
+
z-index: 2;
|
69
|
+
font-size: 1.5em;
|
70
|
+
}
|
71
|
+
|
72
|
+
.jqplot-y2axis-tick, .jqplot-y3axis-tick, .jqplot-y4axis-tick, .jqplot-y5axis-tick, .jqplot-y6axis-tick, .jqplot-y7axis-tick, .jqplot-y8axis-tick, .jqplot-y9axis-tick {
|
73
|
+
left: 0px;
|
74
|
+
/* initial position untill tick is drawn in proper place */
|
75
|
+
top: 15px;
|
76
|
+
/* padding-left: 10px;*/
|
77
|
+
/* padding-right: 15px;*/
|
78
|
+
text-align: left;
|
79
|
+
}
|
80
|
+
|
81
|
+
.jqplot-meterGauge-tick {
|
82
|
+
font-size: 0.75em;
|
83
|
+
color: #999999;
|
84
|
+
}
|
85
|
+
|
86
|
+
.jqplot-meterGauge-label {
|
87
|
+
font-size: 1em;
|
88
|
+
color: #999999;
|
89
|
+
}
|
90
|
+
.jqplot-xaxis-label {
|
91
|
+
margin-top: 10px;
|
92
|
+
font-size: 11pt;
|
93
|
+
position: absolute;
|
94
|
+
}
|
95
|
+
|
96
|
+
.jqplot-x2axis-label {
|
97
|
+
margin-bottom: 10px;
|
98
|
+
font-size: 11pt;
|
99
|
+
position: absolute;
|
100
|
+
}
|
101
|
+
|
102
|
+
.jqplot-yaxis-label {
|
103
|
+
margin-right: 10px;
|
104
|
+
/* text-align: center;*/
|
105
|
+
font-size: 11pt;
|
106
|
+
position: absolute;
|
107
|
+
}
|
108
|
+
|
109
|
+
.jqplot-y2axis-label, .jqplot-y3axis-label, .jqplot-y4axis-label, .jqplot-y5axis-label, .jqplot-y6axis-label, .jqplot-y7axis-label, .jqplot-y8axis-label, .jqplot-y9axis-label {
|
110
|
+
/* text-align: center;*/
|
111
|
+
font-size: 11pt;
|
112
|
+
position: absolute;
|
113
|
+
}
|
114
|
+
|
115
|
+
table.jqplot-table-legend {
|
116
|
+
margin-top: 12px;
|
117
|
+
margin-bottom: 12px;
|
118
|
+
margin-left: 12px;
|
119
|
+
margin-right: 12px;
|
120
|
+
}
|
121
|
+
|
122
|
+
table.jqplot-table-legend, table.jqplot-cursor-legend {
|
123
|
+
background-color: rgba(255,255,255,0.6);
|
124
|
+
border: 1px solid #cccccc;
|
125
|
+
position: absolute;
|
126
|
+
font-size: 0.75em;
|
127
|
+
}
|
128
|
+
|
129
|
+
td.jqplot-table-legend {
|
130
|
+
vertical-align:middle;
|
131
|
+
}
|
132
|
+
|
133
|
+
td.jqplot-seriesToggle:hover, td.jqplot-seriesToggle:active {
|
134
|
+
cursor: pointer;
|
135
|
+
}
|
136
|
+
|
137
|
+
td.jqplot-table-legend > div {
|
138
|
+
border: 1px solid #cccccc;
|
139
|
+
padding:1px;
|
140
|
+
}
|
141
|
+
|
142
|
+
div.jqplot-table-legend-swatch {
|
143
|
+
width:0px;
|
144
|
+
height:0px;
|
145
|
+
border-top-width: 5px;
|
146
|
+
border-bottom-width: 5px;
|
147
|
+
border-left-width: 6px;
|
148
|
+
border-right-width: 6px;
|
149
|
+
border-top-style: solid;
|
150
|
+
border-bottom-style: solid;
|
151
|
+
border-left-style: solid;
|
152
|
+
border-right-style: solid;
|
153
|
+
}
|
154
|
+
|
155
|
+
.jqplot-title {
|
156
|
+
top: 0px;
|
157
|
+
left: 0px;
|
158
|
+
padding-bottom: 0.5em;
|
159
|
+
font-size: 1.2em;
|
160
|
+
}
|
161
|
+
|
162
|
+
table.jqplot-cursor-tooltip {
|
163
|
+
border: 1px solid #cccccc;
|
164
|
+
font-size: 0.75em;
|
165
|
+
}
|
166
|
+
|
167
|
+
|
168
|
+
.jqplot-cursor-tooltip {
|
169
|
+
border: 1px solid #cccccc;
|
170
|
+
font-size: 0.75em;
|
171
|
+
white-space: nowrap;
|
172
|
+
background: rgba(208,208,208,0.5);
|
173
|
+
padding: 1px;
|
174
|
+
}
|
175
|
+
|
176
|
+
.jqplot-highlighter-tooltip {
|
177
|
+
border: 1px solid #cccccc;
|
178
|
+
font-size: 0.75em;
|
179
|
+
white-space: nowrap;
|
180
|
+
background: rgba(208,208,208,0.5);
|
181
|
+
padding: 1px;
|
182
|
+
}
|
183
|
+
|
184
|
+
.jqplot-point-label {
|
185
|
+
font-size: 0.75em;
|
186
|
+
z-index: 2;
|
187
|
+
}
|
188
|
+
|
189
|
+
td.jqplot-cursor-legend-swatch {
|
190
|
+
vertical-align:middle;
|
191
|
+
text-align:center;
|
192
|
+
}
|
193
|
+
|
194
|
+
div.jqplot-cursor-legend-swatch {
|
195
|
+
width:1.2em;
|
196
|
+
height:0.7em;
|
197
|
+
}
|
198
|
+
|
199
|
+
.jqplot-error {
|
200
|
+
/* Styles added to the plot target container when there is an error go here.*/
|
201
|
+
text-align: center;
|
202
|
+
}
|
203
|
+
|
204
|
+
.jqplot-error-message {
|
205
|
+
/* Styling of the custom error message div goes here.*/
|
206
|
+
position: relative;
|
207
|
+
top: 46%;
|
208
|
+
display: inline-block;
|
209
|
+
}
|
210
|
+
|
211
|
+
div.jqplot-bubble-label {
|
212
|
+
font-size: 0.8em;
|
213
|
+
/* background: rgba(90%, 90%, 90%, 0.15);*/
|
214
|
+
padding-left: 2px;
|
215
|
+
padding-right: 2px;
|
216
|
+
color: rgb(20%, 20%, 20%);
|
217
|
+
}
|
218
|
+
|
219
|
+
div.jqplot-bubble-label.jqplot-bubble-label-highlight {
|
220
|
+
background: rgba(90%, 90%, 90%, 0.7);
|
221
|
+
}
|
222
|
+
|
223
|
+
div.jqplot-noData-container {
|
224
|
+
text-align: center;
|
225
|
+
background-color: rgba(96%, 96%, 96%, 0.3);
|
226
|
+
}
|