summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2011-09-11 17:20:23 +0200
committerBart Visscher <bartv@thisnet.nl>2011-09-11 20:38:52 +0200
commitcd44dff5afc4fcaeaf905bd6da581077fb088c35 (patch)
tree07a8e2b70a0310c579dc88c374dc01cfa712a538 /apps
parent3234597703f89617b2810444f29890fad0581225 (diff)
downloadnextcloud-server-cd44dff5afc4fcaeaf905bd6da581077fb088c35.tar.gz
nextcloud-server-cd44dff5afc4fcaeaf905bd6da581077fb088c35.zip
Better feedback for saving calendar and openid settings
Diffstat (limited to 'apps')
-rw-r--r--apps/calendar/js/settings.js8
-rw-r--r--apps/calendar/templates/settings.php2
-rw-r--r--apps/user_openid/js/settings.js14
-rw-r--r--apps/user_openid/templates/settings.php2
4 files changed, 6 insertions, 20 deletions
diff --git a/apps/calendar/js/settings.js b/apps/calendar/js/settings.js
index b2da81b0d0f..90876389858 100644
--- a/apps/calendar/js/settings.js
+++ b/apps/calendar/js/settings.js
@@ -1,14 +1,10 @@
$(document).ready(function(){
$("#timezone").change( function(){
+ OC.msg.startSaving('#calendar .msg')
// Serialize the data
var post = $( "#timezone" ).serialize();
- // Ajax foo
$.post( oc_webroot + '/apps/calendar/ajax/settimezone.php', post, function(data){
- if( data.status == "success" ){
- }
- else{
- $('#timezoneerror').html( data.data.message );
- }
+ OC.msg.finishedSaving('#calendar .msg', data);
});
return false;
});
diff --git a/apps/calendar/templates/settings.php b/apps/calendar/templates/settings.php
index f0863b9cb7f..122f8a9bf93 100644
--- a/apps/calendar/templates/settings.php
+++ b/apps/calendar/templates/settings.php
@@ -31,6 +31,6 @@
echo '<option value="'.$timezone.'"'.($_['timezone'] == $timezone?' selected="selected"':'').'>'.$city.'</option>';
endif;
endforeach;?>
- </select><span id="timezoneerror"></span>
+ </select><span class="msg"></span>
</fieldset>
</form>
diff --git a/apps/user_openid/js/settings.js b/apps/user_openid/js/settings.js
index cfecd7b1cb4..83170e6b844 100644
--- a/apps/user_openid/js/settings.js
+++ b/apps/user_openid/js/settings.js
@@ -1,20 +1,10 @@
$(document).ready(function(){
$('#openidform #identity').blur(function(event){
event.preventDefault();
+ OC.msg.startSaving('#openidform .msg');
var post = $( "#openidform" ).serialize();
$.post( 'ajax/openid.php', post, function(data){
- if( data.status == "success" ){
- }else{
- alert('error while setting OpenID');
- }
+ OC.msg.finishedSaving('#openidform .msg', data);
});
});
-
- // reset value when edited, workaround because of .select() not working with disabled inputs
- $('#openid').focus(function(event){
- openidValue = $('#openid').val();
- });
- $('#openid').blur(function(event){
- $('#openid').val(openidValue);
- });
});
diff --git a/apps/user_openid/templates/settings.php b/apps/user_openid/templates/settings.php
index ffcd10e0b99..7c742030ce3 100644
--- a/apps/user_openid/templates/settings.php
+++ b/apps/user_openid/templates/settings.php
@@ -3,6 +3,6 @@
<strong>OpenID</strong>
<?php echo ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'].OC::$WEBROOT.'/?'; echo OC_User::getUser(); ?><br /><em><?php echo $l->t('you can authenticate to other sites with this address');?></em><br />
<label for="identity"><?php echo $l->t('Authorized OpenID provider');?></label>
- <input type="text" name="identity" id="identity" value="<?php echo $_['identity']; ?>" placeholder="<?php echo $l->t('Your address at Wordpress, Identi.ca, &hellip;');?>" />
+ <input type="text" name="identity" id="identity" value="<?php echo $_['identity']; ?>" placeholder="<?php echo $l->t('Your address at Wordpress, Identi.ca, &hellip;');?>" /><span class="msg"></span>
</fieldset>
</form>