* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @module WoltLab/WCF/Ajax
*/
-define(['Core', 'Language', 'DOM/Util', 'UI/Dialog', 'WoltLab/WCF/Ajax/Status'], function(Core, Language, 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;
this._previousXhr = null;
- WCF.DOMNodeInsertedHandler.execute();
+ DOMChangeListener.trigger();
// fix anchor tags generated through WCF::getAnchor()
var links = document.querySelectorAll('a[href*="#"]');
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @module WoltLab/WCF/Controller/Popover
*/
-define(['Dictionary', 'Environment', 'DOM/Util', 'UI/Alignment'], function(Dictionary, Environment, DOMUtil, UIAlignment) {
+define(['Dictionary', 'Environment', 'DOM/ChangeListener', 'DOM/Util', 'UI/Alignment'], function(Dictionary, Environment, DOMChangeListener, DOMUtil, UIAlignment) {
"use strict";
var _activeId = null;
this._hide(true);
}).bind(this));
- WCF.DOMNodeInsertedHandler.addCallback('WoltLab/WCF/Controller/Popover', this._init.bind(this));
+ DOMChangeListener.add('WoltLab/WCF/Controller/Popover', this._init.bind(this));
},
/**
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @module WoltLab/WCF/Date/Time/Relative
*/
-define(['Language'], function(Language) {
+define(['DOM/ChangeListener', 'Language'], function(DOMChangeListener, Language) {
"use strict";
var _elements = null;
new WCF.PeriodicalExecuter(this._refresh.bind(this), 60000);
- WCF.DOMNodeInsertedHandler.addCallback('WCF.Date.Time', this._refresh.bind(this));
+ DOMChangeListener.add('WoltLab/WCF/Date/Time/Relative', this._refresh.bind(this));
},
_refresh: function() {
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @module WoltLab/WCF/UI/Dialog
*/
-define(['enquire', 'Core', 'Dictionary', 'Environment', 'Language', 'DOM/Util'], function(enquire, Core, Dictionary, Environment, Language, DOMUtil) {
+define(
+ [ 'enquire', 'Core', 'Dictionary', 'Environment', 'Language', 'DOM/ChangeListener', 'DOM/Util'],
+ function(enquire, Core, Dictionary, Environment, Language, DOMChangeListener, DOMUtil)
+{
"use strict";
var _activeDialog = null;
options.onShow(id);
}
- WCF.DOMNodeInsertedHandler.execute();
+ ChangeListener.trigger();
},
/**
}
}
- WCF.DOMNodeInsertedHandler.execute();
+ ChangeListener.trigger();
},
/**
* @module WoltLab/WCF/UI/Dropdown/Simple
*/
define(
- [ 'CallbackList', 'Dictionary', 'UI/Alignment', 'DOM/Traverse', 'DOM/Util'],
- function(CallbackList, Dictionary, uiAlignment, DOMTraverse, DOMUtil)
+ [ 'CallbackList', 'Dictionary', 'UI/Alignment', 'DOM/ChangeListener', 'DOM/Traverse', 'DOM/Util'],
+ function(CallbackList, Dictionary, UIAlignment, DOMChangeListener, DOMTraverse, DOMUtil)
{
"use strict";
WCF.Dropdown.init(this);
WCF.CloseOverlayHandler.addCallback('WoltLab/WCF/UI/Dropdown/Simple', this.closeAll.bind(this));
- WCF.DOMNodeInsertedHandler.addCallback('WoltLab/WCF/UI/Dropdown/Simple', this.initAll.bind(this));
+ DOMChangeListener.add('WoltLab/WCF/UI/Dropdown/Simple', this.initAll.bind(this));
document.addEventListener('scroll', this._onScroll.bind(this));
},
refDimensionsElement = button;
}
- uiAlignment.set(dropdownMenu, dropdown, {
+ UIAlignment.set(dropdownMenu, dropdown, {
pointerClassNames: ['dropdownArrowBottom', 'dropdownArrowRight'],
refDimensionsElement: refDimensionsElement
});
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @module WoltLab/WCF/UI/FlexibleMenu
*/
-define(['Core', 'Dictionary', 'DOM/Traverse', 'DOM/Util', 'UI/SimpleDropdown'], function(Core, Dictionary, DOMTraverse, DOMUtil, SimpleDropdown) {
+define(['Core', 'Dictionary', 'DOM/ChangeListener', 'DOM/Traverse', 'DOM/Util', 'UI/SimpleDropdown'], function(Core, Dictionary, DOMChangeListener, DOMTraverse, DOMUtil, SimpleDropdown) {
"use strict";
/**
window.addEventListener('resize', this.rebuildAll.bind(this));
- WCF.DOMNodeInsertedHandler.addCallback('WoltLab/WCF/UI/FlexibleMenu', this.registerTabMenus.bind(this));
+ DOMChangeListener.add('WoltLab/WCF/UI/FlexibleMenu', this.registerTabMenus.bind(this));
},
/**
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @module WoltLab/WCF/UI/Mobile
*/
-define(['enquire', 'Environment', 'Language', 'DOM/Traverse'], function(enquire, Environment, Language, DOMTraverse) {
+define(
+ [ 'enquire', 'Environment', 'Language', 'DOM/ChangeListener', 'DOM/Traverse'],
+ function(enquire, Environment, Language, DOMChangeListener, DOMTraverse)
+{
"use strict";
var _buttonGroupNavigations = null;
this._initButtonGroupNavigation();
WCF.CloseOverlayHandler.addCallback('WoltLab/WCF/UI/Mobile', this._closeAllMenus.bind(this));
- WCF.DOMNodeInsertedHandler.addCallback('WoltLab/WCF/UI/Mobile', this._initButtonGroupNavigation.bind(this));
+ DOMChangeListener.add('WoltLab/WCF/UI/Mobile', this._initButtonGroupNavigation.bind(this));
},
_initSidebarToggleButtons: function() {
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @module WoltLab/WCF/UI/TabMenu
*/
-define(['Dictionary', 'DOM/Util', './TabMenu/Simple'], function(Dictionary, DOMUtil, SimpleTabMenu) {
+define(['Dictionary', 'DOM/ChangeListener', 'DOM/Util', './TabMenu/Simple'], function(Dictionary, DOMChangeListener, DOMUtil, SimpleTabMenu) {
"use strict";
var _tabMenus = new Dictionary();
setup: function() {
this._init();
- WCF.DOMNodeInsertedHandler.addCallback('WoltLab/WCF/UI/TabMenu', this._init.bind(this));
+ DOMChangeListener.add('WoltLab/WCF/UI/TabMenu', this._init.bind(this));
},
/**
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @module WoltLab/WCF/UI/Tooltip
*/
-define(['Environment', 'UI/Alignment'], function(Environment, UIAlignment) {
+define(['Environment', 'DOM/ChangeListener', 'UI/Alignment'], function(Environment, DOMChangeListener, UIAlignment) {
"use strict";
var _elements = null;
this.init();
- WCF.DOMNodeInsertedHandler.addCallback('WoltLab/WCF/UI/Tooltip', this.init.bind(this));
+ DOMChangeListener.add('WoltLab/WCF/UI/Tooltip', this.init.bind(this));
},
/**
};
return new UITooltip();
-});
\ No newline at end of file
+});
'CallbackList': 'WoltLab/WCF/CallbackList',
'Core': 'WoltLab/WCF/Core',
'Dictionary': 'WoltLab/WCF/Dictionary',
+ 'DOM/ChangeListener': 'WoltLab/WCF/DOM/Change/Listener',
'DOM/Traverse': 'WoltLab/WCF/DOM/Traverse',
'DOM/Util': 'WoltLab/WCF/DOM/Util',
'Environment': 'WoltLab/WCF/Environment',