if (this._options.enableMarkAsRead) {
var $outstandingItems = this._dropdown.getItemList().children('.interactiveDropdownItemOutstanding');
- if (this._markAllAsReadLink === null && $outstandingItems.length && this._options.markAllAsReadConfirmMessage) {
+ if (this._markAllAsReadLink === null && $outstandingItems.length) {
var $button = this._markAllAsReadLink = $('<li class="interactiveDropdownItemMarkAllAsRead"><a href="#" title="' + WCF.Language.get('wcf.user.panel.markAllAsRead') + '" class="jsTooltip"><span class="icon icon24 fa-check" /></a></li>').appendTo(this._dropdown.getLinkList());
$button.click((function (event) {
this._dropdown.close();
- WCF.System.Confirmation.show(this._options.markAllAsReadConfirmMessage, (function (action) {
- if (action === 'confirm') {
- this._markAllAsRead();
- }
- }).bind(this));
+ this._markAllAsRead();
return false;
}).bind(this));
* Saves input values.
*/
_save: function () {
+ // check if there is an editor and if it is in WYSIWYG mode
+ var scrollToEditor = null;
+ elBySelAll('.redactor-layer', this._tab[0], function(redactorLayer) {
+ var data = {
+ api: {
+ throwError: elInnerError
+ },
+ valid: true
+ };
+ WCF.System.Event.fireEvent('com.woltlab.wcf.redactor2', 'validate_' + elData(redactorLayer, 'element-id'), data);
+
+ if (!data.valid && scrollToEditor === null) {
+ scrollToEditor = redactorLayer.parentNode;
+ }
+ });
+
+ if (scrollToEditor) {
+ scrollToEditor.scrollIntoView({ behavior: 'smooth' });
+ return;
+ }
+
this._actionName = 'save';
// collect values
* Loads likes once the user scrolls to the very bottom.
*
* @param integer userID
+ * @deprecated since 3.2
*/
WCF.User.LikeLoader = Class.extend({
/**