Version 3.2.3

This commit is contained in:
Neo committed 2025-12-19 00:34:03 -08:00
1 parent ae5c01cc78
commit 78706903a2
2641 files changed
+228363 -201264

No files matched your search

+35 -61
View File
@@ -11,9 +11,13 @@ var _status = window.IPBoard;
_status.prototype.status = {
_updateClicked: false,
forMemberId: 0,
maxReplies: 0,
smallSpace: 0,
myLatest: 0,
skin_group: 'profile',
events: { 'page': false, 'normal': false },
init: function()
{
Debug.write("Initializing ips.status.js");
@@ -59,28 +63,24 @@ _status.prototype.status = {
/* Delete status link */
ipb.delegate.register(".__sTO", ipb.status.hideFeedback);
/* Can we update our status? */
if ( $('statusUpdate') )
if ( $('statusUpdate_page') && ipb.status.events['page'] === false )
{
ipb.status._updateClicked = false;
$('statusUpdate').stopObserving( 'click' );
$('statusUpdate').stopObserving( 'keypress' );
$('statusSubmit').stopObserving( 'click' );
$('statusUpdate').value = ipb.lang['prof_update_default'];
$('statusUpdate').addClassName('status_inactive');
if ( ! ipb.status.smallSpace )
try
{
$('statusSubmit').value = ipb.lang['prof_update_button'];
$('statusSubmit').addClassName('status_smallspace');
ipb.status.forMemberId = parseInt( $('statusUpdate_page').readAttribute('data-for-member-id') );
}
catch(e) {}
if ( ! ipb.status.forMemberId )
{
$('statusUpdate_page').defaultize( ipb.lang['global_status_update'] );
}
else
{
$('statusUpdate_page').defaultize( ipb.lang['global_leave_msg'] );
}
$('statusUpdate').observe( 'click', ipb.status.updateUpdateText.bindAsEventListener( this ) );
$('statusUpdate').observe( 'keypress', ipb.global.checkForEnter.bindAsEventListener( this, ipb.status.updateSubmit ) );
$('statusSubmit').observe( 'click', ipb.status.updateSubmit.bindAsEventListener( this ) );
ipb.status.events['page'] = $('statusSubmit_page').on( 'click', ipb.status.updateSubmit.bindAsEventListener( this, 'statusUpdate_page' ) );
}
},
@@ -96,29 +96,16 @@ _status.prototype.status = {
$('statusText-' + id).focus();
},
/*!! deleteStatus */
/* result of clicking "delete" on a status */
updateUpdateText: function(e)
{
if ( ipb.status._updateClicked )
{
return;
}
else
{
ipb.status._updateClicked = true;
$('statusUpdate').value = '';
$('statusUpdate').removeClassName('status_inactive');
}
},
/*!! updateSubmit */
/* Add a sexy ajax status" */
updateSubmit: function(e)
updateSubmit: function(e, field)
{
Event.stop(e);
if ( $('statusUpdate' ).value.length < 2 || $('statusUpdate').value == ipb.lang['prof_update_default'] )
$('statusSubmitGlobal').stopObserving( 'click' );
if ( $( field ).value.length < 2 || $( field ).value == ipb.lang['prof_update_default'] )
{
return false;
}
@@ -126,12 +113,12 @@ _status.prototype.status = {
var su_Twitter = $('su_Twitter') && $('su_Twitter').checked ? 1 : 0;
var su_Facebook = $('su_Facebook') && $('su_Facebook').checked ? 1 : 0;
new Ajax.Request( ipb.vars['base_url'] + "app=members&section=status&module=ajax&do=new&md5check=" + ipb.vars['secure_hash'] + '&smallSpace=' + ipb.status.smallSpace,
new Ajax.Request( ipb.vars['base_url'] + "app=members&section=status&module=ajax&do=new&md5check=" + ipb.vars['secure_hash'] + '&smallSpace=' + ipb.status.smallSpace + '&skin_group=' + ipb.status.skin_group + '&forMemberId=' + ipb.status.forMemberId,
{
method: 'post',
evalJSON: 'force',
parameters: {
content: $('statusUpdate' ).value.encodeParam(),
content: $( field ).value.encodeParam(),
su_Twitter: su_Twitter,
su_Facebook: su_Facebook
},
@@ -164,7 +151,10 @@ _status.prototype.status = {
/* Need to blur out of field
@link http://community.invisionpower.com/tracker/issue-21358-small-input-field-behavior-issue-after-updating-status/
*/
$('statusUpdate' ).blur();
$( field ).blur();
$( field ).value = '';
ipb.menus.closeAll(e);
/* Re-init events */
ipb.status.initEvents();
@@ -274,7 +264,7 @@ _status.prototype.status = {
if( status == null || Object.isUndefined( status[1] ) ){ Debug.error("Error"); return; }
var status_id = status[1];
new Ajax.Request( ipb.vars['base_url'] + "app=members&section=status&module=ajax&do=lockStatus&status_id=" + status_id + "&md5check=" + ipb.vars['secure_hash'],
new Ajax.Request( ipb.vars['base_url'] + "app=members&section=status&module=ajax&do=lockStatus&status_id=" + status_id + "&md5check=" + ipb.vars['secure_hash'] + '&skin_group=' + ipb.status.skin_group,
{
method: 'get',
onSuccess: function(t)
@@ -310,7 +300,7 @@ _status.prototype.status = {
if( status == null || Object.isUndefined( status[1] ) ){ Debug.error("Error"); return; }
var status_id = status[1];
new Ajax.Request( ipb.vars['base_url'] + "app=members&section=status&module=ajax&do=unlockStatus&status_id=" + status_id + "&md5check=" + ipb.vars['secure_hash'],
new Ajax.Request( ipb.vars['base_url'] + "app=members&section=status&module=ajax&do=unlockStatus&status_id=" + status_id + "&md5check=" + ipb.vars['secure_hash']+ '&skin_group=' + ipb.status.skin_group,
{
method: 'get',
onSuccess: function(t)
@@ -346,7 +336,7 @@ _status.prototype.status = {
var status_id = status[1];
var reply_id = status[2];
new Ajax.Request( ipb.vars['base_url'] + "app=members&section=status&module=ajax&do=deleteReply&status_id=" + status_id + "&reply_id=" + reply_id + "&md5check=" + ipb.vars['secure_hash'],
new Ajax.Request( ipb.vars['base_url'] + "app=members&section=status&module=ajax&do=deleteReply&status_id=" + status_id + "&reply_id=" + reply_id + "&md5check=" + ipb.vars['secure_hash']+ '&skin_group=' + ipb.status.skin_group,
{
method: 'get',
onSuccess: function(t)
@@ -375,7 +365,7 @@ _status.prototype.status = {
if( status == null || Object.isUndefined( status[1] ) ){ Debug.error("Error showing all comments"); return; }
var status_id = status[1];
new Ajax.Request( ipb.vars['base_url'] + "app=members&section=status&module=ajax&do=showall&status_id=" + status_id + "&md5check=" + ipb.vars['secure_hash'],
new Ajax.Request( ipb.vars['base_url'] + "app=members&section=status&module=ajax&do=showall&status_id=" + status_id + "&md5check=" + ipb.vars['secure_hash']+ '&skin_group=' + ipb.status.skin_group,
{
method: 'get',
onSuccess: function(t)
@@ -421,7 +411,7 @@ _status.prototype.status = {
return false;
}
new Ajax.Request( ipb.vars['base_url'] + "app=members&section=status&module=ajax&do=reply&status_id=" + status_id + "&md5check=" + ipb.vars['secure_hash'],
new Ajax.Request( ipb.vars['base_url'] + "app=members&section=status&module=ajax&do=reply&status_id=" + status_id + "&md5check=" + ipb.vars['secure_hash']+ '&skin_group=' + ipb.status.skin_group,
{
method: 'post',
evalJSON: 'force',
@@ -443,28 +433,12 @@ _status.prototype.status = {
else
{
try {
/* Already have replies, add them there so the overflow block looks correct */
if ( $('statusReplies-' + status_id ) )
{
$('statusReplies-' + status_id ).innerHTML += t.responseJSON['html'];
}
else
{
$( 'statusReplyBlank-' + status_id ).innerHTML += t.responseJSON['html'];
}
$( 'statusReplyBlank-' + status_id ).show().innerHTML += t.responseJSON['html'];
$('statusText-' + status_id ).value = '';
if ( t.responseJSON['status_replies'] && ipb.status.maxReplies && t.responseJSON['status_replies'] >= ipb.status.maxReplies )
{
$('statusMaxWrap-' + status_id ).show();
$('statusReply-' + status_id).hide();
}
}
catch(err)
{
Debug.error( err );
Debug.write( err );
}
}
}