├── .editorconfig
├── .htaccess
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── _module_data
└── _manifest_exclude
├── color
├── ColorField.css
├── ColorField.php
├── colorfield.js
├── farbtastic.css
├── farbtastic.js
├── marker.png
├── mask.png
└── wheel.png
├── composer.json
├── dob
├── DOBField.js
└── DOBField.php
├── dropdowntimeonly
└── DropdownTimeOnlyField.php
├── dropdownwithother
└── otherfield.js
├── font
└── FontField.php
├── imageoptionset
└── ImageOptionsetField.php
├── nzcity
└── NZCityField.php
├── nzgovtpassworldvalidatorpassword
└── NZGovtPasswordValidatorPasswordField.php
├── nzmobilephone
└── NZMobilePhoneField.php
└── rating
├── RatingField.php
├── ratingfield.js
├── ui.core.css
├── ui.core.js
├── ui.slider.css
├── ui.slider.js
└── ui.theme.css
/.editorconfig:
--------------------------------------------------------------------------------
1 | # For more information about the properties used in
2 | # this file, please see the EditorConfig documentation:
3 | # http://editorconfig.org/
4 |
5 | [*]
6 | charset = utf-8
7 | end_of_line = lf
8 | indent_size = 4
9 | indent_style = spaces
10 | insert_final_newline = true
11 | trim_trailing_whitespace = true
12 |
13 | [*.md]
14 | trim_trailing_whitespace = false
15 |
16 | [*.{yml,js,json,css,scss}]
17 | indent_size = 2
18 | indent_style = space
19 |
20 | # Don't perform any clean-up on thirdparty files
21 |
22 | [thirdparty/**]
23 | trim_trailing_whitespace = false
24 | insert_final_newline = false
25 |
26 | [admin/thirdparty/**]
27 | trim_trailing_whitespace = false
28 | insert_final_newline = false
29 |
--------------------------------------------------------------------------------
/.htaccess:
--------------------------------------------------------------------------------
1 |
' + sliderTitles[sliderValueCheckedIndex] + '
'); 36 | jQuery(sliderContainer).append(''); 37 | jQuery(sliderContainer).find('.slider').slider( 38 | { 39 | max : sliderValues.length - 1, 40 | step : 1, 41 | value : sliderValueCheckedIndex, 42 | slide : function(event, ui) { 43 | jQuery('#' + name + ' input[name=' + name + ']').val(sliderValues[ui.value]); 44 | jQuery('#' + name + '_Title').text(sliderTitles[ui.value]); 45 | } 46 | } 47 | ); 48 | } 49 | ); 50 | } 51 | ); -------------------------------------------------------------------------------- /rating/ui.core.css: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI CSS Framework 3 | * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) 4 | * Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. 5 | */ 6 | 7 | /* Layout helpers 8 | ----------------------------------*/ 9 | .ui-helper-hidden { display: none; } 10 | .ui-helper-hidden-accessible { position: absolute; left: -99999999px; } 11 | .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } 12 | .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } 13 | .ui-helper-clearfix { display: inline-block; } 14 | /* required comment for clearfix to work in Opera \*/ 15 | * html .ui-helper-clearfix { height:1%; } 16 | .ui-helper-clearfix { display:block; } 17 | /* end clearfix */ 18 | .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } 19 | 20 | 21 | /* Interaction Cues 22 | ----------------------------------*/ 23 | .ui-state-disabled { cursor: default !important; } 24 | 25 | 26 | /* Icons 27 | ----------------------------------*/ 28 | 29 | /* states and images */ 30 | .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } 31 | 32 | 33 | /* Misc visuals 34 | ----------------------------------*/ 35 | 36 | /* Overlays */ 37 | .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } 38 | -------------------------------------------------------------------------------- /rating/ui.core.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI 1.7.2 3 | * 4 | * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) 5 | * Dual licensed under the MIT (MIT-LICENSE.txt) 6 | * and GPL (GPL-LICENSE.txt) licenses. 7 | * 8 | * http://docs.jquery.com/UI 9 | */ 10 | ;jQuery.ui || (function($) { 11 | 12 | var _remove = $.fn.remove, 13 | isFF2 = $.browser.mozilla && (parseFloat($.browser.version) < 1.9); 14 | 15 | //Helper functions and ui object 16 | $.ui = { 17 | version: "1.7.2", 18 | 19 | // $.ui.plugin is deprecated. Use the proxy pattern instead. 20 | plugin: { 21 | add: function(module, option, set) { 22 | var proto = $.ui[module].prototype; 23 | for(var i in set) { 24 | proto.plugins[i] = proto.plugins[i] || []; 25 | proto.plugins[i].push([option, set[i]]); 26 | } 27 | }, 28 | call: function(instance, name, args) { 29 | var set = instance.plugins[name]; 30 | if(!set || !instance.element[0].parentNode) { return; } 31 | 32 | for (var i = 0; i < set.length; i++) { 33 | if (instance.options[set[i][0]]) { 34 | set[i][1].apply(instance.element, args); 35 | } 36 | } 37 | } 38 | }, 39 | 40 | contains: function(a, b) { 41 | return document.compareDocumentPosition 42 | ? a.compareDocumentPosition(b) & 16 43 | : a !== b && a.contains(b); 44 | }, 45 | 46 | hasScroll: function(el, a) { 47 | 48 | //If overflow is hidden, the element might have extra content, but the user wants to hide it 49 | if ($(el).css('overflow') == 'hidden') { return false; } 50 | 51 | var scroll = (a && a == 'left') ? 'scrollLeft' : 'scrollTop', 52 | has = false; 53 | 54 | if (el[scroll] > 0) { return true; } 55 | 56 | // TODO: determine which cases actually cause this to happen 57 | // if the element doesn't have the scroll set, see if it's possible to 58 | // set the scroll 59 | el[scroll] = 1; 60 | has = (el[scroll] > 0); 61 | el[scroll] = 0; 62 | return has; 63 | }, 64 | 65 | isOverAxis: function(x, reference, size) { 66 | //Determines when x coordinate is over "b" element axis 67 | return (x > reference) && (x < (reference + size)); 68 | }, 69 | 70 | isOver: function(y, x, top, left, height, width) { 71 | //Determines when x, y coordinates is over "b" element 72 | return $.ui.isOverAxis(y, top, height) && $.ui.isOverAxis(x, left, width); 73 | }, 74 | 75 | keyCode: { 76 | BACKSPACE: 8, 77 | CAPS_LOCK: 20, 78 | COMMA: 188, 79 | CONTROL: 17, 80 | DELETE: 46, 81 | DOWN: 40, 82 | END: 35, 83 | ENTER: 13, 84 | ESCAPE: 27, 85 | HOME: 36, 86 | INSERT: 45, 87 | LEFT: 37, 88 | NUMPAD_ADD: 107, 89 | NUMPAD_DECIMAL: 110, 90 | NUMPAD_DIVIDE: 111, 91 | NUMPAD_ENTER: 108, 92 | NUMPAD_MULTIPLY: 106, 93 | NUMPAD_SUBTRACT: 109, 94 | PAGE_DOWN: 34, 95 | PAGE_UP: 33, 96 | PERIOD: 190, 97 | RIGHT: 39, 98 | SHIFT: 16, 99 | SPACE: 32, 100 | TAB: 9, 101 | UP: 38 102 | } 103 | }; 104 | 105 | // WAI-ARIA normalization 106 | if (isFF2) { 107 | var attr = $.attr, 108 | removeAttr = $.fn.removeAttr, 109 | ariaNS = "http://www.w3.org/2005/07/aaa", 110 | ariaState = /^aria-/, 111 | ariaRole = /^wairole:/; 112 | 113 | $.attr = function(elem, name, value) { 114 | var set = value !== undefined; 115 | 116 | return (name == 'role' 117 | ? (set 118 | ? attr.call(this, elem, name, "wairole:" + value) 119 | : (attr.apply(this, arguments) || "").replace(ariaRole, "")) 120 | : (ariaState.test(name) 121 | ? (set 122 | ? elem.setAttributeNS(ariaNS, 123 | name.replace(ariaState, "aaa:"), value) 124 | : attr.call(this, elem, name.replace(ariaState, "aaa:"))) 125 | : attr.apply(this, arguments))); 126 | }; 127 | 128 | $.fn.removeAttr = function(name) { 129 | return (ariaState.test(name) 130 | ? this.each(function() { 131 | this.removeAttributeNS(ariaNS, name.replace(ariaState, "")); 132 | }) : removeAttr.call(this, name)); 133 | }; 134 | } 135 | 136 | //jQuery plugins 137 | $.fn.extend({ 138 | remove: function() { 139 | // Safari has a native remove event which actually removes DOM elements, 140 | // so we have to use triggerHandler instead of trigger (#3037). 141 | $("*", this).add(this).each(function() { 142 | $(this).triggerHandler("remove"); 143 | }); 144 | return _remove.apply(this, arguments ); 145 | }, 146 | 147 | enableSelection: function() { 148 | return this 149 | .attr('unselectable', 'off') 150 | .css('MozUserSelect', '') 151 | .unbind('selectstart.ui'); 152 | }, 153 | 154 | disableSelection: function() { 155 | return this 156 | .attr('unselectable', 'on') 157 | .css('MozUserSelect', 'none') 158 | .bind('selectstart.ui', function() { return false; }); 159 | }, 160 | 161 | scrollParent: function() { 162 | var scrollParent; 163 | if(($.browser.msie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) { 164 | scrollParent = this.parents().filter(function() { 165 | return (/(relative|absolute|fixed)/).test($.curCSS(this,'position',1)) && (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1)); 166 | }).eq(0); 167 | } else { 168 | scrollParent = this.parents().filter(function() { 169 | return (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1)); 170 | }).eq(0); 171 | } 172 | 173 | return (/fixed/).test(this.css('position')) || !scrollParent.length ? $(document) : scrollParent; 174 | } 175 | }); 176 | 177 | 178 | //Additional selectors 179 | $.extend($.expr[':'], { 180 | data: function(elem, i, match) { 181 | return !!$.data(elem, match[3]); 182 | }, 183 | 184 | focusable: function(element) { 185 | var nodeName = element.nodeName.toLowerCase(), 186 | tabIndex = $.attr(element, 'tabindex'); 187 | return (/input|select|textarea|button|object/.test(nodeName) 188 | ? !element.disabled 189 | : 'a' == nodeName || 'area' == nodeName 190 | ? element.href || !isNaN(tabIndex) 191 | : !isNaN(tabIndex)) 192 | // the element and all of its ancestors must be visible 193 | // the browser may report that the area is hidden 194 | && !$(element)['area' == nodeName ? 'parents' : 'closest'](':hidden').length; 195 | }, 196 | 197 | tabbable: function(element) { 198 | var tabIndex = $.attr(element, 'tabindex'); 199 | return (isNaN(tabIndex) || tabIndex >= 0) && $(element).is(':focusable'); 200 | } 201 | }); 202 | 203 | 204 | // $.widget is a factory to create jQuery plugins 205 | // taking some boilerplate code out of the plugin code 206 | function getter(namespace, plugin, method, args) { 207 | function getMethods(type) { 208 | var methods = $[namespace][plugin][type] || []; 209 | return (typeof methods == 'string' ? methods.split(/,?\s+/) : methods); 210 | } 211 | 212 | var methods = getMethods('getter'); 213 | if (args.length == 1 && typeof args[0] == 'string') { 214 | methods = methods.concat(getMethods('getterSetter')); 215 | } 216 | return ($.inArray(method, methods) != -1); 217 | } 218 | 219 | $.widget = function(name, prototype) { 220 | var namespace = name.split(".")[0]; 221 | name = name.split(".")[1]; 222 | 223 | // create plugin method 224 | $.fn[name] = function(options) { 225 | var isMethodCall = (typeof options == 'string'), 226 | args = Array.prototype.slice.call(arguments, 1); 227 | 228 | // prevent calls to internal methods 229 | if (isMethodCall && options.substring(0, 1) == '_') { 230 | return this; 231 | } 232 | 233 | // handle getter methods 234 | if (isMethodCall && getter(namespace, name, options, args)) { 235 | var instance = $.data(this[0], name); 236 | return (instance ? instance[options].apply(instance, args) 237 | : undefined); 238 | } 239 | 240 | // handle initialization and non-getter methods 241 | return this.each(function() { 242 | var instance = $.data(this, name); 243 | 244 | // constructor 245 | (!instance && !isMethodCall && 246 | $.data(this, name, new $[namespace][name](this, options))._init()); 247 | 248 | // method call 249 | (instance && isMethodCall && $.isFunction(instance[options]) && 250 | instance[options].apply(instance, args)); 251 | }); 252 | }; 253 | 254 | // create widget constructor 255 | $[namespace] = $[namespace] || {}; 256 | $[namespace][name] = function(element, options) { 257 | var self = this; 258 | 259 | this.namespace = namespace; 260 | this.widgetName = name; 261 | this.widgetEventPrefix = $[namespace][name].eventPrefix || name; 262 | this.widgetBaseClass = namespace + '-' + name; 263 | 264 | this.options = $.extend({}, 265 | $.widget.defaults, 266 | $[namespace][name].defaults, 267 | $.metadata && $.metadata.get(element)[name], 268 | options); 269 | 270 | this.element = $(element) 271 | .bind('setData.' + name, function(event, key, value) { 272 | if (event.target == element) { 273 | return self._setData(key, value); 274 | } 275 | }) 276 | .bind('getData.' + name, function(event, key) { 277 | if (event.target == element) { 278 | return self._getData(key); 279 | } 280 | }) 281 | .bind('remove', function() { 282 | return self.destroy(); 283 | }); 284 | }; 285 | 286 | // add widget prototype 287 | $[namespace][name].prototype = $.extend({}, $.widget.prototype, prototype); 288 | 289 | // TODO: merge getter and getterSetter properties from widget prototype 290 | // and plugin prototype 291 | $[namespace][name].getterSetter = 'option'; 292 | }; 293 | 294 | $.widget.prototype = { 295 | _init: function() {}, 296 | destroy: function() { 297 | this.element.removeData(this.widgetName) 298 | .removeClass(this.widgetBaseClass + '-disabled' + ' ' + this.namespace + '-state-disabled') 299 | .removeAttr('aria-disabled'); 300 | }, 301 | 302 | option: function(key, value) { 303 | var options = key, 304 | self = this; 305 | 306 | if (typeof key == "string") { 307 | if (value === undefined) { 308 | return this._getData(key); 309 | } 310 | options = {}; 311 | options[key] = value; 312 | } 313 | 314 | $.each(options, function(key, value) { 315 | self._setData(key, value); 316 | }); 317 | }, 318 | _getData: function(key) { 319 | return this.options[key]; 320 | }, 321 | _setData: function(key, value) { 322 | this.options[key] = value; 323 | 324 | if (key == 'disabled') { 325 | this.element 326 | [value ? 'addClass' : 'removeClass']( 327 | this.widgetBaseClass + '-disabled' + ' ' + 328 | this.namespace + '-state-disabled') 329 | .attr("aria-disabled", value); 330 | } 331 | }, 332 | 333 | enable: function() { 334 | this._setData('disabled', false); 335 | }, 336 | disable: function() { 337 | this._setData('disabled', true); 338 | }, 339 | 340 | _trigger: function(type, event, data) { 341 | var callback = this.options[type], 342 | eventName = (type == this.widgetEventPrefix 343 | ? type : this.widgetEventPrefix + type); 344 | 345 | event = $.Event(event); 346 | event.type = eventName; 347 | 348 | // copy original event properties over to the new event 349 | // this would happen if we could call $.event.fix instead of $.Event 350 | // but we don't have a way to force an event to be fixed multiple times 351 | if (event.originalEvent) { 352 | for (var i = $.event.props.length, prop; i;) { 353 | prop = $.event.props[--i]; 354 | event[prop] = event.originalEvent[prop]; 355 | } 356 | } 357 | 358 | this.element.trigger(event, data); 359 | 360 | return !($.isFunction(callback) && callback.call(this.element[0], event, data) === false 361 | || event.isDefaultPrevented()); 362 | } 363 | }; 364 | 365 | $.widget.defaults = { 366 | disabled: false 367 | }; 368 | 369 | 370 | /** Mouse Interaction Plugin **/ 371 | 372 | $.ui.mouse = { 373 | _mouseInit: function() { 374 | var self = this; 375 | 376 | this.element 377 | .bind('mousedown.'+this.widgetName, function(event) { 378 | return self._mouseDown(event); 379 | }) 380 | .bind('click.'+this.widgetName, function(event) { 381 | if(self._preventClickEvent) { 382 | self._preventClickEvent = false; 383 | event.stopImmediatePropagation(); 384 | return false; 385 | } 386 | }); 387 | 388 | // Prevent text selection in IE 389 | if ($.browser.msie) { 390 | this._mouseUnselectable = this.element.attr('unselectable'); 391 | this.element.attr('unselectable', 'on'); 392 | } 393 | 394 | this.started = false; 395 | }, 396 | 397 | // TODO: make sure destroying one instance of mouse doesn't mess with 398 | // other instances of mouse 399 | _mouseDestroy: function() { 400 | this.element.unbind('.'+this.widgetName); 401 | 402 | // Restore text selection in IE 403 | ($.browser.msie 404 | && this.element.attr('unselectable', this._mouseUnselectable)); 405 | }, 406 | 407 | _mouseDown: function(event) { 408 | // don't let more than one widget handle mouseStart 409 | // TODO: figure out why we have to use originalEvent 410 | event.originalEvent = event.originalEvent || {}; 411 | if (event.originalEvent.mouseHandled) { return; } 412 | 413 | // we may have missed mouseup (out of window) 414 | (this._mouseStarted && this._mouseUp(event)); 415 | 416 | this._mouseDownEvent = event; 417 | 418 | var self = this, 419 | btnIsLeft = (event.which == 1), 420 | elIsCancel = (typeof this.options.cancel == "string" ? $(event.target).parents().add(event.target).filter(this.options.cancel).length : false); 421 | if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) { 422 | return true; 423 | } 424 | 425 | this.mouseDelayMet = !this.options.delay; 426 | if (!this.mouseDelayMet) { 427 | this._mouseDelayTimer = setTimeout(function() { 428 | self.mouseDelayMet = true; 429 | }, this.options.delay); 430 | } 431 | 432 | if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { 433 | this._mouseStarted = (this._mouseStart(event) !== false); 434 | if (!this._mouseStarted) { 435 | event.preventDefault(); 436 | return true; 437 | } 438 | } 439 | 440 | // these delegates are required to keep context 441 | this._mouseMoveDelegate = function(event) { 442 | return self._mouseMove(event); 443 | }; 444 | this._mouseUpDelegate = function(event) { 445 | return self._mouseUp(event); 446 | }; 447 | $(document) 448 | .bind('mousemove.'+this.widgetName, this._mouseMoveDelegate) 449 | .bind('mouseup.'+this.widgetName, this._mouseUpDelegate); 450 | 451 | // preventDefault() is used to prevent the selection of text here - 452 | // however, in Safari, this causes select boxes not to be selectable 453 | // anymore, so this fix is needed 454 | ($.browser.safari || event.preventDefault()); 455 | 456 | event.originalEvent.mouseHandled = true; 457 | return true; 458 | }, 459 | 460 | _mouseMove: function(event) { 461 | // IE mouseup check - mouseup happened when mouse was out of window 462 | if ($.browser.msie && !event.button) { 463 | return this._mouseUp(event); 464 | } 465 | 466 | if (this._mouseStarted) { 467 | this._mouseDrag(event); 468 | return event.preventDefault(); 469 | } 470 | 471 | if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { 472 | this._mouseStarted = 473 | (this._mouseStart(this._mouseDownEvent, event) !== false); 474 | (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event)); 475 | } 476 | 477 | return !this._mouseStarted; 478 | }, 479 | 480 | _mouseUp: function(event) { 481 | $(document) 482 | .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate) 483 | .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate); 484 | 485 | if (this._mouseStarted) { 486 | this._mouseStarted = false; 487 | this._preventClickEvent = (event.target == this._mouseDownEvent.target); 488 | this._mouseStop(event); 489 | } 490 | 491 | return false; 492 | }, 493 | 494 | _mouseDistanceMet: function(event) { 495 | return (Math.max( 496 | Math.abs(this._mouseDownEvent.pageX - event.pageX), 497 | Math.abs(this._mouseDownEvent.pageY - event.pageY) 498 | ) >= this.options.distance 499 | ); 500 | }, 501 | 502 | _mouseDelayMet: function(event) { 503 | return this.mouseDelayMet; 504 | }, 505 | 506 | // These are placeholder methods, to be overriden by extending plugin 507 | _mouseStart: function(event) {}, 508 | _mouseDrag: function(event) {}, 509 | _mouseStop: function(event) {}, 510 | _mouseCapture: function(event) { return true; } 511 | }; 512 | 513 | $.ui.mouse.defaults = { 514 | cancel: null, 515 | distance: 1, 516 | delay: 0 517 | }; 518 | 519 | })(jQuery); 520 | -------------------------------------------------------------------------------- /rating/ui.slider.css: -------------------------------------------------------------------------------- 1 | /* Slider 2 | ----------------------------------*/ 3 | .ui-slider { position: relative; text-align: left; } 4 | .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } 5 | .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; } 6 | 7 | .ui-slider-horizontal { height: .5em; } 8 | .ui-slider-horizontal .ui-slider-handle { top: -.5em; margin-left: -.6em; } 9 | .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } 10 | .ui-slider-horizontal .ui-slider-range-min { left: 0; } 11 | .ui-slider-horizontal .ui-slider-range-max { right: 0; } 12 | 13 | .ui-slider-vertical { width: .8em; height: 100px; } 14 | .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } 15 | .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } 16 | .ui-slider-vertical .ui-slider-range-min { bottom: 0; } 17 | .ui-slider-vertical .ui-slider-range-max { top: 0; } 18 | -------------------------------------------------------------------------------- /rating/ui.slider.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI Slider 1.7.2 3 | * 4 | * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) 5 | * Dual licensed under the MIT (MIT-LICENSE.txt) 6 | * and GPL (GPL-LICENSE.txt) licenses. 7 | * 8 | * http://docs.jquery.com/UI/Slider 9 | * 10 | * Depends: 11 | * ui.core.js 12 | */ 13 | 14 | (function($) { 15 | 16 | $.widget("ui.slider", $.extend({}, $.ui.mouse, { 17 | 18 | _init: function() { 19 | 20 | var self = this, o = this.options; 21 | this._keySliding = false; 22 | this._handleIndex = null; 23 | this._detectOrientation(); 24 | this._mouseInit(); 25 | 26 | this.element 27 | .addClass("ui-slider" 28 | + " ui-slider-" + this.orientation 29 | + " ui-widget" 30 | + " ui-widget-content" 31 | + " ui-corner-all"); 32 | 33 | this.range = $([]); 34 | 35 | if (o.range) { 36 | 37 | if (o.range === true) { 38 | this.range = $(''); 39 | if (!o.values) o.values = [this._valueMin(), this._valueMin()]; 40 | if (o.values.length && o.values.length != 2) { 41 | o.values = [o.values[0], o.values[0]]; 42 | } 43 | } else { 44 | this.range = $(''); 45 | } 46 | 47 | this.range 48 | .appendTo(this.element) 49 | .addClass("ui-slider-range"); 50 | 51 | if (o.range == "min" || o.range == "max") { 52 | this.range.addClass("ui-slider-range-" + o.range); 53 | } 54 | 55 | // note: this isn't the most fittingly semantic framework class for this element, 56 | // but worked best visually with a variety of themes 57 | this.range.addClass("ui-widget-header"); 58 | 59 | } 60 | 61 | if ($(".ui-slider-handle", this.element).length == 0) 62 | $('') 63 | .appendTo(this.element) 64 | .addClass("ui-slider-handle"); 65 | 66 | if (o.values && o.values.length) { 67 | while ($(".ui-slider-handle", this.element).length < o.values.length) 68 | $('') 69 | .appendTo(this.element) 70 | .addClass("ui-slider-handle"); 71 | } 72 | 73 | this.handles = $(".ui-slider-handle", this.element) 74 | .addClass("ui-state-default" 75 | + " ui-corner-all"); 76 | 77 | this.handle = this.handles.eq(0); 78 | 79 | this.handles.add(this.range).filter("a") 80 | .click(function(event) { 81 | event.preventDefault(); 82 | }) 83 | .hover(function() { 84 | if (!o.disabled) { 85 | $(this).addClass('ui-state-hover'); 86 | } 87 | }, function() { 88 | $(this).removeClass('ui-state-hover'); 89 | }) 90 | .focus(function() { 91 | if (!o.disabled) { 92 | $(".ui-slider .ui-state-focus").removeClass('ui-state-focus'); $(this).addClass('ui-state-focus'); 93 | } else { 94 | $(this).blur(); 95 | } 96 | }) 97 | .blur(function() { 98 | $(this).removeClass('ui-state-focus'); 99 | }); 100 | 101 | this.handles.each(function(i) { 102 | $(this).data("index.ui-slider-handle", i); 103 | }); 104 | 105 | this.handles.keydown(function(event) { 106 | 107 | var ret = true; 108 | 109 | var index = $(this).data("index.ui-slider-handle"); 110 | 111 | if (self.options.disabled) 112 | return; 113 | 114 | switch (event.keyCode) { 115 | case $.ui.keyCode.HOME: 116 | case $.ui.keyCode.END: 117 | case $.ui.keyCode.UP: 118 | case $.ui.keyCode.RIGHT: 119 | case $.ui.keyCode.DOWN: 120 | case $.ui.keyCode.LEFT: 121 | ret = false; 122 | if (!self._keySliding) { 123 | self._keySliding = true; 124 | $(this).addClass("ui-state-active"); 125 | self._start(event, index); 126 | } 127 | break; 128 | } 129 | 130 | var curVal, newVal, step = self._step(); 131 | if (self.options.values && self.options.values.length) { 132 | curVal = newVal = self.values(index); 133 | } else { 134 | curVal = newVal = self.value(); 135 | } 136 | 137 | switch (event.keyCode) { 138 | case $.ui.keyCode.HOME: 139 | newVal = self._valueMin(); 140 | break; 141 | case $.ui.keyCode.END: 142 | newVal = self._valueMax(); 143 | break; 144 | case $.ui.keyCode.UP: 145 | case $.ui.keyCode.RIGHT: 146 | if(curVal == self._valueMax()) return; 147 | newVal = curVal + step; 148 | break; 149 | case $.ui.keyCode.DOWN: 150 | case $.ui.keyCode.LEFT: 151 | if(curVal == self._valueMin()) return; 152 | newVal = curVal - step; 153 | break; 154 | } 155 | 156 | self._slide(event, index, newVal); 157 | 158 | return ret; 159 | 160 | }).keyup(function(event) { 161 | 162 | var index = $(this).data("index.ui-slider-handle"); 163 | 164 | if (self._keySliding) { 165 | self._stop(event, index); 166 | self._change(event, index); 167 | self._keySliding = false; 168 | $(this).removeClass("ui-state-active"); 169 | } 170 | 171 | }); 172 | 173 | this._refreshValue(); 174 | 175 | }, 176 | 177 | destroy: function() { 178 | 179 | this.handles.remove(); 180 | this.range.remove(); 181 | 182 | this.element 183 | .removeClass("ui-slider" 184 | + " ui-slider-horizontal" 185 | + " ui-slider-vertical" 186 | + " ui-slider-disabled" 187 | + " ui-widget" 188 | + " ui-widget-content" 189 | + " ui-corner-all") 190 | .removeData("slider") 191 | .unbind(".slider"); 192 | 193 | this._mouseDestroy(); 194 | 195 | }, 196 | 197 | _mouseCapture: function(event) { 198 | 199 | var o = this.options; 200 | 201 | if (o.disabled) 202 | return false; 203 | 204 | this.elementSize = { 205 | width: this.element.outerWidth(), 206 | height: this.element.outerHeight() 207 | }; 208 | this.elementOffset = this.element.offset(); 209 | 210 | var position = { x: event.pageX, y: event.pageY }; 211 | var normValue = this._normValueFromMouse(position); 212 | 213 | var distance = this._valueMax() - this._valueMin() + 1, closestHandle; 214 | var self = this, index; 215 | this.handles.each(function(i) { 216 | var thisDistance = Math.abs(normValue - self.values(i)); 217 | if (distance > thisDistance) { 218 | distance = thisDistance; 219 | closestHandle = $(this); 220 | index = i; 221 | } 222 | }); 223 | 224 | // workaround for bug #3736 (if both handles of a range are at 0, 225 | // the first is always used as the one with least distance, 226 | // and moving it is obviously prevented by preventing negative ranges) 227 | if(o.range == true && this.values(1) == o.min) { 228 | closestHandle = $(this.handles[++index]); 229 | } 230 | 231 | this._start(event, index); 232 | 233 | self._handleIndex = index; 234 | 235 | closestHandle 236 | .addClass("ui-state-active") 237 | .focus(); 238 | 239 | var offset = closestHandle.offset(); 240 | var mouseOverHandle = !$(event.target).parents().andSelf().is('.ui-slider-handle'); 241 | this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : { 242 | left: event.pageX - offset.left - (closestHandle.width() / 2), 243 | top: event.pageY - offset.top 244 | - (closestHandle.height() / 2) 245 | - (parseInt(closestHandle.css('borderTopWidth'),10) || 0) 246 | - (parseInt(closestHandle.css('borderBottomWidth'),10) || 0) 247 | + (parseInt(closestHandle.css('marginTop'),10) || 0) 248 | }; 249 | 250 | normValue = this._normValueFromMouse(position); 251 | this._slide(event, index, normValue); 252 | return true; 253 | 254 | }, 255 | 256 | _mouseStart: function(event) { 257 | return true; 258 | }, 259 | 260 | _mouseDrag: function(event) { 261 | 262 | var position = { x: event.pageX, y: event.pageY }; 263 | var normValue = this._normValueFromMouse(position); 264 | 265 | this._slide(event, this._handleIndex, normValue); 266 | 267 | return false; 268 | 269 | }, 270 | 271 | _mouseStop: function(event) { 272 | 273 | this.handles.removeClass("ui-state-active"); 274 | this._stop(event, this._handleIndex); 275 | this._change(event, this._handleIndex); 276 | this._handleIndex = null; 277 | this._clickOffset = null; 278 | 279 | return false; 280 | 281 | }, 282 | 283 | _detectOrientation: function() { 284 | this.orientation = this.options.orientation == 'vertical' ? 'vertical' : 'horizontal'; 285 | }, 286 | 287 | _normValueFromMouse: function(position) { 288 | 289 | var pixelTotal, pixelMouse; 290 | if ('horizontal' == this.orientation) { 291 | pixelTotal = this.elementSize.width; 292 | pixelMouse = position.x - this.elementOffset.left - (this._clickOffset ? this._clickOffset.left : 0); 293 | } else { 294 | pixelTotal = this.elementSize.height; 295 | pixelMouse = position.y - this.elementOffset.top - (this._clickOffset ? this._clickOffset.top : 0); 296 | } 297 | 298 | var percentMouse = (pixelMouse / pixelTotal); 299 | if (percentMouse > 1) percentMouse = 1; 300 | if (percentMouse < 0) percentMouse = 0; 301 | if ('vertical' == this.orientation) 302 | percentMouse = 1 - percentMouse; 303 | 304 | var valueTotal = this._valueMax() - this._valueMin(), 305 | valueMouse = percentMouse * valueTotal, 306 | valueMouseModStep = valueMouse % this.options.step, 307 | normValue = this._valueMin() + valueMouse - valueMouseModStep; 308 | 309 | if (valueMouseModStep > (this.options.step / 2)) 310 | normValue += this.options.step; 311 | 312 | // Since JavaScript has problems with large floats, round 313 | // the final value to 5 digits after the decimal point (see #4124) 314 | return parseFloat(normValue.toFixed(5)); 315 | 316 | }, 317 | 318 | _start: function(event, index) { 319 | var uiHash = { 320 | handle: this.handles[index], 321 | value: this.value() 322 | }; 323 | if (this.options.values && this.options.values.length) { 324 | uiHash.value = this.values(index); 325 | uiHash.values = this.values(); 326 | } 327 | this._trigger("start", event, uiHash); 328 | }, 329 | 330 | _slide: function(event, index, newVal) { 331 | 332 | var handle = this.handles[index]; 333 | 334 | if (this.options.values && this.options.values.length) { 335 | 336 | var otherVal = this.values(index ? 0 : 1); 337 | 338 | if ((this.options.values.length == 2 && this.options.range === true) && 339 | ((index == 0 && newVal > otherVal) || (index == 1 && newVal < otherVal))){ 340 | newVal = otherVal; 341 | } 342 | 343 | if (newVal != this.values(index)) { 344 | var newValues = this.values(); 345 | newValues[index] = newVal; 346 | // A slide can be canceled by returning false from the slide callback 347 | var allowed = this._trigger("slide", event, { 348 | handle: this.handles[index], 349 | value: newVal, 350 | values: newValues 351 | }); 352 | var otherVal = this.values(index ? 0 : 1); 353 | if (allowed !== false) { 354 | this.values(index, newVal, ( event.type == 'mousedown' && this.options.animate ), true); 355 | } 356 | } 357 | 358 | } else { 359 | 360 | if (newVal != this.value()) { 361 | // A slide can be canceled by returning false from the slide callback 362 | var allowed = this._trigger("slide", event, { 363 | handle: this.handles[index], 364 | value: newVal 365 | }); 366 | if (allowed !== false) { 367 | this._setData('value', newVal, ( event.type == 'mousedown' && this.options.animate )); 368 | } 369 | 370 | } 371 | 372 | } 373 | 374 | }, 375 | 376 | _stop: function(event, index) { 377 | var uiHash = { 378 | handle: this.handles[index], 379 | value: this.value() 380 | }; 381 | if (this.options.values && this.options.values.length) { 382 | uiHash.value = this.values(index); 383 | uiHash.values = this.values(); 384 | } 385 | this._trigger("stop", event, uiHash); 386 | }, 387 | 388 | _change: function(event, index) { 389 | var uiHash = { 390 | handle: this.handles[index], 391 | value: this.value() 392 | }; 393 | if (this.options.values && this.options.values.length) { 394 | uiHash.value = this.values(index); 395 | uiHash.values = this.values(); 396 | } 397 | this._trigger("change", event, uiHash); 398 | }, 399 | 400 | value: function(newValue) { 401 | 402 | if (arguments.length) { 403 | this._setData("value", newValue); 404 | this._change(null, 0); 405 | } 406 | 407 | return this._value(); 408 | 409 | }, 410 | 411 | values: function(index, newValue, animated, noPropagation) { 412 | 413 | if (arguments.length > 1) { 414 | this.options.values[index] = newValue; 415 | this._refreshValue(animated); 416 | if(!noPropagation) this._change(null, index); 417 | } 418 | 419 | if (arguments.length) { 420 | if (this.options.values && this.options.values.length) { 421 | return this._values(index); 422 | } else { 423 | return this.value(); 424 | } 425 | } else { 426 | return this._values(); 427 | } 428 | 429 | }, 430 | 431 | _setData: function(key, value, animated) { 432 | 433 | $.widget.prototype._setData.apply(this, arguments); 434 | 435 | switch (key) { 436 | case 'disabled': 437 | if (value) { 438 | this.handles.filter(".ui-state-focus").blur(); 439 | this.handles.removeClass("ui-state-hover"); 440 | this.handles.attr("disabled", "disabled"); 441 | } else { 442 | this.handles.removeAttr("disabled"); 443 | } 444 | case 'orientation': 445 | 446 | this._detectOrientation(); 447 | 448 | this.element 449 | .removeClass("ui-slider-horizontal ui-slider-vertical") 450 | .addClass("ui-slider-" + this.orientation); 451 | this._refreshValue(animated); 452 | break; 453 | case 'value': 454 | this._refreshValue(animated); 455 | break; 456 | } 457 | 458 | }, 459 | 460 | _step: function() { 461 | var step = this.options.step; 462 | return step; 463 | }, 464 | 465 | _value: function() { 466 | 467 | var val = this.options.value; 468 | if (val < this._valueMin()) val = this._valueMin(); 469 | if (val > this._valueMax()) val = this._valueMax(); 470 | 471 | return val; 472 | 473 | }, 474 | 475 | _values: function(index) { 476 | 477 | if (arguments.length) { 478 | var val = this.options.values[index]; 479 | if (val < this._valueMin()) val = this._valueMin(); 480 | if (val > this._valueMax()) val = this._valueMax(); 481 | 482 | return val; 483 | } else { 484 | return this.options.values; 485 | } 486 | 487 | }, 488 | 489 | _valueMin: function() { 490 | var valueMin = this.options.min; 491 | return valueMin; 492 | }, 493 | 494 | _valueMax: function() { 495 | var valueMax = this.options.max; 496 | return valueMax; 497 | }, 498 | 499 | _refreshValue: function(animate) { 500 | 501 | var oRange = this.options.range, o = this.options, self = this; 502 | 503 | if (this.options.values && this.options.values.length) { 504 | var vp0, vp1; 505 | this.handles.each(function(i, j) { 506 | var valPercent = (self.values(i) - self._valueMin()) / (self._valueMax() - self._valueMin()) * 100; 507 | var _set = {}; _set[self.orientation == 'horizontal' ? 'left' : 'bottom'] = valPercent + '%'; 508 | $(this).stop(1,1)[animate ? 'animate' : 'css'](_set, o.animate); 509 | if (self.options.range === true) { 510 | if (self.orientation == 'horizontal') { 511 | (i == 0) && self.range.stop(1,1)[animate ? 'animate' : 'css']({ left: valPercent + '%' }, o.animate); 512 | (i == 1) && self.range[animate ? 'animate' : 'css']({ width: (valPercent - lastValPercent) + '%' }, { queue: false, duration: o.animate }); 513 | } else { 514 | (i == 0) && self.range.stop(1,1)[animate ? 'animate' : 'css']({ bottom: (valPercent) + '%' }, o.animate); 515 | (i == 1) && self.range[animate ? 'animate' : 'css']({ height: (valPercent - lastValPercent) + '%' }, { queue: false, duration: o.animate }); 516 | } 517 | } 518 | lastValPercent = valPercent; 519 | }); 520 | } else { 521 | var value = this.value(), 522 | valueMin = this._valueMin(), 523 | valueMax = this._valueMax(), 524 | valPercent = valueMax != valueMin 525 | ? (value - valueMin) / (valueMax - valueMin) * 100 526 | : 0; 527 | var _set = {}; _set[self.orientation == 'horizontal' ? 'left' : 'bottom'] = valPercent + '%'; 528 | this.handle.stop(1,1)[animate ? 'animate' : 'css'](_set, o.animate); 529 | 530 | (oRange == "min") && (this.orientation == "horizontal") && this.range.stop(1,1)[animate ? 'animate' : 'css']({ width: valPercent + '%' }, o.animate); 531 | (oRange == "max") && (this.orientation == "horizontal") && this.range[animate ? 'animate' : 'css']({ width: (100 - valPercent) + '%' }, { queue: false, duration: o.animate }); 532 | (oRange == "min") && (this.orientation == "vertical") && this.range.stop(1,1)[animate ? 'animate' : 'css']({ height: valPercent + '%' }, o.animate); 533 | (oRange == "max") && (this.orientation == "vertical") && this.range[animate ? 'animate' : 'css']({ height: (100 - valPercent) + '%' }, { queue: false, duration: o.animate }); 534 | } 535 | 536 | } 537 | 538 | })); 539 | 540 | $.extend($.ui.slider, { 541 | getter: "value values", 542 | version: "1.7.2", 543 | eventPrefix: "slide", 544 | defaults: { 545 | animate: false, 546 | delay: 0, 547 | distance: 0, 548 | max: 100, 549 | min: 0, 550 | orientation: 'horizontal', 551 | range: false, 552 | step: 1, 553 | value: 0, 554 | values: null 555 | } 556 | }); 557 | 558 | })(jQuery); 559 | -------------------------------------------------------------------------------- /rating/ui.theme.css: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI CSS Framework 3 | * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) 4 | * Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. 5 | * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px 6 | */ 7 | 8 | 9 | /* Component containers 10 | ----------------------------------*/ 11 | .ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; } 12 | .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; } 13 | .ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; } 14 | .ui-widget-content a { color: #222222; } 15 | .ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; } 16 | .ui-widget-header a { color: #222222; } 17 | 18 | /* Interaction states 19 | ----------------------------------*/ 20 | .ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; outline: none; } 21 | .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; outline: none; } 22 | .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus { border: 1px solid #999999; background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; outline: none; } 23 | .ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; outline: none; } 24 | .ui-state-active, .ui-widget-content .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; outline: none; } 25 | .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; outline: none; text-decoration: none; } 26 | 27 | /* Interaction Cues 28 | ----------------------------------*/ 29 | .ui-state-highlight, .ui-widget-content .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; } 30 | .ui-state-highlight a, .ui-widget-content .ui-state-highlight a { color: #363636; } 31 | .ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; } 32 | .ui-state-error a, .ui-widget-content .ui-state-error a { color: #cd0a0a; } 33 | .ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #cd0a0a; } 34 | .ui-state-disabled, .ui-widget-content .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } 35 | .ui-priority-primary, .ui-widget-content .ui-priority-primary { font-weight: bold; } 36 | .ui-priority-secondary, .ui-widget-content .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } 37 | 38 | /* Icons 39 | ----------------------------------*/ 40 | 41 | /* states and images */ 42 | .ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); } 43 | .ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } 44 | .ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } 45 | .ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png); } 46 | .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); } 47 | .ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); } 48 | .ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); } 49 | .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); } 50 | 51 | /* positioning */ 52 | .ui-icon-carat-1-n { background-position: 0 0; } 53 | .ui-icon-carat-1-ne { background-position: -16px 0; } 54 | .ui-icon-carat-1-e { background-position: -32px 0; } 55 | .ui-icon-carat-1-se { background-position: -48px 0; } 56 | .ui-icon-carat-1-s { background-position: -64px 0; } 57 | .ui-icon-carat-1-sw { background-position: -80px 0; } 58 | .ui-icon-carat-1-w { background-position: -96px 0; } 59 | .ui-icon-carat-1-nw { background-position: -112px 0; } 60 | .ui-icon-carat-2-n-s { background-position: -128px 0; } 61 | .ui-icon-carat-2-e-w { background-position: -144px 0; } 62 | .ui-icon-triangle-1-n { background-position: 0 -16px; } 63 | .ui-icon-triangle-1-ne { background-position: -16px -16px; } 64 | .ui-icon-triangle-1-e { background-position: -32px -16px; } 65 | .ui-icon-triangle-1-se { background-position: -48px -16px; } 66 | .ui-icon-triangle-1-s { background-position: -64px -16px; } 67 | .ui-icon-triangle-1-sw { background-position: -80px -16px; } 68 | .ui-icon-triangle-1-w { background-position: -96px -16px; } 69 | .ui-icon-triangle-1-nw { background-position: -112px -16px; } 70 | .ui-icon-triangle-2-n-s { background-position: -128px -16px; } 71 | .ui-icon-triangle-2-e-w { background-position: -144px -16px; } 72 | .ui-icon-arrow-1-n { background-position: 0 -32px; } 73 | .ui-icon-arrow-1-ne { background-position: -16px -32px; } 74 | .ui-icon-arrow-1-e { background-position: -32px -32px; } 75 | .ui-icon-arrow-1-se { background-position: -48px -32px; } 76 | .ui-icon-arrow-1-s { background-position: -64px -32px; } 77 | .ui-icon-arrow-1-sw { background-position: -80px -32px; } 78 | .ui-icon-arrow-1-w { background-position: -96px -32px; } 79 | .ui-icon-arrow-1-nw { background-position: -112px -32px; } 80 | .ui-icon-arrow-2-n-s { background-position: -128px -32px; } 81 | .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } 82 | .ui-icon-arrow-2-e-w { background-position: -160px -32px; } 83 | .ui-icon-arrow-2-se-nw { background-position: -176px -32px; } 84 | .ui-icon-arrowstop-1-n { background-position: -192px -32px; } 85 | .ui-icon-arrowstop-1-e { background-position: -208px -32px; } 86 | .ui-icon-arrowstop-1-s { background-position: -224px -32px; } 87 | .ui-icon-arrowstop-1-w { background-position: -240px -32px; } 88 | .ui-icon-arrowthick-1-n { background-position: 0 -48px; } 89 | .ui-icon-arrowthick-1-ne { background-position: -16px -48px; } 90 | .ui-icon-arrowthick-1-e { background-position: -32px -48px; } 91 | .ui-icon-arrowthick-1-se { background-position: -48px -48px; } 92 | .ui-icon-arrowthick-1-s { background-position: -64px -48px; } 93 | .ui-icon-arrowthick-1-sw { background-position: -80px -48px; } 94 | .ui-icon-arrowthick-1-w { background-position: -96px -48px; } 95 | .ui-icon-arrowthick-1-nw { background-position: -112px -48px; } 96 | .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } 97 | .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } 98 | .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } 99 | .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } 100 | .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } 101 | .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } 102 | .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } 103 | .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } 104 | .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } 105 | .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } 106 | .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } 107 | .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } 108 | .ui-icon-arrowreturn-1-w { background-position: -64px -64px; } 109 | .ui-icon-arrowreturn-1-n { background-position: -80px -64px; } 110 | .ui-icon-arrowreturn-1-e { background-position: -96px -64px; } 111 | .ui-icon-arrowreturn-1-s { background-position: -112px -64px; } 112 | .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } 113 | .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } 114 | .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } 115 | .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } 116 | .ui-icon-arrow-4 { background-position: 0 -80px; } 117 | .ui-icon-arrow-4-diag { background-position: -16px -80px; } 118 | .ui-icon-extlink { background-position: -32px -80px; } 119 | .ui-icon-newwin { background-position: -48px -80px; } 120 | .ui-icon-refresh { background-position: -64px -80px; } 121 | .ui-icon-shuffle { background-position: -80px -80px; } 122 | .ui-icon-transfer-e-w { background-position: -96px -80px; } 123 | .ui-icon-transferthick-e-w { background-position: -112px -80px; } 124 | .ui-icon-folder-collapsed { background-position: 0 -96px; } 125 | .ui-icon-folder-open { background-position: -16px -96px; } 126 | .ui-icon-document { background-position: -32px -96px; } 127 | .ui-icon-document-b { background-position: -48px -96px; } 128 | .ui-icon-note { background-position: -64px -96px; } 129 | .ui-icon-mail-closed { background-position: -80px -96px; } 130 | .ui-icon-mail-open { background-position: -96px -96px; } 131 | .ui-icon-suitcase { background-position: -112px -96px; } 132 | .ui-icon-comment { background-position: -128px -96px; } 133 | .ui-icon-person { background-position: -144px -96px; } 134 | .ui-icon-print { background-position: -160px -96px; } 135 | .ui-icon-trash { background-position: -176px -96px; } 136 | .ui-icon-locked { background-position: -192px -96px; } 137 | .ui-icon-unlocked { background-position: -208px -96px; } 138 | .ui-icon-bookmark { background-position: -224px -96px; } 139 | .ui-icon-tag { background-position: -240px -96px; } 140 | .ui-icon-home { background-position: 0 -112px; } 141 | .ui-icon-flag { background-position: -16px -112px; } 142 | .ui-icon-calendar { background-position: -32px -112px; } 143 | .ui-icon-cart { background-position: -48px -112px; } 144 | .ui-icon-pencil { background-position: -64px -112px; } 145 | .ui-icon-clock { background-position: -80px -112px; } 146 | .ui-icon-disk { background-position: -96px -112px; } 147 | .ui-icon-calculator { background-position: -112px -112px; } 148 | .ui-icon-zoomin { background-position: -128px -112px; } 149 | .ui-icon-zoomout { background-position: -144px -112px; } 150 | .ui-icon-search { background-position: -160px -112px; } 151 | .ui-icon-wrench { background-position: -176px -112px; } 152 | .ui-icon-gear { background-position: -192px -112px; } 153 | .ui-icon-heart { background-position: -208px -112px; } 154 | .ui-icon-star { background-position: -224px -112px; } 155 | .ui-icon-link { background-position: -240px -112px; } 156 | .ui-icon-cancel { background-position: 0 -128px; } 157 | .ui-icon-plus { background-position: -16px -128px; } 158 | .ui-icon-plusthick { background-position: -32px -128px; } 159 | .ui-icon-minus { background-position: -48px -128px; } 160 | .ui-icon-minusthick { background-position: -64px -128px; } 161 | .ui-icon-close { background-position: -80px -128px; } 162 | .ui-icon-closethick { background-position: -96px -128px; } 163 | .ui-icon-key { background-position: -112px -128px; } 164 | .ui-icon-lightbulb { background-position: -128px -128px; } 165 | .ui-icon-scissors { background-position: -144px -128px; } 166 | .ui-icon-clipboard { background-position: -160px -128px; } 167 | .ui-icon-copy { background-position: -176px -128px; } 168 | .ui-icon-contact { background-position: -192px -128px; } 169 | .ui-icon-image { background-position: -208px -128px; } 170 | .ui-icon-video { background-position: -224px -128px; } 171 | .ui-icon-script { background-position: -240px -128px; } 172 | .ui-icon-alert { background-position: 0 -144px; } 173 | .ui-icon-info { background-position: -16px -144px; } 174 | .ui-icon-notice { background-position: -32px -144px; } 175 | .ui-icon-help { background-position: -48px -144px; } 176 | .ui-icon-check { background-position: -64px -144px; } 177 | .ui-icon-bullet { background-position: -80px -144px; } 178 | .ui-icon-radio-off { background-position: -96px -144px; } 179 | .ui-icon-radio-on { background-position: -112px -144px; } 180 | .ui-icon-pin-w { background-position: -128px -144px; } 181 | .ui-icon-pin-s { background-position: -144px -144px; } 182 | .ui-icon-play { background-position: 0 -160px; } 183 | .ui-icon-pause { background-position: -16px -160px; } 184 | .ui-icon-seek-next { background-position: -32px -160px; } 185 | .ui-icon-seek-prev { background-position: -48px -160px; } 186 | .ui-icon-seek-end { background-position: -64px -160px; } 187 | .ui-icon-seek-first { background-position: -80px -160px; } 188 | .ui-icon-stop { background-position: -96px -160px; } 189 | .ui-icon-eject { background-position: -112px -160px; } 190 | .ui-icon-volume-off { background-position: -128px -160px; } 191 | .ui-icon-volume-on { background-position: -144px -160px; } 192 | .ui-icon-power { background-position: 0 -176px; } 193 | .ui-icon-signal-diag { background-position: -16px -176px; } 194 | .ui-icon-signal { background-position: -32px -176px; } 195 | .ui-icon-battery-0 { background-position: -48px -176px; } 196 | .ui-icon-battery-1 { background-position: -64px -176px; } 197 | .ui-icon-battery-2 { background-position: -80px -176px; } 198 | .ui-icon-battery-3 { background-position: -96px -176px; } 199 | .ui-icon-circle-plus { background-position: 0 -192px; } 200 | .ui-icon-circle-minus { background-position: -16px -192px; } 201 | .ui-icon-circle-close { background-position: -32px -192px; } 202 | .ui-icon-circle-triangle-e { background-position: -48px -192px; } 203 | .ui-icon-circle-triangle-s { background-position: -64px -192px; } 204 | .ui-icon-circle-triangle-w { background-position: -80px -192px; } 205 | .ui-icon-circle-triangle-n { background-position: -96px -192px; } 206 | .ui-icon-circle-arrow-e { background-position: -112px -192px; } 207 | .ui-icon-circle-arrow-s { background-position: -128px -192px; } 208 | .ui-icon-circle-arrow-w { background-position: -144px -192px; } 209 | .ui-icon-circle-arrow-n { background-position: -160px -192px; } 210 | .ui-icon-circle-zoomin { background-position: -176px -192px; } 211 | .ui-icon-circle-zoomout { background-position: -192px -192px; } 212 | .ui-icon-circle-check { background-position: -208px -192px; } 213 | .ui-icon-circlesmall-plus { background-position: 0 -208px; } 214 | .ui-icon-circlesmall-minus { background-position: -16px -208px; } 215 | .ui-icon-circlesmall-close { background-position: -32px -208px; } 216 | .ui-icon-squaresmall-plus { background-position: -48px -208px; } 217 | .ui-icon-squaresmall-minus { background-position: -64px -208px; } 218 | .ui-icon-squaresmall-close { background-position: -80px -208px; } 219 | .ui-icon-grip-dotted-vertical { background-position: 0 -224px; } 220 | .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } 221 | .ui-icon-grip-solid-vertical { background-position: -32px -224px; } 222 | .ui-icon-grip-solid-horizontal { background-position: -48px -224px; } 223 | .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } 224 | .ui-icon-grip-diagonal-se { background-position: -80px -224px; } 225 | 226 | 227 | /* Misc visuals 228 | ----------------------------------*/ 229 | 230 | /* Corner radius */ 231 | .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; } 232 | .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; } 233 | .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; } 234 | .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; } 235 | .ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; } 236 | .ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; } 237 | .ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; } 238 | .ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; } 239 | .ui-corner-all { -moz-border-radius: 6px; -webkit-border-radius: 6px; } 240 | 241 | /* Overlays */ 242 | .ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); } 243 | .ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; } 244 | --------------------------------------------------------------------------------