diff options
author | Bart Visscher <bartv@thisnet.nl> | 2011-09-11 19:20:23 +0400 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2011-09-11 22:38:52 +0400 |
commit | cd44dff5afc4fcaeaf905bd6da581077fb088c35 (patch) | |
tree | 07a8e2b70a0310c579dc88c374dc01cfa712a538 /settings/js/personal.js | |
parent | 3234597703f89617b2810444f29890fad0581225 (diff) |
Better feedback for saving calendar and openid settings
Diffstat (limited to 'settings/js/personal.js')
-rw-r--r-- | settings/js/personal.js | 30 |
1 files changed, 22 insertions, 8 deletions
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'); + } + } +} |