var _requests = new ObjectMap();
/**
- * @constructor
+ * @exports WoltLab/WCF/Ajax
*/
- function Ajax() {};
- Ajax.prototype = {
+ var Ajax = {
/**
* Shorthand function to perform a request against the WCF-API with overrides
* for success and failure callbacks.
}
};
- return new Ajax();
+ return Ajax;
});
"use strict";
/**
- * @constructor
+ * @exports WoltLab/WCF/Ajax/Jsonp
*/
- function AjaxJsonp() {};
- AjaxJsonp.prototype = {
+ var AjaxJsonp = {
/**
* Issues a JSONP request.
*
url += options.parameterName + '=' + callbackName;
var script = document.createElement('script');
- script.setAttribute('async', true);
+ script.async = true;
script.setAttribute('src', url);
document.head.appendChild(script);
}
};
- return new AjaxJsonp();
+ return AjaxJsonp;
});
var _timeoutShow = null;
/**
- * @constructor
+ * @exports WoltLab/WCF/Ajax/Status
*/
- function AjaxStatus() {}
- AjaxStatus.prototype = {
+ var AjaxStatus = {
/**
* Initializes the status overlay on first usage.
*/
}
};
- return new AjaxStatus();
+ return AjaxStatus;
});
window.WCF.Language.addObject = Language.addObject;
/**
- * @constructor
+ * @exports WoltLab/WCF/Bootstrap
*/
- function Bootstrap() {}
- Bootstrap.prototype = {
+ var Bootstrap = {
/**
* Initializes the core UI modifications and unblocks jQuery's ready event.
*/
}
};
- return new Bootstrap();
+ return Bootstrap;
});
"use strict";
/**
- * @constructor
+ * @exports WoltLab/WCF/BootstrapFrontend
*/
- function BootstrapFrontend() {}
- BootstrapFrontend.prototype = {
+ var BootstrapFrontend = {
/**
* Bootstraps general modules and frontend exclusive ones.
*
}
};
- return new BootstrapFrontend();
+ return BootstrapFrontend;
});
* @param {string} identifier arbitrary string to group and identify callbacks
*/
remove: function(identifier) {
- this._dictionary.delete(identifier);
+ this._dictionary['delete'](identifier);
},
/**
"use strict";
/**
- * @constructor
+ * @exports WoltLab/WCF/Controller/Notice/Dismiss
*/
- function ControllerNoticeDismiss() {};
- ControllerNoticeDismiss.prototype = {
+ var ControllerNoticeDismiss = {
/**
* Initializes dismiss buttons.
*/
}
};
- return new ControllerNoticeDismiss();
+ return ControllerNoticeDismiss;
});
/** @const */ var DELAY_HIDE = 500;
/**
- * @constructor
+ * @exports WoltLab/WCF/Controller/Popover
*/
- function ControllerPopover() {};
- ControllerPopover.prototype = {
+ var ControllerPopover = {
/**
* Builds popover DOM elements and binds event listeners.
*/
throw new TypeError("Expected a valid callback for parameter 'success'.");
}
- Ajax.apiProxy(this, data, success, failure);
+ Ajax.api(this, data, success, failure);
}
};
- return new ControllerPopover();
+ return ControllerPopover;
});
var _dialog = null;
/**
- * @constructor
+ * @exports WoltLab/WCF/Controller/Sitemap
*/
- function ControllerSitemap() {};
- ControllerSitemap.prototype = {
+ var ControllerSitemap = {
/**
* Binds click handler.
*/
}
};
- return new ControllerSitemap();
+ return ControllerSitemap;
});
"use strict";
/**
- * @constructor
+ * @exports WoltLab/WCF/Controller/Style/Changer
*/
- function ControllerStyleChanger() {};
- ControllerStyleChanger.prototype = {
+ var ControllerStyleChanger = {
/**
* Adds the style changer to the bottom navigation.
*/
}
};
- return new ControllerStyleChanger();
+ return ControllerStyleChanger;
});
};
/**
- * @constructor
+ * @exports WoltLab/WCF/Core
*/
- function Core() {};
- Core.prototype = {
+ var Core = {
/**
* Deep clones an object.
*
}
};
- return new Core();
+ return Core;
});
var _hot = false;
/**
- * @constructor
+ * @exports WoltLab/WCF/DOM/Change/Listener
*/
- function Listener() { };
- Listener.prototype = {
+ var Listener = {
/**
* @see WoltLab/WCF/CallbackList#add
*/
}
};
- return new Listener();
+ return Listener;
});
};
/**
- * @constructor
+ * @exports WoltLab/WCF/DOM/Traverse
*/
- function DOMTraverse() {};
- DOMTraverse.prototype = {
+ var DOMTraverse = {
/**
* Examines child elements and returns the first child matching the given selector.
*
}
};
- return new DOMTraverse();
+ return DOMTraverse;
});
var _idCounter = 0;
/**
- * @constructor
+ * @exports WoltLab/WCF/DOM/Util
*/
- function DOMUtil() {};
- DOMUtil.prototype = {
+ var DOMUtil = {
/**
* Returns a DocumentFragment containing the provided HTML string as DOM nodes.
*
}
};
- var domUtilObj = new DOMUtil();
-
- // expose methods on the window object for backwards-compatibility
- window.domUtilGetUniqueId = domUtilObj.getUniqueId.bind(domUtilObj);
- window.domUtilIdentify = domUtilObj.identify.bind(domUtilObj);
-
- return domUtilObj;
+ return DOMUtil;
});
define(['DOM/ChangeListener', 'Language', 'WoltLab/WCF/Timer/Repeating'], function(DOMChangeListener, Language, Repeating) {
"use strict";
- var _elements = null;
+ var _elements = document.getElementsByTagName('time');
var _offset = null;
/**
- * @constructor
+ * @exports WoltLab/WCF/Date/Time/Relative
*/
- function DateTimeRelative() {};
- DateTimeRelative.prototype = {
+ var DateTimeRelative = {
/**
* Transforms <time> elements on init and binds event listeners.
*/
setup: function() {
- _elements = document.getElementsByTagName('time');
-
this._refresh();
new Repeating(this._refresh.bind(this), 60000);
}
};
- return new DateTimeRelative();
+ return DateTimeRelative;
});
var _touch = false;
/**
- * @constructor
+ * @exports WoltLab/WCF/Enviroment
*/
- function Environment() {};
- Environment.prototype = {
+ var Environment = {
/**
* Determines environment variables.
*/
}
};
- return new Environment();
+ return Environment;
});
var _listeners = new Dictionary();
/**
- * @constructor
+ * @exports WoltLab/WCF/Event/Handler
*/
- function EventHandler() {};
- EventHandler.prototype = {
+ var EventHandler = {
/**
* Adds an event listener.
*
return;
}
- callbacks.delete(uuid);
+ callbacks['delete'](uuid);
},
/**
}
if (typeof action === 'undefined') {
- _listeners.delete(identifier);
+ _listeners['delete'](identifier);
}
else {
- actions.delete(action);
+ actions['delete'](action);
}
}
};
- return new EventHandler();
+ return EventHandler;
});
var _languageItems = new Dictionary();
/**
- * @constructor
+ * @exports WoltLab/WCF/Language
*/
- function Language() { };
- Language.prototype = {
+ var Language = {
/**
* Adds all the language items in the given object to the store.
*
}
};
- return new Language();
+ return Language;
});
"use strict";
/**
- * @constructor
+ * @exports WoltLab/WCF/NumberUtil
*/
- function NumberUtil() { };
- NumberUtil.prototype = {
+ var NumberUtil = {
/**
* Decimal adjustment of a number.
*
}
};
- return new NumberUtil();
+ return NumberUtil;
});
"use strict";
/**
- * @constructor
+ * @exports WoltLab/WCF/StringUtil
*/
- function StringUtil() { };
- StringUtil.prototype = {
+ var StringUtil = {
/**
* Adds thousands separators to a given number.
*
}
};
- return new StringUtil();
+ return StringUtil;
});
"use strict";
/**
- * @constructor
+ * @exports WoltLab/WCF/UI/Alignment
*/
- function UIAlignment() {};
- UIAlignment.prototype = {
+ var UIAlignment = {
/**
* Sets the alignment for target element relatively to the reference element.
*
}
};
- return new UIAlignment();
+ return UIAlignment;
});
var _keyupListener = null;
/**
- * @constructor
+ * @exports WoltLab/WCF/UI/Dialog
*/
- function UIDialog() {};
- UIDialog.prototype = {
+ var UIDialog = {
/**
* Sets up global container and internal variables.
*/
}
};
- return new UIDialog();
+ return UIDialog;
});
var _menuContainer = null;
/**
- * @constructor
+ * @exports WoltLab/WCF/UI/Dropdown/Simple
*/
- function SimpleDropdown() { };
- SimpleDropdown.prototype = {
+ var SimpleDropdown = {
/**
* Performs initial setup such as setting up dropdowns and binding listeners.
*/
var menu = _menus.get(containerId);
_menus.parentNode.removeChild(menu);
- _menus.delete(containerId);
- _dropdowns.delete(containerId);
+ _menus['delete'](containerId);
+ _dropdowns['delete'](containerId);
return true;
},
}
};
- return new SimpleDropdown();
+ return SimpleDropdown;
});
var _sidebar = null;
/**
- * @constructor
+ * @exports WoltLab/WCF/UI/Mobile
*/
- function UIMobile() {};
- UIMobile.prototype = {
+ var UIMobile = {
/**
* Initializes the mobile UI using enquire.js.
*/
}
};
- return new UIMobile();
+ return UIMobile;
});
var _tabMenus = new Dictionary();
/**
- * @constructor
+ * @exports WoltLab/WCF/UI/TabMenu
*/
- function UITabMenu() {};
- UITabMenu.prototype = {
+ var UITabMenu = {
/**
* Sets up tab menus and binds listeners.
*/
}
};
- return new UITabMenu();
+ return UITabMenu;
});
var _tooltip = null;
/**
- * @constructor
+ * @exports WoltLab/WCF/UI/Tooltip
*/
- function UITooltip() {};
- UITooltip.prototype = {
+ var UITooltip = {
/**
* Initializes the tooltip element and binds event listener.
*/
}
};
- return new UITooltip();
+ return UITooltip;
});