Possibility to preselect choice tab (#2115)
This commit is contained in:
parent
465b848913
commit
9620e6870a
|
@ -413,6 +413,7 @@ sub display {
|
||||||
AUTH_LOOP => $authLoop,
|
AUTH_LOOP => $authLoop,
|
||||||
CHOICE_PARAM => $self->conf->{authChoiceParam},
|
CHOICE_PARAM => $self->conf->{authChoiceParam},
|
||||||
CHOICE_VALUE => $req->data->{_authChoice},
|
CHOICE_VALUE => $req->data->{_authChoice},
|
||||||
|
DISPLAY_TAB => scalar( $req->param("tab") ),
|
||||||
DISPLAY_FORM => 0,
|
DISPLAY_FORM => 0,
|
||||||
DISPLAY_OPENID_FORM => 0,
|
DISPLAY_OPENID_FORM => 0,
|
||||||
DISPLAY_YUBIKEY_FORM => 0,
|
DISPLAY_YUBIKEY_FORM => 0,
|
||||||
|
|
|
@ -256,6 +256,9 @@ $(window).on 'load', () ->
|
||||||
# Authentication choice tabs
|
# Authentication choice tabs
|
||||||
authMenuTabs = $("#authMenu").tabs
|
authMenuTabs = $("#authMenu").tabs
|
||||||
active: 0
|
active: 0
|
||||||
|
authMenuIndex = $('#authMenu a[href="#' + datas['displaytab'] + '"]').parent().index()
|
||||||
|
authMenuIndex = 0 if authMenuIndex < 0
|
||||||
|
authMenuTabs.tabs "option", "active", authMenuIndex
|
||||||
|
|
||||||
# TODO: cookie
|
# TODO: cookie
|
||||||
# $("#authMenu").tabs
|
# $("#authMenu").tabs
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// Generated by CoffeeScript 1.12.7
|
// Generated by CoffeeScript 1.12.8
|
||||||
|
|
||||||
/*
|
/*
|
||||||
LemonLDAP::NG Portal jQuery scripts
|
LemonLDAP::NG Portal jQuery scripts
|
||||||
|
@ -223,7 +223,7 @@ LemonLDAP::NG Portal jQuery scripts
|
||||||
datas = {};
|
datas = {};
|
||||||
|
|
||||||
$(window).on('load', function() {
|
$(window).on('load', function() {
|
||||||
var action, al, authMenuTabs, back_url, i, l, lang, langdiv, langs, langs2, len, len1, len2, len3, link, m, menuIndex, menuTabs, method, n, nl, nlangs, re, ref, ref1, ref2;
|
var action, al, authMenuIndex, authMenuTabs, back_url, i, l, lang, langdiv, langs, langs2, len, len1, len2, len3, link, m, menuIndex, menuTabs, method, n, nl, nlangs, re, ref, ref1, ref2;
|
||||||
datas = getValues();
|
datas = getValues();
|
||||||
window.datas = datas;
|
window.datas = datas;
|
||||||
$("#appslist").sortable({
|
$("#appslist").sortable({
|
||||||
|
@ -250,6 +250,11 @@ LemonLDAP::NG Portal jQuery scripts
|
||||||
authMenuTabs = $("#authMenu").tabs({
|
authMenuTabs = $("#authMenu").tabs({
|
||||||
active: 0
|
active: 0
|
||||||
});
|
});
|
||||||
|
authMenuIndex = $('#authMenu a[href="#' + datas['displaytab'] + '"]').parent().index();
|
||||||
|
if (authMenuIndex < 0) {
|
||||||
|
authMenuIndex = 0;
|
||||||
|
}
|
||||||
|
authMenuTabs.tabs("option", "active", authMenuIndex);
|
||||||
if (datas['choicetab']) {
|
if (datas['choicetab']) {
|
||||||
authMenuTabs.tabs("option", "active", $('#authMenu a[href="#' + datas['choicetab'] + '"]').parent().index());
|
authMenuTabs.tabs("option", "active", $('#authMenu a[href="#' + datas['choicetab'] + '"]').parent().index());
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user