card 1.15.pre → 1.15.pre2
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/bootstrap/card_actions.yml +1039 -668
- data/db/bootstrap/card_acts.yml +1 -1
- data/db/bootstrap/card_changes.yml +3614 -2523
- data/db/bootstrap/card_references.yml +1401 -1163
- data/db/bootstrap/cards.yml +2832 -1848
- data/db/migrate_core_cards/20150202143810_import_bootstrap_layout.rb +58 -4
- data/db/migrate_core_cards/20150317162412_bootstrap_themes.rb +37 -0
- data/db/migrate_core_cards/data/1.12_stylesheets/traditional.scss +1 -1
- data/db/migrate_core_cards/data/bootstrap_layout.json +39 -24
- data/db/migrate_core_cards/data/skin_images.json +91 -0
- data/db/schema.rb +1 -1
- data/db/version_core_cards.txt +1 -1
- data/lib/card/format.rb +6 -6
- data/lib/card/migration.rb +7 -2
- data/mod/01_core/chunk/include.rb +10 -0
- data/mod/01_core/format/html_format.rb +2 -8
- data/mod/01_core/set/all/collection.rb +4 -0
- data/mod/01_core/set/all/states.rb +1 -1
- data/mod/01_core/set/all/utils.rb +3 -2
- data/mod/01_core/set_pattern/02_all_plus.rb +1 -1
- data/mod/01_core/set_pattern/04_star.rb +2 -2
- data/mod/01_core/set_pattern/05_rstar.rb +2 -2
- data/mod/01_core/set_pattern/07_type_plus_right.rb +1 -1
- data/mod/01_core/spec/format/html_format_spec.rb +23 -24
- data/mod/01_history/set/all/history.rb +6 -7
- data/mod/02_basic_types/set/all/all_css.rb +1 -1
- data/mod/02_basic_types/set/all/all_csv.rb +2 -2
- data/mod/02_basic_types/set/all/json.rb +1 -1
- data/mod/02_basic_types/set/type/plain_text.rb +1 -1
- data/mod/02_basic_types/set/type/pointer.rb +25 -29
- data/mod/03_machines/lib/javascript/wagn.js.coffee +7 -6
- data/mod/03_machines/lib/javascript/wagn_mod.js.coffee +2 -1
- data/mod/03_machines/lib/stylesheets/style_bootstrap_compatible.css +154 -0
- data/mod/03_machines/lib/stylesheets/{standard.scss → style_cards.scss} +260 -166
- data/mod/03_machines/set/self/style_bootstrap_compatible.rb +9 -0
- data/mod/03_machines/set/self/{style_functional.rb → style_cards.rb} +1 -1
- data/mod/03_machines/spec/set/type/scss_spec.rb +1 -1
- data/mod/04_settings/set/type/setting.rb +1 -1
- data/mod/05_email/set/all/notify.rb +1 -1
- data/mod/05_email/set/self/follow_defaults.rb +3 -3
- data/mod/05_standard/file/{790/icon-6419.png → credit/icon-image.png} +0 -0
- data/mod/05_standard/file/{790/large-6419.png → credit/large-image.png} +0 -0
- data/mod/05_standard/file/{790/medium-6419.png → credit/medium-image.png} +0 -0
- data/mod/05_standard/file/{790/original-6419.png → credit/original-image.png} +0 -0
- data/mod/05_standard/file/{790/small-6419.png → credit/small-image.png} +0 -0
- data/mod/05_standard/file/{103/icon-6566.ico → favicon/icon-image.ico} +0 -0
- data/mod/05_standard/file/{103/large-6566.ico → favicon/large-image.ico} +0 -0
- data/mod/05_standard/file/{103/medium-6566.ico → favicon/medium-image.ico} +0 -0
- data/mod/05_standard/file/{103/original-6566.ico → favicon/original-image.ico} +0 -0
- data/mod/05_standard/file/{103/small-6566.ico → favicon/small-image.ico} +0 -0
- data/mod/05_standard/file/{79/icon-6556.png → logo/icon-image.png} +0 -0
- data/mod/05_standard/file/{79/large-6556.png → logo/large-image.png} +0 -0
- data/mod/05_standard/file/{79/medium-6556.png → logo/medium-image.png} +0 -0
- data/mod/05_standard/file/{79/original-6556.png → logo/original-image.png} +0 -0
- data/mod/05_standard/file/{79/small-6556.png → logo/small-image.png} +0 -0
- data/mod/05_standard/set/all/attach.rb +8 -10
- data/mod/05_standard/set/all/comment.rb +1 -1
- data/mod/05_standard/set/all/error.rb +1 -1
- data/mod/05_standard/set/all/rich_html/content.rb +14 -2
- data/mod/05_standard/set/all/rich_html/editing.rb +19 -18
- data/mod/05_standard/set/all/rich_html/form.rb +38 -47
- data/mod/05_standard/set/all/rich_html/header.rb +37 -14
- data/mod/05_standard/set/all/rich_html/wrapper.rb +3 -3
- data/mod/05_standard/set/rstar/rules.rb +18 -18
- data/mod/05_standard/set/self/account_links.rb +6 -18
- data/mod/05_standard/set/self/navbox.rb +23 -10
- data/mod/05_standard/set/self/recent.rb +1 -1
- data/mod/05_standard/set/self/signin.rb +6 -3
- data/mod/05_standard/set/type/cardtype.rb +1 -1
- data/mod/05_standard/set/type/html.rb +1 -1
- data/mod/05_standard/set/type/search_type.rb +76 -54
- data/mod/05_standard/set/type/signup.rb +5 -5
- data/mod/05_standard/set/type/user.rb +4 -4
- data/mod/05_standard/spec/set/all/rich_html/wrapper_spec.rb +2 -2
- data/mod/05_standard/spec/set/self/account_links_spec.rb +1 -1
- data/mod/06_bootstrap/file/cerulean_skin/icon-image.png +0 -0
- data/mod/06_bootstrap/file/cerulean_skin/large-image.png +0 -0
- data/mod/06_bootstrap/file/cerulean_skin/medium-image.png +0 -0
- data/mod/06_bootstrap/file/cerulean_skin/original-image.png +0 -0
- data/mod/06_bootstrap/file/cerulean_skin/small-image.png +0 -0
- data/mod/06_bootstrap/file/cosmo_skin/icon-image.png +0 -0
- data/mod/06_bootstrap/file/cosmo_skin/large-image.png +0 -0
- data/mod/06_bootstrap/file/cosmo_skin/medium-image.png +0 -0
- data/mod/06_bootstrap/file/cosmo_skin/original-image.png +0 -0
- data/mod/06_bootstrap/file/cosmo_skin/small-image.png +0 -0
- data/mod/06_bootstrap/file/cyborg_skin/icon-image.png +0 -0
- data/mod/06_bootstrap/file/cyborg_skin/large-image.png +0 -0
- data/mod/06_bootstrap/file/cyborg_skin/medium-image.png +0 -0
- data/mod/06_bootstrap/file/cyborg_skin/original-image.png +0 -0
- data/mod/06_bootstrap/file/cyborg_skin/small-image.png +0 -0
- data/mod/06_bootstrap/file/darkly_skin/icon-image.png +0 -0
- data/mod/06_bootstrap/file/darkly_skin/large-image.png +0 -0
- data/mod/06_bootstrap/file/darkly_skin/medium-image.png +0 -0
- data/mod/06_bootstrap/file/darkly_skin/original-image.png +0 -0
- data/mod/06_bootstrap/file/darkly_skin/small-image.png +0 -0
- data/mod/06_bootstrap/file/flatly_skin/icon-image.png +0 -0
- data/mod/06_bootstrap/file/flatly_skin/large-image.png +0 -0
- data/mod/06_bootstrap/file/flatly_skin/medium-image.png +0 -0
- data/mod/06_bootstrap/file/flatly_skin/original-image.png +0 -0
- data/mod/06_bootstrap/file/flatly_skin/small-image.png +0 -0
- data/mod/06_bootstrap/file/journal_skin/icon-image.png +0 -0
- data/mod/06_bootstrap/file/journal_skin/large-image.png +0 -0
- data/mod/06_bootstrap/file/journal_skin/medium-image.png +0 -0
- data/mod/06_bootstrap/file/journal_skin/original-image.png +0 -0
- data/mod/06_bootstrap/file/journal_skin/small-image.png +0 -0
- data/mod/06_bootstrap/file/lumen_skin/icon-image.png +0 -0
- data/mod/06_bootstrap/file/lumen_skin/large-image.png +0 -0
- data/mod/06_bootstrap/file/lumen_skin/medium-image.png +0 -0
- data/mod/06_bootstrap/file/lumen_skin/original-image.png +0 -0
- data/mod/06_bootstrap/file/lumen_skin/small-image.png +0 -0
- data/mod/06_bootstrap/file/paper_skin/icon-image.png +0 -0
- data/mod/06_bootstrap/file/paper_skin/large-image.png +0 -0
- data/mod/06_bootstrap/file/paper_skin/medium-image.png +0 -0
- data/mod/06_bootstrap/file/paper_skin/original-image.png +0 -0
- data/mod/06_bootstrap/file/paper_skin/small-image.png +0 -0
- data/mod/06_bootstrap/file/readable_skin/icon-image.png +0 -0
- data/mod/06_bootstrap/file/readable_skin/large-image.png +0 -0
- data/mod/06_bootstrap/file/readable_skin/medium-image.png +0 -0
- data/mod/06_bootstrap/file/readable_skin/original-image.png +0 -0
- data/mod/06_bootstrap/file/readable_skin/small-image.png +0 -0
- data/mod/06_bootstrap/file/sandstone_skin/icon-image.png +0 -0
- data/mod/06_bootstrap/file/sandstone_skin/large-image.png +0 -0
- data/mod/06_bootstrap/file/sandstone_skin/medium-image.png +0 -0
- data/mod/06_bootstrap/file/sandstone_skin/original-image.png +0 -0
- data/mod/06_bootstrap/file/sandstone_skin/small-image.png +0 -0
- data/mod/06_bootstrap/file/simplex_skin/icon-image.png +0 -0
- data/mod/06_bootstrap/file/simplex_skin/large-image.png +0 -0
- data/mod/06_bootstrap/file/simplex_skin/medium-image.png +0 -0
- data/mod/06_bootstrap/file/simplex_skin/original-image.png +0 -0
- data/mod/06_bootstrap/file/simplex_skin/small-image.png +0 -0
- data/mod/06_bootstrap/file/slate_skin/icon-image.png +0 -0
- data/mod/06_bootstrap/file/slate_skin/large-image.png +0 -0
- data/mod/06_bootstrap/file/slate_skin/medium-image.png +0 -0
- data/mod/06_bootstrap/file/slate_skin/original-image.png +0 -0
- data/mod/06_bootstrap/file/slate_skin/small-image.png +0 -0
- data/mod/06_bootstrap/file/spacelab_skin/icon-image.png +0 -0
- data/mod/06_bootstrap/file/spacelab_skin/large-image.png +0 -0
- data/mod/06_bootstrap/file/spacelab_skin/medium-image.png +0 -0
- data/mod/06_bootstrap/file/spacelab_skin/original-image.png +0 -0
- data/mod/06_bootstrap/file/spacelab_skin/small-image.png +0 -0
- data/mod/06_bootstrap/file/superhero_skin/icon-image.png +0 -0
- data/mod/06_bootstrap/file/superhero_skin/large-image.png +0 -0
- data/mod/06_bootstrap/file/superhero_skin/medium-image.png +0 -0
- data/mod/06_bootstrap/file/superhero_skin/original-image.png +0 -0
- data/mod/06_bootstrap/file/superhero_skin/small-image.png +0 -0
- data/mod/06_bootstrap/file/united_skin/icon-image.png +0 -0
- data/mod/06_bootstrap/file/united_skin/large-image.png +0 -0
- data/mod/06_bootstrap/file/united_skin/medium-image.png +0 -0
- data/mod/06_bootstrap/file/united_skin/original-image.png +0 -0
- data/mod/06_bootstrap/file/united_skin/small-image.png +0 -0
- data/mod/06_bootstrap/file/yeti_skin/icon-image.png +0 -0
- data/mod/06_bootstrap/file/yeti_skin/large-image.png +0 -0
- data/mod/06_bootstrap/file/yeti_skin/medium-image.png +0 -0
- data/mod/06_bootstrap/file/yeti_skin/original-image.png +0 -0
- data/mod/06_bootstrap/file/yeti_skin/small-image.png +0 -0
- data/mod/06_bootstrap/lib/stylesheets/bootstrap_cards.scss +199 -0
- data/mod/06_bootstrap/lib/stylesheets/{bootstrap.css → bootstrap_css.css} +0 -0
- data/mod/06_bootstrap/lib/stylesheets/theme_amelia.css +5871 -0
- data/mod/06_bootstrap/lib/stylesheets/{bootstrap-theme.css → theme_bootstrap_default.css} +0 -0
- data/mod/06_bootstrap/lib/stylesheets/theme_cerulean.css +5893 -0
- data/mod/06_bootstrap/lib/stylesheets/theme_cosmo.css +5898 -0
- data/mod/06_bootstrap/lib/stylesheets/theme_cyborg.css +5876 -0
- data/mod/06_bootstrap/lib/stylesheets/theme_darkly.css +5986 -0
- data/mod/06_bootstrap/lib/stylesheets/{darkly.css → theme_flatly.css} +574 -327
- data/mod/06_bootstrap/lib/stylesheets/theme_holo.css +183 -0
- data/mod/06_bootstrap/lib/stylesheets/theme_journal.css +6647 -0
- data/mod/06_bootstrap/lib/stylesheets/theme_lumen.css +6097 -0
- data/mod/06_bootstrap/lib/stylesheets/theme_paper.css +6647 -0
- data/mod/06_bootstrap/lib/stylesheets/theme_readable.css +5896 -0
- data/mod/06_bootstrap/lib/stylesheets/theme_sandstone.css +6733 -0
- data/mod/06_bootstrap/lib/stylesheets/theme_simplex.css +5886 -0
- data/mod/06_bootstrap/lib/stylesheets/theme_slate.css +7057 -0
- data/mod/06_bootstrap/lib/stylesheets/theme_spacelab.css +5935 -0
- data/mod/06_bootstrap/lib/stylesheets/theme_superhero.css +5964 -0
- data/mod/06_bootstrap/lib/stylesheets/theme_united.css +6588 -0
- data/mod/06_bootstrap/lib/stylesheets/theme_yeti.css +6088 -0
- data/mod/06_bootstrap/set/all/rich_bootstrap.rb +0 -16
- data/mod/06_bootstrap/set/self/bootstrap_cards.rb +9 -0
- data/mod/06_bootstrap/set/self/bootstrap_css.rb +5 -3
- data/mod/06_bootstrap/set/self/theme_bootstrap_default.rb +2 -0
- data/mod/06_bootstrap/set/self/theme_cerulean.rb +2 -0
- data/mod/06_bootstrap/set/self/theme_cosmo.rb +2 -0
- data/mod/06_bootstrap/set/self/theme_cyborg.rb +2 -0
- data/mod/06_bootstrap/set/self/theme_darkly.rb +2 -0
- data/mod/06_bootstrap/set/self/theme_flatly.rb +2 -0
- data/mod/06_bootstrap/set/self/theme_journal.rb +2 -0
- data/mod/06_bootstrap/set/self/theme_lumen.rb +2 -0
- data/mod/06_bootstrap/set/self/theme_paper.rb +2 -0
- data/mod/06_bootstrap/set/self/theme_readable.rb +2 -0
- data/mod/06_bootstrap/set/self/theme_sandstone.rb +2 -0
- data/mod/06_bootstrap/set/self/theme_simplex.rb +2 -0
- data/mod/06_bootstrap/set/self/theme_slate.rb +2 -0
- data/mod/06_bootstrap/set/self/theme_spacelab.rb +2 -0
- data/mod/06_bootstrap/set/self/theme_superhero.rb +2 -0
- data/mod/06_bootstrap/set/self/theme_united.rb +2 -0
- data/mod/06_bootstrap/set/self/theme_yeti.rb +2 -0
- data/test/fixtures/card_actions.yml +1951 -1580
- data/test/fixtures/card_acts.yml +282 -282
- data/test/fixtures/card_changes.yml +6769 -5678
- data/test/fixtures/card_references.yml +2086 -1848
- data/test/fixtures/cards.yml +4167 -3183
- metadata +142 -30
- data/mod/03_machines/lib/stylesheets/functional.scss +0 -184
- data/mod/03_machines/set/self/style_standard.rb +0 -8
- data/mod/03_machines/spec/set/self/style_functional_spec.rb +0 -5
- data/mod/03_machines/spec/set/self/style_standard_spec.rb +0 -5
- data/mod/06_bootstrap/set/all/bootstrap/header.rb +0 -29
- data/mod/06_bootstrap/set/self/bootstrap_theme_css.rb +0 -7
- data/mod/06_bootstrap/set/self/navbox.rb +0 -32
- data/mod/06_bootstrap/set/type/search_type.rb +0 -79
@@ -12,5 +12,5 @@ end
|
|
12
12
|
|
13
13
|
def pristine?
|
14
14
|
# has not been edited directly by human users. bleep blorp.
|
15
|
-
new_card? or actions.joins(:act).where('card_acts.actor_id != ?', Card::WagnBotID).exists?
|
15
|
+
new_card? or !actions.joins(:act).where('card_acts.actor_id != ?', Card::WagnBotID).exists?
|
16
16
|
end
|
@@ -2,11 +2,11 @@
|
|
2
2
|
module ClassMethods
|
3
3
|
|
4
4
|
def empty_trash
|
5
|
+
Card.delete_trashed_files
|
5
6
|
Card.where(:trash=>true).delete_all
|
6
7
|
Card::Action.delete_cardless
|
7
8
|
Card::Reference.repair_missing_referees
|
8
9
|
Card::Reference.delete_missing_referers
|
9
|
-
Card.delete_trashed_files
|
10
10
|
end
|
11
11
|
|
12
12
|
def delete_trashed_files #deletes any file not associated with a real card.
|
@@ -22,7 +22,7 @@ module ClassMethods
|
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
|
-
def merge_list attribs, opts
|
25
|
+
def merge_list attribs, opts={}
|
26
26
|
unmerged = []
|
27
27
|
attribs.each do |row|
|
28
28
|
result = begin
|
@@ -46,6 +46,7 @@ module ClassMethods
|
|
46
46
|
Rails.logger.info "failed to merge:\n\n#{ unmerged_json }"
|
47
47
|
end
|
48
48
|
end
|
49
|
+
unmerged
|
49
50
|
end
|
50
51
|
|
51
52
|
|
@@ -22,8 +22,8 @@ describe Card::HtmlFormat do
|
|
22
22
|
it "titled" do
|
23
23
|
result = render_card :titled, :name=>'A+B'
|
24
24
|
assert_view_select result, 'div[class~="titled-view"]' do
|
25
|
-
assert_select '
|
26
|
-
assert_select 'span'
|
25
|
+
assert_select 'div[class~="card-header"]' do
|
26
|
+
assert_select 'span[class~="card-title"]'
|
27
27
|
end
|
28
28
|
assert_select 'div[class~="card-body card-content"]', 'AlphaBeta'
|
29
29
|
end
|
@@ -44,10 +44,9 @@ describe Card::HtmlFormat do
|
|
44
44
|
|
45
45
|
|
46
46
|
it "renders top menu" do
|
47
|
-
|
48
|
-
assert_view_select @simple_page, 'div#menu' do #'nav[class="navbar navbar-default navbar-static-top"]' do
|
47
|
+
assert_view_select @simple_page, 'header' do
|
49
48
|
assert_select 'a[class="internal-link"][href="/"]', 'Home'
|
50
|
-
assert_select 'a[class="internal-link"][href="
|
49
|
+
assert_select 'a[class="internal-link"][href="/:recent"]', 'Recent'
|
51
50
|
assert_select 'form.navbox-form[action="/:search"]' do
|
52
51
|
assert_select 'input[name="_keyword"]'
|
53
52
|
end
|
@@ -57,7 +56,7 @@ describe Card::HtmlFormat do
|
|
57
56
|
it "renders card header" do
|
58
57
|
# lots of duplication here...
|
59
58
|
assert_view_select @simple_page, 'div[class="card-header panel-heading"]' do
|
60
|
-
assert_select '
|
59
|
+
assert_select 'div[class="card-header-title panel-title"]'
|
61
60
|
end
|
62
61
|
end
|
63
62
|
|
@@ -76,7 +75,7 @@ describe Card::HtmlFormat do
|
|
76
75
|
context "layout" do
|
77
76
|
before do
|
78
77
|
Card::Auth.as_bot do
|
79
|
-
@layout_card = Card.create
|
78
|
+
@layout_card = Card.create :name=>'tmp layout', :type=>'Layout'
|
80
79
|
#warn "layout #{@layout_card.inspect}"
|
81
80
|
end
|
82
81
|
c = Card['*all+*layout'] and c.content = '[[tmp layout]]'
|
@@ -86,22 +85,22 @@ describe Card::HtmlFormat do
|
|
86
85
|
#warn "lay #{@layout_card.inspect}, #{@main_card.inspect}"
|
87
86
|
end
|
88
87
|
|
89
|
-
it "should default to core view when in layout mode" do
|
90
|
-
@layout_card.content = "Hi {{A}}"
|
91
|
-
Card::Auth.as_bot { @layout_card.save }
|
92
|
-
|
93
|
-
expect(@main_card.format.render(:layout)).to match('Hi Alpha')
|
94
|
-
end
|
95
|
-
|
96
|
-
it "should default to open view for main card" do
|
97
|
-
@layout_card.content='Open up {{_main}}'
|
98
|
-
Card::Auth.as_bot { @layout_card.save }
|
99
|
-
|
100
|
-
result = @main_card.format.render_layout
|
101
|
-
expect(result).to match(/Open up/)
|
102
|
-
expect(result).to match(/card-header/)
|
103
|
-
expect(result).to match(/Joe User/)
|
104
|
-
end
|
88
|
+
# it "should default to core view when in layout mode" do
|
89
|
+
# @layout_card.content = "Hi {{A}}"
|
90
|
+
# Card::Auth.as_bot { @layout_card.save }
|
91
|
+
#
|
92
|
+
# expect(@main_card.format.render(:layout)).to match('Hi Alpha')
|
93
|
+
# end
|
94
|
+
|
95
|
+
# it "should default to open view for main card" do
|
96
|
+
# @layout_card.content='Open up {{_main}}'
|
97
|
+
# Card::Auth.as_bot { @layout_card.save }
|
98
|
+
#
|
99
|
+
# result = @main_card.format.render_layout
|
100
|
+
# expect(result).to match(/Open up/)
|
101
|
+
# expect(result).to match(/card-header/)
|
102
|
+
# expect(result).to match(/Joe User/)
|
103
|
+
# end
|
105
104
|
|
106
105
|
it "should render custom view of main" do
|
107
106
|
@layout_card.content='Hey {{_main|name}}'
|
@@ -125,7 +124,7 @@ describe Card::HtmlFormat do
|
|
125
124
|
|
126
125
|
it "should handle nested _main references" do
|
127
126
|
Card::Auth.as_bot do
|
128
|
-
@layout_card.content="{{outer space}}"
|
127
|
+
@layout_card.content="{{outer space|core}}"
|
129
128
|
@layout_card.save!
|
130
129
|
Card.create :name=>"outer space", :content=>"{{_main|name}}"
|
131
130
|
end
|
@@ -98,7 +98,7 @@ end
|
|
98
98
|
|
99
99
|
format :html do
|
100
100
|
view :history do |args|
|
101
|
-
frame args.merge(:body_class=>"history-slot", :content=>true, :subheader=>_render_revision_subheader ) do
|
101
|
+
frame args.merge(:body_class=>"history-slot list-group", :content=>true, :subheader=>_render_revision_subheader ) do
|
102
102
|
_render_revisions
|
103
103
|
end
|
104
104
|
end
|
@@ -119,7 +119,7 @@ format :html do
|
|
119
119
|
.history-header
|
120
120
|
%span.slotter
|
121
121
|
= paginate intr, :remote=>true, :theme=>'twitter-bootstrap-3'
|
122
|
-
%
|
122
|
+
%div.history-legend
|
123
123
|
%span.glyphicon.glyphicon-plus-sign.diff-green
|
124
124
|
%span
|
125
125
|
= Card::Diff.render_added_chunk("Added")
|
@@ -144,7 +144,7 @@ format :html do
|
|
144
144
|
rev_nr = params['rev_nr'] || args[:rev_nr]
|
145
145
|
current_rev_nr = params['current_rev_nr'] || args[:current_rev_nr] || card.current_rev_nr
|
146
146
|
hide_diff = (params["hide_diff"]=="true") || args[:hide_diff]
|
147
|
-
wrap( args.merge(:slot_class=>"revision-#{act.id} history-slot") ) do
|
147
|
+
wrap( args.merge(:slot_class=>"revision-#{act.id} history-slot list-group-item") ) do
|
148
148
|
render_haml :card=>card, :act=>act, :act_view=>act_view,
|
149
149
|
:current_rev_nr=>current_rev_nr, :rev_nr=>rev_nr,
|
150
150
|
:hide_diff=> hide_diff do
|
@@ -164,8 +164,7 @@ format :html do
|
|
164
164
|
%em.info
|
165
165
|
Autosave
|
166
166
|
- if current_rev_nr == rev_nr
|
167
|
-
|
168
|
-
%em.info
|
167
|
+
%em.label.label-info
|
169
168
|
Current
|
170
169
|
- elsif act_view == :expanded
|
171
170
|
= rollback_link act.relevant_actions_for(card, act.actions.last.draft)
|
@@ -204,7 +203,7 @@ format :html do
|
|
204
203
|
= wrap_diff :name do
|
205
204
|
- name_changes(action, hide_diff)
|
206
205
|
-else
|
207
|
-
= link_to path(:view=>:related, :related=>{:view=>"history",:name=>action.card.name}), :class=>'slotter
|
206
|
+
= link_to path(:view=>:related, :related=>{:view=>"history",:name=>action.card.name}), :class=>'slotter label-label-default',
|
208
207
|
:slotSelector=>".card-slot.card-frame", :remote=>true do
|
209
208
|
- name_changes(action, hide_diff)
|
210
209
|
-if action.new_type?
|
@@ -227,7 +226,7 @@ format :html do
|
|
227
226
|
content = block.call
|
228
227
|
if content.present?
|
229
228
|
%{
|
230
|
-
<span class="#{field}-diff">
|
229
|
+
<span class="#{field}-diff#{ ' label label-default' if field == :name }">
|
231
230
|
#{content}
|
232
231
|
</span>
|
233
232
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'csv'
|
2
2
|
|
3
3
|
format :csv do
|
4
|
-
def get_inclusion_defaults
|
4
|
+
def get_inclusion_defaults nested_card
|
5
5
|
{ :view => :core }
|
6
6
|
end
|
7
7
|
|
@@ -26,7 +26,7 @@ format :csv do
|
|
26
26
|
view :csv_title_row do |args|
|
27
27
|
#NOTE: assumes all cards have the same structure!
|
28
28
|
begin
|
29
|
-
card1 =
|
29
|
+
card1 = search_results.first
|
30
30
|
|
31
31
|
parsed_content = Card::Content.new card1.raw_content, self
|
32
32
|
unless String === parsed_content.__getobj__
|
@@ -5,6 +5,11 @@ event :add_and_drop_items, :before=>:approve, :on=>:save do
|
|
5
5
|
end
|
6
6
|
|
7
7
|
format do
|
8
|
+
def item_links args={}
|
9
|
+
card.item_cards(args).map do |item_card|
|
10
|
+
subformat(item_card).render_link
|
11
|
+
end
|
12
|
+
end
|
8
13
|
|
9
14
|
def wrap_item item, args={}
|
10
15
|
item #no wrap in base
|
@@ -36,19 +41,21 @@ format :html do
|
|
36
41
|
end
|
37
42
|
|
38
43
|
view :closed_content do |args|
|
39
|
-
args[:item] = (args[:item] || inclusion_defaults[:view])=='name' ? 'name' : 'link'
|
44
|
+
args[:item] = (args[:item] || inclusion_defaults(card)[:view])=='name' ? 'name' : 'link'
|
40
45
|
args[:joint] ||= ', '
|
41
46
|
_render_core args
|
42
47
|
end
|
43
48
|
|
44
|
-
view :edit do |args|
|
45
|
-
super(args.merge(:pointer_item_class=>'form-control'))
|
46
|
-
end
|
49
|
+
# view :edit do |args|
|
50
|
+
# super(args.merge(:pointer_item_class=>'form-control'))
|
51
|
+
# end
|
47
52
|
|
48
53
|
view :editor do |args|
|
49
54
|
part_view = (c = card.rule(:input)) ? c.gsub(/[\[\]]/,'') : :list
|
50
55
|
hidden_field( :content, :class=>'card-content') +
|
51
|
-
raw(_render
|
56
|
+
raw(_render part_view, args)
|
57
|
+
|
58
|
+
#.merge(:pointer_item_class=>'form-control')))
|
52
59
|
end
|
53
60
|
|
54
61
|
view :list do |args|
|
@@ -99,15 +106,6 @@ format :html do
|
|
99
106
|
end
|
100
107
|
|
101
108
|
|
102
|
-
view :old_list_item do |args|
|
103
|
-
%{
|
104
|
-
<li class="pointer-li">
|
105
|
-
#{ text_field_tag 'pointer_item', args[:pointer_item], :class=>'pointer-item-text' }
|
106
|
-
#{ link_to '', '#', :class=>'pointer-item-delete ui-icon ui-icon-circle-close' }
|
107
|
-
</li>
|
108
|
-
}
|
109
|
-
end
|
110
|
-
|
111
109
|
view :checkbox do |args|
|
112
110
|
options = card.options.map do |option|
|
113
111
|
checked = card.item_names.include?(option.name)
|
@@ -115,7 +113,7 @@ format :html do
|
|
115
113
|
description = pointer_option_description option
|
116
114
|
%{
|
117
115
|
<div class="pointer-checkbox">
|
118
|
-
#{ check_box_tag "pointer_checkbox", option.name, checked, :id=>id, :class=>
|
116
|
+
#{ check_box_tag "pointer_checkbox", option.name, checked, :id=>id, :class=>'pointer-checkbox-button' }
|
119
117
|
<label for="#{id}">#{option.name}</label>
|
120
118
|
#{ %{<div class="checkbox-option-description">#{ description }</div>} if description }
|
121
119
|
</div>
|
@@ -128,7 +126,7 @@ format :html do
|
|
128
126
|
view :multiselect do |args|
|
129
127
|
selected_options = card.item_names.map{|i_n| (c=Card.fetch(i_n) and c.name) or i_n}
|
130
128
|
options = options_from_collection_for_select(card.options,:name,:name,selected_options)
|
131
|
-
select_tag("pointer_multiselect", options, :multiple=>true, :class=>
|
129
|
+
select_tag("pointer_multiselect", options, :multiple=>true, :class=>'pointer-multiselect form-control')
|
132
130
|
end
|
133
131
|
|
134
132
|
view :radio do |args|
|
@@ -138,20 +136,20 @@ format :html do
|
|
138
136
|
id = "pointer-radio-#{option.cardname.key}"
|
139
137
|
description = pointer_option_description option
|
140
138
|
%{
|
141
|
-
<
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
</
|
139
|
+
<li class="pointer-radio radio">
|
140
|
+
#{ radio_button_tag input_name, option.name, checked, :id=>id, :class=>'pointer-radio-button' }
|
141
|
+
<label for="#{id}">#{ option.label }</label>
|
142
|
+
#{ %{<div class="radio-option-description">#{ description }</div>} if description }
|
143
|
+
</li>
|
146
144
|
}
|
147
145
|
end.join("\n")
|
148
146
|
|
149
|
-
%{<
|
147
|
+
%{<ul class="pointer-radio-list">#{options}</ul>}
|
150
148
|
end
|
151
149
|
|
152
150
|
view :select do |args|
|
153
151
|
options = [["-- Select --",""]] + card.options.map{|x| [x.name,x.name]}
|
154
|
-
select_tag("pointer_select", options_for_select(options, card.item_names.first), :class=>
|
152
|
+
select_tag("pointer_select", options_for_select(options, card.item_names.first), :class=>'pointer-select form-control')
|
155
153
|
end
|
156
154
|
|
157
155
|
|
@@ -171,12 +169,6 @@ format :html do
|
|
171
169
|
%{<div class="pointer-item item-#{args[:view]}">#{item}</div>}
|
172
170
|
end
|
173
171
|
|
174
|
-
def item_css_class option, args
|
175
|
-
css_classes = ["pointer-#{option}"]
|
176
|
-
css_classes << args[:pointer_item_class] if args[:pointer_item_class]
|
177
|
-
css_classes.compact*' '
|
178
|
-
end
|
179
|
-
|
180
172
|
|
181
173
|
end
|
182
174
|
|
@@ -301,6 +293,10 @@ def drop_item name
|
|
301
293
|
end
|
302
294
|
end
|
303
295
|
|
296
|
+
def insert_item index, name
|
297
|
+
new_names = item_names.insert(index,name)
|
298
|
+
self.content = new_names.map { |name| "[[#{name}]]" }.join "\n"
|
299
|
+
end
|
304
300
|
|
305
301
|
|
306
302
|
def options_card
|
@@ -213,7 +213,7 @@ $(window).ready ->
|
|
213
213
|
$(this).closest('form').find('#card_update_referencers').val 'true'
|
214
214
|
|
215
215
|
$('body').on 'submit', '.edit_name-view .card-form', ->
|
216
|
-
confirmer = $(this).find '.
|
216
|
+
confirmer = $(this).find '.alert'
|
217
217
|
if confirmer.is ':hidden'
|
218
218
|
if $(this).find('#referers').val() > 0
|
219
219
|
$(this).find('.renamer-updater').show()
|
@@ -239,11 +239,12 @@ $(window).ready ->
|
|
239
239
|
window.location = $(this).attr('href')
|
240
240
|
|
241
241
|
unless wagn.noDoubleClick
|
242
|
-
$('body').on 'dblclick', '
|
243
|
-
|
244
|
-
return false if
|
245
|
-
return false if
|
246
|
-
return false if
|
242
|
+
$('body').on 'dblclick', 'div', (event) ->
|
243
|
+
t = $(this)
|
244
|
+
return false if t.closest( '.nodblclick' )[0]
|
245
|
+
return false if t.closest( '.card-header' )[0]
|
246
|
+
return false if t.find( '.card-editor' )[0]
|
247
|
+
s = t.slot()
|
247
248
|
return false unless s.data('cardId')
|
248
249
|
s.addClass 'slotter'
|
249
250
|
s.attr 'href', wagn.rootPath + '/card/edit/~' + s.data('cardId')
|
@@ -37,7 +37,7 @@ $.extend wagn,
|
|
37
37
|
wagn.tinyMCEConfig = setter()
|
38
38
|
|
39
39
|
initAce: (textarea) ->
|
40
|
-
type_code = textarea.
|
40
|
+
type_code = textarea.attr "data-card-type-code"
|
41
41
|
hash = {}
|
42
42
|
hash["java_script"] = "javascript"
|
43
43
|
hash["coffee_script"] = "coffee"
|
@@ -45,6 +45,7 @@ $.extend wagn,
|
|
45
45
|
hash["scss"] = "scss"
|
46
46
|
hash["html"] = "html"
|
47
47
|
hash["search_type"] = "json"
|
48
|
+
hash["layout_type"] = "html"
|
48
49
|
mode = hash[type_code]
|
49
50
|
unless mode
|
50
51
|
textarea.autosize()
|
@@ -0,0 +1,154 @@
|
|
1
|
+
/* This backwards-compatibility spreadsheet is intended to keep the old "Classic" skins working even as the HTML has changed for the new bootstrap skins. It is NOT intended to be used in new skins. */
|
2
|
+
|
3
|
+
#menu {
|
4
|
+
height: 30px;
|
5
|
+
div.container-fluid{
|
6
|
+
display: block;
|
7
|
+
}
|
8
|
+
div.navbar-header {
|
9
|
+
display: none;
|
10
|
+
}
|
11
|
+
ul {
|
12
|
+
font-size: 14px;
|
13
|
+
margin-top: 5px;
|
14
|
+
}
|
15
|
+
li {
|
16
|
+
display: inline;
|
17
|
+
}
|
18
|
+
.navbar-left {
|
19
|
+
float: left;
|
20
|
+
}
|
21
|
+
.navbar-right {
|
22
|
+
float: right;
|
23
|
+
margin-right: 15px;
|
24
|
+
}
|
25
|
+
.navbar-form {
|
26
|
+
width: 30%;
|
27
|
+
margin-top: 5px;
|
28
|
+
margin-left: 10px;
|
29
|
+
input {
|
30
|
+
width: 100%;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
}
|
34
|
+
|
35
|
+
#primary {
|
36
|
+
clear: both;
|
37
|
+
}
|
38
|
+
|
39
|
+
|
40
|
+
// removed from standard.scss
|
41
|
+
input, select, textarea {
|
42
|
+
padding: 0 1%;
|
43
|
+
}
|
44
|
+
input, select {
|
45
|
+
max-width: 97.5%;
|
46
|
+
}
|
47
|
+
|
48
|
+
fieldset {
|
49
|
+
border: 0;
|
50
|
+
padding: 0;
|
51
|
+
}
|
52
|
+
.form-group {
|
53
|
+
padding: 10px;
|
54
|
+
}
|
55
|
+
|
56
|
+
.alert-info {
|
57
|
+
background: #ccc;
|
58
|
+
padding: 5px 10px;
|
59
|
+
}
|
60
|
+
|
61
|
+
|
62
|
+
.pagination {
|
63
|
+
display: inline-block;
|
64
|
+
padding-left: 0;
|
65
|
+
margin: 20px 0;
|
66
|
+
border-radius: 4px;
|
67
|
+
}
|
68
|
+
.pagination > li {
|
69
|
+
display: inline;
|
70
|
+
}
|
71
|
+
.pagination > li > a,
|
72
|
+
.pagination > li > span {
|
73
|
+
position: relative;
|
74
|
+
float: left;
|
75
|
+
padding: 6px 12px;
|
76
|
+
margin-left: -1px;
|
77
|
+
line-height: 1.42857143;
|
78
|
+
color: #337ab7;
|
79
|
+
text-decoration: none;
|
80
|
+
background-color: #fff;
|
81
|
+
border: 1px solid #ddd;
|
82
|
+
}
|
83
|
+
.pagination > li:first-child > a,
|
84
|
+
.pagination > li:first-child > span {
|
85
|
+
margin-left: 0;
|
86
|
+
border-top-left-radius: 4px;
|
87
|
+
border-bottom-left-radius: 4px;
|
88
|
+
}
|
89
|
+
.pagination > li:last-child > a,
|
90
|
+
.pagination > li:last-child > span {
|
91
|
+
border-top-right-radius: 4px;
|
92
|
+
border-bottom-right-radius: 4px;
|
93
|
+
}
|
94
|
+
.pagination > li > a:hover,
|
95
|
+
.pagination > li > span:hover,
|
96
|
+
.pagination > li > a:focus,
|
97
|
+
.pagination > li > span:focus {
|
98
|
+
color: #666666;
|
99
|
+
background-color: #eee;
|
100
|
+
border-color: #ddd;
|
101
|
+
}
|
102
|
+
.pagination > .active > a,
|
103
|
+
.pagination > .active > span,
|
104
|
+
.pagination > .active > a:hover,
|
105
|
+
.pagination > .active > span:hover,
|
106
|
+
.pagination > .active > a:focus,
|
107
|
+
.pagination > .active > span:focus {
|
108
|
+
z-index: 2;
|
109
|
+
color: #fff;
|
110
|
+
cursor: default;
|
111
|
+
background-color: #666666;
|
112
|
+
border-color: #666666;
|
113
|
+
}
|
114
|
+
.pagination > .disabled > span,
|
115
|
+
.pagination > .disabled > span:hover,
|
116
|
+
.pagination > .disabled > span:focus,
|
117
|
+
.pagination > .disabled > a,
|
118
|
+
.pagination > .disabled > a:hover,
|
119
|
+
.pagination > .disabled > a:focus {
|
120
|
+
color: #777;
|
121
|
+
cursor: not-allowed;
|
122
|
+
background-color: #fff;
|
123
|
+
border-color: #ddd;
|
124
|
+
}
|
125
|
+
.pagination-lg > li > a,
|
126
|
+
.pagination-lg > li > span {
|
127
|
+
padding: 10px 16px;
|
128
|
+
font-size: 18px;
|
129
|
+
}
|
130
|
+
.pagination-lg > li:first-child > a,
|
131
|
+
.pagination-lg > li:first-child > span {
|
132
|
+
border-top-left-radius: 6px;
|
133
|
+
border-bottom-left-radius: 6px;
|
134
|
+
}
|
135
|
+
.pagination-lg > li:last-child > a,
|
136
|
+
.pagination-lg > li:last-child > span {
|
137
|
+
border-top-right-radius: 6px;
|
138
|
+
border-bottom-right-radius: 6px;
|
139
|
+
}
|
140
|
+
.pagination-sm > li > a,
|
141
|
+
.pagination-sm > li > span {
|
142
|
+
padding: 5px 10px;
|
143
|
+
font-size: 12px;
|
144
|
+
}
|
145
|
+
.pagination-sm > li:first-child > a,
|
146
|
+
.pagination-sm > li:first-child > span {
|
147
|
+
border-top-left-radius: 3px;
|
148
|
+
border-bottom-left-radius: 3px;
|
149
|
+
}
|
150
|
+
.pagination-sm > li:last-child > a,
|
151
|
+
.pagination-sm > li:last-child > span {
|
152
|
+
border-top-right-radius: 3px;
|
153
|
+
border-bottom-right-radius: 3px;
|
154
|
+
}
|