card 1.16.9 → 1.16.10
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/20120611203506_rails_inflection_updates.rb +3 -1
- data/db/seed/new/card_actions.yml +389 -557
- data/db/seed/new/card_acts.yml +595 -1
- data/db/seed/new/card_changes.yml +22595 -7526
- data/db/seed/new/card_references.yml +379 -407
- data/db/seed/new/cards.yml +1694 -2072
- data/db/seed/test/fixtures/card_actions.yml +966 -1102
- data/db/seed/test/fixtures/card_acts.yml +1017 -399
- data/db/seed/test/fixtures/card_changes.yml +24750 -9681
- data/db/seed/test/fixtures/card_references.yml +603 -631
- data/db/seed/test/fixtures/cards.yml +2293 -2671
- data/lib/card/set.rb +1 -1
- data/mod/01_core/set/all/content.rb +14 -12
- data/mod/03_machines/lib/javascript/wagn_mod.js.coffee +1 -1
- data/mod/05_standard/set/abstract/attachment.rb +9 -9
- data/mod/05_standard/set/all/rich_html/content.rb +115 -103
- data/mod/05_standard/set/type/file.rb +1 -1
- data/tmpsets/set/mod001-01_core/all/active_card.rb +2 -1
- data/tmpsets/set/mod001-01_core/all/collection.rb +3 -3
- data/tmpsets/set/mod001-01_core/all/content.rb +2 -1
- data/tmpsets/set/mod001-01_core/all/erb.rb +2 -1
- data/tmpsets/set/mod001-01_core/all/fetch.rb +169 -93
- data/tmpsets/set/mod001-01_core/all/haml.rb +2 -1
- data/tmpsets/set/mod001-01_core/all/initialize.rb +11 -23
- data/tmpsets/set/mod001-01_core/all/name.rb +130 -80
- data/tmpsets/set/mod001-01_core/all/pattern.rb +2 -1
- data/tmpsets/set/mod001-01_core/all/permissions.rb +2 -1
- data/tmpsets/set/mod001-01_core/all/phases.rb +95 -96
- data/tmpsets/set/mod001-01_core/all/references.rb +2 -1
- data/tmpsets/set/mod001-01_core/all/rules.rb +2 -1
- data/tmpsets/set/mod001-01_core/all/states.rb +2 -1
- data/tmpsets/set/mod001-01_core/all/templating.rb +2 -1
- data/tmpsets/set/mod001-01_core/all/tracked_attributes.rb +85 -60
- data/tmpsets/set/mod001-01_core/all/trash.rb +16 -13
- data/tmpsets/set/mod001-01_core/all/type.rb +5 -25
- data/tmpsets/set/mod001-01_core/all/utils.rb +2 -1
- data/tmpsets/set/mod001-01_core/all/view_cache.rb +2 -1
- data/tmpsets/set/mod002-01_history/all/actions.rb +2 -1
- data/tmpsets/set/mod002-01_history/all/content_history.rb +7 -4
- data/tmpsets/set/mod002-01_history/all/history.rb +119 -83
- data/tmpsets/set/mod003-02_basic_types/all/all_css.rb +2 -1
- data/tmpsets/set/mod003-02_basic_types/all/all_csv.rb +2 -1
- data/tmpsets/set/mod003-02_basic_types/all/all_js.rb +2 -1
- data/tmpsets/set/mod003-02_basic_types/all/base.rb +52 -50
- data/tmpsets/set/mod003-02_basic_types/all/file.rb +2 -1
- data/tmpsets/set/mod003-02_basic_types/all/json.rb +2 -1
- data/tmpsets/set/mod003-02_basic_types/all/rss.rb +2 -1
- data/tmpsets/set/mod003-02_basic_types/all/text.rb +2 -1
- data/tmpsets/set/mod003-02_basic_types/type/html.rb +2 -1
- data/tmpsets/set/mod003-02_basic_types/type/plain_text.rb +2 -1
- data/tmpsets/set/mod003-02_basic_types/type/pointer.rb +10 -1
- data/tmpsets/set/mod004-03_machines/right/machine_input.rb +2 -1
- data/tmpsets/set/mod004-03_machines/right/machine_output.rb +2 -1
- data/tmpsets/set/mod004-03_machines/self/script_ace.rb +2 -1
- data/tmpsets/set/mod004-03_machines/self/script_card_menu.rb +2 -1
- data/tmpsets/set/mod004-03_machines/self/script_html5shiv_printshiv.rb +2 -1
- data/tmpsets/set/mod004-03_machines/self/script_jquery.rb +2 -1
- data/tmpsets/set/mod004-03_machines/self/script_jquery_helper.rb +2 -1
- data/tmpsets/set/mod004-03_machines/self/script_slot.rb +2 -1
- data/tmpsets/set/mod004-03_machines/self/script_tinymce.rb +2 -1
- data/tmpsets/set/mod004-03_machines/self/style_bootstrap_compatible.rb +2 -1
- data/tmpsets/set/mod004-03_machines/self/style_cards.rb +2 -1
- data/tmpsets/set/mod004-03_machines/self/style_jquery_ui_smoothness.rb +2 -1
- data/tmpsets/set/mod004-03_machines/type/coffee_script.rb +2 -1
- data/tmpsets/set/mod004-03_machines/type/css.rb +2 -1
- data/tmpsets/set/mod004-03_machines/type/java_script.rb +2 -1
- data/tmpsets/set/mod004-03_machines/type/scss.rb +2 -1
- data/tmpsets/set/mod004-03_machines/type/skin.rb +2 -1
- data/tmpsets/set/mod005-04_settings/abstract/permission.rb +2 -1
- data/tmpsets/set/mod005-04_settings/right/add_help.rb +2 -1
- data/tmpsets/set/mod005-04_settings/right/comment.rb +2 -1
- data/tmpsets/set/mod005-04_settings/right/create.rb +2 -1
- data/tmpsets/set/mod005-04_settings/right/default.rb +2 -1
- data/tmpsets/set/mod005-04_settings/right/delete.rb +2 -1
- data/tmpsets/set/mod005-04_settings/right/help.rb +2 -1
- data/tmpsets/set/mod005-04_settings/right/read.rb +2 -1
- data/tmpsets/set/mod005-04_settings/right/script.rb +2 -1
- data/tmpsets/set/mod005-04_settings/right/structure.rb +2 -1
- data/tmpsets/set/mod005-04_settings/right/style.rb +2 -1
- data/tmpsets/set/mod005-04_settings/right/update.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/accountable.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/add_help.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/autoname.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/captcha.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/create.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/default.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/delete.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/help.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/input.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/layout.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/on_create.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/on_delete.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/on_update.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/options.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/options_label.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/read.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/recent_settings.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/script.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/structure.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/style.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/table_of_contents.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/thanks.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/update.rb +2 -1
- data/tmpsets/set/mod005-04_settings/type/setting.rb +2 -1
- data/tmpsets/set/mod006-05_email/all/email_html.rb +2 -1
- data/tmpsets/set/mod006-05_email/all/email_text.rb +2 -1
- data/tmpsets/set/mod006-05_email/all/follow.rb +2 -1
- data/tmpsets/set/mod006-05_email/all/notify.rb +2 -1
- data/tmpsets/set/mod006-05_email/all/observer.rb +2 -1
- data/tmpsets/set/mod006-05_email/right/bcc.rb +2 -1
- data/tmpsets/set/mod006-05_email/right/cc.rb +2 -1
- data/tmpsets/set/mod006-05_email/right/follow.rb +2 -1
- data/tmpsets/set/mod006-05_email/right/follow_fields.rb +2 -1
- data/tmpsets/set/mod006-05_email/right/followers.rb +7 -6
- data/tmpsets/set/mod006-05_email/right/following.rb +3 -2
- data/tmpsets/set/mod006-05_email/right/from.rb +2 -1
- data/tmpsets/set/mod006-05_email/right/html_message.rb +2 -1
- data/tmpsets/set/mod006-05_email/right/to.rb +2 -1
- data/tmpsets/set/mod006-05_email/self/always.rb +2 -1
- data/tmpsets/set/mod006-05_email/self/created.rb +2 -1
- data/tmpsets/set/mod006-05_email/self/edited.rb +2 -1
- data/tmpsets/set/mod006-05_email/self/follow.rb +2 -1
- data/tmpsets/set/mod006-05_email/self/follow_defaults.rb +2 -1
- data/tmpsets/set/mod006-05_email/self/never.rb +2 -1
- data/tmpsets/set/mod006-05_email/type/email_template.rb +2 -1
- data/tmpsets/set/mod006-05_email/type_plus_right/user/follow.rb +3 -2
- data/tmpsets/set/mod007-05_standard/abstract/attachment.rb +22 -9
- data/tmpsets/set/mod007-05_standard/all/account.rb +2 -1
- data/tmpsets/set/mod007-05_standard/all/comment.rb +2 -1
- data/tmpsets/set/mod007-05_standard/all/error.rb +2 -1
- data/tmpsets/set/mod007-05_standard/all/event_viz.rb +2 -1
- data/tmpsets/set/mod007-05_standard/all/links.rb +2 -1
- data/tmpsets/set/mod007-05_standard/all/rich_html/content.rb +3 -2
- data/tmpsets/set/mod007-05_standard/all/rich_html/editing.rb +2 -1
- data/tmpsets/set/mod007-05_standard/all/rich_html/form.rb +23 -12
- data/tmpsets/set/mod007-05_standard/all/rich_html/header.rb +2 -1
- data/tmpsets/set/mod007-05_standard/all/rich_html/menu.rb +3 -2
- data/tmpsets/set/mod007-05_standard/all/rich_html/modal.rb +2 -1
- data/tmpsets/set/mod007-05_standard/all/rich_html/toolbar.rb +2 -1
- data/tmpsets/set/mod007-05_standard/all/rich_html/wrapper.rb +2 -1
- data/tmpsets/set/mod007-05_standard/right/account.rb +7 -6
- data/tmpsets/set/mod007-05_standard/right/discussion.rb +2 -1
- data/tmpsets/set/mod007-05_standard/right/email.rb +2 -1
- data/tmpsets/set/mod007-05_standard/right/password.rb +2 -1
- data/tmpsets/set/mod007-05_standard/right/salt.rb +2 -1
- data/tmpsets/set/mod007-05_standard/right/stats.rb +2 -1
- data/tmpsets/set/mod007-05_standard/right/status.rb +2 -1
- data/tmpsets/set/mod007-05_standard/right/token.rb +2 -1
- data/tmpsets/set/mod007-05_standard/right/when_created.rb +2 -1
- data/tmpsets/set/mod007-05_standard/right/when_last_edited.rb +2 -1
- data/tmpsets/set/mod007-05_standard/rstar/rules.rb +2 -1
- data/tmpsets/set/mod007-05_standard/self/account_links.rb +2 -1
- data/tmpsets/set/mod007-05_standard/self/alerts.rb +2 -1
- data/tmpsets/set/mod007-05_standard/self/all.rb +2 -1
- data/tmpsets/set/mod007-05_standard/self/foot.rb +2 -1
- data/tmpsets/set/mod007-05_standard/self/head.rb +2 -2
- data/tmpsets/set/mod007-05_standard/self/navbox.rb +2 -1
- data/tmpsets/set/mod007-05_standard/self/now.rb +2 -1
- data/tmpsets/set/mod007-05_standard/self/recent.rb +2 -1
- data/tmpsets/set/mod007-05_standard/self/search.rb +2 -1
- data/tmpsets/set/mod007-05_standard/self/signin.rb +45 -36
- data/tmpsets/set/mod007-05_standard/self/stats.rb +2 -1
- data/tmpsets/set/mod007-05_standard/self/version.rb +2 -1
- data/tmpsets/set/mod007-05_standard/type/basic.rb +2 -1
- data/tmpsets/set/mod007-05_standard/type/cardtype.rb +2 -1
- data/tmpsets/set/mod007-05_standard/type/date.rb +2 -1
- data/tmpsets/set/mod007-05_standard/type/file.rb +11 -3
- data/tmpsets/set/mod007-05_standard/type/image.rb +2 -1
- data/tmpsets/set/mod007-05_standard/type/layout_type.rb +2 -1
- data/tmpsets/set/mod007-05_standard/type/number.rb +2 -1
- data/tmpsets/set/mod007-05_standard/type/phrase.rb +2 -1
- data/tmpsets/set/mod007-05_standard/type/search_type.rb +70 -64
- data/tmpsets/set/mod007-05_standard/type/session.rb +2 -1
- data/tmpsets/set/mod007-05_standard/type/set.rb +2 -1
- data/tmpsets/set/mod007-05_standard/type/signup.rb +96 -64
- data/tmpsets/set/mod007-05_standard/type/toggle.rb +2 -1
- data/tmpsets/set/mod007-05_standard/type/uri.rb +2 -1
- data/tmpsets/set/mod007-05_standard/type/user.rb +50 -40
- data/tmpsets/set/mod008-06_bootstrap/all/bootstrap/form.rb +2 -1
- data/tmpsets/set/mod008-06_bootstrap/all/bootstrap/helper.rb +2 -1
- data/tmpsets/set/mod008-06_bootstrap/all/bootstrap/wrapper.rb +2 -1
- data/tmpsets/set/mod008-06_bootstrap/all/rich_bootstrap.rb +2 -1
- data/tmpsets/set/mod008-06_bootstrap/self/bootstrap_cards.rb +2 -1
- data/tmpsets/set/mod008-06_bootstrap/self/bootstrap_js.rb +2 -1
- data/tmpsets/set/mod008-06_bootstrap/self/bootswatch_shared.rb +2 -1
- data/tmpsets/set/mod008-06_bootstrap/self/smartmenu_css.rb +2 -1
- data/tmpsets/set/mod008-06_bootstrap/self/smartmenu_js.rb +2 -1
- metadata +2 -2
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Self; module Edited; extend Card::Set
|
2
|
+
class Card; module Set; module Self; module Edited; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_email/set/self/edited.rb ~~~~~~~~~~~
|
3
4
|
include Card::FollowOption
|
4
5
|
|
5
6
|
self.restrictive_follow_opts position: 2
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Self; module Follow; extend Card::Set
|
2
|
+
class Card; module Set; module Self; module Follow; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_email/set/self/follow.rb ~~~~~~~~~~~
|
3
4
|
extend Card::Setting
|
4
5
|
setting_opts group: :other, position: 7, rule_type_editable: false, user_specific: true
|
5
6
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Self; module FollowDefaults; extend Card::Set
|
2
|
+
class Card; module Set; module Self; module FollowDefaults; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_email/set/self/follow_defaults.rb ~~~~~~~~~~~
|
3
4
|
event :update_follow_rules, after: :store, on: :save, when: proc { |c| c.update_all_users } do
|
4
5
|
defaults = item_names.map do |item|
|
5
6
|
if ((set_card = Card.fetch item.to_name.left) && set_card.type_code == :set)
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Self; module Never; extend Card::Set
|
2
|
+
class Card; module Set; module Self; module Never; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_email/set/self/never.rb ~~~~~~~~~~~
|
3
4
|
include Card::FollowOption
|
4
5
|
|
5
6
|
self.follow_opts position: 3
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Type; module EmailTemplate; extend Card::Set
|
2
|
+
class Card; module Set; module Type; module EmailTemplate; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_email/set/type/email_template.rb ~~~~~~~~~~~
|
3
4
|
|
4
5
|
def clean_html?
|
5
6
|
false
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module TypePlusRight; module User; module Follow; extend Card::Set
|
2
|
+
class Card; module Set; module TypePlusRight; module User; module Follow; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_email/set/type_plus_right/user/follow.rb ~~~~~~~~~~~
|
3
4
|
|
4
5
|
include Card::Set::Type::Pointer
|
5
6
|
|
@@ -15,7 +16,7 @@ def raw_content
|
|
15
16
|
end
|
16
17
|
end
|
17
18
|
|
18
|
-
def virtual?;
|
19
|
+
def virtual?; !real? end
|
19
20
|
|
20
21
|
|
21
22
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Abstract; module Attachment; extend Card::Set
|
2
|
+
class Card; module Set; module Abstract; module Attachment; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/abstract/attachment.rb ~~~~~~~~~~~
|
3
4
|
require 'carrier_wave/cardmount'
|
4
5
|
|
5
6
|
def self.included host_class
|
@@ -26,15 +27,16 @@ event :upload_attachment, before: :validate_name, on: :save, when: proc { |c| c.
|
|
26
27
|
end
|
27
28
|
|
28
29
|
event :assign_attachment_on_create, after: :prepare, on: :create, when: proc { |c| c.save_preliminary_upload? } do
|
29
|
-
if (action = Card::Action.fetch(
|
30
|
+
if (action = Card::Action.fetch(@cached_upload))
|
30
31
|
upload_cache_card.selected_action_id = action.id
|
31
32
|
upload_cache_card.select_file_revision
|
32
33
|
assign_attachment upload_cache_card.attachment.file, action.comment
|
33
34
|
end
|
34
35
|
end
|
35
36
|
|
36
|
-
event :assign_attachment_on_update, after: :prepare, on: :update,
|
37
|
-
|
37
|
+
event :assign_attachment_on_update, after: :prepare, on: :update,
|
38
|
+
when: proc { |c| c.save_preliminary_upload? } do
|
39
|
+
if (action = Card::Action.fetch(@cached_upload))
|
38
40
|
uploaded_file =
|
39
41
|
with_selected_action_id(action.id) do
|
40
42
|
attachment.file
|
@@ -55,15 +57,15 @@ event :correct_identifier, after: :store, on: :create do
|
|
55
57
|
update_column(:db_content,attachment.db_content(mod: load_from_mod))
|
56
58
|
expire
|
57
59
|
end
|
58
|
-
|
59
60
|
event :save_original_filename, after: :validate_name, when: proc {|c| !c.preliminary_upload? && !c.save_preliminary_upload? && c.attachment_changed?} do
|
61
|
+
|
60
62
|
if @current_action
|
61
63
|
@current_action.update_attributes! comment: original_filename
|
62
64
|
end
|
63
65
|
end
|
64
66
|
|
65
67
|
event :delete_cached_upload_file_on_create, after: :extend, on: :create, when: proc { |c| c.save_preliminary_upload? } do
|
66
|
-
if (action = Card::Action.fetch(
|
68
|
+
if (action = Card::Action.fetch(@cached_upload))
|
67
69
|
upload_cache_card.delete_files_for_action action
|
68
70
|
action.delete
|
69
71
|
end
|
@@ -71,7 +73,7 @@ event :delete_cached_upload_file_on_create, after: :extend, on: :create, when: p
|
|
71
73
|
end
|
72
74
|
|
73
75
|
event :delete_cached_upload_file_on_update, after: :extend, on: :update, when: proc { |c| c.save_preliminary_upload? } do
|
74
|
-
if (action = Card::Action.fetch(
|
76
|
+
if (action = Card::Action.fetch(@cached_upload))
|
75
77
|
delete_files_for_action action
|
76
78
|
action.delete
|
77
79
|
end
|
@@ -91,12 +93,16 @@ def original_filename
|
|
91
93
|
attachment.original_filename
|
92
94
|
end
|
93
95
|
|
96
|
+
def unfilled?
|
97
|
+
!attachment.present? && !save_preliminary_upload? && super
|
98
|
+
end
|
99
|
+
|
94
100
|
def preliminary_upload?
|
95
101
|
Card::Env && Card::Env.params[:attachment_upload]
|
96
102
|
end
|
97
103
|
|
98
104
|
def save_preliminary_upload?
|
99
|
-
|
105
|
+
@cached_upload.present?
|
100
106
|
end
|
101
107
|
|
102
108
|
def attachment_changed?
|
@@ -112,6 +118,14 @@ def upload_cache_card
|
|
112
118
|
@upload_cache_card ||= Card["new_#{attachment_name}".to_sym ]
|
113
119
|
end
|
114
120
|
|
121
|
+
# action id of the cached upload
|
122
|
+
def cached_upload= value
|
123
|
+
@cached_upload = value
|
124
|
+
end
|
125
|
+
|
126
|
+
def cached_upload
|
127
|
+
@cached_upload
|
128
|
+
end
|
115
129
|
|
116
130
|
def load_from_mod= value
|
117
131
|
@mod = value
|
@@ -166,7 +180,6 @@ def mod_dir
|
|
166
180
|
end
|
167
181
|
end
|
168
182
|
|
169
|
-
|
170
183
|
def mod_file?
|
171
184
|
if @store_in_mod
|
172
185
|
return @mod
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module All; module Account; extend Card::Set
|
2
|
+
class Card; module Set; module All; module Account; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/all/account.rb ~~~~~~~~~~~
|
3
4
|
module ClassMethods
|
4
5
|
def default_accounted_type_id
|
5
6
|
Card::UserID
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module All; module Comment; extend Card::Set
|
2
|
+
class Card; module Set; module All; module Comment; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/all/comment.rb ~~~~~~~~~~~
|
3
4
|
event :add_comment, after: :approve, on: :save, when: proc {|c| c.comment } do
|
4
5
|
self.content = %{
|
5
6
|
#{ content }
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module All; module Error; extend Card::Set
|
2
|
+
class Card; module Set; module All; module Error; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/all/error.rb ~~~~~~~~~~~
|
3
4
|
|
4
5
|
|
5
6
|
format do
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module All; module EventViz; extend Card::Set
|
2
|
+
class Card; module Set; module All; module EventViz; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/all/event_viz.rb ~~~~~~~~~~~
|
3
4
|
# the events method is a developer's tool for visualizing the event order for a given card.
|
4
5
|
# For example, from a console you might run
|
5
6
|
#
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module All; module Links; extend Card::Set
|
2
|
+
class Card; module Set; module All; module Links; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/all/links.rb ~~~~~~~~~~~
|
3
4
|
|
4
5
|
|
5
6
|
format do
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module All; module RichHtml; module Content; extend Card::Set
|
2
|
+
class Card; module Set; module All; module RichHtml; module Content; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/all/rich_html/content.rb ~~~~~~~~~~~
|
3
4
|
def show_comment_box_in_related?
|
4
5
|
false
|
5
6
|
end
|
@@ -13,7 +14,7 @@ format :html do
|
|
13
14
|
self.render :layout
|
14
15
|
else
|
15
16
|
view ||= args[:home_view] || :open
|
16
|
-
@inclusion_opts = args
|
17
|
+
@inclusion_opts = args[:items].clone
|
17
18
|
render view, args
|
18
19
|
end
|
19
20
|
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module All; module RichHtml; module Editing; extend Card::Set
|
2
|
+
class Card; module Set; module All; module RichHtml; module Editing; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/all/rich_html/editing.rb ~~~~~~~~~~~
|
3
4
|
format :html do
|
4
5
|
###---( TOP_LEVEL (used by menu) NEW / EDIT VIEWS )
|
5
6
|
|
@@ -1,22 +1,25 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module All; module RichHtml; module Form; extend Card::Set
|
2
|
+
class Card; module Set; module All; module RichHtml; module Form; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/all/rich_html/form.rb ~~~~~~~~~~~
|
3
4
|
format :html do
|
4
5
|
def edit_slot args={}
|
5
|
-
#note: @mode should already be :edit here...
|
6
|
+
# note: @mode should already be :edit here...
|
6
7
|
if args[:structure] || card.structure
|
7
8
|
# multi-card editing
|
8
9
|
|
9
10
|
if args[:core_edit] #need better name
|
10
11
|
_render_core args
|
11
12
|
else
|
12
|
-
process_relative_tags optional_toolbar: :hide,
|
13
|
+
process_relative_tags optional_toolbar: :hide,
|
14
|
+
structure: args[:structure]
|
13
15
|
end
|
14
16
|
|
15
17
|
else
|
16
18
|
# single-card edit mode
|
17
19
|
field = content_field form, args
|
18
20
|
|
19
|
-
if [
|
21
|
+
if [args[:optional_type_formgroup], args[:optional_name_formgroup]]
|
22
|
+
.member? :show
|
20
23
|
# display content field in formgroup for consistency with other fields
|
21
24
|
formgroup '', field, editor: :content
|
22
25
|
else
|
@@ -25,16 +28,13 @@ format :html do
|
|
25
28
|
end
|
26
29
|
end
|
27
30
|
|
28
|
-
|
29
31
|
def form_for_multi
|
30
|
-
card
|
32
|
+
instantiate_builder("card#{subcard_input_names}", card, {})
|
33
|
+
end
|
31
34
|
|
32
|
-
|
33
|
-
|
34
|
-
#
|
35
|
-
# builder = ActionView::Base.default_form_builder
|
36
|
-
# builder.new("card[subcards][#{card.relative_name}]", card, template, {}, block)
|
37
|
-
builder = instantiate_builder("card[subcards][#{card.relative_name}]", card, {})
|
35
|
+
def subcard_input_names
|
36
|
+
return '' if !form_root_format || form_root_format == self
|
37
|
+
"#{@parent.subcard_input_names}[subcards][#{card.contextual_name}]"
|
38
38
|
end
|
39
39
|
|
40
40
|
def form
|
@@ -42,6 +42,7 @@ format :html do
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def card_form action, opts={}
|
45
|
+
@form_root = true
|
45
46
|
hidden_args = opts.delete :hidden
|
46
47
|
form_for card, card_form_opts(action, opts) do |form|
|
47
48
|
@form = form
|
@@ -52,6 +53,16 @@ format :html do
|
|
52
53
|
end
|
53
54
|
end
|
54
55
|
|
56
|
+
def form_root_format
|
57
|
+
if @form_root
|
58
|
+
self
|
59
|
+
elsif !@parent
|
60
|
+
nil
|
61
|
+
else
|
62
|
+
@parent.form_root_format
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
55
66
|
def card_form_opts action, html={}
|
56
67
|
url, action = case action
|
57
68
|
when Symbol ; [ path(action: action) , action ]
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module All; module RichHtml; module Header; extend Card::Set
|
2
|
+
class Card; module Set; module All; module RichHtml; module Header; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/all/rich_html/header.rb ~~~~~~~~~~~
|
3
4
|
format :html do
|
4
5
|
|
5
6
|
view :header do |args|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module All; module RichHtml; module Menu; extend Card::Set
|
2
|
+
class Card; module Set; module All; module RichHtml; module Menu; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/all/rich_html/menu.rb ~~~~~~~~~~~
|
3
4
|
format :html do
|
4
5
|
view :menu, denial: :blank, tags: :unknown_ok do |args|
|
5
6
|
return _render_template_closer if args[:menu_hack] == :template_closer
|
@@ -110,7 +111,7 @@ format :html do
|
|
110
111
|
def show_menu_items
|
111
112
|
disc_tagname = Card.fetch(:discussion, skip_modules: true).cardname
|
112
113
|
disc_card = unless card.new_card? or card.junction? && card.cardname.tag_name.key == disc_tagname.key
|
113
|
-
Card.fetch "#{card.name}+#{disc_tagname}",
|
114
|
+
Card.fetch "#{card.name}+#{disc_tagname}", skip_modules: true, new: {}
|
114
115
|
end
|
115
116
|
|
116
117
|
res = {
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module All; module RichHtml; module Modal; extend Card::Set
|
2
|
+
class Card; module Set; module All; module RichHtml; module Modal; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/all/rich_html/modal.rb ~~~~~~~~~~~
|
3
4
|
format :html do
|
4
5
|
|
5
6
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module All; module RichHtml; module Toolbar; extend Card::Set
|
2
|
+
class Card; module Set; module All; module RichHtml; module Toolbar; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/all/rich_html/toolbar.rb ~~~~~~~~~~~
|
3
4
|
|
4
5
|
format :html do
|
5
6
|
def toolbar_pinned?
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module All; module RichHtml; module Wrapper; extend Card::Set
|
2
|
+
class Card; module Set; module All; module RichHtml; module Wrapper; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/all/rich_html/wrapper.rb ~~~~~~~~~~~
|
3
4
|
format :html do
|
4
5
|
def slot_options args
|
5
6
|
@@slot_option_keys ||= Card::Chunk::Include.options.reject { |k| k == :view }.unshift :home_view
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Right; module Account; extend Card::Set
|
2
|
+
class Card; module Set; module Right; module Account; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/right/account.rb ~~~~~~~~~~~
|
3
4
|
|
4
5
|
include All::Permissions::Accounts
|
5
6
|
|
@@ -67,7 +68,7 @@ event :validate_accountability, on: :create, before: :approve do
|
|
67
68
|
end
|
68
69
|
|
69
70
|
event :require_email, on: :create, after: :approve do
|
70
|
-
unless
|
71
|
+
unless subfield(:email)
|
71
72
|
errors.add :email, 'required'
|
72
73
|
end
|
73
74
|
end
|
@@ -76,20 +77,20 @@ end
|
|
76
77
|
event :set_default_salt, on: :create, before: :process_subcards do
|
77
78
|
salt = Digest::SHA1.hexdigest "--#{Time.now.to_s}--"
|
78
79
|
Env[:salt] = salt # HACK!!! need viable mechanism to get this to password
|
79
|
-
|
80
|
+
add_subfield :salt, content: salt
|
80
81
|
end
|
81
82
|
|
82
83
|
event :set_default_status, on: :create, before: :process_subcards do
|
83
84
|
default_status = ( Auth.needs_setup? ? 'active' : 'pending' )
|
84
|
-
|
85
|
+
add_subfield :status, content: default_status
|
85
86
|
end
|
86
87
|
|
87
88
|
def confirm_ok?
|
88
89
|
Card.new( type_id: Card.default_accounted_type_id ).ok? :create
|
89
90
|
end
|
90
91
|
|
91
|
-
event :generate_confirmation_token, on
|
92
|
-
|
92
|
+
event :generate_confirmation_token, :on=>:create, :before=>:process_subcards, :when=>proc{ |c| c.confirm_ok? } do
|
93
|
+
add_subfield :token, content: generate_token
|
93
94
|
end
|
94
95
|
|
95
96
|
event :reset_password, on: :update, before: :approve, when: proc{ |c| c.has_reset_token? } do
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Right; module Discussion; extend Card::Set
|
2
|
+
class Card; module Set; module Right; module Discussion; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/right/discussion.rb ~~~~~~~~~~~
|
3
4
|
def show_comment_box_in_related?
|
4
5
|
true
|
5
6
|
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Right; module Email; extend Card::Set
|
2
|
+
class Card; module Set; module Right; module Email; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/right/email.rb ~~~~~~~~~~~
|
3
4
|
#event :
|
4
5
|
include All::Permissions::Accounts
|
5
6
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Right; module Password; extend Card::Set
|
2
|
+
class Card; module Set; module Right; module Password; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/right/password.rb ~~~~~~~~~~~
|
3
4
|
|
4
5
|
include All::Permissions::Accounts
|
5
6
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Right; module Salt; extend Card::Set
|
2
|
+
class Card; module Set; module Right; module Salt; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/right/salt.rb ~~~~~~~~~~~
|
3
4
|
include All::Permissions::Accounts
|
4
5
|
|
5
6
|
view :raw do |args|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Right; module Stats; extend Card::Set
|
2
|
+
class Card; module Set; module Right; module Stats; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/right/stats.rb ~~~~~~~~~~~
|
3
4
|
|
4
5
|
view :core do |args|
|
5
6
|
if subject = card.left
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Right; module Status; extend Card::Set
|
2
|
+
class Card; module Set; module Right; module Status; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/right/status.rb ~~~~~~~~~~~
|
3
4
|
include All::Permissions::Accounts
|
4
5
|
|
5
6
|
def ok_to_update
|