fuelux-rails 2.3.2 → 2.4.0.rc1

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.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +6 -3
  3. data/lib/fuelux-rails/version.rb +1 -1
  4. data/lib/generators/fuelux/install_generator.rb +2 -2
  5. data/lib/tasks/fuelux-rails_tasks.rake +99 -3
  6. data/vendor/assets/javascripts/fuelux.js +4 -4
  7. data/vendor/assets/javascripts/fuelux/checkbox.js +22 -3
  8. data/vendor/assets/javascripts/fuelux/combobox.js +5 -2
  9. data/vendor/assets/javascripts/fuelux/datagrid.js +61 -12
  10. data/vendor/assets/javascripts/fuelux/intelligent-dropdown.js +132 -0
  11. data/vendor/assets/javascripts/fuelux/pillbox.js +64 -12
  12. data/vendor/assets/javascripts/fuelux/radio.js +11 -1
  13. data/vendor/assets/javascripts/fuelux/search.js +4 -1
  14. data/vendor/assets/javascripts/fuelux/select.js +13 -16
  15. data/vendor/assets/javascripts/fuelux/spinner.js +20 -6
  16. data/vendor/assets/javascripts/fuelux/tree.js +98 -27
  17. data/vendor/assets/javascripts/fuelux/util.js +3 -1
  18. data/vendor/assets/javascripts/fuelux/wizard.js +69 -13
  19. data/vendor/toolkit/fuelux.less +6 -4
  20. data/vendor/toolkit/fuelux/checkbox.less +14 -2
  21. data/vendor/toolkit/fuelux/combobox.less +1 -1
  22. data/vendor/toolkit/fuelux/datagrid.less +5 -0
  23. data/vendor/toolkit/fuelux/intelligent-dropdown.less +5 -0
  24. data/vendor/toolkit/fuelux/pillbox.less +1 -1
  25. data/vendor/toolkit/fuelux/radio.less +4 -2
  26. data/vendor/toolkit/fuelux/search.less +1 -1
  27. data/vendor/toolkit/fuelux/select.less +7 -7
  28. data/vendor/toolkit/fuelux/spinner.less +1 -1
  29. data/vendor/toolkit/fuelux/tree.less +5 -3
  30. data/vendor/toolkit/fuelux/wizard.less +21 -34
  31. metadata +29 -13
@@ -8,6 +8,8 @@
8
8
 
9
9
  !function ($) {
10
10
 
11
+
12
+
11
13
  // custom case-insensitive match expression
12
14
  function fuelTextExactCI(elem, text) {
13
15
  return (elem.textContent || elem.innerText || $(elem).text() || '').toLowerCase() === (text || '').toLowerCase();
@@ -23,4 +25,4 @@
23
25
  return fuelTextExactCI(elem, match[3]);
24
26
  };
25
27
 
26
- }(window.jQuery);
28
+ }(window.jQuery);
@@ -8,6 +8,9 @@
8
8
 
9
9
  !function ($) {
10
10
 
11
+
12
+
13
+
11
14
  // WIZARD CONSTRUCTOR AND PROTOTYPE
12
15
 
13
16
  var Wizard = function (element, options) {
@@ -15,8 +18,8 @@
15
18
 
16
19
  this.$element = $(element);
17
20
  this.options = $.extend({}, $.fn.wizard.defaults, options);
18
- this.currentStep = 1;
19
- this.numSteps = this.$element.find('li').length;
21
+ this.currentStep = this.options.selectedItem.step;
22
+ this.numSteps = this.$element.find('.steps li').length;
20
23
  this.$prevBtn = this.$element.find('button.btn-prev');
21
24
  this.$nextBtn = this.$element.find('button.btn-next');
22
25
 
@@ -28,6 +31,10 @@
28
31
  this.$prevBtn.on('click', $.proxy(this.previous, this));
29
32
  this.$nextBtn.on('click', $.proxy(this.next, this));
30
33
  this.$element.on('click', 'li.complete', $.proxy(this.stepclicked, this));
34
+
35
+ if(this.currentStep > 1) {
36
+ this.selectedItem(this.options.selectedItem);
37
+ }
31
38
  };
32
39
 
33
40
  Wizard.prototype = {
@@ -55,34 +62,66 @@
55
62
  }
56
63
 
57
64
  // reset classes for all steps
58
- var $steps = this.$element.find('li');
65
+ var $steps = this.$element.find('.steps li');
59
66
  $steps.removeClass('active').removeClass('complete');
60
67
  $steps.find('span.badge').removeClass('badge-info').removeClass('badge-success');
61
68
 
62
69
  // set class for all previous steps
63
- var prevSelector = 'li:lt(' + (this.currentStep - 1) + ')';
70
+ var prevSelector = '.steps li:lt(' + (this.currentStep - 1) + ')';
64
71
  var $prevSteps = this.$element.find(prevSelector);
65
72
  $prevSteps.addClass('complete');
66
73
  $prevSteps.find('span.badge').addClass('badge-success');
67
74
 
68
75
  // set class for current step
69
- var currentSelector = 'li:eq(' + (this.currentStep - 1) + ')';
76
+ var currentSelector = '.steps li:eq(' + (this.currentStep - 1) + ')';
70
77
  var $currentStep = this.$element.find(currentSelector);
71
78
  $currentStep.addClass('active');
72
79
  $currentStep.find('span.badge').addClass('badge-info');
73
80
 
74
81
  // set display of target element
75
82
  var target = $currentStep.data().target;
76
- $('.step-pane').removeClass('active');
83
+ this.$element.find('.step-pane').removeClass('active');
77
84
  $(target).addClass('active');
78
85
 
86
+ // reset the wizard position to the left
87
+ $('.wizard .steps').attr('style','margin-left: 0');
88
+
89
+ // check if the steps are wider than the container div
90
+ var totalWidth = 0;
91
+ $('.wizard .steps > li').each(function () {
92
+ totalWidth += $(this).outerWidth();
93
+ });
94
+ var containerWidth = 0;
95
+ if ($('.wizard .actions').length) {
96
+ containerWidth = $('.wizard').width() - $('.wizard .actions').outerWidth();
97
+ } else {
98
+ containerWidth = $('.wizard').width();
99
+ }
100
+ if (totalWidth > containerWidth) {
101
+
102
+ // set the position so that the last step is on the right
103
+ var newMargin = totalWidth - containerWidth;
104
+ $('.wizard .steps').attr('style','margin-left: -' + newMargin + 'px');
105
+
106
+ // set the position so that the active step is in a good
107
+ // position if it has been moved out of view
108
+ if ($('.wizard li.active').position().left < 200) {
109
+ newMargin += $('.wizard li.active').position().left - 200;
110
+ if (newMargin < 1) {
111
+ $('.wizard .steps').attr('style','margin-left: 0');
112
+ } else {
113
+ $('.wizard .steps').attr('style','margin-left: -' + newMargin + 'px');
114
+ }
115
+ }
116
+ }
117
+
79
118
  this.$element.trigger('changed');
80
119
  },
81
120
 
82
121
  stepclicked: function (e) {
83
122
  var li = $(e.currentTarget);
84
123
 
85
- var index = $('.steps li').index(li);
124
+ var index = this.$element.find('.steps li').index(li);
86
125
 
87
126
  var evt = $.Event('stepclick');
88
127
  this.$element.trigger(evt, {step: index + 1});
@@ -122,10 +161,25 @@
122
161
  }
123
162
  },
124
163
 
125
- selectedItem: function (val) {
126
- return {
127
- step: this.currentStep
128
- };
164
+ selectedItem: function (selectedItem) {
165
+ var retVal, step;
166
+
167
+ if(selectedItem) {
168
+
169
+ step = selectedItem.step || -1;
170
+
171
+ if(step >= 1 && step <= this.numSteps) {
172
+ this.currentStep = step;
173
+ this.setState();
174
+ }
175
+
176
+ retVal = this;
177
+ }
178
+ else {
179
+ retVal = { step: this.currentStep };
180
+ }
181
+
182
+ return retVal;
129
183
  }
130
184
  };
131
185
 
@@ -147,7 +201,9 @@
147
201
  return (methodReturn === undefined) ? $set : methodReturn;
148
202
  };
149
203
 
150
- $.fn.wizard.defaults = {};
204
+ $.fn.wizard.defaults = {
205
+ selectedItem: {step:1}
206
+ };
151
207
 
152
208
  $.fn.wizard.Constructor = Wizard;
153
209
 
@@ -162,4 +218,4 @@
162
218
  });
163
219
  });
164
220
 
165
- }(window.jQuery);
221
+ }(window.jQuery);
@@ -1,13 +1,15 @@
1
- // Fuel UX controls
1
+ // Tree
2
+ // --------------------------------------------------
3
+ @treeBackgroundHover: #DFEEF5;
4
+ @treeBackgroundSelect: #B9DFF1;
2
5
  @import "fuelux/checkbox.less";
3
6
  @import "fuelux/combobox.less";
4
7
  @import "fuelux/datagrid.less";
8
+ @import "fuelux/intelligent-dropdown.less";
5
9
  @import "fuelux/pillbox.less";
6
10
  @import "fuelux/radio.less";
7
- @import "fuelux/spinner.less";
8
11
  @import "fuelux/search.less";
9
12
  @import "fuelux/select.less";
10
- @treeBackgroundHover: #DFEEF5;
11
- @treeBackgroundSelect: #B9DFF1;
13
+ @import "fuelux/spinner.less";
12
14
  @import "fuelux/tree.less";
13
15
  @import "fuelux/wizard.less";
@@ -1,10 +1,22 @@
1
+ .form-inline {
2
+ .checkbox-custom {
3
+ padding-left: 20px;
4
+ }
5
+
6
+ .checkbox-custom .checkbox {
7
+ padding-left: 16px;
8
+ }
9
+ }
10
+
1
11
  .checkbox-custom {
2
12
  input[type=checkbox] {
3
- display: none;
13
+ /* IE cannot fire events if display none or visibility hidden */
14
+ position: relative;
15
+ top: -99999px;
4
16
  }
5
17
 
6
18
  i {
7
- background-image: image-url('form.png');
19
+ background-image: url(../img/form.png);
8
20
  background-position: 0 1px;
9
21
  background-repeat: no-repeat;
10
22
  margin-left: -20px;
@@ -8,4 +8,4 @@
8
8
  button.btn {
9
9
  border-radius: 0 @inputBorderRadius @inputBorderRadius 0;
10
10
  }
11
- }
11
+ }
@@ -34,12 +34,17 @@
34
34
  }
35
35
  }
36
36
 
37
+ // When changing this section verify stretchHeight column sizes when sorting
38
+ // and update SORTED_HEADER_OFFSET in datagrid.js as needed
37
39
  .sorted {
38
40
  .gradientBar(@tableBackgroundAccent, @tableBackgroundAccentDark, @textColor, 'none');
39
41
 
42
+ padding-right: 30px;
43
+
40
44
  i {
41
45
  float: right;
42
46
  margin-top: 2px;
47
+ margin-right: -22px;
43
48
  }
44
49
  }
45
50
 
@@ -0,0 +1,5 @@
1
+ .dropUp {
2
+ -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
3
+ -moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
4
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
5
+ }
@@ -71,4 +71,4 @@
71
71
 
72
72
  }
73
73
 
74
- }
74
+ }
@@ -1,10 +1,12 @@
1
1
  .radio-custom {
2
2
  input[type=radio] {
3
- display: none;
3
+ /* IE cannot fire events if display none or visibility hidden */
4
+ position: relative;
5
+ top: -99999px;
4
6
  }
5
7
 
6
8
  i {
7
- background-image: image-url('form.png');
9
+ background-image: url(../img/form.png);
8
10
  background-position: 0 -15px;
9
11
  background-repeat: no-repeat;
10
12
  margin-left: -20px;
@@ -1,3 +1,3 @@
1
1
  .search {
2
2
  display: inline-block;
3
- }
3
+ }
@@ -7,11 +7,11 @@
7
7
  font-weight: normal;
8
8
  color: #333;
9
9
  }
10
- }
11
10
 
12
- #selectTextSize {
13
- display: inline-block;
14
- position: absolute;
15
- visibility: hidden;
16
- top: 0;
17
- }
11
+ &-sizer {
12
+ display: inline-block;
13
+ position: absolute;
14
+ visibility: hidden;
15
+ top: 0;
16
+ }
17
+ }
@@ -48,4 +48,4 @@
48
48
  top: -5px;
49
49
  }
50
50
  }
51
- }
51
+ }
@@ -34,8 +34,10 @@
34
34
  }
35
35
 
36
36
  .tree-folder-name {
37
- position: absolute;
38
- left: 29px;
37
+ padding-left: 29px;
38
+ white-space: nowrap;
39
+ overflow: hidden;
40
+ text-overflow: ellipsis;
39
41
  }
40
42
 
41
43
  }
@@ -94,4 +96,4 @@
94
96
  background-color: @treeBackgroundSelect;
95
97
  }
96
98
  }
97
- }
99
+ }
@@ -6,12 +6,15 @@
6
6
  .border-radius(@baseBorderRadius);
7
7
  .box-shadow(0 1px 4px rgba(0,0,0,.065));
8
8
  background-color: @tableBackgroundAccent;
9
+ position: relative;
10
+ overflow: hidden;
9
11
 
10
12
  ul {
11
13
  list-style: none outside none;
12
14
  padding: 0;
13
15
  margin: 0;
14
-
16
+ width: 4000px;
17
+
15
18
  li {
16
19
  float: left;
17
20
  margin: 0;
@@ -32,6 +35,7 @@
32
35
  position: absolute;
33
36
  right: -14px;
34
37
  top: 0;
38
+ z-index: 1;
35
39
  }
36
40
 
37
41
  .chevron:before {
@@ -75,46 +79,23 @@
75
79
  }
76
80
  }
77
81
 
78
- /* set z-index on steps for chevron overlap */
79
- li:nth-child(1) {
82
+ li:first-child {
80
83
  border-radius: 4px 0 0 4px;
81
84
  padding-left: 20px;
82
- z-index: 10;
83
- }
84
- li:nth-child(2) {
85
- z-index: 9;
86
- }
87
- li:nth-child(3) {
88
- z-index: 8;
89
- }
90
- li:nth-child(4) {
91
- z-index: 7;
92
- }
93
- li:nth-child(5) {
94
- z-index: 6;
95
- }
96
- li:nth-child(6) {
97
- z-index: 5;
98
- }
99
- li:nth-child(7) {
100
- z-index: 4;
101
- }
102
- li:nth-child(8) {
103
- z-index: 3;
104
- }
105
- li:nth-child(9) {
106
- z-index: 2;
107
- }
108
- li:nth-child(10) {
109
- z-index: 1;
110
85
  }
111
86
  }
112
87
 
113
88
  .actions {
114
- line-height: 44px;
89
+ z-index: 1000;
90
+ position: absolute;
91
+ right: 0;
92
+ line-height: 46px;
115
93
  float: right;
116
- padding-right: 15px;
94
+ padding-left: 15px;
95
+ padding-right: 15px;
117
96
  vertical-align: middle;
97
+ background-color: #e5e5e5;
98
+ border-left: 1px solid @navbarBorder;
118
99
 
119
100
  a {
120
101
  line-height: 45px;
@@ -143,5 +124,11 @@
143
124
 
144
125
  .active {
145
126
  display: block;
127
+
128
+ .btn-group {
129
+ .active {
130
+ display: inline-block;
131
+ }
132
+ }
146
133
  }
147
- }
134
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fuelux-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.2
4
+ version: 2.4.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Baldwin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-23 00:00:00.000000000 Z
11
+ date: 2013-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -66,34 +66,48 @@ dependencies:
66
66
  - - '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rails
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '3.1'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '3.1'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: twitter-bootstrap-rails
71
85
  requirement: !ruby/object:Gem::Requirement
72
86
  requirements:
73
- - - ~>
87
+ - - '>='
74
88
  - !ruby/object:Gem::Version
75
- version: 2.2.0
76
- type: :development
89
+ version: '0'
90
+ type: :runtime
77
91
  prerelease: false
78
92
  version_requirements: !ruby/object:Gem::Requirement
79
93
  requirements:
80
- - - ~>
94
+ - - '>='
81
95
  - !ruby/object:Gem::Version
82
- version: 2.2.0
96
+ version: '0'
83
97
  - !ruby/object:Gem::Dependency
84
- name: rails
98
+ name: rake
85
99
  requirement: !ruby/object:Gem::Requirement
86
100
  requirements:
87
101
  - - '>='
88
102
  - !ruby/object:Gem::Version
89
- version: '3.1'
103
+ version: '0'
90
104
  type: :development
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
108
  - - '>='
95
109
  - !ruby/object:Gem::Version
96
- version: '3.1'
110
+ version: '0'
97
111
  description: fuelux-rails project integrates Fuel UX Bootstrap extensions for Rails
98
112
  3.1 Asset Pipeline
99
113
  email:
@@ -112,6 +126,7 @@ files:
112
126
  - vendor/assets/javascripts/fuelux/checkbox.js
113
127
  - vendor/assets/javascripts/fuelux/combobox.js
114
128
  - vendor/assets/javascripts/fuelux/datagrid.js
129
+ - vendor/assets/javascripts/fuelux/intelligent-dropdown.js
115
130
  - vendor/assets/javascripts/fuelux/loader.js
116
131
  - vendor/assets/javascripts/fuelux/pillbox.js
117
132
  - vendor/assets/javascripts/fuelux/radio.js
@@ -125,6 +140,7 @@ files:
125
140
  - vendor/toolkit/fuelux/checkbox.less
126
141
  - vendor/toolkit/fuelux/combobox.less
127
142
  - vendor/toolkit/fuelux/datagrid.less
143
+ - vendor/toolkit/fuelux/intelligent-dropdown.less
128
144
  - vendor/toolkit/fuelux/pillbox.less
129
145
  - vendor/toolkit/fuelux/radio.less
130
146
  - vendor/toolkit/fuelux/search.less
@@ -185,12 +201,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
185
201
  version: '0'
186
202
  required_rubygems_version: !ruby/object:Gem::Requirement
187
203
  requirements:
188
- - - '>='
204
+ - - '>'
189
205
  - !ruby/object:Gem::Version
190
- version: '0'
206
+ version: 1.3.1
191
207
  requirements: []
192
208
  rubyforge_project: fuelux-rails
193
- rubygems_version: 2.0.0
209
+ rubygems_version: 2.1.4
194
210
  signing_key:
195
211
  specification_version: 4
196
212
  summary: Fuel UX for Rails 3.1 Asset Pipeline