b2da07fe95
Conflicts: apps/files/l10n/bn_BD.php apps/files/l10n/da.php apps/files/l10n/de.php apps/files/l10n/de_DE.php apps/files/l10n/fa.php apps/files/l10n/fi_FI.php apps/files/l10n/hr.php apps/files/l10n/ms_MY.php apps/files/l10n/ro.php apps/files/l10n/si_LK.php apps/files/l10n/sl.php apps/files/l10n/ta_LK.php apps/files_external/l10n/de_DE.php apps/files_external/l10n/et_EE.php apps/user_ldap/l10n/tr.php core/l10n/bg_BG.php l10n/af_ZA/files.po l10n/af_ZA/files_external.po l10n/ar/core.po l10n/ar/files.po l10n/ar/files_external.po l10n/be/files.po l10n/be/files_external.po l10n/bg_BG/core.po l10n/bg_BG/files.po l10n/bg_BG/files_external.po l10n/bg_BG/files_trashbin.po l10n/bg_BG/files_versions.po l10n/bg_BG/settings.po l10n/bn_BD/core.po l10n/bn_BD/files.po l10n/bn_BD/files_external.po l10n/ca/core.po l10n/ca/files.po l10n/ca/files_external.po l10n/cs_CZ/core.po l10n/cs_CZ/files.po l10n/cs_CZ/files_external.po l10n/cs_CZ/lib.po l10n/cy_GB/core.po l10n/cy_GB/files.po l10n/cy_GB/files_external.po l10n/cy_GB/settings.po l10n/da/core.po l10n/da/files.po l10n/da/files_external.po l10n/de/core.po l10n/de/files.po l10n/de/files_external.po l10n/de_DE/core.po l10n/de_DE/files.po l10n/de_DE/files_external.po l10n/el/core.po l10n/el/files.po l10n/el/files_external.po l10n/eo/core.po l10n/eo/files.po l10n/eo/files_external.po l10n/es/core.po l10n/es/files.po l10n/es/files_external.po l10n/es_AR/core.po l10n/es_AR/files.po l10n/es_AR/files_external.po l10n/et_EE/core.po l10n/et_EE/files.po l10n/et_EE/files_external.po l10n/eu/core.po l10n/eu/files.po l10n/eu/files_external.po l10n/fa/core.po l10n/fa/files.po l10n/fa/files_external.po l10n/fi/files.po l10n/fi_FI/core.po l10n/fi_FI/files.po l10n/fi_FI/files_external.po l10n/fr/core.po l10n/fr/files.po l10n/fr/files_external.po l10n/gl/core.po l10n/gl/files.po l10n/gl/files_external.po l10n/he/core.po l10n/he/files.po l10n/he/files_external.po l10n/hi/files.po l10n/hi/files_external.po l10n/hr/core.po l10n/hr/files.po l10n/hr/files_external.po l10n/hu_HU/core.po l10n/hu_HU/files.po l10n/hu_HU/files_external.po l10n/hy/files.po l10n/hy/files_external.po l10n/ia/core.po l10n/ia/files.po l10n/ia/files_external.po l10n/id/core.po l10n/id/files.po l10n/id/files_external.po l10n/is/core.po l10n/is/files.po l10n/is/files_external.po l10n/it/core.po l10n/it/files.po l10n/it/files_external.po l10n/ja_JP/core.po l10n/ja_JP/files.po l10n/ja_JP/files_external.po l10n/ka/files.po l10n/ka/files_external.po l10n/ka_GE/core.po l10n/ka_GE/files.po l10n/ka_GE/files_external.po l10n/kn/files.po l10n/kn/files_external.po l10n/ko/core.po l10n/ko/files.po l10n/ko/files_external.po l10n/ku_IQ/files.po l10n/ku_IQ/files_external.po l10n/lb/core.po l10n/lb/files.po l10n/lb/files_external.po l10n/lt_LT/core.po l10n/lt_LT/files.po l10n/lt_LT/files_external.po l10n/lv/core.po l10n/lv/files.po l10n/lv/files_external.po l10n/mk/core.po l10n/mk/files.po l10n/mk/files_external.po l10n/ms_MY/core.po l10n/ms_MY/files.po l10n/ms_MY/files_external.po l10n/my_MM/files.po l10n/my_MM/files_external.po l10n/nb_NO/core.po l10n/nb_NO/files.po l10n/nb_NO/files_external.po l10n/ne/files.po l10n/ne/files_external.po l10n/nl/core.po l10n/nl/files.po l10n/nl/files_external.po l10n/nn_NO/files.po l10n/nn_NO/files_external.po l10n/oc/core.po l10n/oc/files.po l10n/oc/files_external.po l10n/pl/core.po l10n/pl/files.po l10n/pl/files_external.po l10n/pl_PL/files.po l10n/pt_BR/core.po l10n/pt_BR/files.po l10n/pt_BR/files_external.po l10n/pt_PT/core.po l10n/pt_PT/files.po l10n/pt_PT/files_external.po l10n/ro/core.po l10n/ro/files.po l10n/ro/files_external.po l10n/ru/core.po l10n/ru/files.po l10n/ru/files_external.po l10n/ru_RU/core.po l10n/ru_RU/files.po l10n/si_LK/core.po l10n/si_LK/files.po l10n/si_LK/files_external.po l10n/sk/files.po l10n/sk/files_external.po l10n/sk_SK/core.po l10n/sk_SK/files.po l10n/sk_SK/files_external.po l10n/sl/core.po l10n/sl/files.po l10n/sl/files_external.po l10n/sq/core.po l10n/sq/files.po l10n/sq/files_external.po l10n/sr/core.po l10n/sr/files.po l10n/sr/files_external.po l10n/sr@latin/files.po l10n/sr@latin/files_external.po l10n/sv/core.po l10n/sv/files.po l10n/sv/files_external.po l10n/sw_KE/files.po l10n/sw_KE/files_external.po l10n/ta_LK/core.po l10n/ta_LK/files.po l10n/ta_LK/files_external.po l10n/te/files.po l10n/te/files_external.po l10n/templates/core.pot l10n/templates/files.pot l10n/templates/files_encryption.pot l10n/templates/files_external.pot l10n/templates/files_sharing.pot l10n/templates/files_trashbin.pot l10n/templates/files_versions.pot l10n/templates/lib.pot l10n/templates/settings.pot l10n/templates/user_ldap.pot l10n/templates/user_webdavauth.pot l10n/th_TH/core.po l10n/th_TH/files.po l10n/th_TH/files_external.po l10n/tr/core.po l10n/tr/files.po l10n/tr/files_external.po l10n/tr/user_ldap.po l10n/uk/core.po l10n/uk/files.po l10n/uk/files_external.po l10n/ur_PK/files.po l10n/ur_PK/files_external.po l10n/vi/core.po l10n/vi/files.po l10n/vi/files_external.po l10n/zh_CN.GB2312/core.po l10n/zh_CN.GB2312/files.po l10n/zh_CN.GB2312/files_external.po l10n/zh_CN/core.po l10n/zh_CN/files.po l10n/zh_CN/files_external.po l10n/zh_HK/core.po l10n/zh_HK/files.po l10n/zh_HK/files_external.po l10n/zh_TW/core.po l10n/zh_TW/files.po l10n/zh_TW/files_external.po lib/base.php lib/files/mount/mount.php
129 lines
3.4 KiB
JavaScript
129 lines
3.4 KiB
JavaScript
/**
|
|
* Copyright (c) 2011, Robin Appelman <icewind1991@gmail.com>
|
|
* This file is licensed under the Affero General Public License version 3 or later.
|
|
* See the COPYING-README file.
|
|
*/
|
|
|
|
/**
|
|
* Post the email address change to the server.
|
|
*/
|
|
function changeEmailAddress(){
|
|
emailInfo = $('#email');
|
|
if (emailInfo.val() === emailInfo.defaultValue){
|
|
return;
|
|
}
|
|
emailInfo.defaultValue = emailInfo.val();
|
|
OC.msg.startSaving('#lostpassword .msg');
|
|
var post = $( "#lostpassword" ).serialize();
|
|
$.post( 'ajax/lostpassword.php', post, function(data){
|
|
OC.msg.finishedSaving('#lostpassword .msg', data);
|
|
});
|
|
}
|
|
|
|
$(document).ready(function(){
|
|
$("#passwordbutton").click( function(){
|
|
if ($('#pass1').val() != '' && $('#pass2').val() != '') {
|
|
// Serialize the data
|
|
var post = $( "#passwordform" ).serialize();
|
|
$('#passwordchanged').hide();
|
|
$('#passworderror').hide();
|
|
// Ajax foo
|
|
$.post( 'ajax/changepassword.php', post, function(data){
|
|
if( data.status == "success" ){
|
|
$('#pass1').val('');
|
|
$('#pass2').val('');
|
|
$('#passwordchanged').show();
|
|
}
|
|
else{
|
|
$('#passworderror').html( data.data.message );
|
|
$('#passworderror').show();
|
|
}
|
|
});
|
|
return false;
|
|
} else {
|
|
$('#passwordchanged').hide();
|
|
$('#passworderror').show();
|
|
return false;
|
|
}
|
|
|
|
});
|
|
|
|
$("#displaynamebutton").click( function(){
|
|
if ($('#displayName').val() != '' ) {
|
|
// Serialize the data
|
|
var post = $( "#displaynameform" ).serialize();
|
|
$('#displaynamechanged').hide();
|
|
$('#displaynemerror').hide();
|
|
// Ajax foo
|
|
$.post( 'ajax/changedisplayname.php', post, function(data){
|
|
if( data.status == "success" ){
|
|
$('#displaynamechanged').show();
|
|
$('#oldDisplayName').text($('#displayName').val());
|
|
// update displayName on the top right expand button
|
|
$('#expandDisplayName').text($('#displayName').val());
|
|
}
|
|
else{
|
|
$('#newdisplayname').val(data.data.displayName)
|
|
$('#displaynameerror').html( data.data.message );
|
|
$('#displaynameerror').show();
|
|
}
|
|
});
|
|
return false;
|
|
} else {
|
|
$('#displayName').val($('#oldDisplayName').val());
|
|
$('#displaynamechanged').hide();
|
|
$('#displaynameerror').show();
|
|
return false;
|
|
}
|
|
|
|
});
|
|
|
|
$('#email').keyup(function(){
|
|
if(typeof timeout !== 'undefined'){
|
|
clearTimeout(timeout);
|
|
}
|
|
timeout = setTimeout('changeEmailAddress()',1000);
|
|
});
|
|
|
|
$("#languageinput").chosen();
|
|
// Show only the not selectable optgroup
|
|
// Choosen only shows optgroup-labels if there are options in the optgroup
|
|
$(".languagedivider").remove();
|
|
|
|
$("#languageinput").change( function(){
|
|
// Serialize the data
|
|
var post = $( "#languageinput" ).serialize();
|
|
// Ajax foo
|
|
$.post( 'ajax/setlanguage.php', post, function(data){
|
|
if( data.status == "success" ){
|
|
location.reload();
|
|
}
|
|
else{
|
|
$('#passworderror').html( data.data.message );
|
|
}
|
|
});
|
|
return false;
|
|
});
|
|
} );
|
|
|
|
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');
|
|
}
|
|
}
|
|
};
|