summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/js
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2013-01-30 03:34:51 +0100
committerArthur Schiwon <blizzz@owncloud.com>2013-01-30 03:34:51 +0100
commit14bc6f8c6c87bbb16529d2e52208ddab9c56fde6 (patch)
treebed6600776ff0600aaae61890e905e6985b95ea3 /apps/user_ldap/js
parent19867b1d0881d0ee427f889e2fb7ec72caf73090 (diff)
downloadnextcloud-server-14bc6f8c6c87bbb16529d2e52208ddab9c56fde6.tar.gz
nextcloud-server-14bc6f8c6c87bbb16529d2e52208ddab9c56fde6.zip
LDAP: working visual feedback on save. Save button will be highlighted green or red.
Diffstat (limited to 'apps/user_ldap/js')
-rw-r--r--apps/user_ldap/js/settings.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/apps/user_ldap/js/settings.js b/apps/user_ldap/js/settings.js
index d1b1b715a57..166761bc1ff 100644
--- a/apps/user_ldap/js/settings.js
+++ b/apps/user_ldap/js/settings.js
@@ -104,6 +104,7 @@ var LdapConfiguration = {
$(document).ready(function() {
$('#ldapSettings').tabs();
+ $('#ldap_submit').button();
$('#ldap_action_test_connection').button();
$('#ldap_action_delete_configuration').button();
LdapConfiguration.refreshConfig();
@@ -147,9 +148,18 @@ $(document).ready(function() {
OC.filePath('user_ldap','ajax','setConfiguration.php'),
$('#ldap').serialize(),
function (result) {
+ bgcolor = $('#ldap_submit').css('background');
if (result.status == 'success') {
- $('#notification').text(t('user_ldap', 'LDAP Configuration Saved'));
- $('#notification').fadeIn();
+ //the dealing with colors is a but ugly, but the jQuery version in use has issues with rgba colors
+ $('#ldap_submit').css('background', '#fff');
+ $('#ldap_submit').effect('highlight', {'color':'#A8FA87'}, 5000, function() {
+ $('#ldap_submit').css('background', bgcolor);
+ });
+ } else {
+ $('#ldap_submit').css('background', '#fff');
+ $('#ldap_submit').effect('highlight', {'color':'#E97'}, 5000, function() {
+ $('#ldap_submit').css('background', bgcolor);
+ });
}
}
);