muck-comments 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -0
- data/VERSION +1 -1
- data/app/helpers/muck_comments_helper.rb +13 -0
- data/app/views/external/_disqus.html.erb +21 -0
- data/lib/muck_comments.rb +1 -3
- data/locales/ar.yml +1 -0
- data/locales/bg.yml +1 -0
- data/locales/ca.yml +2 -1
- data/locales/cs.yml +1 -0
- data/locales/da.yml +1 -0
- data/locales/de.yml +1 -0
- data/locales/el.yml +1 -0
- data/locales/en.yml +1 -0
- data/locales/es.yml +1 -0
- data/locales/et.yml +1 -0
- data/locales/fa.yml +1 -0
- data/locales/fi.yml +1 -0
- data/locales/fr.yml +1 -0
- data/locales/gl.yml +4 -3
- data/locales/hi.yml +1 -0
- data/locales/hr.yml +1 -0
- data/locales/hu.yml +3 -2
- data/locales/id.yml +1 -0
- data/locales/it.yml +1 -0
- data/locales/iw.yml +1 -0
- data/locales/ja.yml +1 -0
- data/locales/ko.yml +1 -0
- data/locales/lt.yml +1 -0
- data/locales/lv.yml +1 -0
- data/locales/mt.yml +2 -1
- data/locales/nl.yml +1 -0
- data/locales/no.yml +1 -0
- data/locales/pl.yml +1 -0
- data/locales/pt-PT.yml +1 -0
- data/locales/ro.yml +1 -0
- data/locales/ru.yml +1 -0
- data/locales/sk.yml +1 -0
- data/locales/sl.yml +1 -0
- data/locales/sq.yml +1 -0
- data/locales/sr.yml +1 -0
- data/locales/sv.yml +1 -0
- data/locales/th.yml +1 -0
- data/locales/tl.yml +1 -0
- data/locales/tr.yml +1 -0
- data/locales/uk.yml +1 -0
- data/locales/vi.yml +1 -0
- data/locales/zh-CN.yml +1 -0
- data/locales/zh-TW.yml +1 -0
- data/locales/zh.yml +1 -0
- data/muck-comments.gemspec +28 -2
- data/test/rails_root/Rakefile +9 -1
- data/test/rails_root/db/migrate/20090327231918_create_users.rb +40 -0
- data/test/rails_root/db/migrate/20090818204527_add_activity_indexes.rb +9 -0
- data/test/rails_root/db/migrate/20090819030523_add_attachable_to_activities.rb +13 -0
- data/test/rails_root/public/images/arrow_down.gif +0 -0
- data/test/rails_root/public/images/arrow_up.gif +0 -0
- data/test/rails_root/public/images/icons/blue_guy.png +0 -0
- data/test/rails_root/public/images/icons/button_background.png +0 -0
- data/test/rails_root/public/images/icons/cancel.png +0 -0
- data/test/rails_root/public/images/icons/close.png +0 -0
- data/test/rails_root/public/images/icons/comment.png +0 -0
- data/test/rails_root/public/images/icons/exclaim.png +0 -0
- data/test/rails_root/public/images/icons/grey_guy.png +0 -0
- data/test/rails_root/public/images/icons/hide.png +0 -0
- data/test/rails_root/public/images/icons/information.png +0 -0
- data/test/rails_root/public/images/icons/minus.png +0 -0
- data/test/rails_root/public/images/icons/question.png +0 -0
- data/test/rails_root/public/images/icons/search_box.png +0 -0
- data/test/rails_root/public/images/icons/star.png +0 -0
- data/test/rails_root/public/images/icons/stop.png +0 -0
- data/test/rails_root/public/images/icons/thumb_down.png +0 -0
- data/test/rails_root/public/images/icons/thumb_up.png +0 -0
- data/test/rails_root/public/javascripts/muck.js +4 -3
- data/test/rails_root/public/javascripts/muck_activities.js +4 -5
- data/test/rails_root/public/javascripts/muck_time/en.js +53 -0
- data/test/rails_root/public/stylesheets/styles.css +2 -5
- metadata +28 -2
data/Rakefile
CHANGED
@@ -60,6 +60,7 @@ begin
|
|
60
60
|
Jeweler::RubyforgeTasks.new do |rubyforge|
|
61
61
|
rubyforge.doc_task = "rdoc"
|
62
62
|
end
|
63
|
+
Jeweler::GemcutterTasks.new
|
63
64
|
rescue LoadError
|
64
65
|
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
|
65
66
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.12
|
@@ -33,4 +33,17 @@ module MuckCommentsHelper
|
|
33
33
|
:delete_path => comment_path(comment, :format => 'js') }
|
34
34
|
end
|
35
35
|
|
36
|
+
# outputs a partial that will embed disqus into any page with a unique url
|
37
|
+
#
|
38
|
+
# Extra instructions from the disqus site:
|
39
|
+
# Append #disqus_thread to the end of permalinks. The comment count code will replace the text of these links with the comment count.
|
40
|
+
# For example, you may have a link with this HTML:
|
41
|
+
# <a href="http://example.com/my_article.html#disqus_thread">Comments</a>
|
42
|
+
# The comment count code will replace the text "Comments" with the number of comments on the page http://example.com/my_article.html
|
43
|
+
#
|
44
|
+
# disqus_short_name: The short name you selected when setting up your site.
|
45
|
+
def disqus(disqus_short_name)
|
46
|
+
render :partial => 'external/disqus', :locals => { :disqus_short_name => disqus_short_name }
|
47
|
+
end
|
48
|
+
|
36
49
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<div id="disqus_thread"></div>
|
2
|
+
<script type="text/javascript" src="http://disqus.com/forums/<%= disqus_short_name %>/embed.js"></script>
|
3
|
+
<noscript><a href="http://<%= disqus_short_name %>.disqus.com/?url=ref"><%= t('muck.comments.view_thread') %></a></noscript>
|
4
|
+
<a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
|
5
|
+
|
6
|
+
<% content_for :javascript do -%>
|
7
|
+
<script type="text/javascript">
|
8
|
+
//<![CDATA[
|
9
|
+
(function() {
|
10
|
+
var links = document.getElementsByTagName('a');
|
11
|
+
var query = '?';
|
12
|
+
for(var i = 0; i < links.length; i++) {
|
13
|
+
if(links[i].href.indexOf('#disqus_thread') >= 0) {
|
14
|
+
query += 'url' + i + '=' + encodeURIComponent(links[i].href) + '&';
|
15
|
+
}
|
16
|
+
}
|
17
|
+
document.write('<script charset="utf-8" type="text/javascript" src="http://disqus.com/forums/<%= disqus_short_name %>/get_num_replies.js' + query + '"></' + 'script>');
|
18
|
+
})();
|
19
|
+
//]]>
|
20
|
+
</script>
|
21
|
+
<% end -%>
|
data/lib/muck_comments.rb
CHANGED
@@ -2,6 +2,4 @@ require 'acts_as_commentable_with_threading'
|
|
2
2
|
|
3
3
|
ActiveRecord::Base.class_eval { include ActiveRecord::Acts::MuckComment }
|
4
4
|
ActionController::Base.send :helper, MuckCommentsHelper
|
5
|
-
I18n.load_path += Dir[ File.join(File.dirname(__FILE__), '..', 'locales', '*.{rb,yml}') ]
|
6
|
-
|
7
|
-
Mime::Type.register "text/javascript", :pjs
|
5
|
+
I18n.load_path += Dir[ File.join(File.dirname(__FILE__), '..', 'locales', '*.{rb,yml}') ]
|
data/locales/ar.yml
CHANGED
data/locales/bg.yml
CHANGED
data/locales/ca.yml
CHANGED
@@ -7,7 +7,7 @@ ca:
|
|
7
7
|
add_comment: Comentari
|
8
8
|
add_comment_button: "Afegir comentari"
|
9
9
|
anonymous: Anònim
|
10
|
-
cant_delete_comment: "
|
10
|
+
cant_delete_comment: "Vostè no té permís per eliminar aquest comentari"
|
11
11
|
comment_removed: "Comentari eliminat amb èxit."
|
12
12
|
create_error: "No s'ha pogut crear l'{{errors}} comentari"
|
13
13
|
create_success: "Ha afegit un comentari"
|
@@ -16,3 +16,4 @@ ca:
|
|
16
16
|
new_comment_no_title: "Afegeix un comentari nou"
|
17
17
|
new_comment_with_title: "Afegir un nou comentari a l'{{title}}"
|
18
18
|
problem_adding_comment: "Hi va haver un problema en afegir el seu comentari"
|
19
|
+
view_thread: "Veure el fil de discussió."
|
data/locales/cs.yml
CHANGED
data/locales/da.yml
CHANGED
data/locales/de.yml
CHANGED
data/locales/el.yml
CHANGED
data/locales/en.yml
CHANGED
@@ -13,5 +13,6 @@ en:
|
|
13
13
|
problem_adding_comment: "There was a problem adding your comment"
|
14
14
|
new_comment_email_subject: "New comment from {{name}} on {{application_name}}"
|
15
15
|
anonymous: anonymous
|
16
|
+
view_thread: "View the discussion thread."
|
16
17
|
activity_templates:
|
17
18
|
comment: Comments
|
data/locales/es.yml
CHANGED
data/locales/et.yml
CHANGED
data/locales/fa.yml
CHANGED
data/locales/fi.yml
CHANGED
data/locales/fr.yml
CHANGED
data/locales/gl.yml
CHANGED
@@ -10,9 +10,10 @@ gl:
|
|
10
10
|
cant_delete_comment: "Non ten permiso para borrar este comentario"
|
11
11
|
comment_removed: "Comentario eliminado correctamente."
|
12
12
|
create_error: "Non se puido crear o {{errors}} comentario"
|
13
|
-
create_success: "
|
14
|
-
missing_comment_template_error: "
|
13
|
+
create_success: "Engadir comentario"
|
14
|
+
missing_comment_template_error: "Non se puido atopar un {{partial}}. parcial nomeado Por favor, cree un comentario parcial e ténteo de novo."
|
15
15
|
new_comment_email_subject: "Novo comentario de {{name}} en {{application_name}}"
|
16
16
|
new_comment_no_title: "Engadir un novo comentario"
|
17
17
|
new_comment_with_title: "Engadir un novo comentario para {{title}}"
|
18
|
-
problem_adding_comment: "
|
18
|
+
problem_adding_comment: "Houbo un problema ao engadir o teu comentario"
|
19
|
+
view_thread: "Ver tema a debate."
|
data/locales/hi.yml
CHANGED
data/locales/hr.yml
CHANGED
data/locales/hu.yml
CHANGED
@@ -4,9 +4,9 @@ hu:
|
|
4
4
|
activity_templates:
|
5
5
|
comment: Észrevételeket
|
6
6
|
comments:
|
7
|
-
add_comment:
|
7
|
+
add_comment: Megjegyzést
|
8
8
|
add_comment_button: "Add Comment"
|
9
|
-
anonymous:
|
9
|
+
anonymous: névtelenek
|
10
10
|
cant_delete_comment: "Önnek nincs jogosultsága törölni ezt a megjegyzést"
|
11
11
|
comment_removed: "Comment sikeresen eltávolították."
|
12
12
|
create_error: "Nem sikerült létrehozni a megjegyzés {{errors}}"
|
@@ -16,3 +16,4 @@ hu:
|
|
16
16
|
new_comment_no_title: "Hozzáadása Új hozzászólás"
|
17
17
|
new_comment_with_title: "Új hozzászólás a {{title}}"
|
18
18
|
problem_adding_comment: "Hiba történt a hozzáadja a comment"
|
19
|
+
view_thread: "Tekintse meg a téma megvitatását."
|
data/locales/id.yml
CHANGED
data/locales/it.yml
CHANGED
data/locales/iw.yml
CHANGED
data/locales/ja.yml
CHANGED
data/locales/ko.yml
CHANGED
data/locales/lt.yml
CHANGED
data/locales/lv.yml
CHANGED
data/locales/mt.yml
CHANGED
@@ -7,7 +7,7 @@ mt:
|
|
7
7
|
add_comment: Kumment
|
8
8
|
add_comment_button: "Add Comment"
|
9
9
|
anonymous: anonima
|
10
|
-
cant_delete_comment: "
|
10
|
+
cant_delete_comment: "Inti ma għandekx permess li tħassar dan il-kumment"
|
11
11
|
comment_removed: "Kumment jitneħħew b'suċċess."
|
12
12
|
create_error: "Tista 'ma toħloq l-{{errors}} kumment"
|
13
13
|
create_success: "Għaddew miżjud kumment"
|
@@ -16,3 +16,4 @@ mt:
|
|
16
16
|
new_comment_no_title: "Żid kumment"
|
17
17
|
new_comment_with_title: "Żid kumment li {{title}}"
|
18
18
|
problem_adding_comment: "Kien hemm problema żżid kumment tiegħek"
|
19
|
+
view_thread: "Ara l-ħajt diskussjoni."
|
data/locales/nl.yml
CHANGED
data/locales/no.yml
CHANGED
data/locales/pl.yml
CHANGED
data/locales/pt-PT.yml
CHANGED
data/locales/ro.yml
CHANGED
data/locales/ru.yml
CHANGED
data/locales/sk.yml
CHANGED
data/locales/sl.yml
CHANGED
data/locales/sq.yml
CHANGED
data/locales/sr.yml
CHANGED
data/locales/sv.yml
CHANGED
data/locales/th.yml
CHANGED
data/locales/tl.yml
CHANGED
data/locales/tr.yml
CHANGED
data/locales/uk.yml
CHANGED
data/locales/vi.yml
CHANGED
data/locales/zh-CN.yml
CHANGED
data/locales/zh-TW.yml
CHANGED
data/locales/zh.yml
CHANGED
data/muck-comments.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{muck-comments}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.12"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Justin Ball"]
|
12
|
-
s.date = %q{2009-10-
|
12
|
+
s.date = %q{2009-10-27}
|
13
13
|
s.description = %q{The comment engine for the muck system.}
|
14
14
|
s.email = %q{justinball@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -32,6 +32,7 @@ Gem::Specification.new do |s|
|
|
32
32
|
"app/views/comments/_form.html.erb",
|
33
33
|
"app/views/comments/index.html.erb",
|
34
34
|
"app/views/comments/new.html.erb",
|
35
|
+
"app/views/external/_disqus.html.erb",
|
35
36
|
"config/muck_comments_routes.rb",
|
36
37
|
"db/migrate/20090613173314_create_comments.rb",
|
37
38
|
"db/migrate/20090730154102_allow_null_user.rb",
|
@@ -118,6 +119,7 @@ Gem::Specification.new do |s|
|
|
118
119
|
"test/rails_root/config/routes.rb",
|
119
120
|
"test/rails_root/db/.keep",
|
120
121
|
"test/rails_root/db/migrate/20090320174818_create_muck_permissions_and_roles.rb",
|
122
|
+
"test/rails_root/db/migrate/20090327231918_create_users.rb",
|
121
123
|
"test/rails_root/db/migrate/20090402033319_add_muck_activities.rb",
|
122
124
|
"test/rails_root/db/migrate/20090402234137_create_languages.rb",
|
123
125
|
"test/rails_root/db/migrate/20090426041056_create_countries.rb",
|
@@ -131,6 +133,8 @@ Gem::Specification.new do |s|
|
|
131
133
|
"test/rails_root/db/migrate/20090730044139_add_comment_cache.rb",
|
132
134
|
"test/rails_root/db/migrate/20090730074858_add_comment_count_to_users.rb",
|
133
135
|
"test/rails_root/db/migrate/20090730154102_allow_null_user.rb",
|
136
|
+
"test/rails_root/db/migrate/20090818204527_add_activity_indexes.rb",
|
137
|
+
"test/rails_root/db/migrate/20090819030523_add_attachable_to_activities.rb",
|
134
138
|
"test/rails_root/features/comments.feature",
|
135
139
|
"test/rails_root/features/step_definitions/comment_steps.rb",
|
136
140
|
"test/rails_root/features/step_definitions/common_steps.rb",
|
@@ -144,8 +148,10 @@ Gem::Specification.new do |s|
|
|
144
148
|
"test/rails_root/public/500.html",
|
145
149
|
"test/rails_root/public/dispatch.rb",
|
146
150
|
"test/rails_root/public/favicon.ico",
|
151
|
+
"test/rails_root/public/images/arrow_down.gif",
|
147
152
|
"test/rails_root/public/images/arrow_left.gif",
|
148
153
|
"test/rails_root/public/images/arrow_right.gif",
|
154
|
+
"test/rails_root/public/images/arrow_up.gif",
|
149
155
|
"test/rails_root/public/images/fancybox/fancy_closebox.png",
|
150
156
|
"test/rails_root/public/images/fancybox/fancy_left.png",
|
151
157
|
"test/rails_root/public/images/fancybox/fancy_progress.png",
|
@@ -163,7 +169,23 @@ Gem::Specification.new do |s|
|
|
163
169
|
"test/rails_root/public/images/fancybox/fancy_title_right.png",
|
164
170
|
"test/rails_root/public/images/icons/accept.png",
|
165
171
|
"test/rails_root/public/images/icons/add.png",
|
172
|
+
"test/rails_root/public/images/icons/blue_guy.png",
|
173
|
+
"test/rails_root/public/images/icons/button_background.png",
|
174
|
+
"test/rails_root/public/images/icons/cancel.png",
|
175
|
+
"test/rails_root/public/images/icons/close.png",
|
176
|
+
"test/rails_root/public/images/icons/comment.png",
|
166
177
|
"test/rails_root/public/images/icons/delete.png",
|
178
|
+
"test/rails_root/public/images/icons/exclaim.png",
|
179
|
+
"test/rails_root/public/images/icons/grey_guy.png",
|
180
|
+
"test/rails_root/public/images/icons/hide.png",
|
181
|
+
"test/rails_root/public/images/icons/information.png",
|
182
|
+
"test/rails_root/public/images/icons/minus.png",
|
183
|
+
"test/rails_root/public/images/icons/question.png",
|
184
|
+
"test/rails_root/public/images/icons/search_box.png",
|
185
|
+
"test/rails_root/public/images/icons/star.png",
|
186
|
+
"test/rails_root/public/images/icons/stop.png",
|
187
|
+
"test/rails_root/public/images/icons/thumb_down.png",
|
188
|
+
"test/rails_root/public/images/icons/thumb_up.png",
|
167
189
|
"test/rails_root/public/images/icons/vote.png",
|
168
190
|
"test/rails_root/public/images/loading.gif",
|
169
191
|
"test/rails_root/public/images/nothing.png",
|
@@ -186,6 +208,7 @@ Gem::Specification.new do |s|
|
|
186
208
|
"test/rails_root/public/javascripts/jquery/jquery.tips.js",
|
187
209
|
"test/rails_root/public/javascripts/muck.js",
|
188
210
|
"test/rails_root/public/javascripts/muck_activities.js",
|
211
|
+
"test/rails_root/public/javascripts/muck_time/en.js",
|
189
212
|
"test/rails_root/public/javascripts/prototype.js",
|
190
213
|
"test/rails_root/public/javascripts/scriptaculous.js",
|
191
214
|
"test/rails_root/public/javascripts/slider.js",
|
@@ -364,6 +387,7 @@ Gem::Specification.new do |s|
|
|
364
387
|
"test/rails_root/config/initializers/session_store.rb",
|
365
388
|
"test/rails_root/config/routes.rb",
|
366
389
|
"test/rails_root/db/migrate/20090320174818_create_muck_permissions_and_roles.rb",
|
390
|
+
"test/rails_root/db/migrate/20090327231918_create_users.rb",
|
367
391
|
"test/rails_root/db/migrate/20090402033319_add_muck_activities.rb",
|
368
392
|
"test/rails_root/db/migrate/20090402234137_create_languages.rb",
|
369
393
|
"test/rails_root/db/migrate/20090426041056_create_countries.rb",
|
@@ -377,6 +401,8 @@ Gem::Specification.new do |s|
|
|
377
401
|
"test/rails_root/db/migrate/20090730044139_add_comment_cache.rb",
|
378
402
|
"test/rails_root/db/migrate/20090730074858_add_comment_count_to_users.rb",
|
379
403
|
"test/rails_root/db/migrate/20090730154102_allow_null_user.rb",
|
404
|
+
"test/rails_root/db/migrate/20090818204527_add_activity_indexes.rb",
|
405
|
+
"test/rails_root/db/migrate/20090819030523_add_attachable_to_activities.rb",
|
380
406
|
"test/rails_root/features/step_definitions/comment_steps.rb",
|
381
407
|
"test/rails_root/features/step_definitions/common_steps.rb",
|
382
408
|
"test/rails_root/features/step_definitions/webrat_steps.rb",
|
data/test/rails_root/Rakefile
CHANGED
@@ -12,4 +12,12 @@ require 'tasks/rails'
|
|
12
12
|
require 'muck_comments/tasks'
|
13
13
|
require 'muck_engine/tasks'
|
14
14
|
require 'muck_users/tasks'
|
15
|
-
require 'muck_activities/tasks'
|
15
|
+
require 'muck_activities/tasks'
|
16
|
+
|
17
|
+
namespace :muck do
|
18
|
+
|
19
|
+
def muck_gems
|
20
|
+
['../../muck-engine', '../../muck-users', '../../muck-activities', '../../muck-comments']
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
class CreateUsers < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :users, :force => true do |t|
|
4
|
+
t.string :login
|
5
|
+
t.string :email
|
6
|
+
t.string :first_name
|
7
|
+
t.string :last_name
|
8
|
+
t.string :crypted_password
|
9
|
+
t.string :password_salt
|
10
|
+
t.string :persistence_token, :null => false
|
11
|
+
t.string :single_access_token, :null => false
|
12
|
+
t.string :perishable_token, :null => false
|
13
|
+
t.integer :login_count, :null => false, :default => 0
|
14
|
+
t.integer :failed_login_count, :null => false, :default => 0
|
15
|
+
t.datetime :last_request_at
|
16
|
+
t.datetime :current_login_at
|
17
|
+
t.datetime :last_login_at
|
18
|
+
t.string :current_login_ip
|
19
|
+
t.string :last_login_ip
|
20
|
+
t.boolean :terms_of_service, :default => false, :null => false
|
21
|
+
t.string :time_zone, :default => "UTC"
|
22
|
+
t.datetime :disabled_at
|
23
|
+
t.datetime :created_at
|
24
|
+
t.datetime :activated_at
|
25
|
+
t.datetime :updated_at
|
26
|
+
t.string :identity_url
|
27
|
+
t.string :url_key
|
28
|
+
end
|
29
|
+
|
30
|
+
add_index :users, :login
|
31
|
+
add_index :users, :email
|
32
|
+
add_index :users, :persistence_token
|
33
|
+
add_index :users, :last_request_at
|
34
|
+
|
35
|
+
end
|
36
|
+
|
37
|
+
def self.down
|
38
|
+
drop_table :users
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class AddAttachableToActivities < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_column :activities, :attachable_id, :integer
|
4
|
+
add_column :activities, :attachable_type, :string
|
5
|
+
add_index :activities, ["attachable_id", "attachable_type"]
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.down
|
9
|
+
remove_column :activities, :attachable_id
|
10
|
+
remove_column :activities, :attachable_type
|
11
|
+
remove_index :activities, ["attachable_id", "attachable_type"]
|
12
|
+
end
|
13
|
+
end
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -69,12 +69,13 @@ jQuery(document).ready(function() {
|
|
69
69
|
jQuery("#global-login").focus(function() {
|
70
70
|
jQuery("#global-login").val("");
|
71
71
|
});
|
72
|
-
|
72
|
+
|
73
73
|
jQuery("#global-password").focus(function() {
|
74
74
|
jQuery("#global-password").val("");
|
75
75
|
});
|
76
|
-
|
76
|
+
|
77
77
|
jQuery("#quick-login-submit").click(function() {
|
78
78
|
jQuery("#quick-login").submit();
|
79
|
-
});
|
79
|
+
});
|
80
|
+
|
80
81
|
});
|
@@ -1,14 +1,13 @@
|
|
1
1
|
jQuery(document).ready(function() {
|
2
|
-
|
2
|
+
apply_activity_ajax_methods();
|
3
3
|
});
|
4
4
|
|
5
|
-
function
|
5
|
+
function apply_activity_ajax_methods(){
|
6
6
|
setup_comment_submit();
|
7
7
|
hide_comment_boxes();
|
8
8
|
apply_comment_hover();
|
9
9
|
apply_activity_hover();
|
10
|
-
jQuery('.activity-no-comments').hide();
|
11
|
-
|
10
|
+
jQuery('.activity-no-comments').hide();
|
12
11
|
jQuery('.activity-has-comments').find('textarea').click(function(){
|
13
12
|
show_comment_box(this);
|
14
13
|
});
|
@@ -57,7 +56,7 @@ function setup_comment_submit(){
|
|
57
56
|
comment_box.removeClass('activity-no-comments');
|
58
57
|
comment_box.addClass('activity-has-comments');
|
59
58
|
comment_box.find('textarea').show();
|
60
|
-
|
59
|
+
apply_activity_ajax_methods();
|
61
60
|
}
|
62
61
|
});
|
63
62
|
return false;
|
@@ -0,0 +1,53 @@
|
|
1
|
+
// from http://blog.peelmeagrape.net/2008/7/26/time-ago-in-words-javascript-part-1
|
2
|
+
function distanceOfTimeInWords(fromTime, toTime, includeSeconds) {
|
3
|
+
var fromSeconds = fromTime.getTime();
|
4
|
+
var toSeconds = toTime.getTime();
|
5
|
+
var distanceInSeconds = Math.round(Math.abs(fromSeconds - toSeconds) / 1000)
|
6
|
+
var distanceInMinutes = Math.round(distanceInSeconds / 60)
|
7
|
+
if (distanceInMinutes <= 1) {
|
8
|
+
if (!includeSeconds)
|
9
|
+
return (distanceInMinutes == 0) ? 'less than a minute' : '1 minute'
|
10
|
+
if (distanceInSeconds < 5)
|
11
|
+
return 'less than 5 seconds'
|
12
|
+
if (distanceInSeconds < 10)
|
13
|
+
return 'less than 10 seconds'
|
14
|
+
if (distanceInSeconds < 20)
|
15
|
+
return 'less than 20 seconds'
|
16
|
+
if (distanceInSeconds < 40)
|
17
|
+
return 'half a minute'
|
18
|
+
if (distanceInSeconds < 60)
|
19
|
+
return 'less than a minute'
|
20
|
+
return '1 minute'
|
21
|
+
}
|
22
|
+
if (distanceInMinutes < 45)
|
23
|
+
return distanceInMinutes + ' minutes'
|
24
|
+
if (distanceInMinutes < 90)
|
25
|
+
return "about 1 hour"
|
26
|
+
if (distanceInMinutes < 1440)
|
27
|
+
return "about " + (Math.round(distanceInMinutes / 60)) + ' hours'
|
28
|
+
if (distanceInMinutes < 2880)
|
29
|
+
return "1 day"
|
30
|
+
if (distanceInMinutes < 43200)
|
31
|
+
return (Math.round(distanceInMinutes / 1440)) + ' days'
|
32
|
+
if (distanceInMinutes < 86400)
|
33
|
+
return "about 1 month"
|
34
|
+
if (distanceInMinutes < 525600)
|
35
|
+
return (Math.round(distanceInMinutes / 43200)) + ' months'
|
36
|
+
if (distanceInMinutes < 1051200)
|
37
|
+
return "about 1 year"
|
38
|
+
return "over " + (Math.round(distanceInMinutes / 525600)) + ' years'
|
39
|
+
}
|
40
|
+
|
41
|
+
if ( typeof jQuery != "undefined" )
|
42
|
+
jQuery.fn.readableDate = function(){
|
43
|
+
return this.each(function(){
|
44
|
+
var span = jQuery(this);
|
45
|
+
var date = distanceOfTimeInWords(new Date(span.text()), new Date(), true);
|
46
|
+
if (date)
|
47
|
+
jQuery(this).text(date + ' ago');
|
48
|
+
});
|
49
|
+
};
|
50
|
+
|
51
|
+
jQuery(document).ready(function() {
|
52
|
+
jQuery(".readable-time").readableDate();
|
53
|
+
});
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/* general */
|
2
2
|
.center{text-align:center;}
|
3
3
|
#popup_wrapper{width:auto;}
|
4
|
+
.waiting{margin:3px 0;padding-left:20px;background:transparent url('/images/spinner.gif') no-repeat scroll left bottom;}
|
4
5
|
|
5
6
|
/* forms */
|
6
7
|
input{margin:0 10px 5px 0;padding:4px;font-size:1.3em;}
|
@@ -23,6 +24,7 @@ form fieldset input[type="text"],form fieldset input[type="password"]{width:500p
|
|
23
24
|
.button-link {background-color:transparent;border-top-width: 0px;border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;}
|
24
25
|
|
25
26
|
/*images*/
|
27
|
+
.tiny{width:24px;height:24px;}
|
26
28
|
.icon{width:50px;height:50px;}
|
27
29
|
.thumb{width:100px;height:100px;}
|
28
30
|
.medium{width:300px;height:300px;}
|
@@ -82,8 +84,3 @@ div.jGrowl div.jGrowl-notification h2{text-align:left;font-weight:bold;padding:5
|
|
82
84
|
#errorExplanation h2{text-align:left;font-weight:bold;padding:5px 5px 5px 15px;font-size:16px;background-color:#B61E12;color:#fff;}
|
83
85
|
#errorExplanation p{color:#333;margin-bottom:0;padding:5px;}
|
84
86
|
#errorExplanation ul li{list-style:square;}
|
85
|
-
|
86
|
-
/* iFrame */
|
87
|
-
.inner_shadow {-moz-background-clip:border;-moz-background-inline-policy:continuous;-moz-background-origin:padding;background:transparent url(/images/nothing.png) repeat-x scroll left bottom;height:3px;width:100%;}
|
88
|
-
.framed_content{height:100%;margin-bottom:-1px;width:100%;}
|
89
|
-
#content_iframe{border-top:1px solid #BCC5D3;border-width:1px 0 0;display:block;display:block;}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: muck-comments
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Ball
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-10-
|
12
|
+
date: 2009-10-27 00:00:00 -06:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -57,6 +57,7 @@ files:
|
|
57
57
|
- app/views/comments/_form.html.erb
|
58
58
|
- app/views/comments/index.html.erb
|
59
59
|
- app/views/comments/new.html.erb
|
60
|
+
- app/views/external/_disqus.html.erb
|
60
61
|
- config/muck_comments_routes.rb
|
61
62
|
- db/migrate/20090613173314_create_comments.rb
|
62
63
|
- db/migrate/20090730154102_allow_null_user.rb
|
@@ -143,6 +144,7 @@ files:
|
|
143
144
|
- test/rails_root/config/routes.rb
|
144
145
|
- test/rails_root/db/.keep
|
145
146
|
- test/rails_root/db/migrate/20090320174818_create_muck_permissions_and_roles.rb
|
147
|
+
- test/rails_root/db/migrate/20090327231918_create_users.rb
|
146
148
|
- test/rails_root/db/migrate/20090402033319_add_muck_activities.rb
|
147
149
|
- test/rails_root/db/migrate/20090402234137_create_languages.rb
|
148
150
|
- test/rails_root/db/migrate/20090426041056_create_countries.rb
|
@@ -156,6 +158,8 @@ files:
|
|
156
158
|
- test/rails_root/db/migrate/20090730044139_add_comment_cache.rb
|
157
159
|
- test/rails_root/db/migrate/20090730074858_add_comment_count_to_users.rb
|
158
160
|
- test/rails_root/db/migrate/20090730154102_allow_null_user.rb
|
161
|
+
- test/rails_root/db/migrate/20090818204527_add_activity_indexes.rb
|
162
|
+
- test/rails_root/db/migrate/20090819030523_add_attachable_to_activities.rb
|
159
163
|
- test/rails_root/features/comments.feature
|
160
164
|
- test/rails_root/features/step_definitions/comment_steps.rb
|
161
165
|
- test/rails_root/features/step_definitions/common_steps.rb
|
@@ -169,8 +173,10 @@ files:
|
|
169
173
|
- test/rails_root/public/500.html
|
170
174
|
- test/rails_root/public/dispatch.rb
|
171
175
|
- test/rails_root/public/favicon.ico
|
176
|
+
- test/rails_root/public/images/arrow_down.gif
|
172
177
|
- test/rails_root/public/images/arrow_left.gif
|
173
178
|
- test/rails_root/public/images/arrow_right.gif
|
179
|
+
- test/rails_root/public/images/arrow_up.gif
|
174
180
|
- test/rails_root/public/images/fancybox/fancy_closebox.png
|
175
181
|
- test/rails_root/public/images/fancybox/fancy_left.png
|
176
182
|
- test/rails_root/public/images/fancybox/fancy_progress.png
|
@@ -188,7 +194,23 @@ files:
|
|
188
194
|
- test/rails_root/public/images/fancybox/fancy_title_right.png
|
189
195
|
- test/rails_root/public/images/icons/accept.png
|
190
196
|
- test/rails_root/public/images/icons/add.png
|
197
|
+
- test/rails_root/public/images/icons/blue_guy.png
|
198
|
+
- test/rails_root/public/images/icons/button_background.png
|
199
|
+
- test/rails_root/public/images/icons/cancel.png
|
200
|
+
- test/rails_root/public/images/icons/close.png
|
201
|
+
- test/rails_root/public/images/icons/comment.png
|
191
202
|
- test/rails_root/public/images/icons/delete.png
|
203
|
+
- test/rails_root/public/images/icons/exclaim.png
|
204
|
+
- test/rails_root/public/images/icons/grey_guy.png
|
205
|
+
- test/rails_root/public/images/icons/hide.png
|
206
|
+
- test/rails_root/public/images/icons/information.png
|
207
|
+
- test/rails_root/public/images/icons/minus.png
|
208
|
+
- test/rails_root/public/images/icons/question.png
|
209
|
+
- test/rails_root/public/images/icons/search_box.png
|
210
|
+
- test/rails_root/public/images/icons/star.png
|
211
|
+
- test/rails_root/public/images/icons/stop.png
|
212
|
+
- test/rails_root/public/images/icons/thumb_down.png
|
213
|
+
- test/rails_root/public/images/icons/thumb_up.png
|
192
214
|
- test/rails_root/public/images/icons/vote.png
|
193
215
|
- test/rails_root/public/images/loading.gif
|
194
216
|
- test/rails_root/public/images/nothing.png
|
@@ -211,6 +233,7 @@ files:
|
|
211
233
|
- test/rails_root/public/javascripts/jquery/jquery.tips.js
|
212
234
|
- test/rails_root/public/javascripts/muck.js
|
213
235
|
- test/rails_root/public/javascripts/muck_activities.js
|
236
|
+
- test/rails_root/public/javascripts/muck_time/en.js
|
214
237
|
- test/rails_root/public/javascripts/prototype.js
|
215
238
|
- test/rails_root/public/javascripts/scriptaculous.js
|
216
239
|
- test/rails_root/public/javascripts/slider.js
|
@@ -410,6 +433,7 @@ test_files:
|
|
410
433
|
- test/rails_root/config/initializers/session_store.rb
|
411
434
|
- test/rails_root/config/routes.rb
|
412
435
|
- test/rails_root/db/migrate/20090320174818_create_muck_permissions_and_roles.rb
|
436
|
+
- test/rails_root/db/migrate/20090327231918_create_users.rb
|
413
437
|
- test/rails_root/db/migrate/20090402033319_add_muck_activities.rb
|
414
438
|
- test/rails_root/db/migrate/20090402234137_create_languages.rb
|
415
439
|
- test/rails_root/db/migrate/20090426041056_create_countries.rb
|
@@ -423,6 +447,8 @@ test_files:
|
|
423
447
|
- test/rails_root/db/migrate/20090730044139_add_comment_cache.rb
|
424
448
|
- test/rails_root/db/migrate/20090730074858_add_comment_count_to_users.rb
|
425
449
|
- test/rails_root/db/migrate/20090730154102_allow_null_user.rb
|
450
|
+
- test/rails_root/db/migrate/20090818204527_add_activity_indexes.rb
|
451
|
+
- test/rails_root/db/migrate/20090819030523_add_attachable_to_activities.rb
|
426
452
|
- test/rails_root/features/step_definitions/comment_steps.rb
|
427
453
|
- test/rails_root/features/step_definitions/common_steps.rb
|
428
454
|
- test/rails_root/features/step_definitions/webrat_steps.rb
|