istart-rails 0.0.7 → 0.0.8

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.md CHANGED
@@ -1,6 +1,13 @@
1
1
  ### Dev
2
2
 
3
- [full changelog](http://github.com/ZenCocoon/istart-rails/compare/v0.0.7...master)
3
+ [full changelog](http://github.com/ZenCocoon/istart-rails/compare/v0.0.8...master)
4
+
5
+ ### 0.0.8 / 2012-04-28
6
+
7
+ [full changelog](http://github.com/ZenCocoon/istart-rails/compare/v0.0.7...v0.0.8)
8
+
9
+ * Enhancements
10
+ * Add DataTables's FixHeader support
4
11
 
5
12
  ### 0.0.7 / 2012-04-22
6
13
 
data/README.md CHANGED
@@ -9,6 +9,7 @@ iStart-Rails is a set of common helpers to improve your app and speed up it's de
9
9
  * Consider element with `data-link-url` as links (also support opening in new window with the class name `external`)
10
10
  * Init [Chosen](http://harvesthq.github.com/chosen/) if in use
11
11
  * Init [DataTables](http://github.com/rweng/jquery-datatables-rails) if in use. Add the class `.datatable` to any table to activate
12
+ * Init [DataTables's FixedHeader](http://datatables.net/extras/fixedheader/) if in use. Add the class `.fixed_header` to any table to activate
12
13
 
13
14
  ## Requirements
14
15
 
@@ -28,6 +29,7 @@ Within `app/assets/javascripts/application.js` add the following
28
29
  //= require chosen-jquery (optional)
29
30
  //= require dataTables/jquery.dataTables (optional)
30
31
  //= require dataTables/jquery.dataTables.bootstrap (optional)
32
+ //= require dataTables/extras/FixedHeader (optional)
31
33
  //= require istart
32
34
 
33
35
  Within `app/assets/stylesheets/application.css` add the following
@@ -37,6 +39,13 @@ Within `app/assets/stylesheets/application.css` add the following
37
39
  *= require_self
38
40
  ...
39
41
 
42
+ For __FixedHeader__, you might like to add the following in your `bootstrap_and_overwrites.css.less`
43
+
44
+ .FixedHeader_Header {
45
+ background-color: #fff;
46
+ border-bottom: 1px solid @tableBorder;
47
+ }
48
+
40
49
  ## License
41
50
 
42
- MIT License. Copyright 2011 Sébastien Grosjean, sponsored by [BookingSync, Vacation Rental's Booking Calendar Software](http://www.bookingsync.com)
51
+ MIT License. Copyright 2012 Sébastien Grosjean, sponsored by [BookingSync, Vacation Rental's Booking Calendar Software](http://www.bookingsync.com)
@@ -24,20 +24,26 @@ jQuery ->
24
24
 
25
25
  # DataTables: http://datatables.net/
26
26
  try
27
- $('.datatable').dataTable
28
- "sDom": "<'row-fluid'<'span6'l><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>"
29
- "sPaginationType": "bootstrap"
30
- "bStateSave": true
31
- "fnStateSave": (oSettings, oData) ->
32
- localStorage.setItem 'DataTables_'+window.location.pathname, JSON.stringify(oData)
33
- "fnStateLoad": (oSettings) ->
34
- JSON.parse localStorage.getItem('DataTables_'+window.location.pathname)
35
- "aoColumnDefs": [
36
- { "bSortable": false, "aTargets": [ "sort-no" ] },
37
- { "sType": "string", "aTargets": [ "sort-as-string" ] },
38
- { "sType": "numeric", "aTargets": [ "sort-as-numeric" ] },
39
- { "sType": "date", "aTargets": [ "sort-as-date" ] },
40
- { "sType": "dom", "aTargets": [ "sort-as-dom" ] }
41
- ]
42
- "oLanguage":
43
- "sLengthMenu": "_MENU_ records per page"
27
+ for table in $('.datatable')
28
+ do (table) ->
29
+ table = $(table)
30
+ datatable = table.dataTable
31
+ "sDom": "<'row-fluid'<'span6'l><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>"
32
+ "sPaginationType": "bootstrap"
33
+ "bStateSave": true
34
+ "fnStateSave": (oSettings, oData) ->
35
+ localStorage.setItem 'DataTables_'+window.location.pathname, JSON.stringify(oData)
36
+ "fnStateLoad": (oSettings) ->
37
+ JSON.parse localStorage.getItem('DataTables_'+window.location.pathname)
38
+ "aoColumnDefs": [
39
+ { "bSortable": false, "aTargets": [ "sort-no" ] },
40
+ { "sType": "string", "aTargets": [ "sort-as-string" ] },
41
+ { "sType": "numeric", "aTargets": [ "sort-as-numeric" ] },
42
+ { "sType": "date", "aTargets": [ "sort-as-date" ] },
43
+ { "sType": "dom", "aTargets": [ "sort-as-dom" ] }
44
+ ]
45
+ "oLanguage":
46
+ "sLengthMenu": "_MENU_ records per page"
47
+ if table.hasClass('fixed_header')
48
+ new FixedHeader datatable,
49
+ "offsetTop": 40
@@ -1,5 +1,5 @@
1
1
  module Istart
2
2
  module Rails
3
- VERSION = "0.0.7"
3
+ VERSION = "0.0.8"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: istart-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-22 00:00:00.000000000Z
12
+ date: 2012-04-28 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jquery-rails
16
- requirement: &70215820493960 !ruby/object:Gem::Requirement
16
+ requirement: &70274667182440 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70215820493960
24
+ version_requirements: *70274667182440
25
25
  description: iStart-Rails is a set of common helpers to improve your app and speed
26
26
  up it's development
27
27
  email: