docs-panacea-jekyll-theme 0.1.1 → 0.1.3
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.
- checksums.yaml +4 -4
- data/LICENSE.txt +21 -0
- data/README.md +47 -0
- data/_layouts/default.html +100 -0
- data/assets/.DS_Store +0 -0
- data/assets/css/asciidoctor.css +398 -0
- data/assets/css/coderay.css +90 -0
- data/assets/css/font-awesome.css +1801 -0
- data/assets/css/font-awesome.min.css +4 -0
- data/assets/css/foundation.css +8545 -0
- data/assets/css/foundation.min.css +8331 -0
- data/assets/css/normalize.css +427 -0
- data/assets/images/header-page.png +0 -0
- data/assets/images/logo-panacea.svg +147 -0
- data/assets/js/foundation.min.js +6069 -0
- data/assets/js/foundation/foundation.abide.js +325 -0
- data/assets/js/foundation/foundation.accordion.js +71 -0
- data/assets/js/foundation/foundation.alert.js +46 -0
- data/assets/js/foundation/foundation.clearing.js +573 -0
- data/assets/js/foundation/foundation.dropdown.js +444 -0
- data/assets/js/foundation/foundation.equalizer.js +77 -0
- data/assets/js/foundation/foundation.interchange.js +349 -0
- data/assets/js/foundation/foundation.joyride.js +939 -0
- data/assets/js/foundation/foundation.js +691 -0
- data/assets/js/foundation/foundation.magellan.js +199 -0
- data/assets/js/foundation/foundation.offcanvas.js +154 -0
- data/assets/js/foundation/foundation.orbit.js +512 -0
- data/assets/js/foundation/foundation.reveal.js +455 -0
- data/assets/js/foundation/foundation.slider.js +268 -0
- data/assets/js/foundation/foundation.tab.js +221 -0
- data/assets/js/foundation/foundation.tooltip.js +301 -0
- data/assets/js/foundation/foundation.topbar.js +444 -0
- data/assets/js/toc.js +82 -0
- data/assets/js/vendor/fastclick.js +169 -0
- data/assets/js/vendor/jquery.cookie.js +57 -0
- data/assets/js/vendor/jquery.js +2339 -0
- data/assets/js/vendor/modernizr.js +304 -0
- data/assets/js/vendor/placeholder.js +75 -0
- metadata +39 -2
@@ -0,0 +1,268 @@
|
|
1
|
+
;
|
2
|
+
(function ($, window, document, undefined) {
|
3
|
+
'use strict';
|
4
|
+
|
5
|
+
Foundation.libs.slider = {
|
6
|
+
name: 'slider',
|
7
|
+
|
8
|
+
version: '5.5.0',
|
9
|
+
|
10
|
+
settings: {
|
11
|
+
start: 0,
|
12
|
+
end: 100,
|
13
|
+
step: 1,
|
14
|
+
precision: null,
|
15
|
+
initial: null,
|
16
|
+
display_selector: '',
|
17
|
+
vertical: false,
|
18
|
+
trigger_input_change: false,
|
19
|
+
on_change: function () {
|
20
|
+
}
|
21
|
+
},
|
22
|
+
|
23
|
+
cache: {},
|
24
|
+
|
25
|
+
init: function (scope, method, options) {
|
26
|
+
Foundation.inherit(this, 'throttle');
|
27
|
+
this.bindings(method, options);
|
28
|
+
this.reflow();
|
29
|
+
},
|
30
|
+
|
31
|
+
events: function () {
|
32
|
+
var self = this;
|
33
|
+
|
34
|
+
$(this.scope)
|
35
|
+
.off('.slider')
|
36
|
+
.on('mousedown.fndtn.slider touchstart.fndtn.slider pointerdown.fndtn.slider',
|
37
|
+
'[' + self.attr_name() + ']:not(.disabled, [disabled]) .range-slider-handle', function (e) {
|
38
|
+
if (!self.cache.active) {
|
39
|
+
e.preventDefault();
|
40
|
+
self.set_active_slider($(e.target));
|
41
|
+
}
|
42
|
+
})
|
43
|
+
.on('mousemove.fndtn.slider touchmove.fndtn.slider pointermove.fndtn.slider', function (e) {
|
44
|
+
if (!!self.cache.active) {
|
45
|
+
e.preventDefault();
|
46
|
+
if ($.data(self.cache.active[0], 'settings').vertical) {
|
47
|
+
var scroll_offset = 0;
|
48
|
+
if (!e.pageY) {
|
49
|
+
scroll_offset = window.scrollY;
|
50
|
+
}
|
51
|
+
self.calculate_position(self.cache.active, self.get_cursor_position(e, 'y') + scroll_offset);
|
52
|
+
} else {
|
53
|
+
self.calculate_position(self.cache.active, self.get_cursor_position(e, 'x'));
|
54
|
+
}
|
55
|
+
}
|
56
|
+
})
|
57
|
+
.on('mouseup.fndtn.slider touchend.fndtn.slider pointerup.fndtn.slider', function (e) {
|
58
|
+
self.remove_active_slider();
|
59
|
+
})
|
60
|
+
.on('change.fndtn.slider', function (e) {
|
61
|
+
self.settings.on_change();
|
62
|
+
});
|
63
|
+
|
64
|
+
self.S(window)
|
65
|
+
.on('resize.fndtn.slider', self.throttle(function (e) {
|
66
|
+
self.reflow();
|
67
|
+
}, 300));
|
68
|
+
},
|
69
|
+
|
70
|
+
get_cursor_position: function (e, xy) {
|
71
|
+
var pageXY = 'page' + xy.toUpperCase(),
|
72
|
+
clientXY = 'client' + xy.toUpperCase(),
|
73
|
+
position;
|
74
|
+
|
75
|
+
if (typeof e[pageXY] !== 'undefined') {
|
76
|
+
position = e[pageXY];
|
77
|
+
}
|
78
|
+
else if (typeof e.originalEvent[clientXY] !== 'undefined') {
|
79
|
+
position = e.originalEvent[clientXY];
|
80
|
+
}
|
81
|
+
else if (e.originalEvent.touches && e.originalEvent.touches[0] && typeof e.originalEvent.touches[0][clientXY] !== 'undefined') {
|
82
|
+
position = e.originalEvent.touches[0][clientXY];
|
83
|
+
}
|
84
|
+
else if (e.currentPoint && typeof e.currentPoint[xy] !== 'undefined') {
|
85
|
+
position = e.currentPoint[xy];
|
86
|
+
}
|
87
|
+
return position;
|
88
|
+
},
|
89
|
+
|
90
|
+
set_active_slider: function ($handle) {
|
91
|
+
this.cache.active = $handle;
|
92
|
+
},
|
93
|
+
|
94
|
+
remove_active_slider: function () {
|
95
|
+
this.cache.active = null;
|
96
|
+
},
|
97
|
+
|
98
|
+
calculate_position: function ($handle, cursor_x) {
|
99
|
+
var self = this,
|
100
|
+
settings = $.data($handle[0], 'settings'),
|
101
|
+
handle_l = $.data($handle[0], 'handle_l'),
|
102
|
+
handle_o = $.data($handle[0], 'handle_o'),
|
103
|
+
bar_l = $.data($handle[0], 'bar_l'),
|
104
|
+
bar_o = $.data($handle[0], 'bar_o');
|
105
|
+
|
106
|
+
requestAnimationFrame(function () {
|
107
|
+
var pct;
|
108
|
+
|
109
|
+
if (Foundation.rtl && !settings.vertical) {
|
110
|
+
pct = self.limit_to(((bar_o + bar_l - cursor_x) / bar_l), 0, 1);
|
111
|
+
} else {
|
112
|
+
pct = self.limit_to(((cursor_x - bar_o) / bar_l), 0, 1);
|
113
|
+
}
|
114
|
+
|
115
|
+
pct = settings.vertical ? 1 - pct : pct;
|
116
|
+
|
117
|
+
var norm = self.normalized_value(pct, settings.start, settings.end, settings.step, settings.precision);
|
118
|
+
|
119
|
+
self.set_ui($handle, norm);
|
120
|
+
});
|
121
|
+
},
|
122
|
+
|
123
|
+
set_ui: function ($handle, value) {
|
124
|
+
var settings = $.data($handle[0], 'settings'),
|
125
|
+
handle_l = $.data($handle[0], 'handle_l'),
|
126
|
+
bar_l = $.data($handle[0], 'bar_l'),
|
127
|
+
norm_pct = this.normalized_percentage(value, settings.start, settings.end),
|
128
|
+
handle_offset = norm_pct * (bar_l - handle_l) - 1,
|
129
|
+
progress_bar_length = norm_pct * 100,
|
130
|
+
$handle_parent = $handle.parent(),
|
131
|
+
$hidden_inputs = $handle.parent().children('input[type=hidden]');
|
132
|
+
|
133
|
+
if (Foundation.rtl && !settings.vertical) {
|
134
|
+
handle_offset = -handle_offset;
|
135
|
+
}
|
136
|
+
|
137
|
+
handle_offset = settings.vertical ? -handle_offset + bar_l - handle_l + 1 : handle_offset;
|
138
|
+
this.set_translate($handle, handle_offset, settings.vertical);
|
139
|
+
|
140
|
+
if (settings.vertical) {
|
141
|
+
$handle.siblings('.range-slider-active-segment').css('height', progress_bar_length + '%');
|
142
|
+
} else {
|
143
|
+
$handle.siblings('.range-slider-active-segment').css('width', progress_bar_length + '%');
|
144
|
+
}
|
145
|
+
|
146
|
+
$handle_parent.attr(this.attr_name(), value).trigger('change').trigger('change.fndtn.slider');
|
147
|
+
|
148
|
+
$hidden_inputs.val(value);
|
149
|
+
if (settings.trigger_input_change) {
|
150
|
+
$hidden_inputs.trigger('change');
|
151
|
+
}
|
152
|
+
|
153
|
+
if (!$handle[0].hasAttribute('aria-valuemin')) {
|
154
|
+
$handle.attr({
|
155
|
+
'aria-valuemin': settings.start,
|
156
|
+
'aria-valuemax': settings.end
|
157
|
+
});
|
158
|
+
}
|
159
|
+
$handle.attr('aria-valuenow', value);
|
160
|
+
|
161
|
+
if (settings.display_selector != '') {
|
162
|
+
$(settings.display_selector).each(function () {
|
163
|
+
if (this.hasOwnProperty('value')) {
|
164
|
+
$(this).val(value);
|
165
|
+
} else {
|
166
|
+
$(this).text(value);
|
167
|
+
}
|
168
|
+
});
|
169
|
+
}
|
170
|
+
|
171
|
+
},
|
172
|
+
|
173
|
+
normalized_percentage: function (val, start, end) {
|
174
|
+
return Math.min(1, (val - start) / (end - start));
|
175
|
+
},
|
176
|
+
|
177
|
+
normalized_value: function (val, start, end, step, precision) {
|
178
|
+
var range = end - start,
|
179
|
+
point = val * range,
|
180
|
+
mod = (point - (point % step)) / step,
|
181
|
+
rem = point % step,
|
182
|
+
round = ( rem >= step * 0.5 ? step : 0);
|
183
|
+
return ((mod * step + round) + start).toFixed(precision);
|
184
|
+
},
|
185
|
+
|
186
|
+
set_translate: function (ele, offset, vertical) {
|
187
|
+
if (vertical) {
|
188
|
+
$(ele)
|
189
|
+
.css('-webkit-transform', 'translateY(' + offset + 'px)')
|
190
|
+
.css('-moz-transform', 'translateY(' + offset + 'px)')
|
191
|
+
.css('-ms-transform', 'translateY(' + offset + 'px)')
|
192
|
+
.css('-o-transform', 'translateY(' + offset + 'px)')
|
193
|
+
.css('transform', 'translateY(' + offset + 'px)');
|
194
|
+
} else {
|
195
|
+
$(ele)
|
196
|
+
.css('-webkit-transform', 'translateX(' + offset + 'px)')
|
197
|
+
.css('-moz-transform', 'translateX(' + offset + 'px)')
|
198
|
+
.css('-ms-transform', 'translateX(' + offset + 'px)')
|
199
|
+
.css('-o-transform', 'translateX(' + offset + 'px)')
|
200
|
+
.css('transform', 'translateX(' + offset + 'px)');
|
201
|
+
}
|
202
|
+
},
|
203
|
+
|
204
|
+
limit_to: function (val, min, max) {
|
205
|
+
return Math.min(Math.max(val, min), max);
|
206
|
+
},
|
207
|
+
|
208
|
+
|
209
|
+
initialize_settings: function (handle) {
|
210
|
+
var settings = $.extend({}, this.settings, this.data_options($(handle).parent())),
|
211
|
+
decimal_places_match_result;
|
212
|
+
|
213
|
+
if (settings.precision === null) {
|
214
|
+
decimal_places_match_result = ('' + settings.step).match(/\.([\d]*)/);
|
215
|
+
settings.precision = decimal_places_match_result && decimal_places_match_result[1] ? decimal_places_match_result[1].length : 0;
|
216
|
+
}
|
217
|
+
|
218
|
+
if (settings.vertical) {
|
219
|
+
$.data(handle, 'bar_o', $(handle).parent().offset().top);
|
220
|
+
$.data(handle, 'bar_l', $(handle).parent().outerHeight());
|
221
|
+
$.data(handle, 'handle_o', $(handle).offset().top);
|
222
|
+
$.data(handle, 'handle_l', $(handle).outerHeight());
|
223
|
+
} else {
|
224
|
+
$.data(handle, 'bar_o', $(handle).parent().offset().left);
|
225
|
+
$.data(handle, 'bar_l', $(handle).parent().outerWidth());
|
226
|
+
$.data(handle, 'handle_o', $(handle).offset().left);
|
227
|
+
$.data(handle, 'handle_l', $(handle).outerWidth());
|
228
|
+
}
|
229
|
+
|
230
|
+
$.data(handle, 'bar', $(handle).parent());
|
231
|
+
$.data(handle, 'settings', settings);
|
232
|
+
},
|
233
|
+
|
234
|
+
set_initial_position: function ($ele) {
|
235
|
+
var settings = $.data($ele.children('.range-slider-handle')[0], 'settings'),
|
236
|
+
initial = ((typeof settings.initial == 'number' && !isNaN(settings.initial)) ? settings.initial : Math.floor((settings.end - settings.start) * 0.5 / settings.step) * settings.step + settings.start),
|
237
|
+
$handle = $ele.children('.range-slider-handle');
|
238
|
+
this.set_ui($handle, initial);
|
239
|
+
},
|
240
|
+
|
241
|
+
set_value: function (value) {
|
242
|
+
var self = this;
|
243
|
+
$('[' + self.attr_name() + ']', this.scope).each(function () {
|
244
|
+
$(this).attr(self.attr_name(), value);
|
245
|
+
});
|
246
|
+
if (!!$(this.scope).attr(self.attr_name())) {
|
247
|
+
$(this.scope).attr(self.attr_name(), value);
|
248
|
+
}
|
249
|
+
self.reflow();
|
250
|
+
},
|
251
|
+
|
252
|
+
reflow: function () {
|
253
|
+
var self = this;
|
254
|
+
self.S('[' + this.attr_name() + ']').each(function () {
|
255
|
+
var handle = $(this).children('.range-slider-handle')[0],
|
256
|
+
val = $(this).attr(self.attr_name());
|
257
|
+
self.initialize_settings(handle);
|
258
|
+
|
259
|
+
if (val) {
|
260
|
+
self.set_ui($(handle), parseFloat(val));
|
261
|
+
} else {
|
262
|
+
self.set_initial_position($(this));
|
263
|
+
}
|
264
|
+
});
|
265
|
+
}
|
266
|
+
};
|
267
|
+
|
268
|
+
}(jQuery, window, window.document));
|
@@ -0,0 +1,221 @@
|
|
1
|
+
;
|
2
|
+
(function ($, window, document, undefined) {
|
3
|
+
'use strict';
|
4
|
+
|
5
|
+
Foundation.libs.tab = {
|
6
|
+
name: 'tab',
|
7
|
+
|
8
|
+
version: '5.5.0',
|
9
|
+
|
10
|
+
settings: {
|
11
|
+
active_class: 'active',
|
12
|
+
callback: function () {
|
13
|
+
},
|
14
|
+
deep_linking: false,
|
15
|
+
scroll_to_content: true,
|
16
|
+
is_hover: false
|
17
|
+
},
|
18
|
+
|
19
|
+
default_tab_hashes: [],
|
20
|
+
|
21
|
+
init: function (scope, method, options) {
|
22
|
+
var self = this,
|
23
|
+
S = this.S;
|
24
|
+
|
25
|
+
this.bindings(method, options);
|
26
|
+
this.handle_location_hash_change();
|
27
|
+
|
28
|
+
// Store the default active tabs which will be referenced when the
|
29
|
+
// location hash is absent, as in the case of navigating the tabs and
|
30
|
+
// returning to the first viewing via the browser Back button.
|
31
|
+
S('[' + this.attr_name() + '] > .active > a', this.scope).each(function () {
|
32
|
+
self.default_tab_hashes.push(this.hash);
|
33
|
+
});
|
34
|
+
},
|
35
|
+
|
36
|
+
events: function () {
|
37
|
+
var self = this,
|
38
|
+
S = this.S;
|
39
|
+
|
40
|
+
var usual_tab_behavior = function (e) {
|
41
|
+
var settings = S(this).closest('[' + self.attr_name() + ']').data(self.attr_name(true) + '-init');
|
42
|
+
if (!settings.is_hover || Modernizr.touch) {
|
43
|
+
e.preventDefault();
|
44
|
+
e.stopPropagation();
|
45
|
+
self.toggle_active_tab(S(this).parent());
|
46
|
+
}
|
47
|
+
};
|
48
|
+
|
49
|
+
S(this.scope)
|
50
|
+
.off('.tab')
|
51
|
+
// Click event: tab title
|
52
|
+
.on('focus.fndtn.tab', '[' + this.attr_name() + '] > * > a', usual_tab_behavior)
|
53
|
+
.on('click.fndtn.tab', '[' + this.attr_name() + '] > * > a', usual_tab_behavior)
|
54
|
+
// Hover event: tab title
|
55
|
+
.on('mouseenter.fndtn.tab', '[' + this.attr_name() + '] > * > a', function (e) {
|
56
|
+
var settings = S(this).closest('[' + self.attr_name() + ']').data(self.attr_name(true) + '-init');
|
57
|
+
if (settings.is_hover) self.toggle_active_tab(S(this).parent());
|
58
|
+
});
|
59
|
+
|
60
|
+
// Location hash change event
|
61
|
+
S(window).on('hashchange.fndtn.tab', function (e) {
|
62
|
+
e.preventDefault();
|
63
|
+
self.handle_location_hash_change();
|
64
|
+
});
|
65
|
+
},
|
66
|
+
|
67
|
+
handle_location_hash_change: function () {
|
68
|
+
|
69
|
+
var self = this,
|
70
|
+
S = this.S;
|
71
|
+
|
72
|
+
S('[' + this.attr_name() + ']', this.scope).each(function () {
|
73
|
+
var settings = S(this).data(self.attr_name(true) + '-init');
|
74
|
+
if (settings.deep_linking) {
|
75
|
+
// Match the location hash to a label
|
76
|
+
var hash;
|
77
|
+
if (settings.scroll_to_content) {
|
78
|
+
hash = self.scope.location.hash;
|
79
|
+
} else {
|
80
|
+
// prefix the hash to prevent anchor scrolling
|
81
|
+
hash = self.scope.location.hash.replace('fndtn-', '');
|
82
|
+
}
|
83
|
+
if (hash != '') {
|
84
|
+
// Check whether the location hash references a tab content div or
|
85
|
+
// another element on the page (inside or outside the tab content div)
|
86
|
+
var hash_element = S(hash);
|
87
|
+
if (hash_element.hasClass('content') && hash_element.parent().hasClass('tabs-content')) {
|
88
|
+
// Tab content div
|
89
|
+
self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=' + hash + ']').parent());
|
90
|
+
} else {
|
91
|
+
// Not the tab content div. If inside the tab content, find the
|
92
|
+
// containing tab and toggle it as active.
|
93
|
+
var hash_tab_container_id = hash_element.closest('.content').attr('id');
|
94
|
+
if (hash_tab_container_id != undefined) {
|
95
|
+
self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=#' + hash_tab_container_id + ']').parent(), hash);
|
96
|
+
}
|
97
|
+
}
|
98
|
+
} else {
|
99
|
+
// Reference the default tab hashes which were initialized in the init function
|
100
|
+
for (var ind = 0; ind < self.default_tab_hashes.length; ind++) {
|
101
|
+
self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=' + self.default_tab_hashes[ind] + ']').parent());
|
102
|
+
}
|
103
|
+
}
|
104
|
+
}
|
105
|
+
});
|
106
|
+
},
|
107
|
+
|
108
|
+
toggle_active_tab: function (tab, location_hash) {
|
109
|
+
var S = this.S,
|
110
|
+
tabs = tab.closest('[' + this.attr_name() + ']'),
|
111
|
+
tab_link = tab.find('a'),
|
112
|
+
anchor = tab.children('a').first(),
|
113
|
+
target_hash = '#' + anchor.attr('href').split('#')[1],
|
114
|
+
target = S(target_hash),
|
115
|
+
siblings = tab.siblings(),
|
116
|
+
settings = tabs.data(this.attr_name(true) + '-init'),
|
117
|
+
interpret_keyup_action = function (e) {
|
118
|
+
// Light modification of Heydon Pickering's Practical ARIA Examples: http://heydonworks.com/practical_aria_examples/js/a11y.js
|
119
|
+
|
120
|
+
// define current, previous and next (possible) tabs
|
121
|
+
|
122
|
+
var $original = $(this);
|
123
|
+
var $prev = $(this).parents('li').prev().children('[role="tab"]');
|
124
|
+
var $next = $(this).parents('li').next().children('[role="tab"]');
|
125
|
+
var $target;
|
126
|
+
|
127
|
+
// find the direction (prev or next)
|
128
|
+
|
129
|
+
switch (e.keyCode) {
|
130
|
+
case 37:
|
131
|
+
$target = $prev;
|
132
|
+
break;
|
133
|
+
case 39:
|
134
|
+
$target = $next;
|
135
|
+
break;
|
136
|
+
default:
|
137
|
+
$target = false
|
138
|
+
break;
|
139
|
+
}
|
140
|
+
|
141
|
+
if ($target.length) {
|
142
|
+
$original.attr({
|
143
|
+
'tabindex': '-1',
|
144
|
+
'aria-selected': null
|
145
|
+
});
|
146
|
+
$target.attr({
|
147
|
+
'tabindex': '0',
|
148
|
+
'aria-selected': true
|
149
|
+
}).focus();
|
150
|
+
}
|
151
|
+
|
152
|
+
// Hide panels
|
153
|
+
|
154
|
+
$('[role="tabpanel"]')
|
155
|
+
.attr('aria-hidden', 'true');
|
156
|
+
|
157
|
+
// Show panel which corresponds to target
|
158
|
+
|
159
|
+
$('#' + $(document.activeElement).attr('href').substring(1))
|
160
|
+
.attr('aria-hidden', null);
|
161
|
+
|
162
|
+
};
|
163
|
+
|
164
|
+
// allow usage of data-tab-content attribute instead of href
|
165
|
+
if (S(this).data(this.data_attr('tab-content'))) {
|
166
|
+
target_hash = '#' + S(this).data(this.data_attr('tab-content')).split('#')[1];
|
167
|
+
target = S(target_hash);
|
168
|
+
}
|
169
|
+
|
170
|
+
if (settings.deep_linking) {
|
171
|
+
|
172
|
+
if (settings.scroll_to_content) {
|
173
|
+
// retain current hash to scroll to content
|
174
|
+
window.location.hash = location_hash || target_hash;
|
175
|
+
if (location_hash == undefined || location_hash == target_hash) {
|
176
|
+
tab.parent()[0].scrollIntoView();
|
177
|
+
} else {
|
178
|
+
S(target_hash)[0].scrollIntoView();
|
179
|
+
}
|
180
|
+
} else {
|
181
|
+
// prefix the hashes so that the browser doesn't scroll down
|
182
|
+
if (location_hash != undefined) {
|
183
|
+
window.location.hash = 'fndtn-' + location_hash.replace('#', '');
|
184
|
+
} else {
|
185
|
+
window.location.hash = 'fndtn-' + target_hash.replace('#', '');
|
186
|
+
}
|
187
|
+
}
|
188
|
+
}
|
189
|
+
|
190
|
+
// WARNING: The activation and deactivation of the tab content must
|
191
|
+
// occur after the deep linking in order to properly refresh the browser
|
192
|
+
// window (notably in Chrome).
|
193
|
+
// Clean up multiple attr instances to done once
|
194
|
+
tab.addClass(settings.active_class).triggerHandler('opened');
|
195
|
+
tab_link.attr({'aria-selected': 'true', tabindex: 0});
|
196
|
+
siblings.removeClass(settings.active_class)
|
197
|
+
siblings.find('a').attr({'aria-selected': 'false', tabindex: -1});
|
198
|
+
target.siblings().removeClass(settings.active_class).attr({'aria-hidden': 'true', tabindex: -1});
|
199
|
+
target.addClass(settings.active_class).attr('aria-hidden', 'false').removeAttr('tabindex');
|
200
|
+
settings.callback(tab);
|
201
|
+
target.triggerHandler('toggled', [tab]);
|
202
|
+
tabs.triggerHandler('toggled', [target]);
|
203
|
+
|
204
|
+
tab_link.off('keydown').on('keydown', interpret_keyup_action);
|
205
|
+
},
|
206
|
+
|
207
|
+
data_attr: function (str) {
|
208
|
+
if (this.namespace.length > 0) {
|
209
|
+
return this.namespace + '-' + str;
|
210
|
+
}
|
211
|
+
|
212
|
+
return str;
|
213
|
+
},
|
214
|
+
|
215
|
+
off: function () {
|
216
|
+
},
|
217
|
+
|
218
|
+
reflow: function () {
|
219
|
+
}
|
220
|
+
};
|
221
|
+
}(jQuery, window, window.document));
|