Revision aee236a3
Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt
js/common.js | ||
---|---|---|
150 | 150 |
} |
151 | 151 |
|
152 | 152 |
$(document).ready(function () { |
153 |
// initialize all jQuery UI tab elements: |
|
154 |
$(".tabwidget").each(function(idx, element) { |
|
155 |
var $element = $(element); |
|
156 |
var tabsParams = {}; |
|
157 |
|
|
158 |
var elementId = $element.attr('id'); |
|
159 |
if( elementId ) { |
|
160 |
var cookieName = 'jquery_ui_tab_'+ elementId; |
|
161 |
|
|
162 |
tabsParams.active = $.cookie(cookieName); |
|
163 |
tabsParams.activate = function(event, ui) { |
|
164 |
var i = ui.newTab.parent().children().index(ui.newTab); |
|
165 |
$.cookie(cookieName, i); |
|
166 |
}; |
|
167 |
} |
|
168 |
|
|
169 |
$element.tabs(tabsParams); |
|
170 |
}); |
|
171 |
|
|
172 | 153 |
$('input').focus(function(){ |
173 | 154 |
if (focussable(this)) window.focused_element = this; |
174 | 155 |
}); |
Auch abrufbar als: Unified diff
Refactor: init_tabwidgets() in kivi-Namespace verschoben