Version 5.0.0 beta 11.1

This commit is contained in:
Neo committed 2025-12-19 18:00:22 -08:00
1 parent 264eeb97e0
commit 90e8c7e903
466 files changed
+7796 -2394

No files matched your search

+1 -1
View File
@@ -176,7 +176,7 @@ this._clearNotifications();}catch(e){Debug.warn(`Could not import new replies fo
if($('#elFlashMessage').find('[data-role="newPostNotification"]').length){$('#elFlashMessage').find('[data-role="newPostNotification"]').trigger('closeFlashMsg.flashMsg');}},quickReply:function(e){const form=this.scope.find('[data-role="replyArea"] form');if(form.attr('data-noAjax')){return;}
e.preventDefault();e.stopPropagation();const self=this;const replyArea=this.scope.find('[data-role="replyArea"]');const submit=form.find('[type="submit"]');const autoFollow=this.scope.find('input[name$="auto_follow_checkbox"]');const commentsOnThisPage=this.scope.find('[data-commentid]');const _lastSeenID=this._getLastSeenID(commentsOnThisPage);const submitButtons=[...submit];const submitRestorations=[];submitButtons.forEach(button=>{if(button.closest('.ipsIconPicker')){return;}
const initialText=button.innerText;button.setAttribute('disabled','');button.innerText=ips.getString('saving');submitRestorations.push(()=>{button.removeAttribute('disabled');button.innerText=initialText;});});let page=ips.utils.url.getPageNumber(this._pageParam);if(!page){page=1;}
this._clearNotifications();ips.getAjax()(form.attr('action'),{data:form.serialize()+'&currentPage='+page+'&_lastSeenID='+_lastSeenID,type:'post'}).done(function(response){if(response.type=='error'){if(response.form){if(replyArea.find('[data-ipseditorv5]')){ips.ui.editorv5.getObj(replyArea.find('[data-ipseditorv5]')).destruct();}
this._clearNotifications();ips.getAjax()(form.attr('action'),{data:form.serialize()+'&currentPage='+page+'&_lastSeenID='+_lastSeenID,type:'post'}).done(function(response){if(response.type=='error'){Debug.error(response);Debug.error('Failed to submit content via quick reply');if(response.form){if(replyArea.find('[data-ipseditorv5]')){ips.ui.editorv5.getObj(replyArea.find('[data-ipseditorv5]')).destruct(false);}
form.replaceWith($(response.form));$(document).trigger('contentChange',[self.scope]);}else{ips.ui.alert.show({type:'alert',icon:'warn',message:response.message,callbacks:{}});}}
else if(response.type=='redirect'){self.paginationClick(e,{href:response.url,originalEvent:e});}else if(response.type=='merge'){var comment=$(self.findCommentInFeed(response.id));comment.find('[data-role="commentContent"]').html(response.content);if(comment.find('pre.prettyprint').length){comment.find('pre.prettyprint').each(function(){$(this).html(window.PR.prettyPrintOne(_.escape($(this).text())));});}
self.scope.find('[data-role="replyArea"] [data-ipsEditorv5]').data('_editor').reset();if(self.scope.find('[data-role="replyArea"] input[name="guest_name"]').length){self.scope.find('[data-role="replyArea"] input[name="guest_name"]').val('');}