From: Alexander Ebert Date: Wed, 30 Apr 2014 09:56:33 +0000 (+0200) Subject: Removed minified files X-Git-Tag: 2.1.0_Alpha_1~853 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bd58fb0b64e8be27aeb3465b6f72e7bc3c45b1d5;p=GitHub%2FWoltLab%2FWCF.git Removed minified files --- diff --git a/wcfsetup/install/files/js/WCF.Combined.js b/wcfsetup/install/files/js/WCF.Combined.js deleted file mode 100755 index 6a0da296c2..0000000000 --- a/wcfsetup/install/files/js/WCF.Combined.js +++ /dev/null @@ -1,23265 +0,0 @@ -// WCF.Combined.js -- DO NOT EDIT - -// included files: -// - WCF.js -// - WCF.Like.js -// - WCF.ACL.js -// - WCF.Attachment.js -// - WCF.ColorPicker.js -// - WCF.Comment.js -// - WCF.ImageViewer.js -// - WCF.Label.js -// - WCF.Location.js -// - WCF.Message.js -// - WCF.Moderation.js -// - WCF.Poll.js -// - WCF.Search.Message.js -// - WCF.Tagging.js -// - WCF.User.js - -// WCF.js -/** - * Class and function collection for WCF. - * - * Major Contributors: Markus Bartz, Tim Duesterhus, Matthias Schmidt and Marcel Werk - * - * @author Alexander Ebert - * @copyright 2001-2014 WoltLab GmbH - * @license GNU Lesser General Public License - */ - -(function() { - // store original implementation - var $jQueryData = jQuery.fn.data; - - /** - * Override jQuery.fn.data() to support custom 'ID' suffix which will - * be translated to '-id' at runtime. - * - * @see jQuery.fn.data() - */ - jQuery.fn.data = function(key, value) { - if (key) { - switch (typeof key) { - case 'object': - for (var $key in key) { - if ($key.match(/ID$/)) { - var $value = key[$key]; - delete key[$key]; - - $key = $key.replace(/ID$/, '-id'); - key[$key] = $value; - } - } - - arguments[0] = key; - break; - - case 'string': - if (key.match(/ID$/)) { - arguments[0] = key.replace(/ID$/, '-id'); - } - break; - } - } - - // call jQuery's own data method - var $data = $jQueryData.apply(this, arguments); - - // handle .data() call without arguments - if (key === undefined) { - for (var $key in $data) { - if ($key.match(/Id$/)) { - $data[$key.replace(/Id$/, 'ID')] = $data[$key]; - delete $data[$key]; - } - } - } - - return $data; - }; - - // provide a sane window.console implementation - if (!window.console) window.console = { }; - var consoleProperties = [ "log",/* "debug",*/ "info", "warn", "exception", "assert", "dir", "dirxml", "trace", "group", "groupEnd", "groupCollapsed", "profile", "profileEnd", "count", "clear", "time", "timeEnd", "timeStamp", "table", "error" ]; - for (var i = 0; i < consoleProperties.length; i++) { - if (typeof (console[consoleProperties[i]]) === 'undefined') { - console[consoleProperties[i]] = function () { }; - } - } - - if (typeof(console.debug) === 'undefined') { - // forward console.debug to console.log (IE9) - console.debug = function(string) { console.log(string); }; - } -})(); - -/** - * Simple JavaScript Inheritance - * By John Resig http://ejohn.org/ - * MIT Licensed. - */ -// Inspired by base2 and Prototype -(function(){var a=false,b=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.Class=function(){};Class.extend=function(c){function g(){if(!a&&this.init)this.init.apply(this,arguments);}var d=this.prototype;a=true;var e=new this;a=false;for(var f in c){e[f]=typeof c[f]=="function"&&typeof d[f]=="function"&&b.test(c[f])?function(a,b){return function(){var c=this._super;this._super=d[a];var e=b.apply(this,arguments);this._super=c;return e;};}(f,c[f]):c[f]}g.prototype=e;g.prototype.constructor=g;g.extend=arguments.callee;return g;};})(); - -/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license */ -window.matchMedia||(window.matchMedia=function(){"use strict";var e=window.styleMedia||window.media;if(!e){var t=document.createElement("style"),n=document.getElementsByTagName("script")[0],r=null;t.type="text/css";t.id="matchmediajs-test";n.parentNode.insertBefore(t,n);r="getComputedStyle"in window&&window.getComputedStyle(t,null)||t.currentStyle;e={matchMedium:function(e){var n="@media "+e+"{ #matchmediajs-test { width: 1px; } }";if(t.styleSheet){t.styleSheet.cssText=n}else{t.textContent=n}return r.width==="1px"}}}return function(t){return{matches:e.matchMedium(t||"all"),media:t||"all"}}}()); - -/*! matchMedia() polyfill addListener/removeListener extension. Author & copyright (c) 2012: Scott Jehl. Dual MIT/BSD license */ -(function(){if(window.matchMedia&&window.matchMedia("all").addListener){return false}var e=window.matchMedia,t=e("only all").matches,n=false,r=0,i=[],s=function(t){clearTimeout(r);r=setTimeout(function(){for(var t=0,n=i.length;te&&(n=i(t[e],e),n!==!1);e++);}function n(t){return"[object Array]"===Object.prototype.toString.apply(t)}function e(t){return"function"==typeof t}function s(t){this.options=t,!t.deferSetup&&this.setup()}function o(i,n){this.query=i,this.isUnconditional=n,this.handlers=[],this.mql=t(i);var e=this;this.listener=function(t){e.mql=t,e.assess()},this.mql.addListener(this.listener)}function r(){if(!t)throw Error("matchMedia not present, legacy browsers require a polyfill");this.queries={},this.browserIsIncapable=!t("only all").matches}return s.prototype={setup:function(){this.options.setup&&this.options.setup(),this.initialised=!0},on:function(){!this.initialised&&this.setup(),this.options.match&&this.options.match()},off:function(){this.options.unmatch&&this.options.unmatch()},destroy:function(){this.options.destroy?this.options.destroy():this.off()},equals:function(t){return this.options===t||this.options.match===t}},o.prototype={addHandler:function(t){var i=new s(t);this.handlers.push(i),this.matches()&&i.on()},removeHandler:function(t){var n=this.handlers;i(n,function(i,e){return i.equals(t)?(i.destroy(),!n.splice(e,1)):void 0})},matches:function(){return this.mql.matches||this.isUnconditional},clear:function(){i(this.handlers,function(t){t.destroy()}),this.mql.removeListener(this.listener),this.handlers.length=0},assess:function(){var t=this.matches()?"on":"off";i(this.handlers,function(i){i[t]()})}},r.prototype={register:function(t,s,r){var h=this.queries,u=r&&this.browserIsIncapable;return h[t]||(h[t]=new o(t,u)),e(s)&&(s={match:s}),n(s)||(s=[s]),i(s,function(i){h[t].addHandler(i)}),this},unregister:function(t,i){var n=this.queries[t];return n&&(i?n.removeHandler(i):(n.clear(),delete this.queries[t])),this}},new r}); - -/*! head.load - v1.0.3 */ -(function(n,t){"use strict";function w(){}function u(n,t){if(n){typeof n=="object"&&(n=[].slice.call(n));for(var i=0,r=n.length;i 0)); - - // detect smartphones - jQuery.browser.smartphone = ($('html').css('caption-side') == 'bottom'); - - // allow plugins to detect the used editor, value should be the same as the $.browser. key - jQuery.browser.editor = 'redactor'; - - // CKEditor support (removed in WCF 2.1), do NOT remove this variable for the sake for compatibility - jQuery.browser.ckeditor = false; - - // Redactor support - jQuery.browser.redactor = true; - - // properly detect IE11 - if (jQuery.browser.mozilla && ua.match(/trident/)) { - jQuery.browser.mozilla = false; - jQuery.browser.msie = true; - } -})(); - -/** - * jQuery.browser.mobile (http://detectmobilebrowser.com/) - * - * jQuery.browser.mobile will be true if the browser is a mobile device - * - **/ -(function(a){(jQuery.browser=jQuery.browser||{}).mobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))})(navigator.userAgent||navigator.vendor||window.opera); - -/** - * Initialize WCF namespace - */ -var WCF = {}; - -/** - * Extends jQuery with additional methods. - */ -$.extend(true, { - /** - * Removes the given value from the given array and returns the array. - * - * @param array array - * @param mixed element - * @return array - */ - removeArrayValue: function(array, value) { - return $.grep(array, function(element, index) { - return value !== element; - }); - }, - - /** - * Escapes an ID to work with jQuery selectors. - * - * @see http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_select_an_element_by_an_ID_that_has_characters_used_in_CSS_notation.3F - * @param string id - * @return string - */ - wcfEscapeID: function(id) { - return id.replace(/(:|\.)/g, '\\$1'); - }, - - /** - * Returns true if given ID exists within DOM. - * - * @param string id - * @return boolean - */ - wcfIsset: function(id) { - return !!$('#' + $.wcfEscapeID(id)).length; - }, - - /** - * Returns the length of an object. - * - * @param object targetObject - * @return integer - */ - getLength: function(targetObject) { - var $length = 0; - - for (var $key in targetObject) { - if (targetObject.hasOwnProperty($key)) { - $length++; - } - } - - return $length; - } -}); - -/** - * Extends jQuery's chainable methods. - */ -$.fn.extend({ - /** - * Returns tag name of first jQuery element. - * - * @returns string - */ - getTagName: function() { - return (this.length) ? this.get(0).tagName.toLowerCase() : ''; - }, - - /** - * Returns the dimensions for current element. - * - * @see http://api.jquery.com/hidden-selector/ - * @param string type - * @return object - */ - getDimensions: function(type) { - var dimensions = css = {}; - var wasHidden = false; - - // show element to retrieve dimensions and restore them later - if (this.is(':hidden')) { - css = WCF.getInlineCSS(this); - - wasHidden = true; - - this.css({ - display: 'block', - visibility: 'hidden' - }); - } - - switch (type) { - case 'inner': - dimensions = { - height: this.innerHeight(), - width: this.innerWidth() - }; - break; - - case 'outer': - dimensions = { - height: this.outerHeight(), - width: this.outerWidth() - }; - break; - - default: - dimensions = { - height: this.height(), - width: this.width() - }; - break; - } - - // restore previous settings - if (wasHidden) { - WCF.revertInlineCSS(this, css, [ 'display', 'visibility' ]); - } - - return dimensions; - }, - - /** - * Returns the offsets for current element, defaults to position - * relative to document. - * - * @see http://api.jquery.com/hidden-selector/ - * @param string type - * @return object - */ - getOffsets: function(type) { - var offsets = css = {}; - var wasHidden = false; - - // show element to retrieve dimensions and restore them later - if (this.is(':hidden')) { - css = WCF.getInlineCSS(this); - wasHidden = true; - - this.css({ - display: 'block', - visibility: 'hidden' - }); - } - - switch (type) { - case 'offset': - offsets = this.offset(); - break; - - case 'position': - default: - offsets = this.position(); - break; - } - - // restore previous settings - if (wasHidden) { - WCF.revertInlineCSS(this, css, [ 'display', 'visibility' ]); - } - - return offsets; - }, - - /** - * Changes element's position to 'absolute' or 'fixed' while maintaining it's - * current position relative to viewport. Optionally removes element from - * current DOM-node and moving it into body-element (useful for drag & drop) - * - * @param boolean rebase - * @return object - */ - makePositioned: function(position, rebase) { - if (position != 'absolute' && position != 'fixed') { - position = 'absolute'; - } - - var $currentPosition = this.getOffsets('position'); - this.css({ - position: position, - left: $currentPosition.left, - margin: 0, - top: $currentPosition.top - }); - - if (rebase) { - this.remove().appentTo('body'); - } - - return this; - }, - - /** - * Disables a form element. - * - * @return jQuery - */ - disable: function() { - return this.attr('disabled', 'disabled'); - }, - - /** - * Enables a form element. - * - * @return jQuery - */ - enable: function() { - return this.removeAttr('disabled'); - }, - - /** - * Returns the element's id. If none is set, a random unique - * ID will be assigned. - * - * @return string - */ - wcfIdentify: function() { - if (!this.attr('id')) { - this.attr('id', WCF.getRandomID()); - } - - return this.attr('id'); - }, - - /** - * Returns the caret position of current element. If the element - * does not equal input[type=text], input[type=password] or - * textarea, -1 is returned. - * - * @return integer - */ - getCaret: function() { - if (this.is('input')) { - if (this.attr('type') != 'text' && this.attr('type') != 'password') { - return -1; - } - } - else if (!this.is('textarea')) { - return -1; - } - - var $position = 0; - var $element = this.get(0); - if (document.selection) { // IE 8 - // set focus to enable caret on this element - this.focus(); - - var $selection = document.selection.createRange(); - $selection.moveStart('character', -this.val().length); - $position = $selection.text.length; - } - else if ($element.selectionStart || $element.selectionStart == '0') { // Opera, Chrome, Firefox, Safari, IE 9+ - $position = parseInt($element.selectionStart); - } - - return $position; - }, - - /** - * Sets the caret position of current element. If the element - * does not equal input[type=text], input[type=password] or - * textarea, false is returned. - * - * @param integer position - * @return boolean - */ - setCaret: function (position) { - if (this.is('input')) { - if (this.attr('type') != 'text' && this.attr('type') != 'password') { - return false; - } - } - else if (!this.is('textarea')) { - return false; - } - - var $element = this.get(0); - - // set focus to enable caret on this element - this.focus(); - if (document.selection) { // IE 8 - var $selection = document.selection.createRange(); - $selection.moveStart('character', position); - $selection.moveEnd('character', 0); - $selection.select(); - } - else if ($element.selectionStart || $element.selectionStart == '0') { // Opera, Chrome, Firefox, Safari, IE 9+ - $element.selectionStart = position; - $element.selectionEnd = position; - } - - return true; - }, - - /** - * Shows an element by sliding and fading it into viewport. - * - * @param string direction - * @param object callback - * @param integer duration - * @returns jQuery - */ - wcfDropIn: function(direction, callback, duration) { - if (!direction) direction = 'up'; - if (!duration || !parseInt(duration)) duration = 200; - - return this.show(WCF.getEffect(this, 'drop'), { direction: direction }, duration, callback); - }, - - /** - * Hides an element by sliding and fading it out the viewport. - * - * @param string direction - * @param object callback - * @param integer duration - * @returns jQuery - */ - wcfDropOut: function(direction, callback, duration) { - if (!direction) direction = 'down'; - if (!duration || !parseInt(duration)) duration = 200; - - return this.hide(WCF.getEffect(this, 'drop'), { direction: direction }, duration, callback); - }, - - /** - * Shows an element by blinding it up. - * - * @param string direction - * @param object callback - * @param integer duration - * @returns jQuery - */ - wcfBlindIn: function(direction, callback, duration) { - if (!direction) direction = 'vertical'; - if (!duration || !parseInt(duration)) duration = 200; - - return this.show(WCF.getEffect(this, 'blind'), { direction: direction }, duration, callback); - }, - - /** - * Hides an element by blinding it down. - * - * @param string direction - * @param object callback - * @param integer duration - * @returns jQuery - */ - wcfBlindOut: function(direction, callback, duration) { - if (!direction) direction = 'vertical'; - if (!duration || !parseInt(duration)) duration = 200; - - return this.hide(WCF.getEffect(this, 'blind'), { direction: direction }, duration, callback); - }, - - /** - * Highlights an element. - * - * @param object options - * @param object callback - * @returns jQuery - */ - wcfHighlight: function(options, callback) { - return this.effect('highlight', options, 600, callback); - }, - - /** - * Shows an element by fading it in. - * - * @param object callback - * @param integer duration - * @returns jQuery - */ - wcfFadeIn: function(callback, duration) { - if (!duration || !parseInt(duration)) duration = 200; - - return this.show(WCF.getEffect(this, 'fade'), { }, duration, callback); - }, - - /** - * Hides an element by fading it out. - * - * @param object callback - * @param integer duration - * @returns jQuery - */ - wcfFadeOut: function(callback, duration) { - if (!duration || !parseInt(duration)) duration = 200; - - return this.hide(WCF.getEffect(this, 'fade'), { }, duration, callback); - } -}); - -/** - * WoltLab Community Framework core methods - */ -$.extend(WCF, { - /** - * count of active dialogs - * @var integer - */ - activeDialogs: 0, - - /** - * Counter for dynamic element ids - * - * @var integer - */ - _idCounter: 0, - - /** - * Returns a dynamically created id. - * - * @see https://github.com/sstephenson/prototype/blob/5e5cfff7c2c253eaf415c279f9083b4650cd4506/src/prototype/dom/dom.js#L1789 - * @return string - */ - getRandomID: function() { - var $elementID = ''; - - do { - $elementID = 'wcf' + this._idCounter++; - } - while ($.wcfIsset($elementID)); - - return $elementID; - }, - - /** - * Wrapper for $.inArray which returns boolean value instead of - * index value, similar to PHP's in_array(). - * - * @param mixed needle - * @param array haystack - * @return boolean - */ - inArray: function(needle, haystack) { - return ($.inArray(needle, haystack) != -1); - }, - - /** - * Adjusts effect for partially supported elements. - * - * @param jQuery object - * @param string effect - * @return string - */ - getEffect: function(object, effect) { - // most effects are not properly supported on table rows, use highlight instead - if (object.is('tr')) { - return 'highlight'; - } - - return effect; - }, - - /** - * Returns inline CSS for given element. - * - * @param jQuery element - * @return object - */ - getInlineCSS: function(element) { - var $inlineStyles = { }; - var $style = element.attr('style'); - - // no style tag given or empty - if (!$style) { - return { }; - } - - $style = $style.split(';'); - for (var $i = 0, $length = $style.length; $i < $length; $i++) { - var $fragment = $.trim($style[$i]); - if ($fragment == '') { - continue; - } - - $fragment = $fragment.split(':'); - $inlineStyles[$.trim($fragment[0])] = $.trim($fragment[1]); - } - - return $inlineStyles; - }, - - /** - * Reverts inline CSS or negates a previously set property. - * - * @param jQuery element - * @param object inlineCSS - * @param array targetProperties - */ - revertInlineCSS: function(element, inlineCSS, targetProperties) { - for (var $i = 0, $length = targetProperties.length; $i < $length; $i++) { - var $property = targetProperties[$i]; - - // revert inline CSS - if (inlineCSS[$property]) { - element.css($property, inlineCSS[$property]); - } - else { - // negate inline CSS - element.css($property, ''); - } - } - } -}); - -/** - * Browser related functions. - */ -WCF.Browser = { - /** - * determines if browser is chrome - * @var boolean - */ - _isChrome: null, - - /** - * Returns true, if browser is Chrome, Chromium or using GoogleFrame for Internet Explorer. - * - * @return boolean - */ - isChrome: function() { - if (this._isChrome === null) { - this._isChrome = false; - if (/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())) { - this._isChrome = true; - } - } - - return this._isChrome; - } -}; - -/** - * Dropdown API - */ -WCF.Dropdown = { - /** - * list of callbacks - * @var object - */ - _callbacks: { }, - - /** - * initialization state - * @var boolean - */ - _didInit: false, - - /** - * list of registered dropdowns - * @var object - */ - _dropdowns: { }, - - /** - * container for dropdown menus - * @var object - */ - _menuContainer: null, - - /** - * list of registered dropdown menus - * @var object - */ - _menus: { }, - - /** - * Initializes dropdowns. - */ - init: function() { - if (this._menuContainer === null) { - this._menuContainer = $('