fuelux-rails 2.4.1 → 2.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 29b394ec2968caffe8b18d7223cabed066be8e6d
4
- data.tar.gz: 0ced4a787887051466ea986e11789f6d659fa1ab
3
+ metadata.gz: 55cb9d61718671c8347063ea1b77cfe807b52b9e
4
+ data.tar.gz: f4e56823b6aa283c6c13f3117f6a58b1669e76f4
5
5
  SHA512:
6
- metadata.gz: 4f2f96746d016ed70d0bc551245351cdc09a6bed2322ae3ca78a421c490bde4279b58514f31b1c86faee5eb1cdf6f4e5df691c103611a6159842766aabff78b2
7
- data.tar.gz: 53cd6334e97d12e9131733645a1557be9d11038beae946f9fe3aecb38e95f9dd28d92752876db6cf474b414192a60ddd4b7fb629bb7cbe9b69d416bca8702e99
6
+ metadata.gz: 0c6c599ad21f11c6a517f076aa9dcddfca793c84693a38908697eecc984099f3423c34178f13fa9db1b21bf65e03f1eb42fedff51afb6dd06cde4dfb2624a3e8
7
+ data.tar.gz: f795d828313bdef5c100b68659033dde2c2efdf048b54c8f989561fae3be9c483b62a496c64a754138f7351b8d664be89af38594c1fbdca83f6ff54a730007f7
@@ -1,3 +1,3 @@
1
1
  module FueluxRails
2
- VERSION = "2.4.1"
2
+ VERSION = "2.4.2"
3
3
  end
@@ -9,7 +9,7 @@
9
9
  !function ($) {
10
10
 
11
11
 
12
-
12
+ var old = $.fn.checkbox;
13
13
 
14
14
  // CHECKBOX CONSTRUCTOR AND PROTOTYPE
15
15
 
@@ -89,25 +89,31 @@
89
89
 
90
90
  // CHECKBOX PLUGIN DEFINITION
91
91
 
92
- $.fn.checkbox = function (option, value) {
92
+ $.fn.checkbox = function (option) {
93
+ var args = Array.prototype.slice.call( arguments, 1 );
93
94
  var methodReturn;
94
95
 
95
96
  var $set = this.each(function () {
96
- var $this = $(this);
97
- var data = $this.data('checkbox');
97
+ var $this = $( this );
98
+ var data = $this.data('checkbox');
98
99
  var options = typeof option === 'object' && option;
99
100
 
100
- if (!data) $this.data('checkbox', (data = new Checkbox(this, options)));
101
- if (typeof option === 'string') methodReturn = data[option](value);
101
+ if( !data ) $this.data('checkbox', (data = new Checkbox(this, options)));
102
+ if( typeof option === 'string' ) methodReturn = data[ option ].apply( data, args );
102
103
  });
103
104
 
104
- return (methodReturn === undefined) ? $set : methodReturn;
105
+ return ( methodReturn === undefined ) ? $set : methodReturn;
105
106
  };
106
107
 
107
108
  $.fn.checkbox.defaults = {};
108
109
 
109
110
  $.fn.checkbox.Constructor = Checkbox;
110
111
 
112
+ $.fn.checkbox.noConflict = function () {
113
+ $.fn.checkbox = old;
114
+ return this;
115
+ };
116
+
111
117
 
112
118
  // CHECKBOX DATA-API
113
119
 
@@ -121,5 +127,4 @@
121
127
  });
122
128
  });
123
129
  });
124
-
125
130
  }(window.jQuery);
@@ -9,6 +9,7 @@
9
9
  !function ($) {
10
10
 
11
11
 
12
+ var old = $.fn.combobox;
12
13
 
13
14
 
14
15
  // COMBOBOX CONSTRUCTOR AND PROTOTYPE
@@ -136,30 +137,35 @@
136
137
 
137
138
  // COMBOBOX PLUGIN DEFINITION
138
139
 
139
- $.fn.combobox = function (option, value) {
140
+ $.fn.combobox = function (option) {
141
+ var args = Array.prototype.slice.call( arguments, 1 );
140
142
  var methodReturn;
141
143
 
142
144
  var $set = this.each(function () {
143
- var $this = $(this);
144
- var data = $this.data('combobox');
145
+ var $this = $( this );
146
+ var data = $this.data( 'combobox' );
145
147
  var options = typeof option === 'object' && option;
146
148
 
147
- if (!data) $this.data('combobox', (data = new Combobox(this, options)));
148
- if (typeof option === 'string') methodReturn = data[option](value);
149
+ if( !data ) $this.data('combobox', (data = new Combobox( this, options ) ) );
150
+ if( typeof option === 'string' ) methodReturn = data[ option ].apply( data, args );
149
151
  });
150
152
 
151
- return (methodReturn === undefined) ? $set : methodReturn;
153
+ return ( methodReturn === undefined ) ? $set : methodReturn;
152
154
  };
153
155
 
154
156
  $.fn.combobox.defaults = {};
155
157
 
156
158
  $.fn.combobox.Constructor = Combobox;
157
159
 
160
+ $.fn.combobox.noConflict = function () {
161
+ $.fn.combobox = old;
162
+ return this;
163
+ };
164
+
158
165
 
159
166
  // COMBOBOX DATA-API
160
167
 
161
168
  $(function () {
162
-
163
169
  $(window).on('load', function () {
164
170
  $('.combobox').each(function () {
165
171
  var $this = $(this);
@@ -174,5 +180,4 @@
174
180
  $this.combobox($this.data());
175
181
  });
176
182
  });
177
-
178
183
  }(window.jQuery);
@@ -9,6 +9,7 @@
9
9
  !function ($) {
10
10
 
11
11
 
12
+ var old = $.fn.datagrid;
12
13
 
13
14
  // Relates to thead .sorted styles in datagrid.less
14
15
  var SORTED_HEADER_OFFSET = 22;
@@ -85,7 +86,7 @@
85
86
  constructor: Datagrid,
86
87
 
87
88
  renderColumns: function () {
88
- var self = this;
89
+ var $target;
89
90
 
90
91
  this.$footer.attr('colspan', this.columns.length);
91
92
  this.$topheader.attr('colspan', this.columns.length);
@@ -98,7 +99,12 @@
98
99
  colHTML += '>' + column.label + '</th>';
99
100
  });
100
101
 
101
- self.$colheader.append(colHTML);
102
+ this.$colheader.append(colHTML);
103
+
104
+ if (this.options.dataOptions.sortProperty) {
105
+ $target = this.$colheader.children('th[data-property="' + this.options.dataOptions.sortProperty + '"]');
106
+ this.updateColumns($target, this.options.dataOptions.sortDirection);
107
+ }
102
108
  },
103
109
 
104
110
  updateColumns: function ($target, direction) {
@@ -147,6 +153,18 @@
147
153
  this.$tbody.html(this.placeholderRowHTML(this.options.loadingHTML));
148
154
 
149
155
  this.options.dataSource.data(this.options.dataOptions, function (data) {
156
+ if (typeof data === 'string') {
157
+ // Error-handling
158
+
159
+ self.$footerchildren.css('visibility', 'hidden');
160
+
161
+ self.$tbody.html(self.errorRowHTML(data));
162
+ self.stretchHeight();
163
+
164
+ self.$element.trigger('loaded');
165
+ return;
166
+ }
167
+
150
168
  var itemdesc = (data.count === 1) ? self.options.itemText : self.options.itemsText;
151
169
  var rowHTML = '';
152
170
 
@@ -185,6 +203,11 @@
185
203
 
186
204
  },
187
205
 
206
+ errorRowHTML: function (content) {
207
+ return '<tr><td style="text-align:center;padding:20px 20px 0 20px;border-bottom:none;" colspan="' +
208
+ this.columns.length + '"><div class="alert alert-error">' + content + '</div></td></tr>';
209
+ },
210
+
188
211
  placeholderRowHTML: function (content) {
189
212
  return '<tr><td style="text-align:center;padding:20px;border-bottom:none;" colspan="' +
190
213
  this.columns.length + '">' + content + '</td></tr>';
@@ -327,14 +350,19 @@
327
350
  // DATAGRID PLUGIN DEFINITION
328
351
 
329
352
  $.fn.datagrid = function (option) {
330
- return this.each(function () {
331
- var $this = $(this);
332
- var data = $this.data('datagrid');
353
+ var args = Array.prototype.slice.call( arguments, 1 );
354
+ var methodReturn;
355
+
356
+ var $set = this.each(function () {
357
+ var $this = $( this );
358
+ var data = $this.data( 'datagrid' );
333
359
  var options = typeof option === 'object' && option;
334
360
 
335
- if (!data) $this.data('datagrid', (data = new Datagrid(this, options)));
336
- if (typeof option === 'string') data[option]();
361
+ if( !data ) $this.data('datagrid', (data = new Datagrid( this, options ) ) );
362
+ if( typeof option === 'string' ) methodReturn = data[ option ].apply( data, args );
337
363
  });
364
+
365
+ return ( methodReturn === undefined ) ? $set : methodReturn;
338
366
  };
339
367
 
340
368
  $.fn.datagrid.defaults = {
@@ -347,4 +375,8 @@
347
375
 
348
376
  $.fn.datagrid.Constructor = Datagrid;
349
377
 
378
+ $.fn.datagrid.noConflict = function () {
379
+ $.fn.datagrid = old;
380
+ return this;
381
+ };
350
382
  }(window.jQuery);
@@ -9,6 +9,7 @@
9
9
  !function ($) {
10
10
 
11
11
 
12
+ var old = $.fn.pillbox;
12
13
 
13
14
  // PILLBOX CONSTRUCTOR AND PROTOTYPE
14
15
 
@@ -88,25 +89,32 @@
88
89
 
89
90
  // PILLBOX PLUGIN DEFINITION
90
91
 
91
- $.fn.pillbox = function (option, value1, value2) {
92
+ $.fn.pillbox = function (option) {
93
+ var args = Array.prototype.slice.call( arguments, 1 );
92
94
  var methodReturn;
93
95
 
94
96
  var $set = this.each(function () {
95
- var $this = $(this);
96
- var data = $this.data('pillbox');
97
+ var $this = $( this );
98
+ var data = $this.data( 'pillbox' );
97
99
  var options = typeof option === 'object' && option;
98
100
 
99
- if (!data) $this.data('pillbox', ( data = new Pillbox(this, options)));
100
- if ( typeof option === 'string') methodReturn = data[option](value1, value2);
101
+ if( !data ) $this.data('pillbox', (data = new Pillbox( this, options ) ) );
102
+ if( typeof option === 'string' ) methodReturn = data[ option ].apply( data, args );
101
103
  });
102
104
 
103
- return (methodReturn === undefined) ? $set : methodReturn;
105
+ return ( methodReturn === undefined ) ? $set : methodReturn;
104
106
  };
105
107
 
106
108
  $.fn.pillbox.defaults = {};
107
109
 
108
110
  $.fn.pillbox.Constructor = Pillbox;
109
111
 
112
+ $.fn.pillbox.noConflict = function () {
113
+ $.fn.pillbox = old;
114
+ return this;
115
+ };
116
+
117
+
110
118
  // PILLBOX DATA-API
111
119
 
112
120
  $(function () {
@@ -117,4 +125,3 @@
117
125
  });
118
126
  });
119
127
  }(window.jQuery);
120
-
@@ -9,7 +9,7 @@
9
9
  !function ($) {
10
10
 
11
11
 
12
-
12
+ var old = $.fn.radio;
13
13
 
14
14
  // RADIO CONSTRUCTOR AND PROTOTYPE
15
15
 
@@ -41,10 +41,12 @@
41
41
  var disabled = !!$radio.prop('disabled');
42
42
 
43
43
  this.$icon.removeClass('checked disabled');
44
+ this.$label.removeClass('checked');
44
45
 
45
46
  // set state of radio
46
47
  if (checked === true) {
47
48
  this.$icon.addClass('checked');
49
+ this.$label.addClass('checked');
48
50
  }
49
51
  if (disabled === true) {
50
52
  this.$icon.addClass('disabled');
@@ -52,8 +54,11 @@
52
54
  },
53
55
 
54
56
  resetGroup: function () {
57
+ var group = $('input[name="' + this.groupName + '"]');
58
+
55
59
  // reset all radio buttons in group
56
- $('input[name=' + this.groupName + ']').next().removeClass('checked');
60
+ group.next().removeClass('checked');
61
+ group.parent().removeClass('checked');
57
62
  },
58
63
 
59
64
  enable: function () {
@@ -92,25 +97,31 @@
92
97
 
93
98
  // RADIO PLUGIN DEFINITION
94
99
 
95
- $.fn.radio = function (option, value) {
100
+ $.fn.radio = function (option) {
101
+ var args = Array.prototype.slice.call( arguments, 1 );
96
102
  var methodReturn;
97
103
 
98
104
  var $set = this.each(function () {
99
- var $this = $(this);
100
- var data = $this.data('radio');
105
+ var $this = $( this );
106
+ var data = $this.data( 'radio' );
101
107
  var options = typeof option === 'object' && option;
102
108
 
103
- if (!data) $this.data('radio', (data = new Radio(this, options)));
104
- if (typeof option === 'string') methodReturn = data[option](value);
109
+ if( !data ) $this.data('radio', (data = new Radio( this, options ) ) );
110
+ if( typeof option === 'string' ) methodReturn = data[ option ].apply( data, args );
105
111
  });
106
112
 
107
- return (methodReturn === undefined) ? $set : methodReturn;
113
+ return ( methodReturn === undefined ) ? $set : methodReturn;
108
114
  };
109
115
 
110
116
  $.fn.radio.defaults = {};
111
117
 
112
118
  $.fn.radio.Constructor = Radio;
113
119
 
120
+ $.fn.radio.noConflict = function () {
121
+ $.fn.radio = old;
122
+ return this;
123
+ };
124
+
114
125
 
115
126
  // RADIO DATA-API
116
127
 
@@ -124,5 +135,4 @@
124
135
  });
125
136
  });
126
137
  });
127
-
128
138
  }(window.jQuery);
@@ -9,7 +9,7 @@
9
9
  !function ($) {
10
10
 
11
11
 
12
-
12
+ var old = $.fn.search;
13
13
 
14
14
  // SEARCH CONSTRUCTOR AND PROTOTYPE
15
15
 
@@ -97,20 +97,30 @@
97
97
  // SEARCH PLUGIN DEFINITION
98
98
 
99
99
  $.fn.search = function (option) {
100
- return this.each(function () {
101
- var $this = $(this);
102
- var data = $this.data('search');
100
+ var args = Array.prototype.slice.call( arguments, 1 );
101
+ var methodReturn;
102
+
103
+ var $set = this.each(function () {
104
+ var $this = $( this );
105
+ var data = $this.data( 'search' );
103
106
  var options = typeof option === 'object' && option;
104
107
 
105
108
  if (!data) $this.data('search', (data = new Search(this, options)));
106
- if (typeof option === 'string') data[option]();
109
+ if (typeof option === 'string') methodReturn = data[ option ].apply( data, args );
107
110
  });
111
+
112
+ return ( methodReturn === undefined ) ? $set : methodReturn;
108
113
  };
109
114
 
110
115
  $.fn.search.defaults = {};
111
116
 
112
117
  $.fn.search.Constructor = Search;
113
118
 
119
+ $.fn.search.noConflict = function () {
120
+ $.fn.search = old;
121
+ return this;
122
+ };
123
+
114
124
 
115
125
  // SEARCH DATA-API
116
126
 
@@ -121,5 +131,4 @@
121
131
  $this.search($this.data());
122
132
  });
123
133
  });
124
-
125
134
  }(window.jQuery);
@@ -9,6 +9,7 @@
9
9
  !function ($) {
10
10
 
11
11
 
12
+ var old = $.fn.select;
12
13
 
13
14
 
14
15
  // SELECT CONSTRUCTOR AND PROTOTYPE
@@ -18,6 +19,7 @@
18
19
  this.options = $.extend({}, $.fn.select.defaults, options);
19
20
  this.$element.on('click', 'a', $.proxy(this.itemclicked, this));
20
21
  this.$button = this.$element.find('.btn');
22
+ this.$hiddenField = this.$element.find('.hidden-field');
21
23
  this.$label = this.$element.find('.dropdown-label');
22
24
  this.setDefaultSelection();
23
25
 
@@ -32,6 +34,7 @@
32
34
 
33
35
  itemclicked: function (e) {
34
36
  this.$selectedItem = $(e.target).parent();
37
+ this.$hiddenField.val(this.$selectedItem.attr('data-value'));
35
38
  this.$label.text(this.$selectedItem.text());
36
39
 
37
40
  // pass object including text and any data-attributes
@@ -90,6 +93,7 @@
90
93
  var item = this.$element.find(selector);
91
94
 
92
95
  this.$selectedItem = item;
96
+ this.$hiddenField.val(this.$selectedItem.attr('data-value'));
93
97
  this.$label.text(this.$selectedItem.text());
94
98
  },
95
99
 
@@ -121,7 +125,8 @@
121
125
 
122
126
  // SELECT PLUGIN DEFINITION
123
127
 
124
- $.fn.select = function (option,value) {
128
+ $.fn.select = function (option) {
129
+ var args = Array.prototype.slice.call(arguments, 1);
125
130
  var methodReturn;
126
131
 
127
132
  var $set = this.each(function () {
@@ -130,16 +135,21 @@
130
135
  var options = typeof option === 'object' && option;
131
136
 
132
137
  if (!data) $this.data('select', (data = new Select(this, options)));
133
- if (typeof option === 'string') methodReturn = data[option](value);
138
+ if (typeof option === 'string') methodReturn = data[option].apply(data, args);
134
139
  });
135
140
 
136
- return (methodReturn === undefined) ? $set : methodReturn;
141
+ return ( methodReturn === undefined ) ? $set : methodReturn;
137
142
  };
138
143
 
139
144
  $.fn.select.defaults = {};
140
145
 
141
146
  $.fn.select.Constructor = Select;
142
147
 
148
+ $.fn.select.noConflict = function () {
149
+ $.fn.select = old;
150
+ return this;
151
+ };
152
+
143
153
 
144
154
  // SELECT DATA-API
145
155
 
@@ -9,7 +9,7 @@
9
9
  !function ($) {
10
10
 
11
11
 
12
-
12
+ var old = $.fn.spinner;
13
13
 
14
14
  // SPINNER CONSTRUCTOR AND PROTOTYPE
15
15
 
@@ -72,7 +72,7 @@
72
72
  if(newVal/1){
73
73
  this.options.value = newVal/1;
74
74
  }else{
75
- newVal = newVal.replace(/[^0-9]/g,'');
75
+ newVal = newVal.replace(/[^0-9]/g,'') || '';
76
76
  this.$input.val(newVal);
77
77
  this.options.value = newVal/1;
78
78
  }
@@ -81,9 +81,11 @@
81
81
  },
82
82
 
83
83
  stopSpin: function () {
84
- clearTimeout(this.switches.timeout);
85
- this.switches.count = 1;
86
- this.triggerChangedEvent();
84
+ if(this.switches.timeout!==undefined){
85
+ clearTimeout(this.switches.timeout);
86
+ this.switches.count = 1;
87
+ this.triggerChangedEvent();
88
+ }
87
89
  },
88
90
 
89
91
  triggerChangedEvent: function () {
@@ -170,19 +172,20 @@
170
172
 
171
173
  // SPINNER PLUGIN DEFINITION
172
174
 
173
- $.fn.spinner = function (option,value) {
175
+ $.fn.spinner = function (option) {
176
+ var args = Array.prototype.slice.call( arguments, 1 );
174
177
  var methodReturn;
175
178
 
176
179
  var $set = this.each(function () {
177
- var $this = $(this);
178
- var data = $this.data('spinner');
180
+ var $this = $( this );
181
+ var data = $this.data( 'spinner' );
179
182
  var options = typeof option === 'object' && option;
180
183
 
181
- if (!data) $this.data('spinner', (data = new Spinner(this, options)));
182
- if (typeof option === 'string') methodReturn = data[option](value);
184
+ if( !data ) $this.data('spinner', (data = new Spinner( this, options ) ) );
185
+ if( typeof option === 'string' ) methodReturn = data[ option ].apply( data, args );
183
186
  });
184
187
 
185
- return (methodReturn === undefined) ? $set : methodReturn;
188
+ return ( methodReturn === undefined ) ? $set : methodReturn;
186
189
  };
187
190
 
188
191
  $.fn.spinner.defaults = {
@@ -197,6 +200,11 @@
197
200
 
198
201
  $.fn.spinner.Constructor = Spinner;
199
202
 
203
+ $.fn.spinner.noConflict = function () {
204
+ $.fn.spinner = old;
205
+ return this;
206
+ };
207
+
200
208
 
201
209
  // SPINNER DATA-API
202
210
 
@@ -207,5 +215,4 @@
207
215
  $this.spinner($this.data());
208
216
  });
209
217
  });
210
-
211
218
  }(window.jQuery);
@@ -9,7 +9,7 @@
9
9
  !function ($) {
10
10
 
11
11
 
12
-
12
+ var old = $.fn.tree;
13
13
 
14
14
  // TREE CONSTRUCTOR AND PROTOTYPE
15
15
 
@@ -211,19 +211,20 @@
211
211
 
212
212
  // TREE PLUGIN DEFINITION
213
213
 
214
- $.fn.tree = function (option, value) {
214
+ $.fn.tree = function (option) {
215
+ var args = Array.prototype.slice.call( arguments, 1 );
215
216
  var methodReturn;
216
217
 
217
218
  var $set = this.each(function () {
218
- var $this = $(this);
219
- var data = $this.data('tree');
219
+ var $this = $( this );
220
+ var data = $this.data( 'tree' );
220
221
  var options = typeof option === 'object' && option;
221
222
 
222
- if (!data) $this.data('tree', (data = new Tree(this, options)));
223
- if (typeof option === 'string') methodReturn = data[option](value);
223
+ if( !data ) $this.data('tree', (data = new Tree( this, options ) ) );
224
+ if( typeof option === 'string' ) methodReturn = data[ option ].apply( data, args );
224
225
  });
225
226
 
226
- return (methodReturn === undefined) ? $set : methodReturn;
227
+ return ( methodReturn === undefined ) ? $set : methodReturn;
227
228
  };
228
229
 
229
230
  $.fn.tree.defaults = {
@@ -234,4 +235,8 @@
234
235
 
235
236
  $.fn.tree.Constructor = Tree;
236
237
 
238
+ $.fn.tree.noConflict = function () {
239
+ $.fn.tree = old;
240
+ return this;
241
+ };
237
242
  }(window.jQuery);
@@ -9,7 +9,7 @@
9
9
  !function ($) {
10
10
 
11
11
 
12
-
12
+ var old = $.fn.wizard;
13
13
 
14
14
  // WIZARD CONSTRUCTOR AND PROTOTYPE
15
15
 
@@ -18,6 +18,7 @@
18
18
 
19
19
  this.$element = $(element);
20
20
  this.options = $.extend({}, $.fn.wizard.defaults, options);
21
+ this.options.disablePreviousStep = ( this.$element.data().restrict === "previous" ) ? true : false;
21
22
  this.currentStep = this.options.selectedItem.step;
22
23
  this.numSteps = this.$element.find('.steps li').length;
23
24
  this.$prevBtn = this.$element.find('button.btn-prev');
@@ -33,7 +34,12 @@
33
34
  this.$element.on('click', 'li.complete', $.proxy(this.stepclicked, this));
34
35
 
35
36
  if(this.currentStep > 1) {
36
- this.selectedItem(this.options.selectedItem);
37
+ this.selectedItem(this.options.selectedItem);
38
+ }
39
+
40
+ if( this.options.disablePreviousStep ) {
41
+ this.$prevBtn.attr( 'disabled', true );
42
+ this.$element.find( '.steps' ).addClass( 'previous-disabled' );
37
43
  }
38
44
  };
39
45
 
@@ -47,7 +53,9 @@
47
53
  var lastStep = (this.currentStep === this.numSteps);
48
54
 
49
55
  // disable buttons based on current step
50
- this.$prevBtn.attr('disabled', (firstStep === true || canMovePrev === false));
56
+ if( !this.options.disablePreviousStep ) {
57
+ this.$prevBtn.attr('disabled', (firstStep === true || canMovePrev === false));
58
+ }
51
59
 
52
60
  // change button text of last step, if specified
53
61
  var data = this.$nextBtn.data();
@@ -84,7 +92,7 @@
84
92
  $(target).addClass('active');
85
93
 
86
94
  // reset the wizard position to the left
87
- this.$element.find('.steps').first().attr('style','margin-left: 0');
95
+ this.$element.find('.steps').first().attr('style','margin-left: 0');
88
96
 
89
97
  // check if the steps are wider than the container div
90
98
  var totalWidth = 0;
@@ -92,8 +100,8 @@
92
100
  totalWidth += $(this).outerWidth();
93
101
  });
94
102
  var containerWidth = 0;
95
- if (this.$element.find('.actions').length) {
96
- containerWidth = this.$element.width() - this.$element.find('.actions').first().outerWidth();
103
+ if (this.$element.find('.actions').length) {
104
+ containerWidth = this.$element.width() - this.$element.find('.actions').first().outerWidth();
97
105
  } else {
98
106
  containerWidth = this.$element.width();
99
107
  }
@@ -101,16 +109,16 @@
101
109
 
102
110
  // set the position so that the last step is on the right
103
111
  var newMargin = totalWidth - containerWidth;
104
- this.$element.find('.steps').first().attr('style','margin-left: -' + newMargin + 'px');
112
+ this.$element.find('.steps').first().attr('style','margin-left: -' + newMargin + 'px');
105
113
 
106
114
  // set the position so that the active step is in a good
107
115
  // position if it has been moved out of view
108
- if (this.$element.find('li.active').first().position().left < 200) {
109
- newMargin += this.$element.find('li.active').first().position().left - 200;
116
+ if (this.$element.find('li.active').first().position().left < 200) {
117
+ newMargin += this.$element.find('li.active').first().position().left - 200;
110
118
  if (newMargin < 1) {
111
- this.$element.find('.steps').first().attr('style','margin-left: 0');
119
+ this.$element.find('.steps').first().attr('style','margin-left: 0');
112
120
  } else {
113
- this.$element.find('.steps').first().attr('style','margin-left: -' + newMargin + 'px');
121
+ this.$element.find('.steps').first().attr('style','margin-left: -' + newMargin + 'px');
114
122
  }
115
123
  }
116
124
  }
@@ -119,20 +127,31 @@
119
127
  },
120
128
 
121
129
  stepclicked: function (e) {
122
- var li = $(e.currentTarget);
130
+ var li = $(e.currentTarget);
131
+ var index = this.$element.find('.steps li').index(li);
132
+ var canMovePrev = true;
123
133
 
124
- var index = this.$element.find('.steps li').index(li);
134
+ if( this.options.disablePreviousStep ) {
135
+ if( index < this.currentStep ) {
136
+ canMovePrev = false;
137
+ }
138
+ }
125
139
 
126
- var evt = $.Event('stepclick');
127
- this.$element.trigger(evt, {step: index + 1});
128
- if (evt.isDefaultPrevented()) return;
140
+ if( canMovePrev ) {
141
+ var evt = $.Event('stepclick');
142
+ this.$element.trigger(evt, {step: index + 1});
143
+ if (evt.isDefaultPrevented()) return;
129
144
 
130
- this.currentStep = (index + 1);
131
- this.setState();
145
+ this.currentStep = (index + 1);
146
+ this.setState();
147
+ }
132
148
  },
133
149
 
134
150
  previous: function () {
135
151
  var canMovePrev = (this.currentStep > 1);
152
+ if( this.options.disablePreviousStep ) {
153
+ canMovePrev = false;
154
+ }
136
155
  if (canMovePrev) {
137
156
  var e = $.Event('change');
138
157
  this.$element.trigger(e, {step: this.currentStep, direction: 'previous'});
@@ -186,19 +205,20 @@
186
205
 
187
206
  // WIZARD PLUGIN DEFINITION
188
207
 
189
- $.fn.wizard = function (option, value) {
208
+ $.fn.wizard = function (option) {
209
+ var args = Array.prototype.slice.call( arguments, 1 );
190
210
  var methodReturn;
191
211
 
192
212
  var $set = this.each(function () {
193
- var $this = $(this);
194
- var data = $this.data('wizard');
213
+ var $this = $( this );
214
+ var data = $this.data( 'wizard' );
195
215
  var options = typeof option === 'object' && option;
196
216
 
197
- if (!data) $this.data('wizard', (data = new Wizard(this, options)));
198
- if (typeof option === 'string') methodReturn = data[option](value);
217
+ if( !data ) $this.data('wizard', (data = new Wizard( this, options ) ) );
218
+ if( typeof option === 'string' ) methodReturn = data[ option ].apply( data, args );
199
219
  });
200
220
 
201
- return (methodReturn === undefined) ? $set : methodReturn;
221
+ return ( methodReturn === undefined ) ? $set : methodReturn;
202
222
  };
203
223
 
204
224
  $.fn.wizard.defaults = {
@@ -207,15 +227,19 @@
207
227
 
208
228
  $.fn.wizard.Constructor = Wizard;
209
229
 
230
+ $.fn.wizard.noConflict = function () {
231
+ $.fn.wizard = old;
232
+ return this;
233
+ };
234
+
210
235
 
211
236
  // WIZARD DATA-API
212
237
 
213
238
  $(function () {
214
- $('body').on('mousedown.wizard.data-api', '.wizard', function () {
239
+ $('body').on('mouseover.wizard.data-api', '.wizard', function () {
215
240
  var $this = $(this);
216
241
  if ($this.data('wizard')) return;
217
242
  $this.wizard($this.data());
218
243
  });
219
244
  });
220
-
221
245
  }(window.jQuery);
@@ -12,7 +12,7 @@
12
12
  input[type=checkbox] {
13
13
  /* IE cannot fire events if display none or visibility hidden */
14
14
  position: relative;
15
- top: -99999px;
15
+ left: -99999px;
16
16
  }
17
17
 
18
18
  i {
@@ -1,10 +1,20 @@
1
1
  .radio-custom {
2
2
  input[type=radio] {
3
- /* IE cannot fire events if display none or visibility hidden */
4
- position: relative;
5
- top: -99999px;
3
+ /* IE cannot fire events if display none or visibility hidden */
4
+ position: relative;
5
+ left: -99999px;
6
6
  }
7
7
 
8
+ &.highlight {
9
+ padding: 4px 4px 4px 24px;
10
+
11
+ &.checked {
12
+ background: #e9e9e9;
13
+ -webkit-border-radius: @borderRadiusSmall;
14
+ border-radius: @borderRadiusSmall;
15
+ }
16
+ }
17
+
8
18
  i {
9
19
  background-image: image-url('fuelux/form.png');
10
20
  background-position: 0 -15px;
@@ -8,6 +8,10 @@
8
8
  color: #333;
9
9
  }
10
10
 
11
+ .hidden-field {
12
+ display: none;
13
+ }
14
+
11
15
  &-sizer {
12
16
  display: inline-block;
13
17
  position: absolute;
@@ -64,8 +64,10 @@
64
64
  }
65
65
 
66
66
  .tree-item-name {
67
- position: absolute;
68
- left: 29px;
67
+ overflow: hidden;
68
+ padding-left: 29px;
69
+ text-overflow: ellipsis;
70
+ white-space: nowrap;
69
71
  }
70
72
 
71
73
  .tree-dot {
@@ -14,6 +14,24 @@
14
14
  padding: 0;
15
15
  margin: 0;
16
16
  width: 4000px;
17
+
18
+ &.previous-disabled {
19
+ li {
20
+ &.complete {
21
+ cursor: default;
22
+
23
+ &:hover {
24
+ background: #f3f4f5;
25
+ color: @successText;
26
+ cursor: default;
27
+
28
+ .chevron:before {
29
+ border-left-color: #f3f4f5;
30
+ }
31
+ }
32
+ }
33
+ }
34
+ }
17
35
 
18
36
  li {
19
37
  float: left;
@@ -35,7 +53,7 @@
35
53
  position: absolute;
36
54
  right: -14px;
37
55
  top: 0;
38
- z-index: 1;
56
+ z-index: 1;
39
57
  }
40
58
 
41
59
  .chevron:before {
@@ -92,7 +110,7 @@
92
110
  line-height: 46px;
93
111
  float: right;
94
112
  padding-left: 15px;
95
- padding-right: 15px;
113
+ padding-right: 15px;
96
114
  vertical-align: middle;
97
115
  background-color: #e5e5e5;
98
116
  border-left: 1px solid @navbarBorder;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fuelux-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.1
4
+ version: 2.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Baldwin