Version 3.0.5
This commit is contained in:
1 parent
19b38c7c74
commit
1d4720f3e2
3755 files changed
+508378
-664541
No files matched your search
@@ -0,0 +1,81 @@
|
||||
/************************************************/
|
||||
/* IPB3 Javascript */
|
||||
/* -------------------------------------------- */
|
||||
/* ips.ucp.js - Topic view code */
|
||||
/* (c) IPS, Inc 2008 */
|
||||
/* -------------------------------------------- */
|
||||
/* Author: Rikki Tissier */
|
||||
/************************************************/
|
||||
|
||||
var _ucp = window.IPBoard;
|
||||
|
||||
_ucp.prototype.ucp = {
|
||||
|
||||
init: function()
|
||||
{
|
||||
Debug.write("Initializing ips.ucp.js");
|
||||
|
||||
document.observe("dom:loaded", function(){
|
||||
if( $('avatarCategory') )
|
||||
{
|
||||
ipb.ucp.initAvatarGallery();
|
||||
}
|
||||
|
||||
if ( $('userCPForm') && $('userCPForm').action.match( "area=photo" ) )
|
||||
{
|
||||
$('userCPForm').observe( 'submit', ipb.ucp.photoFormSubmit );
|
||||
}
|
||||
} );
|
||||
},
|
||||
|
||||
/**
|
||||
* Photo form submit
|
||||
*/
|
||||
photoFormSubmit: function(e)
|
||||
{
|
||||
/* Have we got a form value? */
|
||||
if ( $('upload_photo') && ! $F('upload_photo') )
|
||||
{
|
||||
Event.stop(e);
|
||||
alert( ipb.lang['usercp_photo_upload'] );
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
initAvatarGallery: function()
|
||||
{
|
||||
// set event
|
||||
$('avatarCategory').observe('change', ipb.ucp.updateAvatarGallery);
|
||||
},
|
||||
|
||||
updateAvatarGallery: function(e)
|
||||
{
|
||||
var catid = $F('avatarCategory');
|
||||
if( Object.isUndefined( catid ) || catid.blank() || catid == 'none' ){ return; }
|
||||
|
||||
var url = ipb.vars['base_url'] + "app=forums&module=ajax§ion=usercp&do=get_avatar_images&cat=" + catid + "&secure_key=" + ipb.vars['secure_hash'];
|
||||
|
||||
new Ajax.Request( url.replace(/&/, '&'),
|
||||
{
|
||||
method: 'get',
|
||||
onSuccess: function(t)
|
||||
{
|
||||
if( t.responseText != 'error' )
|
||||
{
|
||||
$('avatarImageContainer').update( t.responseText ).show();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
deleteAnnouncement: function(e, id)
|
||||
{
|
||||
if( !confirm(ipb.lang['delete_confirm']) )
|
||||
{
|
||||
Event.stop(e);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
ipb.ucp.init();
|
||||
Reference in new issue
Block a user