Version 4.1.2

This commit is contained in:
Neo committed 2025-12-19 05:32:19 -08:00
1 parent 3ba79295ee
commit 28bd025b35
1131 files changed
+63658 -20579

No files matched your search

+57 -15
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<javascript app="chat">
<file javascript_app="chat" javascript_location="front" javascript_path="controllers/chat" javascript_name="ips.chat.main.js" javascript_type="controller" javascript_version="100045" javascript_position="1000050"><![CDATA[/**
<file javascript_app="chat" javascript_location="front" javascript_path="controllers/chat" javascript_name="ips.chat.main.js" javascript_type="controller" javascript_version="101012" javascript_position="1000050"><![CDATA[/**
* IPS Social Suite 4
* (c) 2013 Invision Power Services - http://www.invisionpower.com
*
@@ -52,12 +52,29 @@
},
/**
* Setup method
* Setup wrapper method
*
* @returns {void}
*/
setup: function () {
//return;
var self = this;
if( window.btoa && window.atob ){
this._doSetup();
} else {
// If bas64 isn't supported in the browser (< IE10), then load a polyfill before continuing
ips.loader.get( ['chat/interface/base64/base64.js'] ).then( function () {
self._doSetup();
});
}
},
/**
* Performs setup tasks
*
* @returns {void}
*/
_doSetup: function () {
var self = this;
this._setUpMainPanel();
@@ -331,7 +348,8 @@
* @returns {void}
*/
_createBadge: function () {
$('.elNavigation_app_chat_Chat').append( $('<span/>').addClass('ipsNotificationCount').text('0') );
// This is now added with a hook and doesn't need to be done here
//$('.elNavigation_app_chat_Chat').append( $('<span/>').addClass('ipsNotificationCount').text('0') );
},
/**
@@ -457,7 +475,8 @@
*/
_ping: function () {
var url = '?app=chat&module=chat&controller=action&do=ping';
var self = this;
// Load the mini profile to show in the sidebar
ips.getAjax()( url, {
data: {
@@ -466,6 +485,17 @@
})
.done( function (response) {
// We don't need to do anything
})
.fail(function(response){
if ( response.responseJSON.message ) {
var containers = self._getAllStorageContainers();
containers.append( ips.templates.render('chat.system', {
text: response.responseJSON.message,
date: self._getChatTime( self._getCurrentTime() )
}));
self._kicked = true;
self._scrollToBottom( self._activeTab );
}
});
},
@@ -809,8 +839,8 @@
this._checkInactivity( curtime );
if( this._kicked ){
clearTimeout( this._poller );
clearTimeout( this._updater );
clearInterval( this._poller );
clearInterval( this._updater );
}
// If current time - last polled time is less than the polling timeperiod,
@@ -1319,7 +1349,7 @@
this.scope.find('[data-role="onlineChatters"]').html( ips.pluralize( ips.getString('usersChatting'), total ) );
// Update global chat tab
$('.elNavigation_app_chat_Chat .ipsNotificationCount').text( total );
$('.ipsNavBar_primary [data-navapp="chat"] .ipsNotificationCount').text( total );
},
/**
@@ -1348,9 +1378,9 @@
_unCleanMessage: function (message) {
return message
.replace( /__PS__/g, "+" )
.replace( /__E__/g, "=" )
.replace( /__P__/g, "%" )
.replace( /__A__/g, "&" )
.replace( /__E__/g, "=" )
.replace( /__C__/g, "," )
.replace( /__N__/g, "<br />" );
},
@@ -1374,10 +1404,20 @@
// @todo this line still needed?
message = message.replace( '!', '&#33;' );
_.each( ips.getSetting('chatEmoticons'), function (url, emoticon) {
var img = "$1<img src='" + url + "'>$2";
_.each( ips.getSetting('chatEmoticons'), function (url, emoticon) {
var img = $('<img/>').attr({ 'src': url['image'], 'data-emoticon': 'true' });
if ( url['width'] ) {
img.attr( 'width', url['width'] );
}
if ( url['height'] ) {
img.attr( 'height', url['width'] );
}
if ( url['image_2x'] ) {
img.attr( 'srcset', url['image_2x'] );
}
img = "$1" + $('<div/>').append( img ).html() + "$2";
var regexp = new RegExp( "(^|\\s)" + self._escapeRegex( emoticon ) + "(\\s|$)", "gi" );
while( message.match( regexp ) ){
message = message.replace( regexp, img );
}
@@ -1657,7 +1697,7 @@
var indexOfURL = text.indexOf( url, lastPos );
var returnURL = url;
if( text.substring( indexOfURL, indexOfURL - 5) !== "src='" ){
if( text.substring( indexOfURL, indexOfURL - 5) !== 'src="' && text.substring( indexOfURL, indexOfURL - 8) !== 'srcset="' ){
returnURL = '<a href="' + url + '" target="_blank">' + url + '</a>';
}
@@ -1744,7 +1784,9 @@
msgDetails[2] = _details.prefix.replace( /__DBQ__/g, '"' ) + msgDetails[2] + _details.suffix.replace( /__DBQ__/g, '"' );
}
var tab = this.scope.find('#elChatTabs [data-user="' + msgDetails[2] + '"]')
// https://community.invisionpower.com/4bugtrack/active-reports/chat-tabs-with-html-in-group-name-r8351/
// This line isn't actually used and was causing the error.
//var tab = this.scope.find('#elChatTabs [data-user="' + msgDetails[2] + '"]')
state.alsoTo = details[1];
@@ -1837,7 +1879,7 @@
}
});
}(jQuery, _));]]></file>
<file javascript_app="chat" javascript_location="front" javascript_path="templates" javascript_name="ips.templates.chat.js" javascript_type="template" javascript_version="100045" javascript_position="1000100"><![CDATA[ips.templates.set('chat.tabs.tab', " \
<file javascript_app="chat" javascript_location="front" javascript_path="templates" javascript_name="ips.templates.chat.js" javascript_type="template" javascript_version="101012" javascript_position="1000100"><![CDATA[ips.templates.set('chat.tabs.tab', " \
<li role='presentation' data-roomID='{{roomID}}'>\
<a href='#' role='tab' id='{{roomID}}' class='ipsFaded_withHover ipsTabs_item ipsType_blendLinks {{#active}}ipsTabs_activeItem{{/active}}' aria-selected='false'>\
{{roomTitle}} {{#close}}&nbsp;<span class='ipsFaded ipsFaded_more' data-action='closeTab' data-ipsTooltip title='{{#lang}}closeThisTab{{/lang}}'><i class='fa fa-times'></i></span>{{/close}}\