@@ -21,11 +21,11 @@ $(document).ready(function(){
21
21
22
22
var defaults = {
23
23
nextButtonText : 'Next »' , //will be wrapped with button as below
24
- //nextButton : '<button class="btn btn-primary btn-mini bootstro-next-btn">Next »</button>',
24
+ //nextButton : '<button class="btn btn-primary btn-xs bootstro-next-btn">Next »</button>',
25
25
prevButtonText : '« Prev' ,
26
- //prevButton : '<button class="btn btn-primary btn-mini bootstro-prev-btn">« Prev</button>',
26
+ //prevButton : '<button class="btn btn-primary btn-xs bootstro-prev-btn">« Prev</button>',
27
27
finishButtonText : '<i class="icon-ok"></i> Ok I got it, get back to the site' ,
28
- //finishButton : '<button class="btn btn-mini btn-success bootstro-finish-btn"><i class="icon-ok"></i> Ok I got it, get back to the site</button>',
28
+ //finishButton : '<button class="btn btn-xs btn-success bootstro-finish-btn"><i class="icon-ok"></i> Ok I got it, get back to the site</button>',
29
29
stopOnBackdropClick : true ,
30
30
stopOnEsc : true ,
31
31
@@ -37,6 +37,8 @@ $(document).ready(function(){
37
37
margin : 100 , //if the currently shown element's margin is less than this value
38
38
// the element should be scrolled so that i can be viewed properly. This is useful
39
39
// for sites which have fixed top/bottom nav bar
40
+
41
+ //bootstrapVersion : 3
40
42
} ;
41
43
var settings ;
42
44
@@ -60,23 +62,26 @@ $(document).ready(function(){
60
62
function add_nav_btn ( content , i )
61
63
{
62
64
var $el = get_element ( i ) ;
63
- var nextButton , prevButton , finishButton ;
64
-
65
+ var nextButton , prevButton , finishButton , defaultBtnClass ;
66
+ if ( settings . bootstrapVersion && settings . bootstrapVersion == 2 )
67
+ defaultBtnClass = "btn btn-primary btn-mini" ;
68
+ else
69
+ defaultBtnClass = "btn btn-primary btn-xs" ; //default bootstrap version 3
65
70
content = content + "<div class='bootstro-nav-wrapper'>" ;
66
71
if ( $el . attr ( 'data-bootstro-nextButton' ) )
67
72
{
68
73
nextButton = $el . attr ( 'data-bootstro-nextButton' ) ;
69
74
}
70
75
else if ( $el . attr ( 'data-bootstro-nextButtonText' ) )
71
76
{
72
- nextButton = '<button class="btn btn-primary btn-mini bootstro-next-btn">' + $el . attr ( 'data-bootstro-nextButtonText' ) + '</button>' ;
77
+ nextButton = '<button class="' + defaultBtnClass + ' bootstro-next-btn">' + $el . attr ( 'data-bootstro-nextButtonText' ) + '</button>' ;
73
78
}
74
79
else
75
80
{
76
81
if ( typeof settings . nextButton != 'undefined' /*&& settings.nextButton != ''*/ )
77
82
nextButton = settings . nextButton ;
78
83
else
79
- nextButton = '<button class="btn btn-primary btn-mini bootstro-next-btn">' + settings . nextButtonText + '</button>' ;
84
+ nextButton = '<button class="' + defaultBtnClass + ' bootstro-next-btn">' + settings . nextButtonText + '</button>' ;
80
85
}
81
86
82
87
if ( $el . attr ( 'data-bootstro-prevButton' ) )
@@ -85,14 +90,14 @@ $(document).ready(function(){
85
90
}
86
91
else if ( $el . attr ( 'data-bootstro-prevButtonText' ) )
87
92
{
88
- prevButton = '<button class="btn btn-primary btn-mini bootstro-prev-btn">' + $el . attr ( 'data-bootstro-prevButtonText' ) + '</button>' ;
93
+ prevButton = '<button class="' + defaultBtnClass + ' bootstro-prev-btn">' + $el . attr ( 'data-bootstro-prevButtonText' ) + '</button>' ;
89
94
}
90
95
else
91
96
{
92
97
if ( typeof settings . prevButton != 'undefined' /*&& settings.prevButton != ''*/ )
93
98
prevButton = settings . prevButton ;
94
99
else
95
- prevButton = '<button class="btn btn-primary btn-mini bootstro-prev-btn">' + settings . prevButtonText + '</button>' ;
100
+ prevButton = '<button class="' + defaultBtnClass + ' bootstro-prev-btn">' + settings . prevButtonText + '</button>' ;
96
101
}
97
102
98
103
if ( $el . attr ( 'data-bootstro-finishButton' ) )
@@ -101,14 +106,14 @@ $(document).ready(function(){
101
106
}
102
107
else if ( $el . attr ( 'data-bootstro-finishButtonText' ) )
103
108
{
104
- finishButton = '<button class="btn btn-primary btn-mini bootstro-finish-btn">' + $el . attr ( 'data-bootstro-finishButtonText' ) + '</button>' ;
109
+ finishButton = '<button class="' + defaultBtnClass + ' bootstro-finish-btn">' + $el . attr ( 'data-bootstro-finishButtonText' ) + '</button>' ;
105
110
}
106
111
else
107
112
{
108
113
if ( typeof settings . finishButton != 'undefined' /*&& settings.finishButton != ''*/ )
109
114
finishButton = settings . finishButton ;
110
115
else
111
- finishButton = '<button class="btn btn-primary btn-mini bootstro-finish-btn">' + settings . finishButtonText + '</button>' ;
116
+ finishButton = '<button class="' + defaultBtnClass + ' bootstro-finish-btn">' + settings . finishButtonText + '</button>' ;
112
117
}
113
118
114
119
0 commit comments