From: Thomas Heck Date: Tue, 2 Jul 2013 14:30:45 +0000 (+0200) Subject: Geƶffnete Tabs in Cookies speichern + wiederaufrufen X-Git-Tag: release-3.1.0beta1~161^2^2~22 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=d6d93439fa04dfff452e621b7334fc5f9ff8be59;p=kivitendo-erp.git Geƶffnete Tabs in Cookies speichern + wiederaufrufen --- diff --git a/js/common.js b/js/common.js index 71f1d3104..182d47d9b 100644 --- a/js/common.js +++ b/js/common.js @@ -187,7 +187,17 @@ function open_jqm_window(params) { $(document).ready(function () { // initialize all jQuery UI tab elements: - $(".tabwidget").each(function(idx, element) { $(element).tabs(); }); + $(".tabwidget").each(function(idx, element) { + element = $(element); + var cookieName = 'jquery_ui_tab_'+ element.attr('id'); + element.tabs({ + active: $.cookie(cookieName), + activate: function(event, ui) { + var i = ui.newTab.parent().children().index(ui.newTab); + $.cookie(cookieName, i); + }, + }); + }); $('input').focus(function(){ if (focussable(this)) window.focused_element = this; diff --git a/templates/webpages/customer_vendor/form.html b/templates/webpages/customer_vendor/form.html index caef36906..9aed70936 100644 --- a/templates/webpages/customer_vendor/form.html +++ b/templates/webpages/customer_vendor/form.html @@ -13,7 +13,7 @@ [%- INCLUDE 'common/flash.html' %] -
+