diff options
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'); + } + } +} |