rubylight 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +44 -0
  3. data/Rakefile +37 -0
  4. data/app/assets/images/close.png +0 -0
  5. data/app/assets/images/loading.gif +0 -0
  6. data/app/assets/images/next.png +0 -0
  7. data/app/assets/images/prev.png +0 -0
  8. data/app/assets/javascripts/lightbox.js +351 -0
  9. data/app/assets/stylesheets/lightbox.css +181 -0
  10. data/lib/rubylight.rb +6 -0
  11. data/lib/rubylight/engine.rb +7 -0
  12. data/lib/rubylight/light_helpers.rb +22 -0
  13. data/lib/rubylight/railtie.rb +8 -0
  14. data/lib/rubylight/version.rb +3 -0
  15. data/lib/tasks/rubylight_tasks.rake +4 -0
  16. data/test/dummy/Rakefile +7 -0
  17. data/test/dummy/app/assets/images/1.jpg +0 -0
  18. data/test/dummy/app/assets/images/large.png +0 -0
  19. data/test/dummy/app/assets/images/thumb.jpg +0 -0
  20. data/test/dummy/app/assets/images/thumb.png +0 -0
  21. data/test/dummy/app/assets/javascripts/application.js +10 -0
  22. data/test/dummy/app/assets/javascripts/home.js +2 -0
  23. data/test/dummy/app/assets/stylesheets/application.css +8 -0
  24. data/test/dummy/app/assets/stylesheets/home.css +4 -0
  25. data/test/dummy/app/controllers/application_controller.rb +3 -0
  26. data/test/dummy/app/controllers/home_controller.rb +5 -0
  27. data/test/dummy/app/helpers/application_helper.rb +2 -0
  28. data/test/dummy/app/helpers/home_helper.rb +2 -0
  29. data/test/dummy/app/views/home/index.html.haml +2 -0
  30. data/test/dummy/app/views/layouts/application.html.erb +15 -0
  31. data/test/dummy/config.ru +4 -0
  32. data/test/dummy/config/application.rb +45 -0
  33. data/test/dummy/config/boot.rb +10 -0
  34. data/test/dummy/config/database.yml +25 -0
  35. data/test/dummy/config/environment.rb +5 -0
  36. data/test/dummy/config/environments/development.rb +30 -0
  37. data/test/dummy/config/environments/production.rb +60 -0
  38. data/test/dummy/config/environments/test.rb +39 -0
  39. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  40. data/test/dummy/config/initializers/inflections.rb +10 -0
  41. data/test/dummy/config/initializers/mime_types.rb +5 -0
  42. data/test/dummy/config/initializers/secret_token.rb +7 -0
  43. data/test/dummy/config/initializers/session_store.rb +8 -0
  44. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  45. data/test/dummy/config/locales/en.yml +5 -0
  46. data/test/dummy/config/routes.rb +60 -0
  47. data/test/dummy/db/development.sqlite3 +0 -0
  48. data/test/dummy/db/schema.rb +16 -0
  49. data/test/dummy/log/development.log +3858 -0
  50. data/test/dummy/log/production.log +224 -0
  51. data/test/dummy/public/404.html +26 -0
  52. data/test/dummy/public/422.html +26 -0
  53. data/test/dummy/public/500.html +26 -0
  54. data/test/dummy/public/favicon.ico +0 -0
  55. data/test/dummy/script/rails +6 -0
  56. data/test/dummy/test/functional/home_controller_test.rb +9 -0
  57. data/test/dummy/test/unit/helpers/home_helper_test.rb +4 -0
  58. data/test/dummy/tmp/cache/assets/C6F/830/sprockets%2F53156008748ee1f204b02643e5c16a6a +16 -0
  59. data/test/dummy/tmp/cache/assets/CA9/240/sprockets%2F0a8008b0737953f41a8a7b08307e77cb +16 -0
  60. data/test/dummy/tmp/cache/assets/CB9/FA0/sprockets%2Fa1863b6fc859a4348e41a5240889fa27 +374 -0
  61. data/test/dummy/tmp/cache/assets/CDF/870/sprockets%2Fb878faf942403e313a5b103e5d80488e +28 -0
  62. data/test/dummy/tmp/cache/assets/CE6/560/sprockets%2Fecc51273a18292241960719cbe899cfb +18 -0
  63. data/test/dummy/tmp/cache/assets/D17/AB0/sprockets%2F5c9a32ccb0692131b7bf677fb77937b6 +18 -0
  64. data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +54 -0
  65. data/test/dummy/tmp/cache/assets/D54/ED0/sprockets%2F71c9fa01091d432b131da3bb73faf3d4 +197 -0
  66. data/test/dummy/tmp/cache/assets/D5E/C30/sprockets%2F421d71dbc41e4efceae210d855f16117 +395 -0
  67. data/test/dummy/tmp/cache/assets/D73/030/sprockets%2Fc364507281a666a47d6c9d16bbad9efc +27 -0
  68. data/test/dummy/tmp/cache/assets/D7D/FC0/sprockets%2F1f94aa5b9cec9554f135bb198db799b3 +203 -0
  69. data/test/dummy/tmp/cache/assets/D80/080/sprockets%2Fcd9c69336a9b3be0bde87986adb24792 +16 -0
  70. data/test/dummy/tmp/cache/assets/D84/210/sprockets%2Fabd0103ccec2b428ac62c94e4c40b384 +10009 -0
  71. data/test/dummy/tmp/cache/assets/D98/8B0/sprockets%2Fedbef6e0d0a4742346cf479f2c522eb0 +30 -0
  72. data/test/dummy/tmp/cache/assets/D9D/A60/sprockets%2Fa88ab4e49bb7203b8e0586c38efdd2b0 +884 -0
  73. data/test/dummy/tmp/cache/assets/DD3/B30/sprockets%2F92d8bd6a4785d5eb46dbaeebdc542039 +18 -0
  74. data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +67 -0
  75. data/test/dummy/tmp/cache/assets/E5A/4B0/sprockets%2Fddb87630e146e40f58ac25addedadfbf +9289 -0
  76. data/test/rubylight_test.rb +7 -0
  77. data/test/test_helper.rb +10 -0
  78. metadata +216 -0
@@ -0,0 +1,224 @@
1
+ Compiled application.js (3ms) (pid 5810)
2
+ Compiled jquery.js (2ms) (pid 5810)
3
+ Compiled jquery_ujs.js (0ms) (pid 5810)
4
+ Compiled lightbox.js (0ms) (pid 5810)
5
+ Compiled home.js (0ms) (pid 5810)
6
+ Compiled application.js (3ms) (pid 6435)
7
+ Compiled jquery.js (24ms) (pid 6435)
8
+ Compiled jquery_ujs.js (0ms) (pid 6435)
9
+ Compiled lightbox.js (0ms) (pid 6435)
10
+ Compiled home.js (0ms) (pid 6435)
11
+ Compiled application.js (3ms) (pid 6511)
12
+ Compiled jquery.js (2ms) (pid 6511)
13
+ Compiled jquery_ujs.js (0ms) (pid 6511)
14
+ Compiled lightbox.js (0ms) (pid 6511)
15
+ Compiled home.js (0ms) (pid 6511)
16
+ Compiled application.css (2ms) (pid 6511)
17
+ Compiled lightbox.css (0ms) (pid 6511)
18
+ Compiled home.css (0ms) (pid 6511)
19
+ Compiled application.js (2ms) (pid 6505)
20
+ Compiled jquery.js (2ms) (pid 6505)
21
+ Compiled jquery_ujs.js (0ms) (pid 6505)
22
+ Compiled lightbox.js (0ms) (pid 6505)
23
+ Compiled home.js (0ms) (pid 6505)
24
+ Compiled application.css (3ms) (pid 6505)
25
+ Compiled lightbox.css (0ms) (pid 6505)
26
+ Compiled home.css (0ms) (pid 6505)
27
+ Compiled application.js (3ms) (pid 7038)
28
+ Compiled jquery.js (2ms) (pid 7038)
29
+ Compiled jquery_ujs.js (0ms) (pid 7038)
30
+ Compiled lightbox.js (0ms) (pid 7038)
31
+ Compiled home.js (0ms) (pid 7038)
32
+ Compiled application.css (2ms) (pid 7038)
33
+ Compiled lightbox.css (0ms) (pid 7038)
34
+ Compiled home.css (0ms) (pid 7038)
35
+ Compiled application.js (3ms) (pid 7032)
36
+ Compiled jquery.js (2ms) (pid 7032)
37
+ Compiled jquery_ujs.js (0ms) (pid 7032)
38
+ Compiled lightbox.js (0ms) (pid 7032)
39
+ Compiled home.js (0ms) (pid 7032)
40
+ Compiled application.css (1ms) (pid 7032)
41
+ Compiled lightbox.css (0ms) (pid 7032)
42
+ Compiled home.css (0ms) (pid 7032)
43
+ Compiled application.js (3ms) (pid 7495)
44
+ Compiled jquery.js (2ms) (pid 7495)
45
+ Compiled jquery_ujs.js (0ms) (pid 7495)
46
+ Compiled lightbox.js (0ms) (pid 7495)
47
+ Compiled home.js (0ms) (pid 7495)
48
+ Compiled application.css (1ms) (pid 7495)
49
+ Compiled lightbox.css (0ms) (pid 7495)
50
+ Compiled home.css (0ms) (pid 7495)
51
+ Compiled application.js (2ms) (pid 7489)
52
+ Compiled jquery.js (2ms) (pid 7489)
53
+ Compiled jquery_ujs.js (0ms) (pid 7489)
54
+ Compiled lightbox.js (0ms) (pid 7489)
55
+ Compiled home.js (0ms) (pid 7489)
56
+ Compiled application.css (1ms) (pid 7489)
57
+ Compiled lightbox.css (0ms) (pid 7489)
58
+ Compiled home.css (0ms) (pid 7489)
59
+ Compiled application.js (3ms) (pid 7715)
60
+ Compiled jquery.js (2ms) (pid 7715)
61
+ Compiled jquery_ujs.js (0ms) (pid 7715)
62
+ Compiled lightbox.js (0ms) (pid 7715)
63
+ Compiled home.js (0ms) (pid 7715)
64
+ Compiled application.css (3ms) (pid 7715)
65
+ Compiled lightbox.css (0ms) (pid 7715)
66
+ Compiled home.css (0ms) (pid 7715)
67
+ Compiled application.js (3ms) (pid 7707)
68
+ Compiled jquery.js (2ms) (pid 7707)
69
+ Compiled jquery_ujs.js (0ms) (pid 7707)
70
+ Compiled lightbox.js (0ms) (pid 7707)
71
+ Compiled home.js (0ms) (pid 7707)
72
+ Compiled application.css (1ms) (pid 7707)
73
+ Compiled lightbox.css (0ms) (pid 7707)
74
+ Compiled home.css (0ms) (pid 7707)
75
+ Compiled application.js (3ms) (pid 3726)
76
+ Compiled jquery.js (2ms) (pid 3726)
77
+ Compiled jquery_ujs.js (0ms) (pid 3726)
78
+ Compiled lightbox.js (0ms) (pid 3726)
79
+ Compiled home.js (0ms) (pid 3726)
80
+ Compiled application.css (3ms) (pid 3726)
81
+ Compiled lightbox.css (0ms) (pid 3726)
82
+ Compiled home.css (0ms) (pid 3726)
83
+ Compiled application.js (3ms) (pid 3704)
84
+ Compiled jquery.js (20ms) (pid 3704)
85
+ Compiled jquery_ujs.js (0ms) (pid 3704)
86
+ Compiled lightbox.js (10ms) (pid 3704)
87
+ Compiled home.js (12ms) (pid 3704)
88
+ Compiled application.css (16ms) (pid 3704)
89
+ Compiled lightbox.css (0ms) (pid 3704)
90
+ Compiled home.css (2ms) (pid 3704)
91
+ Compiled application.js (3ms) (pid 4519)
92
+ Compiled jquery.js (2ms) (pid 4519)
93
+ Compiled jquery_ujs.js (0ms) (pid 4519)
94
+ Compiled lightbox.js (0ms) (pid 4519)
95
+ Compiled home.js (0ms) (pid 4519)
96
+ Compiled application.css (1ms) (pid 4519)
97
+ Compiled lightbox.css (0ms) (pid 4519)
98
+ Compiled home.css (0ms) (pid 4519)
99
+ Compiled application.js (3ms) (pid 4513)
100
+ Compiled jquery.js (2ms) (pid 4513)
101
+ Compiled jquery_ujs.js (0ms) (pid 4513)
102
+ Compiled lightbox.js (0ms) (pid 4513)
103
+ Compiled home.js (0ms) (pid 4513)
104
+ Compiled application.css (1ms) (pid 4513)
105
+ Compiled lightbox.css (0ms) (pid 4513)
106
+ Compiled home.css (0ms) (pid 4513)
107
+ Compiled application.js (3ms) (pid 5327)
108
+ Compiled jquery.js (2ms) (pid 5327)
109
+ Compiled jquery_ujs.js (0ms) (pid 5327)
110
+ Compiled lightbox.js (0ms) (pid 5327)
111
+ Compiled home.js (0ms) (pid 5327)
112
+ Compiled jquery-ui-1.8.18.custom.min.js (0ms) (pid 5327)
113
+ Compiled jquery.smooth-scroll.min.js (0ms) (pid 5327)
114
+ Compiled application.css (1ms) (pid 5327)
115
+ Compiled lightbox.css (0ms) (pid 5327)
116
+ Compiled home.css (0ms) (pid 5327)
117
+ Compiled screen.css (0ms) (pid 5327)
118
+ Compiled application.js (3ms) (pid 5321)
119
+ Compiled jquery.js (24ms) (pid 5321)
120
+ Compiled jquery_ujs.js (0ms) (pid 5321)
121
+ Compiled lightbox.js (0ms) (pid 5321)
122
+ Compiled home.js (0ms) (pid 5321)
123
+ Compiled jquery-ui-1.8.18.custom.min.js (0ms) (pid 5321)
124
+ Compiled jquery.smooth-scroll.min.js (0ms) (pid 5321)
125
+ Compiled application.css (2ms) (pid 5321)
126
+ Compiled lightbox.css (0ms) (pid 5321)
127
+ Compiled home.css (0ms) (pid 5321)
128
+ Compiled screen.css (0ms) (pid 5321)
129
+ Compiled application.js (2ms) (pid 10556)
130
+ Compiled jquery.js (2ms) (pid 10556)
131
+ Compiled jquery_ujs.js (0ms) (pid 10556)
132
+ Compiled home.js (0ms) (pid 10556)
133
+ Compiled jquery-ui-1.8.18.custom.min.js (0ms) (pid 10556)
134
+ Compiled jquery.smooth-scroll.min.js (0ms) (pid 10556)
135
+ Compiled application.css (2ms) (pid 10556)
136
+ Compiled lightbox.css (0ms) (pid 10556)
137
+ Compiled home.css (0ms) (pid 10556)
138
+ Compiled application.js (5ms) (pid 10548)
139
+ Compiled jquery.js (56ms) (pid 10548)
140
+ Compiled jquery_ujs.js (6ms) (pid 10548)
141
+ Compiled home.js (1ms) (pid 10548)
142
+ Compiled jquery-ui-1.8.18.custom.min.js (0ms) (pid 10548)
143
+ Compiled jquery.smooth-scroll.min.js (0ms) (pid 10548)
144
+ Compiled application.css (2ms) (pid 10548)
145
+ Compiled lightbox.css (0ms) (pid 10548)
146
+ Compiled home.css (17ms) (pid 10548)
147
+ Compiled application.js (2ms) (pid 10716)
148
+ Compiled jquery.js (2ms) (pid 10716)
149
+ Compiled jquery_ujs.js (0ms) (pid 10716)
150
+ Compiled home.js (0ms) (pid 10716)
151
+ Compiled jquery-ui-1.8.18.custom.min.js (0ms) (pid 10716)
152
+ Compiled jquery.smooth-scroll.min.js (0ms) (pid 10716)
153
+ Compiled application.css (2ms) (pid 10716)
154
+ Compiled lightbox.css (0ms) (pid 10716)
155
+ Compiled home.css (0ms) (pid 10716)
156
+ Compiled screen.css (0ms) (pid 10716)
157
+ Compiled application.js (2ms) (pid 10703)
158
+ Compiled jquery.js (2ms) (pid 10703)
159
+ Compiled jquery_ujs.js (0ms) (pid 10703)
160
+ Compiled home.js (0ms) (pid 10703)
161
+ Compiled jquery-ui-1.8.18.custom.min.js (0ms) (pid 10703)
162
+ Compiled jquery.smooth-scroll.min.js (0ms) (pid 10703)
163
+ Compiled application.css (2ms) (pid 10703)
164
+ Compiled lightbox.css (0ms) (pid 10703)
165
+ Compiled home.css (0ms) (pid 10703)
166
+ Compiled screen.css (0ms) (pid 10703)
167
+ Compiled application.js (3ms) (pid 10893)
168
+ Compiled jquery.js (2ms) (pid 10893)
169
+ Compiled jquery_ujs.js (0ms) (pid 10893)
170
+ Compiled lightbox.js (0ms) (pid 10893)
171
+ Compiled home.js (0ms) (pid 10893)
172
+ Compiled jquery-ui-1.8.18.custom.min.js (0ms) (pid 10893)
173
+ Compiled jquery.smooth-scroll.min.js (0ms) (pid 10893)
174
+ Compiled application.css (2ms) (pid 10893)
175
+ Compiled lightbox.css (0ms) (pid 10893)
176
+ Compiled home.css (0ms) (pid 10893)
177
+ Compiled screen.css (0ms) (pid 10893)
178
+ Compiled application.js (3ms) (pid 10887)
179
+ Compiled jquery.js (2ms) (pid 10887)
180
+ Compiled jquery_ujs.js (0ms) (pid 10887)
181
+ Compiled lightbox.js (0ms) (pid 10887)
182
+ Compiled home.js (0ms) (pid 10887)
183
+ Compiled jquery-ui-1.8.18.custom.min.js (0ms) (pid 10887)
184
+ Compiled jquery.smooth-scroll.min.js (0ms) (pid 10887)
185
+ Compiled application.css (2ms) (pid 10887)
186
+ Compiled lightbox.css (0ms) (pid 10887)
187
+ Compiled home.css (0ms) (pid 10887)
188
+ Compiled screen.css (0ms) (pid 10887)
189
+ Compiled application.js (3ms) (pid 11163)
190
+ Compiled jquery.js (25ms) (pid 11163)
191
+ Compiled jquery_ujs.js (0ms) (pid 11163)
192
+ Compiled lightbox.js (0ms) (pid 11163)
193
+ Compiled home.js (0ms) (pid 11163)
194
+ Compiled application.css (2ms) (pid 11163)
195
+ Compiled lightbox.css (0ms) (pid 11163)
196
+ Compiled home.css (0ms) (pid 11163)
197
+ Compiled screen.css (0ms) (pid 11163)
198
+ Compiled application.js (3ms) (pid 11157)
199
+ Compiled jquery.js (25ms) (pid 11157)
200
+ Compiled jquery_ujs.js (0ms) (pid 11157)
201
+ Compiled lightbox.js (0ms) (pid 11157)
202
+ Compiled home.js (0ms) (pid 11157)
203
+ Compiled application.css (1ms) (pid 11157)
204
+ Compiled lightbox.css (0ms) (pid 11157)
205
+ Compiled home.css (0ms) (pid 11157)
206
+ Compiled screen.css (0ms) (pid 11157)
207
+ Compiled application.js (3ms) (pid 11196)
208
+ Compiled jquery.js (2ms) (pid 11196)
209
+ Compiled jquery_ujs.js (0ms) (pid 11196)
210
+ Compiled lightbox.js (0ms) (pid 11196)
211
+ Compiled home.js (0ms) (pid 11196)
212
+ Compiled application.css (2ms) (pid 11196)
213
+ Compiled lightbox.css (0ms) (pid 11196)
214
+ Compiled home.css (0ms) (pid 11196)
215
+ Compiled screen.css (0ms) (pid 11196)
216
+ Compiled application.js (3ms) (pid 11190)
217
+ Compiled jquery.js (2ms) (pid 11190)
218
+ Compiled jquery_ujs.js (0ms) (pid 11190)
219
+ Compiled lightbox.js (0ms) (pid 11190)
220
+ Compiled home.js (0ms) (pid 11190)
221
+ Compiled application.css (2ms) (pid 11190)
222
+ Compiled lightbox.css (0ms) (pid 11190)
223
+ Compiled home.css (0ms) (pid 11190)
224
+ Compiled screen.css (0ms) (pid 11190)
@@ -0,0 +1,26 @@
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>
@@ -0,0 +1,26 @@
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>
@@ -0,0 +1,26 @@
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
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
@@ -0,0 +1,9 @@
1
+ require 'test_helper'
2
+
3
+ class HomeControllerTest < ActionController::TestCase
4
+ test "should get index" do
5
+ get :index
6
+ assert_response :success
7
+ end
8
+
9
+ end
@@ -0,0 +1,4 @@
1
+ require 'test_helper'
2
+
3
+ class HomeHelperTest < ActionView::TestCase
4
+ end
@@ -0,0 +1,16 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1338638750.5161924: @value{I"
2
+ class:EFI"StaticAsset;
3
+ FI"id;
4
+ F"%67d3ef80d69ad19874cc02ce2c2e1363I"logical_path;
5
+ FI"close.png;
6
+ TI"
7
+ F"4/projects/rubylight/app/assets/images/close.pngI"content_type;
8
+ FI"image/png;
9
+ FI"
10
+ mtime;
11
+ FI"2012-04-21T12:51:16-04:00;
12
+ FI" length;
13
+ FI"498;
14
+ FI" digest;
15
+ F"%2adcae47096ea989c70de5b239e5eb4fI"
16
+ F"%0868aba5d4b750d3a9421721ea3d9b9c
@@ -0,0 +1,16 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1338638750.4662218: @value{I"
2
+ class:EFI"StaticAsset;
3
+ FI"id;
4
+ F"%86380657c38922b609fe6dd46d598f25I"logical_path;
5
+ FI"bg-checker.png;
6
+ TI"
7
+ F"9/projects/rubylight/app/assets/images/bg-checker.pngI"content_type;
8
+ FI"image/png;
9
+ FI"
10
+ mtime;
11
+ FI"2012-04-21T12:51:16-04:00;
12
+ FI" length;
13
+ FI"950;
14
+ FI" digest;
15
+ F"%efe897b80ad3321348b54b82a88dc0d3I"
16
+ F"%0868aba5d4b750d3a9421721ea3d9b9c
@@ -0,0 +1,374 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1338638750.2224526: @value{I"
2
+ class:EFI"BundledAsset;
3
+ FI"id;
4
+ F"%a6d7d502256372d02060af00add8ea25I"logical_path;
5
+ F"lightbox.jsI"
6
+ F";/projects/rubylight/app/assets/javascripts/lightbox.jsI"content_type;
7
+ FI"application/javascript;
8
+ FI"
9
+ mtime;
10
+ FI"2012-05-31T06:12:49-04:00;
11
+ FI" body;
12
+ FI"N-
13
+ /*
14
+ Lightbox v2.51
15
+ by Lokesh Dhakar - http://www.lokeshdhakar.com
16
+
17
+ For more information, visit:
18
+ http://lokeshdhakar.com/projects/lightbox2/
19
+
20
+ Licensed under the Creative Commons Attribution 2.5 License - http://creativecommons.org/licenses/by/2.5/
21
+ - free for use in both personal and commercial projects
22
+ - attribution requires leaving author name, author link, and the license info intact
23
+
24
+ Thanks
25
+ - Scott Upton(uptonic.com), Peter-Paul Koch(quirksmode.com), and Thomas Fuchs(mir.aculo.us) for ideas, libs, and snippets.
26
+ - Artemy Tregubenko (arty.name) for cleanup and help in updating to latest proto-aculous in v2.05.
27
+
28
+
29
+ Table of Contents
30
+ =================
31
+ LightboxOptions
32
+
33
+ Lightbox
34
+ - constructor
35
+ - init
36
+ - enable
37
+ - build
38
+ - start
39
+ - changeImage
40
+ - sizeContainer
41
+ - showImage
42
+ - updateNav
43
+ - updateDetails
44
+ - preloadNeigbhoringImages
45
+ - enableKeyboardNav
46
+ - disableKeyboardNav
47
+ - keyboardAction
48
+ - end
49
+
50
+ options = new LightboxOptions
51
+ lightbox = new Lightbox options
52
+ */
53
+
54
+
55
+ (function() {
56
+ var $, Lightbox, LightboxOptions;
57
+
58
+ $ = jQuery;
59
+
60
+ LightboxOptions = (function() {
61
+
62
+ function LightboxOptions() {
63
+ this.fileLoadingImage = 'assets/loading.gif';
64
+ this.fileCloseImage = 'assets/close.png';
65
+ this.resizeDuration = 700;
66
+ this.fadeDuration = 500;
67
+ this.labelImage = "Image";
68
+ this.labelOf = "of";
69
+ }
70
+
71
+ return LightboxOptions;
72
+
73
+ })();
74
+
75
+ Lightbox = (function() {
76
+
77
+ function Lightbox(options) {
78
+ this.options = options;
79
+ this.album = [];
80
+ this.currentImageIndex = void 0;
81
+ this.init();
82
+ }
83
+
84
+ Lightbox.prototype.init = function() {
85
+ this.enable();
86
+ return this.build();
87
+ };
88
+
89
+ Lightbox.prototype.enable = function() {
90
+ var _this = this;
91
+ return $('body').on('click', 'a[rel^=lightbox], area[rel^=lightbox]', function(e) {
92
+ _this.start($(e.currentTarget));
93
+ return false;
94
+ });
95
+ };
96
+
97
+ Lightbox.prototype.build = function() {
98
+ var $lightbox,
99
+ _this = this;
100
+ $("<div>", {
101
+ id: 'lightboxOverlay'
102
+ }).after($('<div/>', {
103
+ id: 'lightbox'
104
+ }).append($('<div/>', {
105
+ "class": 'lb-outerContainer'
106
+ }).append($('<div/>', {
107
+ "class": 'lb-container'
108
+ }).append($('<img/>', {
109
+ "class": 'lb-image'
110
+ }), $('<div/>', {
111
+ "class": 'lb-nav'
112
+ }).append($('<a/>', {
113
+ "class": 'lb-prev'
114
+ }), $('<a/>', {
115
+ "class": 'lb-next'
116
+ })), $('<div/>', {
117
+ "class": 'lb-loader'
118
+ }).append($('<a/>', {
119
+ "class": 'lb-cancel'
120
+ }).append($('<img/>', {
121
+ src: this.options.fileLoadingImage
122
+ }))))), $('<div/>', {
123
+ "class": 'lb-dataContainer'
124
+ }).append($('<div/>', {
125
+ "class": 'lb-data'
126
+ }).append($('<div/>', {
127
+ "class": 'lb-details'
128
+ }).append($('<span/>', {
129
+ "class": 'lb-caption'
130
+ }), $('<span/>', {
131
+ "class": 'lb-number'
132
+ })), $('<div/>', {
133
+ "class": 'lb-closeContainer'
134
+ }).append($('<a/>', {
135
+ "class": 'lb-close'
136
+ }).append($('<img/>', {
137
+ src: this.options.fileCloseImage
138
+ }))))))).appendTo($('body'));
139
+ $('#lightboxOverlay').hide().on('click', function(e) {
140
+ _this.end();
141
+ return false;
142
+ });
143
+ $lightbox = $('#lightbox');
144
+ $lightbox.hide().on('click', function(e) {
145
+ if ($(e.target).attr('id') === 'lightbox') _this.end();
146
+ return false;
147
+ });
148
+ $lightbox.find('.lb-outerContainer').on('click', function(e) {
149
+ if ($(e.target).attr('id') === 'lightbox') _this.end();
150
+ return false;
151
+ });
152
+ $lightbox.find('.lb-prev').on('click', function(e) {
153
+ _this.changeImage(_this.currentImageIndex - 1);
154
+ return false;
155
+ });
156
+ $lightbox.find('.lb-next').on('click', function(e) {
157
+ _this.changeImage(_this.currentImageIndex + 1);
158
+ return false;
159
+ });
160
+ $lightbox.find('.lb-loader, .lb-close').on('click', function(e) {
161
+ _this.end();
162
+ return false;
163
+ });
164
+ };
165
+
166
+ Lightbox.prototype.start = function($link) {
167
+ var $lightbox, $window, a, i, imageNumber, left, top, _len, _ref;
168
+ $(window).on("resize", this.sizeOverlay);
169
+ $('select, object, embed').css({
170
+ visibility: "hidden"
171
+ });
172
+ $('#lightboxOverlay').width($(document).width()).height($(document).height()).fadeIn(this.options.fadeDuration);
173
+ this.album = [];
174
+ imageNumber = 0;
175
+ if ($link.attr('rel') === 'lightbox') {
176
+ this.album.push({
177
+ link: $link.attr('href'),
178
+ title: $link.attr('title')
179
+ });
180
+ } else {
181
+ _ref = $($link.prop("tagName") + '[rel="' + $link.attr('rel') + '"]');
182
+ for (i = 0, _len = _ref.length; i < _len; i++) {
183
+ a = _ref[i];
184
+ this.album.push({
185
+ link: $(a).attr('href'),
186
+ title: $(a).attr('title')
187
+ });
188
+ if ($(a).attr('href') === $link.attr('href')) imageNumber = i;
189
+ }
190
+ }
191
+ $window = $(window);
192
+ top = $window.scrollTop() + $window.height() / 10;
193
+ left = $window.scrollLeft();
194
+ $lightbox = $('#lightbox');
195
+ $lightbox.css({
196
+ top: top + 'px',
197
+ left: left + 'px'
198
+ }).fadeIn(this.options.fadeDuration);
199
+ this.changeImage(imageNumber);
200
+ };
201
+
202
+ Lightbox.prototype.changeImage = function(imageNumber) {
203
+ var $image, $lightbox, preloader,
204
+ _this = this;
205
+ this.disableKeyboardNav();
206
+ $lightbox = $('#lightbox');
207
+ $image = $lightbox.find('.lb-image');
208
+ this.sizeOverlay();
209
+ $('#lightboxOverlay').fadeIn(this.options.fadeDuration);
210
+ $('.loader').fadeIn('slow');
211
+ $lightbox.find('.lb-image, .lb-nav, .lb-prev, .lb-next, .lb-dataContainer, .lb-numbers, .lb-caption').hide();
212
+ $lightbox.find('.lb-outerContainer').addClass('animating');
213
+ preloader = new Image;
214
+ preloader.onload = function() {
215
+ $image.attr('src', _this.album[imageNumber].link);
216
+ $image.width = preloader.width;
217
+ $image.height = preloader.height;
218
+ return _this.sizeContainer(preloader.width, preloader.height);
219
+ };
220
+ preloader.src = this.album[imageNumber].link;
221
+ this.currentImageIndex = imageNumber;
222
+ };
223
+
224
+ Lightbox.prototype.sizeOverlay = function() {
225
+ return $('#lightboxOverlay').width($(document).width()).height($(document).height());
226
+ };
227
+
228
+ Lightbox.prototype.sizeContainer = function(imageWidth, imageHeight) {
229
+ var $container, $lightbox, $outerContainer, containerBottomPadding, containerLeftPadding, containerRightPadding, containerTopPadding, newHeight, newWidth, oldHeight, oldWidth,
230
+ _this = this;
231
+ $lightbox = $('#lightbox');
232
+ $outerContainer = $lightbox.find('.lb-outerContainer');
233
+ oldWidth = $outerContainer.outerWidth();
234
+ oldHeight = $outerContainer.outerHeight();
235
+ $container = $lightbox.find('.lb-container');
236
+ containerTopPadding = parseInt($container.css('padding-top'), 10);
237
+ containerRightPadding = parseInt($container.css('padding-right'), 10);
238
+ containerBottomPadding = parseInt($container.css('padding-bottom'), 10);
239
+ containerLeftPadding = parseInt($container.css('padding-left'), 10);
240
+ newWidth = imageWidth + containerLeftPadding + containerRightPadding;
241
+ newHeight = imageHeight + containerTopPadding + containerBottomPadding;
242
+ if (newWidth !== oldWidth && newHeight !== oldHeight) {
243
+ $outerContainer.animate({
244
+ width: newWidth,
245
+ height: newHeight
246
+ }, this.options.resizeDuration, 'swing');
247
+ } else if (newWidth !== oldWidth) {
248
+ $outerContainer.animate({
249
+ width: newWidth
250
+ }, this.options.resizeDuration, 'swing');
251
+ } else if (newHeight !== oldHeight) {
252
+ $outerContainer.animate({
253
+ height: newHeight
254
+ }, this.options.resizeDuration, 'swing');
255
+ }
256
+ setTimeout(function() {
257
+ $lightbox.find('.lb-dataContainer').width(newWidth);
258
+ $lightbox.find('.lb-prevLink').height(newHeight);
259
+ $lightbox.find('.lb-nextLink').height(newHeight);
260
+ _this.showImage();
261
+ }, this.options.resizeDuration);
262
+ };
263
+
264
+ Lightbox.prototype.showImage = function() {
265
+ var $lightbox;
266
+ $lightbox = $('#lightbox');
267
+ $lightbox.find('.lb-loader').hide();
268
+ $lightbox.find('.lb-image').fadeIn('slow');
269
+ this.updateNav();
270
+ this.updateDetails();
271
+ this.preloadNeighboringImages();
272
+ this.enableKeyboardNav();
273
+ };
274
+
275
+ Lightbox.prototype.updateNav = function() {
276
+ var $lightbox;
277
+ $lightbox = $('#lightbox');
278
+ $lightbox.find('.lb-nav').show();
279
+ if (this.currentImageIndex > 0) $lightbox.find('.lb-prev').show();
280
+ if (this.currentImageIndex < this.album.length - 1) {
281
+ $lightbox.find('.lb-next').show();
282
+ }
283
+ };
284
+
285
+ Lightbox.prototype.updateDetails = function() {
286
+ var $lightbox,
287
+ _this = this;
288
+ $lightbox = $('#lightbox');
289
+ if (typeof this.album[this.currentImageIndex].title !== 'undefined' && this.album[this.currentImageIndex].title !== "") {
290
+ $lightbox.find('.lb-caption').html(this.album[this.currentImageIndex].title).fadeIn('fast');
291
+ }
292
+ if (this.album.length > 1) {
293
+ $lightbox.find('.lb-number').html(this.options.labelImage + ' ' + (this.currentImageIndex + 1) + ' ' + this.options.labelOf + ' ' + this.album.length).fadeIn('fast');
294
+ } else {
295
+ $lightbox.find('.lb-number').hide();
296
+ }
297
+ $lightbox.find('.lb-outerContainer').removeClass('animating');
298
+ $lightbox.find('.lb-dataContainer').fadeIn(this.resizeDuration, function() {
299
+ return _this.sizeOverlay();
300
+ });
301
+ };
302
+
303
+ Lightbox.prototype.preloadNeighboringImages = function() {
304
+ var preloadNext, preloadPrev;
305
+ if (this.album.length > this.currentImageIndex + 1) {
306
+ preloadNext = new Image;
307
+ preloadNext.src = this.album[this.currentImageIndex + 1].link;
308
+ }
309
+ if (this.currentImageIndex > 0) {
310
+ preloadPrev = new Image;
311
+ preloadPrev.src = this.album[this.currentImageIndex - 1].link;
312
+ }
313
+ };
314
+
315
+ Lightbox.prototype.enableKeyboardNav = function() {
316
+ $(document).on('keyup.keyboard', $.proxy(this.keyboardAction, this));
317
+ };
318
+
319
+ Lightbox.prototype.disableKeyboardNav = function() {
320
+ $(document).off('.keyboard');
321
+ };
322
+
323
+ Lightbox.prototype.keyboardAction = function(event) {
324
+ var KEYCODE_ESC, KEYCODE_LEFTARROW, KEYCODE_RIGHTARROW, key, keycode;
325
+ KEYCODE_ESC = 27;
326
+ KEYCODE_LEFTARROW = 37;
327
+ KEYCODE_RIGHTARROW = 39;
328
+ keycode = event.keyCode;
329
+ key = String.fromCharCode(keycode).toLowerCase();
330
+ if (keycode === KEYCODE_ESC || key.match(/x|o|c/)) {
331
+ this.end();
332
+ } else if (key === 'p' || keycode === KEYCODE_LEFTARROW) {
333
+ if (this.currentImageIndex !== 0) {
334
+ this.changeImage(this.currentImageIndex - 1);
335
+ }
336
+ } else if (key === 'n' || keycode === KEYCODE_RIGHTARROW) {
337
+ if (this.currentImageIndex !== this.album.length - 1) {
338
+ this.changeImage(this.currentImageIndex + 1);
339
+ }
340
+ }
341
+ };
342
+
343
+ Lightbox.prototype.end = function() {
344
+ this.disableKeyboardNav();
345
+ $(window).off("resize", this.sizeOverlay);
346
+ $('#lightbox').fadeOut(this.options.fadeDuration);
347
+ $('#lightboxOverlay').fadeOut(this.options.fadeDuration);
348
+ return $('select, object, embed').css({
349
+ visibility: "visible"
350
+ });
351
+ };
352
+
353
+ return Lightbox;
354
+
355
+ })();
356
+
357
+ $(function() {
358
+ var lightbox, options;
359
+ options = new LightboxOptions;
360
+ return lightbox = new Lightbox(options);
361
+ });
362
+
363
+ }).call(this);
364
+ ;
365
+ FI"asset_paths;
366
+ F[";/projects/rubylight/app/assets/javascripts/lightbox.jsI"dependency_paths;
367
+ F[{I" path;
368
+ F";/projects/rubylight/app/assets/javascripts/lightbox.jsI"
369
+ mtime;
370
+ FIu: Time
371
+ : @_zoneI"EDT;
372
+ T:
373
+ F"%24fe98fa302c025bc542685b9ad24c3aI"
374
+ F"%0868aba5d4b750d3a9421721ea3d9b9c