2011-04-18 17:07:14 +04:00
|
|
|
$(document).ready(function(){
|
|
|
|
$("#passwordbutton").click( function(){
|
|
|
|
// 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;
|
|
|
|
});
|
2011-08-05 18:05:58 +04:00
|
|
|
|
2011-06-20 16:33:02 +04:00
|
|
|
$("#languageinput").change( function(){
|
|
|
|
// Serialize the data
|
|
|
|
var post = $( "#languageinput" ).serialize();
|
|
|
|
// Ajax foo
|
|
|
|
$.post( 'ajax/setlanguage.php', post, function(data){
|
|
|
|
if( data.status == "success" ){
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
$('#passworderror').html( data.data.message );
|
|
|
|
}
|
|
|
|
});
|
|
|
|
return false;
|
|
|
|
});
|
2011-08-14 18:12:27 +04:00
|
|
|
|
|
|
|
// 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);
|
|
|
|
});
|
2011-04-18 17:07:14 +04:00
|
|
|
} );
|