brick 1.0.164 → 1.0.166
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/brick/frameworks/rails/engine.rb +1 -1
- data/lib/brick/frameworks/rails/form_tags.rb +14 -9
- data/lib/brick/version_number.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04daac2a29417d6243839a369b82f47ce12b380e53751a8f2374239962af887e
|
4
|
+
data.tar.gz: ff3c520f128963490cfbae81aee29ac3875bc819df113ad29cef09b625d0275b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10e4983d3ebcc5e965e85784b38e3eff05b30a05fb46dd442560fc8845d097f95b3b3f4b4662e70238983b3f948c83647acc4919f521f49f9405b7f5bd71895d
|
7
|
+
data.tar.gz: 56e5e5afa63fa991321881dc0b2c703ddd2d4a0b88d5856db3b272e36ad66abdfe1ea89e8d203ba6c56851a3ca4727c3e8c68daadc43888d59fea2ff095961ae
|
@@ -2002,7 +2002,7 @@ document.querySelectorAll(\"input, select\").forEach(function (inp) {
|
|
2002
2002
|
send(:root, action)
|
2003
2003
|
end
|
2004
2004
|
end
|
2005
|
-
::Brick.established_drf = "/#{::Brick.config.path_prefix}#{
|
2005
|
+
::Brick.established_drf = "/#{::Brick.config.path_prefix}#{action[action.index('#')..-1]}"
|
2006
2006
|
end
|
2007
2007
|
end
|
2008
2008
|
|
@@ -61,29 +61,34 @@ module Brick::Rails::FormTags
|
|
61
61
|
end
|
62
62
|
sequence.reject! { |nm| exclusions.include?(nm) } if exclusions
|
63
63
|
out << sequence.each_with_object(+'') do |col_name, s|
|
64
|
-
s << '<th
|
64
|
+
s << '<th'
|
65
65
|
if (col = cols[col_name]).is_a?(ActiveRecord::ConnectionAdapters::Column)
|
66
|
-
s << "title=\"#{col.comment}\"
|
66
|
+
s << " title=\"#{col.comment}\"" if col.respond_to?(:comment) && !col.comment.blank?
|
67
67
|
s << if (bt = bts[col_name])
|
68
68
|
# Allow sorting for any BT except polymorphics
|
69
|
-
"x-order=\"#{bt.first.to_s + '"' unless bt[2]
|
70
|
-
bt[1].map { |bt_pair| bt_pair.first.bt_link(bt.first) }.join(' ')
|
69
|
+
x_order = " x-order=\"#{bt.first.to_s + '"'}" unless bt[2]
|
70
|
+
"#{x_order}>BT #{bt[1].map { |bt_pair| bt_pair.first.bt_link(bt.first) }.join(' ')}"
|
71
71
|
else # Normal column
|
72
72
|
col_name_humanised = klass.human_attribute_name(col_name, { default: col_name })
|
73
|
-
"x-order=\"#{col_name
|
73
|
+
x_order = " x-order=\"#{col_name}\"" if true
|
74
|
+
"#{x_order}>#{col_name_humanised}"
|
74
75
|
end
|
75
76
|
elsif col # HM column
|
76
77
|
options = {}
|
77
78
|
options[col[1].inheritance_column] = col[1].name unless col[1] == col[1].base_class
|
78
|
-
|
79
|
+
x_order = " x-order=\"#{col_name}\"" if true
|
80
|
+
s << "#{x_order}>#{col[2]} "
|
79
81
|
s << (col.first ? "#{col[3]}" : "#{link_to(col[3], send("#{col[1]._brick_index}_path", options))}")
|
80
82
|
elsif cust_cols.key?(col_name) # Custom column
|
81
|
-
|
83
|
+
x_order = " x-order=\"#{col_name}\"" if true
|
84
|
+
s << "#{x_order}>#{col_name}"
|
82
85
|
elsif col_name.is_a?(Symbol) && (hot = bts[col_name]) # has_one :through
|
83
|
-
|
86
|
+
x_order = " x-order=\"#{hot.first.to_s}\"" if true
|
87
|
+
s << "#{x_order}>HOT " +
|
84
88
|
hot[1].map { |hot_pair| hot_pair.first.bt_link(col_name) }.join(' ')
|
85
89
|
elsif (bt = composite_bt_names[col_name])
|
86
|
-
|
90
|
+
x_order = " x-order=\"#{bt.first.to_s}\"" unless bt[2]
|
91
|
+
s << "#{x_order}>BT comp " +
|
87
92
|
bt[1].map { |bt_pair| bt_pair.first.bt_link(bt.first) }.join(' ')
|
88
93
|
else # Bad column name!
|
89
94
|
s << "title=\"<< Unknown column >>\">#{col_name}"
|
data/lib/brick/version_number.rb
CHANGED