Version 5.0.0 beta 1
This commit is contained in:
1 parent
25ddeb65d6
commit
15c7beabc5
6736 files changed
+627902
-497943
No files matched your search
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<javascript app="forums">
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/forum" javascript_name="ips.forum.flow.js" javascript_type="controller" javascript_version="107827" javascript_position="1000100"><![CDATA[/**
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/forum" javascript_name="ips.forum.flow.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000100"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -117,7 +117,7 @@
|
||||
*
|
||||
*/
|
||||
isSelected: function(id) {
|
||||
return this.scope.find('[data-node-id="' + id + '"]').hasClass('cForumMiniList_selected') ? true : false;
|
||||
return this.scope.find('[data-node-id="' + id + '"]').hasClass('cForumMiniList__selected') ? true : false;
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -128,7 +128,7 @@
|
||||
Debug.log("Select child: " + id );
|
||||
this._ids.push( id );
|
||||
var node = this.scope.find('[data-node-id="' + id + '"]');
|
||||
node.addClass('cForumMiniList_selected');
|
||||
node.addClass('cForumMiniList__selected');
|
||||
var parentId = node.attr('data-parent-id');
|
||||
|
||||
/* Mark any children, but we do not need to keep individual row markings */
|
||||
@@ -152,7 +152,7 @@
|
||||
childUnselect: function(id) {
|
||||
Debug.log("UNselect child: " + id );
|
||||
/* Remove marking */
|
||||
this.scope.find('[data-node-id="' + id + '"]').removeClass('cForumMiniList_selected');
|
||||
this.scope.find('[data-node-id="' + id + '"]').removeClass('cForumMiniList__selected');
|
||||
|
||||
/* Remove from local storage and id stack */
|
||||
this._ids = _.without( this._ids, id );
|
||||
@@ -180,7 +180,7 @@
|
||||
parentSelect: function(parentId) {
|
||||
Debug.log("Select parent: " + parentId );
|
||||
/* Mark category and children as selected */
|
||||
this.scope.find('[data-node-id="' + parentId + '"]').addClass('cForumMiniList_selected');
|
||||
this.scope.find('[data-node-id="' + parentId + '"]').addClass('cForumMiniList__selected');
|
||||
|
||||
/* Remove children from the arrays as PHP handles this */
|
||||
if ( this._rootForum === null ) {
|
||||
@@ -205,7 +205,7 @@
|
||||
Debug.log("UNselect parent: " + parentId );
|
||||
/* Unselect parent as marked */
|
||||
var node = this.scope.find('[data-node-id="' + parentId + '"]');
|
||||
node.removeClass('cForumMiniList_selected');
|
||||
node.removeClass('cForumMiniList__selected');
|
||||
|
||||
this._ids = _.without( this._ids, parentId );
|
||||
this.updateCookie();
|
||||
@@ -252,9 +252,9 @@
|
||||
* @returns {void}
|
||||
*/
|
||||
_updateButtonText: function () {
|
||||
var blobs = this.scope.find('.cForumMiniList_blob');
|
||||
var blobs = this.scope.find('.cForumMiniList__blob');
|
||||
var selectedBlobRows = blobs.filter( function () {
|
||||
if( $( this ).closest('.cForumMiniList_selected').length ){
|
||||
if( $( this ).closest('.cForumMiniList__selected').length ){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -272,7 +272,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/forum" javascript_name="ips.forum.forumList.js" javascript_type="controller" javascript_version="107827" javascript_position="1000100"><![CDATA[/**
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/forum" javascript_name="ips.forum.forumList.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000100"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -280,78 +280,67 @@
|
||||
*
|
||||
* Author: Rikki Tissier
|
||||
*/
|
||||
;( function($, _, undefined){
|
||||
;( function($, _){
|
||||
"use strict";
|
||||
|
||||
ips.controller.register('forums.front.forum.forumList', {
|
||||
initialize: function () {
|
||||
this.on( 'click', '[data-action="toggleCategory"]', this.toggleCategory );
|
||||
this.on( 'markedAsRead', this.forumMarkedRead );
|
||||
|
||||
/**
|
||||
* Initializes the controller
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
initialize() {
|
||||
this.on( 'ips:toggleForumCategory', this.toggleCategory );
|
||||
this.setup();
|
||||
},
|
||||
|
||||
/**
|
||||
* Setup method
|
||||
*
|
||||
* Hides categories the user has already hidden
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
setup: function () {
|
||||
var self = this;
|
||||
var hiddenCategories = ips.utils.db.get( 'hiddenCategories' );
|
||||
setup() {
|
||||
let hiddenCategories = ips.utils.db.get( 'hiddenCategories' );
|
||||
|
||||
if( _.isObject( hiddenCategories ) && _.size( hiddenCategories ) ){
|
||||
_.each( hiddenCategories, function (val, key) {
|
||||
self.scope.find('[data-categoryID="' + key + '"]')
|
||||
.addClass('cForumRow_hidden')
|
||||
.attr( 'data-hidden', true )
|
||||
.find( '[data-role="forums"]' )
|
||||
.hide();
|
||||
_.each( hiddenCategories, function (val, key) {
|
||||
document.querySelector("[aria-controls='forum-category_" + key + "']")?.setAttribute('aria-expanded', 'false');
|
||||
document.getElementById('forum-category_' + key)?.setAttribute('hidden', '');
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Event handler for toggling a category
|
||||
* Event handler for storing toggle status
|
||||
* Hidden categories are stored localDB
|
||||
*
|
||||
* @param {event} e Event object
|
||||
* @returns {void}
|
||||
*/
|
||||
toggleCategory: function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var category = $( e.currentTarget ).closest('[data-categoryID]');
|
||||
|
||||
if( !category.attr('data-hidden') ){
|
||||
ips.utils.db.set( 'hiddenCategories', category.attr('data-categoryID'), true );
|
||||
category
|
||||
.addClass('cForumRow_hidden')
|
||||
.attr( 'data-hidden', true )
|
||||
.find('[data-role="forums"]')
|
||||
.hide();
|
||||
} else {
|
||||
ips.utils.anim.go( 'fadeIn', category.find('[data-role="forums"]') );
|
||||
ips.utils.db.remove( 'hiddenCategories', category.attr('data-categoryID') );
|
||||
category
|
||||
.removeClass('cForumRow_hidden')
|
||||
.removeAttr( 'data-hidden' );
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Event handler for a forum being marked as read
|
||||
* We need to do some extra work for grid-style forums
|
||||
* @param {ipsUiHiddenToggleEvent} e Event object
|
||||
*
|
||||
* @param {event} e Event object
|
||||
* @returns {void}
|
||||
*/
|
||||
forumMarkedRead: function(e) {
|
||||
$( e.target ).closest( '.cForumGrid' ).removeClass('cForumGrid--unread').removeClass('ipsDataItem_unread').addClass('cForumGrid--read');
|
||||
toggleCategory(e) {
|
||||
/* Get the category which triggered the event and its ID */
|
||||
const category = e.target;
|
||||
const categoryID = category.closest('[data-categoryID]')?.dataset.categoryid;
|
||||
|
||||
if (!category || !categoryID) {
|
||||
Debug.warn(`The forum list got a category hidden toggle event but couldn't determine which category was toggled`);
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.detail.hidden) {
|
||||
ips.utils.db.set( 'hiddenCategories', categoryID, true );
|
||||
} else {
|
||||
ips.utils.db.remove( 'hiddenCategories', categoryID );
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/forum" javascript_name="ips.forum.forumPage.js" javascript_type="controller" javascript_version="107827" javascript_position="1000100">/**
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/forum" javascript_name="ips.forum.forumPage.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000100"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -360,41 +349,39 @@
|
||||
* Author: Rikki Tissier
|
||||
*/
|
||||
;( function($, _, undefined){
|
||||
"use strict";
|
||||
"use strict";
|
||||
|
||||
ips.controller.register('forums.front.forum.forumPage', {
|
||||
|
||||
initialize: function () {
|
||||
this.on( 'click', '[data-action="markForumRead"]', this.markForumRead );
|
||||
this.on( 'click', '[data-action="markForumRead"]', this.markForumRead );
|
||||
},
|
||||
|
||||
/**
|
||||
* Marks all topics in a forum table as read, triggering an event on the table
|
||||
*
|
||||
* @param {event} e Event object
|
||||
* @param {Event} e Event object
|
||||
* @returns {void}
|
||||
*/
|
||||
markForumRead: function (e) {
|
||||
markForumRead (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var self = this;
|
||||
|
||||
ips.ui.alert.show( {
|
||||
type: 'confirm',
|
||||
icon: 'question',
|
||||
message: ips.getString('markForumAsReadConfirm'),
|
||||
subText: '',
|
||||
callbacks: {
|
||||
ok: function () {
|
||||
var url = $( e.currentTarget ).attr('href');
|
||||
ok: () => {
|
||||
const url = $(e.currentTarget).attr('href');
|
||||
|
||||
ips.getAjax()( url, {
|
||||
showLoading: true,
|
||||
bypassRedirect: true
|
||||
})
|
||||
.done( function () {
|
||||
.done( () => {
|
||||
// Trigger event on the table to hide unread markets
|
||||
self.triggerOn( 'core.global.core.table', 'markTableRead' );
|
||||
this.triggerOn( 'core.global.core.table', 'markTableRead' );
|
||||
|
||||
// Hide the link we've just clicked
|
||||
ips.utils.anim.go( 'fadeOut', $( e.currentTarget ) );
|
||||
@@ -409,8 +396,8 @@
|
||||
});
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/forum" javascript_name="ips.forum.hovercard.js" javascript_type="controller" javascript_version="107827" javascript_position="1000100">/**
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/forum" javascript_name="ips.forum.hovercard.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000100">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -456,11 +443,11 @@
|
||||
});
|
||||
|
||||
// Hide the link
|
||||
$( e.currentTarget ).addClass('ipsFaded').attr('data-disabled');
|
||||
$( e.currentTarget ).addClass('i-opacity_4').attr('data-disabled');
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="forums" javascript_location="admin" javascript_path="controllers/settings" javascript_name="ips.settings.archiveRules.js" javascript_type="controller" javascript_version="107827" javascript_position="1000050"><![CDATA[/**
|
||||
<file javascript_app="forums" javascript_location="admin" javascript_path="controllers/settings" javascript_name="ips.settings.archiveRules.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -485,8 +472,8 @@
|
||||
var currentPercentage = parseInt( this.scope.find('[data-role="percentage"]').text() );
|
||||
|
||||
this.scope
|
||||
.find('.ipsProgressBar')
|
||||
.toggleClass('ipsFaded', !currentPercentage );
|
||||
.find('.ipsProgress')
|
||||
.toggleClass('i-opacity_4', !currentPercentage );
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -507,8 +494,8 @@
|
||||
var currentPercentage = parseInt( self.scope.find('[data-role="percentage"]').text() );
|
||||
|
||||
self.scope
|
||||
.find('.ipsProgressBar')
|
||||
.toggleClass('ipsFaded', !parseInt( response.percentage ) )
|
||||
.find('.ipsProgress')
|
||||
.toggleClass('i-opacity_4', !parseInt( response.percentage ) )
|
||||
.end()
|
||||
.find('[data-role="percentage"]')
|
||||
.text( response.percentage )
|
||||
@@ -525,7 +512,7 @@
|
||||
});
|
||||
}(jQuery, _));
|
||||
]]></file>
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/topic" javascript_name="ips.topic.activity.js" javascript_type="controller" javascript_version="107827" javascript_position="1000050">/**
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/topic" javascript_name="ips.topic.activity.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000050">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -557,7 +544,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/topic" javascript_name="ips.topic.answers.js" javascript_type="controller" javascript_version="107827" javascript_position="1000050"><![CDATA[/**
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/topic" javascript_name="ips.topic.answers.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -593,10 +580,10 @@
|
||||
var self = this;
|
||||
var clicked = $( e.currentTarget );
|
||||
|
||||
if( this.scope.find('.cAnswerRate_up').is('.ipsType_positive') ) {
|
||||
if( this.scope.find('.cAnswerRate_up').is('.i-color_positive') ) {
|
||||
var currentVote = 'positive';
|
||||
}
|
||||
else if( this.scope.find('.cAnswerRate_down').is('.ipsType_negative') ) {
|
||||
else if( this.scope.find('.cAnswerRate_down').is('.i-color_negative') ) {
|
||||
var currentVote = 'negative';
|
||||
}
|
||||
else {
|
||||
@@ -646,8 +633,8 @@
|
||||
this.setStyles( setPositive, setNegative );
|
||||
|
||||
voteCount
|
||||
.toggleClass( 'ipsType_positive', setPositive )
|
||||
.toggleClass( 'ipsType_negative', setNegative )
|
||||
.toggleClass( 'i-color_positive', setPositive )
|
||||
.toggleClass( 'i-color_negative', setNegative )
|
||||
.text( newVoteCount )
|
||||
.attr( 'data-voteCount', newVoteCount );
|
||||
|
||||
@@ -662,7 +649,7 @@
|
||||
Debug.log( response );
|
||||
|
||||
voteCount.text( response.votes );
|
||||
self.scope.find('.ipsType_light').text( ips.pluralize( ips.getString( 'votes_no_number' ), response.votes ) );
|
||||
self.scope.find('.i-color_soft').text( ips.pluralize( ips.getString( 'votes_no_number' ), response.votes ) );
|
||||
});
|
||||
},
|
||||
|
||||
@@ -673,8 +660,8 @@
|
||||
* @param {bool} Set negative
|
||||
*/
|
||||
setStyles: function( setPositive, setNegative ) {
|
||||
this.scope.find('.cAnswerRate_up').toggleClass( 'ipsType_positive', setPositive );
|
||||
this.scope.find('.cAnswerRate_down').toggleClass( 'ipsType_negative', setNegative );
|
||||
this.scope.find('.cAnswerRate_up').toggleClass( 'i-color_positive', setPositive );
|
||||
this.scope.find('.cAnswerRate_down').toggleClass( 'i-color_negative', setNegative );
|
||||
this.scope.toggleClass( 'cRatingColumn_up', setPositive ).toggleClass( 'cRatingColumn_down', setNegative );
|
||||
|
||||
// Reset tooltips
|
||||
@@ -697,7 +684,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/topic" javascript_name="ips.topic.reply.js" javascript_type="controller" javascript_version="107827" javascript_position="1000050">/**
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/topic" javascript_name="ips.topic.reply.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000050">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -721,11 +708,12 @@
|
||||
* @returns {void}
|
||||
*/
|
||||
replyToTopic: function (e) {
|
||||
e.preventDefault();
|
||||
$( document ).trigger( 'replyToTopic' );
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/topic" javascript_name="ips.topic.solved.js" javascript_type="controller" javascript_version="107827" javascript_position="1000050"><![CDATA[/**
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/topic" javascript_name="ips.topic.solved.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -763,7 +751,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/topic" javascript_name="ips.topic.view.js" javascript_type="controller" javascript_version="107827" javascript_position="1000050">/**
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/topic" javascript_name="ips.topic.view.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000050">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -778,9 +766,21 @@
|
||||
|
||||
initialize: function () {
|
||||
$( document ).on( 'replyToTopic', _.bind( this.replyToTopic, this ) );
|
||||
this.on( 'paginationClicked', this.paginationClicked );
|
||||
this.on( 'click', '[data-action="showMoreActivity"]', this.showActivity );
|
||||
this.on( 'click', '[data-action="closeMoreActivity"]', this.hideActivity );
|
||||
},
|
||||
|
||||
/**
|
||||
* Hide any helpful filters on page one
|
||||
*
|
||||
* @param {event} e Event object
|
||||
* @param {object} data Data object
|
||||
* @returns {void}
|
||||
*/
|
||||
paginationClicked: function ( e, data ) {
|
||||
document.getElementById('ipsTopicView').dataset.ipsTopicFirstPage = ( data.pageNo == 1 );
|
||||
},
|
||||
|
||||
/**
|
||||
* Opens up the activity box when placed under the first post
|
||||
@@ -817,7 +817,7 @@
|
||||
* @returns {void}
|
||||
*/
|
||||
replyToTopic: function (e) {
|
||||
ips.ui.editor.getObjWithInit( this.scope.find('[data-role="replyArea"] [data-ipsEditor]'), function(editor){
|
||||
ips.ui.editorv5.getObjWithInit( this.scope.find('[data-role="replyArea"] [data-ipsEditorv5]'), function(editor){
|
||||
editor.unminimize(function(){
|
||||
editor.focus();
|
||||
});
|
||||
@@ -825,20 +825,4 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<order app="global" path="/dev/js//framework/">templates
|
||||
common/ips.loader.js
|
||||
common/ui
|
||||
common/utils
|
||||
common
|
||||
controllers</order>
|
||||
<order app="global" path="/dev/js//library/">underscore
|
||||
jquery
|
||||
mustache
|
||||
Debug.js
|
||||
app.js</order>
|
||||
<order app="global" path="/dev/js//library//jquery">jquery.js
|
||||
jquery-migrate.js
|
||||
jquery.transform.js</order>
|
||||
<order app="global" path="/dev/js//library//linkify">linkify.min.js
|
||||
linkify-jquery.min.js</order>
|
||||
</javascript>
|
||||
Reference in new issue
Block a user