acts_as_dashboard 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +1 -0
- data/README.rdoc +3 -3
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/acts_as_dashboard.gemspec +21 -4
- data/generators/dashboard/dashboard_generator.rb +15 -8
- data/generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-anim_basic_16x16.gif +0 -0
- data/generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_flat_30_cccccc_40x100.png +0 -0
- data/generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_flat_50_5c5c5c_40x100.png +0 -0
- data/generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_glass_20_555555_1x400.png +0 -0
- data/generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_glass_40_0078a3_1x400.png +0 -0
- data/generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_glass_40_ffc73d_1x400.png +0 -0
- data/generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_gloss-wave_25_333333_500x100.png +0 -0
- data/generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_highlight-soft_80_eeeeee_1x100.png +0 -0
- data/generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_inset-soft_25_000000_1x100.png +0 -0
- data/generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_inset-soft_30_f58400_1x100.png +0 -0
- data/generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-icons_222222_256x240.png +0 -0
- data/generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-icons_4b8e0b_256x240.png +0 -0
- data/generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-icons_a83300_256x240.png +0 -0
- data/generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-icons_cccccc_256x240.png +0 -0
- data/generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-icons_ffffff_256x240.png +0 -0
- data/generators/dashboard/templates/jquery-ui/css/ui-darkness/jquery-ui-1.8.2.custom.css +489 -0
- data/generators/dashboard/templates/jquery-ui/js/jquery-1.4.2.min.js +154 -0
- data/generators/dashboard/templates/jquery-ui/js/jquery-ui-1.8.2.custom.min.js +1012 -0
- data/lib/acts_as_dashboard/app/views/dashboards/show.html.erb +11 -8
- data/lib/acts_as_dashboard/class_methods.rb +23 -17
- data/lib/acts_as_dashboard/public/javascripts/dashboard.js +0 -1
- data/lib/acts_as_dashboard/public/stylesheets/dashboard.css +27 -7
- metadata +21 -4
- data/.document +0 -5
@@ -8,11 +8,13 @@
|
|
8
8
|
</style>
|
9
9
|
|
10
10
|
<%= javascript_include_tag 'http://code.jquery.com/jquery-1.4.2.min.js' %>
|
11
|
+
<%= javascript_include_tag 'jquery-ui/js/jquery-ui-1.8.2.custom.min.js' %>
|
11
12
|
<%= javascript_include_tag 'http://plugins.jquery.com/files/jquery.timers-1.2.js.txt' %>
|
12
13
|
<%= javascript_include_tag 'js.class-2.1.4/min/core.js' %>
|
13
14
|
<%= javascript_include_tag 'jqplot-0.9.7/jquery.jqplot.min.js' %>
|
14
15
|
<%= javascript_include_tag 'dashboard' %>
|
15
16
|
|
17
|
+
<%= stylesheet_link_tag 'jquery-ui/css/ui-darkness/jquery-ui-1.8.2.custom.css' %>
|
16
18
|
<%= stylesheet_link_tag 'dashboard' %>
|
17
19
|
<%= stylesheet_link_tag 'jquery.jqplot.min.css' %>
|
18
20
|
|
@@ -33,20 +35,20 @@
|
|
33
35
|
<body>
|
34
36
|
<div id='dashboard'>
|
35
37
|
<div class='dashboard-numbers'>
|
36
|
-
<div class='widget-template' style='display: none;'>
|
37
|
-
<div class="widget-title"></div>
|
38
|
-
<div class="widget-data"></div>
|
38
|
+
<div class='ui-widget widget-template' style='display: none;'>
|
39
|
+
<div class="ui-widget-header ui-corner-tl ui-corner-tr widget-title"></div>
|
40
|
+
<div class="ui-widget-content ui-corner-bl ui-corner-br widget-data"></div>
|
39
41
|
</div>
|
40
42
|
</div>
|
41
43
|
|
42
44
|
<div class='dashboard-clear'></div>
|
43
45
|
|
44
46
|
<div class='dashboard-short-messages'>
|
45
|
-
<div class='widget-template' style='display: none;'>
|
46
|
-
<div class="widget-title"></div>
|
47
|
+
<div class='ui-widget widget-template' style='display: none;'>
|
48
|
+
<div class="ui-widget-header ui-corner-all widget-title"></div>
|
47
49
|
<div class="widget-data">
|
48
50
|
<ul>
|
49
|
-
<li class='widget-data-template' style='display: none;'></li>
|
51
|
+
<li class='ui-widget-content ui-corner-all widget-data widget-data-template' style='display: none;'></li>
|
50
52
|
</ul>
|
51
53
|
</div>
|
52
54
|
</div>
|
@@ -55,8 +57,9 @@
|
|
55
57
|
<div class='dashboard-clear'></div>
|
56
58
|
|
57
59
|
<div class='dashboard-line-graphs'>
|
58
|
-
<div class='widget-template' style='display: none;'>
|
59
|
-
<div class='widget-
|
60
|
+
<div class='ui-widget widget-template' style='display: none;'>
|
61
|
+
<div class='ui-widget-header ui-corner-tl ui-corner-tr widget-title'></div>
|
62
|
+
<div class='ui-widget-content ui-corner-bl ui-corner-br widget-data'></div>
|
60
63
|
</div>
|
61
64
|
</div>
|
62
65
|
|
@@ -9,23 +9,29 @@ module ActsAsDashboard
|
|
9
9
|
|
10
10
|
controller_name = self.to_s.underscore.sub('_controller', '').singularize
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
12
|
+
# # This is commented out because having it here doesn't actually work. I believe this
|
13
|
+
# # is because calls to #acts_as_dashboard within controllers aren't invoked until one
|
14
|
+
# # of the controller's actions is called. However, it's impossible to call one of the
|
15
|
+
# # actions of an acts_as_dashboard-enabled controller because there aren't any routes
|
16
|
+
# # yet! It's a catch-22. Argh.
|
17
|
+
#
|
18
|
+
# # Create the route for the "show" action. This will be something like:
|
19
|
+
# # /dashboard
|
20
|
+
# ActionController::Routing::Routes.add_named_route(
|
21
|
+
# 'dashboard',
|
22
|
+
# controller_name,
|
23
|
+
# :controller => controller_name.pluralize.to_sym,
|
24
|
+
# :action => :show
|
25
|
+
# )
|
26
|
+
#
|
27
|
+
# # Create the route for the "widget_data" action. This will be something like:
|
28
|
+
# # /dashboard/widgets/*
|
29
|
+
# ActionController::Routing::Routes.add_named_route(
|
30
|
+
# "#{controller_name}_widgets",
|
31
|
+
# "#{controller_name}/widgets/*path",
|
32
|
+
# :controller => controller_name.pluralize.to_sym,
|
33
|
+
# :action => :widget_data
|
34
|
+
# )
|
29
35
|
end
|
30
36
|
|
31
37
|
def dashboard_number(&block)
|
@@ -17,16 +17,22 @@ body {
|
|
17
17
|
}
|
18
18
|
#dashboard .dashboard-numbers .number-widget {
|
19
19
|
float: left;
|
20
|
-
padding: 0.5em;
|
21
20
|
margin: 1em;
|
22
21
|
text-align: center;
|
23
22
|
}
|
24
23
|
#dashboard .dashboard-numbers .number-widget .widget-title {
|
25
|
-
|
26
|
-
|
24
|
+
padding: 0.25em;
|
25
|
+
border-top: 1px solid #666666;
|
26
|
+
border-bottom: none;
|
27
|
+
border-left: 1px solid #666666;
|
28
|
+
border-right: 1px solid #666666;
|
27
29
|
}
|
28
30
|
#dashboard .dashboard-numbers .number-widget .widget-data {
|
29
|
-
font-size:
|
31
|
+
font-size: 4em;
|
32
|
+
border-top: none;
|
33
|
+
border-bottom: 1px solid #666666;
|
34
|
+
border-left: 1px solid #666666;
|
35
|
+
border-right: 1px solid #666666;
|
30
36
|
}
|
31
37
|
|
32
38
|
/* dashboard-short-message is not complete */
|
@@ -37,7 +43,6 @@ body {
|
|
37
43
|
margin: 1em;
|
38
44
|
}
|
39
45
|
#dashboard .dashboard-short-messages .short-messages-widget .widget-title {
|
40
|
-
border: 2px solid white;
|
41
46
|
padding: 0.5em;
|
42
47
|
text-align: center;
|
43
48
|
font-weight: bold;
|
@@ -51,9 +56,8 @@ body {
|
|
51
56
|
padding: 0;
|
52
57
|
}
|
53
58
|
#dashboard .dashboard-short-messages .short-messages-widget .widget-data li {
|
54
|
-
border: 1px solid white;
|
55
59
|
margin-top: 4px;
|
56
|
-
padding: 0.
|
60
|
+
padding: 0.25em;
|
57
61
|
list-style-type: none;
|
58
62
|
font-size: 0.8em;
|
59
63
|
}
|
@@ -64,3 +68,19 @@ body {
|
|
64
68
|
float: left;
|
65
69
|
margin: 1em;
|
66
70
|
}
|
71
|
+
#dashboard .dashboard-line-graphs .line-graph-widget .widget-title {
|
72
|
+
text-align: center;
|
73
|
+
border-top: 1px solid #666666;
|
74
|
+
border-bottom: none;
|
75
|
+
border-left: 1px solid #666666;
|
76
|
+
border-right: 1px solid #666666;
|
77
|
+
}
|
78
|
+
#dashboard .dashboard-line-graphs .line-graph-widget .widget-data {
|
79
|
+
xborder: none;
|
80
|
+
border-top: none;
|
81
|
+
border-bottom: 1px solid #666666;
|
82
|
+
border-left: 1px solid #666666;
|
83
|
+
border-right: 1px solid #666666;
|
84
|
+
padding-right: 1.5em;
|
85
|
+
}
|
86
|
+
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
7
|
+
- 3
|
8
8
|
- 0
|
9
|
-
version: 0.
|
9
|
+
version: 0.3.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Nick Hoffman
|
@@ -45,7 +45,7 @@ dependencies:
|
|
45
45
|
version: 1.3.2
|
46
46
|
type: :development
|
47
47
|
version_requirements: *id002
|
48
|
-
description:
|
48
|
+
description: acts_as_dashboard makes it easy to create dashboards in Rails apps. Very little configuration is required. Read the docs to get started.
|
49
49
|
email: nick@deadorange.com
|
50
50
|
executables: []
|
51
51
|
|
@@ -55,7 +55,6 @@ extra_rdoc_files:
|
|
55
55
|
- LICENSE
|
56
56
|
- README.rdoc
|
57
57
|
files:
|
58
|
-
- .document
|
59
58
|
- .gitignore
|
60
59
|
- LICENSE
|
61
60
|
- README.rdoc
|
@@ -101,6 +100,24 @@ files:
|
|
101
100
|
- generators/dashboard/templates/jqplot-0.9.7/plugins/jqplot.pointLabels.min.js
|
102
101
|
- generators/dashboard/templates/jqplot-0.9.7/plugins/jqplot.trendline.js
|
103
102
|
- generators/dashboard/templates/jqplot-0.9.7/plugins/jqplot.trendline.min.js
|
103
|
+
- generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-anim_basic_16x16.gif
|
104
|
+
- generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_flat_30_cccccc_40x100.png
|
105
|
+
- generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_flat_50_5c5c5c_40x100.png
|
106
|
+
- generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_glass_20_555555_1x400.png
|
107
|
+
- generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_glass_40_0078a3_1x400.png
|
108
|
+
- generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_glass_40_ffc73d_1x400.png
|
109
|
+
- generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_gloss-wave_25_333333_500x100.png
|
110
|
+
- generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_highlight-soft_80_eeeeee_1x100.png
|
111
|
+
- generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_inset-soft_25_000000_1x100.png
|
112
|
+
- generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_inset-soft_30_f58400_1x100.png
|
113
|
+
- generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-icons_222222_256x240.png
|
114
|
+
- generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-icons_4b8e0b_256x240.png
|
115
|
+
- generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-icons_a83300_256x240.png
|
116
|
+
- generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-icons_cccccc_256x240.png
|
117
|
+
- generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-icons_ffffff_256x240.png
|
118
|
+
- generators/dashboard/templates/jquery-ui/css/ui-darkness/jquery-ui-1.8.2.custom.css
|
119
|
+
- generators/dashboard/templates/jquery-ui/js/jquery-1.4.2.min.js
|
120
|
+
- generators/dashboard/templates/jquery-ui/js/jquery-ui-1.8.2.custom.min.js
|
104
121
|
- generators/dashboard/templates/jquery.jqplot.min.css
|
105
122
|
- generators/dashboard/templates/js.class-2.1.4/CHANGELOG
|
106
123
|
- generators/dashboard/templates/js.class-2.1.4/MIT-LICENSE
|