bootstrap-rails-engine 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +2 -2
- data/lib/bootstrap-rails-engine.rb +2 -2
- data/lib/bootstrap-rails-engine/version.rb +2 -2
- data/vendor/assets/javascripts/bootstrap/bootstrap-datepicker.js +152 -52
- data/vendor/assets/javascripts/bootstrap/bootstrap.js +165 -31
- data/vendor/assets/javascripts/bootstrap/bootstrap.min.js +1 -1
- data/vendor/assets/stylesheets/bootstrap/bootstrap-datepicker.css +124 -114
- data/vendor/assets/stylesheets/bootstrap/bootstrap-responsive.css +5 -1
- data/vendor/assets/stylesheets/bootstrap/bootstrap-responsive.min.css +2 -2
- data/vendor/assets/stylesheets/bootstrap/bootstrap.css +272 -126
- data/vendor/assets/stylesheets/bootstrap/bootstrap.min.css +2 -2
- metadata +24 -9
data/README.md
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
Make [Twitter Bootstrap](http://twitter.github.com/bootstrap) into Rails Engine. [Bootstrap-datepicker](https://github.com/eternicode/bootstrap-datepicker) is also included.
|
3
3
|
|
4
4
|
## Version
|
5
|
-
Bootstrap 2.2.
|
6
|
-
Bootstrap-datepicker (2012/
|
5
|
+
Bootstrap 2.2.2
|
6
|
+
Bootstrap-datepicker (2012/12/13)
|
7
7
|
|
8
8
|
## Rails 3.1 or later
|
9
9
|
Include Gemfile,
|
@@ -4,10 +4,10 @@ module BootstrapRailsEngine
|
|
4
4
|
|
5
5
|
CDNS = {
|
6
6
|
:bootstrap_js => {
|
7
|
-
:default => "//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.
|
7
|
+
:default => "//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/js/bootstrap.min.js"
|
8
8
|
},
|
9
9
|
:bootstrap_css => {
|
10
|
-
:default => "//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.
|
10
|
+
:default => "//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css"
|
11
11
|
},
|
12
12
|
}
|
13
13
|
|
@@ -37,41 +37,38 @@
|
|
37
37
|
this.language = options.language||this.element.data('date-language')||"en";
|
38
38
|
this.language = this.language in dates ? this.language : "en";
|
39
39
|
this.format = DPGlobal.parseFormat(options.format||this.element.data('date-format')||'mm/dd/yyyy');
|
40
|
-
|
41
|
-
.appendTo('body')
|
42
|
-
.on({
|
43
|
-
click: $.proxy(this.click, this)
|
44
|
-
});
|
40
|
+
this.isInline = false;
|
45
41
|
this.isInput = this.element.is('input');
|
46
42
|
this.component = this.element.is('.date') ? this.element.find('.add-on') : false;
|
47
43
|
this.hasInput = this.component && this.element.find('input').length;
|
48
44
|
if(this.component && this.component.length === 0)
|
49
45
|
this.component = false;
|
50
46
|
|
51
|
-
|
52
|
-
this.element.on({
|
53
|
-
focus: $.proxy(this.show, this),
|
54
|
-
keyup: $.proxy(this.update, this),
|
55
|
-
keydown: $.proxy(this.keydown, this)
|
56
|
-
});
|
57
|
-
} else {
|
58
|
-
if (this.component && this.hasInput){
|
59
|
-
// For components that are not readonly, allow keyboard nav
|
60
|
-
this.element.find('input').on({
|
61
|
-
focus: $.proxy(this.show, this),
|
62
|
-
keyup: $.proxy(this.update, this),
|
63
|
-
keydown: $.proxy(this.keydown, this)
|
64
|
-
});
|
47
|
+
this._attachEvents();
|
65
48
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
49
|
+
this.forceParse = true;
|
50
|
+
if ('forceParse' in options) {
|
51
|
+
this.forceParse = options.forceParse;
|
52
|
+
} else if ('dateForceParse' in this.element.data()) {
|
53
|
+
this.forceParse = this.element.data('date-force-parse');
|
70
54
|
}
|
71
55
|
|
56
|
+
|
57
|
+
this.picker = $(DPGlobal.template)
|
58
|
+
.appendTo(this.isInline ? this.element : 'body')
|
59
|
+
.on({
|
60
|
+
click: $.proxy(this.click, this),
|
61
|
+
mousedown: $.proxy(this.mousedown, this)
|
62
|
+
});
|
63
|
+
|
64
|
+
if(this.isInline) {
|
65
|
+
this.picker.addClass('datepicker-inline');
|
66
|
+
} else {
|
67
|
+
this.picker.addClass('datepicker-dropdown dropdown-menu');
|
68
|
+
}
|
72
69
|
$(document).on('mousedown', function (e) {
|
73
70
|
// Clicked outside the datepicker, hide it
|
74
|
-
if ($(e.target).closest('.datepicker').length
|
71
|
+
if ($(e.target).closest('.datepicker').length === 0) {
|
75
72
|
that.hide();
|
76
73
|
}
|
77
74
|
});
|
@@ -90,6 +87,7 @@
|
|
90
87
|
this.keyboardNavigation = this.element.data('date-keyboard-navigation');
|
91
88
|
}
|
92
89
|
|
90
|
+
this.viewMode = this.startViewMode = 0;
|
93
91
|
switch(options.startView || this.element.data('date-start-view')){
|
94
92
|
case 2:
|
95
93
|
case 'decade':
|
@@ -99,11 +97,6 @@
|
|
99
97
|
case 'year':
|
100
98
|
this.viewMode = this.startViewMode = 1;
|
101
99
|
break;
|
102
|
-
case 0:
|
103
|
-
case 'month':
|
104
|
-
default:
|
105
|
-
this.viewMode = this.startViewMode = 0;
|
106
|
-
break;
|
107
100
|
}
|
108
101
|
|
109
102
|
this.todayBtn = (options.todayBtn||this.element.data('date-today-btn')||false);
|
@@ -113,17 +106,73 @@
|
|
113
106
|
this.weekEnd = ((this.weekStart + 6) % 7);
|
114
107
|
this.startDate = -Infinity;
|
115
108
|
this.endDate = Infinity;
|
109
|
+
this.daysOfWeekDisabled = [];
|
116
110
|
this.setStartDate(options.startDate||this.element.data('date-startdate'));
|
117
111
|
this.setEndDate(options.endDate||this.element.data('date-enddate'));
|
112
|
+
this.setDaysOfWeekDisabled(options.daysOfWeekDisabled||this.element.data('date-days-of-week-disabled'));
|
118
113
|
this.fillDow();
|
119
114
|
this.fillMonths();
|
120
115
|
this.update();
|
121
116
|
this.showMode();
|
117
|
+
|
118
|
+
if(this.isInline) {
|
119
|
+
this.show();
|
120
|
+
}
|
122
121
|
};
|
123
122
|
|
124
123
|
Datepicker.prototype = {
|
125
124
|
constructor: Datepicker,
|
126
125
|
|
126
|
+
_events: [],
|
127
|
+
_attachEvents: function(){
|
128
|
+
this._detachEvents();
|
129
|
+
if (this.isInput) { // single input
|
130
|
+
this._events = [
|
131
|
+
[this.element, {
|
132
|
+
focus: $.proxy(this.show, this),
|
133
|
+
keyup: $.proxy(this.update, this),
|
134
|
+
keydown: $.proxy(this.keydown, this)
|
135
|
+
}]
|
136
|
+
];
|
137
|
+
}
|
138
|
+
else if (this.component && this.hasInput){ // component: input + button
|
139
|
+
this._events = [
|
140
|
+
// For components that are not readonly, allow keyboard nav
|
141
|
+
[this.element.find('input'), {
|
142
|
+
focus: $.proxy(this.show, this),
|
143
|
+
keyup: $.proxy(this.update, this),
|
144
|
+
keydown: $.proxy(this.keydown, this)
|
145
|
+
}],
|
146
|
+
[this.component, {
|
147
|
+
click: $.proxy(this.show, this)
|
148
|
+
}]
|
149
|
+
];
|
150
|
+
}
|
151
|
+
else if (this.element.is('div')) { // inline datepicker
|
152
|
+
this.isInline = true;
|
153
|
+
}
|
154
|
+
else {
|
155
|
+
this._events = [
|
156
|
+
[this.element, {
|
157
|
+
click: $.proxy(this.show, this)
|
158
|
+
}]
|
159
|
+
];
|
160
|
+
}
|
161
|
+
for (var i=0, el, ev; i<this._events.length; i++){
|
162
|
+
el = this._events[i][0];
|
163
|
+
ev = this._events[i][1];
|
164
|
+
el.on(ev);
|
165
|
+
}
|
166
|
+
},
|
167
|
+
_detachEvents: function(){
|
168
|
+
for (var i=0, el, ev; i<this._events.length; i++){
|
169
|
+
el = this._events[i][0];
|
170
|
+
ev = this._events[i][1];
|
171
|
+
el.off(ev);
|
172
|
+
}
|
173
|
+
this._events = [];
|
174
|
+
},
|
175
|
+
|
127
176
|
show: function(e) {
|
128
177
|
this.picker.show();
|
129
178
|
this.height = this.component ? this.component.outerHeight() : this.element.outerHeight();
|
@@ -141,6 +190,7 @@
|
|
141
190
|
},
|
142
191
|
|
143
192
|
hide: function(e){
|
193
|
+
if(this.isInline) return;
|
144
194
|
this.picker.hide();
|
145
195
|
$(window).off('resize', this.place);
|
146
196
|
this.viewMode = this.startViewMode;
|
@@ -148,7 +198,14 @@
|
|
148
198
|
if (!this.isInput) {
|
149
199
|
$(document).off('mousedown', this.hide);
|
150
200
|
}
|
151
|
-
|
201
|
+
|
202
|
+
if (
|
203
|
+
this.forceParse &&
|
204
|
+
(
|
205
|
+
this.isInput && this.element.val() ||
|
206
|
+
this.hasInput && this.element.find('input').val()
|
207
|
+
)
|
208
|
+
)
|
152
209
|
this.setValue();
|
153
210
|
this.element.trigger({
|
154
211
|
type: 'hide',
|
@@ -156,9 +213,15 @@
|
|
156
213
|
});
|
157
214
|
},
|
158
215
|
|
216
|
+
remove: function() {
|
217
|
+
this._detachEvents();
|
218
|
+
this.picker.remove();
|
219
|
+
delete this.element.data().datepicker;
|
220
|
+
},
|
221
|
+
|
159
222
|
getDate: function() {
|
160
223
|
var d = this.getUTCDate();
|
161
|
-
return new Date(d.getTime() + (d.getTimezoneOffset()*60000))
|
224
|
+
return new Date(d.getTime() + (d.getTimezoneOffset()*60000));
|
162
225
|
},
|
163
226
|
|
164
227
|
getUTCDate: function() {
|
@@ -175,7 +238,7 @@
|
|
175
238
|
},
|
176
239
|
|
177
240
|
setValue: function() {
|
178
|
-
var formatted =
|
241
|
+
var formatted = this.getFormattedDate();
|
179
242
|
if (!this.isInput) {
|
180
243
|
if (this.component){
|
181
244
|
this.element.find('input').prop('value', formatted);
|
@@ -186,6 +249,11 @@
|
|
186
249
|
}
|
187
250
|
},
|
188
251
|
|
252
|
+
getFormattedDate: function(format) {
|
253
|
+
if(format == undefined) format = this.format;
|
254
|
+
return DPGlobal.formatDate(this.date, format, this.language);
|
255
|
+
},
|
256
|
+
|
189
257
|
setStartDate: function(startDate){
|
190
258
|
this.startDate = startDate||-Infinity;
|
191
259
|
if (this.startDate !== -Infinity) {
|
@@ -204,7 +272,20 @@
|
|
204
272
|
this.updateNavArrows();
|
205
273
|
},
|
206
274
|
|
275
|
+
setDaysOfWeekDisabled: function(daysOfWeekDisabled){
|
276
|
+
this.daysOfWeekDisabled = daysOfWeekDisabled||[];
|
277
|
+
if (!$.isArray(this.daysOfWeekDisabled)) {
|
278
|
+
this.daysOfWeekDisabled = this.daysOfWeekDisabled.split(/,\s*/);
|
279
|
+
}
|
280
|
+
this.daysOfWeekDisabled = $.map(this.daysOfWeekDisabled, function (d) {
|
281
|
+
return parseInt(d, 10);
|
282
|
+
});
|
283
|
+
this.update();
|
284
|
+
this.updateNavArrows();
|
285
|
+
},
|
286
|
+
|
207
287
|
place: function(){
|
288
|
+
if(this.isInline) return;
|
208
289
|
var zIndex = parseInt(this.element.parents().filter(function() {
|
209
290
|
return $(this).css('z-index') != 'auto';
|
210
291
|
}).first().css('z-index'))+10;
|
@@ -217,10 +298,18 @@
|
|
217
298
|
},
|
218
299
|
|
219
300
|
update: function(){
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
301
|
+
var date, fromArgs = false;
|
302
|
+
if(arguments && arguments.length && (typeof arguments[0] === 'string' || arguments[0] instanceof Date)) {
|
303
|
+
date = arguments[0];
|
304
|
+
fromArgs = true;
|
305
|
+
} else {
|
306
|
+
date = this.isInput ? this.element.prop('value') : this.element.data('date') || this.element.find('input').prop('value');
|
307
|
+
}
|
308
|
+
|
309
|
+
this.date = DPGlobal.parseDate(date, this.format, this.language);
|
310
|
+
|
311
|
+
if(fromArgs) this.setValue();
|
312
|
+
|
224
313
|
if (this.date < this.startDate) {
|
225
314
|
this.viewDate = new Date(this.startDate);
|
226
315
|
} else if (this.date > this.endDate) {
|
@@ -232,8 +321,8 @@
|
|
232
321
|
},
|
233
322
|
|
234
323
|
fillDow: function(){
|
235
|
-
var dowCnt = this.weekStart
|
236
|
-
|
324
|
+
var dowCnt = this.weekStart,
|
325
|
+
html = '<tr>';
|
237
326
|
while (dowCnt < this.weekStart + 7) {
|
238
327
|
html += '<th class="dow">'+dates[this.language].daysMin[(dowCnt++)%7]+'</th>';
|
239
328
|
}
|
@@ -242,8 +331,8 @@
|
|
242
331
|
},
|
243
332
|
|
244
333
|
fillMonths: function(){
|
245
|
-
var html = ''
|
246
|
-
|
334
|
+
var html = '',
|
335
|
+
i = 0;
|
247
336
|
while (i < 12) {
|
248
337
|
html += '<span class="month">'+dates[this.language].monthsShort[i++]+'</span>';
|
249
338
|
}
|
@@ -264,7 +353,7 @@
|
|
264
353
|
.text(dates[this.language].months[month]+' '+year);
|
265
354
|
this.picker.find('tfoot th.today')
|
266
355
|
.text(dates[this.language].today)
|
267
|
-
.toggle(this.todayBtn);
|
356
|
+
.toggle(this.todayBtn !== false);
|
268
357
|
this.updateNavArrows();
|
269
358
|
this.fillMonths();
|
270
359
|
var prevMonth = UTCDate(year, month-1, 28,0,0,0,0),
|
@@ -296,7 +385,8 @@
|
|
296
385
|
if (prevMonth.valueOf() == currentDate) {
|
297
386
|
clsName += ' active';
|
298
387
|
}
|
299
|
-
if (prevMonth.valueOf() < this.startDate || prevMonth.valueOf() > this.endDate
|
388
|
+
if (prevMonth.valueOf() < this.startDate || prevMonth.valueOf() > this.endDate ||
|
389
|
+
$.inArray(prevMonth.getUTCDay(), this.daysOfWeekDisabled) !== -1) {
|
300
390
|
clsName += ' disabled';
|
301
391
|
}
|
302
392
|
html.push('<td class="day'+clsName+'">'+prevMonth.getUTCDate() + '</td>');
|
@@ -401,10 +491,7 @@
|
|
401
491
|
break;
|
402
492
|
case 'today':
|
403
493
|
var date = new Date();
|
404
|
-
date.
|
405
|
-
date.setUTCMinutes(0);
|
406
|
-
date.setUTCSeconds(0);
|
407
|
-
date.setUTCMilliseconds(0);
|
494
|
+
date = UTCDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0);
|
408
495
|
|
409
496
|
this.showMode(-2);
|
410
497
|
var which = this.todayBtn == 'linked' ? null : 'view';
|
@@ -440,7 +527,7 @@
|
|
440
527
|
var year = this.viewDate.getUTCFullYear(),
|
441
528
|
month = this.viewDate.getUTCMonth();
|
442
529
|
if (target.is('.old')) {
|
443
|
-
if (month
|
530
|
+
if (month === 0) {
|
444
531
|
month = 11;
|
445
532
|
year -= 1;
|
446
533
|
} else {
|
@@ -480,8 +567,8 @@
|
|
480
567
|
}
|
481
568
|
if (element) {
|
482
569
|
element.change();
|
483
|
-
if (this.autoclose) {
|
484
|
-
|
570
|
+
if (this.autoclose && (!which || which == 'date')) {
|
571
|
+
this.hide();
|
485
572
|
}
|
486
573
|
}
|
487
574
|
},
|
@@ -627,7 +714,17 @@
|
|
627
714
|
if (dir) {
|
628
715
|
this.viewMode = Math.max(0, Math.min(2, this.viewMode + dir));
|
629
716
|
}
|
630
|
-
|
717
|
+
/*
|
718
|
+
vitalets: fixing bug of very special conditions:
|
719
|
+
jquery 1.7.1 + webkit + show inline datepicker in bootstrap popover.
|
720
|
+
Method show() does not set display css correctly and datepicker is not shown.
|
721
|
+
Changed to .css('display', 'block') solve the problem.
|
722
|
+
See https://github.com/vitalets/x-editable/issues/37
|
723
|
+
|
724
|
+
In jquery 1.7.2+ everything works fine.
|
725
|
+
*/
|
726
|
+
//this.picker.find('>div').hide().filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName).show();
|
727
|
+
this.picker.find('>div').hide().filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName).css('display', 'block');
|
631
728
|
this.updateNavArrows();
|
632
729
|
}
|
633
730
|
};
|
@@ -660,7 +757,7 @@
|
|
660
757
|
monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
|
661
758
|
today: "Today"
|
662
759
|
}
|
663
|
-
}
|
760
|
+
};
|
664
761
|
|
665
762
|
var DPGlobal = {
|
666
763
|
modes: [
|
@@ -810,7 +907,7 @@
|
|
810
907
|
contTemplate: '<tbody><tr><td colspan="7"></td></tr></tbody>',
|
811
908
|
footTemplate: '<tfoot><tr><th colspan="7" class="today"></th></tr></tfoot>'
|
812
909
|
};
|
813
|
-
DPGlobal.template = '<div class="datepicker
|
910
|
+
DPGlobal.template = '<div class="datepicker">'+
|
814
911
|
'<div class="datepicker-days">'+
|
815
912
|
'<table class=" table-condensed">'+
|
816
913
|
DPGlobal.headTemplate+
|
@@ -833,4 +930,7 @@
|
|
833
930
|
'</table>'+
|
834
931
|
'</div>'+
|
835
932
|
'</div>';
|
933
|
+
|
934
|
+
$.fn.datepicker.DPGlobal = DPGlobal;
|
935
|
+
|
836
936
|
}( window.jQuery );
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ===================================================
|
2
|
-
* bootstrap-transition.js v2.2.
|
2
|
+
* bootstrap-transition.js v2.2.2
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#transitions
|
4
4
|
* ===================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -58,7 +58,7 @@
|
|
58
58
|
})
|
59
59
|
|
60
60
|
}(window.jQuery);/* ==========================================================
|
61
|
-
* bootstrap-alert.js v2.2.
|
61
|
+
* bootstrap-alert.js v2.2.2
|
62
62
|
* http://twitter.github.com/bootstrap/javascript.html#alerts
|
63
63
|
* ==========================================================
|
64
64
|
* Copyright 2012 Twitter, Inc.
|
@@ -127,6 +127,8 @@
|
|
127
127
|
/* ALERT PLUGIN DEFINITION
|
128
128
|
* ======================= */
|
129
129
|
|
130
|
+
var old = $.fn.alert
|
131
|
+
|
130
132
|
$.fn.alert = function (option) {
|
131
133
|
return this.each(function () {
|
132
134
|
var $this = $(this)
|
@@ -139,13 +141,22 @@
|
|
139
141
|
$.fn.alert.Constructor = Alert
|
140
142
|
|
141
143
|
|
144
|
+
/* ALERT NO CONFLICT
|
145
|
+
* ================= */
|
146
|
+
|
147
|
+
$.fn.alert.noConflict = function () {
|
148
|
+
$.fn.alert = old
|
149
|
+
return this
|
150
|
+
}
|
151
|
+
|
152
|
+
|
142
153
|
/* ALERT DATA-API
|
143
154
|
* ============== */
|
144
155
|
|
145
156
|
$(document).on('click.alert.data-api', dismiss, Alert.prototype.close)
|
146
157
|
|
147
158
|
}(window.jQuery);/* ============================================================
|
148
|
-
* bootstrap-button.js v2.2.
|
159
|
+
* bootstrap-button.js v2.2.2
|
149
160
|
* http://twitter.github.com/bootstrap/javascript.html#buttons
|
150
161
|
* ============================================================
|
151
162
|
* Copyright 2012 Twitter, Inc.
|
@@ -210,6 +221,8 @@
|
|
210
221
|
/* BUTTON PLUGIN DEFINITION
|
211
222
|
* ======================== */
|
212
223
|
|
224
|
+
var old = $.fn.button
|
225
|
+
|
213
226
|
$.fn.button = function (option) {
|
214
227
|
return this.each(function () {
|
215
228
|
var $this = $(this)
|
@@ -228,6 +241,15 @@
|
|
228
241
|
$.fn.button.Constructor = Button
|
229
242
|
|
230
243
|
|
244
|
+
/* BUTTON NO CONFLICT
|
245
|
+
* ================== */
|
246
|
+
|
247
|
+
$.fn.button.noConflict = function () {
|
248
|
+
$.fn.button = old
|
249
|
+
return this
|
250
|
+
}
|
251
|
+
|
252
|
+
|
231
253
|
/* BUTTON DATA-API
|
232
254
|
* =============== */
|
233
255
|
|
@@ -238,7 +260,7 @@
|
|
238
260
|
})
|
239
261
|
|
240
262
|
}(window.jQuery);/* ==========================================================
|
241
|
-
* bootstrap-carousel.js v2.2.
|
263
|
+
* bootstrap-carousel.js v2.2.2
|
242
264
|
* http://twitter.github.com/bootstrap/javascript.html#carousel
|
243
265
|
* ==========================================================
|
244
266
|
* Copyright 2012 Twitter, Inc.
|
@@ -268,7 +290,6 @@
|
|
268
290
|
var Carousel = function (element, options) {
|
269
291
|
this.$element = $(element)
|
270
292
|
this.options = options
|
271
|
-
this.options.slide && this.slide(this.options.slide)
|
272
293
|
this.options.pause == 'hover' && this.$element
|
273
294
|
.on('mouseenter', $.proxy(this.pause, this))
|
274
295
|
.on('mouseleave', $.proxy(this.cycle, this))
|
@@ -380,6 +401,8 @@
|
|
380
401
|
/* CAROUSEL PLUGIN DEFINITION
|
381
402
|
* ========================== */
|
382
403
|
|
404
|
+
var old = $.fn.carousel
|
405
|
+
|
383
406
|
$.fn.carousel = function (option) {
|
384
407
|
return this.each(function () {
|
385
408
|
var $this = $(this)
|
@@ -401,6 +424,14 @@
|
|
401
424
|
$.fn.carousel.Constructor = Carousel
|
402
425
|
|
403
426
|
|
427
|
+
/* CAROUSEL NO CONFLICT
|
428
|
+
* ==================== */
|
429
|
+
|
430
|
+
$.fn.carousel.noConflict = function () {
|
431
|
+
$.fn.carousel = old
|
432
|
+
return this
|
433
|
+
}
|
434
|
+
|
404
435
|
/* CAROUSEL DATA-API
|
405
436
|
* ================= */
|
406
437
|
|
@@ -413,7 +444,7 @@
|
|
413
444
|
})
|
414
445
|
|
415
446
|
}(window.jQuery);/* =============================================================
|
416
|
-
* bootstrap-collapse.js v2.2.
|
447
|
+
* bootstrap-collapse.js v2.2.2
|
417
448
|
* http://twitter.github.com/bootstrap/javascript.html#collapse
|
418
449
|
* =============================================================
|
419
450
|
* Copyright 2012 Twitter, Inc.
|
@@ -534,8 +565,10 @@
|
|
534
565
|
}
|
535
566
|
|
536
567
|
|
537
|
-
/*
|
538
|
-
*
|
568
|
+
/* COLLAPSE PLUGIN DEFINITION
|
569
|
+
* ========================== */
|
570
|
+
|
571
|
+
var old = $.fn.collapse
|
539
572
|
|
540
573
|
$.fn.collapse = function (option) {
|
541
574
|
return this.each(function () {
|
@@ -554,9 +587,18 @@
|
|
554
587
|
$.fn.collapse.Constructor = Collapse
|
555
588
|
|
556
589
|
|
557
|
-
/*
|
590
|
+
/* COLLAPSE NO CONFLICT
|
558
591
|
* ==================== */
|
559
592
|
|
593
|
+
$.fn.collapse.noConflict = function () {
|
594
|
+
$.fn.collapse = old
|
595
|
+
return this
|
596
|
+
}
|
597
|
+
|
598
|
+
|
599
|
+
/* COLLAPSE DATA-API
|
600
|
+
* ================= */
|
601
|
+
|
560
602
|
$(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
|
561
603
|
var $this = $(this), href
|
562
604
|
, target = $this.attr('data-target')
|
@@ -568,7 +610,7 @@
|
|
568
610
|
})
|
569
611
|
|
570
612
|
}(window.jQuery);/* ============================================================
|
571
|
-
* bootstrap-dropdown.js v2.2.
|
613
|
+
* bootstrap-dropdown.js v2.2.2
|
572
614
|
* http://twitter.github.com/bootstrap/javascript.html#dropdowns
|
573
615
|
* ============================================================
|
574
616
|
* Copyright 2012 Twitter, Inc.
|
@@ -622,9 +664,10 @@
|
|
622
664
|
|
623
665
|
if (!isActive) {
|
624
666
|
$parent.toggleClass('open')
|
625
|
-
$this.focus()
|
626
667
|
}
|
627
668
|
|
669
|
+
$this.focus()
|
670
|
+
|
628
671
|
return false
|
629
672
|
}
|
630
673
|
|
@@ -651,7 +694,7 @@
|
|
651
694
|
|
652
695
|
if (!isActive || (isActive && e.keyCode == 27)) return $this.click()
|
653
696
|
|
654
|
-
$items = $('[role=menu] li:not(.divider) a', $parent)
|
697
|
+
$items = $('[role=menu] li:not(.divider):visible a', $parent)
|
655
698
|
|
656
699
|
if (!$items.length) return
|
657
700
|
|
@@ -693,6 +736,8 @@
|
|
693
736
|
/* DROPDOWN PLUGIN DEFINITION
|
694
737
|
* ========================== */
|
695
738
|
|
739
|
+
var old = $.fn.dropdown
|
740
|
+
|
696
741
|
$.fn.dropdown = function (option) {
|
697
742
|
return this.each(function () {
|
698
743
|
var $this = $(this)
|
@@ -705,17 +750,27 @@
|
|
705
750
|
$.fn.dropdown.Constructor = Dropdown
|
706
751
|
|
707
752
|
|
753
|
+
/* DROPDOWN NO CONFLICT
|
754
|
+
* ==================== */
|
755
|
+
|
756
|
+
$.fn.dropdown.noConflict = function () {
|
757
|
+
$.fn.dropdown = old
|
758
|
+
return this
|
759
|
+
}
|
760
|
+
|
761
|
+
|
708
762
|
/* APPLY TO STANDARD DROPDOWN ELEMENTS
|
709
763
|
* =================================== */
|
710
764
|
|
711
765
|
$(document)
|
712
766
|
.on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus)
|
713
767
|
.on('click.dropdown touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
|
768
|
+
.on('touchstart.dropdown.data-api', '.dropdown-menu', function (e) { e.stopPropagation() })
|
714
769
|
.on('click.dropdown.data-api touchstart.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
|
715
770
|
.on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
|
716
771
|
|
717
772
|
}(window.jQuery);/* =========================================================
|
718
|
-
* bootstrap-modal.js v2.2.
|
773
|
+
* bootstrap-modal.js v2.2.2
|
719
774
|
* http://twitter.github.com/bootstrap/javascript.html#modals
|
720
775
|
* =========================================================
|
721
776
|
* Copyright 2012 Twitter, Inc.
|
@@ -909,6 +964,8 @@
|
|
909
964
|
/* MODAL PLUGIN DEFINITION
|
910
965
|
* ======================= */
|
911
966
|
|
967
|
+
var old = $.fn.modal
|
968
|
+
|
912
969
|
$.fn.modal = function (option) {
|
913
970
|
return this.each(function () {
|
914
971
|
var $this = $(this)
|
@@ -929,6 +986,15 @@
|
|
929
986
|
$.fn.modal.Constructor = Modal
|
930
987
|
|
931
988
|
|
989
|
+
/* MODAL NO CONFLICT
|
990
|
+
* ================= */
|
991
|
+
|
992
|
+
$.fn.modal.noConflict = function () {
|
993
|
+
$.fn.modal = old
|
994
|
+
return this
|
995
|
+
}
|
996
|
+
|
997
|
+
|
932
998
|
/* MODAL DATA-API
|
933
999
|
* ============== */
|
934
1000
|
|
@@ -949,7 +1015,7 @@
|
|
949
1015
|
|
950
1016
|
}(window.jQuery);
|
951
1017
|
/* ===========================================================
|
952
|
-
* bootstrap-tooltip.js v2.2.
|
1018
|
+
* bootstrap-tooltip.js v2.2.2
|
953
1019
|
* http://twitter.github.com/bootstrap/javascript.html#tooltips
|
954
1020
|
* Inspired by the original jQuery.tipsy by Jason Frame
|
955
1021
|
* ===========================================================
|
@@ -1200,6 +1266,8 @@
|
|
1200
1266
|
/* TOOLTIP PLUGIN DEFINITION
|
1201
1267
|
* ========================= */
|
1202
1268
|
|
1269
|
+
var old = $.fn.tooltip
|
1270
|
+
|
1203
1271
|
$.fn.tooltip = function ( option ) {
|
1204
1272
|
return this.each(function () {
|
1205
1273
|
var $this = $(this)
|
@@ -1223,8 +1291,17 @@
|
|
1223
1291
|
, html: false
|
1224
1292
|
}
|
1225
1293
|
|
1294
|
+
|
1295
|
+
/* TOOLTIP NO CONFLICT
|
1296
|
+
* =================== */
|
1297
|
+
|
1298
|
+
$.fn.tooltip.noConflict = function () {
|
1299
|
+
$.fn.tooltip = old
|
1300
|
+
return this
|
1301
|
+
}
|
1302
|
+
|
1226
1303
|
}(window.jQuery);/* ===========================================================
|
1227
|
-
* bootstrap-popover.js v2.2.
|
1304
|
+
* bootstrap-popover.js v2.2.2
|
1228
1305
|
* http://twitter.github.com/bootstrap/javascript.html#popovers
|
1229
1306
|
* ===========================================================
|
1230
1307
|
* Copyright 2012 Twitter, Inc.
|
@@ -1269,7 +1346,7 @@
|
|
1269
1346
|
, content = this.getContent()
|
1270
1347
|
|
1271
1348
|
$tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
|
1272
|
-
$tip.find('.popover-content
|
1349
|
+
$tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
|
1273
1350
|
|
1274
1351
|
$tip.removeClass('fade top bottom left right in')
|
1275
1352
|
}
|
@@ -1306,6 +1383,8 @@
|
|
1306
1383
|
/* POPOVER PLUGIN DEFINITION
|
1307
1384
|
* ======================= */
|
1308
1385
|
|
1386
|
+
var old = $.fn.popover
|
1387
|
+
|
1309
1388
|
$.fn.popover = function (option) {
|
1310
1389
|
return this.each(function () {
|
1311
1390
|
var $this = $(this)
|
@@ -1322,11 +1401,20 @@
|
|
1322
1401
|
placement: 'right'
|
1323
1402
|
, trigger: 'click'
|
1324
1403
|
, content: ''
|
1325
|
-
, template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"
|
1404
|
+
, template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"></div></div></div>'
|
1326
1405
|
})
|
1327
1406
|
|
1407
|
+
|
1408
|
+
/* POPOVER NO CONFLICT
|
1409
|
+
* =================== */
|
1410
|
+
|
1411
|
+
$.fn.popover.noConflict = function () {
|
1412
|
+
$.fn.popover = old
|
1413
|
+
return this
|
1414
|
+
}
|
1415
|
+
|
1328
1416
|
}(window.jQuery);/* =============================================================
|
1329
|
-
* bootstrap-scrollspy.js v2.2.
|
1417
|
+
* bootstrap-scrollspy.js v2.2.2
|
1330
1418
|
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
|
1331
1419
|
* =============================================================
|
1332
1420
|
* Copyright 2012 Twitter, Inc.
|
@@ -1386,7 +1474,7 @@
|
|
1386
1474
|
, $href = /^#\w/.test(href) && $(href)
|
1387
1475
|
return ( $href
|
1388
1476
|
&& $href.length
|
1389
|
-
&& [[ $href.position().top, href ]] ) || null
|
1477
|
+
&& [[ $href.position().top + self.$scrollElement.scrollTop(), href ]] ) || null
|
1390
1478
|
})
|
1391
1479
|
.sort(function (a, b) { return a[0] - b[0] })
|
1392
1480
|
.each(function () {
|
@@ -1448,6 +1536,8 @@
|
|
1448
1536
|
/* SCROLLSPY PLUGIN DEFINITION
|
1449
1537
|
* =========================== */
|
1450
1538
|
|
1539
|
+
var old = $.fn.scrollspy
|
1540
|
+
|
1451
1541
|
$.fn.scrollspy = function (option) {
|
1452
1542
|
return this.each(function () {
|
1453
1543
|
var $this = $(this)
|
@@ -1465,6 +1555,15 @@
|
|
1465
1555
|
}
|
1466
1556
|
|
1467
1557
|
|
1558
|
+
/* SCROLLSPY NO CONFLICT
|
1559
|
+
* ===================== */
|
1560
|
+
|
1561
|
+
$.fn.scrollspy.noConflict = function () {
|
1562
|
+
$.fn.scrollspy = old
|
1563
|
+
return this
|
1564
|
+
}
|
1565
|
+
|
1566
|
+
|
1468
1567
|
/* SCROLLSPY DATA-API
|
1469
1568
|
* ================== */
|
1470
1569
|
|
@@ -1476,7 +1575,7 @@
|
|
1476
1575
|
})
|
1477
1576
|
|
1478
1577
|
}(window.jQuery);/* ========================================================
|
1479
|
-
* bootstrap-tab.js v2.2.
|
1578
|
+
* bootstrap-tab.js v2.2.2
|
1480
1579
|
* http://twitter.github.com/bootstrap/javascript.html#tabs
|
1481
1580
|
* ========================================================
|
1482
1581
|
* Copyright 2012 Twitter, Inc.
|
@@ -1587,6 +1686,8 @@
|
|
1587
1686
|
/* TAB PLUGIN DEFINITION
|
1588
1687
|
* ===================== */
|
1589
1688
|
|
1689
|
+
var old = $.fn.tab
|
1690
|
+
|
1590
1691
|
$.fn.tab = function ( option ) {
|
1591
1692
|
return this.each(function () {
|
1592
1693
|
var $this = $(this)
|
@@ -1599,6 +1700,15 @@
|
|
1599
1700
|
$.fn.tab.Constructor = Tab
|
1600
1701
|
|
1601
1702
|
|
1703
|
+
/* TAB NO CONFLICT
|
1704
|
+
* =============== */
|
1705
|
+
|
1706
|
+
$.fn.tab.noConflict = function () {
|
1707
|
+
$.fn.tab = old
|
1708
|
+
return this
|
1709
|
+
}
|
1710
|
+
|
1711
|
+
|
1602
1712
|
/* TAB DATA-API
|
1603
1713
|
* ============ */
|
1604
1714
|
|
@@ -1608,7 +1718,7 @@
|
|
1608
1718
|
})
|
1609
1719
|
|
1610
1720
|
}(window.jQuery);/* =============================================================
|
1611
|
-
* bootstrap-typeahead.js v2.2.
|
1721
|
+
* bootstrap-typeahead.js v2.2.2
|
1612
1722
|
* http://twitter.github.com/bootstrap/javascript.html#typeahead
|
1613
1723
|
* =============================================================
|
1614
1724
|
* Copyright 2012 Twitter, Inc.
|
@@ -1642,8 +1752,8 @@
|
|
1642
1752
|
this.sorter = this.options.sorter || this.sorter
|
1643
1753
|
this.highlighter = this.options.highlighter || this.highlighter
|
1644
1754
|
this.updater = this.options.updater || this.updater
|
1645
|
-
this.$menu = $(this.options.menu).appendTo('body')
|
1646
1755
|
this.source = this.options.source
|
1756
|
+
this.$menu = $(this.options.menu)
|
1647
1757
|
this.shown = false
|
1648
1758
|
this.listen()
|
1649
1759
|
}
|
@@ -1665,16 +1775,18 @@
|
|
1665
1775
|
}
|
1666
1776
|
|
1667
1777
|
, show: function () {
|
1668
|
-
var pos = $.extend({}, this.$element.
|
1778
|
+
var pos = $.extend({}, this.$element.position(), {
|
1669
1779
|
height: this.$element[0].offsetHeight
|
1670
1780
|
})
|
1671
1781
|
|
1672
|
-
this.$menu
|
1673
|
-
|
1674
|
-
|
1675
|
-
|
1782
|
+
this.$menu
|
1783
|
+
.insertAfter(this.$element)
|
1784
|
+
.css({
|
1785
|
+
top: pos.top + pos.height
|
1786
|
+
, left: pos.left
|
1787
|
+
})
|
1788
|
+
.show()
|
1676
1789
|
|
1677
|
-
this.$menu.show()
|
1678
1790
|
this.shown = true
|
1679
1791
|
return this
|
1680
1792
|
}
|
@@ -1826,7 +1938,7 @@
|
|
1826
1938
|
}
|
1827
1939
|
|
1828
1940
|
, keydown: function (e) {
|
1829
|
-
this.suppressKeyPressRepeat =
|
1941
|
+
this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40,38,9,13,27])
|
1830
1942
|
this.move(e)
|
1831
1943
|
}
|
1832
1944
|
|
@@ -1885,6 +1997,8 @@
|
|
1885
1997
|
/* TYPEAHEAD PLUGIN DEFINITION
|
1886
1998
|
* =========================== */
|
1887
1999
|
|
2000
|
+
var old = $.fn.typeahead
|
2001
|
+
|
1888
2002
|
$.fn.typeahead = function (option) {
|
1889
2003
|
return this.each(function () {
|
1890
2004
|
var $this = $(this)
|
@@ -1906,7 +2020,16 @@
|
|
1906
2020
|
$.fn.typeahead.Constructor = Typeahead
|
1907
2021
|
|
1908
2022
|
|
1909
|
-
/*
|
2023
|
+
/* TYPEAHEAD NO CONFLICT
|
2024
|
+
* =================== */
|
2025
|
+
|
2026
|
+
$.fn.typeahead.noConflict = function () {
|
2027
|
+
$.fn.typeahead = old
|
2028
|
+
return this
|
2029
|
+
}
|
2030
|
+
|
2031
|
+
|
2032
|
+
/* TYPEAHEAD DATA-API
|
1910
2033
|
* ================== */
|
1911
2034
|
|
1912
2035
|
$(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
|
@@ -1918,7 +2041,7 @@
|
|
1918
2041
|
|
1919
2042
|
}(window.jQuery);
|
1920
2043
|
/* ==========================================================
|
1921
|
-
* bootstrap-affix.js v2.2.
|
2044
|
+
* bootstrap-affix.js v2.2.2
|
1922
2045
|
* http://twitter.github.com/bootstrap/javascript.html#affix
|
1923
2046
|
* ==========================================================
|
1924
2047
|
* Copyright 2012 Twitter, Inc.
|
@@ -1987,6 +2110,8 @@
|
|
1987
2110
|
/* AFFIX PLUGIN DEFINITION
|
1988
2111
|
* ======================= */
|
1989
2112
|
|
2113
|
+
var old = $.fn.affix
|
2114
|
+
|
1990
2115
|
$.fn.affix = function (option) {
|
1991
2116
|
return this.each(function () {
|
1992
2117
|
var $this = $(this)
|
@@ -2004,6 +2129,15 @@
|
|
2004
2129
|
}
|
2005
2130
|
|
2006
2131
|
|
2132
|
+
/* AFFIX NO CONFLICT
|
2133
|
+
* ================= */
|
2134
|
+
|
2135
|
+
$.fn.affix.noConflict = function () {
|
2136
|
+
$.fn.affix = old
|
2137
|
+
return this
|
2138
|
+
}
|
2139
|
+
|
2140
|
+
|
2007
2141
|
/* AFFIX DATA-API
|
2008
2142
|
* ============== */
|
2009
2143
|
|