this._button.parentNode.appendChild(error);
}
- error.textContent = Language.get('wcf.acp.style.image.error.' + data.returnValues.errorType)
+ error.textContent = Language.get('wcf.acp.style.image.error.' + data.returnValues.errorType);
}
}
});
*/
add: function(captchaId, callback) {
if (_captchas.has(captchaId)) {
- throw new Error("Captcha with id '" + captchaId + "' is already registered.")
+ throw new Error("Captcha with id '" + captchaId + "' is already registered.");
}
if (typeof callback !== 'function') {
*/
'delete': function(captchaId) {
if (!_captchas.has(captchaId)) {
- throw new Error("Unknown captcha with id '" + captchaId + "'.")
+ throw new Error("Unknown captcha with id '" + captchaId + "'.");
}
_captchas.delete(captchaId)();
*/
getData: function(captchaId) {
if (!_captchas.has(captchaId)) {
- throw new Error("Unknown captcha with id '" + captchaId + "'.")
+ throw new Error("Unknown captcha with id '" + captchaId + "'.");
}
return _captchas.get(captchaId)();
elHide(hiddenElements[i]);
}
- _hiddenElements.set(dependentElement, [])
+ _hiddenElements.set(dependentElement, []);
},
_showDependentElement: function(dependentElement) {
}
}
};
-
- return ControllerConditionPageDependence;
});
return url.replace(/^index\.php\/(.*?)\/\?/, function(match, controller) {
var parts = controller.split(/([A-Z][a-z0-9]+)/);
- var controller = '';
+ controller = '';
for (var i = 0, length = parts.length; i < length; i++) {
var part = parts[i].trim();
if (part.length) {
}
if (!hasClass) {
- element.classList.add('short')
+ element.classList.add('short');
}
_data.set(element, {
*/
function Dictionary() {
this._dictionary = (_hasMap) ? new Map() : {};
- };
+ }
Dictionary.prototype = {
/**
* Sets a new key with given value, will overwrite an existing key.
* @module WoltLab/WCF/File/Util
*/
define([], function() {
+ "use strict";
+
/**
* @exports WoltLab/WCF/File/Util
*/
dropdownToggle.innerHTML = listItem.firstChild.innerHTML;
}
- listItem.addEventListener(WCF_CLICK_EVENT, callbackClick)
+ listItem.addEventListener(WCF_CLICK_EVENT, callbackClick);
}
else if (languageId === 0) {
dropdownToggle.innerHTML = null;
this._media = null;
this._dialogs = new Dictionary();
- };
+ }
MediaEditor.prototype = {
/**
* Returns the data for Ajax to setup the Ajax/Request object.
*/
edit: function(media) {
if (this._media !== null) {
- throw new Error("Cannot edit media with id '" + media.mediaID + "' while editing media with id '" + this._media.mediaID + "'")
+ throw new Error("Cannot edit media with id '" + media.mediaID + "' while editing media with id '" + this._media.mediaID + "'");
}
this._media = media;
}
DomChangeListener.add('WoltLab/WCF/Media/Manager', this._addButtonEventListeners.bind(this));
- };
+ }
MediaManagerBase.prototype = {
/**
* Adds click event listeners to media buttons.
}
this._mediaToInsert = new Dictionary();
this._mediaToInsertByClipboard = false;
- };
+ }
Core.inherit(MediaManagerEditor, MediaManagerBase, {
/**
* @see WoltLab/WCF/Media/Manager/Base#_addButtonEventListeners
title: Language.get('wcf.media.insert')
},
source: dialog
- }
+ };
}).bind(this)
});
},
this._cancelButton = elById(this._getIdPrefix() + 'SearchCancelButton');
this._cancelButton.addEventListener(WCF_CLICK_EVENT, this._cancelSearch.bind(this));
- };
+ }
Core.inherit(MediaManagerSearch, MediaSearch, {
/**
* Returns the data for Ajax to setup the Ajax/Request object.
}
}
}
- };
+ }
Core.inherit(MediaManagerSelect, MediaManagerBase, {
/**
* @see WoltLab/WCF/Media/Manager/Base#_addButtonEventListeners
else {
this._fileType = null;
}
- };
+ }
MediaSearch.prototype = {
/**
* Returns the prefix to identify search-related elements.
multiple: this._mediaManager ? true : false,
singleFileRequests: true
}, options));
- };
+ }
Core.inherit(MediaUpload, Upload, {
/**
* @see WoltLab/WCF/Upload#_createFileElement
*/
function ObjectMap() {
this._map = (_hasMap) ? new WeakMap() : { key: [], value: [] };
- };
+ }
ObjectMap.prototype = {
/**
* Sets a new key with given value, will overwrite an existing key.
console.debug(e.message);
throw e;
}
- };
+ }
Object.defineProperty(Template, 'callbacks', {
enumerable: false,
this._timer = undefined;
this.restart();
- };
+ }
Repeating.prototype = {
/**
* Stops the timer and restarts it. The next call will occur in `delta` milliseconds.
this.initContainers(options, objectType);
- DomChangeListener.add('WoltLab/WCF/Ui/Like/Handler-' + objectType, this.initContainers.bind(this))
+ DomChangeListener.add('WoltLab/WCF/Ui/Like/Handler-' + objectType, this.initContainers.bind(this));
},
/**
_updateDepth: function(increase) {
this._depth += (increase) ? 1 : -1;
- this._menu.children[0].style.setProperty('transform', 'translateX(' + (this._depth * -100) + '%)', '')
+ this._menu.children[0].style.setProperty('transform', 'translateX(' + (this._depth * -100) + '%)', '');
}
};
lastMatchingParent = this._getLastMatchingParent(strikeElement, editorElement, tagName);
if (lastMatchingParent !== null) {
- this._handleParentNodes(strikeElement, lastMatchingParent, tagName)
+ this._handleParentNodes(strikeElement, lastMatchingParent, tagName);
}
// remove offending elements from child nodes
init: function (editor, button) {
this._editor = editor;
- button.addEventListener(WCF_CLICK_EVENT, this._click.bind(this))
+ button.addEventListener(WCF_CLICK_EVENT, this._click.bind(this));
},
_click: function (event) {
_timeoutScroll = null;
}, 100);
}
- }
+ };
});
* @param {string} elementId input element id
* @param {object<mixed>} options option list
*/
- function UiSuggestion(elementId, options) { this.init(elementId, options); };
+ function UiSuggestion(elementId, options) { this.init(elementId, options); }
UiSuggestion.prototype = {
/**
* Initializes a new suggestion input.
/**
* @constructor
*/
- function UiUserList(options) { this.init(options); };
+ function UiUserList(options) { this.init(options); }
UiUserList.prototype = {
/**
* Initializes the user list.
data: {
className: 'wcf\\data\\user\\follow\\UserFollowAction'
}
- }
+ };
}
});
data: {
className: 'wcf\\data\\user\\ignore\\UserIgnoreAction'
}
- }
+ };
}
});
this._internalFileId = 0;
this._createButton();
- };
+ }
Upload.prototype = {
/**
* Creates the upload button.
return contents;
}
-})
+});
return contents;
}
-})
+});
queue.shift()();
}
- };
+ }
})(window);