bcms_tools 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bcms_tools.gemspec +2 -2
- data/lib/bcms_tools/form_helpers.rb +8 -2
- metadata +2 -2
data/VERSION
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.10
|
2
2
|
|
data/bcms_tools.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{bcms_tools}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.10"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["buzzware"]
|
12
|
-
s.date = %q{2010-03-
|
12
|
+
s.date = %q{2010-03-12}
|
13
13
|
s.description = %q{Tools for BrowserCms.}
|
14
14
|
s.email = %q{contact@buzzware.com.au}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -55,7 +55,7 @@ Cms::FormBuilder.class_eval do
|
|
55
55
|
method = (aOptions.delete(:method) || :attachment)
|
56
56
|
method_file = (method.to_s + '_file').to_sym
|
57
57
|
_attachment = object.send(method)
|
58
|
-
result = cms_file_field(method_file.to_sym, aOptions)
|
58
|
+
result = cms_file_field(method_file.to_sym, aOptions)
|
59
59
|
|
60
60
|
underscore_id = object_name
|
61
61
|
underscore_id += '_'+options[:index].to_s if options[:index]
|
@@ -87,7 +87,12 @@ Cms::FormBuilder.class_eval do
|
|
87
87
|
result = result.sub('</label>','</label>'+thumbnail)
|
88
88
|
result = result.gsub(object_name+'_'+method_file.to_s,underscore_id)
|
89
89
|
result = StringUtils.split3(result,/<div class="fields file_fields.*?>/) {|h,m,t| XmlUtils.quick_join_att(m,'class','thumbnail_upload',' ') }
|
90
|
-
|
90
|
+
unless aOptions[:remove_check_box]==false || object.new_record?
|
91
|
+
checkbox = '<div style="display: block; float: right; width: auto; height: auto;">'+remove_check_box()+'</div>'
|
92
|
+
result = StringUtils.split3(result,/<div.*?>/){|h,m,t|
|
93
|
+
m+checkbox
|
94
|
+
}
|
95
|
+
end
|
91
96
|
return result
|
92
97
|
end
|
93
98
|
|
@@ -107,6 +112,7 @@ Cms::FormBuilder.class_eval do
|
|
107
112
|
end
|
108
113
|
|
109
114
|
def text_display_field(aField,aOptions={})
|
115
|
+
template.concat("<br clear=\"all\" />") # Fixes issue with bad line wrapping
|
110
116
|
template.concat('<div class="fields text_fields">')
|
111
117
|
if aOptions[:label]
|
112
118
|
label aField, aOptions[:label]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bcms_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- buzzware
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-03-
|
12
|
+
date: 2010-03-12 00:00:00 +08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|