inline_forms 2.0 → 2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/inline_forms +5 -10
- data/lib/app/assets/javascripts/ckeditor/config.js +39 -40
- data/lib/inline_forms/version.rb +1 -1
- metadata +1 -1
data/bin/inline_forms
CHANGED
@@ -90,7 +90,7 @@ module InlineForms
|
|
90
90
|
if dry_run?
|
91
91
|
empty_directory(app_name)
|
92
92
|
else
|
93
|
-
if ! run("rails
|
93
|
+
if ! run("rails new #{app_name} --skip-bundle --skip-gemfile --skip-test-unit")
|
94
94
|
say "Rails could not create the app '#{app_name}', maybe because it is a reserved word...", :red
|
95
95
|
exit 1
|
96
96
|
end
|
@@ -207,7 +207,7 @@ module InlineForms
|
|
207
207
|
ROUTE
|
208
208
|
|
209
209
|
say "- Mount Ckeditor::Engine to routes..."
|
210
|
-
insert_into_file "#{app_name}/config/routes.rb",
|
210
|
+
insert_into_file "#{app_name}/config/routes.rb", "\nmount Ckeditor::Engine => \"/ckeditor\"\n", :after => "routes.draw do\n"
|
211
211
|
|
212
212
|
say "- Create User Controller..."
|
213
213
|
create_file "#{app_name}/app/controllers/users_controller.rb", <<-USERS_CONTROLLER.strip_heredoc_with_indent
|
@@ -452,15 +452,10 @@ module InlineForms
|
|
452
452
|
DEVISE_MAILER_STUFF
|
453
453
|
|
454
454
|
say "- Setting autoload paths for ckeditor..."
|
455
|
-
insert_into_file "#{app_name}/config/application.rb", ' config.autoload_paths += %W(#{config.root}/app/models/ckeditor)\n
|
455
|
+
insert_into_file "#{app_name}/config/application.rb", ' config.autoload_paths += %W(#{config.root}/app/models/ckeditor)' + "\n", :after => "modules you want to be autoloadable.\n" unless dry_run?
|
456
456
|
|
457
|
-
|
458
|
-
|
459
|
-
Ckeditor.setup do |config|
|
460
|
-
config.authorize_with :cancan
|
461
|
-
end
|
462
|
-
|
463
|
-
CKEDITOR_INITIALIZER_FOR_CANCAN
|
457
|
+
say "- Adding cancan authorization to ckeditor"
|
458
|
+
gsub_file "#{app_name}/config/initializers/ckeditor.rb", "# config.authorize_with :cancan", "config.authorize_with :cancan"
|
464
459
|
|
465
460
|
say "- Capify..."
|
466
461
|
run 'capify .'
|
@@ -5,70 +5,69 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
|
|
5
5
|
|
6
6
|
CKEDITOR.editorConfig = function( config )
|
7
7
|
{
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
// Define changes to default configuration here. For example:
|
9
|
+
// config.language = 'fr';
|
10
|
+
// config.uiColor = '#AADC6E';
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
/* Filebrowser routes */
|
13
|
+
// The location of an external file browser, that should be launched when "Browse Server" button is pressed.
|
14
|
+
config.filebrowserBrowseUrl = "/ckeditor/attachment_files";
|
15
15
|
|
16
|
-
|
17
|
-
|
16
|
+
// The location of an external file browser, that should be launched when "Browse Server" button is pressed in the Flash dialog.
|
17
|
+
config.filebrowserFlashBrowseUrl = "/ckeditor/attachment_files";
|
18
18
|
|
19
|
-
|
20
|
-
|
19
|
+
// The location of a script that handles file uploads in the Flash dialog.
|
20
|
+
config.filebrowserFlashUploadUrl = "/ckeditor/attachment_files";
|
21
21
|
|
22
|
-
|
23
|
-
|
22
|
+
// The location of an external file browser, that should be launched when "Browse Server" button is pressed in the Link tab of Image dialog.
|
23
|
+
config.filebrowserImageBrowseLinkUrl = "/ckeditor/pictures";
|
24
24
|
|
25
|
-
|
26
|
-
|
25
|
+
// The location of an external file browser, that should be launched when "Browse Server" button is pressed in the Image dialog.
|
26
|
+
config.filebrowserImageBrowseUrl = "/ckeditor/pictures";
|
27
27
|
|
28
|
-
|
29
|
-
|
28
|
+
// The location of a script that handles file uploads in the Image dialog.
|
29
|
+
config.filebrowserImageUploadUrl = "/ckeditor/pictures";
|
30
30
|
|
31
|
-
|
32
|
-
|
31
|
+
// The location of a script that handles file uploads.
|
32
|
+
config.filebrowserUploadUrl = "/ckeditor/attachment_files";
|
33
33
|
|
34
|
-
|
35
|
-
|
36
|
-
|
34
|
+
// Rails CSRF token
|
35
|
+
config.filebrowserParams = function(){
|
36
|
+
var csrf_token = $('meta[name=csrf-token]').attr('content'),
|
37
37
|
csrf_param = $('meta[name=csrf-param]').attr('content'),
|
38
38
|
params = new Object();
|
39
39
|
|
40
|
-
|
41
|
-
|
42
|
-
|
40
|
+
if (csrf_param !== undefined && csrf_token !== undefined) {
|
41
|
+
params[csrf_param] = csrf_token;
|
42
|
+
}
|
43
43
|
|
44
|
-
|
45
|
-
|
44
|
+
return params;
|
45
|
+
};
|
46
46
|
|
47
|
-
|
48
|
-
|
49
|
-
|
47
|
+
/* Extra plugins */
|
48
|
+
// works only with en, ru, uk locales
|
49
|
+
// config.extraPlugins = "embed,attachment";
|
50
50
|
|
51
|
-
config.height =
|
52
|
-
config.width =
|
51
|
+
config.height = 400;
|
52
|
+
config.width = 600;
|
53
53
|
|
54
54
|
|
55
55
|
|
56
56
|
config.language = 'nl';
|
57
57
|
|
58
|
-
/* Toolbars */
|
59
|
-
|
60
|
-
config.toolbar = 'Minimal';
|
58
|
+
/* Toolbars */
|
61
59
|
|
62
60
|
config.toolbarCanCollapse = false;
|
63
61
|
|
64
62
|
config.toolbar_Minimal =
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
63
|
+
[
|
64
|
+
['Format','-','Bold','Italic','-','NumberedList','BulletedList','-','Link'],
|
65
|
+
['PasteFromWord','Source','Undo','Redo','RemoveFormat'],
|
66
|
+
];
|
69
67
|
|
70
|
-
|
71
|
-
|
68
|
+
config.toolbar_None =
|
69
|
+
[ '-' ];
|
72
70
|
|
71
|
+
config.toolbar = 'Minimal';
|
73
72
|
|
74
73
|
};
|
data/lib/inline_forms/version.rb
CHANGED