kublog 0.0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +9 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +177 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +102 -0
- data/Rakefile +39 -0
- data/app/assets/images/kublog/.gitkeep +0 -0
- data/app/assets/images/kublog/missing_image.png +0 -0
- data/app/assets/javascripts/kublog/application.js +13 -0
- data/app/assets/javascripts/kublog/categories.js.coffee +48 -0
- data/app/assets/javascripts/kublog/comments.js.coffee +30 -0
- data/app/assets/javascripts/kublog/email.js.coffee +32 -0
- data/app/assets/javascripts/kublog/images.js.coffee +77 -0
- data/app/assets/javascripts/kublog/posts.js.coffee +44 -0
- data/app/assets/javascripts/kublog/shared.js.coffee.erb +19 -0
- data/app/assets/javascripts/kublog/wysiwyg.controls.js.coffee +68 -0
- data/app/assets/plugins/kublog/ajaxyupload/images/ajax-loader.gif +0 -0
- data/app/assets/plugins/kublog/ajaxyupload/javascripts/jquery.ajaxyupload.js +126 -0
- data/app/assets/plugins/kublog/fancybox/images/blank.gif +0 -0
- data/app/assets/plugins/kublog/fancybox/images/fancy_close.png +0 -0
- data/app/assets/plugins/kublog/fancybox/images/fancy_loading.png +0 -0
- data/app/assets/plugins/kublog/fancybox/images/fancy_nav_left.png +0 -0
- data/app/assets/plugins/kublog/fancybox/images/fancy_nav_right.png +0 -0
- data/app/assets/plugins/kublog/fancybox/images/fancy_shadow_e.png +0 -0
- data/app/assets/plugins/kublog/fancybox/images/fancy_shadow_n.png +0 -0
- data/app/assets/plugins/kublog/fancybox/images/fancy_shadow_ne.png +0 -0
- data/app/assets/plugins/kublog/fancybox/images/fancy_shadow_nw.png +0 -0
- data/app/assets/plugins/kublog/fancybox/images/fancy_shadow_s.png +0 -0
- data/app/assets/plugins/kublog/fancybox/images/fancy_shadow_se.png +0 -0
- data/app/assets/plugins/kublog/fancybox/images/fancy_shadow_sw.png +0 -0
- data/app/assets/plugins/kublog/fancybox/images/fancy_shadow_w.png +0 -0
- data/app/assets/plugins/kublog/fancybox/images/fancy_title_left.png +0 -0
- data/app/assets/plugins/kublog/fancybox/images/fancy_title_main.png +0 -0
- data/app/assets/plugins/kublog/fancybox/images/fancy_title_over.png +0 -0
- data/app/assets/plugins/kublog/fancybox/images/fancy_title_right.png +0 -0
- data/app/assets/plugins/kublog/fancybox/images/fancybox-x.png +0 -0
- data/app/assets/plugins/kublog/fancybox/images/fancybox-y.png +0 -0
- data/app/assets/plugins/kublog/fancybox/images/fancybox.png +0 -0
- data/app/assets/plugins/kublog/fancybox/javascripts/fancybox-1.3.4.js +46 -0
- data/app/assets/plugins/kublog/fancybox/stylesheets/fancybox-1.3.4.css +359 -0
- data/app/assets/plugins/kublog/livequery/javascripts/jquery.livequery.js +250 -0
- data/app/assets/plugins/kublog/wysiwyg/images/ajax-loader.gif +0 -0
- data/app/assets/plugins/kublog/wysiwyg/images/jquery.wysiwyg.bg.png +0 -0
- data/app/assets/plugins/kublog/wysiwyg/images/jquery.wysiwyg.gif +0 -0
- data/app/assets/plugins/kublog/wysiwyg/images/jquery.wysiwyg.jpg +0 -0
- data/app/assets/plugins/kublog/wysiwyg/images/jquery.wysiwyg.no-alpha.gif +0 -0
- data/app/assets/plugins/kublog/wysiwyg/javascripts/jquery.wysiwyg.js +2377 -0
- data/app/assets/plugins/kublog/wysiwyg/javascripts/wysiwyg.image.js +284 -0
- data/app/assets/plugins/kublog/wysiwyg/javascripts/wysiwyg.link.js +249 -0
- data/app/assets/plugins/kublog/wysiwyg/stylesheets/jquery.wysiwyg.css +94 -0
- data/app/assets/stylesheets/kublog/application.css +9 -0
- data/app/assets/stylesheets/kublog/categories.css +4 -0
- data/app/assets/stylesheets/kublog/comments.css +4 -0
- data/app/assets/stylesheets/kublog/email.css +7 -0
- data/app/assets/stylesheets/kublog/images.css +41 -0
- data/app/assets/stylesheets/kublog/posts.css +39 -0
- data/app/controllers/kublog/application_controller.rb +12 -0
- data/app/controllers/kublog/categories_controller.rb +47 -0
- data/app/controllers/kublog/comments_controller.rb +37 -0
- data/app/controllers/kublog/images_controller.rb +44 -0
- data/app/controllers/kublog/posts_controller.rb +66 -0
- data/app/helpers/kublog/application_helper.rb +4 -0
- data/app/helpers/kublog/posts_helper.rb +38 -0
- data/app/mailers/kublog/post_mailer.rb +11 -0
- data/app/models/kublog/category.rb +26 -0
- data/app/models/kublog/comment.rb +46 -0
- data/app/models/kublog/image.rb +23 -0
- data/app/models/kublog/post.rb +51 -0
- data/app/presenters/kublog/post_presenter.rb +23 -0
- data/app/presenters/kublog/posts_presenter.rb +29 -0
- data/app/uploaders/kublog/file_uploader.rb +56 -0
- data/app/views/kublog/post_mailer/new_post.html.erb +1 -0
- data/app/views/kublog/post_mailer/new_post.liquid.html.erb +7 -0
- data/app/views/kublog/posts/_email_form.html.erb +13 -0
- data/app/views/kublog/posts/_form.html.erb +71 -0
- data/app/views/kublog/posts/_image_form.html.erb +26 -0
- data/app/views/kublog/posts/edit.html.erb +3 -0
- data/app/views/kublog/posts/index.atom.builder +15 -0
- data/app/views/kublog/posts/index.html.erb +36 -0
- data/app/views/kublog/posts/new.html.erb +3 -0
- data/app/views/kublog/posts/show.html.erb +46 -0
- data/app/views/layouts/kublog/application.html.erb +14 -0
- data/config/locales/kublog/en.yml +54 -0
- data/config/routes.rb +13 -0
- data/db/migrate/20110816211552_create_kublog_posts.rb +27 -0
- data/db/migrate/20110817215828_create_kublog_images.rb +11 -0
- data/db/migrate/20110818181434_create_kublog_categories.rb +11 -0
- data/db/migrate/20110822194341_create_kublog_comments.rb +14 -0
- data/kublog.gemspec +39 -0
- data/lib/kublog.rb +92 -0
- data/lib/kublog/author.rb +13 -0
- data/lib/kublog/engine.rb +5 -0
- data/lib/kublog/notifiable.rb +26 -0
- data/lib/kublog/notification/email.rb +86 -0
- data/lib/kublog/notification/email_job.rb +14 -0
- data/lib/kublog/notification/fb_post.rb +43 -0
- data/lib/kublog/notification/fb_post_job.rb +16 -0
- data/lib/kublog/notification/tweet.rb +68 -0
- data/lib/kublog/notification/tweet_job.rb +16 -0
- data/lib/kublog/user_integration/common.rb +31 -0
- data/lib/kublog/user_integration/devise.rb +23 -0
- data/lib/kublog/version.rb +3 -0
- data/lib/kublog/xhr_upload/file_helper.rb +36 -0
- data/lib/tasks/kublog_tasks.rake +4 -0
- data/script/rails +6 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +9 -0
- data/test/dummy/app/assets/javascripts/sessions.js +2 -0
- data/test/dummy/app/assets/javascripts/users.js +2 -0
- data/test/dummy/app/assets/stylesheets/application.css +157 -0
- data/test/dummy/app/assets/stylesheets/sessions.css +4 -0
- data/test/dummy/app/assets/stylesheets/users.css +4 -0
- data/test/dummy/app/controllers/application_controller.rb +19 -0
- data/test/dummy/app/controllers/sessions_controller.rb +22 -0
- data/test/dummy/app/controllers/users_controller.rb +17 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/helpers/error_messages_helper.rb +23 -0
- data/test/dummy/app/helpers/layout_helper.rb +22 -0
- data/test/dummy/app/helpers/sessions_helper.rb +2 -0
- data/test/dummy/app/helpers/users_helper.rb +2 -0
- data/test/dummy/app/mailers/.gitkeep +0 -0
- data/test/dummy/app/models/.gitkeep +0 -0
- data/test/dummy/app/models/ability.rb +2 -0
- data/test/dummy/app/models/user.rb +25 -0
- data/test/dummy/app/views/layouts/_account.html.erb +8 -0
- data/test/dummy/app/views/layouts/application.html.erb +29 -0
- data/test/dummy/app/views/layouts/kublog/application.html.erb +31 -0
- data/test/dummy/app/views/sessions/new.html.erb +15 -0
- data/test/dummy/app/views/users/new.html.erb +28 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +42 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +38 -0
- data/test/dummy/config/environments/production.rb +51 -0
- data/test/dummy/config/environments/test.rb +39 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +10 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +12 -0
- data/test/dummy/config/locales/en.yml +54 -0
- data/test/dummy/config/routes.rb +13 -0
- data/test/dummy/db/migrate/20110816225222_create_users.rb +11 -0
- data/test/dummy/db/migrate/20110819135547_create_delayed_jobs.rb +21 -0
- data/test/dummy/db/schema.rb +96 -0
- data/test/dummy/lib/assets/.gitkeep +0 -0
- data/test/dummy/log/.gitkeep +0 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +26 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/delayed_job +5 -0
- data/test/dummy/script/rails +6 -0
- data/test/dummy/test/fixtures/users.yml +9 -0
- data/test/dummy/test/functional/sessions_controller_test.rb +7 -0
- data/test/dummy/test/functional/users_controller_test.rb +7 -0
- data/test/dummy/test/unit/helpers/sessions_helper_test.rb +4 -0
- data/test/dummy/test/unit/helpers/users_helper_test.rb +4 -0
- data/test/dummy/test/unit/user_test.rb +7 -0
- data/test/factories.rb +9 -0
- data/test/fixtures/kublog/categories.yml +7 -0
- data/test/fixtures/kublog/comments.yml +7 -0
- data/test/fixtures/kublog/images.yml +9 -0
- data/test/fixtures/kublog/posts.yml +9 -0
- data/test/functional/kublog/categories_controller_test.rb +9 -0
- data/test/functional/kublog/comments_controller_test.rb +9 -0
- data/test/functional/kublog/images_controller_test.rb +9 -0
- data/test/functional/kublog/post_mailer_test.rb +9 -0
- data/test/functional/kublog/posts_controller_test.rb +9 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/kublog_test.rb +7 -0
- data/test/test_helper.rb +12 -0
- data/test/unit/helpers/kublog/categories_helper_test.rb +6 -0
- data/test/unit/helpers/kublog/comments_helper_test.rb +6 -0
- data/test/unit/helpers/kublog/images_helper_test.rb +6 -0
- data/test/unit/helpers/kublog/posts_helper_test.rb +6 -0
- data/test/unit/kublog/category_test.rb +9 -0
- data/test/unit/kublog/comment_test.rb +9 -0
- data/test/unit/kublog/image_test.rb +9 -0
- data/test/unit/kublog/post_test.rb +19 -0
- metadata +439 -0
@@ -0,0 +1,359 @@
|
|
1
|
+
/*
|
2
|
+
* FancyBox - jQuery Plugin
|
3
|
+
* Simple and fancy lightbox alternative
|
4
|
+
*
|
5
|
+
* Examples and documentation at: http://fancybox.net
|
6
|
+
*
|
7
|
+
* Copyright (c) 2008 - 2010 Janis Skarnelis
|
8
|
+
* That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
|
9
|
+
*
|
10
|
+
* Version: 1.3.4 (11/11/2010)
|
11
|
+
* Requires: jQuery v1.3+
|
12
|
+
*
|
13
|
+
* Dual licensed under the MIT and GPL licenses:
|
14
|
+
* http://www.opensource.org/licenses/mit-license.php
|
15
|
+
* http://www.gnu.org/licenses/gpl.html
|
16
|
+
*/
|
17
|
+
|
18
|
+
#fancybox-loading {
|
19
|
+
position: fixed;
|
20
|
+
top: 50%;
|
21
|
+
left: 50%;
|
22
|
+
width: 40px;
|
23
|
+
height: 40px;
|
24
|
+
margin-top: -20px;
|
25
|
+
margin-left: -20px;
|
26
|
+
cursor: pointer;
|
27
|
+
overflow: hidden;
|
28
|
+
z-index: 1104;
|
29
|
+
display: none;
|
30
|
+
}
|
31
|
+
|
32
|
+
#fancybox-loading div {
|
33
|
+
position: absolute;
|
34
|
+
top: 0;
|
35
|
+
left: 0;
|
36
|
+
width: 40px;
|
37
|
+
height: 480px;
|
38
|
+
background-image: url('/assets/kublog/fancybox/images/fancybox.png');
|
39
|
+
}
|
40
|
+
|
41
|
+
#fancybox-overlay {
|
42
|
+
position: absolute;
|
43
|
+
top: 0;
|
44
|
+
left: 0;
|
45
|
+
width: 100%;
|
46
|
+
z-index: 1100;
|
47
|
+
display: none;
|
48
|
+
}
|
49
|
+
|
50
|
+
#fancybox-tmp {
|
51
|
+
padding: 0;
|
52
|
+
margin: 0;
|
53
|
+
border: 0;
|
54
|
+
overflow: auto;
|
55
|
+
display: none;
|
56
|
+
}
|
57
|
+
|
58
|
+
#fancybox-wrap {
|
59
|
+
position: absolute;
|
60
|
+
top: 0;
|
61
|
+
left: 0;
|
62
|
+
padding: 20px;
|
63
|
+
z-index: 1101;
|
64
|
+
outline: none;
|
65
|
+
display: none;
|
66
|
+
}
|
67
|
+
|
68
|
+
#fancybox-outer {
|
69
|
+
position: relative;
|
70
|
+
width: 100%;
|
71
|
+
height: 100%;
|
72
|
+
background: #fff;
|
73
|
+
}
|
74
|
+
|
75
|
+
#fancybox-content {
|
76
|
+
width: 0;
|
77
|
+
height: 0;
|
78
|
+
padding: 0;
|
79
|
+
outline: none;
|
80
|
+
position: relative;
|
81
|
+
overflow: hidden;
|
82
|
+
z-index: 1102;
|
83
|
+
border: 0px solid #fff;
|
84
|
+
}
|
85
|
+
|
86
|
+
#fancybox-hide-sel-frame {
|
87
|
+
position: absolute;
|
88
|
+
top: 0;
|
89
|
+
left: 0;
|
90
|
+
width: 100%;
|
91
|
+
height: 100%;
|
92
|
+
background: transparent;
|
93
|
+
z-index: 1101;
|
94
|
+
}
|
95
|
+
|
96
|
+
#fancybox-close {
|
97
|
+
position: absolute;
|
98
|
+
top: -15px;
|
99
|
+
right: -15px;
|
100
|
+
width: 30px;
|
101
|
+
height: 30px;
|
102
|
+
background: transparent url('/assets/kublog/fancybox/images/fancybox.png') -40px 0px;
|
103
|
+
cursor: pointer;
|
104
|
+
z-index: 1103;
|
105
|
+
display: none;
|
106
|
+
}
|
107
|
+
|
108
|
+
#fancybox-error {
|
109
|
+
color: #444;
|
110
|
+
font: normal 12px/20px Arial;
|
111
|
+
padding: 14px;
|
112
|
+
margin: 0;
|
113
|
+
}
|
114
|
+
|
115
|
+
#fancybox-img {
|
116
|
+
width: 100%;
|
117
|
+
height: 100%;
|
118
|
+
padding: 0;
|
119
|
+
margin: 0;
|
120
|
+
border: none;
|
121
|
+
outline: none;
|
122
|
+
line-height: 0;
|
123
|
+
vertical-align: top;
|
124
|
+
}
|
125
|
+
|
126
|
+
#fancybox-frame {
|
127
|
+
width: 100%;
|
128
|
+
height: 100%;
|
129
|
+
border: none;
|
130
|
+
display: block;
|
131
|
+
}
|
132
|
+
|
133
|
+
#fancybox-left, #fancybox-right {
|
134
|
+
position: absolute;
|
135
|
+
bottom: 0px;
|
136
|
+
height: 100%;
|
137
|
+
width: 35%;
|
138
|
+
cursor: pointer;
|
139
|
+
outline: none;
|
140
|
+
background: transparent url('/assets/kublog/fancybox/images/blank.gif');
|
141
|
+
z-index: 1102;
|
142
|
+
display: none;
|
143
|
+
}
|
144
|
+
|
145
|
+
#fancybox-left {
|
146
|
+
left: 0px;
|
147
|
+
}
|
148
|
+
|
149
|
+
#fancybox-right {
|
150
|
+
right: 0px;
|
151
|
+
}
|
152
|
+
|
153
|
+
#fancybox-left-ico, #fancybox-right-ico {
|
154
|
+
position: absolute;
|
155
|
+
top: 50%;
|
156
|
+
left: -9999px;
|
157
|
+
width: 30px;
|
158
|
+
height: 30px;
|
159
|
+
margin-top: -15px;
|
160
|
+
cursor: pointer;
|
161
|
+
z-index: 1102;
|
162
|
+
display: block;
|
163
|
+
}
|
164
|
+
|
165
|
+
#fancybox-left-ico {
|
166
|
+
background-image: url('/assets/kublog/fancybox/images/fancybox.png');
|
167
|
+
background-position: -40px -30px;
|
168
|
+
}
|
169
|
+
|
170
|
+
#fancybox-right-ico {
|
171
|
+
background-image: url('/assets/kublog/fancybox/images/fancybox.png');
|
172
|
+
background-position: -40px -60px;
|
173
|
+
}
|
174
|
+
|
175
|
+
#fancybox-left:hover, #fancybox-right:hover {
|
176
|
+
visibility: visible; /* IE6 */
|
177
|
+
}
|
178
|
+
|
179
|
+
#fancybox-left:hover span {
|
180
|
+
left: 20px;
|
181
|
+
}
|
182
|
+
|
183
|
+
#fancybox-right:hover span {
|
184
|
+
left: auto;
|
185
|
+
right: 20px;
|
186
|
+
}
|
187
|
+
|
188
|
+
.fancybox-bg {
|
189
|
+
position: absolute;
|
190
|
+
padding: 0;
|
191
|
+
margin: 0;
|
192
|
+
border: 0;
|
193
|
+
width: 20px;
|
194
|
+
height: 20px;
|
195
|
+
z-index: 1001;
|
196
|
+
}
|
197
|
+
|
198
|
+
#fancybox-bg-n {
|
199
|
+
top: -20px;
|
200
|
+
left: 0;
|
201
|
+
width: 100%;
|
202
|
+
background-image: url('/assets/kublog/fancybox/images/fancybox-x.png');
|
203
|
+
}
|
204
|
+
|
205
|
+
#fancybox-bg-ne {
|
206
|
+
top: -20px;
|
207
|
+
right: -20px;
|
208
|
+
background-image: url('/assets/kublog/fancybox/images/fancybox.png');
|
209
|
+
background-position: -40px -162px;
|
210
|
+
}
|
211
|
+
|
212
|
+
#fancybox-bg-e {
|
213
|
+
top: 0;
|
214
|
+
right: -20px;
|
215
|
+
height: 100%;
|
216
|
+
background-image: url('/assets/kublog/fancybox/images/fancybox-y.png');
|
217
|
+
background-position: -20px 0px;
|
218
|
+
}
|
219
|
+
|
220
|
+
#fancybox-bg-se {
|
221
|
+
bottom: -20px;
|
222
|
+
right: -20px;
|
223
|
+
background-image: url('/assets/kublog/fancybox/images/fancybox.png');
|
224
|
+
background-position: -40px -182px;
|
225
|
+
}
|
226
|
+
|
227
|
+
#fancybox-bg-s {
|
228
|
+
bottom: -20px;
|
229
|
+
left: 0;
|
230
|
+
width: 100%;
|
231
|
+
background-image: url('/assets/kublog/fancybox/images/fancybox-x.png');
|
232
|
+
background-position: 0px -20px;
|
233
|
+
}
|
234
|
+
|
235
|
+
#fancybox-bg-sw {
|
236
|
+
bottom: -20px;
|
237
|
+
left: -20px;
|
238
|
+
background-image: url('/assets/kublog/fancybox/images/fancybox.png');
|
239
|
+
background-position: -40px -142px;
|
240
|
+
}
|
241
|
+
|
242
|
+
#fancybox-bg-w {
|
243
|
+
top: 0;
|
244
|
+
left: -20px;
|
245
|
+
height: 100%;
|
246
|
+
background-image: url('/assets/kublog/fancybox/images/fancybox-y.png');
|
247
|
+
}
|
248
|
+
|
249
|
+
#fancybox-bg-nw {
|
250
|
+
top: -20px;
|
251
|
+
left: -20px;
|
252
|
+
background-image: url('/assets/kublog/fancybox/images/fancybox.png');
|
253
|
+
background-position: -40px -122px;
|
254
|
+
}
|
255
|
+
|
256
|
+
#fancybox-title {
|
257
|
+
font-family: Helvetica;
|
258
|
+
font-size: 12px;
|
259
|
+
z-index: 1102;
|
260
|
+
}
|
261
|
+
|
262
|
+
.fancybox-title-inside {
|
263
|
+
padding-bottom: 10px;
|
264
|
+
text-align: center;
|
265
|
+
color: #333;
|
266
|
+
background: #fff;
|
267
|
+
position: relative;
|
268
|
+
}
|
269
|
+
|
270
|
+
.fancybox-title-outside {
|
271
|
+
padding-top: 10px;
|
272
|
+
color: #fff;
|
273
|
+
}
|
274
|
+
|
275
|
+
.fancybox-title-over {
|
276
|
+
position: absolute;
|
277
|
+
bottom: 0;
|
278
|
+
left: 0;
|
279
|
+
color: #FFF;
|
280
|
+
text-align: left;
|
281
|
+
}
|
282
|
+
|
283
|
+
#fancybox-title-over {
|
284
|
+
padding: 10px;
|
285
|
+
background-image: url('/assets/kublog/fancybox/images/fancy_title_over.png');
|
286
|
+
display: block;
|
287
|
+
}
|
288
|
+
|
289
|
+
.fancybox-title-float {
|
290
|
+
position: absolute;
|
291
|
+
left: 0;
|
292
|
+
bottom: -20px;
|
293
|
+
height: 32px;
|
294
|
+
}
|
295
|
+
|
296
|
+
#fancybox-title-float-wrap {
|
297
|
+
border: none;
|
298
|
+
border-collapse: collapse;
|
299
|
+
width: auto;
|
300
|
+
}
|
301
|
+
|
302
|
+
#fancybox-title-float-wrap td {
|
303
|
+
border: none;
|
304
|
+
white-space: nowrap;
|
305
|
+
}
|
306
|
+
|
307
|
+
#fancybox-title-float-left {
|
308
|
+
padding: 0 0 0 15px;
|
309
|
+
background: url('/assets/kublog/fancybox/images/fancybox.png') -40px -90px no-repeat;
|
310
|
+
}
|
311
|
+
|
312
|
+
#fancybox-title-float-main {
|
313
|
+
color: #FFF;
|
314
|
+
line-height: 29px;
|
315
|
+
font-weight: bold;
|
316
|
+
padding: 0 0 3px 0;
|
317
|
+
background: url('/assets/kublog/fancybox/images/fancybox-x.png') 0px -40px;
|
318
|
+
}
|
319
|
+
|
320
|
+
#fancybox-title-float-right {
|
321
|
+
padding: 0 0 0 15px;
|
322
|
+
background: url('/assets/kublog/fancybox/images/fancybox.png') -55px -90px no-repeat;
|
323
|
+
}
|
324
|
+
|
325
|
+
/* IE6 */
|
326
|
+
|
327
|
+
.fancybox-ie6 #fancybox-close { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/assets/kublog/fancybox/images/fancy_close.png', sizingMethod='scale'); }
|
328
|
+
|
329
|
+
.fancybox-ie6 #fancybox-left-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/assets/kublog/fancybox/images/fancy_nav_left.png', sizingMethod='scale'); }
|
330
|
+
.fancybox-ie6 #fancybox-right-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/assets/kublog/fancybox/images/fancy_nav_right.png', sizingMethod='scale'); }
|
331
|
+
|
332
|
+
.fancybox-ie6 #fancybox-title-over { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/assets/kublog/fancybox/images/fancy_title_over.png', sizingMethod='scale'); zoom: 1; }
|
333
|
+
.fancybox-ie6 #fancybox-title-float-left { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/assets/kublog/fancybox/images/fancy_title_left.png', sizingMethod='scale'); }
|
334
|
+
.fancybox-ie6 #fancybox-title-float-main { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/assets/kublog/fancybox/images/fancy_title_main.png', sizingMethod='scale'); }
|
335
|
+
.fancybox-ie6 #fancybox-title-float-right { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/assets/kublog/fancybox/images/fancy_title_right.png', sizingMethod='scale'); }
|
336
|
+
|
337
|
+
.fancybox-ie6 #fancybox-bg-w, .fancybox-ie6 #fancybox-bg-e, .fancybox-ie6 #fancybox-left, .fancybox-ie6 #fancybox-right, #fancybox-hide-sel-frame {
|
338
|
+
height: expression(this.parentNode.clientHeight + "px");
|
339
|
+
}
|
340
|
+
|
341
|
+
#fancybox-loading.fancybox-ie6 {
|
342
|
+
position: absolute; margin-top: 0;
|
343
|
+
top: expression( (-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px');
|
344
|
+
}
|
345
|
+
|
346
|
+
#fancybox-loading.fancybox-ie6 div { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/assets/kublog/fancybox/images/fancy_loading.png', sizingMethod='scale'); }
|
347
|
+
|
348
|
+
/* IE6, IE7, IE8 */
|
349
|
+
|
350
|
+
.fancybox-ie .fancybox-bg { background: transparent !important; }
|
351
|
+
|
352
|
+
.fancybox-ie #fancybox-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/assets/kublog/fancybox/images/fancy_shadow_n.png', sizingMethod='scale'); }
|
353
|
+
.fancybox-ie #fancybox-bg-ne { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/assets/kublog/fancybox/images/fancy_shadow_ne.png', sizingMethod='scale'); }
|
354
|
+
.fancybox-ie #fancybox-bg-e { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/assets/kublog/fancybox/images/fancy_shadow_e.png', sizingMethod='scale'); }
|
355
|
+
.fancybox-ie #fancybox-bg-se { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/assets/kublog/fancybox/images/fancy_shadow_se.png', sizingMethod='scale'); }
|
356
|
+
.fancybox-ie #fancybox-bg-s { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/assets/kublog/fancybox/images/fancy_shadow_s.png', sizingMethod='scale'); }
|
357
|
+
.fancybox-ie #fancybox-bg-sw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/assets/kublog/fancybox/images/fancy_shadow_sw.png', sizingMethod='scale'); }
|
358
|
+
.fancybox-ie #fancybox-bg-w { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/assets/kublog/fancybox/images/fancy_shadow_w.png', sizingMethod='scale'); }
|
359
|
+
.fancybox-ie #fancybox-bg-nw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/assets/kublog/fancybox/images/fancy_shadow_nw.png', sizingMethod='scale'); }
|
@@ -0,0 +1,250 @@
|
|
1
|
+
/*! Copyright (c) 2008 Brandon Aaron (http://brandonaaron.net)
|
2
|
+
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
|
3
|
+
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
|
4
|
+
*
|
5
|
+
* Version: 1.0.3
|
6
|
+
* Requires jQuery 1.1.3+
|
7
|
+
* Docs: http://docs.jquery.com/Plugins/livequery
|
8
|
+
*/
|
9
|
+
|
10
|
+
(function($) {
|
11
|
+
|
12
|
+
$.extend($.fn, {
|
13
|
+
livequery: function(type, fn, fn2) {
|
14
|
+
var self = this, q;
|
15
|
+
|
16
|
+
// Handle different call patterns
|
17
|
+
if ($.isFunction(type))
|
18
|
+
fn2 = fn, fn = type, type = undefined;
|
19
|
+
|
20
|
+
// See if Live Query already exists
|
21
|
+
$.each( $.livequery.queries, function(i, query) {
|
22
|
+
if ( self.selector == query.selector && self.context == query.context &&
|
23
|
+
type == query.type && (!fn || fn.$lqguid == query.fn.$lqguid) && (!fn2 || fn2.$lqguid == query.fn2.$lqguid) )
|
24
|
+
// Found the query, exit the each loop
|
25
|
+
return (q = query) && false;
|
26
|
+
});
|
27
|
+
|
28
|
+
// Create new Live Query if it wasn't found
|
29
|
+
q = q || new $.livequery(this.selector, this.context, type, fn, fn2);
|
30
|
+
|
31
|
+
// Make sure it is running
|
32
|
+
q.stopped = false;
|
33
|
+
|
34
|
+
// Run it immediately for the first time
|
35
|
+
q.run();
|
36
|
+
|
37
|
+
// Contnue the chain
|
38
|
+
return this;
|
39
|
+
},
|
40
|
+
|
41
|
+
expire: function(type, fn, fn2) {
|
42
|
+
var self = this;
|
43
|
+
|
44
|
+
// Handle different call patterns
|
45
|
+
if ($.isFunction(type))
|
46
|
+
fn2 = fn, fn = type, type = undefined;
|
47
|
+
|
48
|
+
// Find the Live Query based on arguments and stop it
|
49
|
+
$.each( $.livequery.queries, function(i, query) {
|
50
|
+
if ( self.selector == query.selector && self.context == query.context &&
|
51
|
+
(!type || type == query.type) && (!fn || fn.$lqguid == query.fn.$lqguid) && (!fn2 || fn2.$lqguid == query.fn2.$lqguid) && !this.stopped )
|
52
|
+
$.livequery.stop(query.id);
|
53
|
+
});
|
54
|
+
|
55
|
+
// Continue the chain
|
56
|
+
return this;
|
57
|
+
}
|
58
|
+
});
|
59
|
+
|
60
|
+
$.livequery = function(selector, context, type, fn, fn2) {
|
61
|
+
this.selector = selector;
|
62
|
+
this.context = context || document;
|
63
|
+
this.type = type;
|
64
|
+
this.fn = fn;
|
65
|
+
this.fn2 = fn2;
|
66
|
+
this.elements = [];
|
67
|
+
this.stopped = false;
|
68
|
+
|
69
|
+
// The id is the index of the Live Query in $.livequery.queries
|
70
|
+
this.id = $.livequery.queries.push(this)-1;
|
71
|
+
|
72
|
+
// Mark the functions for matching later on
|
73
|
+
fn.$lqguid = fn.$lqguid || $.livequery.guid++;
|
74
|
+
if (fn2) fn2.$lqguid = fn2.$lqguid || $.livequery.guid++;
|
75
|
+
|
76
|
+
// Return the Live Query
|
77
|
+
return this;
|
78
|
+
};
|
79
|
+
|
80
|
+
$.livequery.prototype = {
|
81
|
+
stop: function() {
|
82
|
+
var query = this;
|
83
|
+
|
84
|
+
if ( this.type )
|
85
|
+
// Unbind all bound events
|
86
|
+
this.elements.unbind(this.type, this.fn);
|
87
|
+
else if (this.fn2)
|
88
|
+
// Call the second function for all matched elements
|
89
|
+
this.elements.each(function(i, el) {
|
90
|
+
query.fn2.apply(el);
|
91
|
+
});
|
92
|
+
|
93
|
+
// Clear out matched elements
|
94
|
+
this.elements = [];
|
95
|
+
|
96
|
+
// Stop the Live Query from running until restarted
|
97
|
+
this.stopped = true;
|
98
|
+
},
|
99
|
+
|
100
|
+
run: function() {
|
101
|
+
// Short-circuit if stopped
|
102
|
+
if ( this.stopped ) return;
|
103
|
+
var query = this;
|
104
|
+
|
105
|
+
var oEls = this.elements,
|
106
|
+
els = $(this.selector, this.context),
|
107
|
+
nEls = els.not(oEls);
|
108
|
+
|
109
|
+
// Set elements to the latest set of matched elements
|
110
|
+
this.elements = els;
|
111
|
+
|
112
|
+
if (this.type) {
|
113
|
+
// Bind events to newly matched elements
|
114
|
+
nEls.bind(this.type, this.fn);
|
115
|
+
|
116
|
+
// Unbind events to elements no longer matched
|
117
|
+
if (oEls.length > 0)
|
118
|
+
$.each(oEls, function(i, el) {
|
119
|
+
if ( $.inArray(el, els) < 0 )
|
120
|
+
$.event.remove(el, query.type, query.fn);
|
121
|
+
});
|
122
|
+
}
|
123
|
+
else {
|
124
|
+
// Call the first function for newly matched elements
|
125
|
+
nEls.each(function() {
|
126
|
+
query.fn.apply(this);
|
127
|
+
});
|
128
|
+
|
129
|
+
// Call the second function for elements no longer matched
|
130
|
+
if ( this.fn2 && oEls.length > 0 )
|
131
|
+
$.each(oEls, function(i, el) {
|
132
|
+
if ( $.inArray(el, els) < 0 )
|
133
|
+
query.fn2.apply(el);
|
134
|
+
});
|
135
|
+
}
|
136
|
+
}
|
137
|
+
};
|
138
|
+
|
139
|
+
$.extend($.livequery, {
|
140
|
+
guid: 0,
|
141
|
+
queries: [],
|
142
|
+
queue: [],
|
143
|
+
running: false,
|
144
|
+
timeout: null,
|
145
|
+
|
146
|
+
checkQueue: function() {
|
147
|
+
if ( $.livequery.running && $.livequery.queue.length ) {
|
148
|
+
var length = $.livequery.queue.length;
|
149
|
+
// Run each Live Query currently in the queue
|
150
|
+
while ( length-- )
|
151
|
+
$.livequery.queries[ $.livequery.queue.shift() ].run();
|
152
|
+
}
|
153
|
+
},
|
154
|
+
|
155
|
+
pause: function() {
|
156
|
+
// Don't run anymore Live Queries until restarted
|
157
|
+
$.livequery.running = false;
|
158
|
+
},
|
159
|
+
|
160
|
+
play: function() {
|
161
|
+
// Restart Live Queries
|
162
|
+
$.livequery.running = true;
|
163
|
+
// Request a run of the Live Queries
|
164
|
+
$.livequery.run();
|
165
|
+
},
|
166
|
+
|
167
|
+
registerPlugin: function() {
|
168
|
+
$.each( arguments, function(i,n) {
|
169
|
+
// Short-circuit if the method doesn't exist
|
170
|
+
if (!$.fn[n]) return;
|
171
|
+
|
172
|
+
// Save a reference to the original method
|
173
|
+
var old = $.fn[n];
|
174
|
+
|
175
|
+
// Create a new method
|
176
|
+
$.fn[n] = function() {
|
177
|
+
// Call the original method
|
178
|
+
var r = old.apply(this, arguments);
|
179
|
+
|
180
|
+
// Request a run of the Live Queries
|
181
|
+
$.livequery.run();
|
182
|
+
|
183
|
+
// Return the original methods result
|
184
|
+
return r;
|
185
|
+
}
|
186
|
+
});
|
187
|
+
},
|
188
|
+
|
189
|
+
run: function(id) {
|
190
|
+
if (id != undefined) {
|
191
|
+
// Put the particular Live Query in the queue if it doesn't already exist
|
192
|
+
if ( $.inArray(id, $.livequery.queue) < 0 )
|
193
|
+
$.livequery.queue.push( id );
|
194
|
+
}
|
195
|
+
else
|
196
|
+
// Put each Live Query in the queue if it doesn't already exist
|
197
|
+
$.each( $.livequery.queries, function(id) {
|
198
|
+
if ( $.inArray(id, $.livequery.queue) < 0 )
|
199
|
+
$.livequery.queue.push( id );
|
200
|
+
});
|
201
|
+
|
202
|
+
// Clear timeout if it already exists
|
203
|
+
if ($.livequery.timeout) clearTimeout($.livequery.timeout);
|
204
|
+
// Create a timeout to check the queue and actually run the Live Queries
|
205
|
+
$.livequery.timeout = setTimeout($.livequery.checkQueue, 20);
|
206
|
+
},
|
207
|
+
|
208
|
+
stop: function(id) {
|
209
|
+
if (id != undefined)
|
210
|
+
// Stop are particular Live Query
|
211
|
+
$.livequery.queries[ id ].stop();
|
212
|
+
else
|
213
|
+
// Stop all Live Queries
|
214
|
+
$.each( $.livequery.queries, function(id) {
|
215
|
+
$.livequery.queries[ id ].stop();
|
216
|
+
});
|
217
|
+
}
|
218
|
+
});
|
219
|
+
|
220
|
+
// Register core DOM manipulation methods
|
221
|
+
$.livequery.registerPlugin('append', 'prepend', 'after', 'before', 'wrap', 'attr', 'removeAttr', 'addClass', 'removeClass', 'toggleClass', 'empty', 'remove');
|
222
|
+
|
223
|
+
// Run Live Queries when the Document is ready
|
224
|
+
$(function() { $.livequery.play(); });
|
225
|
+
|
226
|
+
|
227
|
+
// Save a reference to the original init method
|
228
|
+
var init = $.prototype.init;
|
229
|
+
|
230
|
+
// Create a new init method that exposes two new properties: selector and context
|
231
|
+
$.prototype.init = function(a,c) {
|
232
|
+
// Call the original init and save the result
|
233
|
+
var r = init.apply(this, arguments);
|
234
|
+
|
235
|
+
// Copy over properties if they exist already
|
236
|
+
if (a && a.selector)
|
237
|
+
r.context = a.context, r.selector = a.selector;
|
238
|
+
|
239
|
+
// Set properties
|
240
|
+
if ( typeof a == 'string' )
|
241
|
+
r.context = c || document, r.selector = a;
|
242
|
+
|
243
|
+
// Return the result
|
244
|
+
return r;
|
245
|
+
};
|
246
|
+
|
247
|
+
// Give the init function the jQuery prototype for later instantiation (needed after Rev 4091)
|
248
|
+
$.prototype.init.prototype = $.prototype;
|
249
|
+
|
250
|
+
})(jQuery);
|