inline_forms 1.0.11 → 1.0.12
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.
@@ -98,12 +98,16 @@ module InlineForms
|
|
98
98
|
@has_attached_files = "\n"
|
99
99
|
@presentation = "\n"
|
100
100
|
@order = "\n"
|
101
|
+
@carrierwave_mounters = "\n"
|
101
102
|
@inline_forms_attribute_list = String.new
|
102
103
|
|
103
104
|
for attribute in attributes
|
104
105
|
if attribute.column_type == :belongs_to # :drop_down, :references and :belongs_to all end up with the column_type :belongs_to
|
105
106
|
@belongs_to << ' belongs_to :' + attribute.name + "\n"
|
106
107
|
end
|
108
|
+
if attribute.column_type == :image_field # upload images via carrierwave
|
109
|
+
@carrierwave_mounters << ' mount_uploader :' + attribute.name + ', ' + "#{attribute.name}_uploader".camelcase + "\n"
|
110
|
+
end
|
107
111
|
if attribute.type == :has_many ||
|
108
112
|
attribute.type == :has_many_destroy
|
109
113
|
@has_many << ' has_many :' + attribute.name
|
@@ -118,10 +122,6 @@ module InlineForms
|
|
118
122
|
attribute.type == :check_list
|
119
123
|
@habtm << ' has_and_belongs_to_many :' + attribute.name + "\n"
|
120
124
|
end
|
121
|
-
if attribute.type == :image
|
122
|
-
@has_attached_files << " has_attached_file :#{attribute.name},
|
123
|
-
:styles => { :medium => \"300x300>\", :thumb => \"100x100>\" }\n"
|
124
|
-
end
|
125
125
|
if attribute.name == '_presentation'
|
126
126
|
@presentation << " def _presentation\n" +
|
127
127
|
" \"#{attribute.type.to_s}\"\n" +
|
@@ -2,7 +2,7 @@ class <%= name %> < ActiveRecord::Base
|
|
2
2
|
attr_reader :per_page
|
3
3
|
@per_page = 7
|
4
4
|
attr_writer :inline_forms_attribute_list
|
5
|
-
|
5
|
+
<%= @carrierwave_mounters if @carrierwave_mounters.length > 1 -%>
|
6
6
|
<%= @belongs_to if @belongs_to.length > 1 -%>
|
7
7
|
<%= @has_many if @has_many.length > 1 -%>
|
8
8
|
<%= @has_one if @has_one.length > 1 -%>
|
data/lib/inline_forms/version.rb
CHANGED
data/lib/otherstuff/bump
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
rule /^version:bump:.*/ do |t|
|
2
|
+
sh "git status | grep 'nothing to commit'" # ensure we are not dirty
|
3
|
+
index = ['major', 'minor','patch'].index(t.name.split(':').last)
|
4
|
+
file = 'lib/GEM_NAME/version.rb'
|
5
|
+
|
6
|
+
version_file = File.read(file)
|
7
|
+
old_version, *version_parts = version_file.match(/(\d+)\.(\d+)\.(\d+)/).to_a
|
8
|
+
version_parts[index] = version_parts[index].to_i + 1
|
9
|
+
new_version = version_parts * '.'
|
10
|
+
File.open(file,'w'){|f| f.write(version_file.sub(old_version, new_version)) }
|
11
|
+
|
12
|
+
sh "bundle && git add #{file} Gemfile.lock && git commit -m 'bump version to #{new_version}'"
|
13
|
+
end
|
@@ -0,0 +1,88 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
|
6
|
+
CKEDITOR.editorConfig = function( config )
|
7
|
+
{
|
8
|
+
// Define changes to default configuration here. For example:
|
9
|
+
// config.language = 'fr';
|
10
|
+
// config.uiColor = '#AADC6E';
|
11
|
+
|
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
|
+
|
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
|
+
|
19
|
+
// The location of a script that handles file uploads in the Flash dialog.
|
20
|
+
config.filebrowserFlashUploadUrl = "/ckeditor/attachment_files";
|
21
|
+
|
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
|
+
|
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
|
+
|
28
|
+
// The location of a script that handles file uploads in the Image dialog.
|
29
|
+
config.filebrowserImageUploadUrl = "/ckeditor/pictures";
|
30
|
+
|
31
|
+
// The location of a script that handles file uploads.
|
32
|
+
config.filebrowserUploadUrl = "/ckeditor/attachment_files";
|
33
|
+
|
34
|
+
// Rails CSRF token
|
35
|
+
config.filebrowserParams = function(){
|
36
|
+
var csrf_token = $('meta[name=csrf-token]').attr('content'),
|
37
|
+
csrf_param = $('meta[name=csrf-param]').attr('content'),
|
38
|
+
params = new Object();
|
39
|
+
|
40
|
+
if (csrf_param !== undefined && csrf_token !== undefined) {
|
41
|
+
params[csrf_param] = csrf_token;
|
42
|
+
}
|
43
|
+
|
44
|
+
return params;
|
45
|
+
};
|
46
|
+
|
47
|
+
/* Extra plugins */
|
48
|
+
// works only with en, ru, uk locales
|
49
|
+
config.extraPlugins = "embed,attachment";
|
50
|
+
|
51
|
+
config.height = '400px';
|
52
|
+
config.width = '600px';
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
config.language = 'nl';
|
57
|
+
|
58
|
+
|
59
|
+
config.toolbar = 'Minimal';
|
60
|
+
|
61
|
+
config.toolbarCanCollapse = false;
|
62
|
+
|
63
|
+
config.toolbar_Minimal =
|
64
|
+
[
|
65
|
+
['Format','-','Bold','Italic','-','NumberedList','BulletedList','-','Link'],
|
66
|
+
['PasteFromWord','Source','Undo','Redo','RemoveFormat'],
|
67
|
+
];
|
68
|
+
|
69
|
+
/* Toolbars */
|
70
|
+
config.toolbar = 'Easy';
|
71
|
+
|
72
|
+
config.toolbar_Easy =
|
73
|
+
[
|
74
|
+
['Source','-','Preview'],
|
75
|
+
['Cut','Copy','Paste','PasteText','PasteFromWord',],
|
76
|
+
['Undo','Redo','-','SelectAll','RemoveFormat'],
|
77
|
+
['Styles','Format'], ['Subscript', 'Superscript', 'TextColor'], ['Maximize','-','About'], '/',
|
78
|
+
['Bold','Italic','Underline','Strike'], ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],
|
79
|
+
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
|
80
|
+
['Link','Unlink','Anchor'], ['Image', 'Attachment', 'Flash', 'Embed'],
|
81
|
+
['Table','HorizontalRule','Smiley','SpecialChar','PageBreak']
|
82
|
+
];
|
83
|
+
|
84
|
+
config.toolbar_None =
|
85
|
+
[ '-' ];
|
86
|
+
|
87
|
+
|
88
|
+
};
|
data/lib/otherstuff/mk31-app
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inline_forms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 12
|
10
|
+
version: 1.0.12
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ace Suares
|
@@ -184,6 +184,8 @@ files:
|
|
184
184
|
- lib/inline_forms/version.rb
|
185
185
|
- lib/otherstuff/Gemfile
|
186
186
|
- lib/otherstuff/add_roles.sql
|
187
|
+
- lib/otherstuff/bump
|
188
|
+
- lib/otherstuff/ckeditor/config.js
|
187
189
|
- lib/otherstuff/database.yml
|
188
190
|
- lib/otherstuff/diffie
|
189
191
|
- lib/otherstuff/mk-ice-ts
|