diff options
author | kondou <kondou@ts.unde.re> | 2014-03-12 15:29:26 +0100 |
---|---|---|
committer | kondou <kondou@ts.unde.re> | 2014-03-12 15:29:26 +0100 |
commit | 1c82b4751ecb69ed1f0973b3cde0a255daaf9747 (patch) | |
tree | cc119884b60578201989135dede0fb73622f07bd /settings/js | |
parent | 3c11dc0006d5a3722b37bed274d8d19be219b6b2 (diff) | |
parent | ce790119aea4a1cec2e8d8e8b493fec00b87693f (diff) | |
download | nextcloud-server-1c82b4751ecb69ed1f0973b3cde0a255daaf9747.tar.gz nextcloud-server-1c82b4751ecb69ed1f0973b3cde0a255daaf9747.zip |
Merge branch 'master' into hide_remove_image_avatar
Diffstat (limited to 'settings/js')
-rw-r--r-- | settings/js/admin.js | 12 | ||||
-rw-r--r-- | settings/js/personal.js | 10 | ||||
-rw-r--r-- | settings/js/users.js | 9 |
3 files changed, 19 insertions, 12 deletions
diff --git a/settings/js/admin.js b/settings/js/admin.js index 5ea6a5af2df..c04c0505deb 100644 --- a/settings/js/admin.js +++ b/settings/js/admin.js @@ -62,10 +62,18 @@ $(document).ready(function(){ }); $('#mail_settings').change(function(){ - OC.msg.startSaving('#mail_settings .msg'); + OC.msg.startSaving('#mail_settings_msg'); var post = $( "#mail_settings" ).serialize(); - $.post(OC.Router.generate('settings_mail_settings'), post, function(data){ + $.post(OC.generateUrl('/settings/admin/mailsettings'), post, function(data){ OC.msg.finishedSaving('#mail_settings .msg', data); }); }); + + $('#sendtestemail').click(function(){ + OC.msg.startAction('#sendtestmail_msg', t('settings', 'Sending...')); + var post = $( "#sendtestemail" ).serialize(); + $.post(OC.generateUrl('/settings/admin/mailtest'), post, function(data){ + OC.msg.finishedAction('#sendtestmail_msg', data); + }); + }); }); diff --git a/settings/js/personal.js b/settings/js/personal.js index f38ec4e9ab1..26c50f8fa5d 100644 --- a/settings/js/personal.js +++ b/settings/js/personal.js @@ -69,7 +69,7 @@ function showAvatarCropper() { $cropper.prepend("<img>"); $cropperImage = $('#cropper img'); - $cropperImage.attr('src', OC.Router.generate('core_avatar_get_tmp')+'?requesttoken='+oc_requesttoken+'#'+Math.floor(Math.random()*1000)); + $cropperImage.attr('src', OC.generateUrl('/avatar/tmp')+'?requesttoken='+oc_requesttoken+'#'+Math.floor(Math.random()*1000)); // Looks weird, but on('load', ...) doesn't work in IE8 $cropperImage.ready(function(){ @@ -97,7 +97,7 @@ function sendCropData() { w: cropperdata.w, h: cropperdata.h }; - $.post(OC.Router.generate('core_avatar_post_cropped'), {crop: data}, avatarResponseHandler); + $.post(OC.generateUrl('/avatar/cropped'), {crop: data}, avatarResponseHandler); } function saveCoords(c) { @@ -134,7 +134,7 @@ $(document).ready(function(){ $('#passwordchanged').hide(); $('#passworderror').hide(); // Ajax foo - $.post(OC.Router.generate('settings_personal_changepassword'), post, function(data){ + $.post(OC.generateUrl('/settings/personal/changepassword'), post, function(data){ if( data.status === "success" ){ $('#pass1').val(''); $('#pass2').val(''); @@ -245,7 +245,7 @@ $(document).ready(function(){ OC.dialogs.filepicker( t('settings', "Select a profile picture"), function(path){ - $.post(OC.Router.generate('core_avatar_post'), {path: path}, avatarResponseHandler); + $.post(OC.generateUrl('/avatar/'), {path: path}, avatarResponseHandler); }, false, ["image/png", "image/jpeg"] @@ -255,7 +255,7 @@ $(document).ready(function(){ $('#removeavatar').click(function(){ $.ajax({ type: 'DELETE', - url: OC.Router.generate('core_avatar_delete'), + url: OC.generateUrl('/avatar/'), success: function(msg) { updateAvatar(true); $('#removeavatar').addClass('hidden'); diff --git a/settings/js/users.js b/settings/js/users.js index 160d0a8d9d2..284976d3bad 100644 --- a/settings/js/users.js +++ b/settings/js/users.js @@ -225,7 +225,8 @@ var UserList = { } $('table+.loading').css('visibility', 'visible'); UserList.updating = true; - $.get(OC.Router.generate('settings_ajax_userlist', { offset: UserList.offset, limit: UserList.usersToLoad }), function (result) { + var query = $.param({ offset: UserList.offset, limit: UserList.usersToLoad }); + $.get(OC.generateUrl('/settings/ajax/userlist') + query, function (result) { var loadedUsers = 0; var trs = []; if (result.status === 'success') { @@ -371,9 +372,7 @@ $(document).ready(function () { UserList.doSort(); UserList.availableGroups = $('#content table').data('groups'); - OC.Router.registerLoadedCallback(function() { - $(window).scroll(function(e) {UserList._onScroll(e);}); - }); + $(window).scroll(function(e) {UserList._onScroll(e);}); $('table').after($('<div class="loading" style="height: 200px; visibility: hidden;"></div>')); $('select[multiple]').each(function (index, element) { @@ -401,7 +400,7 @@ $(document).ready(function () { if ($(this).val().length > 0) { var recoveryPasswordVal = $('input:password[id="recoveryPassword"]').val(); $.post( - OC.Router.generate('settings_users_changepassword'), + OC.generateUrl('/settings/users/changepassword'), {username: uid, password: $(this).val(), recoveryPassword: recoveryPasswordVal}, function (result) { if (result.status != 'success') { |