diff options
author | nancylizi <li.zi30@zte.com.cn> | 2017-03-20 16:47:42 +0800 |
---|---|---|
committer | nancylizi <li.zi30@zte.com.cn> | 2017-03-20 16:47:42 +0800 |
commit | 93e29ad7d5c9ba017252cb7b25aca94657023dd7 (patch) | |
tree | 6ec8b43d492a442d559c2d71019df896cd33dd93 /common/src/main/webapp/thirdparty/uniform | |
parent | f92ae6ce2db3d94d1ea50b5e3de66a54107efa0e (diff) |
Resolve the dependent problem.
Issue-Id: CLIENT-171
Change-Id: Ifad1deec7b7c737b5b2e44950720189248c2666d
Signed-off-by: nancylizi <li.zi30@zte.com.cn>
Diffstat (limited to 'common/src/main/webapp/thirdparty/uniform')
-rw-r--r-- | common/src/main/webapp/thirdparty/uniform/README.md | 389 | ||||
-rw-r--r-- | common/src/main/webapp/thirdparty/uniform/css/uniform.default.css | 366 | ||||
-rw-r--r-- | common/src/main/webapp/thirdparty/uniform/css/uniform.default.min.css | 1 | ||||
-rw-r--r-- | common/src/main/webapp/thirdparty/uniform/css/uniform.default.scss | 150 | ||||
-rw-r--r-- | common/src/main/webapp/thirdparty/uniform/images/bg-input-focus.png | bin | 0 -> 143 bytes | |||
-rw-r--r-- | common/src/main/webapp/thirdparty/uniform/images/bg-input.png | bin | 0 -> 143 bytes | |||
-rw-r--r-- | common/src/main/webapp/thirdparty/uniform/images/sprite.png | bin | 0 -> 31815 bytes | |||
-rw-r--r-- | common/src/main/webapp/thirdparty/uniform/images/sprite_original.png | bin | 0 -> 34229 bytes | |||
-rw-r--r-- | common/src/main/webapp/thirdparty/uniform/jquery.uniform.js | 1068 | ||||
-rw-r--r-- | common/src/main/webapp/thirdparty/uniform/jquery.uniform.min.js | 1 |
10 files changed, 1975 insertions, 0 deletions
diff --git a/common/src/main/webapp/thirdparty/uniform/README.md b/common/src/main/webapp/thirdparty/uniform/README.md new file mode 100644 index 00000000..7377b19d --- /dev/null +++ b/common/src/main/webapp/thirdparty/uniform/README.md @@ -0,0 +1,389 @@ +Uniform +======= + +Sexy form elements with jQuery. Now with HTML5 attributes! + +Version 2.1.1 + +Works well with jQuery 1.6+, but we've received patches and heard that this works with jQuery 1.3. + +Licensed under the [MIT License](http://www.opensource.org/licenses/mit-license.php) + + +Installation +------------ + +Installation of Uniform is quite simple. First, make sure you have jQuery installed. Then you’ll want to link to the jquery.uniform.js file and uniform.default.css in the head area of your page. Here's what your `<head>` tag contents should probably contain: + + <!-- Make sure your CSS file is listed before jQuery --> + <link rel="stylesheet" href="uniform.default.css" media="screen" /> + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script> + <script src="jquery.uniform.js"></script> + +This relies upon a copy of jquery.uniform.js, uniform.default.css and the various images all being available on your webserver. + + +Basic usage +----------- + +Using Uniform is easy. Simply tell it what elements to style: + + // Style all <select> elements + $("select").uniform(); + +To "uniform" all possible form elements, just do something like this. Things that can't get styled appropriately will be skipped by Uniform. + + // Style everything + $("select, input, a.button, button").uniform(); + +You can exclude elements too by using more jQuery selectors or methods: + + // Avoid styling some elements + $("select").not(".skip_these").uniform(); // Method 1 + $('select[class!="skip_these"]').uniform(); // Method 2 + +A complete set of tags in the HEAD section of your site can therefore look like this: + + <!-- Make sure your CSS file is listed before jQuery --> + <link rel="stylesheet" href="uniform.default.css" media="screen" /> + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script> + <script src="jquery.uniform.js"></script> + <script type='text/javascript'> + // On load, style typical form elements + $(function () { + $("select, input, button").uniform(); + }); + </script> + + +Extra parameters +---------------- + +You can pass in extra parameters to control certain aspects of Uniform. To pass in parameters, use syntax like what is seen here. This only changes the settings for the elements that are actually uniformed in this particular call. + + $("select").uniform({ + param1: value, + param2: value, + param3: value + }); + +There is a separate listing of global defaults. You access them by using the `defaults` property. *Note: This property name changed in v2.0.* + + $.uniform.defaults.checkedClass = "uniformCheckedClass"; + $.uniform.defaults.fileBtnHtml = "Pick a file"; + +Uniform v1.x had a bug where setting values in the call to `.uniform()` also potentially reset the defaults and redrew other uniformed objects with new settings. As of version 2.0.0 the global defaults are now completely separate from the settings passed to every `.uniform()` call. Extra parameters defined when instantiating Uniform are not global and can't be recalled from `$.uniform.defaults` later. + +### activeClass (string) + +*Default:* "active" + +Sets the class given to elements when they are active (pressed). + + $("select").uniform({activeClass: 'myActiveClass'}); + +### autoHide (boolean) + +*Default:* true + +If this option is set to true, Uniform will hide the new elements if the existing elements are currently hidden using `display: none`. + +If you want to show a select or checkbox you'll need to show the new Uniform div instead of the child element. + +### buttonClass (string) + +*Default:* "button" + +Sets the class given to a button that's been Uniformed + + $("input[type=button]").uniform({buttonClass: 'myBtnClass'}); + +### checkboxClass (string) + +*Default:* "checker" + +Sets the class given to the wrapper div for checkbox elements. + + $(":checkbox").uniform({checkboxClass: 'myCheckClass'}); + +### checkedClass (string) + +*Default:* "checked" + +Sets the class given to elements when they are checked (radios and checkboxes). + + $(":radio, :checkbox").uniform({checkedClass: 'myCheckedClass'}); + +### disabledClass (string) + +*Default:* "disabled" + +Sets the class given to elements when they are disabled. + + $("select").uniform({disabledClass: 'myDisabledClass'}); + +### eventNamespace (string) + +*Default:* ".uniform" + +Binds events using this namespace with jQuery. Useful if you want to unbind them later. Shouldn't probably need to be changed unless it conflicts with other code. + + $("select").uniform({eventNamespace: '.uniformEvents'}); + +### fileButtonClass (string) + +*Default:* "action" + +Sets the class given to div inside a file upload container that acts as the "Choose file" button. + + $(":file").uniform({fileButtonClass: 'myFileBtnClass'}); + +### fileButtonHtml (string) + +*Default:* "Choose File" + +Sets the text written on the action button inside a file upload input. + + $(":file").uniform({fileButtonHtml: 'Choose …'}); + +### fileClass (string) + +*Default:* "uploader" + +Sets the class given to the wrapper div for file upload elements. + + $(":file").uniform({fileClass: 'myFileClass'}); + +### fileDefaultHtml (string) + +*Default:* "No file selected" + +Sets the text written in the filename div of a file upload input when there is no file selected. + + $(":file").uniform({fileDefaultHtml: 'Select a file please'}); + +### filenameClass (string) + +*Default:* "filename" + +Sets the class given to div inside a file upload container that spits out the filename. + + $(":file").uniform({filenameClass: 'myFilenameClass'}); + +### focusClass (string) + +*Default:* "focus" + +Sets the class given to elements when they are focused. + + $("select").uniform({focusClass: 'myFocusClass'}); + +### hoverClass (string) + +*Default:* "hover" + +Sets the class given to elements when they are currently hovered. + + $("select").uniform({hoverClass: 'myHoverClass'}); + +### idPrefix (string) + +*Default:* "uniform" + +If useID is set to true, this string is prefixed to element ID’s and attached to the container div of each Uniformed element. If you have a checkbox with the ID of "remember-me" the container div would have the ID "uniform-remember-me". + + $("select").uniform({idPrefix: 'container'}); + +### inputAddTypeAsClass (boolean) + +*Default:* true + +When true, `<input>` elements will get a class applied that is equal to their "type" attribute. + + $("input").uniform({inputAddTypeAsClass: true}); + +### inputClass (string) + +*Default:* "uniform-input" + +Applies this class to all input elements when they get uniformed. + + $("input").uniform({inputClass: "inputElement"}); + +### radioClass (string) + +*Default:* "radio" + +Sets the class given to the wrapper div for radio elements. + + $(":radio").uniform({radioClass: 'myRadioClass'}); + +### resetDefaultHtml (string) + +*Default:* "Reset" + +This text is what's shown on form reset buttons. It is very similar to submitDefaultHtml. + + $("input[type='reset']).uniform({resetDefaultHtml: "Clear"}); + +### resetSelector (boolean/string) + +*Default:* false + +This parameter allows you to use a jQuery-style selector to point to a "reset" button in your form if you have one. Use false if you have no "reset" button, or a selector string that points to the reset button if you have one. + + $("select").uniform({resetSelector: 'input[type="reset"]'}); + +### selectAutoWidth (boolean) + +*Default:* true + +If this option is set to true, Uniform will try to fit the select width to the actual content. When false, it forces the selects to all be the width that was specified in the theme. + +When using auto widths, the size of the element is detected, then wrapped by Uniform and expanded to fit the wrapping. + +If you want to specify a size of a select element and then have Uniform wrap it appropriately, there will be some difficulty. The size of the element needs to get detected and then will be changed by Uniform. For this to happen, it is suggested you do one of these solutions when you have issues. + + * Set a custom inline width for the element (`<select style="width:XXpx">`) + * Use two css rules; `select { width: XXpx }` and `.selector select { width: 100% }` + +If the select is empty and later populated via JavaScript, you can do one the following: + + * Set a custom inline width for the element (`<select style="width:XXpx">`) + * Uniform the element after it was loaded with options + * Use `$('select').uniform.restore().uniform()` to reapply Uniform to the selects that change + +### selectClass (string) + +*Default:* "selector" + +Sets the class given to the wrapper div for select elements, but not multiselects. + + $("select").uniform({selectClass: 'mySelectClass'}); + +### selectMultiClass (string) + +*Default:* "uniform-multiselect" + +Sets the class given to the wrapper div for select elements that are multiselects. + + $("select").uniform({selectMultiClass: 'myMultiSelectClass'}); + +### submitDefaultHtml (string) + +*Default:* "Submit" + +This text is what's shown on form submit buttons. It is very similar to resetDefaultHtml. + + $("input[type='submit']).uniform({resetDefaultHtml: "Submit Form"}); + +### textareaClass (string) + +*Default:* "uniform" + +The class that is applied to textarea elements. + + $("textarea").uniform({textareaClass: "myTextareaClass"}); + +### useID (boolean) + +*Default:* true + +If true, sets an ID on the container div of each form element. The ID is a prefixed version of the same ID of the form element. + + $("select").uniform({useID: false}); + +### wrapperClass (string) + +*Default:* null + +When uniforming, the top level element that wraps the input is given this class. When elements would not normally be given a wrapper element, this option will create a wrapper element anyway. This can really help with running multiple themes on a single page. + + $('input.blue').uniform({wrapperClass: "blueTheme"}); + $('input').uniform({wrapperClass: "defaultTheme"}); + + +Additional Functions And Properties +----------------------------------- + +In addition to the parameters, there are a couple of other ways you can interact with Uniform. + +### $.uniform.update([elem/selector string]); + +If you need to change values on the form dynamically you must tell Uniform to update that element’s style. Fortunately, it’s very simple. Just call this function, and Uniform will do the rest. + + $.uniform.update("#myUpdatedCheckbox"); + +If you don't mind updating all Uniformed elements or just don’t specifically know which element to update, you can just leave out the parameter (see below) and Uniform will update all Uniformed elements on the page: + + $.uniform.update(); + +### $.uniform.restore([elem/selector string]); + +If you want to "un-uniform" something, simply call this function. It will remove the inline styles, extra dom elements, and event handlers, effectively restoring the element to it's previous state. + + $.uniform.restore("select"); + +### $.uniform.elements[] + +You can get an array of all the elements that have been Uniformed at any time using this public variable. I don't advise changing the contents! + + var uniforms = $.uniform.elements; + + +Customizing CSS +--------------- + +To edit the CSS of Uniform it is highly recommended to not edit the theme files, but to override them using CSS. Make sure your CSS file comes after the Uniform theme css file in the HEAD section. + +It's common to want to resize the selects or other elements. The best way is to set the width property on the div element, span element and the form element itself. Resizing "select" lists is a bit tougher as you need to change the line height. I suggest looking at the _base theme's SCSS file to see where the various width and height variables are used. + +If you'd like to create your own theme, take a peek at theme-kit/README.md. It's on [github](https://github.com/pixelmatrix/uniform) and included in the [theme kit](http://uniformjs.org/downloads/theme-kit.zip). + + +Tips & Tricks +------------- + +Uniform is supposed to be pretty simple, but there are a few things that can be tricky. Here are some tips that may make your experience simpler: + +* Remember to change the CSS classes in the theme if you change the parameters for elements’ classes. This can be tedious work, but if you don’t do it, it’s not going to look correct. Find and Replace is your friend. + +* Uniform cannot automatically sniff out dynamic value changes. If you make changes to elements in JavaScript or using a reset button of some kind, remember to call $.uniform.update(); to sync the changes with Uniform. See [Issue #270](https://github.com/pixelmatrix/uniform/issues/270) for the little bit of code you will need. + +* Likewise, when you add elements to the DOM, perhaps via AJAX, and they need to get styled, you will need to use $('#newElement').uniform() on it so the styling is applied. + +* Uniform is disabled in IE6. It’s not possible to fix due to the way IE6 handles form elements. If you care about IE6 users, give it a quick look to make sure your "naked" form elements look alright in there. + +* There is a bug in Safari 5.1 that will cause the web rendering process to crash when you use custom fonts. For more information, see [Issue #183](https://github.com/pixelmatrix/uniform/issues/183). + +* With IE 7-9, sometimes the "change" event doesn't get fired or doesn't get triggered at the right time. When we detect a change, Uniform may submit its own "change" event on the element. See [Issue #152](https://github.com/pixelmatrix/uniform/issues/152) and [Issue #238](https://github.com/pixelmatrix/uniform/issues/238). + +* With IE9, you may have problems with some fonts on your site. See [Issue #226](https://github.com/pixelmatrix/uniform/issues/226) if you mysteriously see a blank page or blank form elements. The fonts in Uniform have been arranged to work around this, but custom themes may not work properly. + +* If you have ideas, or bugs, please post them in [GitHub](https://github.com/pixelmatrix/uniform). We rely on our users' for improvement ideas and bug reports. Without your participation, Uniform will stay static. + +* If you are having problems with automatically sized select elements in Firefox, double check and ensure your CSS files are listed before jQuery, Uniform and your code that uniforms the form elements. Also check the selectAutoWidth property's documentation. + + +Upgrading To 2.0 And Later +-------------------------- + +Your sprite map will now support many new things and will need to be updated. If you use custom backgrounds that are not in the sprite map, those will need updating as well. + +The uniform.options object was renamed to uniform.defaults since they are the default options. Other properties were renamed to be consistent or have less ambiguous names, such as `fileBtnClass` becoming `fileButtonClass`. + +Previously, calls to update() would render all elements with the most recent set of options. This has been fixed, but may change how your page looks. Test to make sure things still render as expected. + +$.uniform.noSelect is no longer exposed and has been updated to version 1.0.3. + +$.uniform.restore() does not need to be global; you now can use $('#myId').uniform.restore() instead to just restore some elements. Same thing for updates. + +The sprite changed a bit. The caps for select lists were moved to the left-hand side. Button theming was added and the file upload images were reordered to match the select list order. See the theme-kit/README.md file for further reading on this topic. + + +Reporting Bugs +-------------- + +It sure would be handy if you could create a test page to help illustrate bugs. When you use the <a href="https://github.com/pixelmatrix/uniform/issues">GitHub Issue Tracker</a>, you could clone this [bug template gist](https://gist.github.com/4328659) or use [this jsfiddle](http://jsfiddle.net/fidian/JNCFP/) to help illustrate your point. + +Even if you don't do that, all sorts of feedback is welcome, but narrowing down your problem or providing an example would immediately help narrow down the problem quickly. diff --git a/common/src/main/webapp/thirdparty/uniform/css/uniform.default.css b/common/src/main/webapp/thirdparty/uniform/css/uniform.default.css new file mode 100644 index 00000000..2e7fd200 --- /dev/null +++ b/common/src/main/webapp/thirdparty/uniform/css/uniform.default.css @@ -0,0 +1,366 @@ +/* + +Uniform Theme: Uniform Default +Version: 1.8 +By: Josh Pyles +License: MIT License +--- +For use with the Uniform plugin: +http://uniformjs.com/ + +*/ +/* General settings */ +div.selector, div.selector span, div.checker span, div.radio span, div.uploader, div.uploader span.action, div.button, div.button span { + background-image: url("../images/sprite.png"); + background-repeat: no-repeat; + -webkit-font-smoothing: antialiased; } +div.selector, div.checker, div.button, div.radio, div.uploader { + display: -moz-inline-box; + display: inline-block; + *display: inline; + zoom: 1; + vertical-align: middle; + /* Keeping this as :focus to remove browser styles */ } + div.selector:focus, div.checker:focus, div.button:focus, div.radio:focus, div.uploader:focus { + outline: 0; } +div.selector, div.selector *, div.radio, div.radio *, div.checker, div.checker *, div.uploader, div.uploader *, div.button, div.button * { + margin: 0; + padding: 0; } + +.highContrastDetect { + background: url("../images/bg-input.png") repeat-x 0 0; + width: 0px; + height: 0px; } + +/* Input & Textarea */ +input.uniform-input, +select.uniform-multiselect, +textarea.uniform { + padding: 3px; + background: url("../images/bg-input.png") repeat-x 0 0; + outline: 0; } + input.uniform-input.active, + select.uniform-multiselect.active, + textarea.uniform.active { + background: url("../images/bg-input-focus.png") repeat-x 0 0; } + +/* Remove default webkit and possible mozilla .search styles. + * Keeping this as :active to remove browser styles */ +div.checker input, +input[type="search"], +input[type="search"]:active { + -moz-appearance: none; + -webkit-appearance: none; } + +/* Select */ +div.selector { + background-position: 0 -130px; + line-height: 26px; + height: 26px; + padding: 0 0 0 10px; + position: relative; + overflow: hidden; } + div.selector span { + text-overflow: ellipsis; + display: block; + overflow: hidden; + white-space: nowrap; + background-position: right 0; + height: 26px; + line-height: 26px; + padding-right: 25px; + cursor: pointer; + width: 100%; + display: block; } + div.selector.fixedWidth { + width: 190px; } + div.selector.fixedWidth span { + width: 155px; } + div.selector select { + opacity: 0; + filter: alpha(opacity=0); + -moz-opacity: 0; + border: none; + background: none; + position: absolute; + height: 22px; + top: 2px; + left: 0px; + width: 100%; } + div.selector.active { + background-position: 0 -156px; } + div.selector.active span { + background-position: right -26px; } + div.selector.hover, div.selector.focus { + background-position: 0 -182px; } + div.selector.hover span, div.selector.focus span { + background-position: right -52px; } + div.selector.hover.active, div.selector.focus.active { + background-position: 0 -208px; } + div.selector.hover.active span, div.selector.focus.active span { + background-position: right -78px; } + div.selector.disabled, div.selector.disabled.active { + background-position: 0 -234px; } + div.selector.disabled span, div.selector.disabled.active span { + background-position: right -104px; } + +/* Checkbox */ +div.checker { + position: relative; } + div.checker, div.checker span, div.checker input { + width: 19px; + height: 19px; } + div.checker span { + display: -moz-inline-box; + display: inline-block; + *display: inline; + zoom: 1; + text-align: center; + background-position: 0 -260px; } + div.checker span.checked { + background-position: -76px -260px; } + div.checker input { + opacity: 0; + filter: alpha(opacity=0); + -moz-opacity: 0; + border: none; + background: none; + display: -moz-inline-box; + display: inline-block; + *display: inline; + zoom: 1; } + div.checker.active span { + background-position: -19px -260px; } + div.checker.active span.checked { + background-position: -95px -260px; } + div.checker.hover span, div.checker.focus span { + background-position: -38px -260px; } + div.checker.hover span.checked, div.checker.focus span.checked { + background-position: -114px -260px; } + div.checker.hover.active span, div.checker.focus.active span { + background-position: -57px -260px; } + div.checker.hover.active span.checked, div.checker.focus.active span.checked { + background-position: -133px -260px; } + div.checker.disabled, div.checker.disabled.active { + background-position: -152px -260px; } + div.checker.disabled span.checked, div.checker.disabled.active span.checked { + background-position: -171px -260px; } + +/* Radio */ +div.radio { + position: relative; } + div.radio, div.radio span, div.radio input { + width: 18px; + height: 18px; } + div.radio span { + display: -moz-inline-box; + display: inline-block; + *display: inline; + zoom: 1; + text-align: center; + background-position: 0 -279px; } + div.radio span.checked { + background-position: -72px -279px; } + div.radio input { + opacity: 0; + filter: alpha(opacity=0); + -moz-opacity: 0; + border: none; + background: none; + display: -moz-inline-box; + display: inline-block; + *display: inline; + zoom: 1; + text-align: center; } + div.radio.active span { + background-position: -18px -18px -279px; } + div.radio.active span.checked { + background-position: -90px -279px; } + div.radio.hover span, div.radio.focus span { + background-position: -36px -36px -279px; } + div.radio.hover span.checked, div.radio.focus span.checked { + background-position: -108px -279px; } + div.radio.hover.active span, div.radio.focus.active span { + background-position: -54px -279px; } + div.radio.hover.active span.checked, div.radio.focus.active span.checked { + background-position: -126px -279px; } + div.radio.disabled span, div.radio.disabled.active span { + background-position: -144px -279px; } + div.radio.disabled span.checked, div.radio.disabled.active span.checked { + background-position: -162px -279px; } + +/* Uploader */ +div.uploader { + background-position: 0 -297px; + height: 28px; + width: 190px; + cursor: pointer; + position: relative; + overflow: hidden; } + div.uploader span.action { + background-position: right -409px; + height: 28px; + line-height: 28px; + width: 82px; + text-align: center; + float: left; + display: inline; + overflow: hidden; + cursor: pointer; } + div.uploader span.filename { + text-overflow: ellipsis; + display: block; + overflow: hidden; + white-space: nowrap; + float: left; + cursor: default; + height: 24px; + margin: 2px 0 2px 2px; + line-height: 24px; + width: 85px; + padding: 0 10px; } + div.uploader input { + opacity: 0; + filter: alpha(opacity=0); + -moz-opacity: 0; + border: none; + background: none; + position: absolute; + top: 0; + right: 0; + float: right; + cursor: default; + width: 100%; + height: 100%; } + div.uploader.active span.action { + background-position: right -465px; } + div.uploader.hover, div.uploader.focus { + background-position: 0 -353px; } + div.uploader.hover span.action, div.uploader.focus span.action { + background-position: right -437px; } + div.uploader.hover.active span.action, div.uploader.focus.active span.action { + background-position: right -493px; } + div.uploader.disabled, div.uploader.disabled.active { + background-position: 0 -325px; } + div.uploader.disabled span.action, div.uploader.disabled.active span.action { + background-position: right -381px; } + +/* Buttons */ +div.button { + background-position: 0 -641px; + height: 30px; + cursor: pointer; + position: relative; + /* Keep buttons barely visible so they can get focus */ } + div.button a, div.button button, div.button input { + opacity: 0.01; + filter: alpha(opacity=1); + -moz-opacity: 0.01; + display: block; + top: 0; + left: 0; + right: 0; + bottom: 0; + position: absolute; } + div.button span { + display: -moz-inline-box; + display: inline-block; + *display: inline; + zoom: 1; + line-height: 22px; + text-align: center; + background-position: right -521px; + height: 22px; + margin-left: 13px; + padding: 8px 15px 0 2px; } + div.button.active { + background-position: 0 -671px; } + div.button.active span { + background-position: right -551px; + cursor: default; } + div.button.hover, div.button.focus { + background-position: 0 -701px; } + div.button.hover span, div.button.focus span { + background-position: right -581px; } + div.button.disabled, div.button.disabled.active { + background-position: 0 -731px; } + div.button.disabled span, div.button.disabled.active span { + background-position: right -611px; + cursor: default; } + +/* INPUT & TEXTAREA */ +input.uniform-input, +select.uniform-multiselect, +textarea.uniform { + font-size: 12px; + font-family: "Helvetica Neue", Arial, Helvetica, sans-serif; + font-weight: normal; + color: #777; + border-top: solid 1px #aaaaaa; + border-left: solid 1px #aaaaaa; + border-bottom: solid 1px #cccccc; + border-right: solid 1px #cccccc; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; } + input.uniform-input.hover, input.uniform-input.focus, + select.uniform-multiselect.hover, + select.uniform-multiselect.focus, + textarea.uniform.hover, + textarea.uniform.focus { + -webkit-box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.3); + -moz-box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.3); + box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.3); + border-color: #999; } + +/* PRESENTATION */ +/* Buttons */ +div.button span { + font-weight: bold; + font-family: "Helvetica Neue", Arial, Helvetica, sans-serif; + font-size: 12px; + letter-spacing: 1px; + text-transform: uppercase; } +div.button.hover span, div.button.focus span { + color: #555; } +div.button.disabled span, div.button.disabled.active span { + color: #bbb; } + +/* Select */ +div.selector { + font-size: 12px; } + div.selector span { + color: #666; + text-shadow: 0 1px 0 white; } + div.selector select { + font-family: "Helvetica Neue", Arial, Helvetica, sans-serif; + font-size: 12px; } + div.selector.disabled span, div.selector.disabled.active span { + color: #bbb; } + +/* Checker */ +div.checker { + margin-right: 5px; } + +/* Radio */ +div.radio { + margin-right: 3px; } + +/* Uploader */ +div.uploader span.action { + text-shadow: white 0px 1px 0px; + background-color: #fff; + font-size: 11px; + font-weight: bold; } +div.uploader span.filename { + color: #777; + border-right: solid 1px #bbbbbb; + font-size: 11px; } +div.uploader.disabled span.action, div.uploader.disabled.active span.action { + color: #aaa; } +div.uploader.disabled span.filename, div.uploader.disabled.active span.filename { + border-color: #ddd; + color: #aaa; } + +input.uniform-input, input.uniform-input:focus { + background-color: #fff; } diff --git a/common/src/main/webapp/thirdparty/uniform/css/uniform.default.min.css b/common/src/main/webapp/thirdparty/uniform/css/uniform.default.min.css new file mode 100644 index 00000000..ef4ee103 --- /dev/null +++ b/common/src/main/webapp/thirdparty/uniform/css/uniform.default.min.css @@ -0,0 +1 @@ +div.selector,div.selector span,div.checker span,div.radio span,div.uploader,div.uploader span.action,div.button,div.button span{background-image:url("../images/sprite.png");background-repeat:no-repeat;-webkit-font-smoothing:antialiased}div.selector,div.checker,div.button,div.radio,div.uploader{display:-moz-inline-box;display:inline-block;*display:inline;zoom:1;vertical-align:middle}div.selector:focus,div.checker:focus,div.button:focus,div.radio:focus,div.uploader:focus{outline:0}div.selector,div.selector *,div.radio,div.radio *,div.checker,div.checker *,div.uploader,div.uploader *,div.button,div.button *{margin:0;padding:0}.highContrastDetect{background:url("../images/bg-input.png") repeat-x 0 0;width:0px;height:0px}input.uniform-input,select.uniform-multiselect,textarea.uniform{padding:3px;background:url("../images/bg-input.png") repeat-x 0 0;outline:0}input.uniform-input.active,select.uniform-multiselect.active,textarea.uniform.active{background:url("../images/bg-input-focus.png") repeat-x 0 0}div.checker input,input[type="search"],input[type="search"]:active{-moz-appearance:none;-webkit-appearance:none}div.selector{background-position:0 -130px;line-height:26px;height:26px;padding:0 0 0 10px;position:relative;overflow:hidden}div.selector span{text-overflow:ellipsis;display:block;overflow:hidden;white-space:nowrap;background-position:right 0;height:26px;line-height:26px;padding-right:25px;cursor:pointer;width:100%;display:block}div.selector.fixedWidth{width:190px}div.selector.fixedWidth span{width:155px}div.selector select{opacity:0;filter:alpha(opacity=0);-moz-opacity:0;border:none;background:none;position:absolute;height:22px;top:2px;left:0px;width:100%}div.selector.active{background-position:0 -156px}div.selector.active span{background-position:right -26px}div.selector.hover,div.selector.focus{background-position:0 -182px}div.selector.hover span,div.selector.focus span{background-position:right -52px}div.selector.hover.active,div.selector.focus.active{background-position:0 -208px}div.selector.hover.active span,div.selector.focus.active span{background-position:right -78px}div.selector.disabled,div.selector.disabled.active{background-position:0 -234px}div.selector.disabled span,div.selector.disabled.active span{background-position:right -104px}div.checker{position:relative}div.checker,div.checker span,div.checker input{width:19px;height:19px}div.checker span{display:-moz-inline-box;display:inline-block;*display:inline;zoom:1;text-align:center;background-position:0 -260px}div.checker span.checked{background-position:-76px -260px}div.checker input{opacity:0;filter:alpha(opacity=0);-moz-opacity:0;border:none;background:none;display:-moz-inline-box;display:inline-block;*display:inline;zoom:1}div.checker.active span{background-position:-19px -260px}div.checker.active span.checked{background-position:-95px -260px}div.checker.hover span,div.checker.focus span{background-position:-38px -260px}div.checker.hover span.checked,div.checker.focus span.checked{background-position:-114px -260px}div.checker.hover.active span,div.checker.focus.active span{background-position:-57px -260px}div.checker.hover.active span.checked,div.checker.focus.active span.checked{background-position:-133px -260px}div.checker.disabled,div.checker.disabled.active{background-position:-152px -260px}div.checker.disabled span.checked,div.checker.disabled.active span.checked{background-position:-171px -260px}div.radio{position:relative}div.radio,div.radio span,div.radio input{width:18px;height:18px}div.radio span{display:-moz-inline-box;display:inline-block;*display:inline;zoom:1;text-align:center;background-position:0 -279px}div.radio span.checked{background-position:-72px -279px}div.radio input{opacity:0;filter:alpha(opacity=0);-moz-opacity:0;border:none;background:none;display:-moz-inline-box;display:inline-block;*display:inline;zoom:1;text-align:center}div.radio.active span{background-position:-18px -18px -279px}div.radio.active span.checked{background-position:-90px -279px}div.radio.hover span,div.radio.focus span{background-position:-36px -36px -279px}div.radio.hover span.checked,div.radio.focus span.checked{background-position:-108px -279px}div.radio.hover.active span,div.radio.focus.active span{background-position:-54px -279px}div.radio.hover.active span.checked,div.radio.focus.active span.checked{background-position:-126px -279px}div.radio.disabled span,div.radio.disabled.active span{background-position:-144px -279px}div.radio.disabled span.checked,div.radio.disabled.active span.checked{background-position:-162px -279px}div.uploader{background-position:0 -297px;height:28px;width:190px;cursor:pointer;position:relative;overflow:hidden}div.uploader span.action{background-position:right -409px;height:28px;line-height:28px;width:82px;text-align:center;float:left;display:inline;overflow:hidden;cursor:pointer}div.uploader span.filename{text-overflow:ellipsis;display:block;overflow:hidden;white-space:nowrap;float:left;cursor:default;height:24px;margin:2px 0 2px 2px;line-height:24px;width:85px;padding:0 10px}div.uploader input{opacity:0;filter:alpha(opacity=0);-moz-opacity:0;border:none;background:none;position:absolute;top:0;right:0;float:right;cursor:default;width:100%;height:100%}div.uploader.active span.action{background-position:right -465px}div.uploader.hover,div.uploader.focus{background-position:0 -353px}div.uploader.hover span.action,div.uploader.focus span.action{background-position:right -437px}div.uploader.hover.active span.action,div.uploader.focus.active span.action{background-position:right -493px}div.uploader.disabled,div.uploader.disabled.active{background-position:0 -325px}div.uploader.disabled span.action,div.uploader.disabled.active span.action{background-position:right -381px}div.button{background-position:0 -641px;height:30px;cursor:pointer;position:relative}div.button a,div.button button,div.button input{opacity:0.01;filter:alpha(opacity=1);-moz-opacity:0.01;display:block;top:0;left:0;right:0;bottom:0;position:absolute}div.button span{display:-moz-inline-box;display:inline-block;*display:inline;zoom:1;line-height:22px;text-align:center;background-position:right -521px;height:22px;margin-left:13px;padding:8px 15px 0 2px}div.button.active{background-position:0 -671px}div.button.active span{background-position:right -551px;cursor:default}div.button.hover,div.button.focus{background-position:0 -701px}div.button.hover span,div.button.focus span{background-position:right -581px}div.button.disabled,div.button.disabled.active{background-position:0 -731px}div.button.disabled span,div.button.disabled.active span{background-position:right -611px;cursor:default}input.uniform-input,select.uniform-multiselect,textarea.uniform{font-size:12px;font-family:"Helvetica Neue",Arial,Helvetica,sans-serif;font-weight:normal;color:#777;border-top:solid 1px #aaa;border-left:solid 1px #aaa;border-bottom:solid 1px #ccc;border-right:solid 1px #ccc;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}input.uniform-input.hover,input.uniform-input.focus,select.uniform-multiselect.hover,select.uniform-multiselect.focus,textarea.uniform.hover,textarea.uniform.focus{-webkit-box-shadow:0px 0px 4px rgba(0,0,0,0.3);-moz-box-shadow:0px 0px 4px rgba(0,0,0,0.3);box-shadow:0px 0px 4px rgba(0,0,0,0.3);border-color:#999}div.button span{font-weight:bold;font-family:"Helvetica Neue",Arial,Helvetica,sans-serif;font-size:12px;letter-spacing:1px;text-transform:uppercase}div.button.hover span,div.button.focus span{color:#555}div.button.disabled span,div.button.disabled.active span{color:#bbb}div.selector{font-size:12px}div.selector span{color:#666;text-shadow:0 1px 0 #fff}div.selector select{font-family:"Helvetica Neue",Arial,Helvetica,sans-serif;font-size:12px}div.selector.disabled span,div.selector.disabled.active span{color:#bbb}div.checker{margin-right:5px}div.radio{margin-right:3px}div.uploader span.action{text-shadow:#fff 0px 1px 0px;background-color:#fff;font-size:11px;font-weight:bold}div.uploader span.filename{color:#777;border-right:solid 1px #bbb;font-size:11px}div.uploader.disabled span.action,div.uploader.disabled.active span.action{color:#aaa}div.uploader.disabled span.filename,div.uploader.disabled.active span.filename{border-color:#ddd;color:#aaa}input.uniform-input,input.uniform-input:focus{background-color:#fff} diff --git a/common/src/main/webapp/thirdparty/uniform/css/uniform.default.scss b/common/src/main/webapp/thirdparty/uniform/css/uniform.default.scss new file mode 100644 index 00000000..a32e348e --- /dev/null +++ b/common/src/main/webapp/thirdparty/uniform/css/uniform.default.scss @@ -0,0 +1,150 @@ +/* + +Uniform Theme: Uniform Default +Version: 1.8 +By: Josh Pyles +License: MIT License +--- +For use with the Uniform plugin: +http://uniformjs.com/ + +*/ + +$button-height: 30px; +$button-margin-left: 13px; +$button-padding: 8px 15px 0 2px; +$button-span-height: 22px; +$checkbox-height: 19px; +$checkbox-width: 19px; +$input-padding: 3px; +$radio-height: 18px; +$radio-width: 18px; +$select-fixed-width: 190px; +$select-height: 26px; +$select-margin-left: 10px; +$select-margin-right: 25px; +$select-select-height: 22px; +$select-select-top: 2px; +$upload-action-width: 82px; +$upload-filename-margin-top: 2px; +$upload-filename-margin-bottom: 2px; +$upload-filename-margin-left: 2px; +$upload-filename-width: 85px; +$upload-filename-padding: 0 10px; +$upload-height: 28px; +$upload-width: 190px; + +@import "../../_base/css/uniform._base.scss"; + +/* INPUT & TEXTAREA */ + +#{$class-wrapper-element}#{$class-wrapper} input#{$class-input}, +#{$class-wrapper-element}#{$class-wrapper} select#{$class-multiselect}, +#{$class-wrapper-element}#{$class-wrapper} textarea#{$class-textarea} { + font-size: 12px; + font-family: "Helvetica Neue", Arial, Helvetica, sans-serif; + font-weight: normal; + color: #777; + border-top: solid 1px #aaa; + border-left: solid 1px #aaa; + border-bottom: solid 1px #ccc; + border-right: solid 1px #ccc; + @include border-radius($input-padding); + + @include whenHover { + @include box-shadow(0px 0px 4px rgba(0,0,0,0.3)); + border-color: #999; + } +} + +/* PRESENTATION */ + +/* Buttons */ + +div#{$class-wrapper}#{$class-button} { + span { + font-weight: bold; + font-family: "Helvetica Neue", Arial, Helvetica, sans-serif; + font-size: 12px; + letter-spacing: 1px; + text-transform: uppercase; + } + + @include whenHover { + span { + color: #555; + } + } + + @include whenDisabled { + span { + color: #bbb; + } + } +} + + +/* Select */ + +div#{$class-wrapper}#{$class-select} { + font-size: 12px; + + span { + color: #666; + text-shadow: 0 1px 0 #fff; + } + + select { + font-family: "Helvetica Neue", Arial, Helvetica, sans-serif; + font-size: 12px; + } + + @include whenDisabled { + span { + color: #bbb; + } + } +} + +/* Checker */ +div#{$class-wrapper}#{$class-checkbox} { + margin-right: 5px; +} + +/* Radio */ +div#{$class-wrapper}#{$class-radio} { + margin-right: 3px; +} + +/* Uploader */ +div#{$class-wrapper}#{$class-upload} { + span#{$class-action} { + text-shadow: #fff 0px 1px 0px; + background-color: #fff; + font-size: 11px; + font-weight: bold; + } + + span#{$class-filename} { + color: #777; + border-right: solid 1px #bbb; + font-size: 11px; + } + + @include whenDisabled { + span#{$class-action} { + color: #aaa; + } + + span#{$class-filename} { + border-color: #ddd; + color: #aaa; + } + } +} + +#{$class-wrapper-element}#{$class-wrapper} input#{$class-input} { + &, &:focus { + background-color: #fff; + } +} diff --git a/common/src/main/webapp/thirdparty/uniform/images/bg-input-focus.png b/common/src/main/webapp/thirdparty/uniform/images/bg-input-focus.png Binary files differnew file mode 100644 index 00000000..0b059d48 --- /dev/null +++ b/common/src/main/webapp/thirdparty/uniform/images/bg-input-focus.png diff --git a/common/src/main/webapp/thirdparty/uniform/images/bg-input.png b/common/src/main/webapp/thirdparty/uniform/images/bg-input.png Binary files differnew file mode 100644 index 00000000..485d222e --- /dev/null +++ b/common/src/main/webapp/thirdparty/uniform/images/bg-input.png diff --git a/common/src/main/webapp/thirdparty/uniform/images/sprite.png b/common/src/main/webapp/thirdparty/uniform/images/sprite.png Binary files differnew file mode 100644 index 00000000..358d7be8 --- /dev/null +++ b/common/src/main/webapp/thirdparty/uniform/images/sprite.png diff --git a/common/src/main/webapp/thirdparty/uniform/images/sprite_original.png b/common/src/main/webapp/thirdparty/uniform/images/sprite_original.png Binary files differnew file mode 100644 index 00000000..66b558fc --- /dev/null +++ b/common/src/main/webapp/thirdparty/uniform/images/sprite_original.png diff --git a/common/src/main/webapp/thirdparty/uniform/jquery.uniform.js b/common/src/main/webapp/thirdparty/uniform/jquery.uniform.js new file mode 100644 index 00000000..ad2d6135 --- /dev/null +++ b/common/src/main/webapp/thirdparty/uniform/jquery.uniform.js @@ -0,0 +1,1068 @@ +/* + +Uniform v2.1.0 +Copyright © 2009 Josh Pyles / Pixelmatrix Design LLC +http://pixelmatrixdesign.com + +Requires jQuery 1.3 or newer + +Much thanks to Thomas Reynolds and Buck Wilson for their help and advice on +this. + +Disabling text selection is made possible by Mathias Bynens +<http://mathiasbynens.be/> and his noSelect plugin. +<https://github.com/mathiasbynens/jquery-noselect>, which is embedded. + +Also, thanks to David Kaneda and Eugene Bond for their contributions to the +plugin. + +Tyler Akins has also rewritten chunks of the plugin, helped close many issues, +and ensured version 2 got out the door. + +License: +MIT License - http://www.opensource.org/licenses/mit-license.php + +Enjoy! + +*/ +/*global jQuery, window, document, navigator*/ + +(function ($, undef) { + "use strict"; + + /** + * Use .prop() if jQuery supports it, otherwise fall back to .attr() + * + * @param jQuery $el jQuery'd element on which we're calling attr/prop + * @param ... All other parameters are passed to jQuery's function + * @return The result from jQuery + */ + function attrOrProp($el) { + var args = Array.prototype.slice.call(arguments, 1); + + if ($el.prop) { + // jQuery 1.6+ + return $el.prop.apply($el, args); + } + + // jQuery 1.5 and below + return $el.attr.apply($el, args); + } + + /** + * For backwards compatibility with older jQuery libraries, only bind + * one thing at a time. Also, this function adds our namespace to + * events in one consistent location, shrinking the minified code. + * + * The properties on the events object are the names of the events + * that we are supposed to add to. It can be a space separated list. + * The namespace will be added automatically. + * + * @param jQuery $el + * @param Object options Uniform options for this element + * @param Object events Events to bind, properties are event names + */ + function bindMany($el, options, events) { + var name, namespaced; + + for (name in events) { + if (events.hasOwnProperty(name)) { + namespaced = name.replace(/ |$/g, options.eventNamespace); + $el.bind(namespaced, events[name]); + } + } + } + + /** + * Bind the hover, active, focus, and blur UI updates + * + * @param jQuery $el Original element + * @param jQuery $target Target for the events (our div/span) + * @param Object options Uniform options for the element $target + */ + function bindUi($el, $target, options) { + bindMany($el, options, { + focus: function () { + $target.addClass(options.focusClass); + }, + blur: function () { + $target.removeClass(options.focusClass); + $target.removeClass(options.activeClass); + }, + mouseenter: function () { + $target.addClass(options.hoverClass); + }, + mouseleave: function () { + $target.removeClass(options.hoverClass); + $target.removeClass(options.activeClass); + }, + "mousedown touchbegin": function () { + if (!$el.is(":disabled")) { + $target.addClass(options.activeClass); + } + }, + "mouseup touchend": function () { + $target.removeClass(options.activeClass); + } + }); + } + + /** + * Remove the hover, focus, active classes. + * + * @param jQuery $el Element with classes + * @param Object options Uniform options for the element + */ + function classClearStandard($el, options) { + $el.removeClass(options.hoverClass + " " + options.focusClass + " " + options.activeClass); + } + + /** + * Add or remove a class, depending on if it's "enabled" + * + * @param jQuery $el Element that has the class added/removed + * @param String className Class or classes to add/remove + * @param Boolean enabled True to add the class, false to remove + */ + function classUpdate($el, className, enabled) { + if (enabled) { + $el.addClass(className); + } else { + $el.removeClass(className); + } + } + + /** + * Updating the "checked" property can be a little tricky. This + * changed in jQuery 1.6 and now we can pass booleans to .prop(). + * Prior to that, one either adds an attribute ("checked=checked") or + * removes the attribute. + * + * @param jQuery $tag Our Uniform span/div + * @param jQuery $el Original form element + * @param Object options Uniform options for this element + */ + function classUpdateChecked($tag, $el, options) { + var c = "checked", + isChecked = $el.is(":" + c); + + if ($el.prop) { + // jQuery 1.6+ + $el.prop(c, isChecked); + } else { + // jQuery 1.5 and below + if (isChecked) { + $el.attr(c, c); + } else { + $el.removeAttr(c); + } + } + + classUpdate($tag, options.checkedClass, isChecked); + } + + /** + * Set or remove the "disabled" class for disabled elements, based on + * if the + * + * @param jQuery $tag Our Uniform span/div + * @param jQuery $el Original form element + * @param Object options Uniform options for this element + */ + function classUpdateDisabled($tag, $el, options) { + classUpdate($tag, options.disabledClass, $el.is(":disabled")); + } + + /** + * Wrap an element inside of a container or put the container next + * to the element. See the code for examples of the different methods. + * + * Returns the container that was added to the HTML. + * + * @param jQuery $el Element to wrap + * @param jQuery $container Add this new container around/near $el + * @param String method One of "after", "before" or "wrap" + * @return $container after it has been cloned for adding to $el + */ + function divSpanWrap($el, $container, method) { + switch (method) { + case "after": + // Result: <element /> <container /> + $el.after($container); + return $el.next(); + case "before": + // Result: <container /> <element /> + $el.before($container); + return $el.prev(); + case "wrap": + // Result: <container> <element /> </container> + $el.wrap($container); + return $el.parent(); + } + + return null; + } + + + /** + * Create a div/span combo for uniforming an element + * + * @param jQuery $el Element to wrap + * @param Object options Options for the element, set by the user + * @param Object divSpanConfig Options for how we wrap the div/span + * @return Object Contains the div and span as properties + */ + function divSpan($el, options, divSpanConfig) { + var $div, $span, id; + + if (!divSpanConfig) { + divSpanConfig = {}; + } + + divSpanConfig = $.extend({ + bind: {}, + divClass: null, + divWrap: "wrap", + spanClass: null, + spanHtml: null, + spanWrap: "wrap" + }, divSpanConfig); + + $div = $('<div />'); + $span = $('<span />'); + + // Automatically hide this div/span if the element is hidden. + // Do not hide if the element is hidden because a parent is hidden. + if (options.autoHide && $el.is(':hidden') && $el.css('display') === 'none') { + $div.hide(); + } + + if (divSpanConfig.divClass) { + $div.addClass(divSpanConfig.divClass); + } + + if (options.wrapperClass) { + $div.addClass(options.wrapperClass); + } + + if (divSpanConfig.spanClass) { + $span.addClass(divSpanConfig.spanClass); + } + + id = attrOrProp($el, 'id'); + + if (options.useID && id) { + attrOrProp($div, 'id', options.idPrefix + '-' + id); + } + + if (divSpanConfig.spanHtml) { + $span.html(divSpanConfig.spanHtml); + } + + $div = divSpanWrap($el, $div, divSpanConfig.divWrap); + $span = divSpanWrap($el, $span, divSpanConfig.spanWrap); + classUpdateDisabled($div, $el, options); + return { + div: $div, + span: $span + }; + } + + + /** + * Wrap an element with a span to apply a global wrapper class + * + * @param jQuery $el Element to wrap + * @param object options + * @return jQuery Wrapper element + */ + function wrapWithWrapperClass($el, options) { + var $span; + + if (!options.wrapperClass) { + return null; + } + + $span = $('<span />').addClass(options.wrapperClass); + $span = divSpanWrap($el, $span, "wrap"); + return $span; + } + + + /** + * Test if high contrast mode is enabled. + * + * In high contrast mode, background images can not be set and + * they are always returned as 'none'. + * + * @return boolean True if in high contrast mode + */ + function highContrast() { + var c, $div, el, rgb; + + // High contrast mode deals with white and black + rgb = 'rgb(120,2,153)'; + $div = $('<div style="width:0;height:0;color:' + rgb + '">'); + $('body').append($div); + el = $div.get(0); + + // $div.css() will get the style definition, not + // the actually displaying style + if (window.getComputedStyle) { + c = window.getComputedStyle(el, '').color; + } else { + c = (el.currentStyle || el.style || {}).color; + } + + $div.remove(); + return c.replace(/ /g, '') !== rgb; + } + + + /** + * Change text into safe HTML + * + * @param String text + * @return String HTML version + */ + function htmlify(text) { + if (!text) { + return ""; + } + + return $('<span />').text(text).html(); + } + + /** + * If not MSIE, return false. + * If it is, return the version number. + * + * @return false|number + */ + function isMsie() { + return navigator.cpuClass && !navigator.product; + } + + /** + * Return true if this version of IE allows styling + * + * @return boolean + */ + function isMsieSevenOrNewer() { + if (typeof window.XMLHttpRequest !== 'undefined') { + return true; + } + + return false; + } + + /** + * Test if the element is a multiselect + * + * @param jQuery $el Element + * @return boolean true/false + */ + function isMultiselect($el) { + var elSize; + + if ($el[0].multiple) { + return true; + } + + elSize = attrOrProp($el, "size"); + + if (!elSize || elSize <= 1) { + return false; + } + + return true; + } + + /** + * Meaningless utility function. Used mostly for improving minification. + * + * @return false + */ + function returnFalse() { + return false; + } + + /** + * noSelect plugin, very slightly modified + * http://mths.be/noselect v1.0.3 + * + * @param jQuery $elem Element that we don't want to select + * @param Object options Uniform options for the element + */ + function noSelect($elem, options) { + var none = 'none'; + bindMany($elem, options, { + 'selectstart dragstart mousedown': returnFalse + }); + + $elem.css({ + MozUserSelect: none, + msUserSelect: none, + webkitUserSelect: none, + userSelect: none + }); + } + + /** + * Updates the filename tag based on the value of the real input + * element. + * + * @param jQuery $el Actual form element + * @param jQuery $filenameTag Span/div to update + * @param Object options Uniform options for this element + */ + function setFilename($el, $filenameTag, options) { + var filename = $el.val(); + + if (filename === "") { + filename = options.fileDefaultHtml; + } else { + filename = filename.split(/[\/\\]+/); + filename = filename[(filename.length - 1)]; + } + + $filenameTag.text(filename); + } + + + /** + * Function from jQuery to swap some CSS values, run a callback, + * then restore the CSS. Modified to pass JSLint and handle undefined + * values with 'use strict'. + * + * @param jQuery $el Element + * @param object newCss CSS values to swap out + * @param Function callback Function to run + */ + function swap($elements, newCss, callback) { + var restore, item; + + restore = []; + + $elements.each(function () { + var name; + + for (name in newCss) { + if (Object.prototype.hasOwnProperty.call(newCss, name)) { + restore.push({ + el: this, + name: name, + old: this.style[name] + }); + + this.style[name] = newCss[name]; + } + } + }); + + callback(); + + while (restore.length) { + item = restore.pop(); + item.el.style[item.name] = item.old; + } + } + + + /** + * The browser doesn't provide sizes of elements that are not visible. + * This will clone an element and add it to the DOM for calculations. + * + * @param jQuery $el + * @param String method + */ + function sizingInvisible($el, callback) { + var targets; + + // We wish to target ourselves and any parents as long as + // they are not visible + targets = $el.parents(); + targets.push($el[0]); + targets = targets.not(':visible'); + swap(targets, { + visibility: "hidden", + display: "block", + position: "absolute" + }, callback); + } + + + /** + * Standard way to unwrap the div/span combination from an element + * + * @param jQuery $el Element that we wish to preserve + * @param Object options Uniform options for the element + * @return Function This generated function will perform the given work + */ + function unwrapUnwrapUnbindFunction($el, options) { + return function () { + $el.unwrap().unwrap().unbind(options.eventNamespace); + }; + } + + var allowStyling = true, // False if IE6 or other unsupported browsers + highContrastTest = false, // Was the high contrast test ran? + uniformHandlers = [ // Objects that take care of "unification" + { + // Buttons + match: function ($el) { + return $el.is("a, button, :submit, :reset, input[type='button']"); + }, + apply: function ($el, options) { + var $div, defaultSpanHtml, ds, getHtml, doingClickEvent; + defaultSpanHtml = options.submitDefaultHtml; + + if ($el.is(":reset")) { + defaultSpanHtml = options.resetDefaultHtml; + } + + if ($el.is("a, button")) { + // Use the HTML inside the tag + getHtml = function () { + return $el.html() || defaultSpanHtml; + }; + } else { + // Use the value property of the element + getHtml = function () { + return htmlify(attrOrProp($el, "value")) || defaultSpanHtml; + }; + } + + ds = divSpan($el, options, { + divClass: options.buttonClass, + spanHtml: getHtml(), + }); + $div = ds.div; + bindUi($el, $div, options); + doingClickEvent = false; + bindMany($div, options, { + "click touchend": function () { + var ev, res, target, href; + + if (doingClickEvent) { + return; + } + + if ($el.is(':disabled')) { + return; + } + + doingClickEvent = true; + + if ($el[0].dispatchEvent) { + ev = document.createEvent("MouseEvents"); + ev.initEvent("click", true, true); + res = $el[0].dispatchEvent(ev); + + if ($el.is('a') && res) { + target = attrOrProp($el, 'target'); + href = attrOrProp($el, 'href'); + + if (!target || target === '_self') { + document.location.href = href; + } else { + window.open(href, target); + } + } + } else { + $el.click(); + } + + doingClickEvent = false; + } + }); + noSelect($div, options); + return { + remove: function () { + // Move $el out + $div.after($el); + + // Remove div and span + $div.remove(); + + // Unbind events + $el.unbind(options.eventNamespace); + return $el; + }, + update: function () { + classClearStandard($div, options); + classUpdateDisabled($div, $el, options); + $el.detach(); + ds.span.html(getHtml()).append($el); + } + }; + } + }, + { + // Checkboxes + match: function ($el) { + return $el.is(":checkbox"); + }, + apply: function ($el, options) { + var ds, $div, $span; + ds = divSpan($el, options, { + divClass: options.checkboxClass + }); + $div = ds.div; + $span = ds.span; + + // Add focus classes, toggling, active, etc. + bindUi($el, $div, options); + bindMany($el, options, { + "click touchend": function () { + classUpdateChecked($span, $el, options); + } + }); + classUpdateChecked($span, $el, options); + return { + remove: unwrapUnwrapUnbindFunction($el, options), + update: function () { + classClearStandard($div, options); + $span.removeClass(options.checkedClass); + classUpdateChecked($span, $el, options); + classUpdateDisabled($div, $el, options); + } + }; + } + }, + { + // File selection / uploads + match: function ($el) { + return $el.is(":file"); + }, + apply: function ($el, options) { + var ds, $div, $filename, $button; + + // The "span" is the button + ds = divSpan($el, options, { + divClass: options.fileClass, + spanClass: options.fileButtonClass, + spanHtml: options.fileButtonHtml, + spanWrap: "after" + }); + $div = ds.div; + $button = ds.span; + $filename = $("<span />").html(options.fileDefaultHtml); + $filename.addClass(options.filenameClass); + $filename = divSpanWrap($el, $filename, "after"); + + // Set the size + if (!attrOrProp($el, "size")) { + attrOrProp($el, "size", $div.width() / 10); + } + + // Actions + function filenameUpdate() { + setFilename($el, $filename, options); + } + + bindUi($el, $div, options); + + // Account for input saved across refreshes + filenameUpdate(); + + // IE7 doesn't fire onChange until blur or second fire. + if (isMsie()) { + // IE considers browser chrome blocking I/O, so it + // suspends tiemouts until after the file has + // been selected. + bindMany($el, options, { + click: function () { + $el.trigger("change"); + setTimeout(filenameUpdate, 0); + } + }); + } else { + // All other browsers behave properly + bindMany($el, options, { + change: filenameUpdate + }); + } + + noSelect($filename, options); + noSelect($button, options); + return { + remove: function () { + // Remove filename and button + $filename.remove(); + $button.remove(); + + // Unwrap parent div, remove events + return $el.unwrap().unbind(options.eventNamespace); + }, + update: function () { + classClearStandard($div, options); + setFilename($el, $filename, options); + classUpdateDisabled($div, $el, options); + } + }; + } + }, + { + // Input fields (text) + match: function ($el) { + if ($el.is("input")) { + var t = (" " + attrOrProp($el, "type") + " ").toLowerCase(), + allowed = " color date datetime datetime-local email month number password search tel text time url week "; + return allowed.indexOf(t) >= 0; + } + + return false; + }, + apply: function ($el, options) { + var elType, $wrapper; + + elType = attrOrProp($el, "type"); + $el.addClass(options.inputClass); + $wrapper = wrapWithWrapperClass($el, options); + bindUi($el, $el, options); + + if (options.inputAddTypeAsClass) { + $el.addClass(elType); + } + + return { + remove: function () { + $el.removeClass(options.inputClass); + + if (options.inputAddTypeAsClass) { + $el.removeClass(elType); + } + + if ($wrapper) { + $el.unwrap(); + } + }, + update: returnFalse + }; + } + }, + { + // Radio buttons + match: function ($el) { + return $el.is(":radio"); + }, + apply: function ($el, options) { + var ds, $div, $span; + ds = divSpan($el, options, { + divClass: options.radioClass + }); + $div = ds.div; + $span = ds.span; + + // Add classes for focus, handle active, checked + bindUi($el, $div, options); + bindMany($el, options, { + "click touchend": function () { + // Find all radios with the same name, then update + // them with $.uniform.update() so the right + // per-element options are used + $.uniform.update($(':radio[name="' + attrOrProp($el, "name") + '"]')); + } + }); + classUpdateChecked($span, $el, options); + return { + remove: unwrapUnwrapUnbindFunction($el, options), + update: function () { + classClearStandard($div, options); + classUpdateChecked($span, $el, options); + classUpdateDisabled($div, $el, options); + } + }; + } + }, + { + // Select lists, but do not style multiselects here + match: function ($el) { + if ($el.is("select") && !isMultiselect($el)) { + return true; + } + + return false; + }, + apply: function ($el, options) { + var ds, $div, $span, origElemWidth; + + if (options.selectAutoWidth) { + sizingInvisible($el, function () { + origElemWidth = $el.width(); + }); + } + + ds = divSpan($el, options, { + divClass: options.selectClass, + spanHtml: ($el.find(":selected:first") || $el.find("option:first")).html(), + spanWrap: "before" + }); + $div = ds.div; + $span = ds.span; + + if (options.selectAutoWidth) { + // Use the width of the select and adjust the + // span and div accordingly + sizingInvisible($el, function () { + // Force "display: block" - related to bug #287 + swap($([ $span[0], $div[0] ]), { + display: "block" + }, function () { + var spanPad; + spanPad = $span.outerWidth() - $span.width(); + $div.width(origElemWidth + spanPad); + $span.width(origElemWidth); + }); + }); + } else { + // Force the select to fill the size of the div + $div.addClass('fixedWidth'); + } + + // Take care of events + bindUi($el, $div, options); + bindMany($el, options, { + change: function () { + $span.html($el.find(":selected").html()); + $div.removeClass(options.activeClass); + }, + "click touchend": function () { + // IE7 and IE8 may not update the value right + // until after click event - issue #238 + var selHtml = $el.find(":selected").html(); + + if ($span.html() !== selHtml) { + // Change was detected + // Fire the change event on the select tag + $el.trigger('change'); + } + }, + keyup: function () { + $span.html($el.find(":selected").html()); + } + }); + noSelect($span, options); + return { + remove: function () { + // Remove sibling span + $span.remove(); + + // Unwrap parent div + $el.unwrap().unbind(options.eventNamespace); + return $el; + }, + update: function () { + if (options.selectAutoWidth) { + // Easier to remove and reapply formatting + $.uniform.restore($el); + $el.uniform(options); + } else { + classClearStandard($div, options); + + // Reset current selected text + $span.html($el.find(":selected").html()); + classUpdateDisabled($div, $el, options); + } + } + }; + } + }, + { + // Select lists - multiselect lists only + match: function ($el) { + if ($el.is("select") && isMultiselect($el)) { + return true; + } + + return false; + }, + apply: function ($el, options) { + var $wrapper; + + $el.addClass(options.selectMultiClass); + $wrapper = wrapWithWrapperClass($el, options); + bindUi($el, $el, options); + + return { + remove: function () { + $el.removeClass(options.selectMultiClass); + + if ($wrapper) { + $el.unwrap(); + } + }, + update: returnFalse + }; + } + }, + { + // Textareas + match: function ($el) { + return $el.is("textarea"); + }, + apply: function ($el, options) { + var $wrapper; + + $el.addClass(options.textareaClass); + $wrapper = wrapWithWrapperClass($el, options); + bindUi($el, $el, options); + + return { + remove: function () { + $el.removeClass(options.textareaClass); + + if ($wrapper) { + $el.unwrap(); + } + }, + update: returnFalse + }; + } + } + ]; + + // IE6 can't be styled - can't set opacity on select + if (isMsie() && !isMsieSevenOrNewer()) { + allowStyling = false; + } + + $.uniform = { + // Default options that can be overridden globally or when uniformed + // globally: $.uniform.defaults.fileButtonHtml = "Pick A File"; + // on uniform: $('input').uniform({fileButtonHtml: "Pick a File"}); + defaults: { + activeClass: "active", + autoHide: true, + buttonClass: "button", + checkboxClass: "checker", + checkedClass: "checked", + disabledClass: "disabled", + eventNamespace: ".uniform", + fileButtonClass: "action", + fileButtonHtml: "Choose File", + fileClass: "uploader", + fileDefaultHtml: "No file selected", + filenameClass: "filename", + focusClass: "focus", + hoverClass: "hover", + idPrefix: "uniform", + inputAddTypeAsClass: true, + inputClass: "uniform-input", + radioClass: "radio", + resetDefaultHtml: "Reset", + resetSelector: false, // We'll use our own function when you don't specify one + selectAutoWidth: true, + selectClass: "selector", + selectMultiClass: "uniform-multiselect", + submitDefaultHtml: "Submit", // Only text allowed + textareaClass: "uniform", + useID: true, + wrapperClass: null + }, + + // All uniformed elements - DOM objects + elements: [] + }; + + $.fn.uniform = function (options) { + var el = this; + options = $.extend({}, $.uniform.defaults, options); + + // If we are in high contrast mode, do not allow styling + if (!highContrastTest) { + highContrastTest = true; + + if (highContrast()) { + allowStyling = false; + } + } + + // Only uniform on browsers that work + if (!allowStyling) { + return this; + } + + // Code for specifying a reset button + if (options.resetSelector) { + $(options.resetSelector).mouseup(function () { + window.setTimeout(function () { + $.uniform.update(el); + }, 10); + }); + } + + return this.each(function () { + var $el = $(this), i, handler, callbacks; + + // Avoid uniforming elements already uniformed - just update + if ($el.data("uniformed")) { + $.uniform.update($el); + return; + } + + // See if we have any handler for this type of element + for (i = 0; i < uniformHandlers.length; i = i + 1) { + handler = uniformHandlers[i]; + + if (handler.match($el, options)) { + callbacks = handler.apply($el, options); + $el.data("uniformed", callbacks); + + // Store element in our global array + $.uniform.elements.push($el.get(0)); + return; + } + } + + // Could not style this element + }); + }; + + $.uniform.restore = $.fn.uniform.restore = function (elem) { + if (elem === undef) { + elem = $.uniform.elements; + } + + $(elem).each(function () { + var $el = $(this), index, elementData; + elementData = $el.data("uniformed"); + + // Skip elements that are not uniformed + if (!elementData) { + return; + } + + // Unbind events, remove additional markup that was added + elementData.remove(); + + // Remove item from list of uniformed elements + index = $.inArray(this, $.uniform.elements); + + if (index >= 0) { + $.uniform.elements.splice(index, 1); + } + + $el.removeData("uniformed"); + }); + }; + + $.uniform.update = $.fn.uniform.update = function (elem) { + if (elem === undef) { + elem = $.uniform.elements; + } + + $(elem).each(function () { + var $el = $(this), elementData; + elementData = $el.data("uniformed"); + + // Skip elements that are not uniformed + if (!elementData) { + return; + } + + elementData.update($el, elementData.options); + }); + }; +}(jQuery)); diff --git a/common/src/main/webapp/thirdparty/uniform/jquery.uniform.min.js b/common/src/main/webapp/thirdparty/uniform/jquery.uniform.min.js new file mode 100644 index 00000000..33c92df3 --- /dev/null +++ b/common/src/main/webapp/thirdparty/uniform/jquery.uniform.min.js @@ -0,0 +1 @@ +(function(e,t){"use strict";function n(e){var t=Array.prototype.slice.call(arguments,1);return e.prop?e.prop.apply(e,t):e.attr.apply(e,t)}function s(e,t,n){var s,a;for(s in n)n.hasOwnProperty(s)&&(a=s.replace(/ |$/g,t.eventNamespace),e.bind(a,n[s]))}function a(e,t,n){s(e,n,{focus:function(){t.addClass(n.focusClass)},blur:function(){t.removeClass(n.focusClass),t.removeClass(n.activeClass)},mouseenter:function(){t.addClass(n.hoverClass)},mouseleave:function(){t.removeClass(n.hoverClass),t.removeClass(n.activeClass)},"mousedown touchbegin":function(){e.is(":disabled")||t.addClass(n.activeClass)},"mouseup touchend":function(){t.removeClass(n.activeClass)}})}function i(e,t){e.removeClass(t.hoverClass+" "+t.focusClass+" "+t.activeClass)}function r(e,t,n){n?e.addClass(t):e.removeClass(t)}function l(e,t,n){var s="checked",a=t.is(":"+s);t.prop?t.prop(s,a):a?t.attr(s,s):t.removeAttr(s),r(e,n.checkedClass,a)}function u(e,t,n){r(e,n.disabledClass,t.is(":disabled"))}function o(e,t,n){switch(n){case"after":return e.after(t),e.next();case"before":return e.before(t),e.prev();case"wrap":return e.wrap(t),e.parent()}return null}function c(t,s,a){var i,r,l;return a||(a={}),a=e.extend({bind:{},divClass:null,divWrap:"wrap",spanClass:null,spanHtml:null,spanWrap:"wrap"},a),i=e("<div />"),r=e("<span />"),s.autoHide&&t.is(":hidden")&&"none"===t.css("display")&&i.hide(),a.divClass&&i.addClass(a.divClass),s.wrapperClass&&i.addClass(s.wrapperClass),a.spanClass&&r.addClass(a.spanClass),l=n(t,"id"),s.useID&&l&&n(i,"id",s.idPrefix+"-"+l),a.spanHtml&&r.html(a.spanHtml),i=o(t,i,a.divWrap),r=o(t,r,a.spanWrap),u(i,t,s),{div:i,span:r}}function d(t,n){var s;return n.wrapperClass?(s=e("<span />").addClass(n.wrapperClass),s=o(t,s,"wrap")):null}function f(){var t,n,s,a;return a="rgb(120,2,153)",n=e('<div style="width:0;height:0;color:'+a+'">'),e("body").append(n),s=n.get(0),t=window.getComputedStyle?window.getComputedStyle(s,"").color:(s.currentStyle||s.style||{}).color,n.remove(),t.replace(/ /g,"")!==a}function p(t){return t?e("<span />").text(t).html():""}function m(){return navigator.cpuClass&&!navigator.product}function v(){return window.XMLHttpRequest!==void 0?!0:!1}function h(e){var t;return e[0].multiple?!0:(t=n(e,"size"),!t||1>=t?!1:!0)}function C(){return!1}function w(e,t){var n="none";s(e,t,{"selectstart dragstart mousedown":C}),e.css({MozUserSelect:n,msUserSelect:n,webkitUserSelect:n,userSelect:n})}function b(e,t,n){var s=e.val();""===s?s=n.fileDefaultHtml:(s=s.split(/[\/\\]+/),s=s[s.length-1]),t.text(s)}function y(e,t,n){var s,a;for(s=[],e.each(function(){var e;for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&(s.push({el:this,name:e,old:this.style[e]}),this.style[e]=t[e])}),n();s.length;)a=s.pop(),a.el.style[a.name]=a.old}function g(e,t){var n;n=e.parents(),n.push(e[0]),n=n.not(":visible"),y(n,{visibility:"hidden",display:"block",position:"absolute"},t)}function k(e,t){return function(){e.unwrap().unwrap().unbind(t.eventNamespace)}}var H=!0,x=!1,A=[{match:function(e){return e.is("a, button, :submit, :reset, input[type='button']")},apply:function(e,t){var r,l,o,d,f;return l=t.submitDefaultHtml,e.is(":reset")&&(l=t.resetDefaultHtml),d=e.is("a, button")?function(){return e.html()||l}:function(){return p(n(e,"value"))||l},o=c(e,t,{divClass:t.buttonClass,spanHtml:d()}),r=o.div,a(e,r,t),f=!1,s(r,t,{"click touchend":function(){var t,s,a,i;f||e.is(":disabled")||(f=!0,e[0].dispatchEvent?(t=document.createEvent("MouseEvents"),t.initEvent("click",!0,!0),s=e[0].dispatchEvent(t),e.is("a")&&s&&(a=n(e,"target"),i=n(e,"href"),a&&"_self"!==a?window.open(i,a):document.location.href=i)):e.click(),f=!1)}}),w(r,t),{remove:function(){return r.after(e),r.remove(),e.unbind(t.eventNamespace),e},update:function(){i(r,t),u(r,e,t),e.detach(),o.span.html(d()).append(e)}}}},{match:function(e){return e.is(":checkbox")},apply:function(e,t){var n,r,o;return n=c(e,t,{divClass:t.checkboxClass}),r=n.div,o=n.span,a(e,r,t),s(e,t,{"click touchend":function(){l(o,e,t)}}),l(o,e,t),{remove:k(e,t),update:function(){i(r,t),o.removeClass(t.checkedClass),l(o,e,t),u(r,e,t)}}}},{match:function(e){return e.is(":file")},apply:function(t,r){function l(){b(t,p,r)}var d,f,p,v;return d=c(t,r,{divClass:r.fileClass,spanClass:r.fileButtonClass,spanHtml:r.fileButtonHtml,spanWrap:"after"}),f=d.div,v=d.span,p=e("<span />").html(r.fileDefaultHtml),p.addClass(r.filenameClass),p=o(t,p,"after"),n(t,"size")||n(t,"size",f.width()/10),a(t,f,r),l(),m()?s(t,r,{click:function(){t.trigger("change"),setTimeout(l,0)}}):s(t,r,{change:l}),w(p,r),w(v,r),{remove:function(){return p.remove(),v.remove(),t.unwrap().unbind(r.eventNamespace)},update:function(){i(f,r),b(t,p,r),u(f,t,r)}}}},{match:function(e){if(e.is("input")){var t=(" "+n(e,"type")+" ").toLowerCase(),s=" color date datetime datetime-local email month number password search tel text time url week ";return s.indexOf(t)>=0}return!1},apply:function(e,t){var s,i;return s=n(e,"type"),e.addClass(t.inputClass),i=d(e,t),a(e,e,t),t.inputAddTypeAsClass&&e.addClass(s),{remove:function(){e.removeClass(t.inputClass),t.inputAddTypeAsClass&&e.removeClass(s),i&&e.unwrap()},update:C}}},{match:function(e){return e.is(":radio")},apply:function(t,r){var o,d,f;return o=c(t,r,{divClass:r.radioClass}),d=o.div,f=o.span,a(t,d,r),s(t,r,{"click touchend":function(){e.uniform.update(e(':radio[name="'+n(t,"name")+'"]'))}}),l(f,t,r),{remove:k(t,r),update:function(){i(d,r),l(f,t,r),u(d,t,r)}}}},{match:function(e){return e.is("select")&&!h(e)?!0:!1},apply:function(t,n){var r,l,o,d;return n.selectAutoWidth&&g(t,function(){d=t.width()}),r=c(t,n,{divClass:n.selectClass,spanHtml:(t.find(":selected:first")||t.find("option:first")).html(),spanWrap:"before"}),l=r.div,o=r.span,n.selectAutoWidth?g(t,function(){y(e([o[0],l[0]]),{display:"block"},function(){var e;e=o.outerWidth()-o.width(),l.width(d+e),o.width(d)})}):l.addClass("fixedWidth"),a(t,l,n),s(t,n,{change:function(){o.html(t.find(":selected").html()),l.removeClass(n.activeClass)},"click touchend":function(){var e=t.find(":selected").html();o.html()!==e&&t.trigger("change")},keyup:function(){o.html(t.find(":selected").html())}}),w(o,n),{remove:function(){return o.remove(),t.unwrap().unbind(n.eventNamespace),t},update:function(){n.selectAutoWidth?(e.uniform.restore(t),t.uniform(n)):(i(l,n),o.html(t.find(":selected").html()),u(l,t,n))}}}},{match:function(e){return e.is("select")&&h(e)?!0:!1},apply:function(e,t){var n;return e.addClass(t.selectMultiClass),n=d(e,t),a(e,e,t),{remove:function(){e.removeClass(t.selectMultiClass),n&&e.unwrap()},update:C}}},{match:function(e){return e.is("textarea")},apply:function(e,t){var n;return e.addClass(t.textareaClass),n=d(e,t),a(e,e,t),{remove:function(){e.removeClass(t.textareaClass),n&&e.unwrap()},update:C}}}];m()&&!v()&&(H=!1),e.uniform={defaults:{activeClass:"active",autoHide:!0,buttonClass:"button",checkboxClass:"checker",checkedClass:"checked",disabledClass:"disabled",eventNamespace:".uniform",fileButtonClass:"action",fileButtonHtml:"Choose File",fileClass:"uploader",fileDefaultHtml:"No file selected",filenameClass:"filename",focusClass:"focus",hoverClass:"hover",idPrefix:"uniform",inputAddTypeAsClass:!0,inputClass:"uniform-input",radioClass:"radio",resetDefaultHtml:"Reset",resetSelector:!1,selectAutoWidth:!0,selectClass:"selector",selectMultiClass:"uniform-multiselect",submitDefaultHtml:"Submit",textareaClass:"uniform",useID:!0,wrapperClass:null},elements:[]},e.fn.uniform=function(t){var n=this;return t=e.extend({},e.uniform.defaults,t),x||(x=!0,f()&&(H=!1)),H?(t.resetSelector&&e(t.resetSelector).mouseup(function(){window.setTimeout(function(){e.uniform.update(n)},10)}),this.each(function(){var n,s,a,i=e(this);if(i.data("uniformed"))return e.uniform.update(i),void 0;for(n=0;A.length>n;n+=1)if(s=A[n],s.match(i,t))return a=s.apply(i,t),i.data("uniformed",a),e.uniform.elements.push(i.get(0)),void 0})):this},e.uniform.restore=e.fn.uniform.restore=function(n){n===t&&(n=e.uniform.elements),e(n).each(function(){var t,n,s=e(this);n=s.data("uniformed"),n&&(n.remove(),t=e.inArray(this,e.uniform.elements),t>=0&&e.uniform.elements.splice(t,1),s.removeData("uniformed"))})},e.uniform.update=e.fn.uniform.update=function(n){n===t&&(n=e.uniform.elements),e(n).each(function(){var t,n=e(this);t=n.data("uniformed"),t&&t.update(n,t.options)})}})(jQuery);
\ No newline at end of file |