card 1.96.5 → 1.96.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/db/migrate_core_cards/{20150510031118_fix_skin_images.rb → 20150510031118_fix_skin_codenames.rb} +1 -1
- data/db/migrate_core_cards/{20170720093738_update_layout.rb → 20181120200937_update_layout.rb} +0 -0
- data/db/migrate_core_cards/data/cards/Xheader +17 -16
- data/db/seed/new/card_actions.yml +1162 -1162
- data/db/seed/new/card_acts.yml +2 -2
- data/db/seed/new/card_references.yml +155 -148
- data/db/seed/new/cards.yml +1613 -1613
- data/db/seed/new/schema_migrations_core_cards.yml +4 -0
- data/db/seed/test/fixtures/card_actions.yml +2152 -2152
- data/db/seed/test/fixtures/card_acts.yml +447 -447
- data/db/seed/test/fixtures/card_changes.yml +66 -66
- data/db/seed/test/fixtures/card_references.yml +985 -978
- data/db/seed/test/fixtures/cards.yml +2617 -2617
- data/db/seed/test/fixtures/schema_migrations_core_cards.yml +4 -0
- data/db/version_core_cards.txt +1 -1
- data/lib/card/format.rb +1 -1
- data/lib/card/format/permission.rb +1 -1
- data/lib/card/set/event/callbacks.rb +11 -3
- data/mod/bootstrap/db/migrate_core_cards/20181129140917_fix_skin_images.rb +12 -0
- data/{db/migrate_core_cards → mod/bootstrap/db/migrate_core_cards/data}/20181108181219_migrate_classic_skins_to_bootstrap.rb +9 -1
- data/mod/bootstrap/db/migrate_core_cards/lib/skin.rb +1 -1
- data/mod/bootstrap/file/cerulean_skin_image/image-icon.png +0 -0
- data/mod/bootstrap/file/cerulean_skin_image/image-large.png +0 -0
- data/mod/bootstrap/file/cerulean_skin_image/image-medium.png +0 -0
- data/mod/bootstrap/file/cerulean_skin_image/image-original.png +0 -0
- data/mod/bootstrap/file/cerulean_skin_image/image-small.png +0 -0
- data/mod/bootstrap/file/cosmo_skin_image/image-icon.png +0 -0
- data/mod/bootstrap/file/cosmo_skin_image/image-large.png +0 -0
- data/mod/bootstrap/file/cosmo_skin_image/image-medium.png +0 -0
- data/mod/bootstrap/file/cosmo_skin_image/image-original.png +0 -0
- data/mod/bootstrap/file/cosmo_skin_image/image-small.png +0 -0
- data/mod/bootstrap/file/cyborg_skin_image/image-icon.png +0 -0
- data/mod/bootstrap/file/cyborg_skin_image/image-large.png +0 -0
- data/mod/bootstrap/file/cyborg_skin_image/image-medium.png +0 -0
- data/mod/bootstrap/file/cyborg_skin_image/image-original.png +0 -0
- data/mod/bootstrap/file/cyborg_skin_image/image-small.png +0 -0
- data/mod/bootstrap/file/darkly_skin_image/image-icon.png +0 -0
- data/mod/bootstrap/file/darkly_skin_image/image-large.png +0 -0
- data/mod/bootstrap/file/darkly_skin_image/image-medium.png +0 -0
- data/mod/bootstrap/file/darkly_skin_image/image-original.png +0 -0
- data/mod/bootstrap/file/darkly_skin_image/image-small.png +0 -0
- data/mod/bootstrap/file/flatly_skin_image/image-icon.png +0 -0
- data/mod/bootstrap/file/flatly_skin_image/image-large.png +0 -0
- data/mod/bootstrap/file/flatly_skin_image/image-medium.png +0 -0
- data/mod/bootstrap/file/flatly_skin_image/image-original.png +0 -0
- data/mod/bootstrap/file/flatly_skin_image/image-small.png +0 -0
- data/mod/bootstrap/file/journal_skin_image/image-icon.png +0 -0
- data/mod/bootstrap/file/journal_skin_image/image-large.png +0 -0
- data/mod/bootstrap/file/journal_skin_image/image-medium.png +0 -0
- data/mod/bootstrap/file/journal_skin_image/image-original.png +0 -0
- data/mod/bootstrap/file/journal_skin_image/image-small.png +0 -0
- data/mod/bootstrap/file/litera_skin_image/image-icon.png +0 -0
- data/mod/bootstrap/file/litera_skin_image/image-large.png +0 -0
- data/mod/bootstrap/file/litera_skin_image/image-medium.png +0 -0
- data/mod/bootstrap/file/litera_skin_image/image-original.png +0 -0
- data/mod/bootstrap/file/litera_skin_image/image-small.png +0 -0
- data/mod/bootstrap/file/lumen_skin_image/image-icon.png +0 -0
- data/mod/bootstrap/file/lumen_skin_image/image-large.png +0 -0
- data/mod/bootstrap/file/lumen_skin_image/image-medium.png +0 -0
- data/mod/bootstrap/file/lumen_skin_image/image-original.png +0 -0
- data/mod/bootstrap/file/lumen_skin_image/image-small.png +0 -0
- data/mod/bootstrap/file/lux_skin_image/image-icon.png +0 -0
- data/mod/bootstrap/file/lux_skin_image/image-large.png +0 -0
- data/mod/bootstrap/file/lux_skin_image/image-medium.png +0 -0
- data/mod/bootstrap/file/lux_skin_image/image-original.png +0 -0
- data/mod/bootstrap/file/lux_skin_image/image-small.png +0 -0
- data/mod/bootstrap/file/materia_skin_image/image-icon.png +0 -0
- data/mod/bootstrap/file/materia_skin_image/image-large.png +0 -0
- data/mod/bootstrap/file/materia_skin_image/image-medium.png +0 -0
- data/mod/bootstrap/file/materia_skin_image/image-original.png +0 -0
- data/mod/bootstrap/file/materia_skin_image/image-small.png +0 -0
- data/mod/bootstrap/file/minty_skin_image/image-icon.png +0 -0
- data/mod/bootstrap/file/minty_skin_image/image-large.png +0 -0
- data/mod/bootstrap/file/minty_skin_image/image-medium.png +0 -0
- data/mod/bootstrap/file/minty_skin_image/image-original.png +0 -0
- data/mod/bootstrap/file/minty_skin_image/image-small.png +0 -0
- data/mod/bootstrap/file/paper_skin_image/image-large.png +0 -0
- data/mod/bootstrap/file/paper_skin_image/image-medium.png +0 -0
- data/mod/bootstrap/file/paper_skin_image/image-small.png +0 -0
- data/mod/bootstrap/file/pulse_skin_image/image-icon.png +0 -0
- data/mod/bootstrap/file/pulse_skin_image/image-large.png +0 -0
- data/mod/bootstrap/file/pulse_skin_image/image-medium.png +0 -0
- data/mod/bootstrap/file/pulse_skin_image/image-original.png +0 -0
- data/mod/bootstrap/file/pulse_skin_image/image-small.png +0 -0
- data/mod/bootstrap/file/readable_skin_image/image-large.png +0 -0
- data/mod/bootstrap/file/readable_skin_image/image-medium.png +0 -0
- data/mod/bootstrap/file/readable_skin_image/image-small.png +0 -0
- data/mod/bootstrap/file/sandstone_skin_image/image-icon.png +0 -0
- data/mod/bootstrap/file/sandstone_skin_image/image-large.png +0 -0
- data/mod/bootstrap/file/sandstone_skin_image/image-medium.png +0 -0
- data/mod/bootstrap/file/sandstone_skin_image/image-original.png +0 -0
- data/mod/bootstrap/file/sandstone_skin_image/image-small.png +0 -0
- data/mod/bootstrap/file/simplex_skin_image/image-icon.png +0 -0
- data/mod/bootstrap/file/simplex_skin_image/image-large.png +0 -0
- data/mod/bootstrap/file/simplex_skin_image/image-medium.png +0 -0
- data/mod/bootstrap/file/simplex_skin_image/image-original.png +0 -0
- data/mod/bootstrap/file/simplex_skin_image/image-small.png +0 -0
- data/mod/bootstrap/file/sketchy_skin_image/image-icon.png +0 -0
- data/mod/bootstrap/file/sketchy_skin_image/image-large.png +0 -0
- data/mod/bootstrap/file/sketchy_skin_image/image-medium.png +0 -0
- data/mod/bootstrap/file/sketchy_skin_image/image-original.png +0 -0
- data/mod/bootstrap/file/sketchy_skin_image/image-small.png +0 -0
- data/mod/bootstrap/file/slate_skin_image/image-icon.png +0 -0
- data/mod/bootstrap/file/slate_skin_image/image-large.png +0 -0
- data/mod/bootstrap/file/slate_skin_image/image-medium.png +0 -0
- data/mod/bootstrap/file/slate_skin_image/image-original.png +0 -0
- data/mod/bootstrap/file/slate_skin_image/image-small.png +0 -0
- data/mod/bootstrap/file/solar_skin_image/image-icon.png +0 -0
- data/mod/bootstrap/file/solar_skin_image/image-large.png +0 -0
- data/mod/bootstrap/file/solar_skin_image/image-medium.png +0 -0
- data/mod/bootstrap/file/solar_skin_image/image-original.png +0 -0
- data/mod/bootstrap/file/solar_skin_image/image-small.png +0 -0
- data/mod/bootstrap/file/spacelab_skin_image/image-icon.png +0 -0
- data/mod/bootstrap/file/spacelab_skin_image/image-large.png +0 -0
- data/mod/bootstrap/file/spacelab_skin_image/image-medium.png +0 -0
- data/mod/bootstrap/file/spacelab_skin_image/image-original.png +0 -0
- data/mod/bootstrap/file/spacelab_skin_image/image-small.png +0 -0
- data/mod/bootstrap/file/superhero_skin_image/image-icon.png +0 -0
- data/mod/bootstrap/file/superhero_skin_image/image-large.png +0 -0
- data/mod/bootstrap/file/superhero_skin_image/image-medium.png +0 -0
- data/mod/bootstrap/file/superhero_skin_image/image-original.png +0 -0
- data/mod/bootstrap/file/superhero_skin_image/image-small.png +0 -0
- data/mod/bootstrap/file/united_skin_image/image-icon.png +0 -0
- data/mod/bootstrap/file/united_skin_image/image-large.png +0 -0
- data/mod/bootstrap/file/united_skin_image/image-medium.png +0 -0
- data/mod/bootstrap/file/united_skin_image/image-original.png +0 -0
- data/mod/bootstrap/file/united_skin_image/image-small.png +0 -0
- data/mod/bootstrap/file/yeti_skin_image/image-icon.png +0 -0
- data/mod/bootstrap/file/yeti_skin_image/image-large.png +0 -0
- data/mod/bootstrap/file/yeti_skin_image/image-medium.png +0 -0
- data/mod/bootstrap/file/yeti_skin_image/image-original.png +0 -0
- data/mod/bootstrap/file/yeti_skin_image/image-small.png +0 -0
- data/mod/carrierwave/lib/carrier_wave/cardmount.rb +8 -1
- data/mod/carrierwave/lib/carrier_wave/file_card_uploader.rb +7 -2
- data/mod/carrierwave/spec/set/type/file_spec.rb +1 -0
- data/mod/core/spec/format/html_format_spec.rb +1 -1
- data/mod/history/lib/card/act/act_renderer.rb +3 -3
- data/mod/history/lib/card/action.rb +18 -3
- data/mod/machines/public/assets/jquery-ui-smoothness/ui-icons_222222_256x240.png +0 -0
- data/mod/machines/public/assets/jquery-ui-smoothness/ui-icons_2e83ff_256x240.png +0 -0
- data/mod/machines/public/assets/jquery-ui-smoothness/ui-icons_454545_256x240.png +0 -0
- data/mod/machines/public/assets/jquery-ui-smoothness/ui-icons_888888_256x240.png +0 -0
- data/mod/machines/public/assets/jquery-ui-smoothness/ui-icons_cd0a0a_256x240.png +0 -0
- data/mod/standard/file/credit_image/image-icon.png +0 -0
- data/mod/standard/file/credit_image/image-large.png +0 -0
- data/mod/standard/file/credit_image/image-medium.png +0 -0
- data/mod/standard/file/credit_image/image-original.png +0 -0
- data/mod/standard/file/credit_image/image-small.png +0 -0
- data/mod/standard/file/favicon/image-icon.png +0 -0
- data/mod/standard/file/favicon/image-small.png +0 -0
- data/mod/standard/file/logo/image-icon.png +0 -0
- data/mod/standard/file/logo/image-large.png +0 -0
- data/mod/standard/file/logo/image-medium.png +0 -0
- data/mod/standard/file/logo/image-original.png +0 -0
- data/mod/standard/file/logo/image-small.png +0 -0
- data/mod/standard/set/all/rich_html/error.rb +1 -1
- data/mod/standard/set/all/rich_html/frame.rb +1 -1
- data/mod/standard/set/all/rich_html/new.rb +6 -1
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/skin.min.css.map +0 -0
- metadata +9 -7
@@ -183,3 +183,7 @@ schema_migrations_core_cards_091:
|
|
183
183
|
version: '20180601133753'
|
184
184
|
schema_migrations_core_cards_092:
|
185
185
|
version: '20181108181219'
|
186
|
+
schema_migrations_core_cards_093:
|
187
|
+
version: '20181120200937'
|
188
|
+
schema_migrations_core_cards_094:
|
189
|
+
version: '20181129140917'
|
data/db/version_core_cards.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
20181129140917
|
data/lib/card/format.rb
CHANGED
@@ -10,11 +10,19 @@ class Card
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def set_event_callback object_method, kind
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
valid_event_callback kind, object_method do
|
14
|
+
Card.class_exec(self) do |event|
|
15
|
+
set_callback object_method, kind, event.name,
|
16
|
+
prepend: true, if: proc { |c| c.event_applies?(event) }
|
17
|
+
end
|
16
18
|
end
|
17
19
|
end
|
20
|
+
|
21
|
+
def valid_event_callback kind, method
|
22
|
+
yield
|
23
|
+
rescue NoMethodError
|
24
|
+
raise "invalid event callback: `#{kind}: #{method}`"
|
25
|
+
end
|
18
26
|
end
|
19
27
|
end
|
20
28
|
end
|
@@ -1,5 +1,5 @@
|
|
1
|
+
# fix sites still using no-longer supported skins and layouts
|
1
2
|
class MigrateClassicSkinsToBootstrap < ActiveRecord::Migration[5.2]
|
2
|
-
|
3
3
|
UNSUPPORTED_SKINS = %w[
|
4
4
|
classic_skin
|
5
5
|
customized_classic_skin
|
@@ -10,10 +10,18 @@ class MigrateClassicSkinsToBootstrap < ActiveRecord::Migration[5.2]
|
|
10
10
|
|
11
11
|
DEFAULT_SKIN = "yeti skin".freeze
|
12
12
|
|
13
|
+
UNSUPPORTED_LAYOUT = "classic_layout".freeze
|
14
|
+
|
15
|
+
DEFAULT_LAYOUT = "Default Layout".freeze
|
16
|
+
|
13
17
|
def change
|
14
18
|
style_rule = Card[:all, :style]
|
15
19
|
if style_rule.item_names.first.key.in? UNSUPPORTED_SKINS
|
16
20
|
style_rule.update_attributes! content: DEFAULT_SKIN
|
17
21
|
end
|
22
|
+
|
23
|
+
layout_rule = Card[:all, :layout]
|
24
|
+
return unless layout_rule.item_names.first.key == UNSUPPORTED_LAYOUT
|
25
|
+
layout_rule.update_attributes! content: DEFAULT_LAYOUT
|
18
26
|
end
|
19
27
|
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
|
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
|
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
|
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
|
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
|
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
|
Binary file
|
Binary file
|
Binary file
|
@@ -17,7 +17,8 @@ module CarrierWave
|
|
17
17
|
super
|
18
18
|
|
19
19
|
class_eval <<-RUBY, __FILE__, __LINE__ + 1
|
20
|
-
event :store_#{column}_event, :finalize,
|
20
|
+
event :store_#{column}_event, :finalize,
|
21
|
+
on: :save, when: :store_#{column}_event? do
|
21
22
|
store_#{column}!
|
22
23
|
end
|
23
24
|
|
@@ -39,6 +40,11 @@ module CarrierWave
|
|
39
40
|
remove_previously_stored_#{column}
|
40
41
|
end
|
41
42
|
|
43
|
+
# don't attempt to store coded images unless ENV specifies it
|
44
|
+
def store_#{column}_event?
|
45
|
+
!coded? || ENV["STORE_CODED_FILES"]
|
46
|
+
end
|
47
|
+
|
42
48
|
def attachment
|
43
49
|
#{column}
|
44
50
|
end
|
@@ -68,6 +74,7 @@ module CarrierWave
|
|
68
74
|
assign_file(url) { super }
|
69
75
|
end
|
70
76
|
|
77
|
+
|
71
78
|
def assign_file file
|
72
79
|
db_column = _mounter(:#{column}).serialization_column
|
73
80
|
send(:"\#{db_column}_will_change!") # unless attribute_is_changing? db_column
|
@@ -205,6 +205,7 @@ module CarrierWave
|
|
205
205
|
end
|
206
206
|
end
|
207
207
|
|
208
|
+
# @option opts [Symbol] :absolute - return absolute url
|
208
209
|
def url opts={}
|
209
210
|
if model.cloud?
|
210
211
|
file&.url
|
@@ -216,8 +217,12 @@ module CarrierWave
|
|
216
217
|
end
|
217
218
|
|
218
219
|
def local_url opts={}
|
219
|
-
"%s/%s/%s" % [
|
220
|
-
|
220
|
+
"%s/%s/%s" % [local_url_base(opts), file_dir, full_filename(url_filename(opts))]
|
221
|
+
end
|
222
|
+
|
223
|
+
def local_url_base opts={}
|
224
|
+
web_path = Card.config.files_web_path
|
225
|
+
opts.delete(:absolute) ? card_url(web_path) : card_path(web_path)
|
221
226
|
end
|
222
227
|
|
223
228
|
def public_path
|
@@ -33,7 +33,7 @@ RSpec.describe Card::Format::HtmlFormat do
|
|
33
33
|
it "renders top menu" do
|
34
34
|
is_expected.to have_tag "header" do
|
35
35
|
with_tag 'a.nav-link.internal-link[href="/"]', text: "Home"
|
36
|
-
with_tag 'a.nav-link.internal-link[href="
|
36
|
+
with_tag 'a.nav-link.internal-link[href="/:recent"]', text: "Recent"
|
37
37
|
with_tag 'form.navbox-form[action="/*search"]' do
|
38
38
|
with_tag 'select[name="query[keyword]"]'
|
39
39
|
end
|
@@ -122,7 +122,7 @@ class Card
|
|
122
122
|
def act_accordion
|
123
123
|
context = @act.main_action.draft ? :warning : :default
|
124
124
|
<<-HTML
|
125
|
-
<div class="card card-#{context}">
|
125
|
+
<div class="card card-#{context} nodblclick">
|
126
126
|
#{act_accordion_panel}
|
127
127
|
</div>
|
128
128
|
HTML
|
@@ -131,7 +131,6 @@ class Card
|
|
131
131
|
def accordion_expand_options
|
132
132
|
{
|
133
133
|
"data-toggle" => "collapse",
|
134
|
-
"data-parent" => "#accordion-#{collapse_id}",
|
135
134
|
"data-target" => ".#{collapse_id}",
|
136
135
|
"aria-expanded" => true,
|
137
136
|
"aria-controls" => collapse_id
|
@@ -154,7 +153,8 @@ class Card
|
|
154
153
|
|
155
154
|
def act_accordion_body
|
156
155
|
wrap_with :div, id: collapse_id,
|
157
|
-
|
156
|
+
class: "collapse #{collapse_id}",
|
157
|
+
"data-parent": ".act-accordion-group" do
|
158
158
|
wrap_with :div, details, class: "card-body"
|
159
159
|
end
|
160
160
|
end
|
@@ -70,9 +70,24 @@ class Card
|
|
70
70
|
# each action is associated with on and only one card
|
71
71
|
# @return [Card]
|
72
72
|
def card
|
73
|
-
|
74
|
-
|
75
|
-
|
73
|
+
Card.fetch card_id, look_in_trash: true
|
74
|
+
|
75
|
+
# I'm not sure what the rationale for the following was/is, but it was causing
|
76
|
+
# problems in cases where slot attributes are overridden (eg see #wrap_data in
|
77
|
+
# sources on wikirate). The problem is the format object had the set modules but
|
78
|
+
# the card didn't.
|
79
|
+
#
|
80
|
+
# My guess is that the need for the following had something to do with errors
|
81
|
+
# associated with changed types. If so, the solution probably needs to handling
|
82
|
+
# including the set modules associated with the type at the time of the action
|
83
|
+
# rather than including no set modules at all.
|
84
|
+
#
|
85
|
+
# What's more, we _definitely_ don't want to hard code special behavior for
|
86
|
+
# specific types in here!
|
87
|
+
|
88
|
+
# , skip_modules: true
|
89
|
+
# return res unless res && res.type_id.in?([FileID, ImageID])
|
90
|
+
# res.include_set_modules
|
76
91
|
end
|
77
92
|
|
78
93
|
# remove action from action cache
|