fuelux-rails 2.2.0 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 7f167ba80465946324d406e15219ee60b75a4208
4
+ data.tar.gz: 3a73a10fb74b5be1ab14dc641536cf7f6022d5ed
5
+ SHA512:
6
+ metadata.gz: f3eae9530d9c849e7734bbebd6c8fcfcfba5c3c0d44a462cdb4515b88c2d4ed74e2164037acd704821d2b839f3e01eece94af135c83fb0dec9af128f1cb7182f
7
+ data.tar.gz: 6237cc4523f517e7ba0cde5b4548c4f2ea47a6e2eecf97d05d72fa164ff9828ad5808942a40f91035813bad484f3eda749fd079d027bdb930e6c8168b5248d3b
@@ -1,3 +1,3 @@
1
1
  module FueluxRails
2
- VERSION = "2.2.0"
2
+ VERSION = "2.3.0"
3
3
  end
@@ -18,6 +18,7 @@
18
18
  this.$footerchildren = this.$footer.children().show().css('visibility', 'hidden');
19
19
  this.$topheader = this.$element.find('thead th');
20
20
  this.$searchcontrol = this.$element.find('.search');
21
+ this.$filtercontrol = this.$element.find('.filter');
21
22
  this.$pagesize = this.$element.find('.grid-pagesize');
22
23
  this.$pageinput = this.$element.find('.grid-pager input');
23
24
  this.$pagedropdown = this.$element.find('.grid-pager .dropdown-menu');
@@ -32,14 +33,27 @@
32
33
  this.$colheader = $('<tr>').appendTo(this.$thead);
33
34
 
34
35
  this.options = $.extend(true, {}, $.fn.datagrid.defaults, options);
35
- this.options.dataOptions.pageSize = parseInt(this.$pagesize.val(), 10);
36
+
37
+ if(this.$pagesize.hasClass('select')) {
38
+ this.options.dataOptions.pageSize = parseInt(this.$pagesize.select('selectedItem').value, 10);
39
+ } else {
40
+ this.options.dataOptions.pageSize = parseInt(this.$pagesize.val(), 10);
41
+ }
42
+
36
43
  this.columns = this.options.dataSource.columns();
37
44
 
38
45
  this.$nextpagebtn.on('click', $.proxy(this.next, this));
39
46
  this.$prevpagebtn.on('click', $.proxy(this.previous, this));
40
47
  this.$searchcontrol.on('searched cleared', $.proxy(this.searchChanged, this));
48
+ this.$filtercontrol.on('changed', $.proxy(this.filterChanged, this));
41
49
  this.$colheader.on('click', 'th', $.proxy(this.headerClicked, this));
42
- this.$pagesize.on('change', $.proxy(this.pagesizeChanged, this));
50
+
51
+ if(this.$pagesize.hasClass('select')) {
52
+ this.$pagesize.on('changed', $.proxy(this.pagesizeChanged, this));
53
+ } else {
54
+ this.$pagesize.on('change', $.proxy(this.pagesizeChanged, this));
55
+ }
56
+
43
57
  this.$pageinput.on('change', $.proxy(this.pageChanged, this));
44
58
 
45
59
  this.renderColumns();
@@ -167,8 +181,13 @@
167
181
  this.renderData();
168
182
  },
169
183
 
170
- pagesizeChanged: function (e) {
171
- this.options.dataOptions.pageSize = parseInt($(e.target).val(), 10);
184
+ pagesizeChanged: function (e, pageSize) {
185
+ if(pageSize) {
186
+ this.options.dataOptions.pageSize = parseInt(pageSize.value, 10);
187
+ } else {
188
+ this.options.dataOptions.pageSize = parseInt($(e.target).val(), 10);
189
+ }
190
+
172
191
  this.options.dataOptions.pageIndex = 0;
173
192
  this.renderData();
174
193
  },
@@ -184,6 +203,11 @@
184
203
  this.renderData();
185
204
  },
186
205
 
206
+ filterChanged: function (e, filter) {
207
+ this.options.dataOptions.filter = filter;
208
+ this.renderData();
209
+ },
210
+
187
211
  previous: function () {
188
212
  this.options.dataOptions.pageIndex--;
189
213
  this.renderData();
@@ -11,13 +11,18 @@
11
11
  // WIZARD CONSTRUCTOR AND PROTOTYPE
12
12
 
13
13
  var Wizard = function (element, options) {
14
+ var kids;
15
+
14
16
  this.$element = $(element);
15
17
  this.options = $.extend({}, $.fn.wizard.defaults, options);
16
18
  this.currentStep = 1;
17
19
  this.numSteps = this.$element.find('li').length;
18
20
  this.$prevBtn = this.$element.find('button.btn-prev');
19
21
  this.$nextBtn = this.$element.find('button.btn-next');
20
- this.nextText = this.$nextBtn.text();
22
+
23
+ kids = this.$nextBtn.children().detach();
24
+ this.nextText = $.trim(this.$nextBtn.text());
25
+ this.$nextBtn.append(kids);
21
26
 
22
27
  // handle events
23
28
  this.$prevBtn.on('click', $.proxy(this.previous, this));
@@ -44,11 +49,8 @@
44
49
  if (typeof this.lastText !== 'undefined') {
45
50
  // replace text
46
51
  var text = (lastStep !== true) ? this.nextText : this.lastText;
47
- this.$nextBtn
48
- .contents()
49
- .filter(function () {
50
- return this.nodeType === 3;
51
- }).replaceWith(text);
52
+ var kids = this.$nextBtn.children().detach();
53
+ this.$nextBtn.text(text).append(kids);
52
54
  }
53
55
  }
54
56
 
@@ -81,6 +83,11 @@
81
83
  var li = $(e.currentTarget);
82
84
 
83
85
  var index = $('.steps li').index(li);
86
+
87
+ var evt = $.Event('stepclick');
88
+ this.$element.trigger(evt, {step: index + 1});
89
+ if (evt.isDefaultPrevented()) return;
90
+
84
91
  this.currentStep = (index + 1);
85
92
  this.setState();
86
93
  },
@@ -5,6 +5,7 @@
5
5
  @import "fuelux/pillbox.less";
6
6
  @import "fuelux/radio.less";
7
7
  @import "fuelux/spinner.less";
8
+ @import "fuelux/search.less";
8
9
  @import "fuelux/select.less";
9
10
  @treeBackgroundHover: #DFEEF5;
10
11
  @treeBackgroundSelect: #B9DFF1;
@@ -49,4 +49,4 @@
49
49
  }
50
50
  }
51
51
  }
52
- }
52
+ }
@@ -1,5 +1,11 @@
1
1
  .combobox {
2
+ display: inline-block;
3
+
2
4
  a {
3
5
  font-size: @baseFontSize;
4
6
  }
7
+
8
+ button.btn {
9
+ border-radius: 0 @inputBorderRadius @inputBorderRadius 0;
10
+ }
5
11
  }
@@ -22,6 +22,18 @@
22
22
  float: right;
23
23
  }
24
24
 
25
+ .datagrid-header-right, .datagrid-header-left {
26
+ .search, .filter {
27
+ margin-left: 8px;
28
+ margin-bottom: 0;
29
+
30
+ .dropdown-menu {
31
+ top: auto;
32
+ left: auto;
33
+ }
34
+ }
35
+ }
36
+
25
37
  .sorted {
26
38
  .gradientBar(@tableBackgroundAccent, @tableBackgroundAccentDark, @textColor, 'none');
27
39
 
@@ -57,6 +69,17 @@
57
69
  width: 60px;
58
70
  }
59
71
 
72
+ .grid-pagesize {
73
+ display: inline-block;
74
+ margin-bottom: 5px;
75
+ vertical-align: middle;
76
+
77
+ .dropdown-menu {
78
+ top: auto;
79
+ left: auto;
80
+ }
81
+ }
82
+
60
83
  span {
61
84
  font-weight: normal;
62
85
  }
@@ -83,6 +106,8 @@
83
106
  display: inline-block;
84
107
  position: relative;
85
108
  top: -2px;
109
+ vertical-align: baseline;
110
+ margin-bottom: 4px;
86
111
  }
87
112
 
88
113
  > button {
@@ -49,4 +49,4 @@
49
49
  }
50
50
  }
51
51
  }
52
- }
52
+ }
@@ -0,0 +1,3 @@
1
+ .search {
2
+ display: inline-block;
3
+ }
metadata CHANGED
@@ -1,68 +1,60 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fuelux-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
5
- prerelease:
4
+ version: 2.3.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Stephen Baldwin
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-01-04 00:00:00.000000000 Z
11
+ date: 2013-03-13 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: railties
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '3.1'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '3.1'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: actionpack
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '3.1'
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: '3.1'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: execjs
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: twitter-bootstrap-rails
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - ~>
68
60
  - !ruby/object:Gem::Version
@@ -70,7 +62,6 @@ dependencies:
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - ~>
76
67
  - !ruby/object:Gem::Version
@@ -78,17 +69,15 @@ dependencies:
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: rails
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - '>='
84
74
  - !ruby/object:Gem::Version
85
75
  version: '3.1'
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - '>='
92
81
  - !ruby/object:Gem::Version
93
82
  version: '3.1'
94
83
  description: fuelux-rails project integrates Fuel UX Bootstrap extensions for Rails
@@ -124,6 +113,7 @@ files:
124
113
  - vendor/toolkit/fuelux/datagrid.less
125
114
  - vendor/toolkit/fuelux/pillbox.less
126
115
  - vendor/toolkit/fuelux/radio.less
116
+ - vendor/toolkit/fuelux/search.less
127
117
  - vendor/toolkit/fuelux/select.less
128
118
  - vendor/toolkit/fuelux/spinner.less
129
119
  - vendor/toolkit/fuelux/tree.less
@@ -165,7 +155,8 @@ files:
165
155
  - test/test_helper.rb
166
156
  homepage: http://www.github.com/stephenbaldwin/fuelux-rails
167
157
  licenses: []
168
- post_install_message: ! "Important: You may need to add a javascript runtime to your
158
+ metadata: {}
159
+ post_install_message: "Important: You may need to add a javascript runtime to your
169
160
  Gemfile in order for bootstrap's LESS files to compile to CSS. \n\n**********************************************\n\nExecJS
170
161
  supports these runtimes:\n\ntherubyracer - Google V8 embedded within Ruby\n\ntherubyrhino
171
162
  - Mozilla Rhino embedded within JRuby\n\nNode.js\n\nApple JavaScriptCore - Included
@@ -174,22 +165,20 @@ rdoc_options: []
174
165
  require_paths:
175
166
  - lib
176
167
  required_ruby_version: !ruby/object:Gem::Requirement
177
- none: false
178
168
  requirements:
179
- - - ! '>='
169
+ - - '>='
180
170
  - !ruby/object:Gem::Version
181
171
  version: '0'
182
172
  required_rubygems_version: !ruby/object:Gem::Requirement
183
- none: false
184
173
  requirements:
185
- - - ! '>='
174
+ - - '>='
186
175
  - !ruby/object:Gem::Version
187
176
  version: '0'
188
177
  requirements: []
189
178
  rubyforge_project: fuelux-rails
190
- rubygems_version: 1.8.24
179
+ rubygems_version: 2.0.0
191
180
  signing_key:
192
- specification_version: 3
181
+ specification_version: 4
193
182
  summary: Fuel UX for Rails 3.1 Asset Pipeline
194
183
  test_files:
195
184
  - test/dummy/app/assets/javascripts/application.js