twitter_bootstrap_wizard_rails 0.1.1 → 1.3.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1272dcf60ab39f255313d2b0b5b9acd034dde89d
|
4
|
+
data.tar.gz: 8cd9c46cb991ec066ba3245aaa4daaadeb8c3440
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad0cd3b365a9faaad8e6b177e9c9efa3ae71bb0d823ec24637820650c30f90e76ee667848f87689ab1db7915b229318798b89fcfe8e8366938730407b3d45793
|
7
|
+
data.tar.gz: c2638762d105a69c171e2d5f7c6f865a7467af8a3c6bf96ebecc80a7fa718673b6cfab378a49c1e9914155945d5ccf7be066d51b121059ce3c63b9187b45d712
|
data/README.md
CHANGED
@@ -20,8 +20,8 @@ Twitter Bootstrap Wizard Rails builds a wizard out of a formatter tabbable struc
|
|
20
20
|
|
21
21
|
* Add to `app/assets/javascripts/applications.js`:
|
22
22
|
```javascript
|
23
|
-
//= require
|
24
|
-
//= require
|
23
|
+
//= require jquery.bootstrap.wizard
|
24
|
+
//= require prettify
|
25
25
|
```
|
26
26
|
|
27
27
|
* Add to `app/assets/stylesheets/application.css`
|
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
29
29
|
spec.require_paths = ["lib"]
|
30
30
|
|
31
|
-
spec.add_development_dependency "bundler"
|
32
|
-
spec.add_development_dependency "rake"
|
33
|
-
spec.add_dependency
|
31
|
+
spec.add_development_dependency "bundler"
|
32
|
+
spec.add_development_dependency "rake"
|
33
|
+
spec.add_dependency "railties"
|
34
34
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*!
|
2
2
|
* jQuery twitter bootstrap wizard plugin
|
3
3
|
* Examples and documentation at: http://github.com/VinceG/twitter-bootstrap-wizard
|
4
|
-
* version 1.
|
4
|
+
* version 1.3.1
|
5
5
|
* Requires jQuery v1.3.2 or later
|
6
6
|
* Supports Bootstrap 2.2.x, 2.3.x, 3.0
|
7
7
|
* Dual licensed under the MIT and GPL licenses:
|
@@ -75,7 +75,7 @@ var bootstrapWizardCreate = function(element, options) {
|
|
75
75
|
if($index > obj.navigationLength()) {
|
76
76
|
} else {
|
77
77
|
historyStack.push(formerIndex);
|
78
|
-
$navigation.find(baseItemSelector + ':visible:eq(' + $index + ') a').tab('show');
|
78
|
+
$navigation.find(baseItemSelector + ($settings.withVisible ? ':visible' : '') + ':eq(' + $index + ') a').tab('show');
|
79
79
|
}
|
80
80
|
};
|
81
81
|
|
@@ -95,7 +95,7 @@ var bootstrapWizardCreate = function(element, options) {
|
|
95
95
|
if($index < 0) {
|
96
96
|
} else {
|
97
97
|
historyStack.push(formerIndex);
|
98
|
-
$navigation.find(baseItemSelector + ':visible:eq(' + $index + ') a').tab('show');
|
98
|
+
$navigation.find(baseItemSelector + ($settings.withVisible ? ':visible' : '') + ':eq(' + $index + ') a').tab('show');
|
99
99
|
}
|
100
100
|
};
|
101
101
|
|
@@ -158,14 +158,28 @@ var bootstrapWizardCreate = function(element, options) {
|
|
158
158
|
this.lastIndex = function() {
|
159
159
|
return obj.navigationLength();
|
160
160
|
};
|
161
|
+
|
161
162
|
this.getIndex = function(e) {
|
162
163
|
return $navigation.find(baseItemSelector).index(e);
|
163
164
|
};
|
165
|
+
|
164
166
|
this.nextIndex = function() {
|
165
|
-
|
167
|
+
var nextIndexCandidate=this.currentIndex();
|
168
|
+
var nextTabCandidate=null;
|
169
|
+
do {
|
170
|
+
nextIndexCandidate++;
|
171
|
+
nextTabCandidate = $navigation.find(baseItemSelector + ":eq(" + nextIndexCandidate + ")");
|
172
|
+
} while ((nextTabCandidate)&&(nextTabCandidate.hasClass("disabled")));
|
173
|
+
return nextIndexCandidate;
|
166
174
|
};
|
167
175
|
this.previousIndex = function() {
|
168
|
-
|
176
|
+
var prevIndexCandidate=this.currentIndex();
|
177
|
+
var prevTabCandidate=null;
|
178
|
+
do {
|
179
|
+
prevIndexCandidate--;
|
180
|
+
prevTabCandidate = $navigation.find(baseItemSelector + ":eq(" + prevIndexCandidate + ")");
|
181
|
+
} while ((prevTabCandidate)&&(prevTabCandidate.hasClass("disabled")));
|
182
|
+
return prevIndexCandidate;
|
169
183
|
};
|
170
184
|
this.navigationLength = function() {
|
171
185
|
return $navigation.find(baseItemSelector).length - 1;
|
@@ -184,7 +198,7 @@ var bootstrapWizardCreate = function(element, options) {
|
|
184
198
|
};
|
185
199
|
this.show = function(index) {
|
186
200
|
var tabToShow = isNaN(index) ?
|
187
|
-
element.find(baseItemSelector + ' a[href
|
201
|
+
element.find(baseItemSelector + ' a[href="#' + index + '"]') :
|
188
202
|
element.find(baseItemSelector + ':eq(' + index + ') a');
|
189
203
|
if (tabToShow.length > 0) {
|
190
204
|
historyStack.push(obj.currentIndex());
|
@@ -228,7 +242,7 @@ var bootstrapWizardCreate = function(element, options) {
|
|
228
242
|
}
|
229
243
|
};
|
230
244
|
|
231
|
-
var innerTabShown = function (e) {
|
245
|
+
var innerTabShown = function (e) {
|
232
246
|
var $element = $(e.target).parent();
|
233
247
|
var nextTab = $navigation.find(baseItemSelector).index($element);
|
234
248
|
|
@@ -249,7 +263,7 @@ var bootstrapWizardCreate = function(element, options) {
|
|
249
263
|
|
250
264
|
// remove the existing handlers
|
251
265
|
$('a[data-toggle="tab"]', $navigation).off('click', innerTabClick);
|
252
|
-
$('a[data-toggle="tab"]', $navigation).off('
|
266
|
+
$('a[data-toggle="tab"]', $navigation).off('show show.bs.tab', innerTabShown);
|
253
267
|
|
254
268
|
// reset elements based on current state of the DOM
|
255
269
|
$navigation = element.find('ul:first', element);
|
@@ -257,7 +271,7 @@ var bootstrapWizardCreate = function(element, options) {
|
|
257
271
|
|
258
272
|
// re-add handlers
|
259
273
|
$('a[data-toggle="tab"]', $navigation).on('click', innerTabClick);
|
260
|
-
$('a[data-toggle="tab"]', $navigation).on('
|
274
|
+
$('a[data-toggle="tab"]', $navigation).on('show show.bs.tab', innerTabShown);
|
261
275
|
|
262
276
|
obj.fixNavigationButtons();
|
263
277
|
};
|
@@ -281,8 +295,8 @@ var bootstrapWizardCreate = function(element, options) {
|
|
281
295
|
|
282
296
|
$('a[data-toggle="tab"]', $navigation).on('click', innerTabClick);
|
283
297
|
|
284
|
-
// attach to both
|
285
|
-
$('a[data-toggle="tab"]', $navigation).on('
|
298
|
+
// attach to both show and show.bs.tab to support Bootstrap versions 2.3.2 and 3.0.0
|
299
|
+
$('a[data-toggle="tab"]', $navigation).on('show show.bs.tab', innerTabShown);
|
286
300
|
};
|
287
301
|
$.fn.bootstrapWizard = function(options) {
|
288
302
|
//expose methods
|
@@ -308,12 +322,13 @@ $.fn.bootstrapWizard = function(options) {
|
|
308
322
|
|
309
323
|
// expose options
|
310
324
|
$.fn.bootstrapWizard.defaults = {
|
325
|
+
withVisible: true,
|
311
326
|
tabClass: 'nav nav-pills',
|
312
327
|
nextSelector: '.wizard li.next',
|
313
328
|
previousSelector: '.wizard li.previous',
|
314
329
|
firstSelector: '.wizard li.first',
|
315
330
|
lastSelector: '.wizard li.last',
|
316
|
-
|
331
|
+
finishSelector: '.wizard li.finish',
|
317
332
|
backSelector: '.wizard li.back',
|
318
333
|
onShow: null,
|
319
334
|
onInit: null,
|
@@ -321,8 +336,8 @@ $.fn.bootstrapWizard.defaults = {
|
|
321
336
|
onPrevious: null,
|
322
337
|
onLast: null,
|
323
338
|
onFirst: null,
|
324
|
-
|
325
|
-
|
339
|
+
onFinish: null,
|
340
|
+
onBack: null,
|
326
341
|
onTabChange: null,
|
327
342
|
onTabClick: null,
|
328
343
|
onTabShow: null
|
metadata
CHANGED
@@ -1,43 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twitter_bootstrap_wizard_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shouvik Mukherjee
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: railties
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,8 +52,11 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
description:
|
56
|
-
|
55
|
+
description: 'Twitter Bootstrap Wizard Rails builds a wizard out of a formatter tabbable
|
56
|
+
structure. It allows to build a wizard functionality using buttons to go through
|
57
|
+
the different wizard steps and using events allows to hook into each step individually.
|
58
|
+
|
59
|
+
'
|
57
60
|
email:
|
58
61
|
- contact@ishouvik.com
|
59
62
|
executables: []
|
@@ -94,8 +97,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
97
|
version: '0'
|
95
98
|
requirements: []
|
96
99
|
rubyforge_project:
|
97
|
-
rubygems_version: 2.
|
100
|
+
rubygems_version: 2.5.1
|
98
101
|
signing_key:
|
99
102
|
specification_version: 4
|
100
103
|
summary: Build wizard out of a formatter tabbable structure using Bootstrap
|
101
104
|
test_files: []
|
105
|
+
has_rdoc:
|