Fix JavaScript issues
authorMatthias Schmidt <gravatronics@live.com>
Sat, 30 Jul 2016 17:20:36 +0000 (19:20 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sat, 30 Jul 2016 17:26:30 +0000 (19:26 +0200)
34 files changed:
wcfsetup/install/files/js/WoltLab/WCF/Acp/Ui/Article/Add.js
wcfsetup/install/files/js/WoltLab/WCF/Acp/Ui/Box/Add.js
wcfsetup/install/files/js/WoltLab/WCF/Acp/Ui/Page/Add.js
wcfsetup/install/files/js/WoltLab/WCF/Acp/Ui/Style/Image/Upload.js
wcfsetup/install/files/js/WoltLab/WCF/Controller/Captcha.js
wcfsetup/install/files/js/WoltLab/WCF/Controller/Condition/Page/Dependence.js
wcfsetup/install/files/js/WoltLab/WCF/Core.js
wcfsetup/install/files/js/WoltLab/WCF/Date/Picker.js
wcfsetup/install/files/js/WoltLab/WCF/Dictionary.js
wcfsetup/install/files/js/WoltLab/WCF/File/Util.js
wcfsetup/install/files/js/WoltLab/WCF/Language/Chooser.js
wcfsetup/install/files/js/WoltLab/WCF/Media/Editor.js
wcfsetup/install/files/js/WoltLab/WCF/Media/Manager/Base.js
wcfsetup/install/files/js/WoltLab/WCF/Media/Manager/Editor.js
wcfsetup/install/files/js/WoltLab/WCF/Media/Manager/Search.js
wcfsetup/install/files/js/WoltLab/WCF/Media/Manager/Select.js
wcfsetup/install/files/js/WoltLab/WCF/Media/Search.js
wcfsetup/install/files/js/WoltLab/WCF/Media/Upload.js
wcfsetup/install/files/js/WoltLab/WCF/ObjectMap.js
wcfsetup/install/files/js/WoltLab/WCF/Template.js
wcfsetup/install/files/js/WoltLab/WCF/Timer/Repeating.js
wcfsetup/install/files/js/WoltLab/WCF/Ui/Like/Handler.js
wcfsetup/install/files/js/WoltLab/WCF/Ui/Page/Menu/Abstract.js
wcfsetup/install/files/js/WoltLab/WCF/Ui/Redactor/Format.js
wcfsetup/install/files/js/WoltLab/WCF/Ui/Redactor/Page.js
wcfsetup/install/files/js/WoltLab/WCF/Ui/Scroll.js
wcfsetup/install/files/js/WoltLab/WCF/Ui/Suggestion.js
wcfsetup/install/files/js/WoltLab/WCF/Ui/User/List.js
wcfsetup/install/files/js/WoltLab/WCF/Ui/User/Profile/Menu/Item/Follow.js
wcfsetup/install/files/js/WoltLab/WCF/Ui/User/Profile/Menu/Item/Ignore.js
wcfsetup/install/files/js/WoltLab/WCF/Upload.js
wcfsetup/install/files/js/require.build-acp.js
wcfsetup/install/files/js/require.build.js
wcfsetup/install/files/js/require.linearExecution.js

index 85aa9e251518d2454232aec04417e515bea7fc0b..fda2a2eac3e03d73dfd17d7e64ceb56a78ee3adb 100644 (file)
@@ -59,5 +59,5 @@ define(['Core', 'Language', 'Ui/Dialog'], function(Core, Language, UiDialog) {
                                }
                        };
                }
-       }
+       };
 });
index 4ab6b6364163d1ce3ff3d0a8ed0c4ba00d5883aa..a949633037847f906f8ef7ca1d3d3095f1dec16b 100644 (file)
@@ -69,5 +69,5 @@ define(['Core', 'Language', 'Ui/Dialog'], function(Core, Language, UiDialog) {
                                }
                        };
                }
-       }
+       };
 });
index 08c439fdf0f00826c20e4f3b6f08b4444f96e419..cbdc4719e02974f0bbf0bf71a02e5fc8ba396e2e 100644 (file)
@@ -62,5 +62,5 @@ define(['Core', 'Language', 'Ui/Dialog'], function(Core, Language, UiDialog) {
                                }
                        };
                }
-       }
+       };
 });
index cefd66435fede81379ffd03fcb81b7b10489dbf7..955eef1feb2189a3243b64648e6b1e17767a25e4 100644 (file)
@@ -60,7 +60,7 @@ define(['Core', 'Dom/Traverse', 'Language', 'Ui/Notification', 'Upload'], functi
                                        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);
                        }
                }
        });
index 252c69889898a2aaf14b05c515f51588834da87d..cfeea23eeaf6c1fa9566b04ea25fcddb53386bc2 100644 (file)
@@ -23,7 +23,7 @@ define(['Dictionary'], function(Dictionary) {
                 */
                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') {
@@ -40,7 +40,7 @@ define(['Dictionary'], function(Dictionary) {
                 */
                '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)();
@@ -64,7 +64,7 @@ define(['Dictionary'], function(Dictionary) {
                 */
                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)();
index 7576f85c23792066775014ff6fe33b57783c259f..6ee856e9aaf5fc74db3ae21b5ab40d548291c008 100644 (file)
@@ -77,7 +77,7 @@ define(['Dom/ChangeListener', 'Dom/Traverse', 'EventHandler', 'ObjectMap'], func
                                elHide(hiddenElements[i]);
                        }
                        
-                       _hiddenElements.set(dependentElement, [])
+                       _hiddenElements.set(dependentElement, []);
                },
                
                _showDependentElement: function(dependentElement) {
@@ -94,6 +94,4 @@ define(['Dom/ChangeListener', 'Dom/Traverse', 'EventHandler', 'ObjectMap'], func
                        }
                }
        };
-       
-       return ControllerConditionPageDependence;
 });
index 84b4b7b4cf5ec34f2e66b3b26eaa06da05cdb9c2..7334663671d8af0e8a1d57628f734de1977c2cd6 100644 (file)
@@ -63,7 +63,7 @@ define([], function() {
                        
                        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) {
index 772d942acaa24aff45804672ada3571c54e41bb5..85507d400c6b27414c1eeff5802d1e925be4b61f 100644 (file)
@@ -154,7 +154,7 @@ define(['DateUtil', 'Language', 'ObjectMap', 'Dom/ChangeListener', 'Ui/Alignment
                                }
                                
                                if (!hasClass) {
-                                       element.classList.add('short')
+                                       element.classList.add('short');
                                }
                                
                                _data.set(element, {
index 98f805d6c7989a694fe18433233c41e9927a2bbe..81d9dd6d34e8eb79a8c0a2cc99766ab3f8e2293b 100644 (file)
@@ -18,7 +18,7 @@ define(['Core'], function(Core) {
         */
        function Dictionary() {
                this._dictionary = (_hasMap) ? new Map() : {};
-       };
+       }
        Dictionary.prototype = {
                /**
                 * Sets a new key with given value, will overwrite an existing key.
index 213693a027af8020b455c99dfbe34a99c08e8d34..844d7226cabc611fc905ed83ba4f0553f9e0ab98 100644 (file)
@@ -7,6 +7,8 @@
  * @module     WoltLab/WCF/File/Util
  */
 define([], function() {
+       "use strict";
+       
        /**
         * @exports     WoltLab/WCF/File/Util
         */
index aec198f99ea41b31da3a6608a31fdfa62f46ab35..b98090df0225d62f30950a9ee9b2ee25d37ce687 100644 (file)
@@ -159,7 +159,7 @@ define(['Dictionary', 'Language', 'Dom/Traverse', 'Dom/Util', 'ObjectMap', 'Ui/S
                                        dropdownToggle.innerHTML = listItem.firstChild.innerHTML;
                                }
                                
-                               listItem.addEventListener(WCF_CLICK_EVENT, callbackClick)
+                               listItem.addEventListener(WCF_CLICK_EVENT, callbackClick);
                        }
                        else if (languageId === 0) {
                                dropdownToggle.innerHTML = null;
index 7f2fbab9e1b9e57e2a0598246758755495e6c16c..c789084c16fa03c071765f5191bf98db31727b99 100644 (file)
@@ -38,7 +38,7 @@ define(
                this._media = null;
                
                this._dialogs = new Dictionary();
-       };
+       }
        MediaEditor.prototype = {
                /**
                 * Returns the data for Ajax to setup the Ajax/Request object.
@@ -222,7 +222,7 @@ define(
                 */
                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;
index 4d53faaadc6873ad78bd7cc36545c58546e1fbdd..b06dafb645115dd11227083ffcf868404de56ba7 100644 (file)
@@ -42,7 +42,7 @@ define(
                }
                
                DomChangeListener.add('WoltLab/WCF/Media/Manager', this._addButtonEventListeners.bind(this));
-       };
+       }
        MediaManagerBase.prototype = {
                /**
                 * Adds click event listeners to media buttons.
index fa23a9ef9d69960de91ec88ecdfb12c93c38b282..4571f2dc39629a6466eddff5af452aa4a3e49536 100644 (file)
@@ -26,7 +26,7 @@ define(['Core', 'Dictionary', 'Dom/Traverse', 'Language', 'Ui/Dialog', 'WoltLab/
                }
                this._mediaToInsert = new Dictionary();
                this._mediaToInsertByClipboard = false;
-       };
+       }
        Core.inherit(MediaManagerEditor, MediaManagerBase, {
                /**
                 * @see WoltLab/WCF/Media/Manager/Base#_addButtonEventListeners
@@ -119,7 +119,7 @@ define(['Core', 'Dictionary', 'Dom/Traverse', 'Language', 'Ui/Dialog', 'WoltLab/
                                                        title: Language.get('wcf.media.insert')
                                                },
                                                source: dialog
-                                       }
+                                       };
                                }).bind(this)
                        });
                },
index f2bdd5cbf3b730290f7dc17ef6eae38dfc099257..d2b362d8a4ed54af028d1a57d345d54aca5bdd26 100644 (file)
@@ -23,7 +23,7 @@ define(['Ajax', 'Core', 'Dom/Traverse', 'Dom/Util', 'Language', 'WoltLab/WCF/Med
                
                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.
index fcc44dc8d28a7212610054eac31e7e5945246554..295479382680e2d20281f6a1db1bf4f8c95c2d08 100644 (file)
@@ -45,7 +45,7 @@ define(['Core', 'Dom/Traverse', 'Dom/Util', 'Language', 'ObjectMap', 'Ui/Dialog'
                                }
                        }
                }
-       };
+       }
        Core.inherit(MediaManagerSelect, MediaManagerBase, {
                /**
                 * @see WoltLab/WCF/Media/Manager/Base#_addButtonEventListeners
index ceec34dfea227e6632c7a495599bcd946d150a16..aa88a1bcd2c0359784d4780e37158ba2756f4eee 100644 (file)
@@ -51,7 +51,7 @@ define(['Ajax', 'Dom/Traverse', 'Dom/Util', 'Language', 'Ui/SimpleDropdown'], fu
                else {
                        this._fileType = null;
                }
-       };
+       }
        MediaSearch.prototype = {
                /**
                 * Returns the prefix to identify search-related elements.
index 6e63317d0260f5c9a65bc19e96a7f7d452981dd5..aba3291f1520d60fdb07b6b29035a47c870226a7 100644 (file)
@@ -37,7 +37,7 @@ define(
                        multiple: this._mediaManager ? true : false,
                        singleFileRequests: true
                }, options));
-       };
+       }
        Core.inherit(MediaUpload, Upload, {
                /**
                 * @see WoltLab/WCF/Upload#_createFileElement
index 073fb8f5ed9088d75d7cdb3601c4566bad610367..1399586a1659a4e18720e16d87404773138df1dc 100644 (file)
@@ -18,7 +18,7 @@ define([], function() {
         */
        function ObjectMap() {
                this._map = (_hasMap) ? new WeakMap() : { key: [], value: [] };
-       };
+       }
        ObjectMap.prototype = {
                /**
                 * Sets a new key with given value, will overwrite an existing key.
index 47c39d7a41a63877d8a2870d4b3a414857bf9b64..0620d9a205f1385510b44ed2295ed4692ef1a271 100644 (file)
@@ -45,7 +45,7 @@ define(['./Template.grammar', './StringUtil', 'Language'], function(parser, Stri
                        console.debug(e.message);
                        throw e;
                }
-       };
+       }
        
        Object.defineProperty(Template, 'callbacks', {
                enumerable: false,
index baa94f72b22515b57a6a238784cd8d650843d02a..0fd86977b28de0265457877842880dfab1b78fc2 100644 (file)
@@ -33,7 +33,7 @@ define([], function() {
                this._timer = undefined;
                
                this.restart();
-       };
+       }
        Repeating.prototype = {
                /**
                 * Stops the timer and restarts it. The next call will occur in `delta` milliseconds.
index 1004588aea3998bad285df095145117d9cf94b09..5e86fc2c9834d692d0859a4d9166b32c7b059750 100644 (file)
@@ -66,7 +66,7 @@ define(
                        
                        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));
                },
                
                /**
index 19c4a388fd0a31825130fc9f83540df40fb0f8fb..185fdf507c1407a4234ed2885e4afc8da283a721 100644 (file)
@@ -367,7 +367,7 @@ define(['Environment', 'EventHandler', 'ObjectMap', 'Dom/Traverse', 'Dom/Util',
                _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) + '%)', '');
                }
        };
        
index 0fae363b866ca30ef0252a42e935b1b1da55e11c..6f832091a403fb4c0d0283e31f9e836431bd2b01 100644 (file)
@@ -149,7 +149,7 @@ define(['Dom/Util'], function(DomUtil) {
                                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
index b5b6c8640558a197be8caa3001d4eb6e82240bdc..210c5ad9500b19be3edba785f5ba851a7967283b 100644 (file)
@@ -14,7 +14,7 @@ define(['WoltLab/WCF/Ui/Page/Search'], function(UiPageSearch) {
                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) {
index ff759d83ae68c66770538a6b6ecb841c406cdf56..a872499897f57d4c4b27516fbb1ac2e0ccb3c3c3 100644 (file)
@@ -80,5 +80,5 @@ define(['Dom/Util'], function(DomUtil) {
                                _timeoutScroll = null;
                        }, 100);
                }
-       }
+       };
 });
index 5928e7af84560e48d78450d312f5dfa99d288988..3aed6eff1679e531cbfd272e9ae63f5044b15116 100644 (file)
@@ -14,7 +14,7 @@ define(['Ajax', 'Core', 'Ui/SimpleDropdown'], function(Ajax, Core, UiSimpleDropd
         * @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.
index a36316579d66615c5c4e1c2604f792a8281354ec..11c91505669a1a8f85844a1919ffb9a82ac59c27 100644 (file)
@@ -12,7 +12,7 @@ define(['Ajax', 'Core', 'Dictionary', 'Dom/Util', 'Ui/Dialog', 'WoltLab/WCF/Ui/P
        /**
         * @constructor
         */
-       function UiUserList(options) { this.init(options); };
+       function UiUserList(options) { this.init(options); }
        UiUserList.prototype = {
                /**
                 * Initializes the user list.
index 4506029572896fda0c3fd786ffcc97b31cf9cf6c..67fa968ae2ae33b7b82c3952167455abfb00bfd8 100644 (file)
@@ -23,7 +23,7 @@ define(['Core', 'Language', 'Ui/Notification', './Abstract'], function(Core, Lan
                                data: {
                                        className: 'wcf\\data\\user\\follow\\UserFollowAction'
                                }
-                       }
+                       };
                }
        });
        
index 41d977910301fc63f83aa814715d6266a69b0abc..92e5a130d4a12157e102229b8d502d0c5743340c 100644 (file)
@@ -23,7 +23,7 @@ define(['Core', 'Language', 'Ui/Notification', './Abstract'], function(Core, Lan
                                data: {
                                        className: 'wcf\\data\\user\\ignore\\UserIgnoreAction'
                                }
-                       }
+                       };
                }
        });
        
index cbbf507299744878aca8eb733b60d73cd177414c..55a3bd7fdeea5af58423b9b32b05601b5004416b 100644 (file)
@@ -52,7 +52,7 @@ define(['AjaxRequest', 'Core', 'Dom/ChangeListener', 'Language', 'Dom/Util', 'Do
                this._internalFileId = 0;
                
                this._createButton();
-       };
+       }
        Upload.prototype = {
                /**
                 * Creates the upload button.
index ae2aca418448f1fe5853103e55d1593d099f4dc7..dbaf368a8ecab087ba7d320027e5f520ab3c3811 100644 (file)
@@ -48,4 +48,4 @@
                
                return contents;
        }
-})
+});
index c2f504e97d8e5febfab6870416e718ce190452db..12ac7bb7aaa70fbb619ca73209c8a5999b0fb6ab 100644 (file)
@@ -59,4 +59,4 @@
                
                return contents;
        }
-})
+});
index e134fbbfce33276e6c8feafa700ae6317c59c19c..4729d6725dff68deaa081dc5383e780115935433 100644 (file)
@@ -29,5 +29,5 @@
                        
                        queue.shift()();
                }
-       };
+       }
 })(window);