flexa_lib 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
data/flexa_lib.gemspec CHANGED
@@ -7,7 +7,7 @@ require 'flexa_lib/version'
7
7
  Gem::Specification.new do |s|
8
8
  s.name = 'flexa_lib'
9
9
  # s.version = FlexaLib::VERSION
10
- s.version = '0.3.3'
10
+ s.version = '0.3.4'
11
11
  s.platform = Gem::Platform::RUBY
12
12
 
13
13
  s.authors = ['Allan Freitas','Marcio Sfalsin']
@@ -1,34 +1,22 @@
1
- module FlexaLib
1
+ module FlexaFormtasticBootstrap
2
2
  module Inputs
3
- class DatePickerInput < Formtastic::Inputs::StringInput
3
+ class DatePickerInput < Formtastic::Inputs::DatetimeInput
4
+ include Base
5
+ include Base::Stringish
6
+ include Base::Timeish
4
7
 
5
8
  def to_html
6
- input_wrapping do
7
- options[:lookup].inspect if options[:lookup].present?
8
- label_html <<
9
- builder.text_field(options[:lookup][:display], input_html_options) <<
10
- template.link_to(options[:lookup][:display],options[:lookup][:path],{:target=>"_blank",:class=>"btn"})<<
11
- builder.hidden_field(method, {})
9
+ generic_input_wrapping do
10
+ builder.text_field(method, input_html_options)
12
11
  end
13
12
  end
14
13
 
15
- def label_html_options
16
- {}.tap do |opts|
17
- opts[:for] ||= input_html_options[:id]
18
- opts[:class] = [opts[:class]]
19
- end
20
- end
21
-
22
- #def input_html_options
23
- # super.reject { |k, v| [:min, :max, :step].include?(k) }
24
- #end
25
-
26
14
  def wrapper_html_options
27
- super.merge(:class => "#{super[:class]} datePicker" )
15
+ #super.merge(:class => "#{super[:class]} datePicker" )
28
16
  end
29
17
 
30
18
  def input_html_options
31
- super.merge(:class => "datePicker")
19
+ super.merge(:class => "datepicker_flexa")
32
20
  end
33
21
 
34
22
  end
@@ -1,5 +1,5 @@
1
1
  require 'flexa_lib/inputs/lookup_input'
2
2
  require 'flexa_lib/inputs/boolean_input'
3
3
  require 'flexa_lib/inputs/radio_input'
4
- #require 'flexa_lib/inputs/date_picker_input'
4
+ require 'flexa_lib/inputs/date_picker_input'
5
5
 
@@ -1,4 +1,4 @@
1
- <%%= flexa_table_for @<%=class_name.pluralize.downcase%>, :actions=>[:select] do -%>
1
+ <%%= flexa_table_for @<%=class_name.underscore.pluralize.downcase%>, :actions=>[:select] do -%>
2
2
  <% if colunas.count>0 %><% colunas.each do |coluna| %><%% column :<%=coluna%>, :title=>"<%=coluna.humanize%>" %><% end %><% end %>
3
3
  <%% end -%>
4
4
 
@@ -9,6 +9,7 @@
9
9
  //= require bootstrap
10
10
  //= require populate
11
11
  //= require 'jquery.cookie'
12
+ //= require 'jquery-ui-1.8.18.custom.min'
12
13
 
13
14
  $(document).ready(function(){
14
15
 
@@ -63,10 +64,22 @@ $(document).ready(function(){
63
64
 
64
65
  try {
65
66
  $('input.ui-datepicker').datepicker();
66
- $('.datePicker').datepicker();
67
+ //$('.datePicker').datepicker();
68
+
69
+ $(".datepicker_flexa").datepicker({
70
+ //mostrar select com mes e com ano(de 10 em 10)
71
+ changeMonth: true,
72
+ changeYear: true,
73
+ //mostra a data em outros meses
74
+ showOtherMonths: true,
75
+ selectOtherMonths: true,
76
+ //formato da data
77
+ dateFormat: 'dd/mm/yy'
78
+ });
79
+
67
80
  } catch(err) {
68
81
  null;
69
82
  }
70
83
 
71
84
  });
72
-
85
+ //fim do arquivo flexa-themejs.js