king_views 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/king_form/lib/king_form/builder/form_fields.rb +0 -49
- data/king_views.gemspec +2 -2
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.2
|
@@ -252,55 +252,6 @@ module KingForm
|
|
252
252
|
end
|
253
253
|
end
|
254
254
|
|
255
|
-
# Create a submit button
|
256
|
-
# due to better formating the default button call is wrapped in a span.
|
257
|
-
#
|
258
|
-
# === Example (haml)
|
259
|
-
# - f.actions do
|
260
|
-
# = f.submit t('form.save')
|
261
|
-
#
|
262
|
-
# = f.submit "save", :span => {:class=>'custom class'}
|
263
|
-
#
|
264
|
-
# = f.submit 'Submit Me', :name => 'save', nowrap=>true
|
265
|
-
# = f.submit t('form.save'), :name => 'refresh', nowrap=>true
|
266
|
-
# = f.submit 'Print', :name => 'print', :class=>'print, nowrap=>true
|
267
|
-
#
|
268
|
-
# => <div class="actions">
|
269
|
-
# <span class='input big'>
|
270
|
-
# <input id="invoice_save" class="submit" type="submit" value="Save" name="save" />
|
271
|
-
# </span>
|
272
|
-
#
|
273
|
-
# <span class='custom class'>
|
274
|
-
# <input id="invoice_save" class="submit" type="submit" value="Save" name="save" />
|
275
|
-
# </span>
|
276
|
-
#
|
277
|
-
# <input id="invoice_save" class="submit" type="submit" value="Speichern" name="save" />
|
278
|
-
# <input id="invoice_refresh" class="submit" type="submit" value="Aktualisieren" name="refresh" />
|
279
|
-
# <input id="invoice_print" class="print" type="submit" value="Print" name="print" />
|
280
|
-
# </div>
|
281
|
-
#
|
282
|
-
#===Params
|
283
|
-
#Options Hash:
|
284
|
-
# :name is only needed if you have more than one button on the form
|
285
|
-
# :id is calculated based on the :name
|
286
|
-
# :class defaults to "submit"
|
287
|
-
def submit(value, options = {})
|
288
|
-
options[:id] ||= build_id(options[:name] || 'submit')
|
289
|
-
options[:class] ||= 'submit'
|
290
|
-
|
291
|
-
if !options.delete(:nowrap) #wrap submit in span so button can be formated with css
|
292
|
-
span_options = options.delete(:span) || {:class=>'input big'}
|
293
|
-
@template.capture_haml do
|
294
|
-
@template.haml_tag :span, span_options do
|
295
|
-
@template.haml_concat(super(value, options))
|
296
|
-
end
|
297
|
-
end
|
298
|
-
else #display field without span wrapping
|
299
|
-
super value, options
|
300
|
-
end
|
301
|
-
end
|
302
|
-
|
303
|
-
|
304
255
|
# Display a fields value as static text
|
305
256
|
#
|
306
257
|
# === Example haml
|
data/king_views.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{king_views}
|
8
|
-
s.version = "1.0.
|
8
|
+
s.version = "1.0.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Georg Leciejewski"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-05-02}
|
13
13
|
s.description = %q{Clean up your Forms using king_form for dl or labeled forms. Use king_list for an easy markup of tables in your lists and dl-enabled listings in your detail views. }
|
14
14
|
s.email = %q{gl@salesking.eu}
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 1.0.
|
8
|
+
- 2
|
9
|
+
version: 1.0.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Georg Leciejewski
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-05-02 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|