acts_as_monitor 0.0.9 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/app/helpers/acts_as_monitor_helper.rb +1 -1
- data/lib/acts_as_monitor/engine.rb +1 -1
- data/lib/acts_as_monitor/version.rb +1 -1
- metadata +18 -141
- data/.gitignore +0 -18
- data/acts_as_monitor.gemspec +0 -22
- data/test/acts_as_monitor_helper_test.rb +0 -16
- data/test/acts_as_monitor_test.rb +0 -35
- data/test/database.yml +0 -3
- data/test/dummy/Rakefile +0 -7
- data/test/dummy/app/controllers/application_controller.rb +0 -3
- data/test/dummy/app/controllers/homes_controller.rb +0 -4
- data/test/dummy/app/helpers/application_helper.rb +0 -2
- data/test/dummy/app/helpers/homes_helper.rb +0 -2
- data/test/dummy/app/models/test_class.rb +0 -33
- data/test/dummy/app/models/test_class_no_monitor.rb +0 -2
- data/test/dummy/app/views/homes/index.html.erb +0 -8
- data/test/dummy/app/views/layouts/application.html.erb +0 -14
- data/test/dummy/config/application.rb +0 -45
- data/test/dummy/config/boot.rb +0 -10
- data/test/dummy/config/database.yml +0 -22
- data/test/dummy/config/environment.rb +0 -5
- data/test/dummy/config/environments/development.rb +0 -26
- data/test/dummy/config/environments/production.rb +0 -49
- data/test/dummy/config/environments/test.rb +0 -35
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/test/dummy/config/initializers/inflections.rb +0 -10
- data/test/dummy/config/initializers/mime_types.rb +0 -5
- data/test/dummy/config/initializers/secret_token.rb +0 -7
- data/test/dummy/config/initializers/session_store.rb +0 -8
- data/test/dummy/config/locales/acts_as_monitor.it.yml +0 -14
- data/test/dummy/config/locales/en.yml +0 -5
- data/test/dummy/config/routes.rb +0 -58
- data/test/dummy/config.ru +0 -4
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20120523110000_add_test_tables.rb +0 -12
- data/test/dummy/db/schema.rb +0 -19
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +0 -4537
- data/test/dummy/log/production.log +0 -0
- data/test/dummy/log/server.log +0 -0
- data/test/dummy/log/test.log +0 -188
- data/test/dummy/public/404.html +0 -26
- data/test/dummy/public/422.html +0 -26
- data/test/dummy/public/500.html +0 -26
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/public/images/acts_as_monitor_green.png +0 -0
- data/test/dummy/public/images/acts_as_monitor_red.png +0 -0
- data/test/dummy/public/images/acts_as_monitor_yellow.png +0 -0
- data/test/dummy/public/javascripts/acts_as_monitor_javascript.js +0 -66
- data/test/dummy/public/javascripts/application.js +0 -2
- data/test/dummy/public/javascripts/builder.js +0 -136
- data/test/dummy/public/javascripts/controls.js +0 -965
- data/test/dummy/public/javascripts/dragdrop.js +0 -974
- data/test/dummy/public/javascripts/effects.js +0 -1123
- data/test/dummy/public/javascripts/prototype.js +0 -6001
- data/test/dummy/public/javascripts/rails.js +0 -191
- data/test/dummy/public/javascripts/scriptaculous.js +0 -68
- data/test/dummy/public/javascripts/slider.js +0 -275
- data/test/dummy/public/javascripts/sound.js +0 -59
- data/test/dummy/public/javascripts/unittest.js +0 -568
- data/test/dummy/public/stylesheets/.gitkeep +0 -0
- data/test/dummy/public/stylesheets/acts_as_monitor.css +0 -30
- data/test/dummy/script/rails +0 -6
- data/test/integration/navigation_test.rb +0 -7
- data/test/support/integration_case.rb +0 -5
- data/test/test_helper.rb +0 -22
File without changes
|
data/test/dummy/log/server.log
DELETED
File without changes
|
data/test/dummy/log/test.log
DELETED
@@ -1,188 +0,0 @@
|
|
1
|
-
[1m[36mSQL (0.9ms)[0m [1m SELECT name
|
2
|
-
FROM sqlite_master
|
3
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
4
|
-
[0m
|
5
|
-
[1m[35mSQL (0.1ms)[0m select sqlite_version(*)
|
6
|
-
[1m[36mSQL (19.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
7
|
-
[1m[35mSQL (0.1ms)[0m PRAGMA index_list("schema_migrations")
|
8
|
-
[1m[36mSQL (1.7ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
9
|
-
[1m[35mSQL (0.1ms)[0m SELECT name
|
10
|
-
FROM sqlite_master
|
11
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
12
|
-
[1m[36mSQL (1.2ms)[0m [1m SELECT name
|
13
|
-
FROM sqlite_master
|
14
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
15
|
-
[0m
|
16
|
-
[1m[36mSQL (1.0ms)[0m [1m SELECT name
|
17
|
-
FROM sqlite_master
|
18
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
19
|
-
[0m
|
20
|
-
[1m[35mSQL (0.2ms)[0m SELECT name
|
21
|
-
FROM sqlite_master
|
22
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
23
|
-
[1m[36mSQL (1.1ms)[0m [1m SELECT name
|
24
|
-
FROM sqlite_master
|
25
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
26
|
-
[0m
|
27
|
-
[1m[35mSQL (0.1ms)[0m SELECT name
|
28
|
-
FROM sqlite_master
|
29
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
30
|
-
[1m[36mSQL (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations"[0m
|
31
|
-
Migrating to AddTestTables (20120523110000)
|
32
|
-
[1m[35mSQL (0.1ms)[0m select sqlite_version(*)
|
33
|
-
[1m[36mSQL (0.2ms)[0m [1m SELECT name
|
34
|
-
FROM sqlite_master
|
35
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
36
|
-
[0m
|
37
|
-
[1m[35mSQL (0.8ms)[0m CREATE TABLE "test_classes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
38
|
-
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20120523110000')[0m
|
39
|
-
[1m[35mSQL (0.3ms)[0m SELECT name
|
40
|
-
FROM sqlite_master
|
41
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
42
|
-
[1m[36mSQL (1.1ms)[0m [1m SELECT name
|
43
|
-
FROM sqlite_master
|
44
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
45
|
-
[0m
|
46
|
-
[1m[35mSQL (0.2ms)[0m SELECT name
|
47
|
-
FROM sqlite_master
|
48
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
49
|
-
[1m[36mSQL (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations"[0m
|
50
|
-
Migrating to AddTestTables (20120523110000)
|
51
|
-
[1m[35mSQL (0.3ms)[0m SELECT name
|
52
|
-
FROM sqlite_master
|
53
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
54
|
-
[1m[36mSQL (1.1ms)[0m [1m SELECT name
|
55
|
-
FROM sqlite_master
|
56
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
57
|
-
[0m
|
58
|
-
[1m[35mSQL (0.7ms)[0m SELECT name
|
59
|
-
FROM sqlite_master
|
60
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
61
|
-
[1m[36mSQL (0.3ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations"[0m
|
62
|
-
Migrating to AddTestTables (20120523110000)
|
63
|
-
[1m[36mSQL (1.1ms)[0m [1m SELECT name
|
64
|
-
FROM sqlite_master
|
65
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
66
|
-
[0m
|
67
|
-
[1m[35mSQL (0.2ms)[0m SELECT name
|
68
|
-
FROM sqlite_master
|
69
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
70
|
-
[1m[36mSQL (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations"[0m
|
71
|
-
Migrating to AddTestTables (20120523110000)
|
72
|
-
[1m[36mSQL (1.0ms)[0m [1m SELECT name
|
73
|
-
FROM sqlite_master
|
74
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
75
|
-
[0m
|
76
|
-
[1m[35mSQL (0.2ms)[0m SELECT name
|
77
|
-
FROM sqlite_master
|
78
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
79
|
-
[1m[36mSQL (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations"[0m
|
80
|
-
Migrating to AddTestTables (20120523110000)
|
81
|
-
[1m[36mSQL (1.1ms)[0m [1m SELECT name
|
82
|
-
FROM sqlite_master
|
83
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
84
|
-
[0m
|
85
|
-
[1m[35mSQL (0.2ms)[0m SELECT name
|
86
|
-
FROM sqlite_master
|
87
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
88
|
-
[1m[36mSQL (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations"[0m
|
89
|
-
Migrating to AddTestTables (20120523110000)
|
90
|
-
[1m[36mSQL (1.3ms)[0m [1m SELECT name
|
91
|
-
FROM sqlite_master
|
92
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
93
|
-
[0m
|
94
|
-
[1m[35mSQL (0.2ms)[0m SELECT name
|
95
|
-
FROM sqlite_master
|
96
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
97
|
-
[1m[36mSQL (0.2ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations"[0m
|
98
|
-
Migrating to AddTestTables (20120523110000)
|
99
|
-
[1m[36mSQL (1.2ms)[0m [1m SELECT name
|
100
|
-
FROM sqlite_master
|
101
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
102
|
-
[0m
|
103
|
-
[1m[35mSQL (0.2ms)[0m SELECT name
|
104
|
-
FROM sqlite_master
|
105
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
106
|
-
[1m[36mSQL (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations"[0m
|
107
|
-
Migrating to AddTestTables (20120523110000)
|
108
|
-
[1m[36mSQL (1.2ms)[0m [1m SELECT name
|
109
|
-
FROM sqlite_master
|
110
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
111
|
-
[0m
|
112
|
-
[1m[35mSQL (0.2ms)[0m SELECT name
|
113
|
-
FROM sqlite_master
|
114
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
115
|
-
[1m[36mSQL (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations"[0m
|
116
|
-
Migrating to AddTestTables (20120523110000)
|
117
|
-
[1m[36mSQL (1.1ms)[0m [1m SELECT name
|
118
|
-
FROM sqlite_master
|
119
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
120
|
-
[0m
|
121
|
-
[1m[35mSQL (0.2ms)[0m SELECT name
|
122
|
-
FROM sqlite_master
|
123
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
124
|
-
[1m[36mSQL (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations"[0m
|
125
|
-
Migrating to AddTestTables (20120523110000)
|
126
|
-
[1m[36mSQL (1.1ms)[0m [1m SELECT name
|
127
|
-
FROM sqlite_master
|
128
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
129
|
-
[0m
|
130
|
-
[1m[35mSQL (0.2ms)[0m SELECT name
|
131
|
-
FROM sqlite_master
|
132
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
133
|
-
[1m[36mSQL (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations"[0m
|
134
|
-
Migrating to AddTestTables (20120523110000)
|
135
|
-
[1m[36mSQL (1.1ms)[0m [1m SELECT name
|
136
|
-
FROM sqlite_master
|
137
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
138
|
-
[0m
|
139
|
-
[1m[35mSQL (0.2ms)[0m SELECT name
|
140
|
-
FROM sqlite_master
|
141
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
142
|
-
[1m[36mSQL (0.2ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations"[0m
|
143
|
-
Migrating to AddTestTables (20120523110000)
|
144
|
-
[1m[36mSQL (1.1ms)[0m [1m SELECT name
|
145
|
-
FROM sqlite_master
|
146
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
147
|
-
[0m
|
148
|
-
[1m[35mSQL (0.2ms)[0m SELECT name
|
149
|
-
FROM sqlite_master
|
150
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
151
|
-
[1m[36mSQL (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations"[0m
|
152
|
-
Migrating to AddTestTables (20120523110000)
|
153
|
-
[1m[36mSQL (1.2ms)[0m [1m SELECT name
|
154
|
-
FROM sqlite_master
|
155
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
156
|
-
[0m
|
157
|
-
[1m[35mSQL (0.2ms)[0m SELECT name
|
158
|
-
FROM sqlite_master
|
159
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
160
|
-
[1m[36mSQL (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations"[0m
|
161
|
-
Migrating to AddTestTables (20120523110000)
|
162
|
-
[1m[36mSQL (1.2ms)[0m [1m SELECT name
|
163
|
-
FROM sqlite_master
|
164
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
165
|
-
[0m
|
166
|
-
[1m[35mSQL (0.2ms)[0m SELECT name
|
167
|
-
FROM sqlite_master
|
168
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
169
|
-
[1m[36mSQL (0.2ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations"[0m
|
170
|
-
Migrating to AddTestTables (20120523110000)
|
171
|
-
[1m[36mSQL (1.3ms)[0m [1m SELECT name
|
172
|
-
FROM sqlite_master
|
173
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
174
|
-
[0m
|
175
|
-
[1m[35mSQL (0.2ms)[0m SELECT name
|
176
|
-
FROM sqlite_master
|
177
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
178
|
-
[1m[36mSQL (0.2ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations"[0m
|
179
|
-
Migrating to AddTestTables (20120523110000)
|
180
|
-
[1m[36mSQL (1.2ms)[0m [1m SELECT name
|
181
|
-
FROM sqlite_master
|
182
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
183
|
-
[0m
|
184
|
-
[1m[35mSQL (0.2ms)[0m SELECT name
|
185
|
-
FROM sqlite_master
|
186
|
-
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
187
|
-
[1m[36mSQL (0.2ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations"[0m
|
188
|
-
Migrating to AddTestTables (20120523110000)
|
data/test/dummy/public/404.html
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
-
<style type="text/css">
|
6
|
-
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
-
div.dialog {
|
8
|
-
width: 25em;
|
9
|
-
padding: 0 4em;
|
10
|
-
margin: 4em auto 0 auto;
|
11
|
-
border: 1px solid #ccc;
|
12
|
-
border-right-color: #999;
|
13
|
-
border-bottom-color: #999;
|
14
|
-
}
|
15
|
-
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
-
</style>
|
17
|
-
</head>
|
18
|
-
|
19
|
-
<body>
|
20
|
-
<!-- This file lives in public/404.html -->
|
21
|
-
<div class="dialog">
|
22
|
-
<h1>The page you were looking for doesn't exist.</h1>
|
23
|
-
<p>You may have mistyped the address or the page may have moved.</p>
|
24
|
-
</div>
|
25
|
-
</body>
|
26
|
-
</html>
|
data/test/dummy/public/422.html
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>The change you wanted was rejected (422)</title>
|
5
|
-
<style type="text/css">
|
6
|
-
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
-
div.dialog {
|
8
|
-
width: 25em;
|
9
|
-
padding: 0 4em;
|
10
|
-
margin: 4em auto 0 auto;
|
11
|
-
border: 1px solid #ccc;
|
12
|
-
border-right-color: #999;
|
13
|
-
border-bottom-color: #999;
|
14
|
-
}
|
15
|
-
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
-
</style>
|
17
|
-
</head>
|
18
|
-
|
19
|
-
<body>
|
20
|
-
<!-- This file lives in public/422.html -->
|
21
|
-
<div class="dialog">
|
22
|
-
<h1>The change you wanted was rejected.</h1>
|
23
|
-
<p>Maybe you tried to change something you didn't have access to.</p>
|
24
|
-
</div>
|
25
|
-
</body>
|
26
|
-
</html>
|
data/test/dummy/public/500.html
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>We're sorry, but something went wrong (500)</title>
|
5
|
-
<style type="text/css">
|
6
|
-
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
-
div.dialog {
|
8
|
-
width: 25em;
|
9
|
-
padding: 0 4em;
|
10
|
-
margin: 4em auto 0 auto;
|
11
|
-
border: 1px solid #ccc;
|
12
|
-
border-right-color: #999;
|
13
|
-
border-bottom-color: #999;
|
14
|
-
}
|
15
|
-
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
-
</style>
|
17
|
-
</head>
|
18
|
-
|
19
|
-
<body>
|
20
|
-
<!-- This file lives in public/500.html -->
|
21
|
-
<div class="dialog">
|
22
|
-
<h1>We're sorry, but something went wrong.</h1>
|
23
|
-
<p>We've been notified about this issue and we'll take a look at it shortly.</p>
|
24
|
-
</div>
|
25
|
-
</body>
|
26
|
-
</html>
|
File without changes
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,66 +0,0 @@
|
|
1
|
-
document.observe('dom:loaded', function()
|
2
|
-
{
|
3
|
-
create_status_window();
|
4
|
-
|
5
|
-
function create_status_window() {
|
6
|
-
new Insertion.Bottom(
|
7
|
-
document.body,
|
8
|
-
"<div id='acts_as_monitor_status_window'></div>"
|
9
|
-
);
|
10
|
-
var status_window = $('acts_as_monitor_status_window');
|
11
|
-
Position.absolutize(status_window);
|
12
|
-
status_window.observe('click', function(ev) {status_window.fade(); });
|
13
|
-
status_window.hide();
|
14
|
-
}
|
15
|
-
|
16
|
-
var handle_monitor = function(ev)
|
17
|
-
{
|
18
|
-
var id = ev.target.getAttribute('data-id');
|
19
|
-
new Ajax.Request('/acts_as_monitor/monitors/'+ id +'.js',
|
20
|
-
{
|
21
|
-
method: 'get',
|
22
|
-
evalJSON: 'force',
|
23
|
-
parameters: {
|
24
|
-
class_name: ev.target.getAttribute('data-class')
|
25
|
-
//id: ev.target.getAttribute('data-id')
|
26
|
-
},
|
27
|
-
onSuccess: function(response)
|
28
|
-
{
|
29
|
-
var rsp = response.responseJSON;
|
30
|
-
create_popup(rsp.text,ev.target);
|
31
|
-
},
|
32
|
-
onFailure: function(response)
|
33
|
-
{
|
34
|
-
alert('Failure ' + response.status);
|
35
|
-
}
|
36
|
-
});
|
37
|
-
}
|
38
|
-
|
39
|
-
//Create popup with information
|
40
|
-
function create_popup(text,target)
|
41
|
-
{
|
42
|
-
//alert(text);
|
43
|
-
var status_window = $('acts_as_monitor_status_window');
|
44
|
-
status_window.update(text);
|
45
|
-
Position.clone(target,status_window);
|
46
|
-
new Effect.Appear(status_window);
|
47
|
-
//alert("Fatto");
|
48
|
-
}
|
49
|
-
|
50
|
-
//$$('.acts_as_monitor_icon_red .acts_as_monitor_icon_yellow .acts_as_monitor_icon_green')
|
51
|
-
var pulsate_forever = function(elem) {
|
52
|
-
new Effect.Pulsate(elem, {
|
53
|
-
//afterFinish: function(o) { new Effect.Pulsate(o.element, o.options); }
|
54
|
-
});
|
55
|
-
}
|
56
|
-
$$('.acts_as_monitor_icon_red').each(function(elmt)
|
57
|
-
{
|
58
|
-
elmt.observe('click', handle_monitor);
|
59
|
-
pulsate_forever(elmt);
|
60
|
-
});
|
61
|
-
|
62
|
-
$$('.acts_as_monitor_icon_yellow').each(function(elmt)
|
63
|
-
{
|
64
|
-
elmt.observe('click', handle_monitor);
|
65
|
-
});
|
66
|
-
});
|
@@ -1,136 +0,0 @@
|
|
1
|
-
// script.aculo.us builder.js v1.9.0, Thu Dec 23 16:54:48 -0500 2010
|
2
|
-
|
3
|
-
// Copyright (c) 2005-2010 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
|
4
|
-
//
|
5
|
-
// script.aculo.us is freely distributable under the terms of an MIT-style license.
|
6
|
-
// For details, see the script.aculo.us web site: http://script.aculo.us/
|
7
|
-
|
8
|
-
var Builder = {
|
9
|
-
NODEMAP: {
|
10
|
-
AREA: 'map',
|
11
|
-
CAPTION: 'table',
|
12
|
-
COL: 'table',
|
13
|
-
COLGROUP: 'table',
|
14
|
-
LEGEND: 'fieldset',
|
15
|
-
OPTGROUP: 'select',
|
16
|
-
OPTION: 'select',
|
17
|
-
PARAM: 'object',
|
18
|
-
TBODY: 'table',
|
19
|
-
TD: 'table',
|
20
|
-
TFOOT: 'table',
|
21
|
-
TH: 'table',
|
22
|
-
THEAD: 'table',
|
23
|
-
TR: 'table'
|
24
|
-
},
|
25
|
-
// note: For Firefox < 1.5, OPTION and OPTGROUP tags are currently broken,
|
26
|
-
// due to a Firefox bug
|
27
|
-
node: function(elementName) {
|
28
|
-
elementName = elementName.toUpperCase();
|
29
|
-
|
30
|
-
// try innerHTML approach
|
31
|
-
var parentTag = this.NODEMAP[elementName] || 'div';
|
32
|
-
var parentElement = document.createElement(parentTag);
|
33
|
-
try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707
|
34
|
-
parentElement.innerHTML = "<" + elementName + "></" + elementName + ">";
|
35
|
-
} catch(e) {}
|
36
|
-
var element = parentElement.firstChild || null;
|
37
|
-
|
38
|
-
// see if browser added wrapping tags
|
39
|
-
if(element && (element.tagName.toUpperCase() != elementName))
|
40
|
-
element = element.getElementsByTagName(elementName)[0];
|
41
|
-
|
42
|
-
// fallback to createElement approach
|
43
|
-
if(!element) element = document.createElement(elementName);
|
44
|
-
|
45
|
-
// abort if nothing could be created
|
46
|
-
if(!element) return;
|
47
|
-
|
48
|
-
// attributes (or text)
|
49
|
-
if(arguments[1])
|
50
|
-
if(this._isStringOrNumber(arguments[1]) ||
|
51
|
-
(arguments[1] instanceof Array) ||
|
52
|
-
arguments[1].tagName) {
|
53
|
-
this._children(element, arguments[1]);
|
54
|
-
} else {
|
55
|
-
var attrs = this._attributes(arguments[1]);
|
56
|
-
if(attrs.length) {
|
57
|
-
try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707
|
58
|
-
parentElement.innerHTML = "<" +elementName + " " +
|
59
|
-
attrs + "></" + elementName + ">";
|
60
|
-
} catch(e) {}
|
61
|
-
element = parentElement.firstChild || null;
|
62
|
-
// workaround firefox 1.0.X bug
|
63
|
-
if(!element) {
|
64
|
-
element = document.createElement(elementName);
|
65
|
-
for(attr in arguments[1])
|
66
|
-
element[attr == 'class' ? 'className' : attr] = arguments[1][attr];
|
67
|
-
}
|
68
|
-
if(element.tagName.toUpperCase() != elementName)
|
69
|
-
element = parentElement.getElementsByTagName(elementName)[0];
|
70
|
-
}
|
71
|
-
}
|
72
|
-
|
73
|
-
// text, or array of children
|
74
|
-
if(arguments[2])
|
75
|
-
this._children(element, arguments[2]);
|
76
|
-
|
77
|
-
return $(element);
|
78
|
-
},
|
79
|
-
_text: function(text) {
|
80
|
-
return document.createTextNode(text);
|
81
|
-
},
|
82
|
-
|
83
|
-
ATTR_MAP: {
|
84
|
-
'className': 'class',
|
85
|
-
'htmlFor': 'for'
|
86
|
-
},
|
87
|
-
|
88
|
-
_attributes: function(attributes) {
|
89
|
-
var attrs = [];
|
90
|
-
for(attribute in attributes)
|
91
|
-
attrs.push((attribute in this.ATTR_MAP ? this.ATTR_MAP[attribute] : attribute) +
|
92
|
-
'="' + attributes[attribute].toString().escapeHTML().gsub(/"/,'"') + '"');
|
93
|
-
return attrs.join(" ");
|
94
|
-
},
|
95
|
-
_children: function(element, children) {
|
96
|
-
if(children.tagName) {
|
97
|
-
element.appendChild(children);
|
98
|
-
return;
|
99
|
-
}
|
100
|
-
if(typeof children=='object') { // array can hold nodes and text
|
101
|
-
children.flatten().each( function(e) {
|
102
|
-
if(typeof e=='object')
|
103
|
-
element.appendChild(e);
|
104
|
-
else
|
105
|
-
if(Builder._isStringOrNumber(e))
|
106
|
-
element.appendChild(Builder._text(e));
|
107
|
-
});
|
108
|
-
} else
|
109
|
-
if(Builder._isStringOrNumber(children))
|
110
|
-
element.appendChild(Builder._text(children));
|
111
|
-
},
|
112
|
-
_isStringOrNumber: function(param) {
|
113
|
-
return(typeof param=='string' || typeof param=='number');
|
114
|
-
},
|
115
|
-
build: function(html) {
|
116
|
-
var element = this.node('div');
|
117
|
-
$(element).update(html.strip());
|
118
|
-
return element.down();
|
119
|
-
},
|
120
|
-
dump: function(scope) {
|
121
|
-
if(typeof scope != 'object' && typeof scope != 'function') scope = window; //global scope
|
122
|
-
|
123
|
-
var tags = ("A ABBR ACRONYM ADDRESS APPLET AREA B BASE BASEFONT BDO BIG BLOCKQUOTE BODY " +
|
124
|
-
"BR BUTTON CAPTION CENTER CITE CODE COL COLGROUP DD DEL DFN DIR DIV DL DT EM FIELDSET " +
|
125
|
-
"FONT FORM FRAME FRAMESET H1 H2 H3 H4 H5 H6 HEAD HR HTML I IFRAME IMG INPUT INS ISINDEX "+
|
126
|
-
"KBD LABEL LEGEND LI LINK MAP MENU META NOFRAMES NOSCRIPT OBJECT OL OPTGROUP OPTION P "+
|
127
|
-
"PARAM PRE Q S SAMP SCRIPT SELECT SMALL SPAN STRIKE STRONG STYLE SUB SUP TABLE TBODY TD "+
|
128
|
-
"TEXTAREA TFOOT TH THEAD TITLE TR TT U UL VAR").split(/\s+/);
|
129
|
-
|
130
|
-
tags.each( function(tag){
|
131
|
-
scope[tag] = function() {
|
132
|
-
return Builder.node.apply(Builder, [tag].concat($A(arguments)));
|
133
|
-
};
|
134
|
-
});
|
135
|
-
}
|
136
|
-
};
|