Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/user_saml.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-06-30 17:41:12 +0300
committerMorris Jobke <hey@morrisjobke.de>2016-06-30 17:41:12 +0300
commit96708c65628851c784ad5829e1a673a32cfab1e6 (patch)
treeeabce9b5624e21d6c1bbf52dffc6d40e86262f58 /js
parent1abff7050e307755b6c28d26fa5136669a5e57fa (diff)
Replace tab based design with a scrollable design
Diffstat (limited to 'js')
-rw-r--r--js/admin.js33
1 files changed, 32 insertions, 1 deletions
diff --git a/js/admin.js b/js/admin.js
index d10d5bc4..0e561faa 100644
--- a/js/admin.js
+++ b/js/admin.js
@@ -6,7 +6,6 @@ function setSAMLConfigValue(category, setting, value) {
$(function() {
// Enable tabs
- $('#user-saml-settings').tabs();
$('input:checkbox[value="1"]').attr('checked', true);
$('#user-saml-sp input[type="text"], #user-saml-sp textarea').change(function(e) {
@@ -70,4 +69,36 @@ $(function() {
setSAMLConfigValue('security', key, $(this).val());
});
});
+
+ $('#user-saml-settings .toggle').on('click', function() {
+ var el = $(this),
+ nextSibling = el.parent().next(),
+ parentSettingId = el.closest('div').attr('id'),
+ text = '';
+ switch(parentSettingId) {
+ case 'user-saml-security':
+ if (nextSibling.hasClass('hidden')) {
+ text = 'Hide security settings ...';
+ } else {
+ text = 'Show security settings ...';
+ }
+ break;
+ case 'user-saml-idp':
+ if (nextSibling.hasClass('hidden')) {
+ text = 'Hide optional Identity Provider settings ...';
+ } else {
+ text = 'Show optional Identity Provider settings ...';
+ }
+ break;
+ case 'user-saml-sp':
+ if (nextSibling.hasClass('hidden')) {
+ text = 'Hide Service Provider settings ...';
+ } else {
+ text = 'Show Service Provider settings ...';
+ }
+ break;
+ }
+ el.html(t('user_saml', text));
+ nextSibling.toggleClass('hidden');
+ });
});