diff options
author | Bart Visscher <bartv@thisnet.nl> | 2011-09-11 17:20:23 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2011-09-11 20:38:52 +0200 |
commit | cd44dff5afc4fcaeaf905bd6da581077fb088c35 (patch) | |
tree | 07a8e2b70a0310c579dc88c374dc01cfa712a538 /settings | |
parent | 3234597703f89617b2810444f29890fad0581225 (diff) | |
download | nextcloud-server-cd44dff5afc4fcaeaf905bd6da581077fb088c35.tar.gz nextcloud-server-cd44dff5afc4fcaeaf905bd6da581077fb088c35.zip |
Better feedback for saving calendar and openid settings
Diffstat (limited to 'settings')
-rw-r--r-- | settings/css/settings.css | 3 | ||||
-rw-r--r-- | settings/js/personal.js | 30 |
2 files changed, 25 insertions, 8 deletions
diff --git a/settings/css/settings.css b/settings/css/settings.css index 429e96ddb9a..7cb29e487bc 100644 --- a/settings/css/settings.css +++ b/settings/css/settings.css @@ -5,6 +5,9 @@ input#openid, input#webdav { width:20em; } #passwordchanged { display:none; } input#identity { width:20em; } +.msg.success{ color:#fff; background-color:#0f0; padding:3px; text-shadow:1px 1px #000; } +.msg.error{ color:#fff; background-color:#f00; padding:3px; text-shadow:1px 1px #000; } + /* USERS */ form { display:inline; } diff --git a/settings/js/personal.js b/settings/js/personal.js index 65bb81b0f04..9578fb2c890 100644 --- a/settings/js/personal.js +++ b/settings/js/personal.js @@ -48,12 +48,26 @@ $(document).ready(function(){ }); return false; }); - - // reset value when edited, workaround because of .select() not working with disabled inputs - $('#webdav').focus(function(event){ - openidValue = $('#webdav').val(); - }); - $('#webdav').blur(function(event){ - $('#webdav').val(openidValue); - }); } ); + +OC.msg={ + startSaving:function(selector){ + $(selector) + .html( t('settings', 'Saving...') ) + .removeClass('success') + .removeClass('error') + .stop(true, true) + .show(); + }, + finishedSaving:function(selector, data){ + if( data.status == "success" ){ + $(selector).html( data.data.message ) + .addClass('success') + .stop(true, true) + .delay(3000) + .fadeOut(600); + }else{ + $(selector).html( data.data.message ).addClass('error'); + } + } +} |