radiant-forum-extension 2.1.6 → 3.0.0.rc3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +20 -16
- data/Rakefile +0 -16
- data/app/controllers/forum_base_controller.rb +32 -10
- data/app/controllers/posts_controller.rb +37 -14
- data/app/helpers/forum_helper.rb +23 -16
- data/app/models/forum.rb +11 -7
- data/app/models/post.rb +53 -14
- data/app/models/post_attachment.rb +1 -1
- data/app/models/topic.rb +21 -8
- data/app/views/admin/dashboard/_forum_dashboard.html.haml +51 -0
- data/app/views/admin/forums/_form.html.haml +12 -0
- data/app/views/admin/forums/edit.html.haml +1 -1
- data/app/views/admin/forums/index.html.haml +16 -20
- data/app/views/admin/posts/_form.html.haml +2 -2
- data/app/views/admin/posts/edit.html.haml +1 -1
- data/app/views/admin/posts/index.html.haml +5 -5
- data/app/views/admin/reader_configuration/_edit_forum.html.haml +6 -0
- data/app/views/admin/reader_configuration/_forum.html.haml +5 -1
- data/app/views/admin/topics/_form.html.haml +3 -5
- data/app/views/admin/topics/edit.html.haml +1 -1
- data/app/views/admin/topics/index.html.haml +5 -5
- data/app/views/forums/_forum.html.haml +6 -5
- data/app/views/forums/_latest.html.haml +14 -12
- data/app/views/forums/_statistics.html.haml +4 -4
- data/app/views/forums/index.html.haml +8 -10
- data/app/views/forums/index.rss.builder +2 -2
- data/app/views/forums/show.html.haml +12 -15
- data/app/views/pages/_add_comment.html.haml +9 -8
- data/app/views/pages/_comments.html.haml +3 -3
- data/app/views/posts/_attachments.html.haml +1 -1
- data/app/views/posts/_confirm_delete.html.haml +7 -2
- data/app/views/posts/_context.html.haml +5 -5
- data/app/views/posts/_edit_links.html.haml +4 -4
- data/app/views/posts/_form.html.haml +15 -12
- data/app/views/posts/_ineditable.html.haml +7 -0
- data/app/views/posts/_latest.html.haml +3 -8
- data/app/views/posts/_minimal.html.haml +7 -0
- data/app/views/posts/_post.html.haml +20 -17
- data/app/views/posts/_post.rss.builder +2 -2
- data/app/views/posts/_search_form.html.haml +13 -13
- data/app/views/posts/_search_results.html.haml +15 -0
- data/app/views/posts/_search_summary.html.haml +13 -0
- data/app/views/posts/_uploader.html.haml +1 -1
- data/app/views/posts/edit.html.haml +22 -21
- data/app/views/posts/index.html.haml +12 -19
- data/app/views/posts/index.rss.builder +6 -6
- data/app/views/posts/new.html.haml +19 -22
- data/app/views/posts/remove.html.haml +15 -15
- data/app/views/posts/show.html.haml +16 -10
- data/app/views/readers/_forum_messages.html.haml +9 -6
- data/app/views/readers/_messages_summary.html.haml +1 -1
- data/app/views/shared/_standard_forum_parts.html.haml +41 -0
- data/app/views/topics/_busiest.html.haml +9 -8
- data/app/views/topics/_context.html.haml +11 -8
- data/app/views/topics/_latest.html.haml +2 -2
- data/app/views/topics/_locked.html.haml +1 -1
- data/app/views/topics/_minimal.html.haml +2 -2
- data/app/views/topics/_replies.html.haml +4 -3
- data/app/views/topics/_reply.html.haml +13 -8
- data/app/views/topics/_topic.html.haml +5 -9
- data/app/views/topics/_topic.rss.builder +1 -1
- data/app/views/topics/index.html.haml +14 -10
- data/app/views/topics/index.rss.builder +2 -2
- data/app/views/topics/show.html.haml +20 -19
- data/app/views/topics/show.rss.builder +3 -3
- data/config/initializers/radiant_config.rb +4 -1
- data/config/locales/en.yml +202 -178
- data/db/migrate/002_pages_commentable.rb +1 -2
- data/db/migrate/004_sample_layout.rb +38 -15
- data/db/migrate/20110111080550_detach_observer.rb +4 -4
- data/db/migrate/20110613112823_search_text.rb +9 -0
- data/db/migrate/20110613130230_tidy_up.rb +27 -0
- data/db/migrate/20110630083446_page_replied_at.rb +11 -0
- data/forum_extension.rb +13 -11
- data/lib/commentable_model.rb +13 -9
- data/lib/forum_admin_ui.rb +6 -6
- data/lib/forum_page.rb +5 -3
- data/lib/forum_reader.rb +7 -1
- data/lib/forum_reader_sessions_controller.rb +2 -3
- data/lib/forum_tags.rb +126 -11
- data/lib/radiant-forum-extension.rb +8 -0
- data/public/cleditor/images/buttons.gif +0 -0
- data/public/cleditor/images/icons/1.gif +0 -0
- data/public/cleditor/images/icons/10.gif +0 -0
- data/public/cleditor/images/icons/11.gif +0 -0
- data/public/cleditor/images/icons/12.gif +0 -0
- data/public/cleditor/images/icons/2.gif +0 -0
- data/public/cleditor/images/icons/3.gif +0 -0
- data/public/cleditor/images/icons/4.gif +0 -0
- data/public/cleditor/images/icons/5.gif +0 -0
- data/public/cleditor/images/icons/6.gif +0 -0
- data/public/cleditor/images/icons/7.gif +0 -0
- data/public/cleditor/images/icons/8.gif +0 -0
- data/public/cleditor/images/icons/9.gif +0 -0
- data/public/cleditor/images/icons/icons.gif +0 -0
- data/public/cleditor/images/toolbar.gif +0 -0
- data/public/cleditor/jquery.cleditor.css +24 -0
- data/public/cleditor/jquery.cleditor.icon.js +65 -0
- data/public/cleditor/jquery.cleditor.js +1132 -0
- data/public/cleditor/jquery.cleditor.xhtml.js +230 -0
- data/public/javascripts/forum.js +146 -107
- data/public/stylesheets/sass/forum.sass +94 -58
- data/radiant-forum-extension.gemspec +25 -276
- data/spec/controllers/forums_controller_spec.rb +0 -7
- data/spec/controllers/posts_controller_spec.rb +20 -37
- data/spec/controllers/topics_controller_spec.rb +1 -7
- data/spec/datasets/forums_dataset.rb +38 -40
- data/spec/lib/commentable_model_spec.rb +26 -38
- data/spec/lib/forum_reader_spec.rb +0 -4
- data/spec/models/forum_spec.rb +46 -16
- data/spec/models/post_spec.rb +10 -6
- data/spec/models/topic_spec.rb +26 -17
- data/spec/spec_helper.rb +1 -0
- metadata +66 -99
- data/VERSION +0 -1
- data/app/views/forums/_standard_parts.html.haml +0 -59
- data/lib/sanitize/config/forum.rb +0 -49
- data/public/javascripts/gallery.js +0 -275
- data/public/punymce/blank.htm +0 -1
- data/public/punymce/css/content.css +0 -4
- data/public/punymce/css/editor.css +0 -58
- data/public/punymce/i18n/sv.js +0 -28
- data/public/punymce/img/icons.gif +0 -0
- data/public/punymce/img/icons_uncompressed.png +0 -0
- data/public/punymce/plugins/bbcode.js +0 -1
- data/public/punymce/plugins/bbcode_src.js +0 -50
- data/public/punymce/plugins/editsource/css/editor.css +0 -3
- data/public/punymce/plugins/editsource/editsource.js +0 -1
- data/public/punymce/plugins/editsource/editsource_src.js +0 -81
- data/public/punymce/plugins/editsource/img/icons.gif +0 -0
- data/public/punymce/plugins/emoticons/css/content.css +0 -13
- data/public/punymce/plugins/emoticons/css/editor.css +0 -17
- data/public/punymce/plugins/emoticons/emoticons.js +0 -1
- data/public/punymce/plugins/emoticons/emoticons_src.js +0 -303
- data/public/punymce/plugins/emoticons/img/emoticons.gif +0 -0
- data/public/punymce/plugins/emoticons/img/emoticons.png +0 -0
- data/public/punymce/plugins/emoticons/img/trans.gif +0 -0
- data/public/punymce/plugins/entities.js +0 -1
- data/public/punymce/plugins/entities_src.js +0 -37
- data/public/punymce/plugins/forceblocks.js +0 -1
- data/public/punymce/plugins/forceblocks_src.js +0 -465
- data/public/punymce/plugins/forcenl.js +0 -1
- data/public/punymce/plugins/forcenl_src.js +0 -26
- data/public/punymce/plugins/image/css/editor.css +0 -1
- data/public/punymce/plugins/image/image.js +0 -1
- data/public/punymce/plugins/image/image_src.js +0 -30
- data/public/punymce/plugins/image/img/icons.gif +0 -0
- data/public/punymce/plugins/link/css/editor.css +0 -2
- data/public/punymce/plugins/link/img/icons.gif +0 -0
- data/public/punymce/plugins/link/link.js +0 -1
- data/public/punymce/plugins/link/link_src.js +0 -36
- data/public/punymce/plugins/paste.js +0 -1
- data/public/punymce/plugins/paste_src.js +0 -169
- data/public/punymce/plugins/protect.js +0 -1
- data/public/punymce/plugins/protect_src.js +0 -30
- data/public/punymce/plugins/safari2x.js +0 -1
- data/public/punymce/plugins/safari2x_src.js +0 -284
- data/public/punymce/plugins/tabfocus.js +0 -1
- data/public/punymce/plugins/tabfocus_src.js +0 -45
- data/public/punymce/plugins/textcolor/css/editor.css +0 -7
- data/public/punymce/plugins/textcolor/img/icons.gif +0 -0
- data/public/punymce/plugins/textcolor/textcolor.js +0 -1
- data/public/punymce/plugins/textcolor/textcolor_src.js +0 -73
- data/public/punymce/puny_mce.js +0 -1
- data/public/punymce/puny_mce_full.js +0 -1
- data/public/punymce/puny_mce_src.js +0 -1460
@@ -0,0 +1,65 @@
|
|
1
|
+
/**
|
2
|
+
@preserve CLEditor Icon Plugin v1.0
|
3
|
+
http://premiumsoftware.net/cleditor
|
4
|
+
requires CLEditor v1.2 or later
|
5
|
+
|
6
|
+
Copyright 2010, Chris Landowski, Premium Software, LLC
|
7
|
+
Dual licensed under the MIT or GPL Version 2 licenses.
|
8
|
+
*/
|
9
|
+
|
10
|
+
// ==ClosureCompiler==
|
11
|
+
// @compilation_level SIMPLE_OPTIMIZATIONS
|
12
|
+
// @output_file_name jquery.cleditor.icon.min.js
|
13
|
+
// ==/ClosureCompiler==
|
14
|
+
|
15
|
+
(function($) {
|
16
|
+
|
17
|
+
// Constants
|
18
|
+
var FOLDER = $.cleditor.imagesPath() + "icons/",
|
19
|
+
STRIP = "icons",
|
20
|
+
EXT = ".gif",
|
21
|
+
URL = "URL(" + FOLDER + STRIP + EXT + ")",
|
22
|
+
BUTTON_COUNT = 12,
|
23
|
+
BUTTON_WIDTH = 20,
|
24
|
+
BUTTON_HEIGHT = 20;
|
25
|
+
|
26
|
+
// Define the icon button
|
27
|
+
$.cleditor.buttons.icon = {
|
28
|
+
name: "icon",
|
29
|
+
css: {
|
30
|
+
backgroundImage: URL,
|
31
|
+
backgroundPosition: "2px 2px"
|
32
|
+
},
|
33
|
+
title: "Insert Icon",
|
34
|
+
command: "insertimage",
|
35
|
+
popupName: "Icon",
|
36
|
+
popupHover: true,
|
37
|
+
buttonClick: function(e, data) {
|
38
|
+
$(data.popup).width(60);
|
39
|
+
},
|
40
|
+
popupClick: function(e, data) {
|
41
|
+
var index = -parseInt(e.target.style.backgroundPosition) / BUTTON_WIDTH + 1;
|
42
|
+
data.value = FOLDER + index + EXT;
|
43
|
+
}
|
44
|
+
};
|
45
|
+
|
46
|
+
// Build the popup content
|
47
|
+
var $content = $("<div>");
|
48
|
+
for (var x = 0; x < BUTTON_COUNT; x++) {
|
49
|
+
$("<div>")
|
50
|
+
.css({
|
51
|
+
width: BUTTON_WIDTH,
|
52
|
+
height: BUTTON_HEIGHT,
|
53
|
+
backgroundImage: URL,
|
54
|
+
backgroundPosition: x * -BUTTON_WIDTH
|
55
|
+
})
|
56
|
+
.css("float", "left") // closure comiler errors when float is mapped
|
57
|
+
.appendTo($content);
|
58
|
+
}
|
59
|
+
$.cleditor.buttons.icon.popupContent = $content.children();
|
60
|
+
|
61
|
+
// Add the button to the default controls
|
62
|
+
$.cleditor.defaultOptions.controls = $.cleditor.defaultOptions.controls
|
63
|
+
.replace("| cut", "icon | cut");
|
64
|
+
|
65
|
+
})(jQuery);
|