leonardo 1.8.0 → 1.8.1

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/CHANGELOG CHANGED
@@ -1,8 +1,9 @@
1
- 1.8.0 (October 7th, 2011) Marco Mastrodonato
2
- * Added sortable columns
1
+ 1.8.1 (October 10th, 2011) Marco Mastrodonato
2
+ * Updated rspec to pass index view test with two new controller helpers
3
+ * Date managed with datepicker are now in year-month-day format and now works with sqlite3
4
+ * Added autosubmit class by default. A new function in custom.js let you to autosubmit searches on filter fields change event
3
5
 
4
6
  TODO:
5
- * Pass spec index view with new sortable helpers
6
7
  * Lists: Multiple selection and multiple operation
7
8
  * Lists: Add id as first column
8
9
  * Model: Create name attribute for every one that does not have
@@ -11,6 +12,11 @@ TODO:
11
12
 
12
13
 
13
14
 
15
+ 1.8.0 (October 7th, 2011) Marco Mastrodonato
16
+ * Added sortable columns
17
+
18
+
19
+
14
20
  1.7.2 (October 5th, 2011) Marco Mastrodonato
15
21
  * Updated formtastic support to version 2.0
16
22
  * Updated template.rb
@@ -21,16 +21,16 @@
21
21
  <%- case attribute.type -%>
22
22
  <%- when :references, :belongs_to -%>
23
23
  <%- unless nested? -%>
24
- <%%= f.collection_select :<%= attribute.name %>_id, <%= attribute.name.classify %>.all, :id, :name, :prompt => true %>
24
+ <%%= f.collection_select :<%= attribute.name %>_id, <%= attribute.name.classify %>.all, :id, :name, {:prompt => true}, {:class => 'autosubmit'} %>
25
25
  <%- end -%>
26
26
  <%- when :boolean -%>
27
- <%%= radio_button("<%= singular_table_name %>", "<%= attribute.name %>", "1", {:checked => (@<%= singular_table_name %>.<%= attribute.name %>)}) %><%%= label_tag "<%= singular_table_name %>_<%= attribute.name %>_1", t(:yes) %><br />
28
- <%%= radio_button("<%= singular_table_name %>", "<%= attribute.name %>", "0", {:checked => (!@<%= singular_table_name %>.<%= attribute.name %>)}) %><%%= label_tag "<%= singular_table_name %>_<%= attribute.name %>_0", t(:no) %><br />
29
- <%%= radio_button("<%= singular_table_name %>", "<%= attribute.name %>", "") %><%%= label_tag "<%= singular_table_name %>_<%= attribute.name %>_", t(:all) %>
27
+ <%%= radio_button("<%= singular_table_name %>", "<%= attribute.name %>", "1", {:checked => (@<%= singular_table_name %>.<%= attribute.name %>), :class => 'autosubmit'}) %><%%= label_tag "<%= singular_table_name %>_<%= attribute.name %>_1", t(:yes) %><br />
28
+ <%%= radio_button("<%= singular_table_name %>", "<%= attribute.name %>", "0", {:checked => (!@<%= singular_table_name %>.<%= attribute.name %>), :class => 'autosubmit'}) %><%%= label_tag "<%= singular_table_name %>_<%= attribute.name %>_0", t(:no) %><br />
29
+ <%%= radio_button("<%= singular_table_name %>", "<%= attribute.name %>", "", {:class => 'autosubmit'}) %><%%= label_tag "<%= singular_table_name %>_<%= attribute.name %>_", t(:all) %>
30
30
  <%- when :text -%>
31
31
  <%%= f.text_field :<%= attribute.name %> %>
32
32
  <%- when :date -%>
33
- <%%= f.text_field :<%= attribute.name %><%=", :class => \"calendar\"" if jquery_ui?%> %>
33
+ <%%= f.text_field :<%= attribute.name %><%=", :class => \"calendar autosubmit\"" if jquery_ui?%> %>
34
34
  <%- else -%>
35
35
  <%%= f.<%= attribute.field_type %> :<%= attribute.name %> %>
36
36
  <%- end -%>
@@ -1,2 +1,8 @@
1
1
  // Leonardo
2
- // Insert here your javascript
2
+ // Insert here your javascript
3
+
4
+ //Add this class to an input form to auto submit on change
5
+ $('.autosubmit').live('change', function() {
6
+ setTimeout("$('#"+this.id+"').parents('form:first').submit();", 300);
7
+ return false;
8
+ });
@@ -7,7 +7,8 @@ $main_bg: white
7
7
  $title_color: darken($second_color, 5%)
8
8
  $text_color: darken($main_color, 50%)
9
9
  $link_color: darken($main_color, 45%)
10
- $main_bg_dark: darken($main_color, 5%)
10
+ $main_bg_dark: darken($main_bg, 5%)
11
+ $main_bg_darker: darken($main_bg, 15%)
11
12
  $header_bg: darken($main_color, 60%)
12
13
  $header_bg_soft: lighten($header_bg, 17%)
13
14
  $header_color: lighten($header_bg, 25%)
@@ -100,6 +101,12 @@ input, select, textarea
100
101
  border-radius: 6px
101
102
  font-size: 1.5em
102
103
  padding: 0.2em
104
+ &.callback
105
+ background: inherit
106
+ border: 0 none
107
+ color: $main_bg_darker
108
+ display: block
109
+ font-size: 0.6em
103
110
 
104
111
  div.navigation
105
112
  width: 100%
@@ -14,7 +14,7 @@ jQuery(function($){
14
14
  dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
15
15
  dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
16
16
  weekHeader: 'Wo',
17
- dateFormat: 'dd-mm-yy',
17
+ dateFormat: 'yy-mm-dd',
18
18
  firstDay: 1,
19
19
  isRTL: false,
20
20
  showMonthAfterYear: false,
@@ -14,7 +14,7 @@ jQuery(function($){
14
14
  dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
15
15
  dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
16
16
  weekHeader: 'Wk',
17
- dateFormat: 'dd-mm-yy',
17
+ dateFormat: 'yy-mm-dd',
18
18
  firstDay: 1,
19
19
  isRTL: false,
20
20
  showMonthAfterYear: false,
@@ -14,7 +14,7 @@ jQuery(function($){
14
14
  dayNamesShort: ['Dom','Lun','Mar','Mer','Gio','Ven','Sab'],
15
15
  dayNamesMin: ['Do','Lu','Ma','Me','Gi','Ve','Sa'],
16
16
  weekHeader: 'Sm',
17
- dateFormat: 'dd-mm-yy',
17
+ dateFormat: 'yy-mm-dd',
18
18
  firstDay: 1,
19
19
  isRTL: false,
20
20
  showMonthAfterYear: false,
@@ -45,6 +45,7 @@ describe "<%= formatted_namespace_path %><%= ns_table_name %>/index.html.<%= opt
45
45
  @records = assign(:<%= table_name %>, FactoryGirl.create_list(:<%= ns_file_name %>, 2<%= str_parents_create %>) )
46
46
  <%- end -%>
47
47
  assign(:<%= ns_file_name %>, Factory.build(:<%= ns_file_name %>) )
48
+ view.stub(:sort_column, :sort_direction)
48
49
  end
49
50
 
50
51
  it "renders a list of <%= ns_table_name %>" do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: leonardo
3
3
  version: !ruby/object:Gem::Version
4
- hash: 55
4
+ hash: 53
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 8
9
- - 0
10
- version: 1.8.0
9
+ - 1
10
+ version: 1.8.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Marco Mastrodonato
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-10-07 00:00:00 Z
18
+ date: 2011-10-10 00:00:00 Z
19
19
  dependencies: []
20
20
 
21
21
  description: A generator for creating Rails 3.1 applications ready to go. It generates the layout, the style, the internationalization and manage external gems for authentication, authorization and other. It also provides a customized scaffold to generates cool sites ajax ready in few minutes. If you find a bug please report to m.mastrodonato@gmail.com