From 9a421cc7d9aca7caedad74c6c083a477c062b439 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 11 Jul 2015 00:03:52 +0200 Subject: [PATCH] Enforced strict camel case naming --- .../install/files/acp/templates/header.tpl | 4 +-- .../files/js/WoltLab/WCF/Acp/Bootstrap.js | 8 ++--- .../files/js/WoltLab/WCF/Ajax/Request.js | 6 ++-- .../files/js/WoltLab/WCF/Bbcode/FromHtml.js | 18 +++++----- .../files/js/WoltLab/WCF/Bbcode/Parser.js | 8 ++--- .../files/js/WoltLab/WCF/Bbcode/ToHtml.js | 12 +++---- .../install/files/js/WoltLab/WCF/Bootstrap.js | 20 +++++------ .../js/WoltLab/WCF/Controller/Clipboard.js | 30 ++++++++-------- .../js/WoltLab/WCF/Controller/Popover.js | 12 +++---- .../js/WoltLab/WCF/Controller/Sitemap.js | 8 ++--- .../WoltLab/WCF/Controller/Style/Changer.js | 4 +-- .../Controller/User/Notification/Settings.js | 10 +++--- .../files/js/WoltLab/WCF/Date/Picker.js | 8 ++--- .../js/WoltLab/WCF/Date/Time/Relative.js | 4 +-- .../js/WoltLab/WCF/Dom/Change/Listener.js | 4 +-- .../files/js/WoltLab/WCF/Dom/Traverse.js | 12 +++---- .../install/files/js/WoltLab/WCF/Dom/Util.js | 10 +++--- .../files/js/WoltLab/WCF/Language/Input.js | 14 ++++---- .../files/js/WoltLab/WCF/Ui/Alignment.js | 22 ++++++------ .../files/js/WoltLab/WCF/Ui/CloseOverlay.js | 10 +++--- .../js/WoltLab/WCF/Ui/Collapsible/Sidebar.js | 12 +++---- .../files/js/WoltLab/WCF/Ui/Confirmation.js | 18 +++++----- .../install/files/js/WoltLab/WCF/Ui/Dialog.js | 32 ++++++++--------- .../js/WoltLab/WCF/Ui/Dropdown/Simple.js | 34 +++++++++---------- .../files/js/WoltLab/WCF/Ui/FlexibleMenu.js | 28 +++++++-------- .../files/js/WoltLab/WCF/Ui/ItemList.js | 18 +++++----- .../files/js/WoltLab/WCF/Ui/ItemList/User.js | 16 ++++----- .../install/files/js/WoltLab/WCF/Ui/Mobile.js | 18 +++++----- .../files/js/WoltLab/WCF/Ui/Suggestion.js | 26 +++++++------- .../files/js/WoltLab/WCF/Ui/TabMenu.js | 14 ++++---- .../files/js/WoltLab/WCF/Ui/TabMenu/Simple.js | 10 +++--- .../files/js/WoltLab/WCF/Ui/Tooltip.js | 14 ++++---- wcfsetup/install/files/js/require.config.js | 18 +++++----- 33 files changed, 241 insertions(+), 241 deletions(-) diff --git a/wcfsetup/install/files/acp/templates/header.tpl b/wcfsetup/install/files/acp/templates/header.tpl index 679a5d61be..8670dc9175 100644 --- a/wcfsetup/install/files/acp/templates/header.tpl +++ b/wcfsetup/install/files/acp/templates/header.tpl @@ -32,7 +32,7 @@ diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Acp/Bootstrap.js b/wcfsetup/install/files/js/WoltLab/WCF/Acp/Bootstrap.js index 1243c441e8..17460a4c9e 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Acp/Bootstrap.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Acp/Bootstrap.js @@ -4,7 +4,7 @@ * @author Alexander Ebert * @copyright 2001-2015 WoltLab GmbH * @license GNU Lesser General Public License - * @module WoltLab/WCF/ACP/Bootstrap + * @module WoltLab/WCF/Acp/Bootstrap */ define(['WoltLab/WCF/Bootstrap'], function(Bootstrap) { "use strict"; @@ -12,9 +12,9 @@ define(['WoltLab/WCF/Bootstrap'], function(Bootstrap) { /** * ACP Boostrapper. * - * @exports WoltLab/WCF/ACP/Bootstrap + * @exports WoltLab/WCF/Acp/Bootstrap */ - var ACPBootstrap = { + var AcpBootstrap = { /** * Bootstraps general modules and frontend exclusive ones. * @@ -25,5 +25,5 @@ define(['WoltLab/WCF/Bootstrap'], function(Bootstrap) { } }; - return ACPBootstrap; + return AcpBootstrap; }); diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Ajax/Request.js b/wcfsetup/install/files/js/WoltLab/WCF/Ajax/Request.js index c0c73e86f7..e068e75437 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Ajax/Request.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Ajax/Request.js @@ -8,7 +8,7 @@ * @license GNU Lesser General Public License * @module WoltLab/WCF/Ajax/Request */ -define(['Core', 'Language', 'DOM/ChangeListener', 'DOM/Util', 'UI/Dialog', 'WoltLab/WCF/Ajax/Status'], function(Core, Language, DOMChangeListener, DOMUtil, UIDialog, AjaxStatus) { +define(['Core', 'Language', 'Dom/ChangeListener', 'Dom/Util', 'Ui/Dialog', 'WoltLab/WCF/Ajax/Status'], function(Core, Language, DomChangeListener, DomUtil, UiDialog, AjaxStatus) { "use strict"; var _didInit = false; @@ -270,7 +270,7 @@ define(['Core', 'Language', 'DOM/ChangeListener', 'DOM/Util', 'UI/Dialog', 'Wolt var html = '

' + message + '

' + details + '
'; - UIDialog.openStatic(DOMUtil.getUniqueId(), html, { + UiDialog.openStatic(DomUtil.getUniqueId(), html, { title: Language.get('wcf.global.error.title') }); } @@ -290,7 +290,7 @@ define(['Core', 'Language', 'DOM/ChangeListener', 'DOM/Util', 'UI/Dialog', 'Wolt this._previousXhr = null; - DOMChangeListener.trigger(); + DomChangeListener.trigger(); // fix anchor tags generated through WCF::getAnchor() var links = document.querySelectorAll('a[href*="#"]'); diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Bbcode/FromHtml.js b/wcfsetup/install/files/js/WoltLab/WCF/Bbcode/FromHtml.js index 9745f1862e..3e95ff1091 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Bbcode/FromHtml.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Bbcode/FromHtml.js @@ -4,9 +4,9 @@ * @author Alexander Ebert * @copyright 2001-2015 WoltLab GmbH * @license GNU Lesser General Public License - * @module WoltLab/WCF/BBCode/FromHtml + * @module WoltLab/WCF/Bbcode/FromHtml */ -define(['EventHandler', 'StringUtil', 'DOM/Traverse'], function(EventHandler, StringUtil, DOMTraverse) { +define(['EventHandler', 'StringUtil', 'Dom/Traverse'], function(EventHandler, StringUtil, DomTraverse) { "use strict"; var _converter = []; @@ -30,9 +30,9 @@ define(['EventHandler', 'StringUtil', 'DOM/Traverse'], function(EventHandler, St } /** - * @module WoltLab/WCF/BBCode/FromHtml + * @module WoltLab/WCF/Bbcode/FromHtml */ - var BBCodeFromHtml = { + var BbcodeFromHtml = { /** * Converts a message containing HTML elements into BBCodes. * @@ -259,10 +259,10 @@ define(['EventHandler', 'StringUtil', 'DOM/Traverse'], function(EventHandler, St } } - var header = DOMTraverse.childByTag(element, 'HEADER'); + var header = DomTraverse.childByTag(element, 'HEADER'); if (header !== null) element.removeChild(header); - var divs = DOMTraverse.childrenByTag(element, 'DIV'); + var divs = DomTraverse.childrenByTag(element, 'DIV'); for (var i = 0, length = divs.length; i < length; i++) { divs[i].outerHTML = divs[i].innerHTML + '\n'; } @@ -487,7 +487,7 @@ define(['EventHandler', 'StringUtil', 'DOM/Traverse'], function(EventHandler, St elements[0].outerHTML = '\n[tr]\n' + elements[0].innerHTML + '[/tr]'; } - var tbody = DOMTraverse.childByTag(element, 'TBODY'); + var tbody = DomTraverse.childByTag(element, 'TBODY'); var innerHtml = (tbody === null) ? element.innerHTML : tbody.innerHTML; element.outerHTML = '\n[table]' + innerHtml + '\n[/table]\n'; }, @@ -528,7 +528,7 @@ define(['EventHandler', 'StringUtil', 'DOM/Traverse'], function(EventHandler, St var filename = element.getAttribute('data-filename').trim() || ''; var highlighter = element.getAttribute('data-highlighter') || ''; window.dtdesign = element; - var list = DOMTraverse.childByTag(element.children[0], 'OL'); + var list = DomTraverse.childByTag(element.children[0], 'OL'); var lineNumber = ~~list.getAttribute('start') || 1; var content = ''; @@ -543,5 +543,5 @@ define(['EventHandler', 'StringUtil', 'DOM/Traverse'], function(EventHandler, St } }; - return BBCodeFromHtml; + return BbcodeFromHtml; }); diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Bbcode/Parser.js b/wcfsetup/install/files/js/WoltLab/WCF/Bbcode/Parser.js index 3fbb4a1408..6facdf3588 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Bbcode/Parser.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Bbcode/Parser.js @@ -4,15 +4,15 @@ * @author Alexander Ebert * @copyright 2001-2015 WoltLab GmbH * @license GNU Lesser General Public License - * @module WoltLab/WCF/BBCode/Parser + * @module WoltLab/WCF/Bbcode/Parser */ define([], function() { "use strict"; /** - * @module WoltLab/WCF/BBCode/Parser + * @module WoltLab/WCF/Bbcode/Parser */ - var BBCodeParser = { + var BbcodeParser = { /** * Parses a message and returns an XML-conform linear tree. * @@ -197,5 +197,5 @@ define([], function() { } }; - return BBCodeParser; + return BbcodeParser; }); diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Bbcode/ToHtml.js b/wcfsetup/install/files/js/WoltLab/WCF/Bbcode/ToHtml.js index 399d2eb5b4..6431598ed4 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Bbcode/ToHtml.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Bbcode/ToHtml.js @@ -4,9 +4,9 @@ * @author Alexander Ebert * @copyright 2001-2015 WoltLab GmbH * @license GNU Lesser General Public License - * @module WoltLab/WCF/BBCode/ToHtml + * @module WoltLab/WCF/Bbcode/ToHtml */ -define(['Core', 'EventHandler', 'Language', 'StringUtil', 'WoltLab/WCF/BBCode/Parser'], function(Core, EventHandler, Language, StringUtil, BBCodeParser) { +define(['Core', 'EventHandler', 'Language', 'StringUtil', 'WoltLab/WCF/Bbcode/Parser'], function(Core, EventHandler, Language, StringUtil, BbcodeParser) { "use strict"; var _bbcodes = null; @@ -46,9 +46,9 @@ define(['Core', 'EventHandler', 'Language', 'StringUtil', 'WoltLab/WCF/BBCode/Pa } /** - * @module WoltLab/WCF/BBCode/ToHtml + * @module WoltLab/WCF/Bbcode/ToHtml */ - var BBCodeToHtml = { + var BbcodeToHtml = { /** * Converts a message containing BBCodes to HTML. * @@ -66,7 +66,7 @@ define(['Core', 'EventHandler', 'Language', 'StringUtil', 'WoltLab/WCF/BBCode/Pa this._convertSpecials(message); - var stack = BBCodeParser.parse(message); + var stack = BbcodeParser.parse(message); if (stack.length) { this._initBBCodes(); @@ -619,5 +619,5 @@ define(['Core', 'EventHandler', 'Language', 'StringUtil', 'WoltLab/WCF/BBCode/Pa } }; - return BBCodeToHtml; + return BbcodeToHtml; }); diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Bootstrap.js b/wcfsetup/install/files/js/WoltLab/WCF/Bootstrap.js index 58937bb102..f26432f96a 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Bootstrap.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Bootstrap.js @@ -11,14 +11,14 @@ define( [ 'favico', 'enquire', 'perfect-scrollbar', 'WoltLab/WCF/Date/Time/Relative', - 'UI/SimpleDropdown', 'WoltLab/WCF/UI/Mobile', 'WoltLab/WCF/UI/TabMenu', 'WoltLab/WCF/UI/FlexibleMenu', - 'UI/Dialog', 'WoltLab/WCF/UI/Tooltip', 'WoltLab/WCF/Language', 'WoltLab/WCF/Environment', + 'Ui/SimpleDropdown', 'WoltLab/WCF/Ui/Mobile', 'WoltLab/WCF/Ui/TabMenu', 'WoltLab/WCF/Ui/FlexibleMenu', + 'Ui/Dialog', 'WoltLab/WCF/Ui/Tooltip', 'WoltLab/WCF/Language', 'WoltLab/WCF/Environment', 'WoltLab/WCF/Date/Picker' ], function( favico, enquire, perfectScrollbar, DateTimeRelative, - UISimpleDropdown, UIMobile, UITabMenu, UIFlexibleMenu, - UIDialog, UITooltip, Language, Environment, + UiSimpleDropdown, UiMobile, UiTabMenu, UiFlexibleMenu, + UiDialog, UiTooltip, Language, Environment, DatePicker ) { @@ -47,12 +47,12 @@ define( DateTimeRelative.setup(); DatePicker.init(); - UISimpleDropdown.setup(); - UIMobile.setup(); - UITabMenu.setup(); - UIFlexibleMenu.setup(); - UIDialog.setup(); - UITooltip.setup(); + UiSimpleDropdown.setup(); + UiMobile.setup(); + UiTabMenu.setup(); + UiFlexibleMenu.setup(); + UiDialog.setup(); + UiTooltip.setup(); // convert method=get into method=post var forms = document.querySelectorAll('form[method=get]'); diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Controller/Clipboard.js b/wcfsetup/install/files/js/WoltLab/WCF/Controller/Clipboard.js index 69a7d94cf0..17e8dac000 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Controller/Clipboard.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Controller/Clipboard.js @@ -9,13 +9,13 @@ define( [ 'Ajax', 'Core', 'Dictionary', 'EventHandler', - 'Language', 'List', 'ObjectMap', 'DOM/ChangeListener', - 'DOM/Traverse', 'DOM/Util', 'UI/Confirmation', 'UI/SimpleDropdown' + 'Language', 'List', 'ObjectMap', 'Dom/ChangeListener', + 'Dom/Traverse', 'Dom/Util', 'Ui/Confirmation', 'Ui/SimpleDropdown' ], function( Ajax, Core, Dictionary, EventHandler, - Language, List, ObjectMap, DOMChangeListener, - DOMTraverse, DOMUtil, UIConfirmation, UISimpleDropdown + Language, List, ObjectMap, DomChangeListener, + DomTraverse, DomUtil, UiConfirmation, UiSimpleDropdown ) { "use strict"; @@ -63,7 +63,7 @@ define( this._loadMarkedItems(); } - DOMChangeListener.add('WoltLab/WCF/Controller/Clipboard', this._initContainers.bind(this)); + DomChangeListener.add('WoltLab/WCF/Controller/Clipboard', this._initContainers.bind(this)); }, /** @@ -81,7 +81,7 @@ define( _initContainers: function() { for (var i = 0, length = _elements.length; i < length; i++) { var container = _elements[i]; - var containerId = DOMUtil.identify(container); + var containerId = DomUtil.identify(container); var containerData = _containers.get(containerId); if (containerData === undefined) { @@ -125,7 +125,7 @@ define( } } catch (e) { - throw new Error("Expected a valid 'data-type' attribute for element '" + DOMUtil.identify(editor) + "'."); + throw new Error("Expected a valid 'data-type' attribute for element '" + DomUtil.identify(editor) + "'."); } return []; @@ -190,7 +190,7 @@ define( } } - var clipboardObject = DOMTraverse.parentByClass(checkbox, 'jsClipboardObject'); + var clipboardObject = DomTraverse.parentByClass(checkbox, 'jsClipboardObject'); if (clipboardObject !== null) { clipboardObject.classList[(isMarked ? 'addClass' : 'removeClass')]('jsMarked'); } @@ -212,7 +212,7 @@ define( var data = _containers.get(containerId); var type = data.element.getAttribute('data-type'); - var clipboardObject = DOMTraverse.parentByClass(checkbox, 'jsClipboardObject'); + var clipboardObject = DomTraverse.parentByClass(checkbox, 'jsClipboardObject'); data.markedObjectIds[(isMarked ? 'add' : 'delete')](objectId); clipboardObject.classList[(isMarked) ? 'add' : 'remove']('jsMarked'); @@ -285,12 +285,12 @@ define( if (confirmMessage.length) { var template = (typeof data.internalData.template === 'string') ? data.internalData.template : ''; - UIConfirmation.show({ + UiConfirmation.show({ confirm: (function() { var formData = {}; if (template.length) { - var items = UIConfirmation.getContentElement().querySelectorAll('input, select, textarea'); + var items = UiConfirmation.getContentElement().querySelectorAll('input, select, textarea'); for (var i = 0, length = items.length; i < length; i++) { var item = items[i]; var name = item.getAttribute('name'); @@ -327,7 +327,7 @@ define( else if (confirmMessage.length) { fireEvent = false; - UIConfirmation.show({ + UiConfirmation.show({ confirm: triggerEvent, message: confirmMessage }); @@ -467,7 +467,7 @@ define( var typeData = data.returnValues.items[typeName]; var editor = _editors.get(typeName); - var lists = DOMTraverse.childrenByTag(editor, 'UL'); + var lists = DomTraverse.childrenByTag(editor, 'UL'); var list = lists[0] || null; if (list === null) { list = document.createElement('ul'); @@ -521,7 +521,7 @@ define( unmarkAll.addEventListener('click', _callbackUnmarkAll); editor.appendChild(fragment); - UISimpleDropdown.init(toggleButton, false); + UiSimpleDropdown.init(toggleButton, false); } }, @@ -536,7 +536,7 @@ define( for (var i = 0, length = data.checkboxes.length; i < length; i++) { var checkbox = data.checkboxes[i]; - var clipboardObject = DOMTraverse.parentByClass(checkbox, 'jsClipboardObject'); + var clipboardObject = DomTraverse.parentByClass(checkbox, 'jsClipboardObject'); var isMarked = (objectIds.indexOf(~~checkbox.getAttribute('data-object-id')) !== -1); if (!isMarked) markAll = false; diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Controller/Popover.js b/wcfsetup/install/files/js/WoltLab/WCF/Controller/Popover.js index b106cc0da5..6122f9654b 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Controller/Popover.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Controller/Popover.js @@ -6,7 +6,7 @@ * @license GNU Lesser General Public License * @module WoltLab/WCF/Controller/Popover */ -define(['Ajax', 'Dictionary', 'Environment', 'DOM/ChangeListener', 'DOM/Util', 'UI/Alignment'], function(Ajax, Dictionary, Environment, DOMChangeListener, DOMUtil, UIAlignment) { +define(['Ajax', 'Dictionary', 'Environment', 'Dom/ChangeListener', 'Dom/Util', 'Ui/Alignment'], function(Ajax, Dictionary, Environment, DomChangeListener, DomUtil, UiAlignment) { "use strict"; var _activeId = null; @@ -92,7 +92,7 @@ define(['Ajax', 'Dictionary', 'Environment', 'DOM/ChangeListener', 'DOM/Util', ' this._hide(true); }).bind(this)); - DOMChangeListener.add('WoltLab/WCF/Controller/Popover', this._init.bind(this)); + DomChangeListener.add('WoltLab/WCF/Controller/Popover', this._init.bind(this)); }, /** @@ -162,7 +162,7 @@ define(['Ajax', 'Dictionary', 'Environment', 'DOM/ChangeListener', 'DOM/Util', ' for (var i = 0, length = elements.length; i < length; i++) { var element = elements[i]; - var id = DOMUtil.identify(element); + var id = DomUtil.identify(element); if (_cache.has(id)) { return; } @@ -211,7 +211,7 @@ define(['Ajax', 'Dictionary', 'Environment', 'DOM/ChangeListener', 'DOM/Util', ' throw new Error("Unable to find element for object id '" + objectId + "' (identifier: '" + identifier + "')."); } - data.content = DOMUtil.createFragmentFromHtml(content); + data.content = DomUtil.createFragmentFromHtml(content); data.state = STATE_READY; if (_activeId) { @@ -238,7 +238,7 @@ define(['Ajax', 'Dictionary', 'Environment', 'DOM/ChangeListener', 'DOM/Util', ' _timeoutEnter = null; } - var id = DOMUtil.identify(event.currentTarget); + var id = DomUtil.identify(event.currentTarget); if (_activeId === id && _timeoutLeave !== null) { window.clearTimeout(_timeoutLeave); _timeoutLeave = null; @@ -393,7 +393,7 @@ define(['Ajax', 'Dictionary', 'Environment', 'DOM/ChangeListener', 'DOM/Util', ' } } - UIAlignment.set(_popover, _elements.get(_activeId).element, { + UiAlignment.set(_popover, _elements.get(_activeId).element, { pointer: true, vertical: 'top', verticalOffset: 3 diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Controller/Sitemap.js b/wcfsetup/install/files/js/WoltLab/WCF/Controller/Sitemap.js index 7a23b5c7a1..5c2fad13af 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Controller/Sitemap.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Controller/Sitemap.js @@ -6,7 +6,7 @@ * @license GNU Lesser General Public License * @module WoltLab/WCF/Controller/Sitemap */ -define(['Ajax', 'EventHandler', 'Language', 'DOM/Util', 'UI/Dialog', 'UI/TabMenu'], function(Ajax, EventHandler, Language, DOMUtil, UIDialog, UITabMenu) { +define(['Ajax', 'EventHandler', 'Language', 'Dom/Util', 'Ui/Dialog', 'Ui/TabMenu'], function(Ajax, EventHandler, Language, DomUtil, UiDialog, UiTabMenu) { "use strict"; var _cache = []; @@ -31,7 +31,7 @@ define(['Ajax', 'EventHandler', 'Language', 'DOM/Util', 'UI/Dialog', 'UI/TabMenu _click: function(event) { event.preventDefault(); - UIDialog.open(this); + UiDialog.open(this); }, _ajaxSetup: function() { @@ -65,9 +65,9 @@ define(['Ajax', 'EventHandler', 'Language', 'DOM/Util', 'UI/Dialog', 'UI/TabMenu _cache.push(data.returnValues.sitemapName); var tabMenuContainer = content.querySelector('.tabMenuContainer'); - var menuId = DOMUtil.identify(tabMenuContainer); + var menuId = DomUtil.identify(tabMenuContainer); - UITabMenu.getTabMenu(menuId).select('sitemap_' + data.returnValues.sitemapName); + UiTabMenu.getTabMenu(menuId).select('sitemap_' + data.returnValues.sitemapName); EventHandler.add('com.woltlab.wcf.simpleTabMenu_' + menuId, 'select', this.showTab.bind(this)); }).bind(this) diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Controller/Style/Changer.js b/wcfsetup/install/files/js/WoltLab/WCF/Controller/Style/Changer.js index 99d7e14d11..cd77cb8f45 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Controller/Style/Changer.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Controller/Style/Changer.js @@ -6,7 +6,7 @@ * @license GNU Lesser General Public License * @module WoltLab/WCF/Controller/Style/Changer */ -define(['Ajax', 'Language', 'UI/Dialog'], function(Ajax, Language, UIDialog) { +define(['Ajax', 'Language', 'Ui/Dialog'], function(Ajax, Language, UiDialog) { "use strict"; /** @@ -42,7 +42,7 @@ define(['Ajax', 'Language', 'UI/Dialog'], function(Ajax, Language, UIDialog) { showDialog: function(event) { event.preventDefault(); - UIDialog.open(this); + UiDialog.open(this); }, _dialogSetup: function() { diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Controller/User/Notification/Settings.js b/wcfsetup/install/files/js/WoltLab/WCF/Controller/User/Notification/Settings.js index cdc6fbc050..fb9fc73b5a 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Controller/User/Notification/Settings.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Controller/User/Notification/Settings.js @@ -6,7 +6,7 @@ * @license GNU Lesser General Public License * @module WoltLab/WCF/Controller/User/Notification/Settings */ -define(['Dictionary', 'Language', 'DOM/Traverse', 'UI/SimpleDropdown'], function(Dictionary, Language, DOMTraverse, UISimpleDropdown) { +define(['Dictionary', 'Language', 'Dom/Traverse', 'Ui/SimpleDropdown'], function(Dictionary, Language, DomTraverse, UiSimpleDropdown) { "use strict"; var _data = new Dictionary(); @@ -52,9 +52,9 @@ define(['Dictionary', 'Language', 'DOM/Traverse', 'UI/SimpleDropdown'], function var enabledNotification = document.getElementById('settings_' + groupId + '_enabled'); enabledNotification.addEventListener('click', function() { mailSetting.classList.add('active'); }); - var mailValue = DOMTraverse.childByTag(mailSetting, 'INPUT'); + var mailValue = DomTraverse.childByTag(mailSetting, 'INPUT'); - var button = DOMTraverse.childByTag(mailSetting, 'A'); + var button = DomTraverse.childByTag(mailSetting, 'A'); button.setAttribute('data-object-id', groupId); button.addEventListener('click', _callbackClick); @@ -83,10 +83,10 @@ define(['Dictionary', 'Language', 'DOM/Traverse', 'UI/SimpleDropdown'], function button.parentNode.classList.add('dropdown'); button.parentNode.appendChild(data.dropdownMenu); - UISimpleDropdown.init(button, true); + UiSimpleDropdown.init(button, true); } else { - var items = DOMTraverse.childrenByTag(data.dropdownMenu, 'LI'), value = data.mailValue.value; + var items = DomTraverse.childrenByTag(data.dropdownMenu, 'LI'), value = data.mailValue.value; for (var i = 0; i < 4; i++) { items[i].classList[(items[i].getAttribute('data-value') === value) ? 'add' : 'remove']('active'); } diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Date/Picker.js b/wcfsetup/install/files/js/WoltLab/WCF/Date/Picker.js index 96e57309d4..21c2fc1840 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Date/Picker.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Date/Picker.js @@ -6,7 +6,7 @@ * @license GNU Lesser General Public License * @module WoltLab/WCF/Date/Picker */ -define(['DateUtil', 'Language', 'ObjectMap', 'DOM/ChangeListener', 'UI/Alignment', 'WoltLab/WCF/UI/CloseOverlay'], function(DateUtil, Language, ObjectMap, DOMChangeListener, UIAlignment, UICloseOverlay) { +define(['DateUtil', 'Language', 'ObjectMap', 'Dom/ChangeListener', 'Ui/Alignment', 'WoltLab/WCF/Ui/CloseOverlay'], function(DateUtil, Language, ObjectMap, DomChangeListener, UiAlignment, UiCloseOverlay) { "use strict"; var _didInit = false; @@ -175,8 +175,8 @@ define(['DateUtil', 'Language', 'ObjectMap', 'DOM/ChangeListener', 'UI/Alignment _firstDayOfWeek = ~~Language.get('wcf.date.firstDayOfTheWeek'); _callbackOpen = this._open.bind(this); - DOMChangeListener.add('WoltLab/WCF/Date/Picker', this.init.bind(this)); - UICloseOverlay.add('WoltLab/WCF/Date/Picker', this._close.bind(this)); + DomChangeListener.add('WoltLab/WCF/Date/Picker', this.init.bind(this)); + UiCloseOverlay.add('WoltLab/WCF/Date/Picker', this._close.bind(this)); }, /** @@ -224,7 +224,7 @@ define(['DateUtil', 'Language', 'ObjectMap', 'DOM/ChangeListener', 'UI/Alignment this._renderPicker(date.getDate(), date.getMonth(), date.getFullYear()); - UIAlignment.set(_datePicker, _input, { pointer: true }); + UiAlignment.set(_datePicker, _input, { pointer: true }); }, /** diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Date/Time/Relative.js b/wcfsetup/install/files/js/WoltLab/WCF/Date/Time/Relative.js index 89d84f2064..343a0e02f3 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Date/Time/Relative.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Date/Time/Relative.js @@ -6,7 +6,7 @@ * @license GNU Lesser General Public License * @module WoltLab/WCF/Date/Time/Relative */ -define(['DOM/ChangeListener', 'Language', 'WoltLab/WCF/Date/Util', 'WoltLab/WCF/Timer/Repeating'], function(DOMChangeListener, Language, DateUtil, Repeating) { +define(['Dom/ChangeListener', 'Language', 'WoltLab/WCF/Date/Util', 'WoltLab/WCF/Timer/Repeating'], function(DomChangeListener, Language, DateUtil, Repeating) { "use strict"; var _elements = document.getElementsByTagName('time'); @@ -24,7 +24,7 @@ define(['DOM/ChangeListener', 'Language', 'WoltLab/WCF/Date/Util', 'WoltLab/WCF/ new Repeating(this._refresh.bind(this), 60000); - DOMChangeListener.add('WoltLab/WCF/Date/Time/Relative', this._refresh.bind(this)); + DomChangeListener.add('WoltLab/WCF/Date/Time/Relative', this._refresh.bind(this)); }, _refresh: function() { diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Dom/Change/Listener.js b/wcfsetup/install/files/js/WoltLab/WCF/Dom/Change/Listener.js index e295c7dd04..fa3a299c87 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Dom/Change/Listener.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Dom/Change/Listener.js @@ -5,7 +5,7 @@ * @author Tim Duesterhus * @copyright 2001-2015 WoltLab GmbH * @license GNU Lesser General Public License - * @module WoltLab/WCF/DOM/Change/Listener + * @module WoltLab/WCF/Dom/Change/Listener */ define(['CallbackList'], function(CallbackList) { "use strict"; @@ -14,7 +14,7 @@ define(['CallbackList'], function(CallbackList) { var _hot = false; /** - * @exports WoltLab/WCF/DOM/Change/Listener + * @exports WoltLab/WCF/Dom/Change/Listener */ var Listener = { /** diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Dom/Traverse.js b/wcfsetup/install/files/js/WoltLab/WCF/Dom/Traverse.js index 9608b66b83..1967cd7de2 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Dom/Traverse.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Dom/Traverse.js @@ -4,9 +4,9 @@ * @author Alexander Ebert * @copyright 2001-2015 WoltLab GmbH * @license GNU Lesser General Public License - * @module WoltLab/WCF/DOM/Traverse + * @module WoltLab/WCF/Dom/Traverse */ -define(['DOM/Util'], function(DOMUtil) { +define(['Dom/Util'], function(DomUtil) { "use strict"; /** @const */ var NONE = 0; @@ -16,7 +16,7 @@ define(['DOM/Util'], function(DOMUtil) { var _probe = [ function(el, none) { return true; }, - function(el, selector) { return DOMUtil.matches(el, selector); }, + function(el, selector) { return DomUtil.matches(el, selector); }, function(el, className) { return el.classList.contains(className); }, function(el, tagName) { return el.nodeName === tagName; } ]; @@ -74,9 +74,9 @@ define(['DOM/Util'], function(DOMUtil) { }; /** - * @exports WoltLab/WCF/DOM/Traverse + * @exports WoltLab/WCF/Dom/Traverse */ - var DOMTraverse = { + var DomTraverse = { /** * Examines child elements and returns the first child matching the given selector. * @@ -266,5 +266,5 @@ define(['DOM/Util'], function(DOMUtil) { } }; - return DOMTraverse; + return DomTraverse; }); diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Dom/Util.js b/wcfsetup/install/files/js/WoltLab/WCF/Dom/Util.js index 91680c179e..190799d633 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Dom/Util.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Dom/Util.js @@ -4,7 +4,7 @@ * @author Alexander Ebert * @copyright 2001-2015 WoltLab GmbH * @license GNU Lesser General Public License - * @module WoltLab/WCF/DOM/Util + * @module WoltLab/WCF/Dom/Util */ define([], function() { "use strict"; @@ -21,9 +21,9 @@ define([], function() { var _idCounter = 0; /** - * @exports WoltLab/WCF/DOM/Util + * @exports WoltLab/WCF/Dom/Util */ - var DOMUtil = { + var DomUtil = { /** * Returns a DocumentFragment containing the provided HTML string as DOM nodes. * @@ -217,7 +217,7 @@ define([], function() { }; // expose on window object for backward compatibility - window.bc_wcfDOMUtil = DOMUtil; + window.bc_wcfDomUtil = DomUtil; - return DOMUtil; + return DomUtil; }); diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Language/Input.js b/wcfsetup/install/files/js/WoltLab/WCF/Language/Input.js index 0736f2a62e..5e1326c8ea 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Language/Input.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Language/Input.js @@ -6,7 +6,7 @@ * @license GNU Lesser General Public License * @module WoltLab/WCF/Language/Input */ -define(['Dictionary', 'Language', 'ObjectMap', 'StringUtil', 'DOM/Traverse', 'DOM/Util', 'UI/SimpleDropdown'], function(Dictionary, Language, ObjectMap, StringUtil, DOMTraverse, DOMUtil, UISimpleDropdown) { +define(['Dictionary', 'Language', 'ObjectMap', 'StringUtil', 'Dom/Traverse', 'Dom/Util', 'Ui/SimpleDropdown'], function(Dictionary, Language, ObjectMap, StringUtil, DomTraverse, DomUtil, UiSimpleDropdown) { "use strict"; var _elements = new Dictionary(); @@ -97,12 +97,12 @@ define(['Dictionary', 'Language', 'ObjectMap', 'StringUtil', 'DOM/Traverse', 'DO var dropdownMenu = document.createElement('ul'); dropdownMenu.className = 'dropdownMenu'; - DOMUtil.insertAfter(dropdownMenu, button); + DomUtil.insertAfter(dropdownMenu, button); var callbackClick = (function(event, isInit) { var languageId = ~~event.currentTarget.getAttribute('data-language-id'); - var activeItem = DOMTraverse.childByClass(dropdownMenu, 'active'); + var activeItem = DomTraverse.childByClass(dropdownMenu, 'active'); if (activeItem !== null) activeItem.classList.remove('active'); if (languageId) event.currentTarget.classList.add('active'); @@ -149,8 +149,8 @@ define(['Dictionary', 'Language', 'ObjectMap', 'StringUtil', 'DOM/Traverse', 'DO } } - UISimpleDropdown.init(button); - UISimpleDropdown.registerCallback(container.id, _callbackDropdownToggle); + UiSimpleDropdown.init(button); + UiSimpleDropdown.registerCallback(container.id, _callbackDropdownToggle); _elements.set(elementId, { buttonLabel: button.children[0], @@ -159,7 +159,7 @@ define(['Dictionary', 'Language', 'ObjectMap', 'StringUtil', 'DOM/Traverse', 'DO }); // bind to submit event - var submit = DOMTraverse.parentByTag(element, 'FORM'); + var submit = DomTraverse.parentByTag(element, 'FORM'); if (submit !== null) { submit.addEventListener('submit', _callbackSubmit); @@ -225,7 +225,7 @@ define(['Dictionary', 'Language', 'ObjectMap', 'StringUtil', 'DOM/Traverse', 'DO return; } - var dropdownMenu = UISimpleDropdown.getDropdownMenu(containerId); + var dropdownMenu = UiSimpleDropdown.getDropdownMenu(containerId); var elementId = document.getElementById(containerId).getAttribute('data-input-id'); var values = _values.get(elementId); diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Alignment.js b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Alignment.js index 13e79f8e56..b93eb2dbec 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Alignment.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Alignment.js @@ -4,15 +4,15 @@ * @author Alexander Ebert * @copyright 2001-2015 WoltLab GmbH * @license GNU Lesser General Public License - * @module WoltLab/WCF/UI/Alignment + * @module WoltLab/WCF/Ui/Alignment */ -define(['Core', 'Language', 'DOM/Traverse', 'DOM/Util'], function(Core, Language, DOMTraverse, DOMUtil) { +define(['Core', 'Language', 'Dom/Traverse', 'Dom/Util'], function(Core, Language, DomTraverse, DomUtil) { "use strict"; /** - * @exports WoltLab/WCF/UI/Alignment + * @exports WoltLab/WCF/Ui/Alignment */ - var UIAlignment = { + var UiAlignment = { /** * Sets the alignment for target element relatively to the reference element. * @@ -51,16 +51,16 @@ define(['Core', 'Language', 'DOM/Traverse', 'DOM/Util'], function(Core, Language if (['both', 'horizontal', 'vertical', 'none'].indexOf(options.allowFlip) === -1) options.allowFlip = 'both'; // place element in the upper left corner to prevent calculation issues due to possible scrollbars - DOMUtil.setStyles(el, { + DomUtil.setStyles(el, { bottom: 'auto !important', left: '0 !important', right: 'auto !important', top: '0 !important' }); - var elDimensions = DOMUtil.outerDimensions(el); - var refDimensions = DOMUtil.outerDimensions((options.refDimensionsElement instanceof Element ? options.refDimensionsElement : ref)); - var refOffsets = DOMUtil.offset(ref); + var elDimensions = DomUtil.outerDimensions(el); + var refDimensions = DomUtil.outerDimensions((options.refDimensionsElement instanceof Element ? options.refDimensionsElement : ref)); + var refOffsets = DomUtil.offset(ref); var windowHeight = window.innerHeight; var windowWidth = document.body.clientWidth; @@ -117,7 +117,7 @@ define(['Core', 'Language', 'DOM/Traverse', 'DOM/Util'], function(Core, Language // set pointer position if (options.pointer) { - var pointer = DOMTraverse.childrenByClass(el, 'elementPointer'); + var pointer = DomTraverse.childrenByClass(el, 'elementPointer'); pointer = pointer[0] || null; if (pointer === null) { throw new Error("Expected the .elementPointer element to be a direct children."); @@ -151,7 +151,7 @@ define(['Core', 'Language', 'DOM/Traverse', 'DOM/Util'], function(Core, Language el.classList[(left === 'auto' ? 'add' : 'remove')](options.pointerClassNames[pointerRight]); } - DOMUtil.setStyles(el, { + DomUtil.setStyles(el, { bottom: bottom + (bottom !== 'auto' ? 'px' : ''), left: left + (left !== 'auto' ? 'px' : ''), right: right + (right !== 'auto' ? 'px' : ''), @@ -242,5 +242,5 @@ define(['Core', 'Language', 'DOM/Traverse', 'DOM/Util'], function(Core, Language } }; - return UIAlignment; + return UiAlignment; }); diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Ui/CloseOverlay.js b/wcfsetup/install/files/js/WoltLab/WCF/Ui/CloseOverlay.js index fe890929a7..5df68bdb51 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Ui/CloseOverlay.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Ui/CloseOverlay.js @@ -4,7 +4,7 @@ * @author Alexander Ebert * @copyright 2001-2015 WoltLab GmbH * @license GNU Lesser General Public License - * @module WoltLab/WCF/UI/CloseOlveray + * @module WoltLab/WCF/Ui/CloseOlveray */ define(['CallbackList'], function(CallbackList) { "use strict"; @@ -12,9 +12,9 @@ define(['CallbackList'], function(CallbackList) { var _callbackList = new CallbackList(); /** - * @exports WoltLab/WCF/UI/CloseOverlay + * @exports WoltLab/WCF/Ui/CloseOverlay */ - var UICloseOverlay = { + var UiCloseOverlay = { /** * Sets up global event listener for bubbled clicks events. */ @@ -42,7 +42,7 @@ define(['CallbackList'], function(CallbackList) { } }; - UICloseOverlay.setup(); + UiCloseOverlay.setup(); - return UICloseOverlay; + return UiCloseOverlay; }); diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Collapsible/Sidebar.js b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Collapsible/Sidebar.js index 79d8f01d1c..bc7f3388af 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Collapsible/Sidebar.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Collapsible/Sidebar.js @@ -4,9 +4,9 @@ * @author Alexander Ebert * @copyright 2001-2015 WoltLab GmbH * @license GNU Lesser General Public License - * @module WoltLab/WCF/UI/Collapsible/Sidebar + * @module WoltLab/WCF/Ui/Collapsible/Sidebar */ -define(['Ajax', 'Language', 'DOM/Util'], function(Ajax, Language, DOMUtil) { +define(['Ajax', 'Language', 'Dom/Util'], function(Ajax, Language, DomUtil) { "use strict"; var _isOpen = false; @@ -14,9 +14,9 @@ define(['Ajax', 'Language', 'DOM/Util'], function(Ajax, Language, DOMUtil) { var _name = ''; /** - * @module WoltLab/WCF/UI/Collapsible/Sidebar + * @module WoltLab/WCF/Ui/Collapsible/Sidebar */ - var UICollapsibleSidebar = { + var UiCollapsibleSidebar = { /** * Sets up the toggle button. */ @@ -48,7 +48,7 @@ define(['Ajax', 'Language', 'DOM/Util'], function(Ajax, Language, DOMUtil) { var span = document.createElement('span'); span.appendChild(button); - DOMUtil.prepend(span, sidebar); + DomUtil.prepend(span, sidebar); button.addEventListener('click', this._click.bind(this)); }, @@ -84,5 +84,5 @@ define(['Ajax', 'Language', 'DOM/Util'], function(Ajax, Language, DOMUtil) { } }; - return UICollapsibleSidebar; + return UiCollapsibleSidebar; }); diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Confirmation.js b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Confirmation.js index ec32bcdce8..8c21bf03f4 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Confirmation.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Confirmation.js @@ -4,9 +4,9 @@ * @author Alexander Ebert * @copyright 2001-2015 WoltLab GmbH * @license GNU Lesser General Public License - * @module WoltLab/WCF/UI/Confirmation + * @module WoltLab/WCF/Ui/Confirmation */ -define(['Core', 'Language', 'UI/Dialog'], function(Core, Language, UIDialog) { +define(['Core', 'Language', 'Ui/Dialog'], function(Core, Language, UiDialog) { "use strict"; var _active = false; @@ -18,9 +18,9 @@ define(['Core', 'Language', 'UI/Dialog'], function(Core, Language, UIDialog) { /** * Confirmation dialog overlay. * - * @exports WoltLab/WCF/UI/Confirmation + * @exports WoltLab/WCF/Ui/Confirmation */ - var UIConfirmation = { + var UiConfirmation = { /** * Shows the confirmation dialog. * @@ -35,7 +35,7 @@ define(['Core', 'Language', 'UI/Dialog'], function(Core, Language, UIDialog) { * @param {object} options confirmation options */ show: function(options) { - if (UIDialog === undefined) UIDialog = require('UI/Dialog'); + if (UiDialog === undefined) UiDialog = require('Ui/Dialog'); if (_active) { return; @@ -68,7 +68,7 @@ define(['Core', 'Language', 'UI/Dialog'], function(Core, Language, UIDialog) { _active = true; - UIDialog.open(this); + UiDialog.open(this); }, _dialogSetup: function() { @@ -118,7 +118,7 @@ define(['Core', 'Language', 'UI/Dialog'], function(Core, Language, UIDialog) { var cancelButton = document.createElement('button'); cancelButton.textContent = Language.get('wcf.global.confirmation.cancel'); - cancelButton.addEventListener('click', function() { UIDialog.close('wcfSystemConfirmation'); }); + cancelButton.addEventListener('click', function() { UiDialog.close('wcfSystemConfirmation'); }); formSubmit.appendChild(cancelButton); document.body.appendChild(dialog); @@ -136,7 +136,7 @@ define(['Core', 'Language', 'UI/Dialog'], function(Core, Language, UIDialog) { } _active = false; - UIDialog.close('wcfSystemConfirmation'); + UiDialog.close('wcfSystemConfirmation'); }, /** @@ -165,5 +165,5 @@ define(['Core', 'Language', 'UI/Dialog'], function(Core, Language, UIDialog) { } }; - return UIConfirmation; + return UiConfirmation; }); diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Dialog.js b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Dialog.js index 8e445e8e3c..9d69d7078a 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Dialog.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Dialog.js @@ -4,18 +4,18 @@ * @author Alexander Ebert * @copyright 2001-2015 WoltLab GmbH * @license GNU Lesser General Public License - * @module WoltLab/WCF/UI/Dialog + * @module WoltLab/WCF/Ui/Dialog */ define( [ 'enquire', 'Ajax', 'Core', 'Dictionary', - 'Environment', 'Language', 'ObjectMap', 'DOM/ChangeListener', - 'DOM/Util', 'UI/Confirmation' + 'Environment', 'Language', 'ObjectMap', 'Dom/ChangeListener', + 'Dom/Util', 'Ui/Confirmation' ], function( enquire, Ajax, Core, Dictionary, - Environment, Language, ObjectMap, DOMChangeListener, - DOMUtil, UIConfirmation + Environment, Language, ObjectMap, DomChangeListener, + DomUtil, UiConfirmation ) { "use strict"; @@ -28,9 +28,9 @@ define( var _keyupListener = null; /** - * @exports WoltLab/WCF/UI/Dialog + * @exports WoltLab/WCF/Ui/Dialog */ - var UIDialog = { + var UiDialog = { /** * Sets up global container and internal variables. */ @@ -178,7 +178,7 @@ define( if (!options.closable) options.backdropCloseOnClick = false; if (options.closeConfirmMessage) { options.onBeforeClose = (function(id) { - UIConfirmation.show({ + UiConfirmation.show({ confirm: this.close.bind(this, id), message: options.closeConfirmMessage }); @@ -203,8 +203,8 @@ define( throw new Error("Expected a valid dialog id, '" + id + "' does not match any active dialog."); } - var header = DOMTraverse.childrenByTag(data.dialog, 'HEADER'); - DOMTraverse.childrenByTag(header[0], 'SPAN').textContent = title; + var header = DomTraverse.childrenByTag(data.dialog, 'HEADER'); + DomTraverse.childrenByTag(header[0], 'SPAN').textContent = title; }, /** @@ -238,7 +238,7 @@ define( dialog.appendChild(header); if (options.title) { - var titleId = DOMUtil.getUniqueId(); + var titleId = DomUtil.getUniqueId(); dialog.setAttribute('aria-labelledby', titleId); var title = document.createElement('span'); @@ -304,7 +304,7 @@ define( onShow: options.onShow }); - DOMUtil.prepend(dialog, _container); + DomUtil.prepend(dialog, _container); if (createOnly !== true) { this._updateDialog(id, null); @@ -349,7 +349,7 @@ define( } } - DOMChangeListener.trigger(); + DomChangeListener.trigger(); }, /** @@ -376,14 +376,14 @@ define( contentContainer.classList.add('dialogForm'); formSubmit.classList.add('dialogFormSubmit'); - unavailableHeight += DOMUtil.outerHeight(formSubmit); + unavailableHeight += DomUtil.outerHeight(formSubmit); contentContainer.style.setProperty('margin-bottom', unavailableHeight + 'px'); } else { contentContainer.classList.remove('dialogForm'); } - unavailableHeight += DOMUtil.outerHeight(data.header); + unavailableHeight += DomUtil.outerHeight(data.header); var maximumHeight = (window.innerHeight * (_dialogFullHeight ? 1 : 0.8)) - unavailableHeight; contentContainer.style.setProperty('max-height', ~~maximumHeight + 'px'); @@ -507,5 +507,5 @@ define( } }; - return UIDialog; + return UiDialog; }); diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Dropdown/Simple.js b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Dropdown/Simple.js index 1fc5326631..743d3a80cd 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Dropdown/Simple.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Dropdown/Simple.js @@ -4,11 +4,11 @@ * @author Alexander Ebert * @copyright 2001-2015 WoltLab GmbH * @license GNU Lesser General Public License - * @module WoltLab/WCF/UI/Dropdown/Simple + * @module WoltLab/WCF/Ui/Dropdown/Simple */ define( - [ 'CallbackList', 'Core', 'Dictionary', 'UI/Alignment', 'DOM/ChangeListener', 'DOM/Traverse', 'DOM/Util', 'UI/CloseOverlay'], - function(CallbackList, Core, Dictionary, UIAlignment, DOMChangeListener, DOMTraverse, DOMUtil, UICloseOverlay) + [ 'CallbackList', 'Core', 'Dictionary', 'Ui/Alignment', 'Dom/ChangeListener', 'Dom/Traverse', 'Dom/Util', 'Ui/CloseOverlay'], + function(CallbackList, Core, Dictionary, UiAlignment, DomChangeListener, DomTraverse, DomUtil, UiCloseOverlay) { "use strict"; @@ -20,7 +20,7 @@ define( var _menuContainer = null; /** - * @exports WoltLab/WCF/UI/Dropdown/Simple + * @exports WoltLab/WCF/Ui/Dropdown/Simple */ var SimpleDropdown = { /** @@ -38,8 +38,8 @@ define( this.initAll(); - UICloseOverlay.add('WoltLab/WCF/UI/Dropdown/Simple', this.closeAll.bind(this)); - DOMChangeListener.add('WoltLab/WCF/UI/Dropdown/Simple', this.initAll.bind(this)); + UiCloseOverlay.add('WoltLab/WCF/Ui/Dropdown/Simple', this.closeAll.bind(this)); + DomChangeListener.add('WoltLab/WCF/Ui/Dropdown/Simple', this.initAll.bind(this)); document.addEventListener('scroll', this._onScroll.bind(this)); @@ -69,20 +69,20 @@ define( return false; } - var dropdown = DOMTraverse.parentByClass(button, 'dropdown'); + var dropdown = DomTraverse.parentByClass(button, 'dropdown'); if (dropdown === null) { - throw new Error("Invalid dropdown passed, button '" + DOMUtil.identify(button) + "' does not have a parent with .dropdown."); + throw new Error("Invalid dropdown passed, button '" + DomUtil.identify(button) + "' does not have a parent with .dropdown."); } - var menu = DOMTraverse.nextByClass(button, 'dropdownMenu'); + var menu = DomTraverse.nextByClass(button, 'dropdownMenu'); if (menu === null) { - throw new Error("Invalid dropdown passed, button '" + DOMUtil.identify(button) + "' does not have a menu as next sibling."); + throw new Error("Invalid dropdown passed, button '" + DomUtil.identify(button) + "' does not have a menu as next sibling."); } // move menu into global container _menuContainer.appendChild(menu); - var containerId = DOMUtil.identify(dropdown); + var containerId = DomUtil.identify(dropdown); if (!_dropdowns.has(containerId)) { button.classList.add('jsDropdownEnabled'); button.addEventListener('click', this._toggle.bind(this)); @@ -115,7 +115,7 @@ define( return; } - var containerId = DOMUtil.identify(dropdown); + var containerId = DomUtil.identify(dropdown); _dropdowns.set(containerId, dropdown); _menuContainer.appendChild(menu); @@ -173,7 +173,7 @@ define( refDimensionsElement = button; } - UIAlignment.set(dropdownMenu, dropdown, { + UiAlignment.set(dropdownMenu, dropdown, { pointerClassNames: ['dropdownArrowBottom', 'dropdownArrowRight'], refDimensionsElement: refDimensionsElement }); @@ -282,9 +282,9 @@ define( for (var i = 0, length = dropdowns.length; i < length; i++) { var dropdown = dropdowns[i]; - var containerId = DOMUtil.identify(dropdown); - var offset = DOMUtil.offset(dropdown); - var dialogOffset = DOMUtil.offset(dialogContent); + var containerId = DomUtil.identify(dropdown); + var offset = DomUtil.offset(dropdown); + var dialogOffset = DomUtil.offset(dialogContent); // check if dropdown toggle is still (partially) visible if (offset.top + dropdown.clientHeight <= dialogOffset.top) { @@ -351,7 +351,7 @@ define( // the dropdown toggle is in an overlay var dropdown = _dropdowns.get(targetId); if (dropdown !== undefined && dropdown.getAttribute('data-is-overlay-dropdown-button') === null) { - var dialogContent = DOMTraverse.parentByClass(dropdown, 'dialogContent'); + var dialogContent = DomTraverse.parentByClass(dropdown, 'dialogContent'); dropdown.setAttribute('data-is-overlay-dropdown-button', (dialogContent !== null)); if (dialogContent !== null) { diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Ui/FlexibleMenu.js b/wcfsetup/install/files/js/WoltLab/WCF/Ui/FlexibleMenu.js index b2012512aa..d82e9f87fc 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Ui/FlexibleMenu.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Ui/FlexibleMenu.js @@ -5,9 +5,9 @@ * @author Alexander Ebert * @copyright 2001-2015 WoltLab GmbH * @license GNU Lesser General Public License - * @module WoltLab/WCF/UI/FlexibleMenu + * @module WoltLab/WCF/Ui/FlexibleMenu */ -define(['Core', 'Dictionary', 'DOM/ChangeListener', 'DOM/Traverse', 'DOM/Util', 'UI/SimpleDropdown'], function(Core, Dictionary, DOMChangeListener, DOMTraverse, DOMUtil, SimpleDropdown) { +define(['Core', 'Dictionary', 'Dom/ChangeListener', 'Dom/Traverse', 'Dom/Util', 'Ui/SimpleDropdown'], function(Core, Dictionary, DomChangeListener, DomTraverse, DomUtil, SimpleDropdown) { "use strict"; var _containers = new Dictionary(); @@ -16,19 +16,19 @@ define(['Core', 'Dictionary', 'DOM/ChangeListener', 'DOM/Traverse', 'DOM/Util', var _itemLists = new Dictionary(); /** - * @exports WoltLab/WCF/UI/FlexibleMenu + * @exports WoltLab/WCF/Ui/FlexibleMenu */ - var UIFlexibleMenu = { + var UiFlexibleMenu = { /** * Register default menus and set up event listeners. */ setup: function() { if (document.getElementById('mainMenu') !== null) this.register('mainMenu'); var navigationHeader = document.querySelector('.navigationHeader'); - if (navigationHeader !== null) this.register(DOMUtil.identify(navigationHeader)); + if (navigationHeader !== null) this.register(DomUtil.identify(navigationHeader)); window.addEventListener('resize', this.rebuildAll.bind(this)); - DOMChangeListener.add('WoltLab/WCF/UI/FlexibleMenu', this.registerTabMenus.bind(this)); + DomChangeListener.add('WoltLab/WCF/Ui/FlexibleMenu', this.registerTabMenus.bind(this)); }, /** @@ -46,7 +46,7 @@ define(['Core', 'Dictionary', 'DOM/ChangeListener', 'DOM/Traverse', 'DOM/Util', return; } - var list = DOMTraverse.childByTag(container, 'UL'); + var list = DomTraverse.childByTag(container, 'UL'); if (list === null) { throw "Expected an
    element as child of container '" + containerId + "'."; } @@ -64,10 +64,10 @@ define(['Core', 'Dictionary', 'DOM/ChangeListener', 'DOM/Traverse', 'DOM/Util', var tabMenus = document.querySelectorAll('.tabMenuContainer:not(.jsFlexibleMenuEnabled), .messageTabMenu:not(.jsFlexibleMenuEnabled)'); for (var i = 0, length = tabMenus.length; i < length; i++) { var tabMenu = tabMenus[i]; - var nav = DOMTraverse.childByTag(tabMenu, 'NAV'); + var nav = DomTraverse.childByTag(tabMenu, 'NAV'); if (nav !== null) { tabMenu.classList.add('jsFlexibleMenuEnabled'); - this.register(DOMUtil.identify(nav)); + this.register(DomUtil.identify(nav)); } } }, @@ -95,11 +95,11 @@ define(['Core', 'Dictionary', 'DOM/ChangeListener', 'DOM/Traverse', 'DOM/Util', var styles = window.getComputedStyle(container); var availableWidth = container.parentNode.clientWidth; - availableWidth -= DOMUtil.styleAsInt(styles, 'margin-left'); - availableWidth -= DOMUtil.styleAsInt(styles, 'margin-right'); + availableWidth -= DomUtil.styleAsInt(styles, 'margin-left'); + availableWidth -= DomUtil.styleAsInt(styles, 'margin-right'); var list = _itemLists.get(containerId); - var items = DOMTraverse.childrenByTag(list, 'LI'); + var items = DomTraverse.childrenByTag(list, 'LI'); var dropdown = _dropdowns.get(containerId); var dropdownWidth = 0; if (dropdown !== undefined) { @@ -114,7 +114,7 @@ define(['Core', 'Dictionary', 'DOM/ChangeListener', 'DOM/Traverse', 'DOM/Util', } if (dropdown.parentNode !== null) { - dropdownWidth = DOMUtil.outerWidth(dropdown); + dropdownWidth = DomUtil.outerWidth(dropdown); } } @@ -196,5 +196,5 @@ define(['Core', 'Dictionary', 'DOM/ChangeListener', 'DOM/Traverse', 'DOM/Util', } }; - return UIFlexibleMenu; + return UiFlexibleMenu; }); diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Ui/ItemList.js b/wcfsetup/install/files/js/WoltLab/WCF/Ui/ItemList.js index 4148714af4..f389958e99 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Ui/ItemList.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Ui/ItemList.js @@ -4,9 +4,9 @@ * @author Alexander Ebert * @copyright 2001-2015 WoltLab GmbH * @license GNU Lesser General Public License - * @module WoltLab/WCF/UI/ItemList + * @module WoltLab/WCF/Ui/ItemList */ -define(['Core', 'Dictionary', 'Language', 'DOM/Traverse', 'WoltLab/WCF/UI/Suggestion'], function(Core, Dictionary, Language, DOMTraverse, UISuggestion) { +define(['Core', 'Dictionary', 'Language', 'Dom/Traverse', 'WoltLab/WCF/Ui/Suggestion'], function(Core, Dictionary, Language, DomTraverse, UiSuggestion) { "use strict"; var _activeId = ''; @@ -19,9 +19,9 @@ define(['Core', 'Dictionary', 'Language', 'DOM/Traverse', 'WoltLab/WCF/UI/Sugges var _callbackRemoveItem = null; /** - * @exports WoltLab/WCF/UI/ItemList + * @exports WoltLab/WCF/Ui/ItemList */ - var UIItemList = { + var UiItemList = { /** * Initializes an item list. * @@ -66,7 +66,7 @@ define(['Core', 'Dictionary', 'Language', 'DOM/Traverse', 'WoltLab/WCF/UI/Sugges submitFieldName: '' }, options); - var form = DOMTraverse.parentByTag(element, 'FORM'); + var form = DomTraverse.parentByTag(element, 'FORM'); if (form !== null) { if (options.isCSV === false) { if (!options.submitFieldName.length && typeof options.callbackSubmit !== 'function') { @@ -96,7 +96,7 @@ define(['Core', 'Dictionary', 'Language', 'DOM/Traverse', 'WoltLab/WCF/UI/Sugges this._setup(); var data = this._createUI(element, options, values); - var suggestion = new UISuggestion(elementId, { + var suggestion = new UiSuggestion(elementId, { ajax: options.ajax, callbackSelect: this._addItem.bind(this), excludedSearchValues: options.excludedSearchValues @@ -138,13 +138,13 @@ define(['Core', 'Dictionary', 'Language', 'DOM/Traverse', 'WoltLab/WCF/UI/Sugges } var data = _data.get(elementId); - var items = DOMTraverse.childrenByClass(data.list, 'item'); + var items = DomTraverse.childrenByClass(data.list, 'item'); var values = [], value, item; for (var i = 0, length = items.length; i < length; i++) { item = items[i]; value = { objectId: item.getAttribute('data-object-id'), - value: DOMTraverse.childByTag(item, 'SPAN').textContent + value: DomTraverse.childByTag(item, 'SPAN').textContent }; values.push(value); @@ -409,5 +409,5 @@ define(['Core', 'Dictionary', 'Language', 'DOM/Traverse', 'WoltLab/WCF/UI/Sugges } }; - return UIItemList; + return UiItemList; }); diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Ui/ItemList/User.js b/wcfsetup/install/files/js/WoltLab/WCF/Ui/ItemList/User.js index 739ddc2196..c730d5b51a 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Ui/ItemList/User.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Ui/ItemList/User.js @@ -4,15 +4,15 @@ * @author Alexander Ebert * @copyright 2001-2015 WoltLab GmbH * @license GNU Lesser General Public License - * @module WoltLab/WCF/UI/ItemList/User + * @module WoltLab/WCF/Ui/ItemList/User */ -define(['WoltLab/WCF/UI/ItemList'], function(UIItemList) { +define(['WoltLab/WCF/Ui/ItemList'], function(UiItemList) { "use strict"; /** - * @exports WoltLab/WCF/UI/ItemList/User + * @exports WoltLab/WCF/Ui/ItemList/User */ - var UIItemListUser = { + var UiItemListUser = { /** * Initializes user suggestion support for an element. * @@ -20,7 +20,7 @@ define(['WoltLab/WCF/UI/ItemList'], function(UIItemList) { * @param {object} options option list */ init: function(elementId, options) { - UIItemList.init(elementId, [], { + UiItemList.init(elementId, [], { ajax: { className: 'wcf\\data\\user\\UserAction', parameters: { @@ -38,12 +38,12 @@ define(['WoltLab/WCF/UI/ItemList'], function(UIItemList) { }, /** - * @see WoltLab/WCF/UI/ItemList::getValues() + * @see WoltLab/WCF/Ui/ItemList::getValues() */ getValues: function(elementId) { - return UIItemList.getValues(elementId); + return UiItemList.getValues(elementId); } }; - return UIItemListUser; + return UiItemListUser; }); diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Mobile.js b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Mobile.js index 288a827221..829f13ff4e 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Mobile.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Mobile.js @@ -4,11 +4,11 @@ * @author Alexander Ebert * @copyright 2001-2015 WoltLab GmbH * @license GNU Lesser General Public License - * @module WoltLab/WCF/UI/Mobile + * @module WoltLab/WCF/Ui/Mobile */ define( - [ 'enquire', 'Environment', 'Language', 'DOM/ChangeListener', 'DOM/Traverse', 'UI/CloseOverlay'], - function(enquire, Environment, Language, DOMChangeListener, DOMTraverse, UICloseOverlay) + [ 'enquire', 'Environment', 'Language', 'Dom/ChangeListener', 'Dom/Traverse', 'Ui/CloseOverlay'], + function(enquire, Environment, Language, DomChangeListener, DomTraverse, UiCloseOverlay) { "use strict"; @@ -18,9 +18,9 @@ define( var _sidebar = null; /** - * @exports WoltLab/WCF/UI/Mobile + * @exports WoltLab/WCF/Ui/Mobile */ - var UIMobile = { + var UiMobile = { /** * Initializes the mobile UI using enquire.js. */ @@ -80,8 +80,8 @@ define( this._initSearchBar(); this._initButtonGroupNavigation(); - UICloseOverlay.add('WoltLab/WCF/UI/Mobile', this._closeAllMenus.bind(this)); - DOMChangeListener.add('WoltLab/WCF/UI/Mobile', this._initButtonGroupNavigation.bind(this)); + UiCloseOverlay.add('WoltLab/WCF/Ui/Mobile', this._closeAllMenus.bind(this)); + DomChangeListener.add('WoltLab/WCF/Ui/Mobile', this._initButtonGroupNavigation.bind(this)); }, _initSidebarToggleButtons: function() { @@ -155,7 +155,7 @@ define( button.appendChild(span); button.addEventListener('click', function(ev) { - var next = DOMTraverse.next(button); + var next = DomTraverse.next(button); if (next !== null) { next.classList.toggle('open'); @@ -178,5 +178,5 @@ define( } }; - return UIMobile; + return UiMobile; }); diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Suggestion.js b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Suggestion.js index 8a040974d2..8a0b681f7a 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Suggestion.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Suggestion.js @@ -4,9 +4,9 @@ * @author Alexander Ebert * @copyright 2001-2015 WoltLab GmbH * @license GNU Lesser General Public License - * @module WoltLab/WCF/UI/Suggestion + * @module WoltLab/WCF/Ui/Suggestion */ -define(['Ajax', 'Core', 'UI/SimpleDropdown'], function(Ajax, Core, UISimpleDropdown) { +define(['Ajax', 'Core', 'Ui/SimpleDropdown'], function(Ajax, Core, UiSimpleDropdown) { "use strict"; /** @@ -14,8 +14,8 @@ define(['Ajax', 'Core', 'UI/SimpleDropdown'], function(Ajax, Core, UISimpleDropd * @param {string} elementId input element id * @param {object} options option list */ - function UISuggestion(elementId, options) { this.init(elementId, options); }; - UISuggestion.prototype = { + function UiSuggestion(elementId, options) { this.init(elementId, options); }; + UiSuggestion.prototype = { /** * Initializes a new suggestion input. * @@ -87,7 +87,7 @@ define(['Ajax', 'Core', 'UI/SimpleDropdown'], function(Ajax, Core, UISimpleDropd * @param {object} event event object */ _keyDown: function(event) { - if (this._dropdownMenu === null || !UISimpleDropdown.isOpen(this._element.id)) { + if (this._dropdownMenu === null || !UiSimpleDropdown.isOpen(this._element.id)) { return true; } @@ -107,13 +107,13 @@ define(['Ajax', 'Core', 'UI/SimpleDropdown'], function(Ajax, Core, UISimpleDropd if (event.keyCode === 13) { // Enter - UISimpleDropdown.close(this._element.id); + UiSimpleDropdown.close(this._element.id); this._select(active); } else if (event.keyCode === 27) { - if (UISimpleDropdown.isOpen(this._element.id)) { - UISimpleDropdown.close(this._element.id); + if (UiSimpleDropdown.isOpen(this._element.id)) { + UiSimpleDropdown.close(this._element.id); } else { // let the event pass through @@ -174,7 +174,7 @@ define(['Ajax', 'Core', 'UI/SimpleDropdown'], function(Ajax, Core, UISimpleDropd } else if (value.length < this._options.treshold) { if (this._dropdownMenu !== null) { - UISimpleDropdown.close(this._element.id); + UiSimpleDropdown.close(this._element.id); } this._value = value; @@ -210,7 +210,7 @@ define(['Ajax', 'Core', 'UI/SimpleDropdown'], function(Ajax, Core, UISimpleDropd this._dropdownMenu = document.createElement('div'); this._dropdownMenu.className = 'dropdownMenu'; - UISimpleDropdown.initFragment(this._element, this._dropdownMenu); + UiSimpleDropdown.initFragment(this._element, this._dropdownMenu); } else { this._dropdownMenu.innerHTML = ''; @@ -233,13 +233,13 @@ define(['Ajax', 'Core', 'UI/SimpleDropdown'], function(Ajax, Core, UISimpleDropd this._dropdownMenu.appendChild(listItem); } - UISimpleDropdown.open(this._element.id); + UiSimpleDropdown.open(this._element.id); } else { - UISimpleDropdown.close(this._element.id); + UiSimpleDropdown.close(this._element.id); } } }; - return UISuggestion; + return UiSuggestion; }); diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Ui/TabMenu.js b/wcfsetup/install/files/js/WoltLab/WCF/Ui/TabMenu.js index b3f49a7f00..09285ef007 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Ui/TabMenu.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Ui/TabMenu.js @@ -4,17 +4,17 @@ * @author Alexander Ebert * @copyright 2001-2015 WoltLab GmbH * @license GNU Lesser General Public License - * @module WoltLab/WCF/UI/TabMenu + * @module WoltLab/WCF/Ui/TabMenu */ -define(['Dictionary', 'DOM/ChangeListener', 'DOM/Util', './TabMenu/Simple'], function(Dictionary, DOMChangeListener, DOMUtil, SimpleTabMenu) { +define(['Dictionary', 'Dom/ChangeListener', 'Dom/Util', './TabMenu/Simple'], function(Dictionary, DomChangeListener, DomUtil, SimpleTabMenu) { "use strict"; var _tabMenus = new Dictionary(); /** - * @exports WoltLab/WCF/UI/TabMenu + * @exports WoltLab/WCF/Ui/TabMenu */ - var UITabMenu = { + var UiTabMenu = { /** * Sets up tab menus and binds listeners. */ @@ -22,7 +22,7 @@ define(['Dictionary', 'DOM/ChangeListener', 'DOM/Util', './TabMenu/Simple'], fun this._init(); this._selectErroneousTabs(); - DOMChangeListener.add('WoltLab/WCF/UI/TabMenu', this._init.bind(this)); + DomChangeListener.add('WoltLab/WCF/Ui/TabMenu', this._init.bind(this)); }, /** @@ -32,7 +32,7 @@ define(['Dictionary', 'DOM/ChangeListener', 'DOM/Util', './TabMenu/Simple'], fun var tabMenus = document.querySelectorAll('.tabMenuContainer:not(.staticTabMenuContainer)'); for (var i = 0, length = tabMenus.length; i < length; i++) { var container = tabMenus[i]; - var containerId = DOMUtil.identify(container); + var containerId = DomUtil.identify(container); if (_tabMenus.has(containerId)) { continue; @@ -74,5 +74,5 @@ define(['Dictionary', 'DOM/ChangeListener', 'DOM/Util', './TabMenu/Simple'], fun } }; - return UITabMenu; + return UiTabMenu; }); diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Ui/TabMenu/Simple.js b/wcfsetup/install/files/js/WoltLab/WCF/Ui/TabMenu/Simple.js index 027e86b045..888acc9256 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Ui/TabMenu/Simple.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Ui/TabMenu/Simple.js @@ -4,9 +4,9 @@ * @author Alexander Ebert * @copyright 2001-2015 WoltLab GmbH * @license GNU Lesser General Public License - * @module WoltLab/WCF/UI/TabMenu/Simple + * @module WoltLab/WCF/Ui/TabMenu/Simple */ -define(['Dictionary', 'DOM/Traverse', 'DOM/Util', 'EventHandler'], function(Dictionary, DOMTraverse, DOMUtil, EventHandler) { +define(['Dictionary', 'Dom/Traverse', 'Dom/Util', 'EventHandler'], function(Dictionary, DomTraverse, DomUtil, EventHandler) { "use strict"; /** @@ -46,7 +46,7 @@ define(['Dictionary', 'DOM/Traverse', 'DOM/Util', 'EventHandler'], function(Dict return false; } - var nav = DOMTraverse.childByTag(this._container, 'NAV'); + var nav = DomTraverse.childByTag(this._container, 'NAV'); if (nav === null) { return false; } @@ -57,13 +57,13 @@ define(['Dictionary', 'DOM/Traverse', 'DOM/Util', 'EventHandler'], function(Dict return false; } - var containers = DOMTraverse.childrenByTag(this._container, 'DIV'); + var containers = DomTraverse.childrenByTag(this._container, 'DIV'); for (var i = 0, length = containers.length; i < length; i++) { var container = containers[i]; var name = container.getAttribute('data-name'); if (!name) { - name = DOMUtil.identify(container); + name = DomUtil.identify(container); } container.setAttribute('data-name', name); diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Tooltip.js b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Tooltip.js index 5ba1439be4..2f07e3039b 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Tooltip.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Tooltip.js @@ -4,9 +4,9 @@ * @author Alexander Ebert * @copyright 2001-2015 WoltLab GmbH * @license GNU Lesser General Public License - * @module WoltLab/WCF/UI/Tooltip + * @module WoltLab/WCF/Ui/Tooltip */ -define(['Environment', 'DOM/ChangeListener', 'UI/Alignment'], function(Environment, DOMChangeListener, UIAlignment) { +define(['Environment', 'Dom/ChangeListener', 'Ui/Alignment'], function(Environment, DomChangeListener, UiAlignment) { "use strict"; var _elements = null; @@ -15,9 +15,9 @@ define(['Environment', 'DOM/ChangeListener', 'UI/Alignment'], function(Environme var _tooltip = null; /** - * @exports WoltLab/WCF/UI/Tooltip + * @exports WoltLab/WCF/Ui/Tooltip */ - var UITooltip = { + var UiTooltip = { /** * Initializes the tooltip element and binds event listener. */ @@ -43,7 +43,7 @@ define(['Environment', 'DOM/ChangeListener', 'UI/Alignment'], function(Environme this.init(); - DOMChangeListener.add('WoltLab/WCF/UI/Tooltip', this.init.bind(this)); + DomChangeListener.add('WoltLab/WCF/Ui/Tooltip', this.init.bind(this)); }, /** @@ -100,7 +100,7 @@ define(['Environment', 'DOM/ChangeListener', 'UI/Alignment'], function(Environme _text.textContent = title; - UIAlignment.set(_tooltip, element, { + UiAlignment.set(_tooltip, element, { horizontal: 'center', pointer: true, pointerClassNames: ['inverse'], @@ -118,5 +118,5 @@ define(['Environment', 'DOM/ChangeListener', 'UI/Alignment'], function(Environme } }; - return UITooltip; + return UiTooltip; }); diff --git a/wcfsetup/install/files/js/require.config.js b/wcfsetup/install/files/js/require.config.js index 188bcaa861..e63ed6431c 100644 --- a/wcfsetup/install/files/js/require.config.js +++ b/wcfsetup/install/files/js/require.config.js @@ -18,21 +18,21 @@ requirejs.config({ 'Core': 'WoltLab/WCF/Core', 'DateUtil': 'WoltLab/WCF/Date/Util', 'Dictionary': 'WoltLab/WCF/Dictionary', - 'DOM/ChangeListener': 'WoltLab/WCF/DOM/Change/Listener', - 'DOM/Traverse': 'WoltLab/WCF/DOM/Traverse', - 'DOM/Util': 'WoltLab/WCF/DOM/Util', + 'Dom/ChangeListener': 'WoltLab/WCF/Dom/Change/Listener', + 'Dom/Traverse': 'WoltLab/WCF/Dom/Traverse', + 'Dom/Util': 'WoltLab/WCF/Dom/Util', 'Environment': 'WoltLab/WCF/Environment', 'EventHandler': 'WoltLab/WCF/Event/Handler', 'Language': 'WoltLab/WCF/Language', 'List': 'WoltLab/WCF/List', 'ObjectMap': 'WoltLab/WCF/ObjectMap', 'StringUtil': 'WoltLab/WCF/StringUtil', - 'UI/Alignment': 'WoltLab/WCF/UI/Alignment', - 'UI/CloseOverlay': 'WoltLab/WCF/UI/CloseOverlay', - 'UI/Confirmation': 'WoltLab/WCF/UI/Confirmation', - 'UI/Dialog': 'WoltLab/WCF/UI/Dialog', - 'UI/SimpleDropdown': 'WoltLab/WCF/UI/Dropdown/Simple', - 'UI/TabMenu': 'WoltLab/WCF/UI/TabMenu' + 'Ui/Alignment': 'WoltLab/WCF/Ui/Alignment', + 'Ui/CloseOverlay': 'WoltLab/WCF/Ui/CloseOverlay', + 'Ui/Confirmation': 'WoltLab/WCF/Ui/Confirmation', + 'Ui/Dialog': 'WoltLab/WCF/Ui/Dialog', + 'Ui/SimpleDropdown': 'WoltLab/WCF/Ui/Dropdown/Simple', + 'Ui/TabMenu': 'WoltLab/WCF/Ui/TabMenu' } } }); -- 2.20.1