aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/build.xml130
-rw-r--r--build/build/yuicompressor-2.4.2.jarbin0 -> 851219 bytes
-rw-r--r--build/release/changelog-shell79
-rwxr-xr-xbuild/release/prepare-release336
-rw-r--r--build/themes1
-rw-r--r--demos/accordion/collapsible.html21
-rw-r--r--demos/accordion/custom-icons.html28
-rw-r--r--demos/accordion/default.html18
-rw-r--r--demos/accordion/fillspace.html33
-rw-r--r--demos/accordion/hoverintent.html134
-rw-r--r--demos/accordion/index.html31
-rw-r--r--demos/accordion/mouseover.html20
-rw-r--r--demos/accordion/no-auto-height.html23
-rw-r--r--demos/accordion/sortable.html46
-rw-r--r--demos/addClass/default.html38
-rw-r--r--demos/addClass/index.html4
-rw-r--r--demos/animate/default.html36
-rw-r--r--demos/animate/index.html4
-rw-r--r--demos/autocomplete/categories.html44
-rw-r--r--demos/autocomplete/combobox.html223
-rw-r--r--demos/autocomplete/custom-data.html80
-rw-r--r--demos/autocomplete/default.html59
-rw-r--r--demos/autocomplete/folding.html38
-rw-r--r--demos/autocomplete/images/jquery_32x32.pngbin0 -> 1417 bytes
-rw-r--r--demos/autocomplete/images/jqueryui_32x32.pngbin0 -> 1193 bytes
-rw-r--r--demos/autocomplete/images/sizzlejs_32x32.pngbin0 -> 999 bytes
-rw-r--r--demos/autocomplete/images/transparent_1x1.pngbin0 -> 95 bytes
-rw-r--r--demos/autocomplete/images/ui-anim_basic_16x16.gifbin0 -> 1459 bytes
-rw-r--r--demos/autocomplete/index.html6
-rw-r--r--demos/autocomplete/maxheight.html79
-rw-r--r--demos/autocomplete/multiple-remote.html108
-rw-r--r--demos/autocomplete/multiple.html120
-rw-r--r--demos/autocomplete/remote-jsonp.html70
-rw-r--r--demos/autocomplete/remote-with-cache.html79
-rw-r--r--demos/autocomplete/remote.html51
-rw-r--r--demos/autocomplete/search.php4
-rw-r--r--demos/autocomplete/xml.html63
-rw-r--r--demos/button/checkbox.html43
-rw-r--r--demos/button/default.html40
-rw-r--r--demos/button/icons.html47
-rw-r--r--demos/button/index.html4
-rw-r--r--demos/button/radio.html41
-rw-r--r--demos/button/splitbutton.html28
-rw-r--r--demos/button/toolbar.html100
-rw-r--r--demos/datepicker/alt-field.html25
-rw-r--r--demos/datepicker/animation.html44
-rw-r--r--demos/datepicker/buttonbar.html22
-rw-r--r--demos/datepicker/date-formats.html26
-rw-r--r--demos/datepicker/date-range.html49
-rw-r--r--demos/datepicker/default.html22
-rw-r--r--demos/datepicker/dropdown-month-year.html22
-rw-r--r--demos/datepicker/event-search.html46
-rw-r--r--demos/datepicker/icon-trigger.html26
-rw-r--r--demos/datepicker/index.html6
-rw-r--r--demos/datepicker/inline.html22
-rw-r--r--demos/datepicker/localization.html141
-rw-r--r--demos/datepicker/min-max.html22
-rw-r--r--demos/datepicker/multiple-calendars.html22
-rw-r--r--demos/datepicker/other-months.html25
-rw-r--r--demos/datepicker/show-week.html25
-rw-r--r--demos/dialog/animated.html48
-rw-r--r--demos/dialog/default.html32
-rw-r--r--demos/dialog/index.html4
-rw-r--r--demos/dialog/modal-confirmation.html40
-rw-r--r--demos/dialog/modal-form.html128
-rw-r--r--demos/dialog/modal-message.html38
-rw-r--r--demos/dialog/modal.html35
-rw-r--r--demos/draggable/constrain-movement.html41
-rw-r--r--demos/draggable/cursor-style.html34
-rw-r--r--demos/draggable/default.html28
-rw-r--r--demos/draggable/delay-start.html34
-rw-r--r--demos/draggable/events.html80
-rw-r--r--demos/draggable/handle.html32
-rw-r--r--demos/draggable/index.html4
-rw-r--r--demos/draggable/revert.html32
-rw-r--r--demos/draggable/scroll.html34
-rw-r--r--demos/draggable/snap-to.html38
-rw-r--r--demos/draggable/sortable.html42
-rw-r--r--demos/draggable/visual-feedback.html41
-rw-r--r--demos/droppable/accepted-elements.html50
-rw-r--r--demos/droppable/default.html42
-rw-r--r--demos/droppable/images/high_tatras.jpgbin23627 -> 22994 bytes
-rw-r--r--demos/droppable/images/high_tatras2.jpgbin26332 -> 25619 bytes
-rw-r--r--demos/droppable/images/high_tatras3.jpgbin25219 -> 24583 bytes
-rw-r--r--demos/droppable/images/high_tatras4.jpgbin25656 -> 24870 bytes
-rw-r--r--demos/droppable/index.html4
-rw-r--r--demos/droppable/photo-manager.html313
-rw-r--r--demos/droppable/propagation.html58
-rw-r--r--demos/droppable/revert.html49
-rw-r--r--demos/droppable/shopping-cart.html48
-rw-r--r--demos/droppable/visual-feedback.html59
-rw-r--r--demos/effect/default.html96
-rw-r--r--demos/effect/easing.html116
-rw-r--r--demos/effect/index.html11
-rw-r--r--demos/hide/default.html98
-rw-r--r--demos/hide/index.html4
-rw-r--r--demos/images/demo-config-on-tile.gifbin180 -> 172 bytes
-rw-r--r--demos/images/demo-config-on.gifbin343 -> 335 bytes
-rw-r--r--demos/images/demo-spindown-closed.gifbin104 -> 103 bytes
-rw-r--r--demos/images/icon-docs-info.gifbin214 -> 206 bytes
-rw-r--r--demos/images/jquery_32x32.pngbin4288 -> 0 bytes
-rw-r--r--demos/images/jqueryui_32x32.pngbin3944 -> 0 bytes
-rw-r--r--demos/images/pbar-ani.gifbin304064 -> 7970 bytes
-rw-r--r--demos/images/sizzlejs_32x32.pngbin3750 -> 0 bytes
-rw-r--r--demos/images/transparent_1x1.pngbin137 -> 0 bytes
-rw-r--r--demos/index.html188
-rw-r--r--demos/position/cycler.html111
-rw-r--r--demos/position/default.html74
-rw-r--r--demos/position/images/earth.jpgbin35007 -> 29850 bytes
-rw-r--r--demos/position/images/flight.jpgbin35234 -> 33637 bytes
-rw-r--r--demos/position/images/rocket.jpgbin51070 -> 32986 bytes
-rw-r--r--demos/position/index.html4
-rw-r--r--demos/progressbar/animated.html26
-rw-r--r--demos/progressbar/default.html24
-rw-r--r--demos/progressbar/images/pbar-ani.gifbin304064 -> 7970 bytes
-rw-r--r--demos/progressbar/index.html4
-rw-r--r--demos/progressbar/resize.html33
-rw-r--r--demos/removeClass/default.html42
-rw-r--r--demos/removeClass/index.html4
-rw-r--r--demos/resizable/animate.html28
-rw-r--r--demos/resizable/aspect-ratio.html30
-rw-r--r--demos/resizable/constrain-area.html30
-rw-r--r--demos/resizable/default.html28
-rw-r--r--demos/resizable/delay-start.html32
-rw-r--r--demos/resizable/helper.html30
-rw-r--r--demos/resizable/index.html4
-rw-r--r--demos/resizable/max-min.html28
-rw-r--r--demos/resizable/snap-to-grid.html28
-rw-r--r--demos/resizable/synchronous-resize.html32
-rw-r--r--demos/resizable/textarea.html34
-rw-r--r--demos/resizable/visual-feedback.html28
-rw-r--r--demos/selectable/default.html28
-rw-r--r--demos/selectable/display-grid.html28
-rw-r--r--demos/selectable/index.html4
-rw-r--r--demos/selectable/serialize.html40
-rw-r--r--demos/show/default.html99
-rw-r--r--demos/show/index.html4
-rw-r--r--demos/slider/colorpicker.html64
-rw-r--r--demos/slider/default.html28
-rw-r--r--demos/slider/hotelrooms.html40
-rw-r--r--demos/slider/index.html4
-rw-r--r--demos/slider/multiple-vertical.html48
-rw-r--r--demos/slider/range-vertical.html41
-rw-r--r--demos/slider/range.html41
-rw-r--r--demos/slider/rangemax.html38
-rw-r--r--demos/slider/rangemin.html38
-rw-r--r--demos/slider/side-scroll.html114
-rw-r--r--demos/slider/slider-vertical.html38
-rw-r--r--demos/slider/steps.html38
-rw-r--r--demos/slider/tabs.html42
-rw-r--r--demos/sortable/connect-lists-through-tabs.html49
-rw-r--r--demos/sortable/connect-lists.html28
-rw-r--r--demos/sortable/default.html28
-rw-r--r--demos/sortable/delay-start.html30
-rw-r--r--demos/sortable/display-grid.html28
-rw-r--r--demos/sortable/empty-lists.html34
-rw-r--r--demos/sortable/index.html4
-rw-r--r--demos/sortable/items.html35
-rw-r--r--demos/sortable/placeholder.html30
-rw-r--r--demos/sortable/portlets.html46
-rw-r--r--demos/spinner/currency.html61
-rw-r--r--demos/spinner/decimal.html59
-rw-r--r--demos/spinner/default.html65
-rw-r--r--demos/spinner/index.html20
-rw-r--r--demos/spinner/latlong.html60
-rw-r--r--demos/spinner/overflow.html47
-rw-r--r--demos/spinner/time.html72
-rw-r--r--demos/switchClass/default.html35
-rw-r--r--demos/switchClass/index.html4
-rw-r--r--demos/tabs/ajax.html28
-rw-r--r--demos/tabs/ajax/content1.html2
-rw-r--r--demos/tabs/ajax/content2.html2
-rw-r--r--demos/tabs/ajax/content3-slow.php2
-rw-r--r--demos/tabs/bottom.html40
-rw-r--r--demos/tabs/collapsible.html23
-rw-r--r--demos/tabs/cookie.html25
-rw-r--r--demos/tabs/default.html22
-rw-r--r--demos/tabs/index.html4
-rw-r--r--demos/tabs/manipulation.html82
-rw-r--r--demos/tabs/mouseover.html25
-rw-r--r--demos/tabs/sortable.html33
-rw-r--r--demos/tabs/vertical.html41
-rw-r--r--demos/toggle/default.html79
-rw-r--r--demos/toggle/index.html4
-rw-r--r--demos/toggleClass/default.html30
-rw-r--r--demos/toggleClass/index.html4
-rw-r--r--external/glob.de-DE.js55
-rw-r--r--external/glob.ja-JP.js74
-rw-r--r--external/glob.js1333
-rw-r--r--external/jquery.bgiframe-2.1.1.js10
-rw-r--r--external/jquery.bgiframe-2.1.2.js39
-rw-r--r--external/jquery.mousewheel-3.0.4.js78
-rw-r--r--external/qunit.css244
-rw-r--r--external/qunit.js540
-rw-r--r--jquery-1.4.4.js (renamed from jquery-1.4.2.js)3125
-rw-r--r--tests/index.html2
-rw-r--r--tests/jquery.simulate.js7
-rw-r--r--tests/static/accordion/default.html2
-rw-r--r--tests/static/accordion/dl.html2
-rw-r--r--tests/static/accordion/ul.html2
-rw-r--r--tests/static/button/default.html83
-rw-r--r--tests/static/datepicker/datepicker.html2
-rw-r--r--tests/static/datepicker/default.html2
-rw-r--r--tests/static/dialog/default.html2
-rw-r--r--tests/static/dialog/dialog.html2
-rw-r--r--tests/static/draggable/default.html2
-rw-r--r--tests/static/droppable/default.html2
-rw-r--r--tests/static/highlight_error.html2
-rw-r--r--tests/static/icons.html2
-rw-r--r--tests/static/index.html2
-rw-r--r--tests/static/menu/all-menus-icons.html2
-rw-r--r--tests/static/menu/default.html2
-rw-r--r--tests/static/overlay.html2
-rw-r--r--tests/static/progressbar/default.html2
-rw-r--r--tests/static/progressbar/progressbar.html2
-rw-r--r--tests/static/resizable/default.html2
-rw-r--r--tests/static/selectable/default.html2
-rw-r--r--tests/static/slider/default.html2
-rw-r--r--tests/static/slider/default_vertical.html2
-rw-r--r--tests/static/slider/slider_horizontal.html2
-rw-r--r--tests/static/slider/slider_horizontal_range.html2
-rw-r--r--tests/static/slider/slider_horizontal_range_max.html2
-rw-r--r--tests/static/slider/slider_horizontal_range_min.html2
-rw-r--r--tests/static/slider/slider_vertical.html2
-rw-r--r--tests/static/slider/slider_vertical_range.html2
-rw-r--r--tests/static/slider/slider_vertical_range_max.html2
-rw-r--r--tests/static/slider/slider_vertical_range_min.html2
-rw-r--r--tests/static/sortable/default.html2
-rw-r--r--tests/static/tabs/default.html2
-rw-r--r--tests/static/tabs/tabs.html2
-rw-r--r--tests/unit/accordion/accordion.html9
-rw-r--r--tests/unit/accordion/accordion_core.js7
-rw-r--r--tests/unit/accordion/accordion_defaults.js1
-rw-r--r--tests/unit/accordion/accordion_methods.js11
-rw-r--r--tests/unit/accordion/accordion_options.js50
-rw-r--r--tests/unit/autocomplete/autocomplete.html8
-rw-r--r--tests/unit/autocomplete/autocomplete_core.js33
-rw-r--r--tests/unit/autocomplete/autocomplete_defaults.js8
-rw-r--r--tests/unit/autocomplete/autocomplete_events.js2
-rw-r--r--tests/unit/autocomplete/autocomplete_options.js48
-rw-r--r--tests/unit/button/button.html3
-rw-r--r--tests/unit/button/button_defaults.js2
-rw-r--r--tests/unit/button/button_options.js24
-rw-r--r--tests/unit/button/button_tickets.js19
-rw-r--r--tests/unit/core/core.html64
-rw-r--r--tests/unit/core/core.js166
-rw-r--r--tests/unit/core/selector.js42
-rw-r--r--tests/unit/datepicker/datepicker.html5
-rw-r--r--tests/unit/datepicker/datepicker_options.js18
-rw-r--r--tests/unit/datepicker/datepicker_tickets.js12
-rw-r--r--tests/unit/defaults.html2
-rw-r--r--tests/unit/dialog/dialog.html17
-rw-r--r--tests/unit/dialog/dialog_core.js17
-rw-r--r--tests/unit/dialog/dialog_defaults.js8
-rw-r--r--tests/unit/dialog/dialog_events.js36
-rw-r--r--tests/unit/dialog/dialog_methods.js8
-rw-r--r--tests/unit/dialog/dialog_options.js186
-rw-r--r--tests/unit/dialog/dialog_tickets.js48
-rw-r--r--tests/unit/draggable/draggable.html5
-rw-r--r--tests/unit/draggable/draggable_options.js4
-rw-r--r--tests/unit/droppable/droppable.html5
-rw-r--r--tests/unit/images/jqueryui_32x32.pngbin0 -> 1193 bytes
-rw-r--r--tests/unit/index.html3
-rw-r--r--tests/unit/position/position.html21
-rw-r--r--tests/unit/position/position_core.js74
-rw-r--r--tests/unit/progressbar/progressbar.html4
-rw-r--r--tests/unit/progressbar/progressbar_defaults.js3
-rw-r--r--tests/unit/progressbar/progressbar_events.js34
-rw-r--r--tests/unit/progressbar/progressbar_options.js22
-rw-r--r--tests/unit/resizable/images/test.jpgbin915 -> 391 bytes
-rw-r--r--tests/unit/resizable/resizable.html5
-rw-r--r--tests/unit/selectable/selectable.html5
-rw-r--r--tests/unit/slider/slider.html14
-rw-r--r--tests/unit/slider/slider_events.js6
-rw-r--r--tests/unit/slider/slider_methods.js8
-rw-r--r--tests/unit/sortable/sortable.html5
-rw-r--r--tests/unit/sortable/sortable_tickets.js44
-rw-r--r--tests/unit/spinner/spinner.html42
-rw-r--r--tests/unit/spinner/spinner_core.js171
-rw-r--r--tests/unit/spinner/spinner_defaults.js15
-rw-r--r--tests/unit/spinner/spinner_events.js64
-rw-r--r--tests/unit/spinner/spinner_methods.js155
-rw-r--r--tests/unit/spinner/spinner_options.js154
-rw-r--r--tests/unit/swarminject.js9
-rw-r--r--tests/unit/tabs/spinner.gifbin2530 -> 1387 bytes
-rw-r--r--tests/unit/tabs/tabs.html29
-rw-r--r--tests/unit/tabs/tabs_defaults.js12
-rw-r--r--tests/unit/tabs/tabs_events.js13
-rw-r--r--tests/unit/tabs/tabs_methods.js51
-rw-r--r--tests/unit/tabs/tabs_options.js33
-rw-r--r--tests/unit/tabs/tabs_tickets.js52
-rw-r--r--tests/unit/testsuite.js10
-rw-r--r--tests/unit/widget/widget.html13
-rw-r--r--tests/unit/widget/widget.js168
-rw-r--r--tests/unit/widget/widget_core.js549
-rw-r--r--tests/unit/widget/widget_tickets.js46
-rw-r--r--tests/visual/accordion/accordion.html2
-rw-r--r--tests/visual/accordion/accordion_dl.html2
-rw-r--r--tests/visual/accordion/accordion_method_destroy.html2
-rw-r--r--tests/visual/accordion/accordion_method_disable.html2
-rw-r--r--tests/visual/accordion/accordion_option_animated_bounceslide.html2
-rw-r--r--tests/visual/accordion/accordion_option_animated_easeslide.html2
-rw-r--r--tests/visual/accordion/accordion_option_animated_false.html2
-rw-r--r--tests/visual/accordion/accordion_option_animated_slide.html2
-rw-r--r--tests/visual/accordion/accordion_option_animated_true.html2
-rw-r--r--tests/visual/accordion/accordion_option_autoHeight_false.html2
-rw-r--r--tests/visual/accordion/accordion_option_autoHeight_true.html2
-rw-r--r--tests/visual/accordion/accordion_option_fillSpace_true.html3
-rw-r--r--tests/visual/accordion/accordion_option_navigation_true.html2
-rw-r--r--tests/visual/accordion/accordion_ticket_4322.html2
-rw-r--r--tests/visual/accordion/accordion_ticket_4331.html2
-rw-r--r--tests/visual/accordion/accordion_ticket_4444.html2
-rw-r--r--tests/visual/accordion/accordion_ul.html2
-rw-r--r--tests/visual/addClass/addClass_queue.html50
-rw-r--r--tests/visual/all.html2
-rw-r--r--tests/visual/animate/animate_backgroundColor_hex.html2
-rw-r--r--tests/visual/animate/animate_backgroundColor_rgb.html2
-rw-r--r--tests/visual/animate/animate_color_hex.html2
-rw-r--r--tests/visual/animate/animate_color_rgb.html2
-rw-r--r--tests/visual/autocomplete/autocomplete.html7
-rw-r--r--tests/visual/button/button.html9
-rw-r--r--tests/visual/button/button_disabled_true.html2
-rw-r--r--tests/visual/button/button_input_type_checkbox.html2
-rw-r--r--tests/visual/button/button_option_disabled_true.html2
-rw-r--r--tests/visual/button/button_performance.html5
-rw-r--r--tests/visual/button/button_ticket_5254.html2
-rw-r--r--tests/visual/button/button_ticket_5261.html2
-rw-r--r--tests/visual/button/button_ticket_5278.html2
-rw-r--r--tests/visual/compound/accordion_dialog.html202
-rw-r--r--tests/visual/compound/accordion_tabs.html2
-rw-r--r--tests/visual/compound/datepicker_dialog.html2
-rw-r--r--tests/visual/compound/draggable_accordion.html2
-rw-r--r--tests/visual/compound/draggable_accordion_accordion_tabs_draggable.html2
-rw-r--r--tests/visual/compound/sortable_accordion_sortable_tabs.html2
-rw-r--r--tests/visual/compound/tabs_tabs.html2
-rw-r--r--tests/visual/compound/widgets_in_dialog.html2
-rw-r--r--tests/visual/datepicker/datepicker.html2
-rw-r--r--tests/visual/datepicker/datepicker_multi_inline.html2
-rw-r--r--tests/visual/datepicker/datepicker_ticket_4071.html2
-rw-r--r--tests/visual/datepicker/datepicker_ticket_4240.html2
-rw-r--r--tests/visual/datepicker/datepicker_ticket_4443.html2
-rw-r--r--tests/visual/datepicker/datepicker_ticket_5676.html30
-rw-r--r--tests/visual/datepicker/multimonth.html2
-rw-r--r--tests/visual/datepicker/viewport.html2
-rw-r--r--tests/visual/dialog/dialog.html4
-rw-r--r--tests/visual/dialog/dialog_on_page_with_large_dom.html4
-rw-r--r--tests/visual/dialog/dialog_on_page_with_scrollbars.html4
-rw-r--r--tests/visual/dialog/dialog_option_buttons_OK_Cancel.html4
-rw-r--r--tests/visual/dialog/dialog_option_closeOnEscape_false.html4
-rw-r--r--tests/visual/dialog/dialog_option_closeOnEscape_true.html4
-rw-r--r--tests/visual/dialog/dialog_option_modal_false.html4
-rw-r--r--tests/visual/dialog/dialog_option_modal_true.html4
-rw-r--r--tests/visual/dialog/dialog_option_position_right_top.html4
-rw-r--r--tests/visual/dialog/dialog_ticket_4350.html4
-rw-r--r--tests/visual/dialog/dialog_ticket_4826.html4
-rw-r--r--tests/visual/draggable/draggable.html2
-rw-r--r--tests/visual/draggable/draggable.scroll.html2
-rw-r--r--tests/visual/draggable/draggable_option_containment_array.html2
-rw-r--r--tests/visual/draggable/draggable_option_cursorAt_object.html2
-rw-r--r--tests/visual/draggable/draggable_option_handle_selector.html2
-rw-r--r--tests/visual/draggable/draggable_option_iframeFix_false.html2
-rw-r--r--tests/visual/draggable/draggable_option_iframeFix_selector.html2
-rw-r--r--tests/visual/draggable/draggable_option_iframeFix_true.html2
-rw-r--r--tests/visual/droppable/droppable.html2
-rw-r--r--tests/visual/droppable/droppable_option_accept_default.html2
-rw-r--r--tests/visual/droppable/droppable_option_accept_function.html2
-rw-r--r--tests/visual/droppable/droppable_option_accept_selector.html2
-rw-r--r--tests/visual/droppable/droppable_ticket_4087.html2
-rw-r--r--tests/visual/droppable/droppable_ticket_4088.html2
-rw-r--r--tests/visual/effects.all.html2
-rw-r--r--tests/visual/index.html2
-rw-r--r--tests/visual/menu/contextmenu.html2
-rw-r--r--tests/visual/menu/drilldown.html4
-rw-r--r--tests/visual/menu/menu.html4
-rw-r--r--tests/visual/menu/nested.html2
-rw-r--r--tests/visual/position/position.html34
-rw-r--r--tests/visual/position/position_margin.html43
-rw-r--r--tests/visual/progressbar/progressbar.html2
-rw-r--r--tests/visual/resizable/images/test.pngbin8212 -> 2499 bytes
-rw-r--r--tests/visual/resizable/resizable.html2
-rw-r--r--tests/visual/resizable/resizable_option_alsoResize_child.html2
-rw-r--r--tests/visual/resizable/resizable_option_aspectRatio_0.5.html2
-rw-r--r--tests/visual/resizable/resizable_option_aspectRatio_1.0.html2
-rw-r--r--tests/visual/resizable/resizable_option_aspectRatio_1.5.html2
-rw-r--r--tests/visual/resizable/resizable_option_aspectRatio_preserve_maxHeight_150.html2
-rw-r--r--tests/visual/resizable/resizable_option_aspectRatio_preserve_maxWidth_150.html2
-rw-r--r--tests/visual/resizable/resizable_option_aspectRatio_preserve_minHeight_50.html2
-rw-r--r--tests/visual/resizable/resizable_option_aspectRatio_preserve_minWidth_50.html2
-rw-r--r--tests/visual/resizable/resizable_option_aspectRatio_preserve_w100xh100.html2
-rw-r--r--tests/visual/resizable/resizable_option_aspectRatio_preserve_w100xh50.html2
-rw-r--r--tests/visual/resizable/resizable_option_aspectRatio_preserve_w50xh100.html2
-rw-r--r--tests/visual/resizable/resizable_ticket_3053.html2
-rw-r--r--tests/visual/resizable/resizable_ticket_4199.html2
-rw-r--r--tests/visual/resizable/resizable_ticket_4217.html2
-rw-r--r--tests/visual/resizable/resizable_ticket_4940.html2
-rw-r--r--tests/visual/resizable/resizable_ticket_5335.html52
-rw-r--r--tests/visual/selectable/selectable.html2
-rw-r--r--tests/visual/selectable/selectable_ticket_4341.html2
-rw-r--r--tests/visual/slider/slider.html2
-rw-r--r--tests/visual/slider/slider_horizontal.html2
-rw-r--r--tests/visual/slider/slider_horizontal_range.html2
-rw-r--r--tests/visual/slider/slider_horizontal_range_max.html2
-rw-r--r--tests/visual/slider/slider_horizontal_range_min.html2
-rw-r--r--tests/visual/slider/slider_in_container_with_scrollbars.html2
-rw-r--r--tests/visual/slider/slider_method_destroy.html2
-rw-r--r--tests/visual/slider/slider_method_disable.html2
-rw-r--r--tests/visual/slider/slider_option_animate_false.html2
-rw-r--r--tests/visual/slider/slider_option_animate_true.html2
-rw-r--r--tests/visual/slider/slider_option_max_3.html2
-rw-r--r--tests/visual/slider/slider_option_max_30.html2
-rw-r--r--tests/visual/slider/slider_option_max_300.html2
-rw-r--r--tests/visual/slider/slider_option_min_-3.html2
-rw-r--r--tests/visual/slider/slider_option_min_-30.html2
-rw-r--r--tests/visual/slider/slider_option_min_-300.html2
-rw-r--r--tests/visual/slider/slider_option_orientation_horizontal.html2
-rw-r--r--tests/visual/slider/slider_option_orientation_vertical.html2
-rw-r--r--tests/visual/slider/slider_option_range_false.html2
-rw-r--r--tests/visual/slider/slider_option_range_max.html2
-rw-r--r--tests/visual/slider/slider_option_range_min.html2
-rw-r--r--tests/visual/slider/slider_option_range_true.html2
-rw-r--r--tests/visual/slider/slider_option_step_25.html2
-rw-r--r--tests/visual/slider/slider_option_step_5.html2
-rw-r--r--tests/visual/slider/slider_option_value_3.html2
-rw-r--r--tests/visual/slider/slider_option_value_30.html2
-rw-r--r--tests/visual/slider/slider_option_values_25_50_75.html2
-rw-r--r--tests/visual/slider/slider_option_values_25_75.html2
-rw-r--r--tests/visual/slider/slider_option_values_50.html2
-rw-r--r--tests/visual/slider/slider_ticket_3736.html2
-rw-r--r--tests/visual/slider/slider_ticket_3762.html2
-rw-r--r--tests/visual/slider/slider_ticket_4385.html2
-rw-r--r--tests/visual/slider/slider_ticket_4467.html2
-rw-r--r--tests/visual/slider/slider_vertical.html2
-rw-r--r--tests/visual/slider/slider_vertical_range.html2
-rw-r--r--tests/visual/slider/slider_vertical_range_max.html2
-rw-r--r--tests/visual/slider/slider_vertical_range_min.html2
-rw-r--r--tests/visual/sortable/sortable.html2
-rw-r--r--tests/visual/sortable/sortable_massive_scale.html2
-rw-r--r--tests/visual/sortable/sortable_option_revert_false.html2
-rw-r--r--tests/visual/sortable/sortable_option_revert_true.html2
-rw-r--r--tests/visual/sortable/sortable_ticket_4231.html2
-rw-r--r--tests/visual/sortable/sortable_ticket_4551.html2
-rw-r--r--tests/visual/sortable/sortable_ticket_5355.html2
-rw-r--r--tests/visual/spinner/spinner.html43
-rw-r--r--tests/visual/tabs/tabs.html2
-rw-r--r--tests/visual/theme.html532
-rw-r--r--themes/base/images/ui-anim_basic_16x16.gifbin1553 -> 0 bytes
-rw-r--r--themes/base/jquery.ui.accordion.css21
-rw-r--r--themes/base/jquery.ui.all.css9
-rw-r--r--themes/base/jquery.ui.autocomplete.css12
-rw-r--r--themes/base/jquery.ui.base.css11
-rw-r--r--themes/base/jquery.ui.button.css25
-rw-r--r--themes/base/jquery.ui.core.css14
-rw-r--r--themes/base/jquery.ui.datepicker.css13
-rw-r--r--themes/base/jquery.ui.dialog.css16
-rw-r--r--themes/base/jquery.ui.progressbar.css11
-rw-r--r--themes/base/jquery.ui.resizable.css11
-rw-r--r--themes/base/jquery.ui.selectable.css10
-rw-r--r--themes/base/jquery.ui.slider.css11
-rw-r--r--themes/base/jquery.ui.spinner.css16
-rw-r--r--themes/base/jquery.ui.tabs.css11
-rw-r--r--themes/base/jquery.ui.theme.css15
-rw-r--r--ui/i18n/jquery.ui.datepicker-ar.js13
-rw-r--r--ui/i18n/jquery.ui.datepicker-fr.js22
-rw-r--r--ui/i18n/jquery.ui.datepicker-gl.js23
-rw-r--r--ui/i18n/jquery.ui.datepicker-kz.js23
-rw-r--r--ui/i18n/jquery.ui.datepicker-no.js4
-rw-r--r--ui/i18n/jquery.ui.datepicker-pl.js2
-rw-r--r--ui/i18n/jquery.ui.datepicker-pt-BR.js6
-rw-r--r--ui/i18n/jquery.ui.datepicker-pt.js22
-rw-r--r--ui/i18n/jquery.ui.datepicker-rm.js21
-rw-r--r--ui/i18n/jquery.ui.datepicker-ru.js2
-rw-r--r--ui/i18n/jquery.ui.datepicker-sk.js2
-rw-r--r--ui/i18n/jquery.ui.datepicker-th.js2
-rw-r--r--ui/jquery.effects.blind.js10
-rw-r--r--ui/jquery.effects.bounce.js10
-rw-r--r--ui/jquery.effects.clip.js10
-rw-r--r--ui/jquery.effects.core.js75
-rw-r--r--ui/jquery.effects.drop.js10
-rw-r--r--ui/jquery.effects.explode.js8
-rw-r--r--ui/jquery.effects.fade.js8
-rw-r--r--ui/jquery.effects.fold.js10
-rw-r--r--ui/jquery.effects.highlight.js8
-rw-r--r--ui/jquery.effects.pulsate.js8
-rw-r--r--ui/jquery.effects.scale.js12
-rw-r--r--ui/jquery.effects.shake.js10
-rw-r--r--ui/jquery.effects.slide.js12
-rw-r--r--ui/jquery.effects.transfer.js8
-rw-r--r--ui/jquery.ui.accordion.js684
-rw-r--r--ui/jquery.ui.autocomplete.js211
-rw-r--r--ui/jquery.ui.button.js36
-rw-r--r--ui/jquery.ui.core.js329
-rw-r--r--ui/jquery.ui.datepicker.js128
-rw-r--r--ui/jquery.ui.dialog.js784
-rw-r--r--ui/jquery.ui.draggable.js22
-rw-r--r--ui/jquery.ui.droppable.js12
-rw-r--r--ui/jquery.ui.mouse.js26
-rw-r--r--ui/jquery.ui.position.js86
-rw-r--r--ui/jquery.ui.progressbar.js59
-rw-r--r--ui/jquery.ui.resizable.js63
-rw-r--r--ui/jquery.ui.selectable.js39
-rw-r--r--ui/jquery.ui.slider.js34
-rw-r--r--ui/jquery.ui.sortable.js37
-rw-r--r--ui/jquery.ui.spinner.js360
-rwxr-xr-x[-rw-r--r--]ui/jquery.ui.tabs.js761
-rw-r--r--ui/jquery.ui.widget.js94
-rw-r--r--version.txt2
506 files changed, 14531 insertions, 6814 deletions
diff --git a/build/build.xml b/build/build.xml
index cdd5aff11..568cc9c92 100644
--- a/build/build.xml
+++ b/build/build.xml
@@ -18,16 +18,18 @@
<property file="ant.properties" />
- <loadfile failonerror="no" srcFile="../version.txt" property="release.version" />
+ <loadfile failonerror="no" srcFile="../version.txt" property="release.version">
+ <filterchain><striplinebreaks/></filterchain>
+ </loadfile>
<property name="release.filename" value="jquery-ui-${release.version}" />
<property name="dist.dir" value="dist/${release.filename}/" />
- <property name="cdndist.dir" value="dist/${release.filename}-googlecdn" />
+ <property name="cdndist.dir" value="dist/${release.filename}-cdn" />
<property name="build.dir" value="build" />
<property name="ui.dir" value="../" />
<property name="src.dir" value="${ui.dir}/ui/" />
<property name="theme.dir" value="${ui.dir}/themes/base/" />
- <property name="docs.dir" value="${ui.dir}/docs/" />
+ <property name="docs.dir" value="${dist.dir}/docs/" />
<property name="min.dir" value="${dist.dir}/ui/minified" />
@@ -38,14 +40,16 @@
<property name="core.files.min" value="jquery.ui.core.min.js, jquery.ui.widget.min.js, jquery.ui.mouse.min.js, jquery.ui.draggable.min.js, jquery.ui.droppable.min.js, jquery.ui.resizable.min.js, jquery.ui.selectable.min.js, jquery.ui.sortable.min.js, jquery.effects.core.min.js" />
<property description="Google Closure" name="closure-jar" value="${build.dir}/google-compiler-20091218.jar" />
+ <property description="YUI Compressor" name="yuicompressor-jar" value="${build.dir}/yuicompressor-2.4.2.jar" />
- <target name="deploy-release" depends="clean, docs-download, concatenate, minify, copy, replace-version, prepend-header, zip, googlecdn" description="Release builder">
+ <target name="deploy-release" depends="clean, docs-download, copy, minify, replace-version, prepend-header, zip" description="Release builder">
</target>
<target name="replace-version">
<replaceregexp match="@VERSION" replace="${release.version}" flags="g" byline="true">
<fileset dir="${dist.dir}/ui/" includes="*.js"/>
<fileset dir="${dist.dir}/ui/minified/" includes="*.js"/>
+ <fileset dir="${dist.dir}/themes/" includes="**/*.css"/>
</replaceregexp>
<echo message="Replaced all @VERSION to ${release.version}." />
</target>
@@ -67,10 +71,30 @@
</concat>
</sequential>
</for>
- <copy todir="${min.dir}">
+ <copy todir="${min.dir}" overwrite="true">
<fileset dir="${dist.dir}/ui-headered/" includes="*.js" />
</copy>
+ <copy todir="${dist.dir}/headers/">
+ <fileset dir="${dist.dir}/themes/base" includes="*.css" />
+ </copy>
+ <replaceregexp match="^(\/\*.*?\*\/\s).+" replace="\1" flags="s">
+ <fileset dir="${dist.dir}/headers/" includes="*.css"/>
+ </replaceregexp>
+ <for param="file">
+ <path><fileset dir="${dist.dir}/themes/base/minified" includes="*.css" /></path>
+ <sequential>
+ <propertyregex override="yes" property="target" input="@{file}" regexp=".*[\\/](.+)\.min\.css$" replace="\1"/>
+ <concat destfile="${dist.dir}/ui-headered/${target}.min.css">
+ <header file="${dist.dir}/headers/${target}.css" />
+ <fileset file="@{file}" />
+ </concat>
+ </sequential>
+ </for>
+ <copy todir="${dist.dir}/themes/base/minified" overwrite="true">
+ <fileset dir="${dist.dir}/ui-headered/" includes="*.css" />
+ </copy>
+
<!-- once more for the i18n files -->
<!-- need to clean up headers in those files first
<copy todir="${dist.dir}/headers/i18n/">
@@ -133,13 +157,12 @@
<target name="minify" depends="concatenate" description="Remove all comments and whitespace, no compression, great in combination with GZip">
<echo message="Building minified" />
- <delete dir="${min.dir}/" />
<mkdir dir="${min.dir}" />
- <delete dir="${min.dir}/i18n/" />
<mkdir dir="${min.dir}/i18n/" />
+ <mkdir dir="${dist.dir}/themes/base/minified" />
<apply executable="java" parallel="false">
- <fileset dir="${src.dir}/" includes="jquery.ui.*.js, jquery.effects.*.js" />
+ <fileset dir="${dist.dir}/ui" includes="*.js" />
<arg line="-jar" />
<arg path="${closure-jar}" />
<arg value="--warning_level" />
@@ -150,13 +173,8 @@
<mapper type="glob" from="*.js" to="${min.dir}/*.min.js" />
</apply>
- <concat destfile="${min.dir}/${concatenated}.min.js">
- <filelist dir="${min.dir}" files="${core.files.min}" />
- <fileset dir="${min.dir}" includes="jquery.ui.*.js, jquery.effects.*.js" excludes="${core.files.min}" />
- </concat>
-
<apply executable="java" parallel="false">
- <fileset dir="${src.dir}/i18n/" includes="jquery.ui.*.js" />
+ <fileset dir="${dist.dir}/ui/i18n" includes="*.js" />
<arg line="-jar" />
<arg path="${closure-jar}" />
<arg value="--warning_level" />
@@ -167,13 +185,33 @@
<mapper type="glob" from="*.js" to="${min.dir}/i18n/*.min.js" />
</apply>
- <concat destfile="${min.dir}/i18n/${concatenated.i18n}.min.js">
- <fileset dir="${min.dir}/i18n" includes="jquery.ui.*.js" />
- </concat>
-
+ <apply executable="java" parallel="false">
+ <fileset dir="${dist.dir}/themes/base" includes="*.css" />
+ <arg line="-jar" />
+ <arg path="${yuicompressor-jar}" />
+ <arg line="--charset utf-8" />
+ <arg line="-v" />
+ <srcfile />
+ <arg line="-o" />
+ <mapper type="glob" from="*.css" to="${dist.dir}/themes/base/minified/*.min.css" />
+ <targetfile/>
+ </apply>
+
+ <replaceregexp match=".css" replace=".min.css" flags="g">
+ <fileset dir="${dist.dir}/themes/base/minified/">
+ <include name="*.base.min.css"/>
+ <include name="*.all.min.css"/>
+ </fileset>
+ </replaceregexp>
+
+ <!-- make a copy of all theme images to ensure that relative paths in minified css files work -->
+ <copy todir="${dist.dir}/themes/base/minified/images" >
+ <fileset dir="${ui.dir}/themes/base/images" />
+ </copy>
+
<echo message="Minified ui/ built." />
</target>
-
+
<target description="Copy needed folders" name="copy">
<echo message="Copying files" />
<mkdir dir="${dist.dir}" />
@@ -206,10 +244,6 @@
<fileset dir="${ui.dir}/tests/" />
</copy>
- <copy overwrite="true" todir="${dist.dir}/docs/" >
- <fileset dir="${ui.dir}/docs/" />
- </copy>
-
<copy overwrite="true" todir="${dist.dir}/themes/" >
<fileset dir="${ui.dir}/themes/" />
</copy>
@@ -220,7 +254,7 @@
<delete dir="dist" />
</target>
- <target name="docs-download" depends="docs-clean">
+ <target name="docs-download">
<mkdir dir="${docs.dir}" />
<property name="url" value="http://docs.jquery.com/action/render/UI/API/${release.version}/" />
@@ -269,11 +303,42 @@
<get src="http://docs.jquery.com/action/render/UI/Effects/Size" dest="${docs.dir}effect-size.html" />
<get src="http://docs.jquery.com/action/render/UI/Effects/Transfer" dest="${docs.dir}effect-transfer.html" />
</target>
-
- <target name="docs-clean">
- <delete dir="${docs.dir}" />
- </target>
+ <target name="themes-download">
+ <!-- to create/update query strings for the theme-file, execute this in Firebug on /download page:
+ $("select option[value!=none]").map(function() { $(this).parent().val(this.value).change(); return $(this).parents("form").serialize(); }).get().join(",");
+ -->
+ <loadfile srcFile="themes" property="urls" />
+ <property name="zip" value="${dist.dir}themes/tmp.zip" />
+ <mkdir dir="${dist.dir}themes" />
+ <for list="${urls}" param="url">
+ <sequential>
+ <get src="http://ui-dev.jquery.com/download/?@{url}" dest="${zip}" />
+ <unzip src="${zip}"
+ dest="${dist.dir}themes/">
+ <patternset>
+ <include name="development-bundle/themes/**"/>
+ <exclude name="development-bundle/themes/base/**"/>
+ </patternset>
+ <mapper type="glob" from="development-bundle/themes/*" to="*" />
+ </unzip>
+ <delete file="${zip}" />
+ </sequential>
+ </for>
+ <move todir="${dist.dir}themes/">
+ <fileset dir="${dist.dir}themes/" />
+ <mapper>
+ <mapper type="regexp" from="(.*)jquery-ui-.*custom.css" to="\1jquery-ui.css" />
+ </mapper>
+ </move>
+ <copy todir="dist/jquery-ui-themes-${release.version}">
+ <fileset dir="${dist.dir}/" includes="AUTHORS.txt,GPL-LICENSE.txt,MIT-LICENSE.txt,version.txt,themes/**" />
+ </copy>
+ <zip destfile="${dist.dir}/../jquery-ui-themes-${release.version}.zip">
+ <zipfileset dir="dist/" includes="jquery-ui-themes-${release.version}/" />
+ </zip>
+ </target>
+
<target name="whitespace">
<replaceregexp match="[\t ]+$" replace="" flags="g" byline="true">
<fileset dir="${src.dir}" includes="*.js"/>
@@ -282,7 +347,7 @@
<echo message="All trailing spaces removed." />
</target>
- <target name="googlecdn">
+ <target name="cdn">
<delete dir="${cdndist.dir}" />
<mkdir dir="${cdndist.dir}" />
<copy todir="${cdndist.dir}">
@@ -306,7 +371,7 @@
<path><fileset dir="${cdndist.dir}" includes="**/" excludes="**/*.MD5" /></path>
<sequential>
<!-- @{file} is an absolute path, use that ugly regexes to make it relative -->
- <propertyregex override="yes" property="relativepath" input="@{file}" regexp=".+?googlecdn[\\/](.+)$" replace="\1"/>
+ <propertyregex override="yes" property="relativepath" input="@{file}" regexp=".+?cdn[\\/](.+)$" replace="\1"/>
<propertyregex override="yes" property="relativepath" input="${relativepath}" regexp="\\" replace="/" global="true" />
<concat destfile="${cdndist.dir}/MANIFEST" append="yes">${relativepath} </concat>
<concat destfile="${cdndist.dir}/MANIFEST" append="yes"><file file="@{file}.MD5" /></concat>
@@ -314,7 +379,10 @@
</for>
<delete dir="${cdndist.dir}" includes="**/*.MD5" />
<zip destfile="${dist.dir}/../${release.filename}-googlecdn.zip">
- <zipfileset dir="${cdndist.dir}/" />
+ <zipfileset dir="dist/" includes="${release.filename}-cdn/" />
+ </zip>
+ <zip destfile="${dist.dir}/../${release.filename}-mscdn.zip">
+ <zipfileset dir="dist/${release.filename}-cdn/" />
</zip>
</target>
diff --git a/build/build/yuicompressor-2.4.2.jar b/build/build/yuicompressor-2.4.2.jar
new file mode 100644
index 000000000..c29470bd0
--- /dev/null
+++ b/build/build/yuicompressor-2.4.2.jar
Binary files differ
diff --git a/build/release/changelog-shell b/build/release/changelog-shell
new file mode 100644
index 000000000..9e4fbd7e4
--- /dev/null
+++ b/build/release/changelog-shell
@@ -0,0 +1,79 @@
+
+This file contains a shell for the changelog, followed by a list of every commit for this release.
+
+Choose the appropriate line for the Summary section.
+
+Move all commit notes to the appropriate section.
+- Each line should be in the following format:
+ [Fixed|Added]: The ticket description. ([Ticket link], [Commit link])
+- If the commit is not related to a bug or feature, e.g., whitepsace cleanup, remove it.
+- If there is no ticket number, search Trac for the relevant ticket.
+ - If there is no ticket, create one (if needed), or leave just the commit link.
+
+Double check that "XXXX" does not appear anywhere in the changelog.
+
+Post this changelog at: CHANGELOG_URL
+
+
+
+DELETE EVERYTHING ABOVE THE FOLLOWING LINE
+------------------------------------------
+
+= Summary =
+This is the final release of jQuery UI 1.8.
+-- OR --
+This is the second maintenance release for [[UI/Changelog/1.8|jQuery UI 1.8]].
+
+= Build =
+
+= Core &amp; Utilities =
+
+=== UI Core ===
+
+=== Mouse ===
+
+=== Widget Factory ===
+
+=== Position ===
+
+= Interactions =
+
+=== Draggable ===
+
+=== Droppable ===
+
+=== Resizable ===
+
+=== Selectable ===
+
+=== Sortable ===
+
+= Widgets =
+
+=== Accordion ===
+
+=== Autocomplete ===
+
+=== Button ===
+
+=== Datepicker ===
+
+=== Dialog ===
+
+=== Progressbar ===
+
+=== Slider ===
+
+=== Tabs ===
+
+= Effects =
+
+=== Individual effects ===
+
+= CSS Framework =
+
+= Demos =
+
+= Website =
+
+=== Download Builder ===
diff --git a/build/release/prepare-release b/build/release/prepare-release
new file mode 100755
index 000000000..91665e1eb
--- /dev/null
+++ b/build/release/prepare-release
@@ -0,0 +1,336 @@
+#!/bin/sh
+
+base_dir="`pwd`/jquery-ui-release"
+repo_dir="$base_dir/jquery-ui"
+release_dir="$repo_dir/build/release"
+
+github_repo="git@github.com:jquery/jquery-ui.git"
+remote_cmd="ssh jqadmin@ui-dev.jquery.com /srv/dev.jqueryui.com/prepare-release"
+
+
+
+#
+# Setup environment
+#
+
+echo
+echo "--------------------------"
+echo "| SETTING UP ENVIRONMENT |"
+echo "--------------------------"
+echo
+
+mkdir $base_dir
+cd $base_dir
+
+echo "Cloning repo from $github_repo..."
+git clone $github_repo
+cd $repo_dir
+
+echo
+echo "Environment setup complete."
+echo
+
+
+
+#
+# Figure out which versions we're dealing with
+#
+
+echo
+echo "------------------------"
+echo "| CALCULATING VERSIONS |"
+echo "------------------------"
+echo
+
+# NOTE: this will be different for minor and major releases
+version=`$remote_cmd/get-latest-version`
+major_minor=${version%.*}
+point=${version##*.}
+version_new="${major_minor}.$(($point + 1))"
+version_next=`cat version.txt`
+
+echo "We are going from $version to $version_new."
+echo "version.txt will be set to $version_next when complete."
+echo "Press enter to continue, or ctrl+c to cancel."
+read
+
+
+#
+# Generate shell for changelog
+#
+
+echo
+echo "------------------------"
+echo "| GENERATING CHANGELOG |"
+echo "------------------------"
+echo
+
+echo "Creating shell for changelog..."
+changelog_url="http:\/\/docs.jquery.com\/action\/edit\/UI\/Changelog\/$version_new"
+`sed "s/CHANGELOG_URL/$changelog_url/" <$release_dir/changelog-shell >$base_dir/changelog`
+
+
+# find all commits
+echo "Adding commits to changelog..."
+format_ticket='[http://dev.jqueryui.com/ticket/XXXX #XXXX]'
+format_commit='[http://github.com/jquery/jquery-ui/commit/%H %h]'
+format_full="* %s ($format_ticket, $format_commit)"
+git whatchanged $version... --pretty=format:"$format_full" \
+ -- ui themes demos build \
+| sed '/^:/ d' \
+| sed '/^$/ d' \
+| sed 's/\(Fixe[sd] #\)\([0-9][0-9]*\)\(.*\)\(XXXX #XXXX\)/Fixed #\2\3\2 #\2/' \
+| LC_ALL='C' sort -f \
+>> $base_dir/changelog
+
+# find all fixed tickets
+echo "Adding Trac tickets to changelog..."
+$remote_cmd/generate-changelog >> $base_dir/changelog
+
+echo
+echo "Changelog complete."
+echo
+
+
+
+#
+# Generate list of contributors
+#
+
+echo
+echo "--------------------------"
+echo "| GATHERING CONTRIBUTORS |"
+echo "--------------------------"
+echo
+
+
+# find all committers and authors
+echo "Adding commiters and authors..."
+format_contributors='%aN%n%cN'
+git whatchanged $version... --pretty=format:"$format_contributors" \
+| sed '/^:/ d' \
+| sed '/^$/ d' \
+> $base_dir/thankyou
+
+# find all reporters and commenters from Trac
+echo "Adding reporters and commenters from Trac..."
+$remote_cmd/generate-contributors >> $base_dir/thankyou
+
+# sort names
+echo "Sorting contributors..."
+LC_ALL='C' sort -f $base_dir/thankyou | uniq > $base_dir/_thankyou
+mv $base_dir/_thankyou $base_dir/thankyou
+
+# find all people that were thanked
+echo "Adding people thanked in commits..."
+git whatchanged $version... \
+| grep -i thank \
+>> $base_dir/thankyou
+
+echo
+echo "Find contributors from duplicates of fixed tickets and add them to:"
+echo "$base_dir/thankyou"
+echo "Press enter when done."
+read
+
+echo
+echo "Contributors list complete."
+echo
+
+
+
+#
+# Update version
+#
+
+echo
+echo "--------------------"
+echo "| UPDATING VERSION |"
+echo "--------------------"
+echo
+
+echo "Updating version.txt to $version_new..."
+echo $version_new > version.txt
+
+git commit -a -m "Tagging the $version_new release."
+version_new_time=`git log -1 --pretty=format:"%ad"`
+echo "Committed version.txt at $version_new_time..."
+
+echo "Tagging $version_new..."
+git tag $version_new
+
+echo "Updating version.txt to $version_next..."
+echo $version_next > version.txt
+
+git commit -a -m "Updating the master version to $version_next"
+echo "Committed version.txt..."
+
+echo
+echo "Version update complete."
+echo
+
+
+
+#
+# Push to GitHub
+#
+
+echo
+echo "---------------------"
+echo "| PUSHING TO GITHUB |"
+echo "---------------------"
+echo
+
+echo "Please review the output and generated files as a sanity check."
+echo "Press enter to continue or ctrl+c to abort."
+read
+
+git push
+git push --tags
+
+echo
+echo "Push to GitHub complete."
+echo
+
+
+
+#
+# Update Trac
+#
+
+echo
+echo "-----------------"
+echo "| UPDATING TRAC |"
+echo "-----------------"
+echo
+
+# TODO: automate this
+# NOTE: this will be different for minor and major releases
+milestone=`$remote_cmd/get-latest-milestone`
+
+# Create new milestrone and version
+echo "$version_new was tagged at $version_new_time."
+echo "Create and close the $version_new Milestone with the above date and time."
+echo "Create the $version_new Version with the above date and time."
+echo "Press enter when done."
+read
+
+# Update milestone for all fixed tickets
+echo "Change all $milestone fixed tickets to $version_new."
+echo "Press enter when done."
+read
+
+echo
+echo "Trac updates complete."
+echo
+
+
+
+#
+# Build jQuery UI
+#
+
+echo
+echo "----------------------"
+echo "| BUILDING JQUERY UI |"
+echo "----------------------"
+echo
+
+# check out the tagged version
+echo "Checking out $version_new..."
+git checkout $version_new
+cd build
+
+# Update the link to the docs (never contains the patch version)
+echo "Updating URL for API docs..."
+sed "s/UI\/API\/\${release\.version}/UI\/API\/$major_minor/" build.xml >build.xml.tmp
+mv build.xml.tmp build.xml
+
+# Run the build
+echo "Running build..."
+ant
+
+echo
+echo "Build complete."
+echo
+
+
+
+#
+# Upload zip to Google Code
+#
+
+echo
+echo "----------------------"
+echo "| UPDATE GOOGLE CODE |"
+echo "----------------------"
+echo
+
+echo "Upload zip to Google Code."
+echo " http://code.google.com/p/jquery-ui/downloads/entry"
+echo " Summary: jQuery UI $version_new (Source, demos, docs, themes, tests) STABLE"
+echo " Labels: Featured, Type-Source, OpSys-All"
+echo "Modify the previous release to no longer say STABLE at the end."
+echo "Remove the featured label from the previous release."
+echo "Press enter when done."
+read
+
+echo
+echo "Google Code update complete."
+echo
+
+
+
+#
+# Update SVN
+#
+
+echo
+echo "----------------"
+echo "| UPDATING SVN |"
+echo "----------------"
+echo
+
+cd $base_dir
+mkdir svn
+cd svn
+
+echo "Checking out SVN tags..."
+svn co --depth immediates https://jquery-ui.googlecode.com/svn/tags
+cd tags
+
+echo "Unzipping build into tags/$version_new..."
+unzip $repo_dir/build/dist/jquery-ui-$version_new.zip
+mv jquery-ui-$version_new $version_new
+
+echo "Adding files to SVN..."
+svn add $version_new
+
+echo "Setting svn:mime-type..."
+find $version_new -name \*.js -exec svn propset svn:mime-type text/javascript {} \;
+find $version_new -name \*.css -exec svn propset svn:mime-type text/css {} \;
+find $version_new -name \*.html -exec svn propset svn:mime-type text/html {} \;
+find $version_new -name \*.png -exec svn propset svn:mime-type image/png {} \;
+find $version_new -name \*.gif -exec svn propset svn:mime-type image/gif {} \;
+
+# TODO: commit
+echo
+echo "svn commit with the following message:"
+echo "Created $version_new tag from http://jquery-ui.googlecode.com/files/jquery-ui-$version_new.zip"
+echo "Press enter when done."
+read
+
+echo
+echo "SVN update complete."
+echo
+
+
+
+#
+# Generate themes
+#
+
+
+
+
+# ruby -e 'puts File.read("thankyou").split("\n").join(", ")' > thankyou2
diff --git a/build/themes b/build/themes
new file mode 100644
index 000000000..ec9ac1f2b
--- /dev/null
+++ b/build/themes
@@ -0,0 +1 @@
+download=true&files%5B%5D=ui.core.js&files%5B%5D=ui.widget.js&files%5B%5D=ui.mouse.js&files%5B%5D=ui.position.js&files%5B%5D=ui.draggable.js&files%5B%5D=ui.droppable.js&files%5B%5D=ui.resizable.js&files%5B%5D=ui.selectable.js&files%5B%5D=ui.sortable.js&files%5B%5D=ui.accordion.js&files%5B%5D=ui.autocomplete.js&files%5B%5D=ui.button.js&files%5B%5D=ui.dialog.js&files%5B%5D=ui.slider.js&files%5B%5D=ui.tabs.js&files%5B%5D=ui.datepicker.js&files%5B%5D=ui.progressbar.js&files%5B%5D=effects.core.js&files%5B%5D=effects.blind.js&files%5B%5D=effects.bounce.js&files%5B%5D=effects.clip.js&files%5B%5D=effects.drop.js&files%5B%5D=effects.explode.js&files%5B%5D=effects.fold.js&files%5B%5D=effects.highlight.js&files%5B%5D=effects.pulsate.js&files%5B%5D=effects.scale.js&files%5B%5D=effects.shake.js&files%5B%5D=effects.slide.js&files%5B%5D=effects.transfer.js&theme=%3FffDefault%3DTrebuchet%2BMS%2C%2BTahoma%2C%2BVerdana%2C%2BArial%2C%2Bsans-serif%26fwDefault%3Dbold%26fsDefault%3D1.1em%26cornerRadius%3D4px%26bgColorHeader%3Df6a828%26bgTextureHeader%3D12_gloss_wave.png%26bgImgOpacityHeader%3D35%26borderColorHeader%3De78f08%26fcHeader%3Dffffff%26iconColorHeader%3Dffffff%26bgColorContent%3Deeeeee%26bgTextureContent%3D03_highlight_soft.png%26bgImgOpacityContent%3D100%26borderColorContent%3Ddddddd%26fcContent%3D333333%26iconColorContent%3D222222%26bgColorDefault%3Df6f6f6%26bgTextureDefault%3D02_glass.png%26bgImgOpacityDefault%3D100%26borderColorDefault%3Dcccccc%26fcDefault%3D1c94c4%26iconColorDefault%3Def8c08%26bgColorHover%3Dfdf5ce%26bgTextureHover%3D02_glass.png%26bgImgOpacityHover%3D100%26borderColorHover%3Dfbcb09%26fcHover%3Dc77405%26iconColorHover%3Def8c08%26bgColorActive%3Dffffff%26bgTextureActive%3D02_glass.png%26bgImgOpacityActive%3D65%26borderColorActive%3Dfbd850%26fcActive%3Deb8f00%26iconColorActive%3Def8c08%26bgColorHighlight%3Dffe45c%26bgTextureHighlight%3D03_highlight_soft.png%26bgImgOpacityHighlight%3D75%26borderColorHighlight%3Dfed22f%26fcHighlight%3D363636%26iconColorHighlight%3D228ef1%26bgColorError%3Db81900%26bgTextureError%3D08_diagonals_thick.png%26bgImgOpacityError%3D18%26borderColorError%3Dcd0a0a%26fcError%3Dffffff%26iconColorError%3Dffd27a%26bgColorOverlay%3D666666%26bgTextureOverlay%3D08_diagonals_thick.png%26bgImgOpacityOverlay%3D20%26opacityOverlay%3D50%26bgColorShadow%3D000000%26bgTextureShadow%3D01_flat.png%26bgImgOpacityShadow%3D10%26opacityShadow%3D20%26thicknessShadow%3D5px%26offsetTopShadow%3D-5px%26offsetLeftShadow%3D-5px%26cornerRadiusShadow%3D5px&scope=&t-name=ui-lightness&ui-version=1.8.2,download=true&files%5B%5D=ui.core.js&files%5B%5D=ui.widget.js&files%5B%5D=ui.mouse.js&files%5B%5D=ui.position.js&files%5B%5D=ui.draggable.js&files%5B%5D=ui.droppable.js&files%5B%5D=ui.resizable.js&files%5B%5D=ui.selectable.js&files%5B%5D=ui.sortable.js&files%5B%5D=ui.accordion.js&files%5B%5D=ui.autocomplete.js&files%5B%5D=ui.button.js&files%5B%5D=ui.dialog.js&files%5B%5D=ui.slider.js&files%5B%5D=ui.tabs.js&files%5B%5D=ui.datepicker.js&files%5B%5D=ui.progressbar.js&files%5B%5D=effects.core.js&files%5B%5D=effects.blind.js&files%5B%5D=effects.bounce.js&files%5B%5D=effects.clip.js&files%5B%5D=effects.drop.js&files%5B%5D=effects.explode.js&files%5B%5D=effects.fold.js&files%5B%5D=effects.highlight.js&files%5B%5D=effects.pulsate.js&files%5B%5D=effects.scale.js&files%5B%5D=effects.shake.js&files%5B%5D=effects.slide.js&files%5B%5D=effects.transfer.js&theme=%3FffDefault%3DSegoe%2BUI%252C%2BArial%252C%2Bsans-serif%26fwDefault%3Dbold%26fsDefault%3D1.1em%26cornerRadius%3D6px%26bgColorHeader%3D333333%26bgTextureHeader%3D12_gloss_wave.png%26bgImgOpacityHeader%3D25%26borderColorHeader%3D333333%26fcHeader%3Dffffff%26iconColorHeader%3Dffffff%26bgColorContent%3D000000%26bgTextureContent%3D05_inset_soft.png%26bgImgOpacityContent%3D25%26borderColorContent%3D666666%26fcContent%3Dffffff%26iconColorContent%3Dcccccc%26bgColorDefault%3D555555%26bgTextureDefault%3D02_glass.png%26bgImgOpacityDefault%3D20%26borderColorDefault%3D666666%26fcDefault%3Deeeeee%26iconColorDefault%3Dcccccc%26bgColorHover%3D0078a3%26bgTextureHover%3D02_glass.png%26bgImgOpacityHover%3D40%26borderColorHover%3D59b4d4%26fcHover%3Dffffff%26iconColorHover%3Dffffff%26bgColorActive%3Df58400%26bgTextureActive%3D05_inset_soft.png%26bgImgOpacityActive%3D30%26borderColorActive%3Dffaf0f%26fcActive%3Dffffff%26iconColorActive%3D222222%26bgColorHighlight%3Deeeeee%26bgTextureHighlight%3D03_highlight_soft.png%26bgImgOpacityHighlight%3D80%26borderColorHighlight%3Dcccccc%26fcHighlight%3D2e7db2%26iconColorHighlight%3D4b8e0b%26bgColorError%3Dffc73d%26bgTextureError%3D02_glass.png%26bgImgOpacityError%3D40%26borderColorError%3Dffb73d%26fcError%3D111111%26iconColorError%3Da83300%26bgColorOverlay%3D5c5c5c%26bgTextureOverlay%3D01_flat.png%26bgImgOpacityOverlay%3D50%26opacityOverlay%3D80%26bgColorShadow%3Dcccccc%26bgTextureShadow%3D01_flat.png%26bgImgOpacityShadow%3D30%26opacityShadow%3D60%26thicknessShadow%3D7px%26offsetTopShadow%3D-7px%26offsetLeftShadow%3D-7px%26cornerRadiusShadow%3D8px&scope=&t-name=ui-darkness&ui-version=1.8.2,download=true&files%5B%5D=ui.core.js&files%5B%5D=ui.widget.js&files%5B%5D=ui.mouse.js&files%5B%5D=ui.position.js&files%5B%5D=ui.draggable.js&files%5B%5D=ui.droppable.js&files%5B%5D=ui.resizable.js&files%5B%5D=ui.selectable.js&files%5B%5D=ui.sortable.js&files%5B%5D=ui.accordion.js&files%5B%5D=ui.autocomplete.js&files%5B%5D=ui.button.js&files%5B%5D=ui.dialog.js&files%5B%5D=ui.slider.js&files%5B%5D=ui.tabs.js&files%5B%5D=ui.datepicker.js&files%5B%5D=ui.progressbar.js&files%5B%5D=effects.core.js&files%5B%5D=effects.blind.js&files%5B%5D=effects.bounce.js&files%5B%5D=effects.clip.js&files%5B%5D=effects.drop.js&files%5B%5D=effects.explode.js&files%5B%5D=effects.fold.js&files%5B%5D=effects.highlight.js&files%5B%5D=effects.pulsate.js&files%5B%5D=effects.scale.js&files%5B%5D=effects.shake.js&files%5B%5D=effects.slide.js&files%5B%5D=effects.transfer.js&theme=%3FffDefault%3DVerdana%2CArial%2Csans-serif%26fwDefault%3Dnormal%26fsDefault%3D1.1em%26cornerRadius%3D4px%26bgColorHeader%3Dcccccc%26bgTextureHeader%3D03_highlight_soft.png%26bgImgOpacityHeader%3D75%26borderColorHeader%3Daaaaaa%26fcHeader%3D222222%26iconColorHeader%3D222222%26bgColorContent%3Dffffff%26bgTextureContent%3D01_flat.png%26bgImgOpacityContent%3D75%26borderColorContent%3Daaaaaa%26fcContent%3D222222%26iconColorContent%3D222222%26bgColorDefault%3De6e6e6%26bgTextureDefault%3D02_glass.png%26bgImgOpacityDefault%3D75%26borderColorDefault%3Dd3d3d3%26fcDefault%3D555555%26iconColorDefault%3D888888%26bgColorHover%3Ddadada%26bgTextureHover%3D02_glass.png%26bgImgOpacityHover%3D75%26borderColorHover%3D999999%26fcHover%3D212121%26iconColorHover%3D454545%26bgColorActive%3Dffffff%26bgTextureActive%3D02_glass.png%26bgImgOpacityActive%3D65%26borderColorActive%3Daaaaaa%26fcActive%3D212121%26iconColorActive%3D454545%26bgColorHighlight%3Dfbf9ee%26bgTextureHighlight%3D02_glass.png%26bgImgOpacityHighlight%3D55%26borderColorHighlight%3Dfcefa1%26fcHighlight%3D363636%26iconColorHighlight%3D2e83ff%26bgColorError%3Dfef1ec%26bgTextureError%3D02_glass.png%26bgImgOpacityError%3D95%26borderColorError%3Dcd0a0a%26fcError%3Dcd0a0a%26iconColorError%3Dcd0a0a%26bgColorOverlay%3Daaaaaa%26bgTextureOverlay%3D01_flat.png%26bgImgOpacityOverlay%3D0%26opacityOverlay%3D30%26bgColorShadow%3Daaaaaa%26bgTextureShadow%3D01_flat.png%26bgImgOpacityShadow%3D0%26opacityShadow%3D30%26thicknessShadow%3D8px%26offsetTopShadow%3D-8px%26offsetLeftShadow%3D-8px%26cornerRadiusShadow%3D8px&scope=&t-name=smoothness&ui-version=1.8.2,download=true&files%5B%5D=ui.core.js&files%5B%5D=ui.widget.js&files%5B%5D=ui.mouse.js&files%5B%5D=ui.position.js&files%5B%5D=ui.draggable.js&files%5B%5D=ui.droppable.js&files%5B%5D=ui.resizable.js&files%5B%5D=ui.selectable.js&files%5B%5D=ui.sortable.js&files%5B%5D=ui.accordion.js&files%5B%5D=ui.autocomplete.js&files%5B%5D=ui.button.js&files%5B%5D=ui.dialog.js&files%5B%5D=ui.slider.js&files%5B%5D=ui.tabs.js&files%5B%5D=ui.datepicker.js&files%5B%5D=ui.progressbar.js&files%5B%5D=effects.core.js&files%5B%5D=effects.blind.js&files%5B%5D=effects.bounce.js&files%5B%5D=effects.clip.js&files%5B%5D=effects.drop.js&files%5B%5D=effects.explode.js&files%5B%5D=effects.fold.js&files%5B%5D=effects.highlight.js&files%5B%5D=effects.pulsate.js&files%5B%5D=effects.scale.js&files%5B%5D=effects.shake.js&files%5B%5D=effects.slide.js&files%5B%5D=effects.transfer.js&theme=%3FffDefault%3DVerdana%252CArial%252Csans-serif%26fwDefault%3Dnormal%26fsDefault%3D1.1em%26cornerRadius%3D5px%26bgColorHeader%3D2191c0%26bgTextureHeader%3D12_gloss_wave.png%26bgImgOpacityHeader%3D75%26borderColorHeader%3D4297d7%26fcHeader%3Deaf5f7%26iconColorHeader%3Dd8e7f3%26bgColorContent%3Dfcfdfd%26bgTextureContent%3D06_inset_hard.png%26bgImgOpacityContent%3D100%26borderColorContent%3Da6c9e2%26fcContent%3D222222%26iconColorContent%3D0078ae%26bgColorDefault%3D0078ae%26bgTextureDefault%3D02_glass.png%26bgImgOpacityDefault%3D45%26borderColorDefault%3D77d5f7%26fcDefault%3Dffffff%26iconColorDefault%3De0fdff%26bgColorHover%3D79c9ec%26bgTextureHover%3D02_glass.png%26bgImgOpacityHover%3D75%26borderColorHover%3D448dae%26fcHover%3D026890%26iconColorHover%3D056b93%26bgColorActive%3D6eac2c%26bgTextureActive%3D12_gloss_wave.png%26bgImgOpacityActive%3D50%26borderColorActive%3Dacdd4a%26fcActive%3Dffffff%26iconColorActive%3Df5e175%26bgColorHighlight%3Df8da4e%26bgTextureHighlight%3D02_glass.png%26bgImgOpacityHighlight%3D55%26borderColorHighlight%3Dfcd113%26fcHighlight%3D915608%26iconColorHighlight%3Df7a50d%26bgColorError%3De14f1c%26bgTextureError%3D12_gloss_wave.png%26bgImgOpacityError%3D45%26borderColorError%3Dcd0a0a%26fcError%3Dffffff%26iconColorError%3Dfcd113%26bgColorOverlay%3Daaaaaa%26bgTextureOverlay%3D01_flat.png%26bgImgOpacityOverlay%3D75%26opacityOverlay%3D30%26bgColorShadow%3D999999%26bgTextureShadow%3D01_flat.png%26bgImgOpacityShadow%3D55%26opacityShadow%3D45%26thicknessShadow%3D0px%26offsetTopShadow%3D5px%26offsetLeftShadow%3D5px%26cornerRadiusShadow%3D5px&scope=&t-name=start&ui-version=1.8.2,download=true&files%5B%5D=ui.core.js&files%5B%5D=ui.widget.js&files%5B%5D=ui.mouse.js&files%5B%5D=ui.position.js&files%5B%5D=ui.draggable.js&files%5B%5D=ui.droppable.js&files%5B%5D=ui.resizable.js&files%5B%5D=ui.selectable.js&files%5B%5D=ui.sortable.js&files%5B%5D=ui.accordion.js&files%5B%5D=ui.autocomplete.js&files%5B%5D=ui.button.js&files%5B%5D=ui.dialog.js&files%5B%5D=ui.slider.js&files%5B%5D=ui.tabs.js&files%5B%5D=ui.datepicker.js&files%5B%5D=ui.progressbar.js&files%5B%5D=effects.core.js&files%5B%5D=effects.blind.js&files%5B%5D=effects.bounce.js&files%5B%5D=effects.clip.js&files%5B%5D=effects.drop.js&files%5B%5D=effects.explode.js&files%5B%5D=effects.fold.js&files%5B%5D=effects.highlight.js&files%5B%5D=effects.pulsate.js&files%5B%5D=effects.scale.js&files%5B%5D=effects.shake.js&files%5B%5D=effects.slide.js&files%5B%5D=effects.transfer.js&theme=%3FffDefault%3DLucida%2BGrande%2C%2BLucida%2BSans%2C%2BArial%2C%2Bsans-serif%26fwDefault%3Dbold%26fsDefault%3D1.1em%26cornerRadius%3D5px%26bgColorHeader%3D5c9ccc%26bgTextureHeader%3D12_gloss_wave.png%26bgImgOpacityHeader%3D55%26borderColorHeader%3D4297d7%26fcHeader%3Dffffff%26iconColorHeader%3Dd8e7f3%26bgColorContent%3Dfcfdfd%26bgTextureContent%3D06_inset_hard.png%26bgImgOpacityContent%3D100%26borderColorContent%3Da6c9e2%26fcContent%3D222222%26iconColorContent%3D469bdd%26bgColorDefault%3Ddfeffc%26bgTextureDefault%3D02_glass.png%26bgImgOpacityDefault%3D85%26borderColorDefault%3Dc5dbec%26fcDefault%3D2e6e9e%26iconColorDefault%3D6da8d5%26bgColorHover%3Dd0e5f5%26bgTextureHover%3D02_glass.png%26bgImgOpacityHover%3D75%26borderColorHover%3D79b7e7%26fcHover%3D1d5987%26iconColorHover%3D217bc0%26bgColorActive%3Df5f8f9%26bgTextureActive%3D06_inset_hard.png%26bgImgOpacityActive%3D100%26borderColorActive%3D79b7e7%26fcActive%3De17009%26iconColorActive%3Df9bd01%26bgColorHighlight%3Dfbec88%26bgTextureHighlight%3D01_flat.png%26bgImgOpacityHighlight%3D55%26borderColorHighlight%3Dfad42e%26fcHighlight%3D363636%26iconColorHighlight%3D2e83ff%26bgColorError%3Dfef1ec%26bgTextureError%3D02_glass.png%26bgImgOpacityError%3D95%26borderColorError%3Dcd0a0a%26fcError%3Dcd0a0a%26iconColorError%3Dcd0a0a%26bgColorOverlay%3Daaaaaa%26bgTextureOverlay%3D01_flat.png%26bgImgOpacityOverlay%3D0%26opacityOverlay%3D30%26bgColorShadow%3Daaaaaa%26bgTextureShadow%3D01_flat.png%26bgImgOpacityShadow%3D0%26opacityShadow%3D30%26thicknessShadow%3D8px%26offsetTopShadow%3D-8px%26offsetLeftShadow%3D-8px%26cornerRadiusShadow%3D8px&scope=&t-name=redmond&ui-version=1.8.2,download=true&files%5B%5D=ui.core.js&files%5B%5D=ui.widget.js&files%5B%5D=ui.mouse.js&files%5B%5D=ui.position.js&files%5B%5D=ui.draggable.js&files%5B%5D=ui.droppable.js&files%5B%5D=ui.resizable.js&files%5B%5D=ui.selectable.js&files%5B%5D=ui.sortable.js&files%5B%5D=ui.accordion.js&files%5B%5D=ui.autocomplete.js&files%5B%5D=ui.button.js&files%5B%5D=ui.dialog.js&files%5B%5D=ui.slider.js&files%5B%5D=ui.tabs.js&files%5B%5D=ui.datepicker.js&files%5B%5D=ui.progressbar.js&files%5B%5D=effects.core.js&files%5B%5D=effects.blind.js&files%5B%5D=effects.bounce.js&files%5B%5D=effects.clip.js&files%5B%5D=effects.drop.js&files%5B%5D=effects.explode.js&files%5B%5D=effects.fold.js&files%5B%5D=effects.highlight.js&files%5B%5D=effects.pulsate.js&files%5B%5D=effects.scale.js&files%5B%5D=effects.shake.js&files%5B%5D=effects.slide.js&files%5B%5D=effects.transfer.js&theme=%3FffDefault%3DSegoe%2BUI%252C%2BArial%252C%2Bsans-serif%26fwDefault%3Dbold%26fsDefault%3D1.1em%26cornerRadius%3D8px%26bgColorHeader%3D817865%26bgTextureHeader%3D12_gloss_wave.png%26bgImgOpacityHeader%3D45%26borderColorHeader%3D494437%26fcHeader%3Dffffff%26iconColorHeader%3Dfadc7a%26bgColorContent%3Dfeeebd%26bgTextureContent%3D03_highlight_soft.png%26bgImgOpacityContent%3D100%26borderColorContent%3D8e846b%26fcContent%3D383838%26iconColorContent%3Dd19405%26bgColorDefault%3Dfece2f%26bgTextureDefault%3D12_gloss_wave.png%26bgImgOpacityDefault%3D60%26borderColorDefault%3Dd19405%26fcDefault%3D4c3000%26iconColorDefault%3D3d3d3d%26bgColorHover%3Dffdd57%26bgTextureHover%3D12_gloss_wave.png%26bgImgOpacityHover%3D70%26borderColorHover%3Da45b13%26fcHover%3D381f00%26iconColorHover%3Dbd7b00%26bgColorActive%3Dffffff%26bgTextureActive%3D05_inset_soft.png%26bgImgOpacityActive%3D30%26borderColorActive%3D655e4e%26fcActive%3D0074c7%26iconColorActive%3Deb990f%26bgColorHighlight%3Dfff9e5%26bgTextureHighlight%3D12_gloss_wave.png%26bgImgOpacityHighlight%3D90%26borderColorHighlight%3Deeb420%26fcHighlight%3D1f1f1f%26iconColorHighlight%3Ded9f26%26bgColorError%3Dd34d17%26bgTextureError%3D07_diagonals_medium.png%26bgImgOpacityError%3D20%26borderColorError%3Dffb73d%26fcError%3Dffffff%26iconColorError%3Dffe180%26bgColorOverlay%3D5c5c5c%26bgTextureOverlay%3D01_flat.png%26bgImgOpacityOverlay%3D50%26opacityOverlay%3D80%26bgColorShadow%3Dcccccc%26bgTextureShadow%3D01_flat.png%26bgImgOpacityShadow%3D30%26opacityShadow%3D60%26thicknessShadow%3D7px%26offsetTopShadow%3D-7px%26offsetLeftShadow%3D-7px%26cornerRadiusShadow%3D8px&scope=&t-name=sunny&ui-version=1.8.2,download=true&files%5B%5D=ui.core.js&files%5B%5D=ui.widget.js&files%5B%5D=ui.mouse.js&files%5B%5D=ui.position.js&files%5B%5D=ui.draggable.js&files%5B%5D=ui.droppable.js&files%5B%5D=ui.resizable.js&files%5B%5D=ui.selectable.js&files%5B%5D=ui.sortable.js&files%5B%5D=ui.accordion.js&files%5B%5D=ui.autocomplete.js&files%5B%5D=ui.button.js&files%5B%5D=ui.dialog.js&files%5B%5D=ui.slider.js&files%5B%5D=ui.tabs.js&files%5B%5D=ui.datepicker.js&files%5B%5D=ui.progressbar.js&files%5B%5D=effects.core.js&files%5B%5D=effects.blind.js&files%5B%5D=effects.bounce.js&files%5B%5D=effects.clip.js&files%5B%5D=effects.drop.js&files%5B%5D=effects.explode.js&files%5B%5D=effects.fold.js&files%5B%5D=effects.highlight.js&files%5B%5D=effects.pulsate.js&files%5B%5D=effects.scale.js&files%5B%5D=effects.shake.js&files%5B%5D=effects.slide.js&files%5B%5D=effects.transfer.js&theme=%3FffDefault%3DTrebuchet%2BMS%252C%2BHelvetica%252C%2BArial%252C%2Bsans-serif%26fwDefault%3Dbold%26fsDefault%3D1.1em%26cornerRadius%3D6px%26bgColorHeader%3Ddddddd%26bgTextureHeader%3D02_glass.png%26bgImgOpacityHeader%3D35%26borderColorHeader%3Dbbbbbb%26fcHeader%3D444444%26iconColorHeader%3D999999%26bgColorContent%3Dc9c9c9%26bgTextureContent%3D05_inset_soft.png%26bgImgOpacityContent%3D50%26borderColorContent%3Daaaaaa%26fcContent%3D333333%26iconColorContent%3D999999%26bgColorDefault%3Deeeeee%26bgTextureDefault%3D02_glass.png%26bgImgOpacityDefault%3D60%26borderColorDefault%3Dcccccc%26fcDefault%3D3383bb%26iconColorDefault%3D70b2e1%26bgColorHover%3Df8f8f8%26bgTextureHover%3D02_glass.png%26bgImgOpacityHover%3D100%26borderColorHover%3Dbbbbbb%26fcHover%3D599fcf%26iconColorHover%3D3383bb%26bgColorActive%3D999999%26bgTextureActive%3D06_inset_hard.png%26bgImgOpacityActive%3D75%26borderColorActive%3D999999%26fcActive%3Dffffff%26iconColorActive%3D454545%26bgColorHighlight%3Deeeeee%26bgTextureHighlight%3D01_flat.png%26bgImgOpacityHighlight%3D55%26borderColorHighlight%3Dffffff%26fcHighlight%3D444444%26iconColorHighlight%3D3383bb%26bgColorError%3Dc0402a%26bgTextureError%3D01_flat.png%26bgImgOpacityError%3D55%26borderColorError%3Dc0402a%26fcError%3Dffffff%26iconColorError%3Dfbc856%26bgColorOverlay%3Deeeeee%26bgTextureOverlay%3D01_flat.png%26bgImgOpacityOverlay%3D0%26opacityOverlay%3D80%26bgColorShadow%3Daaaaaa%26bgTextureShadow%3D01_flat.png%26bgImgOpacityShadow%3D0%26opacityShadow%3D60%26thicknessShadow%3D4px%26offsetTopShadow%3D-4px%26offsetLeftShadow%3D-4px%26cornerRadiusShadow%3D0pxdow%253D0px&scope=&t-name=overcast&ui-version=1.8.2,download=true&files%5B%5D=ui.core.js&files%5B%5D=ui.widget.js&files%5B%5D=ui.mouse.js&files%5B%5D=ui.position.js&files%5B%5D=ui.draggable.js&files%5B%5D=ui.droppable.js&files%5B%5D=ui.resizable.js&files%5B%5D=ui.selectable.js&files%5B%5D=ui.sortable.js&files%5B%5D=ui.accordion.js&files%5B%5D=ui.autocomplete.js&files%5B%5D=ui.button.js&files%5B%5D=ui.dialog.js&files%5B%5D=ui.slider.js&files%5B%5D=ui.tabs.js&files%5B%5D=ui.datepicker.js&files%5B%5D=ui.progressbar.js&files%5B%5D=effects.core.js&files%5B%5D=effects.blind.js&files%5B%5D=effects.bounce.js&files%5B%5D=effects.clip.js&files%5B%5D=effects.drop.js&files%5B%5D=effects.explode.js&files%5B%5D=effects.fold.js&files%5B%5D=effects.highlight.js&files%5B%5D=effects.pulsate.js&files%5B%5D=effects.scale.js&files%5B%5D=effects.shake.js&files%5B%5D=effects.slide.js&files%5B%5D=effects.transfer.js&theme=%3FffDefault%3DLucida%2BGrande%252C%2BLucida%2BSans%252C%2BArial%252C%2Bsans-serif%26fwDefault%3Dnormal%26fsDefault%3D1.1em%26cornerRadius%3D10px%26bgColorHeader%3D3a8104%26bgTextureHeader%3D03_highlight_soft.png%26bgImgOpacityHeader%3D33%26borderColorHeader%3D3f7506%26fcHeader%3Dffffff%26iconColorHeader%3Dffffff%26bgColorContent%3D285c00%26bgTextureContent%3D05_inset_soft.png%26bgImgOpacityContent%3D10%26borderColorContent%3D72b42d%26fcContent%3Dffffff%26iconColorContent%3D72b42d%26bgColorDefault%3D4ca20b%26bgTextureDefault%3D03_highlight_soft.png%26bgImgOpacityDefault%3D60%26borderColorDefault%3D45930b%26fcDefault%3Dffffff%26iconColorDefault%3Dffffff%26bgColorHover%3D4eb305%26bgTextureHover%3D03_highlight_soft.png%26bgImgOpacityHover%3D50%26borderColorHover%3D8bd83b%26fcHover%3Dffffff%26iconColorHover%3Dffffff%26bgColorActive%3D285c00%26bgTextureActive%3D04_highlight_hard.png%26bgImgOpacityActive%3D30%26borderColorActive%3D72b42d%26fcActive%3Dffffff%26iconColorActive%3Dffffff%26bgColorHighlight%3Dfbf5d0%26bgTextureHighlight%3D02_glass.png%26bgImgOpacityHighlight%3D55%26borderColorHighlight%3Df9dd34%26fcHighlight%3D363636%26iconColorHighlight%3D4eb305%26bgColorError%3Dffdc2e%26bgTextureError%3D08_diagonals_thick.png%26bgImgOpacityError%3D95%26borderColorError%3Dfad000%26fcError%3D2b2b2b%26iconColorError%3Dcd0a0a%26bgColorOverlay%3D444444%26bgTextureOverlay%3D08_diagonals_thick.png%26bgImgOpacityOverlay%3D15%26opacityOverlay%3D30%26bgColorShadow%3Daaaaaa%26bgTextureShadow%3D07_diagonals_small.png%26bgImgOpacityShadow%3D0%26opacityShadow%3D30%26thicknessShadow%3D0px%26offsetTopShadow%3D4px%26offsetLeftShadow%3D4px%26cornerRadiusShadow%3D4px&scope=&t-name=le-frog&ui-version=1.8.2,download=true&files%5B%5D=ui.core.js&files%5B%5D=ui.widget.js&files%5B%5D=ui.mouse.js&files%5B%5D=ui.position.js&files%5B%5D=ui.draggable.js&files%5B%5D=ui.droppable.js&files%5B%5D=ui.resizable.js&files%5B%5D=ui.selectable.js&files%5B%5D=ui.sortable.js&files%5B%5D=ui.accordion.js&files%5B%5D=ui.autocomplete.js&files%5B%5D=ui.button.js&files%5B%5D=ui.dialog.js&files%5B%5D=ui.slider.js&files%5B%5D=ui.tabs.js&files%5B%5D=ui.datepicker.js&files%5B%5D=ui.progressbar.js&files%5B%5D=effects.core.js&files%5B%5D=effects.blind.js&files%5B%5D=effects.bounce.js&files%5B%5D=effects.clip.js&files%5B%5D=effects.drop.js&files%5B%5D=effects.explode.js&files%5B%5D=effects.fold.js&files%5B%5D=effects.highlight.js&files%5B%5D=effects.pulsate.js&files%5B%5D=effects.scale.js&files%5B%5D=effects.shake.js&files%5B%5D=effects.slide.js&files%5B%5D=effects.transfer.js&theme=%3FffDefault%3DHelvetica%252C%2BArial%252C%2Bsans-serif%26fwDefault%3Dbold%26fsDefault%3D1.1em%26cornerRadius%3D2px%26bgColorHeader%3Ddddddd%26bgTextureHeader%3D03_highlight_soft.png%26bgImgOpacityHeader%3D50%26borderColorHeader%3Ddddddd%26fcHeader%3D444444%26iconColorHeader%3D0073ea%26bgColorContent%3Dffffff%26bgTextureContent%3D01_flat.png%26bgImgOpacityContent%3D75%26borderColorContent%3Ddddddd%26fcContent%3D444444%26iconColorContent%3Dff0084%26bgColorDefault%3Df6f6f6%26bgTextureDefault%3D03_highlight_soft.png%26bgImgOpacityDefault%3D100%26borderColorDefault%3Ddddddd%26fcDefault%3D0073ea%26iconColorDefault%3D666666%26bgColorHover%3D0073ea%26bgTextureHover%3D03_highlight_soft.png%26bgImgOpacityHover%3D25%26borderColorHover%3D0073ea%26fcHover%3Dffffff%26iconColorHover%3Dffffff%26bgColorActive%3Dffffff%26bgTextureActive%3D02_glass.png%26bgImgOpacityActive%3D65%26borderColorActive%3Ddddddd%26fcActive%3Dff0084%26iconColorActive%3D454545%26bgColorHighlight%3Dffffff%26bgTextureHighlight%3D01_flat.png%26bgImgOpacityHighlight%3D55%26borderColorHighlight%3Dcccccc%26fcHighlight%3D444444%26iconColorHighlight%3D0073ea%26bgColorError%3Dffffff%26bgTextureError%3D01_flat.png%26bgImgOpacityError%3D55%26borderColorError%3Dff0084%26fcError%3D222222%26iconColorError%3Dff0084%26bgColorOverlay%3Deeeeee%26bgTextureOverlay%3D01_flat.png%26bgImgOpacityOverlay%3D0%26opacityOverlay%3D80%26bgColorShadow%3Daaaaaa%26bgTextureShadow%3D01_flat.png%26bgImgOpacityShadow%3D0%26opacityShadow%3D60%26thicknessShadow%3D4px%26offsetTopShadow%3D-4px%26offsetLeftShadow%3D-4px%26cornerRadiusShadow%3D0px&scope=&t-name=flick&ui-version=1.8.2,download=true&files%5B%5D=ui.core.js&files%5B%5D=ui.widget.js&files%5B%5D=ui.mouse.js&files%5B%5D=ui.position.js&files%5B%5D=ui.draggable.js&files%5B%5D=ui.droppable.js&files%5B%5D=ui.resizable.js&files%5B%5D=ui.selectable.js&files%5B%5D=ui.sortable.js&files%5B%5D=ui.accordion.js&files%5B%5D=ui.autocomplete.js&files%5B%5D=ui.button.js&files%5B%5D=ui.dialog.js&files%5B%5D=ui.slider.js&files%5B%5D=ui.tabs.js&files%5B%5D=ui.datepicker.js&files%5B%5D=ui.progressbar.js&files%5B%5D=effects.core.js&files%5B%5D=effects.blind.js&files%5B%5D=effects.bounce.js&files%5B%5D=effects.clip.js&files%5B%5D=effects.drop.js&files%5B%5D=effects.explode.js&files%5B%5D=effects.fold.js&files%5B%5D=effects.highlight.js&files%5B%5D=effects.pulsate.js&files%5B%5D=effects.scale.js&files%5B%5D=effects.shake.js&files%5B%5D=effects.slide.js&files%5B%5D=effects.transfer.js&theme=%3FffDefault%3DTrebuchet%2BMS%252C%2BTahoma%252C%2BVerdana%252C%2BArial%252C%2Bsans-serif%26fwDefault%3Dbold%26fsDefault%3D1.1em%26cornerRadius%3D6px%26bgColorHeader%3Dffffff%26bgTextureHeader%3D23_fine_grain.png%26bgImgOpacityHeader%3D15%26borderColorHeader%3Dd4d1bf%26fcHeader%3D453821%26iconColorHeader%3Db83400%26bgColorContent%3Deceadf%26bgTextureContent%3D23_fine_grain.png%26bgImgOpacityContent%3D10%26borderColorContent%3Dd9d6c4%26fcContent%3D1f1f1f%26iconColorContent%3D222222%26bgColorDefault%3Df8f7f6%26bgTextureDefault%3D23_fine_grain.png%26bgImgOpacityDefault%3D10%26borderColorDefault%3Dcbc7bd%26fcDefault%3D654b24%26iconColorDefault%3Db83400%26bgColorHover%3D654b24%26bgTextureHover%3D23_fine_grain.png%26bgImgOpacityHover%3D65%26borderColorHover%3D654b24%26fcHover%3Dffffff%26iconColorHover%3Dffffff%26bgColorActive%3Deceadf%26bgTextureActive%3D23_fine_grain.png%26bgImgOpacityActive%3D15%26borderColorActive%3Dd9d6c4%26fcActive%3D140f06%26iconColorActive%3D8c291d%26bgColorHighlight%3Df7f3de%26bgTextureHighlight%3D23_fine_grain.png%26bgImgOpacityHighlight%3D15%26borderColorHighlight%3Db2a266%26fcHighlight%3D3a3427%26iconColorHighlight%3D3572ac%26bgColorError%3Db83400%26bgTextureError%3D23_fine_grain.png%26bgImgOpacityError%3D68%26borderColorError%3D681818%26fcError%3Dffffff%26iconColorError%3Dfbdb93%26bgColorOverlay%3D6e4f1c%26bgTextureOverlay%3D16_diagonal_maze.png%26bgImgOpacityOverlay%3D20%26opacityOverlay%3D60%26bgColorShadow%3D000000%26bgTextureShadow%3D16_diagonal_maze.png%26bgImgOpacityShadow%3D40%26opacityShadow%3D60%26thicknessShadow%3D5px%26offsetTopShadow%3D0%26offsetLeftShadow%3D-10px%26cornerRadiusShadow%3D18px&scope=&t-name=pepper-grinder&ui-version=1.8.2,download=true&files%5B%5D=ui.core.js&files%5B%5D=ui.widget.js&files%5B%5D=ui.mouse.js&files%5B%5D=ui.position.js&files%5B%5D=ui.draggable.js&files%5B%5D=ui.droppable.js&files%5B%5D=ui.resizable.js&files%5B%5D=ui.selectable.js&files%5B%5D=ui.sortable.js&files%5B%5D=ui.accordion.js&files%5B%5D=ui.autocomplete.js&files%5B%5D=ui.button.js&files%5B%5D=ui.dialog.js&files%5B%5D=ui.slider.js&files%5B%5D=ui.tabs.js&files%5B%5D=ui.datepicker.js&files%5B%5D=ui.progressbar.js&files%5B%5D=effects.core.js&files%5B%5D=effects.blind.js&files%5B%5D=effects.bounce.js&files%5B%5D=effects.clip.js&files%5B%5D=effects.drop.js&files%5B%5D=effects.explode.js&files%5B%5D=effects.fold.js&files%5B%5D=effects.highlight.js&files%5B%5D=effects.pulsate.js&files%5B%5D=effects.scale.js&files%5B%5D=effects.shake.js&files%5B%5D=effects.slide.js&files%5B%5D=effects.transfer.js&theme=%3FffDefault%3DLucida%2BGrande%252C%2BLucida%2BSans%252C%2BArial%252C%2Bsans-serif%26fwDefault%3Dbold%26fsDefault%3D1.1em%26cornerRadius%3D6px%26bgColorHeader%3D30273a%26bgTextureHeader%3D03_highlight_soft.png%26bgImgOpacityHeader%3D25%26borderColorHeader%3D231d2b%26fcHeader%3Dffffff%26iconColorHeader%3Da8a3ae%26bgColorContent%3D3d3644%26bgTextureContent%3D12_gloss_wave.png%26bgImgOpacityContent%3D30%26borderColorContent%3D7e7783%26fcContent%3Dffffff%26iconColorContent%3Dffffff%26bgColorDefault%3Ddcd9de%26bgTextureDefault%3D03_highlight_soft.png%26bgImgOpacityDefault%3D100%26borderColorDefault%3Ddcd9de%26fcDefault%3D665874%26iconColorDefault%3D8d78a5%26bgColorHover%3Deae6ea%26bgTextureHover%3D03_highlight_soft.png%26bgImgOpacityHover%3D100%26borderColorHover%3Dd1c5d8%26fcHover%3D734d99%26iconColorHover%3D734d99%26bgColorActive%3D5f5964%26bgTextureActive%3D03_highlight_soft.png%26bgImgOpacityActive%3D45%26borderColorActive%3D7e7783%26fcActive%3Dffffff%26iconColorActive%3D454545%26bgColorHighlight%3Dfafafa%26bgTextureHighlight%3D01_flat.png%26bgImgOpacityHighlight%3D55%26borderColorHighlight%3Dffdb1f%26fcHighlight%3D333333%26iconColorHighlight%3D8d78a5%26bgColorError%3D994d53%26bgTextureError%3D01_flat.png%26bgImgOpacityError%3D55%26borderColorError%3D994d53%26fcError%3Dffffff%26iconColorError%3Debccce%26bgColorOverlay%3Deeeeee%26bgTextureOverlay%3D01_flat.png%26bgImgOpacityOverlay%3D0%26opacityOverlay%3D80%26bgColorShadow%3Daaaaaa%26bgTextureShadow%3D01_flat.png%26bgImgOpacityShadow%3D0%26opacityShadow%3D60%26thicknessShadow%3D4px%26offsetTopShadow%3D-4px%26offsetLeftShadow%3D-4px%26cornerRadiusShadow%3D0px&scope=&t-name=eggplant&ui-version=1.8.2,download=true&files%5B%5D=ui.core.js&files%5B%5D=ui.widget.js&files%5B%5D=ui.mouse.js&files%5B%5D=ui.position.js&files%5B%5D=ui.draggable.js&files%5B%5D=ui.droppable.js&files%5B%5D=ui.resizable.js&files%5B%5D=ui.selectable.js&files%5B%5D=ui.sortable.js&files%5B%5D=ui.accordion.js&files%5B%5D=ui.autocomplete.js&files%5B%5D=ui.button.js&files%5B%5D=ui.dialog.js&files%5B%5D=ui.slider.js&files%5B%5D=ui.tabs.js&files%5B%5D=ui.datepicker.js&files%5B%5D=ui.progressbar.js&files%5B%5D=effects.core.js&files%5B%5D=effects.blind.js&files%5B%5D=effects.bounce.js&files%5B%5D=effects.clip.js&files%5B%5D=effects.drop.js&files%5B%5D=effects.explode.js&files%5B%5D=effects.fold.js&files%5B%5D=effects.highlight.js&files%5B%5D=effects.pulsate.js&files%5B%5D=effects.scale.js&files%5B%5D=effects.shake.js&files%5B%5D=effects.slide.js&files%5B%5D=effects.transfer.js&theme=%3FffDefault%3DVerdana%252C%2BArial%252C%2Bsans-serif%26fwDefault%3Dnormal%26fsDefault%3D1.1em%26cornerRadius%3D6px%26bgColorHeader%3D444444%26bgTextureHeader%3D03_highlight_soft.png%26bgImgOpacityHeader%3D44%26borderColorHeader%3D333333%26fcHeader%3Dffffff%26iconColorHeader%3Dffffff%26bgColorContent%3D000000%26bgTextureContent%3D14_loop.png%26bgImgOpacityContent%3D25%26borderColorContent%3D555555%26fcContent%3Dffffff%26iconColorContent%3Dcccccc%26bgColorDefault%3D222222%26bgTextureDefault%3D03_highlight_soft.png%26bgImgOpacityDefault%3D35%26borderColorDefault%3D444444%26fcDefault%3Deeeeee%26iconColorDefault%3Dcccccc%26bgColorHover%3D003147%26bgTextureHover%3D03_highlight_soft.png%26bgImgOpacityHover%3D33%26borderColorHover%3D0b93d5%26fcHover%3Dffffff%26iconColorHover%3Dffffff%26bgColorActive%3D0972a5%26bgTextureActive%3D04_highlight_hard.png%26bgImgOpacityActive%3D20%26borderColorActive%3D26b3f7%26fcActive%3Dffffff%26iconColorActive%3D222222%26bgColorHighlight%3Deeeeee%26bgTextureHighlight%3D03_highlight_soft.png%26bgImgOpacityHighlight%3D80%26borderColorHighlight%3Dcccccc%26fcHighlight%3D2e7db2%26iconColorHighlight%3D4b8e0b%26bgColorError%3Dffc73d%26bgTextureError%3D02_glass.png%26bgImgOpacityError%3D40%26borderColorError%3Dffb73d%26fcError%3D111111%26iconColorError%3Da83300%26bgColorOverlay%3D5c5c5c%26bgTextureOverlay%3D01_flat.png%26bgImgOpacityOverlay%3D50%26opacityOverlay%3D80%26bgColorShadow%3Dcccccc%26bgTextureShadow%3D01_flat.png%26bgImgOpacityShadow%3D30%26opacityShadow%3D60%26thicknessShadow%3D7px%26offsetTopShadow%3D-7px%26offsetLeftShadow%3D-7px%26cornerRadiusShadow%3D8px&scope=&t-name=dark-hive&ui-version=1.8.2,download=true&files%5B%5D=ui.core.js&files%5B%5D=ui.widget.js&files%5B%5D=ui.mouse.js&files%5B%5D=ui.position.js&files%5B%5D=ui.draggable.js&files%5B%5D=ui.droppable.js&files%5B%5D=ui.resizable.js&files%5B%5D=ui.selectable.js&files%5B%5D=ui.sortable.js&files%5B%5D=ui.accordion.js&files%5B%5D=ui.autocomplete.js&files%5B%5D=ui.button.js&files%5B%5D=ui.dialog.js&files%5B%5D=ui.slider.js&files%5B%5D=ui.tabs.js&files%5B%5D=ui.datepicker.js&files%5B%5D=ui.progressbar.js&files%5B%5D=effects.core.js&files%5B%5D=effects.blind.js&files%5B%5D=effects.bounce.js&files%5B%5D=effects.clip.js&files%5B%5D=effects.drop.js&files%5B%5D=effects.explode.js&files%5B%5D=effects.fold.js&files%5B%5D=effects.highlight.js&files%5B%5D=effects.pulsate.js&files%5B%5D=effects.scale.js&files%5B%5D=effects.shake.js&files%5B%5D=effects.slide.js&files%5B%5D=effects.transfer.js&theme=%3FffDefault%3DLucida%2BGrande%252C%2BLucida%2BSans%252C%2BArial%252C%2Bsans-serif%26fwDefault%3Dbold%26fsDefault%3D1.1em%26cornerRadius%3D6px%26bgColorHeader%3Ddeedf7%26bgTextureHeader%3D03_highlight_soft.png%26bgImgOpacityHeader%3D100%26borderColorHeader%3Daed0ea%26fcHeader%3D222222%26iconColorHeader%3D72a7cf%26bgColorContent%3Df2f5f7%26bgTextureContent%3D04_highlight_hard.png%26bgImgOpacityContent%3D100%26borderColorContent%3Ddddddd%26fcContent%3D362b36%26iconColorContent%3D72a7cf%26bgColorDefault%3Dd7ebf9%26bgTextureDefault%3D02_glass.png%26bgImgOpacityDefault%3D80%26borderColorDefault%3Daed0ea%26fcDefault%3D2779aa%26iconColorDefault%3D3d80b3%26bgColorHover%3De4f1fb%26bgTextureHover%3D02_glass.png%26bgImgOpacityHover%3D100%26borderColorHover%3D74b2e2%26fcHover%3D0070a3%26iconColorHover%3D2694e8%26bgColorActive%3D3baae3%26bgTextureActive%3D02_glass.png%26bgImgOpacityActive%3D50%26borderColorActive%3D2694e8%26fcActive%3Dffffff%26iconColorActive%3Dffffff%26bgColorHighlight%3Dffef8f%26bgTextureHighlight%3D03_highlight_soft.png%26bgImgOpacityHighlight%3D25%26borderColorHighlight%3Df9dd34%26fcHighlight%3D363636%26iconColorHighlight%3D2e83ff%26bgColorError%3Dcd0a0a%26bgTextureError%3D01_flat.png%26bgImgOpacityError%3D15%26borderColorError%3Dcd0a0a%26fcError%3Dffffff%26iconColorError%3Dffffff%26bgColorOverlay%3Deeeeee%26bgTextureOverlay%3D08_diagonals_thick.png%26bgImgOpacityOverlay%3D90%26opacityOverlay%3D80%26bgColorShadow%3D000000%26bgTextureShadow%3D04_highlight_hard.png%26bgImgOpacityShadow%3D70%26opacityShadow%3D30%26thicknessShadow%3D7px%26offsetTopShadow%3D-7px%26offsetLeftShadow%3D-7px%26cornerRadiusShadow%3D8px&scope=&t-name=cupertino&ui-version=1.8.2,download=true&files%5B%5D=ui.core.js&files%5B%5D=ui.widget.js&files%5B%5D=ui.mouse.js&files%5B%5D=ui.position.js&files%5B%5D=ui.draggable.js&files%5B%5D=ui.droppable.js&files%5B%5D=ui.resizable.js&files%5B%5D=ui.selectable.js&files%5B%5D=ui.sortable.js&files%5B%5D=ui.accordion.js&files%5B%5D=ui.autocomplete.js&files%5B%5D=ui.button.js&files%5B%5D=ui.dialog.js&files%5B%5D=ui.slider.js&files%5B%5D=ui.tabs.js&files%5B%5D=ui.datepicker.js&files%5B%5D=ui.progressbar.js&files%5B%5D=effects.core.js&files%5B%5D=effects.blind.js&files%5B%5D=effects.bounce.js&files%5B%5D=effects.clip.js&files%5B%5D=effects.drop.js&files%5B%5D=effects.explode.js&files%5B%5D=effects.fold.js&files%5B%5D=effects.highlight.js&files%5B%5D=effects.pulsate.js&files%5B%5D=effects.scale.js&files%5B%5D=effects.shake.js&files%5B%5D=effects.slide.js&files%5B%5D=effects.transfer.js&theme=%3FffDefault%3Dsegoe%2Bui%252C%2BArial%252C%2Bsans-serif%26fwDefault%3Dbold%26fsDefault%3D1.1em%26cornerRadius%3D6px%26bgColorHeader%3Dece8da%26bgTextureHeader%3D12_gloss_wave.png%26bgImgOpacityHeader%3D100%26borderColorHeader%3Dd4ccb0%26fcHeader%3D433f38%26iconColorHeader%3D847e71%26bgColorContent%3Df5f3e5%26bgTextureContent%3D04_highlight_hard.png%26bgImgOpacityContent%3D100%26borderColorContent%3Ddfd9c3%26fcContent%3D312e25%26iconColorContent%3D808080%26bgColorDefault%3D459e00%26bgTextureDefault%3D04_highlight_hard.png%26bgImgOpacityDefault%3D15%26borderColorDefault%3D327E04%26fcDefault%3Dffffff%26iconColorDefault%3Deeeeee%26bgColorHover%3D67b021%26bgTextureHover%3D03_highlight_soft.png%26bgImgOpacityHover%3D25%26borderColorHover%3D327E04%26fcHover%3Dffffff%26iconColorHover%3Dffffff%26bgColorActive%3Dfafaf4%26bgTextureActive%3D04_highlight_hard.png%26bgImgOpacityActive%3D100%26borderColorActive%3Dd4ccb0%26fcActive%3D459e00%26iconColorActive%3D8DC262%26bgColorHighlight%3Dfcf0ba%26bgTextureHighlight%3D02_glass.png%26bgImgOpacityHighlight%3D55%26borderColorHighlight%3De8e1b5%26fcHighlight%3D363636%26iconColorHighlight%3D8DC262%26bgColorError%3Dffedad%26bgTextureError%3D03_highlight_soft.png%26bgImgOpacityError%3D95%26borderColorError%3De3a345%26fcError%3Dcd5c0a%26iconColorError%3Dcd0a0a%26bgColorOverlay%3D2b2922%26bgTextureOverlay%3D05_inset_soft.png%26bgImgOpacityOverlay%3D15%26opacityOverlay%3D90%26bgColorShadow%3Dcccccc%26bgTextureShadow%3D04_highlight_hard.png%26bgImgOpacityShadow%3D95%26opacityShadow%3D20%26thicknessShadow%3D12px%26offsetTopShadow%3D-12px%26offsetLeftShadow%3D-12px%26cornerRadiusShadow%3D10px&scope=&t-name=south-street&ui-version=1.8.2,download=true&files%5B%5D=ui.core.js&files%5B%5D=ui.widget.js&files%5B%5D=ui.mouse.js&files%5B%5D=ui.position.js&files%5B%5D=ui.draggable.js&files%5B%5D=ui.droppable.js&files%5B%5D=ui.resizable.js&files%5B%5D=ui.selectable.js&files%5B%5D=ui.sortable.js&files%5B%5D=ui.accordion.js&files%5B%5D=ui.autocomplete.js&files%5B%5D=ui.button.js&files%5B%5D=ui.dialog.js&files%5B%5D=ui.slider.js&files%5B%5D=ui.tabs.js&files%5B%5D=ui.datepicker.js&files%5B%5D=ui.progressbar.js&files%5B%5D=effects.core.js&files%5B%5D=effects.blind.js&files%5B%5D=effects.bounce.js&files%5B%5D=effects.clip.js&files%5B%5D=effects.drop.js&files%5B%5D=effects.explode.js&files%5B%5D=effects.fold.js&files%5B%5D=effects.highlight.js&files%5B%5D=effects.pulsate.js&files%5B%5D=effects.scale.js&files%5B%5D=effects.shake.js&files%5B%5D=effects.slide.js&files%5B%5D=effects.transfer.js&theme=%3FffDefault%3DArial%2Csans-serif%26fwDefault%3Dbold%26fsDefault%3D1.1em%26cornerRadius%3D6px%26bgColorHeader%3Dcc0000%26bgTextureHeader%3D03_highlight_soft.png%26bgImgOpacityHeader%3D15%26borderColorHeader%3De3a1a1%26fcHeader%3Dffffff%26iconColorHeader%3Dffffff%26bgColorContent%3Dffffff%26bgTextureContent%3D01_flat.png%26bgImgOpacityContent%3D75%26borderColorContent%3Deeeeee%26fcContent%3D333333%26iconColorContent%3Dcc0000%26bgColorDefault%3Deeeeee%26bgTextureDefault%3D04_highlight_hard.png%26bgImgOpacityDefault%3D100%26borderColorDefault%3Dd8dcdf%26fcDefault%3D004276%26iconColorDefault%3Dcc0000%26bgColorHover%3Df6f6f6%26bgTextureHover%3D04_highlight_hard.png%26bgImgOpacityHover%3D100%26borderColorHover%3Dcdd5da%26fcHover%3D111111%26iconColorHover%3Dcc0000%26bgColorActive%3Dffffff%26bgTextureActive%3D01_flat.png%26bgImgOpacityActive%3D65%26borderColorActive%3Deeeeee%26fcActive%3Dcc0000%26iconColorActive%3Dcc0000%26bgColorHighlight%3Dfbf8ee%26bgTextureHighlight%3D02_glass.png%26bgImgOpacityHighlight%3D55%26borderColorHighlight%3Dfcd3a1%26fcHighlight%3D444444%26iconColorHighlight%3D004276%26bgColorError%3Df3d8d8%26bgTextureError%3D08_diagonals_thick.png%26bgImgOpacityError%3D75%26borderColorError%3Dcc0000%26fcError%3D2e2e2e%26iconColorError%3Dcc0000%26bgColorOverlay%3Da6a6a6%26bgTextureOverlay%3D09_dots_small.png%26bgImgOpacityOverlay%3D65%26opacityOverlay%3D40%26bgColorShadow%3D333333%26bgTextureShadow%3D01_flat.png%26bgImgOpacityShadow%3D0%26opacityShadow%3D10%26thicknessShadow%3D8px%26offsetTopShadow%3D-8px%26offsetLeftShadow%3D-8px%26cornerRadiusShadow%3D8px&scope=&t-name=blitzer&ui-version=1.8.2,download=true&files%5B%5D=ui.core.js&files%5B%5D=ui.widget.js&files%5B%5D=ui.mouse.js&files%5B%5D=ui.position.js&files%5B%5D=ui.draggable.js&files%5B%5D=ui.droppable.js&files%5B%5D=ui.resizable.js&files%5B%5D=ui.selectable.js&files%5B%5D=ui.sortable.js&files%5B%5D=ui.accordion.js&files%5B%5D=ui.autocomplete.js&files%5B%5D=ui.button.js&files%5B%5D=ui.dialog.js&files%5B%5D=ui.slider.js&files%5B%5D=ui.tabs.js&files%5B%5D=ui.datepicker.js&files%5B%5D=ui.progressbar.js&files%5B%5D=effects.core.js&files%5B%5D=effects.blind.js&files%5B%5D=effects.bounce.js&files%5B%5D=effects.clip.js&files%5B%5D=effects.drop.js&files%5B%5D=effects.explode.js&files%5B%5D=effects.fold.js&files%5B%5D=effects.highlight.js&files%5B%5D=effects.pulsate.js&files%5B%5D=effects.scale.js&files%5B%5D=effects.shake.js&files%5B%5D=effects.slide.js&files%5B%5D=effects.transfer.js&theme=%3Ftr%3DffDefault%3DHelvetica%2CArial%2Csans-serif%26fwDefault%3Dnormal%26fsDefault%3D1.1em%26cornerRadius%3D6px%26bgColorHeader%3Dcb842e%26bgTextureHeader%3D02_glass.png%26bgImgOpacityHeader%3D25%26borderColorHeader%3Dd49768%26fcHeader%3Dffffff%26iconColorHeader%3Dffffff%26bgColorContent%3Df4f0ec%26bgTextureContent%3D05_inset_soft.png%26bgImgOpacityContent%3D100%26borderColorContent%3De0cfc2%26fcContent%3D1e1b1d%26iconColorContent%3Dc47a23%26bgColorDefault%3Dede4d4%26bgTextureDefault%3D02_glass.png%26bgImgOpacityDefault%3D70%26borderColorDefault%3Dcdc3b7%26fcDefault%3D3f3731%26iconColorDefault%3Df08000%26bgColorHover%3Df5f0e5%26bgTextureHover%3D02_glass.png%26bgImgOpacityHover%3D100%26borderColorHover%3Df5ad66%26fcHover%3Da46313%26iconColorHover%3Df08000%26bgColorActive%3Df4f0ec%26bgTextureActive%3D04_highlight_hard.png%26bgImgOpacityActive%3D100%26borderColorActive%3De0cfc2%26fcActive%3Db85700%26iconColorActive%3Df35f07%26bgColorHighlight%3Df5f5b5%26bgTextureHighlight%3D04_highlight_hard.png%26bgImgOpacityHighlight%3D75%26borderColorHighlight%3Dd9bb73%26fcHighlight%3D060200%26iconColorHighlight%3Dcb672b%26bgColorError%3Dfee4bd%26bgTextureError%3D04_highlight_hard.png%26bgImgOpacityError%3D65%26borderColorError%3Df8893f%26fcError%3D592003%26iconColorError%3Dff7519%26bgColorOverlay%3Daaaaaa%26bgTextureOverlay%3D01_flat.png%26bgImgOpacityOverlay%3D75%26opacityOverlay%3D30%26bgColorShadow%3Daaaaaa%26bgTextureShadow%3D01_flat.png%26bgImgOpacityShadow%3D75%26opacityShadow%3D30%26thicknessShadow%3D8px%26offsetTopShadow%3D-8px%26offsetLeftShadow%3D-8px%26cornerRadiusShadow%3D8px&scope=&t-name=humanity&ui-version=1.8.2,download=true&files%5B%5D=ui.core.js&files%5B%5D=ui.widget.js&files%5B%5D=ui.mouse.js&files%5B%5D=ui.position.js&files%5B%5D=ui.draggable.js&files%5B%5D=ui.droppable.js&files%5B%5D=ui.resizable.js&files%5B%5D=ui.selectable.js&files%5B%5D=ui.sortable.js&files%5B%5D=ui.accordion.js&files%5B%5D=ui.autocomplete.js&files%5B%5D=ui.button.js&files%5B%5D=ui.dialog.js&files%5B%5D=ui.slider.js&files%5B%5D=ui.tabs.js&files%5B%5D=ui.datepicker.js&files%5B%5D=ui.progressbar.js&files%5B%5D=effects.core.js&files%5B%5D=effects.blind.js&files%5B%5D=effects.bounce.js&files%5B%5D=effects.clip.js&files%5B%5D=effects.drop.js&files%5B%5D=effects.explode.js&files%5B%5D=effects.fold.js&files%5B%5D=effects.highlight.js&files%5B%5D=effects.pulsate.js&files%5B%5D=effects.scale.js&files%5B%5D=effects.shake.js&files%5B%5D=effects.slide.js&files%5B%5D=effects.transfer.js&theme=%3FffDefault%3DGill%2BSans%2CArial%2Csans-serif%26fwDefault%3Dbold%26fsDefault%3D1.2em%26cornerRadius%3D4px%26bgColorHeader%3D35414f%26bgTextureHeader%3D09_dots_small.png%26bgImgOpacityHeader%3D35%26borderColorHeader%3D2c4359%26fcHeader%3De1e463%26iconColorHeader%3De1e463%26bgColorContent%3Dffffff%26bgTextureContent%3D01_flat.png%26bgImgOpacityContent%3D75%26borderColorContent%3Daaaaaa%26fcContent%3D2c4359%26iconColorContent%3Dc02669%26bgColorDefault%3D93c3cd%26bgTextureDefault%3D07_diagonals_small.png%26bgImgOpacityDefault%3D50%26borderColorDefault%3D93c3cd%26fcDefault%3D333333%26iconColorDefault%3Dffffff%26bgColorHover%3Dccd232%26bgTextureHover%3D07_diagonals_small.png%26bgImgOpacityHover%3D75%26borderColorHover%3D999999%26fcHover%3D212121%26iconColorHover%3D454545%26bgColorActive%3Ddb4865%26bgTextureActive%3D07_diagonals_small.png%26bgImgOpacityActive%3D40%26borderColorActive%3Dff6b7f%26fcActive%3Dffffff%26iconColorActive%3Dffffff%26bgColorHighlight%3Dffff38%26bgTextureHighlight%3D10_dots_medium.png%26bgImgOpacityHighlight%3D80%26borderColorHighlight%3Db4d100%26fcHighlight%3D363636%26iconColorHighlight%3D88a206%26bgColorError%3Dff3853%26bgTextureError%3D07_diagonals_small.png%26bgImgOpacityError%3D50%26borderColorError%3Dff6b7f%26fcError%3Dffffff%26iconColorError%3Dffeb33%26bgColorOverlay%3Df7f7ba%26bgTextureOverlay%3D11_white_lines.png%26bgImgOpacityOverlay%3D85%26opacityOverlay%3D80%26bgColorShadow%3Dba9217%26bgTextureShadow%3D01_flat.png%26bgImgOpacityShadow%3D75%26opacityShadow%3D20%26thicknessShadow%3D10px%26offsetTopShadow%3D8px%26offsetLeftShadow%3D8px%26cornerRadiusShadow%3D5px&scope=&t-name=hot-sneaks&ui-version=1.8.2,download=true&files%5B%5D=ui.core.js&files%5B%5D=ui.widget.js&files%5B%5D=ui.mouse.js&files%5B%5D=ui.position.js&files%5B%5D=ui.draggable.js&files%5B%5D=ui.droppable.js&files%5B%5D=ui.resizable.js&files%5B%5D=ui.selectable.js&files%5B%5D=ui.sortable.js&files%5B%5D=ui.accordion.js&files%5B%5D=ui.autocomplete.js&files%5B%5D=ui.button.js&files%5B%5D=ui.dialog.js&files%5B%5D=ui.slider.js&files%5B%5D=ui.tabs.js&files%5B%5D=ui.datepicker.js&files%5B%5D=ui.progressbar.js&files%5B%5D=effects.core.js&files%5B%5D=effects.blind.js&files%5B%5D=effects.bounce.js&files%5B%5D=effects.clip.js&files%5B%5D=effects.drop.js&files%5B%5D=effects.explode.js&files%5B%5D=effects.fold.js&files%5B%5D=effects.highlight.js&files%5B%5D=effects.pulsate.js&files%5B%5D=effects.scale.js&files%5B%5D=effects.shake.js&files%5B%5D=effects.slide.js&files%5B%5D=effects.transfer.js&theme=%3FffDefault%3Dsegoe%2Bui%2C%2BArial%2C%2Bsans-serif%26fwDefault%3Dbold%26fsDefault%3D1.1em%26cornerRadius%3D3px%26bgColorHeader%3Df9f9f9%26bgTextureHeader%3D03_highlight_soft.png%26bgImgOpacityHeader%3D100%26borderColorHeader%3Dcccccc%26fcHeader%3De69700%26iconColorHeader%3D5fa5e3%26bgColorContent%3Deeeeee%26bgTextureContent%3D06_inset_hard.png%26bgImgOpacityContent%3D100%26borderColorContent%3Daaaaaa%26fcContent%3D222222%26iconColorContent%3D0a82eb%26bgColorDefault%3D1484e6%26bgTextureDefault%3D08_diagonals_thick.png%26bgImgOpacityDefault%3D22%26borderColorDefault%3Dffffff%26fcDefault%3Dffffff%26iconColorDefault%3Dfcdd4a%26bgColorHover%3D2293f7%26bgTextureHover%3D08_diagonals_thick.png%26bgImgOpacityHover%3D26%26borderColorHover%3D2293f7%26fcHover%3Dffffff%26iconColorHover%3Dffffff%26bgColorActive%3De69700%26bgTextureActive%3D08_diagonals_thick.png%26bgImgOpacityActive%3D20%26borderColorActive%3De69700%26fcActive%3Dffffff%26iconColorActive%3Dffffff%26bgColorHighlight%3Dc5ddfc%26bgTextureHighlight%3D07_diagonals_small.png%26bgImgOpacityHighlight%3D25%26borderColorHighlight%3Dffffff%26fcHighlight%3D333333%26iconColorHighlight%3D0b54d5%26bgColorError%3De69700%26bgTextureError%3D08_diagonals_thick.png%26bgImgOpacityError%3D20%26borderColorError%3De69700%26fcError%3Dffffff%26iconColorError%3Dffffff%26bgColorOverlay%3De6b900%26bgTextureOverlay%3D01_flat.png%26bgImgOpacityOverlay%3D0%26opacityOverlay%3D30%26bgColorShadow%3De69700%26bgTextureShadow%3D01_flat.png%26bgImgOpacityShadow%3D0%26opacityShadow%3D20%26thicknessShadow%3D0px%26offsetTopShadow%3D6px%26offsetLeftShadow%3D6px%26cornerRadiusShadow%3D3px&scope=&t-name=excite-bike&ui-version=1.8.2,download=true&files%5B%5D=ui.core.js&files%5B%5D=ui.widget.js&files%5B%5D=ui.mouse.js&files%5B%5D=ui.position.js&files%5B%5D=ui.draggable.js&files%5B%5D=ui.droppable.js&files%5B%5D=ui.resizable.js&files%5B%5D=ui.selectable.js&files%5B%5D=ui.sortable.js&files%5B%5D=ui.accordion.js&files%5B%5D=ui.autocomplete.js&files%5B%5D=ui.button.js&files%5B%5D=ui.dialog.js&files%5B%5D=ui.slider.js&files%5B%5D=ui.tabs.js&files%5B%5D=ui.datepicker.js&files%5B%5D=ui.progressbar.js&files%5B%5D=effects.core.js&files%5B%5D=effects.blind.js&files%5B%5D=effects.bounce.js&files%5B%5D=effects.clip.js&files%5B%5D=effects.drop.js&files%5B%5D=effects.explode.js&files%5B%5D=effects.fold.js&files%5B%5D=effects.highlight.js&files%5B%5D=effects.pulsate.js&files%5B%5D=effects.scale.js&files%5B%5D=effects.shake.js&files%5B%5D=effects.slide.js&files%5B%5D=effects.transfer.js&theme=%3Ftr%26ffDefault%3DHelvetica%2C%2BArial%2C%2Bsans-serif%26fwDefault%3Dnormal%26fsDefault%3D1.1%26fsDefaultUnit%3Dem%26cornerRadius%3D5%26cornerRadiusUnit%3Dpx%26bgColorHeader%3D888888%26bgTextureHeader%3D04_highlight_hard.png%26bgImgOpacityHeader%3D15%26borderColorHeader%3D404040%26fcHeader%3Dffffff%26iconColorHeader%3Dcccccc%26bgColorContent%3D121212%26bgTextureContent%3D12_gloss_wave.png%26bgImgOpacityContent%3D16%26borderColorContent%3D404040%26fcContent%3Deeeeee%26iconColorContent%3Dbbbbbb%26bgColorDefault%3Dadadad%26bgTextureDefault%3D03_highlight_soft.png%26bgImgOpacityDefault%3D35%26borderColorDefault%3Dcccccc%26fcDefault%3D333333%26iconColorDefault%3D666666%26bgColorHover%3Ddddddd%26bgTextureHover%3D03_highlight_soft.png%26bgImgOpacityHover%3D60%26borderColorHover%3Ddddddd%26fcHover%3D000000%26iconColorHover%3Dc98000%26bgColorActive%3D121212%26bgTextureActive%3D05_inset_soft.png%26bgImgOpacityActive%3D15%26borderColorActive%3D000000%26fcActive%3Dffffff%26iconColorActive%3Df29a00%26bgColorHighlight%3D555555%26bgTextureHighlight%3D04_highlight_hard.png%26bgImgOpacityHighlight%3D55%26borderColorHighlight%3D404040%26fcHighlight%3Dcccccc%26iconColorHighlight%3Daaaaaa%26bgColorError%3Dfef1ec%26bgTextureError%3D02_glass.png%26bgImgOpacityError%3D95%26borderColorError%3Dcd0a0a%26fcError%3Dcd0a0a%26iconColorError%3Dcd0a0a&scope=&t-name=vader&ui-version=1.8.2,download=true&files%5B%5D=ui.core.js&files%5B%5D=ui.widget.js&files%5B%5D=ui.mouse.js&files%5B%5D=ui.position.js&files%5B%5D=ui.draggable.js&files%5B%5D=ui.droppable.js&files%5B%5D=ui.resizable.js&files%5B%5D=ui.selectable.js&files%5B%5D=ui.sortable.js&files%5B%5D=ui.accordion.js&files%5B%5D=ui.autocomplete.js&files%5B%5D=ui.button.js&files%5B%5D=ui.dialog.js&files%5B%5D=ui.slider.js&files%5B%5D=ui.tabs.js&files%5B%5D=ui.datepicker.js&files%5B%5D=ui.progressbar.js&files%5B%5D=effects.core.js&files%5B%5D=effects.blind.js&files%5B%5D=effects.bounce.js&files%5B%5D=effects.clip.js&files%5B%5D=effects.drop.js&files%5B%5D=effects.explode.js&files%5B%5D=effects.fold.js&files%5B%5D=effects.highlight.js&files%5B%5D=effects.pulsate.js&files%5B%5D=effects.scale.js&files%5B%5D=effects.shake.js&files%5B%5D=effects.slide.js&files%5B%5D=effects.transfer.js&theme=%3FffDefault%3DArial%2C%2Bsans-serif%26fwDefault%3Dbold%26fsDefault%3D1.3em%26cornerRadius%3D4px%26bgColorHeader%3D0b3e6f%26bgTextureHeader%3D08_diagonals_thick.png%26bgImgOpacityHeader%3D15%26borderColorHeader%3D0b3e6f%26fcHeader%3Df6f6f6%26iconColorHeader%3D98d2fb%26bgColorContent%3D111111%26bgTextureContent%3D12_gloss_wave.png%26bgImgOpacityContent%3D20%26borderColorContent%3D000000%26fcContent%3Dd9d9d9%26iconColorContent%3D9ccdfc%26bgColorDefault%3D333333%26bgTextureDefault%3D09_dots_small.png%26bgImgOpacityDefault%3D20%26borderColorDefault%3D333333%26fcDefault%3Dffffff%26iconColorDefault%3D9ccdfc%26bgColorHover%3D00498f%26bgTextureHover%3D09_dots_small.png%26bgImgOpacityHover%3D40%26borderColorHover%3D222222%26fcHover%3Dffffff%26iconColorHover%3Dffffff%26bgColorActive%3D292929%26bgTextureActive%3D01_flat.png%26bgImgOpacityActive%3D40%26borderColorActive%3D096ac8%26fcActive%3D75abff%26iconColorActive%3D00498f%26bgColorHighlight%3D0b58a2%26bgTextureHighlight%3D10_dots_medium.png%26bgImgOpacityHighlight%3D30%26borderColorHighlight%3D052f57%26fcHighlight%3Dffffff%26iconColorHighlight%3Dffffff%26bgColorError%3Da32d00%26bgTextureError%3D09_dots_small.png%26bgImgOpacityError%3D30%26borderColorError%3Dcd0a0a%26fcError%3Dffffff%26iconColorError%3Dffffff%26bgColorOverlay%3Daaaaaa%26bgTextureOverlay%3D01_flat.png%26bgImgOpacityOverlay%3D0%26opacityOverlay%3D30%26bgColorShadow%3Daaaaaa%26bgTextureShadow%3D01_flat.png%26bgImgOpacityShadow%3D0%26opacityShadow%3D30%26thicknessShadow%3D8px%26offsetTopShadow%3D-8px%26offsetLeftShadow%3D-8px%26cornerRadiusShadow%3D8px&scope=&t-name=dot-luv&ui-version=1.8.2,download=true&files%5B%5D=ui.core.js&files%5B%5D=ui.widget.js&files%5B%5D=ui.mouse.js&files%5B%5D=ui.position.js&files%5B%5D=ui.draggable.js&files%5B%5D=ui.droppable.js&files%5B%5D=ui.resizable.js&files%5B%5D=ui.selectable.js&files%5B%5D=ui.sortable.js&files%5B%5D=ui.accordion.js&files%5B%5D=ui.autocomplete.js&files%5B%5D=ui.button.js&files%5B%5D=ui.dialog.js&files%5B%5D=ui.slider.js&files%5B%5D=ui.tabs.js&files%5B%5D=ui.datepicker.js&files%5B%5D=ui.progressbar.js&files%5B%5D=effects.core.js&files%5B%5D=effects.blind.js&files%5B%5D=effects.bounce.js&files%5B%5D=effects.clip.js&files%5B%5D=effects.drop.js&files%5B%5D=effects.explode.js&files%5B%5D=effects.fold.js&files%5B%5D=effects.highlight.js&files%5B%5D=effects.pulsate.js&files%5B%5D=effects.scale.js&files%5B%5D=effects.shake.js&files%5B%5D=effects.slide.js&files%5B%5D=effects.transfer.js&theme=%3FffDefault%3DSegoe%2BUI%252C%2BHelvetica%252C%2BArial%252C%2Bsans-serif%26fwDefault%3Dbold%26fsDefault%3D1.1em%26cornerRadius%3D4px%26bgColorHeader%3D453326%26bgTextureHeader%3D12_gloss_wave.png%26bgImgOpacityHeader%3D25%26borderColorHeader%3D695649%26fcHeader%3De3ddc9%26iconColorHeader%3De3ddc9%26bgColorContent%3D201913%26bgTextureContent%3D05_inset_soft.png%26bgImgOpacityContent%3D10%26borderColorContent%3D9c947c%26fcContent%3Dffffff%26iconColorContent%3D222222%26bgColorDefault%3D1c160d%26bgTextureDefault%3D12_gloss_wave.png%26bgImgOpacityDefault%3D20%26borderColorDefault%3D695444%26fcDefault%3D9bcc60%26iconColorDefault%3D9bcc60%26bgColorHover%3D44372c%26bgTextureHover%3D12_gloss_wave.png%26bgImgOpacityHover%3D30%26borderColorHover%3D9c947c%26fcHover%3Dbaec7e%26iconColorHover%3Dadd978%26bgColorActive%3D201913%26bgTextureActive%3D03_highlight_soft.png%26bgImgOpacityActive%3D20%26borderColorActive%3D9c947c%26fcActive%3De3ddc9%26iconColorActive%3De3ddc9%26bgColorHighlight%3D619226%26bgTextureHighlight%3D03_highlight_soft.png%26bgImgOpacityHighlight%3D20%26borderColorHighlight%3Dadd978%26fcHighlight%3Dffffff%26iconColorHighlight%3Dffffff%26bgColorError%3D5f391b%26bgTextureError%3D02_glass.png%26bgImgOpacityError%3D15%26borderColorError%3D5f391b%26fcError%3Dffffff%26iconColorError%3Df1fd86%26bgColorOverlay%3Daaaaaa%26bgTextureOverlay%3D01_flat.png%26bgImgOpacityOverlay%3D0%26opacityOverlay%3D30%26bgColorShadow%3Daaaaaa%26bgTextureShadow%3D01_flat.png%26bgImgOpacityShadow%3D0%26opacityShadow%3D30%26thicknessShadow%3D8px%26offsetTopShadow%3D-8px%26offsetLeftShadow%3D-8px%26cornerRadiusShadow%3D8px&scope=&t-name=mint-choc&ui-version=1.8.2,download=true&files%5B%5D=ui.core.js&files%5B%5D=ui.widget.js&files%5B%5D=ui.mouse.js&files%5B%5D=ui.position.js&files%5B%5D=ui.draggable.js&files%5B%5D=ui.droppable.js&files%5B%5D=ui.resizable.js&files%5B%5D=ui.selectable.js&files%5B%5D=ui.sortable.js&files%5B%5D=ui.accordion.js&files%5B%5D=ui.autocomplete.js&files%5B%5D=ui.button.js&files%5B%5D=ui.dialog.js&files%5B%5D=ui.slider.js&files%5B%5D=ui.tabs.js&files%5B%5D=ui.datepicker.js&files%5B%5D=ui.progressbar.js&files%5B%5D=effects.core.js&files%5B%5D=effects.blind.js&files%5B%5D=effects.bounce.js&files%5B%5D=effects.clip.js&files%5B%5D=effects.drop.js&files%5B%5D=effects.explode.js&files%5B%5D=effects.fold.js&files%5B%5D=effects.highlight.js&files%5B%5D=effects.pulsate.js&files%5B%5D=effects.scale.js&files%5B%5D=effects.shake.js&files%5B%5D=effects.slide.js&files%5B%5D=effects.transfer.js&theme=%3FffDefault%3DVerdana%2C%2BArial%2C%2Bsans-serif%26fwDefault%3Dnormal%26fsDefault%3D1.1em%26cornerRadius%3D4px%26bgColorHeader%3D333333%26bgTextureHeader%3D08_diagonals_thick.png%26bgImgOpacityHeader%3D8%26borderColorHeader%3Da3a3a3%26fcHeader%3Deeeeee%26iconColorHeader%3Dbbbbbb%26bgColorContent%3Df9f9f9%26bgTextureContent%3D04_highlight_hard.png%26bgImgOpacityContent%3D100%26borderColorContent%3Dcccccc%26fcContent%3D222222%26iconColorContent%3D222222%26bgColorDefault%3D111111%26bgTextureDefault%3D02_glass.png%26bgImgOpacityDefault%3D40%26borderColorDefault%3D777777%26fcDefault%3De3e3e3%26iconColorDefault%3Dededed%26bgColorHover%3D1c1c1c%26bgTextureHover%3D02_glass.png%26bgImgOpacityHover%3D55%26borderColorHover%3D000000%26fcHover%3Dffffff%26iconColorHover%3Dffffff%26bgColorActive%3Dffffff%26bgTextureActive%3D01_flat.png%26bgImgOpacityActive%3D65%26borderColorActive%3Dcccccc%26fcActive%3D222222%26iconColorActive%3D222222%26bgColorHighlight%3Dffeb80%26bgTextureHighlight%3D06_inset_hard.png%26bgImgOpacityHighlight%3D55%26borderColorHighlight%3Dffde2e%26fcHighlight%3D363636%26iconColorHighlight%3D4ca300%26bgColorError%3Dcd0a0a%26bgTextureError%3D06_inset_hard.png%26bgImgOpacityError%3D45%26borderColorError%3D9e0505%26fcError%3Dffffff%26iconColorError%3Dffcf29%26bgColorOverlay%3Daaaaaa%26bgTextureOverlay%3D04_highlight_hard.png%26bgImgOpacityOverlay%3D40%26opacityOverlay%3D30%26bgColorShadow%3Daaaaaa%26bgTextureShadow%3D03_highlight_soft.png%26bgImgOpacityShadow%3D50%26opacityShadow%3D20%26thicknessShadow%3D8px%26offsetTopShadow%3D-8px%26offsetLeftShadow%3D-8px%26cornerRadiusShadow%3D8px&scope=&t-name=black-tie&ui-version=1.8.2,download=true&files%5B%5D=ui.core.js&files%5B%5D=ui.widget.js&files%5B%5D=ui.mouse.js&files%5B%5D=ui.position.js&files%5B%5D=ui.draggable.js&files%5B%5D=ui.droppable.js&files%5B%5D=ui.resizable.js&files%5B%5D=ui.selectable.js&files%5B%5D=ui.sortable.js&files%5B%5D=ui.accordion.js&files%5B%5D=ui.autocomplete.js&files%5B%5D=ui.button.js&files%5B%5D=ui.dialog.js&files%5B%5D=ui.slider.js&files%5B%5D=ui.tabs.js&files%5B%5D=ui.datepicker.js&files%5B%5D=ui.progressbar.js&files%5B%5D=effects.core.js&files%5B%5D=effects.blind.js&files%5B%5D=effects.bounce.js&files%5B%5D=effects.clip.js&files%5B%5D=effects.drop.js&files%5B%5D=effects.explode.js&files%5B%5D=effects.fold.js&files%5B%5D=effects.highlight.js&files%5B%5D=effects.pulsate.js&files%5B%5D=effects.scale.js&files%5B%5D=effects.shake.js&files%5B%5D=effects.slide.js&files%5B%5D=effects.transfer.js&theme=%3FffDefault%3DSegoe%2BUI%2C%2BHelvetica%2C%2BArial%2C%2Bsans-serif%26fwDefault%3Dbold%26fsDefault%3D1.1em%26cornerRadius%3D6px%26bgColorHeader%3D9fda58%26bgTextureHeader%3D12_gloss_wave.png%26bgImgOpacityHeader%3D85%26borderColorHeader%3D000000%26fcHeader%3D222222%26iconColorHeader%3D1f1f1f%26bgColorContent%3D000000%26bgTextureContent%3D12_gloss_wave.png%26bgImgOpacityContent%3D55%26borderColorContent%3D4a4a4a%26fcContent%3Dffffff%26iconColorContent%3D9fda58%26bgColorDefault%3D0a0a0a%26bgTextureDefault%3D02_glass.png%26bgImgOpacityDefault%3D40%26borderColorDefault%3D1b1613%26fcDefault%3Db8ec79%26iconColorDefault%3Db8ec79%26bgColorHover%3D000000%26bgTextureHover%3D02_glass.png%26bgImgOpacityHover%3D60%26borderColorHover%3D000000%26fcHover%3D96f226%26iconColorHover%3Db8ec79%26bgColorActive%3D4c4c4c%26bgTextureActive%3D01_flat.png%26bgImgOpacityActive%3D0%26borderColorActive%3D696969%26fcActive%3Dffffff%26iconColorActive%3Dffffff%26bgColorHighlight%3Df1fbe5%26bgTextureHighlight%3D02_glass.png%26bgImgOpacityHighlight%3D55%26borderColorHighlight%3D8cce3b%26fcHighlight%3D030303%26iconColorHighlight%3D000000%26bgColorError%3Df6ecd5%26bgTextureError%3D12_gloss_wave.png%26bgImgOpacityError%3D95%26borderColorError%3Df1ac88%26fcError%3D74736d%26iconColorError%3Dcd0a0a%26bgColorOverlay%3D262626%26bgTextureOverlay%3D07_diagonals_small.png%26bgImgOpacityOverlay%3D50%26opacityOverlay%3D30%26bgColorShadow%3D303030%26bgTextureShadow%3D01_flat.png%26bgImgOpacityShadow%3D0%26opacityShadow%3D50%26thicknessShadow%3D6px%26offsetTopShadow%3D-6px%26offsetLeftShadow%3D-6px%26cornerRadiusShadow%3D12px&scope=&t-name=trontastic&ui-version=1.8.2,download=true&files%5B%5D=ui.core.js&files%5B%5D=ui.widget.js&files%5B%5D=ui.mouse.js&files%5B%5D=ui.position.js&files%5B%5D=ui.draggable.js&files%5B%5D=ui.droppable.js&files%5B%5D=ui.resizable.js&files%5B%5D=ui.selectable.js&files%5B%5D=ui.sortable.js&files%5B%5D=ui.accordion.js&files%5B%5D=ui.autocomplete.js&files%5B%5D=ui.button.js&files%5B%5D=ui.dialog.js&files%5B%5D=ui.slider.js&files%5B%5D=ui.tabs.js&files%5B%5D=ui.datepicker.js&files%5B%5D=ui.progressbar.js&files%5B%5D=effects.core.js&files%5B%5D=effects.blind.js&files%5B%5D=effects.bounce.js&files%5B%5D=effects.clip.js&files%5B%5D=effects.drop.js&files%5B%5D=effects.explode.js&files%5B%5D=effects.fold.js&files%5B%5D=effects.highlight.js&files%5B%5D=effects.pulsate.js&files%5B%5D=effects.scale.js&files%5B%5D=effects.shake.js&files%5B%5D=effects.slide.js&files%5B%5D=effects.transfer.js&theme=%3FffDefault%3DGeorgia%252C%2BVerdana%252CArial%252Csans-serif%26fwDefault%3Dbold%26fsDefault%3D1.2em%26cornerRadius%3D5px%26bgColorHeader%3D261803%26bgTextureHeader%3D13_diamond.png%26bgImgOpacityHeader%3D8%26borderColorHeader%3Dbaaa5a%26fcHeader%3Deacd86%26iconColorHeader%3De9cd86%26bgColorContent%3D443113%26bgTextureContent%3D13_diamond.png%26bgImgOpacityContent%3D8%26borderColorContent%3Defec9f%26fcContent%3Defec9f%26iconColorContent%3Defec9f%26bgColorDefault%3D4f4221%26bgTextureDefault%3D13_diamond.png%26bgImgOpacityDefault%3D10%26borderColorDefault%3D362917%26fcDefault%3Df8eec9%26iconColorDefault%3De8e2b5%26bgColorHover%3D675423%26bgTextureHover%3D13_diamond.png%26bgImgOpacityHover%3D25%26borderColorHover%3D362917%26fcHover%3Df8eec9%26iconColorHover%3Df2ec64%26bgColorActive%3D443113%26bgTextureActive%3D13_diamond.png%26bgImgOpacityActive%3D8%26borderColorActive%3Defec9f%26fcActive%3Df9f2bd%26iconColorActive%3Df9f2bd%26bgColorHighlight%3Dd5ac5d%26bgTextureHighlight%3D13_diamond.png%26bgImgOpacityHighlight%3D25%26borderColorHighlight%3D362917%26fcHighlight%3D060200%26iconColorHighlight%3D070603%26bgColorError%3Dfee4bd%26bgTextureError%3D04_highlight_hard.png%26bgImgOpacityError%3D65%26borderColorError%3Dc26629%26fcError%3D803f1e%26iconColorError%3Dff7519%26bgColorOverlay%3D372806%26bgTextureOverlay%3D13_diamond.png%26bgImgOpacityOverlay%3D20%26opacityOverlay%3D80%26bgColorShadow%3Dddd4b0%26bgTextureShadow%3D01_flat.png%26bgImgOpacityShadow%3D75%26opacityShadow%3D30%26thicknessShadow%3D8px%26offsetTopShadow%3D-8px%26offsetLeftShadow%3D-8px%26cornerRadiusShadow%3D12px&scope=&t-name=swanky-purse&ui-version=1.8.2 \ No newline at end of file
diff --git a/demos/accordion/collapsible.html b/demos/accordion/collapsible.html
index 6618baff2..8e27e2125 100644
--- a/demos/accordion/collapsible.html
+++ b/demos/accordion/collapsible.html
@@ -1,17 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Accordion - Collapse content</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.accordion.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.accordion.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- $("#accordion").accordion({
+ $( "#accordion" ).accordion({
collapsible: true
});
});
@@ -50,10 +50,7 @@
<div class="demo-description">
-
<p>By default, accordions always keep one section open. To allow for all sections to be be collapsible, set the <code>collapsible</code> option to true. Click on the currently open section to collapse its content pane.</p>
-
-
</div><!-- End demo-description -->
</body>
diff --git a/demos/accordion/custom-icons.html b/demos/accordion/custom-icons.html
index c81fb3120..7dff971f6 100644
--- a/demos/accordion/custom-icons.html
+++ b/demos/accordion/custom-icons.html
@@ -1,28 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Accordion - Customize icons</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.accordion.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.accordion.js"></script>
+ <script src="../../ui/jquery.ui.button.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
var icons = {
header: "ui-icon-circle-arrow-e",
headerSelected: "ui-icon-circle-arrow-s"
};
- $("#accordion").accordion({
+ $( "#accordion" ).accordion({
icons: icons
});
- $("#toggle").button().toggle(function() {
- $("#accordion").accordion("option", "icons", false);
+ $( "#toggle" ).button().toggle(function() {
+ $( "#accordion" ).accordion( "option", "icons", false );
}, function() {
- $("#accordion").accordion("option", "icons", icons);
+ $( "#accordion" ).accordion( "option", "icons", icons );
});
});
</script>
@@ -62,9 +62,7 @@
<div class="demo-description">
-
<p>Customize the header icons with the <code>icons</code> option, which accepts classes for the header's default and selected (open) state. Use any class from the UI CSS framework, or create custom classes with background images.</p>
-
</div><!-- End demo-description -->
</body>
diff --git a/demos/accordion/default.html b/demos/accordion/default.html
index 2eb93dd7a..974dc0569 100644
--- a/demos/accordion/default.html
+++ b/demos/accordion/default.html
@@ -1,17 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Accordion - Default functionality</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.accordion.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.accordion.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- $("#accordion").accordion();
+ $( "#accordion" ).accordion();
});
</script>
</head>
diff --git a/demos/accordion/fillspace.html b/demos/accordion/fillspace.html
index 77507821c..f874feb39 100644
--- a/demos/accordion/fillspace.html
+++ b/demos/accordion/fillspace.html
@@ -1,28 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Accordion - Fill space</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.resizable.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.accordion.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.resizable.js"></script>
+ <script src="../../ui/jquery.ui.accordion.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- $("#accordion").accordion({
+ $( "#accordion" ).accordion({
fillSpace: true
});
});
$(function() {
- $("#accordionResizer").resizable({
+ $( "#accordionResizer" ).resizable({
+ minHeight: 140,
resize: function() {
- $("#accordion").accordion("resize");
- },
- minHeight: 140
+ $( "#accordion" ).accordion( "resize" );
+ }
});
});
</script>
@@ -69,11 +69,8 @@
<div class="demo-description">
-
<p>Because the accordion is comprised of block-level elements, by default its width fills the available horizontal space. To fill the vertical space allocated by its container, set the boolean <code>fillSpace</code> option to true, and the script will automatically set the dimensions of the accordion to the height of its parent container. The accordion will also resize with its container if the container is <code>resizable</code>.</p>
-
</div><!-- End demo-description -->
-
</body>
</html>
diff --git a/demos/accordion/hoverintent.html b/demos/accordion/hoverintent.html
new file mode 100644
index 000000000..6633408b6
--- /dev/null
+++ b/demos/accordion/hoverintent.html
@@ -0,0 +1,134 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>jQuery UI Accordion - Open on hoverintent</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.accordion.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
+ $(function() {
+ $("#accordion").accordion({
+ event: "click hoverintent"
+ });
+ });
+
+ var cfg = ($.hoverintent = {
+ sensitivity: 7,
+ interval: 100
+ });
+
+ $.event.special.hoverintent = {
+ setup: function() {
+ $( this ).bind( "mouseover", jQuery.event.special.hoverintent.handler );
+ },
+ teardown: function() {
+ $( this ).unbind( "mouseover", jQuery.event.special.hoverintent.handler );
+ },
+ handler: function( event ) {
+ event.type = "hoverintent";
+ var self = this,
+ args = arguments,
+ target = $( event.target ),
+ cX, cY, pX, pY;
+
+ function track( event ) {
+ cX = event.pageX;
+ cY = event.pageY;
+ };
+ pX = event.pageX;
+ pY = event.pageY;
+ function clear() {
+ target
+ .unbind( "mousemove", track )
+ .unbind( "mouseout", arguments.callee );
+ clearTimeout( timeout );
+ }
+ function handler() {
+ if ( ( Math.abs( pX - cX ) + Math.abs( pY - cY ) ) < cfg.sensitivity ) {
+ clear();
+ jQuery.event.handle.apply( self, args );
+ } else {
+ pX = cX;
+ pY = cY;
+ timeout = setTimeout( handler, cfg.interval );
+ }
+ }
+ var timeout = setTimeout( handler, cfg.interval );
+ target.mousemove( track ).mouseout( clear );
+ return true;
+ }
+ };
+ </script>
+</head>
+<body>
+
+<div class="demo">
+
+<div id="accordion">
+ <h3><a href="#">Section 1</a></h3>
+ <div>
+ <p>
+ Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer
+ ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit
+ amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut
+ odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.
+ </p>
+ </div>
+ <h3><a href="#">Section 2</a></h3>
+ <div>
+ <p>
+ Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet
+ purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor
+ velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In
+ suscipit faucibus urna.
+ </p>
+ </div>
+ <h3><a href="#">Section 3</a></h3>
+ <div>
+ <p>
+ Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis.
+ Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero
+ ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis
+ lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui.
+ </p>
+ <ul>
+ <li>List item one</li>
+ <li>List item two</li>
+ <li>List item three</li>
+ </ul>
+ </div>
+ <h3><a href="#">Section 4</a></h3>
+ <div>
+ <p>
+ Cras dictum. Pellentesque habitant morbi tristique senectus et netus
+ et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in
+ faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia
+ mauris vel est.
+ </p>
+ <p>
+ Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus.
+ Class aptent taciti sociosqu ad litora torquent per conubia nostra, per
+ inceptos himenaeos.
+ </p>
+ </div>
+</div>
+
+</div><!-- End demo -->
+
+<div class="demo-description">
+<p>
+Click headers to expand/collapse content that is broken into logical sections, much like tabs.
+Optionally, toggle sections open/closed on mouseover.
+</p>
+<p>
+The underlying HTML markup is a series of headers (H3 tags) and content divs so the content is
+usable without JavaScript.
+</p>
+</div><!-- End demo-description -->
+
+</body>
+</html>
diff --git a/demos/accordion/index.html b/demos/accordion/index.html
index de3751128..d107dd881 100644
--- a/demos/accordion/index.html
+++ b/demos/accordion/index.html
@@ -1,22 +1,25 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Accordion Demos</title>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <link rel="stylesheet" href="../demos.css">
</head>
<body>
- <div class="demos-nav">
- <h4>Examples</h4>
- <ul>
- <li class="demo-config-on"><a href="default.html">Default functionality</a></li>
- <li><a href="fillspace.html">Fill space</a></li>
- <li><a href="no-auto-height.html">No auto height</a></li>
- <li><a href="collapsible.html">Collapse content</a></li>
- <li><a href="mouseover.html">Open on mouseover</a></li>
- <li><a href="custom-icons.html">Customize icons</a></li>
- <li><a href="sortable.html">Sortable</a></li>
- </ul>
- </div>
+
+<div class="demos-nav">
+ <h4>Examples</h4>
+ <ul>
+ <li class="demo-config-on"><a href="default.html">Default functionality</a></li>
+ <li><a href="fillspace.html">Fill space</a></li>
+ <li><a href="no-auto-height.html">No auto height</a></li>
+ <li><a href="collapsible.html">Collapse content</a></li>
+ <li><a href="mouseover.html">Open on mouseover</a></li>
+ <li><a href="hoverintent.html">Open on hoverintent</a></li>
+ <li><a href="custom-icons.html">Customize icons</a></li>
+ <li><a href="sortable.html">Sortable</a></li>
+ </ul>
+</div>
+
</body>
</html>
diff --git a/demos/accordion/mouseover.html b/demos/accordion/mouseover.html
index 374fc7536..836f35530 100644
--- a/demos/accordion/mouseover.html
+++ b/demos/accordion/mouseover.html
@@ -1,17 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Accordion - Open on mouseover</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.accordion.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.accordion.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- $("#accordion").accordion({
+ $( "#accordion" ).accordion({
event: "mouseover"
});
});
@@ -50,9 +50,7 @@
<div class="demo-description">
-
<p>Toggle sections open/closed on mouseover with the <code>event</code> option. The default value for event is "click."</p>
-
</div><!-- End demo-description -->
</body>
diff --git a/demos/accordion/no-auto-height.html b/demos/accordion/no-auto-height.html
index 5cd89c61c..96183c92c 100644
--- a/demos/accordion/no-auto-height.html
+++ b/demos/accordion/no-auto-height.html
@@ -1,17 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
- <title>jQuery UI Accordion - No Auto Height</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.accordion.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <meta charset="utf-8">
+ <title>jQuery UI Accordion - No auto height</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.accordion.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- $("#accordion").accordion({
+ $( "#accordion" ).accordion({
autoHeight: false,
navigation: true
});
@@ -52,11 +52,8 @@
<div class="demo-description">
-
<p>Setting <code>autoHeight: false</code> allows to accordion panels to keep their native height.</p>
-
<p>In addition, the <code>navigation</code> option is enabled, opening the panel based on the current location, eg. no-auto-height.html#panel2 would open the second panel on page load. It also finds anchors within the content, so #othercontent will open the third section, as it contains a link with that href.</p>
-
</div><!-- End demo-description -->
</body>
diff --git a/demos/accordion/sortable.html b/demos/accordion/sortable.html
index 80487290f..e0925c4fc 100644
--- a/demos/accordion/sortable.html
+++ b/demos/accordion/sortable.html
@@ -1,35 +1,37 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Accordion - Sortable</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.sortable.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.accordion.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.sortable.js"></script>
+ <script src="../../ui/jquery.ui.accordion.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
var stop = false;
- $("#accordion h3").click(function(event) {
- if (stop) {
+ $( "#accordion h3" ).click(function( event ) {
+ if ( stop ) {
event.stopImmediatePropagation();
event.preventDefault();
stop = false;
}
});
- $("#accordion").accordion({
- header: "> div > h3"
- }).sortable({
- axis: "y",
- handle: "h3",
- stop: function(event, ui) {
- stop = true;
- }
- });
+ $( "#accordion" )
+ .accordion({
+ header: "> div > h3"
+ })
+ .sortable({
+ axis: "y",
+ handle: "h3",
+ stop: function() {
+ stop = true;
+ }
+ });
});
</script>
</head>
@@ -74,9 +76,7 @@
<div class="demo-description">
-
<p>Drag the header to re-order panels.</p>
-
</div><!-- End demo-description -->
</body>
diff --git a/demos/addClass/default.html b/demos/addClass/default.html
index 1bb33b362..cb1d7408d 100644
--- a/demos/addClass/default.html
+++ b/demos/addClass/default.html
@@ -1,29 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
- <title>jQuery UI Effects - addClass Demo</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.core.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
- .toggler { width: 500px; height: 200px; position: relative;}
+ <meta charset="utf-8">
+ <title>jQuery UI Effects - addClass demo</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.effects.core.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
+ .toggler { width: 500px; height: 200px; position: relative; }
#button { padding: .5em 1em; text-decoration: none; }
#effect { width: 240px; padding: 1em; font-size: 1.2em; border: 1px solid #000; background: #eee; color: #333; }
- #effect.newClass { text-indent: 40px; letter-spacing: .4em; width: 410px; height: 100px; padding: 30px; margin: 10px; font-size: 1.6em; }
+ .newClass { text-indent: 40px; letter-spacing: .4em; width: 410px; height: 100px; padding: 30px; margin: 10px; font-size: 1.6em; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#button").click(function() {
- $('#effect').addClass('newClass', 1000, callback);
+ $( "#button" ).click(function() {
+ $( "#effect" ).addClass( "newClass", 1000, callback );
return false;
});
-
- function callback(){
- setTimeout(function(){
- $('#effect').removeClass('newClass');
- }, 1500);
+
+ function callback() {
+ setTimeout(function() {
+ $( "#effect" ).removeClass( "newClass" );
+ }, 1500 );
}
});
</script>
@@ -42,10 +42,10 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>This demo adds a class which animates: text-indent, letter-spacing, width, height, padding, margin, and font-size.</p>
+<div class="demo-description">
+<p>This demo adds a class which animates: text-indent, letter-spacing, width, height, padding, margin, and font-size.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/addClass/index.html b/demos/addClass/index.html
index 0e9af371f..f5bd6a0e4 100644
--- a/demos/addClass/index.html
+++ b/demos/addClass/index.html
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Effects Demos</title>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <link rel="stylesheet" href="../demos.css">
</head>
<body>
diff --git a/demos/animate/default.html b/demos/animate/default.html
index 21afff719..3c5725a81 100644
--- a/demos/animate/default.html
+++ b/demos/animate/default.html
@@ -1,26 +1,34 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
- <title>jQuery UI Effects - Animate Demo</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.core.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
- .toggler { width: 500px; height: 200px; position: relative;}
+ <meta charset="utf-8">
+ <title>jQuery UI Effects - Animate demo</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.effects.core.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
+ .toggler { width: 500px; height: 200px; position: relative; }
#button { padding: .5em 1em; text-decoration: none; }
#effect { width: 240px; height: 135px; padding: 0.4em; position: relative; background: #fff; }
#effect h3 { margin: 0; padding: 0.4em; text-align: center; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#button").toggle(
+ $( "#button" ).toggle(
function() {
- $("#effect").animate({backgroundColor: '#aa0000', color: '#fff', width: 500}, 1000);
+ $( "#effect" ).animate({
+ backgroundColor: "#aa0000",
+ color: "#fff",
+ width: 500
+ }, 1000 );
},
function() {
- $("#effect").animate({backgroundColor: '#fff', color: '#000', width: 240}, 1000);
+ $( "#effect" ).animate({
+ backgroundColor: "#fff",
+ color: "#000",
+ width: 240
+ }, 1000 );
}
);
});
@@ -43,10 +51,10 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Click the button above to preview the effect.</p>
+<div class="demo-description">
+<p>Click the button above to preview the effect.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/animate/index.html b/demos/animate/index.html
index 0e9af371f..f5bd6a0e4 100644
--- a/demos/animate/index.html
+++ b/demos/animate/index.html
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Effects Demos</title>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <link rel="stylesheet" href="../demos.css">
</head>
<body>
diff --git a/demos/autocomplete/categories.html b/demos/autocomplete/categories.html
index 2a2ac2f48..163c969dd 100644
--- a/demos/autocomplete/categories.html
+++ b/demos/autocomplete/categories.html
@@ -1,26 +1,26 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
- <title>jQuery UI Autocomplete Custom Data Demo</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.menu.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.autocomplete.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <meta charset="utf-8">
+ <title>jQuery UI Autocomplete - Categories</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.position.js"></script>
+ <script src="../../ui/jquery.ui.menu.js"></script>
+ <script src="../../ui/jquery.ui.autocomplete.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
.ui-autocomplete-category {
- font-weight:bold;
- padding:.2em .4em;
- margin:.8em 0 .2em;
- line-height:1.5;
+ font-weight: bold;
+ padding: .2em .4em;
+ margin: .8em 0 .2em;
+ line-height: 1.5;
}
</style>
- <script type="text/javascript">
- $.widget("custom.catcomplete", $.ui.autocomplete, {
+ <script>
+ $.widget( "custom.catcomplete", $.ui.autocomplete, {
_renderMenu: function( ul, items ) {
var self = this,
currentCategory = "";
@@ -34,7 +34,7 @@
}
});
</script>
- <script type="text/javascript">
+ <script>
$(function() {
var data = [
{ label: "anders", category: "" },
@@ -48,7 +48,7 @@
{ label: "andreas johnson", category: "People" }
];
- $('#search').catcomplete({
+ $( "#search" ).catcomplete({
delay: 0,
source: data
});
@@ -62,10 +62,10 @@
<input id="search" />
</div><!-- End demo -->
+
+
<div class="demo-description">
-<p>
- A categorized search result. Try typing "a" or "n".
-</p>
+<p>A categorized search result. Try typing "a" or "n".</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/autocomplete/combobox.html b/demos/autocomplete/combobox.html
index 0ca32775b..f74f0f106 100644
--- a/demos/autocomplete/combobox.html
+++ b/demos/autocomplete/combobox.html
@@ -1,90 +1,126 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
- <title>jQuery UI Autocomplete Combobox Demo</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.menu.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.autocomplete.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
- /* TODO shouldn't be necessary */
- .ui-button { margin-left: -1px; }
- .ui-button-icon-only .ui-button-text { padding: 0.35em; }
- .ui-autocomplete-input { margin: 0; padding: 0.48em 0 0.47em 0.45em; }
+ <meta charset="utf-8">
+ <title>jQuery UI Autocomplete - Combobox</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.button.js"></script>
+ <script src="../../ui/jquery.ui.position.js"></script>
+ <script src="../../ui/jquery.ui.menu.js"></script>
+ <script src="../../ui/jquery.ui.autocomplete.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
+ .ui-button { margin-left: -1px; }
+ .ui-button-icon-only .ui-button-text { padding: 0.35em; }
+ .ui-autocomplete-input { margin: 0; padding: 0.48em 0 0.47em 0.45em; }
</style>
- <script type="text/javascript">
- (function($) {
- $.widget("ui.combobox", {
+ <script>
+ (function( $ ) {
+ $.widget( "ui.combobox", {
_create: function() {
- var self = this;
- var select = this.element.hide();
- var input = $("<input>")
- .insertAfter(select)
+ var self = this,
+ select = this.element.hide(),
+ selected = select.children( ":selected" ),
+ value = selected.val() ? selected.text() : "";
+ var input = this.input = $( "<input>" )
+ .insertAfter( select )
+ .val( value )
.autocomplete({
- source: function(request, response) {
- var matcher = new RegExp(request.term, "i");
- response(select.children("option").map(function() {
- var text = $(this).text();
- if (this.value && (!request.term || matcher.test(text)))
+ delay: 0,
+ minLength: 0,
+ source: function( request, response ) {
+ var matcher = new RegExp( $.ui.autocomplete.escapeRegex(request.term), "i" );
+ response( select.children( "option" ).map(function() {
+ var text = $( this ).text();
+ if ( this.value && ( !request.term || matcher.test(text) ) )
return {
- id: this.value,
- label: text.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + $.ui.autocomplete.escapeRegex(request.term) + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>"),
- value: text
+ label: text.replace(
+ new RegExp(
+ "(?![^&;]+;)(?!<[^<>]*)(" +
+ $.ui.autocomplete.escapeRegex(request.term) +
+ ")(?![^<>]*>)(?![^&;]+;)", "gi"
+ ), "<strong>$1</strong>" ),
+ value: text,
+ option: this
};
- }));
+ }) );
},
- delay: 0,
- change: function(event, ui) {
- if (!ui.item) {
- // remove invalid value, as it didn't match anything
- $(this).val("");
- return false;
- }
- select.val(ui.item.id);
- self._trigger("selected", event, {
- item: select.find("[value='" + ui.item.id + "']")
+ select: function( event, ui ) {
+ ui.item.option.selected = true;
+ self._trigger( "selected", event, {
+ item: ui.item.option
});
-
},
- minLength: 0
+ change: function( event, ui ) {
+ if ( !ui.item ) {
+ var matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex( $(this).val() ) + "$", "i" ),
+ valid = false;
+ select.children( "option" ).each(function() {
+ if ( $( this ).text().match( matcher ) ) {
+ this.selected = valid = true;
+ return false;
+ }
+ });
+ if ( !valid ) {
+ // remove invalid value, as it didn't match anything
+ $( this ).val( "" );
+ select.val( "" );
+ input.data( "autocomplete" ).term = "";
+ return false;
+ }
+ }
+ }
+ })
+ .addClass( "ui-widget ui-widget-content ui-corner-left" );
+
+ input.data( "autocomplete" )._renderItem = function( ul, item ) {
+ return $( "<li></li>" )
+ .data( "item.autocomplete", item )
+ .append( "<a>" + item.label + "</a>" )
+ .appendTo( ul );
+ };
+
+ this.button = $( "<button type='button'>&nbsp;</button>" )
+ .attr( "tabIndex", -1 )
+ .attr( "title", "Show All Items" )
+ .insertAfter( input )
+ .button({
+ icons: {
+ primary: "ui-icon-triangle-1-s"
+ },
+ text: false
})
- .addClass("ui-widget ui-widget-content ui-corner-left");
- $("<button>&nbsp;</button>")
- .attr("tabIndex", -1)
- .attr("title", "Show All Items")
- .insertAfter(input)
- .button({
- icons: {
- primary: "ui-icon-triangle-1-s"
- },
- text: false
- }).removeClass("ui-corner-all")
- .addClass("ui-corner-right ui-button-icon")
- .click(function() {
- // close if already visible
- if (input.autocomplete("widget").is(":visible")) {
- input.autocomplete("close");
- return;
- }
- // pass empty string as value to search for, displaying all results
- input.autocomplete("search", "");
- input.focus();
- });
+ .removeClass( "ui-corner-all" )
+ .addClass( "ui-corner-right ui-button-icon" )
+ .click(function() {
+ // close if already visible
+ if ( input.autocomplete( "widget" ).is( ":visible" ) ) {
+ input.autocomplete( "close" );
+ return;
+ }
+
+ // pass empty string as value to search for, displaying all results
+ input.autocomplete( "search", "" );
+ input.focus();
+ });
+ },
+
+ destroy: function() {
+ this.input.remove();
+ this.button.remove();
+ this.element.show();
+ $.Widget.prototype.destroy.call( this );
}
});
+ })( jQuery );
- })(jQuery);
-
$(function() {
- $("#combobox").combobox();
- $("#toggle").click(function() {
- $("#combobox").toggle();
+ $( "#combobox" ).combobox();
+ $( "#toggle" ).click(function() {
+ $( "#combobox" ).toggle();
});
});
</script>
@@ -97,32 +133,39 @@
<label>Your preferred programming language: </label>
<select id="combobox">
<option value="">Select one...</option>
- <option value="a">asp</option>
- <option value="c">c</option>
- <option value="cpp">c++</option>
- <option value="cf">coldfusion</option>
- <option value="g">groovy</option>
- <option value="h">haskell</option>
- <option value="j">java</option>
- <option value="js">javascript</option>
- <option value="p1">perl</option>
- <option value="p2">php</option>
- <option value="p3">python</option>
- <option value="r">ruby</option>
- <option value="s">scala</option>
+ <option value="ActionScript">ActionScript</option>
+ <option value="AppleScript">AppleScript</option>
+ <option value="Asp">Asp</option>
+ <option value="BASIC">BASIC</option>
+ <option value="C">C</option>
+ <option value="C++">C++</option>
+ <option value="Clojure">Clojure</option>
+ <option value="COBOL">COBOL</option>
+ <option value="ColdFusion">ColdFusion</option>
+ <option value="Erlang">Erlang</option>
+ <option value="Fortran">Fortran</option>
+ <option value="Groovy">Groovy</option>
+ <option value="Haskell">Haskell</option>
+ <option value="Java">Java</option>
+ <option value="JavaScript">JavaScript</option>
+ <option value="Lisp">Lisp</option>
+ <option value="Perl">Perl</option>
+ <option value="PHP">PHP</option>
+ <option value="Python">Python</option>
+ <option value="Ruby">Ruby</option>
+ <option value="Scala">Scala</option>
+ <option value="Scheme">Scheme</option>
</select>
</div>
<button id="toggle">Show underlying select</button>
</div><!-- End demo -->
+
+
<div class="demo-description">
-<p>
-A custom widget built by composition of Autocomplete and Button. You can either type something into the field to get filtered suggestions based on your input, or use the button to get the full list of selections.
-</p>
-<p>
-The input is read from an existing select-element for progressive enhancement, passed to Autocomplete with a customized source-option.
-</p>
+<p>A custom widget built by composition of Autocomplete and Button. You can either type something into the field to get filtered suggestions based on your input, or use the button to get the full list of selections.</p>
+<p>The input is read from an existing select-element for progressive enhancement, passed to Autocomplete with a customized source-option.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/autocomplete/custom-data.html b/demos/autocomplete/custom-data.html
index 92263332d..8a3a0b235 100644
--- a/demos/autocomplete/custom-data.html
+++ b/demos/autocomplete/custom-data.html
@@ -1,17 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
- <title>jQuery UI Autocomplete Custom Data Demo</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.menu.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.autocomplete.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <meta charset="utf-8">
+ <title>jQuery UI Autocomplete - Custom data and display</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.position.js"></script>
+ <script src="../../ui/jquery.ui.menu.js"></script>
+ <script src="../../ui/jquery.ui.autocomplete.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
#project-label {
display: block;
font-weight: bold;
@@ -27,42 +27,42 @@
padding: 0;
}
</style>
- <script type="text/javascript">
+ <script>
$(function() {
var projects = [
{
- value: 'jquery',
- label: 'jQuery',
- desc: 'the write less, do more, JavaScript library',
- icon: 'jquery_32x32.png'
+ value: "jquery",
+ label: "jQuery",
+ desc: "the write less, do more, JavaScript library",
+ icon: "jquery_32x32.png"
},
{
- value: 'jquery-ui',
- label: 'jQuery UI',
- desc: 'the official user interface library for jQuery',
- icon: 'jqueryui_32x32.png'
+ value: "jquery-ui",
+ label: "jQuery UI",
+ desc: "the official user interface library for jQuery",
+ icon: "jqueryui_32x32.png"
},
{
- value: 'sizzlejs',
- label: 'Sizzle JS',
- desc: 'a pure-JavaScript CSS selector engine',
- icon: 'sizzlejs_32x32.png'
+ value: "sizzlejs",
+ label: "Sizzle JS",
+ desc: "a pure-JavaScript CSS selector engine",
+ icon: "sizzlejs_32x32.png"
}
];
-
- $('#project').autocomplete({
+
+ $( "#project" ).autocomplete({
minLength: 0,
source: projects,
- focus: function(event, ui) {
- $('#project').val(ui.item.label);
+ focus: function( event, ui ) {
+ $( "#project" ).val( ui.item.label );
return false;
},
- select: function(event, ui) {
- $('#project').val(ui.item.label);
- $('#project-id').val(ui.item.value);
- $('#project-description').html(ui.item.desc);
- $('#project-icon').attr('src', '../images/' + ui.item.icon);
-
+ select: function( event, ui ) {
+ $( "#project" ).val( ui.item.label );
+ $( "#project-id" ).val( ui.item.value );
+ $( "#project-description" ).html( ui.item.desc );
+ $( "#project-icon" ).attr( "src", "images/" + ui.item.icon );
+
return false;
}
})
@@ -79,19 +79,17 @@
<div class="demo">
<div id="project-label">Select a project (type "j" for a start):</div>
- <img id="project-icon" src="../images/transparent_1x1.png" class="ui-state-default"/>
+ <img id="project-icon" src="images/transparent_1x1.png" class="ui-state-default"/>
<input id="project"/>
<input type="hidden" id="project-id"/>
<p id="project-description"></p>
</div><!-- End demo -->
+
+
<div class="demo-description">
-<p>
-You can use your own custom data formats and displays by simply overriding the default focus and select actions.
-</p>
-<p>
-Try typing "j" to get a list of projects or just press the down arrow.
-</p>
+<p>You can use your own custom data formats and displays by simply overriding the default focus and select actions.</p>
+<p>Try typing "j" to get a list of projects or just press the down arrow.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/autocomplete/default.html b/demos/autocomplete/default.html
index 4d476d9a6..9de61467f 100644
--- a/demos/autocomplete/default.html
+++ b/demos/autocomplete/default.html
@@ -1,20 +1,43 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
- <title>jQuery UI Autocomplete Default Demo</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.menu.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.autocomplete.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <meta charset="utf-8">
+ <title>jQuery UI Autocomplete - Default functionality</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.position.js"></script>
+ <script src="../../ui/jquery.ui.menu.js"></script>
+ <script src="../../ui/jquery.ui.autocomplete.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- var availableTags = ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby", "python", "c", "scala", "groovy", "haskell", "perl"];
- $("#tags").autocomplete({
+ var availableTags = [
+ "ActionScript",
+ "AppleScript",
+ "Asp",
+ "BASIC",
+ "C",
+ "C++",
+ "Clojure",
+ "COBOL",
+ "ColdFusion",
+ "Erlang",
+ "Fortran",
+ "Groovy",
+ "Haskell",
+ "Java",
+ "JavaScript",
+ "Lisp",
+ "Perl",
+ "PHP",
+ "Python",
+ "Ruby",
+ "Scala",
+ "Scheme"
+ ];
+ $( "#tags" ).autocomplete({
source: availableTags
});
});
@@ -31,13 +54,11 @@
</div><!-- End demo -->
+
+
<div class="demo-description">
-<p>
-The Autocomplete widgets provides suggestions while you type into the field. Here the suggestions are tags for programming languages, give "ja" (for Java or JavaScript) a try.
-</p>
-<p>
-The datasource is a simple JavaScript array, provided to the widget using the source-option.
-</p>
+<p>The Autocomplete widgets provides suggestions while you type into the field. Here the suggestions are tags for programming languages, give "ja" (for Java or JavaScript) a try.</p>
+<p>The datasource is a simple JavaScript array, provided to the widget using the source-option.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/autocomplete/folding.html b/demos/autocomplete/folding.html
index 5b665237e..cea358a8d 100644
--- a/demos/autocomplete/folding.html
+++ b/demos/autocomplete/folding.html
@@ -1,26 +1,26 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
- <title>jQuery UI Autocomplete Accent Folding Demo</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.menu.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.autocomplete.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <meta charset="utf-8">
+ <title>jQuery UI Autocomplete - Accent folding</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.position.js"></script>
+ <script src="../../ui/jquery.ui.menu.js"></script>
+ <script src="../../ui/jquery.ui.autocomplete.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
var names = [ "Jörn Zaefferer", "Scott González", "John Resig" ];
var accentMap = {
- 'á':'a',
- 'ö':'o'
+ "á": "a",
+ "ö": "o"
};
var normalize = function( term ) {
- var ret = '';
+ var ret = "";
for ( var i = 0; i < term.length; i++ ) {
ret += accentMap[ term.charAt(i) ] || term.charAt(i);
}
@@ -52,13 +52,11 @@
</div><!-- End demo -->
+
+
<div class="demo-description">
-<p>
-The autocomplete field uses a custom source option which will match results that have accented characters even when the text field doesn't contain accented characters. However if the you type in accented characters in the text field it is smart enough not to show results that aren't accented.
-</p>
-<p>
-Try typing "Jo" to see "John" and "Jörn", then type "Jö" to see only "Jörn".
-</p>
+<p>The autocomplete field uses a custom source option which will match results that have accented characters even when the text field doesn't contain accented characters. However if the you type in accented characters in the text field it is smart enough not to show results that aren't accented.</p>
+<p>Try typing "Jo" to see "John" and "Jörn", then type "Jö" to see only "Jörn".</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/autocomplete/images/jquery_32x32.png b/demos/autocomplete/images/jquery_32x32.png
new file mode 100644
index 000000000..9312f02d5
--- /dev/null
+++ b/demos/autocomplete/images/jquery_32x32.png
Binary files differ
diff --git a/demos/autocomplete/images/jqueryui_32x32.png b/demos/autocomplete/images/jqueryui_32x32.png
new file mode 100644
index 000000000..e003d16c1
--- /dev/null
+++ b/demos/autocomplete/images/jqueryui_32x32.png
Binary files differ
diff --git a/demos/autocomplete/images/sizzlejs_32x32.png b/demos/autocomplete/images/sizzlejs_32x32.png
new file mode 100644
index 000000000..4ce0704d1
--- /dev/null
+++ b/demos/autocomplete/images/sizzlejs_32x32.png
Binary files differ
diff --git a/demos/autocomplete/images/transparent_1x1.png b/demos/autocomplete/images/transparent_1x1.png
new file mode 100644
index 000000000..c2da5b889
--- /dev/null
+++ b/demos/autocomplete/images/transparent_1x1.png
Binary files differ
diff --git a/demos/autocomplete/images/ui-anim_basic_16x16.gif b/demos/autocomplete/images/ui-anim_basic_16x16.gif
new file mode 100644
index 000000000..084ecb879
--- /dev/null
+++ b/demos/autocomplete/images/ui-anim_basic_16x16.gif
Binary files differ
diff --git a/demos/autocomplete/index.html b/demos/autocomplete/index.html
index ba96d994e..77f801996 100644
--- a/demos/autocomplete/index.html
+++ b/demos/autocomplete/index.html
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Autocomplete Demos</title>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <link rel="stylesheet" href="../demos.css">
</head>
<body>
<div class="demos-nav">
@@ -13,10 +13,12 @@
<li><a href="remote.html">Remote datasource</a></li>
<li><a href="remote-with-cache.html">Remote with caching</a></li>
<li><a href="remote-jsonp.html">Remote JSONP datasource</a></li>
+ <li><a href="maxheight.html">Scrollable results</a></li>
<li><a href="combobox.html">Combobox</a></li>
<li><a href="custom-data.html">Custom data and display</a></li>
<li><a href="xml.html">XML data parsed once</a></li>
<li><a href="categories.html">Categories</a></li>
+ <li><a href="folding.html">Accent folding</a></li>
<li><a href="multiple.html">Multiple values</a></li>
<li><a href="multiple-remote.html">Multiple, remote</a></li>
</ul>
diff --git a/demos/autocomplete/maxheight.html b/demos/autocomplete/maxheight.html
new file mode 100644
index 000000000..7e0e0f903
--- /dev/null
+++ b/demos/autocomplete/maxheight.html
@@ -0,0 +1,79 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>jQuery UI Autocomplete - Scrollable results</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.position.js"></script>
+ <script src="../../ui/jquery.ui.autocomplete.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
+ .ui-autocomplete {
+ max-height: 100px;
+ overflow-y: auto;
+ /* prevent horizontal scrollbar */
+ overflow-x: hidden;
+ /* add padding to account for vertical scrollbar */
+ padding-right: 20px;
+ }
+ /* IE 6 doesn't support max-height
+ * we use height instead, but this forces the menu to always be this tall
+ */
+ * html .ui-autocomplete {
+ height: 100px;
+ }
+ </style>
+ <script>
+ $(function() {
+ var availableTags = [
+ "ActionScript",
+ "AppleScript",
+ "Asp",
+ "BASIC",
+ "C",
+ "C++",
+ "Clojure",
+ "COBOL",
+ "ColdFusion",
+ "Erlang",
+ "Fortran",
+ "Groovy",
+ "Haskell",
+ "Java",
+ "JavaScript",
+ "Lisp",
+ "Perl",
+ "PHP",
+ "Python",
+ "Ruby",
+ "Scala",
+ "Scheme"
+ ];
+ $( "#tags" ).autocomplete({
+ source: availableTags
+ });
+ });
+ </script>
+</head>
+<body>
+
+<div class="demo">
+
+<div class="ui-widget">
+ <label for="tags">Tags: </label>
+ <input id="tags" />
+</div>
+
+</div><!-- End demo -->
+
+
+
+<div class="demo-description">
+<p>When displaying a long list of options, you can simply set the max-height for the autocomplete menu to prevent the menu from growing too large. Try typing "a" or "s" above to get a long list of results that you can scroll through.</p>
+</div><!-- End demo-description -->
+
+</body>
+</html>
diff --git a/demos/autocomplete/multiple-remote.html b/demos/autocomplete/multiple-remote.html
index 5855ce0fb..f0ea7aafd 100644
--- a/demos/autocomplete/multiple-remote.html
+++ b/demos/autocomplete/multiple-remote.html
@@ -1,54 +1,66 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
- <title>jQuery UI Autocomplete multiple demo</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.menu.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.autocomplete.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+<<<<<<< HEAD
+ <meta charset="utf-8">
+ <title>jQuery UI Autocomplete - Multiple, remote</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.position.js"></script>
+ <script src="../../ui/jquery.ui.menu.js"></script>
+ <script src="../../ui/jquery.ui.autocomplete.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
+ .ui-autocomplete-loading { background: white url('images/ui-anim_basic_16x16.gif') right center no-repeat; }
+ </style>
+ <script>
$(function() {
- function split(val) {
- return val.split(/,\s*/);
+ function split( val ) {
+ return val.split( /,\s*/ );
}
- function extractLast(term) {
- return split(term).pop();
+ function extractLast( term ) {
+ return split( term ).pop();
}
-
- $("#birds").autocomplete({
- source: function(request, response) {
- $.getJSON("search.php", {
- term: extractLast(request.term)
- }, response);
- },
- search: function() {
- // custom minLength
- var term = extractLast(this.value);
- if (term.length < 2) {
+
+ $( "#birds" )
+ // don't navigate away from the field on tab when selecting an item
+ .bind( "keydown", function( event ) {
+ if ( event.keyCode === $.ui.keyCode.TAB &&
+ $( this ).data( "autocomplete" ).menu.active ) {
+ event.preventDefault();
+ }
+ })
+ .autocomplete({
+ source: function( request, response ) {
+ $.getJSON( "search.php", {
+ term: extractLast( request.term )
+ }, response );
+ },
+ search: function() {
+ // custom minLength
+ var term = extractLast( this.value );
+ if ( term.length < 2 ) {
+ return false;
+ }
+ },
+ focus: function() {
+ // prevent value inserted on focus
+ return false;
+ },
+ select: function( event, ui ) {
+ var terms = split( this.value );
+ // remove the current input
+ terms.pop();
+ // add the selected item
+ terms.push( ui.item.value );
+ // add placeholder to get the comma-and-space at the end
+ terms.push( "" );
+ this.value = terms.join( ", " );
return false;
}
- },
- focus: function() {
- // prevent value inserted on focus
- return false;
- },
- select: function(event, ui) {
- var terms = split( this.value );
- // remove the current input
- terms.pop();
- // add the selected item
- terms.push( ui.item.value );
- // add placeholder to get the comma-and-space at the end
- terms.push("");
- this.value = terms.join(", ");
- return false;
- }
- });
+ });
});
</script>
</head>
@@ -63,13 +75,11 @@
</div><!-- End demo -->
+
+
<div class="demo-description">
-<p>
-Usage: Enter at least two characters to get bird name suggestions. Select a value to continue adding more names.
-</p>
-<p>
-This is an example showing how to use the source-option along with some events to enable autocompleting multiple values into a single field.
-</p>
+<p>Usage: Enter at least two characters to get bird name suggestions. Select a value to continue adding more names.</p>
+<p>This is an example showing how to use the source-option along with some events to enable autocompleting multiple values into a single field.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/autocomplete/multiple.html b/demos/autocomplete/multiple.html
index fe353255d..0b8e14478 100644
--- a/demos/autocomplete/multiple.html
+++ b/demos/autocomplete/multiple.html
@@ -1,48 +1,80 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
- <title>jQuery UI Autocomplete multiple demo</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.menu.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.autocomplete.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <meta charset="utf-8">
+ <title>jQuery UI Autocomplete - Multiple values</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.position.js"></script>
+ <script src="../../ui/jquery.ui.menu.js"></script>
+ <script src="../../ui/jquery.ui.autocomplete.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- var availableTags = ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby", "python", "c", "scala", "groovy", "haskell", "perl"];
- function split(val) {
- return val.split(/,\s*/);
+ var availableTags = [
+ "ActionScript",
+ "AppleScript",
+ "Asp",
+ "BASIC",
+ "C",
+ "C++",
+ "Clojure",
+ "COBOL",
+ "ColdFusion",
+ "Erlang",
+ "Fortran",
+ "Groovy",
+ "Haskell",
+ "Java",
+ "JavaScript",
+ "Lisp",
+ "Perl",
+ "PHP",
+ "Python",
+ "Ruby",
+ "Scala",
+ "Scheme"
+ ];
+ function split( val ) {
+ return val.split( /,\s*/ );
}
- function extractLast(term) {
- return split(term).pop();
+ function extractLast( term ) {
+ return split( term ).pop();
}
-
- $("#tags").autocomplete({
- minLength: 0,
- source: function(request, response) {
- // delegate back to autocomplete, but extract the last term
- response($.ui.autocomplete.filter(availableTags, extractLast(request.term)));
- },
- focus: function() {
- // prevent value inserted on focus
- return false;
- },
- select: function(event, ui) {
- var terms = split( this.value );
- // remove the current input
- terms.pop();
- // add the selected item
- terms.push( ui.item.value );
- // add placeholder to get the comma-and-space at the end
- terms.push("");
- this.value = terms.join(", ");
- return false;
- }
- });
+
+ $( "#tags" )
+ // don't navigate away from the field on tab when selecting an item
+ .bind( "keydown", function( event ) {
+ if ( event.keyCode === $.ui.keyCode.TAB &&
+ $( this ).data( "autocomplete" ).menu.active ) {
+ event.preventDefault();
+ }
+ })
+ .autocomplete({
+ minLength: 0,
+ source: function( request, response ) {
+ // delegate back to autocomplete, but extract the last term
+ response( $.ui.autocomplete.filter(
+ availableTags, extractLast( request.term ) ) );
+ },
+ focus: function() {
+ // prevent value inserted on focus
+ return false;
+ },
+ select: function( event, ui ) {
+ var terms = split( this.value );
+ // remove the current input
+ terms.pop();
+ // add the selected item
+ terms.push( ui.item.value );
+ // add placeholder to get the comma-and-space at the end
+ terms.push( "" );
+ this.value = terms.join( ", " );
+ return false;
+ }
+ });
});
</script>
</head>
@@ -57,13 +89,11 @@
</div><!-- End demo -->
+
+
<div class="demo-description">
-<p>
-Usage: Type something, eg. "j" to see suggestions for tagging with programming languages. Select a value, then continue typing to add more.
-</p>
-<p>
-This is an example showing how to use the source-option along with some events to enable autocompleting multiple values into a single field.
-</p>
+<p>Usage: Type something, eg. "j" to see suggestions for tagging with programming languages. Select a value, then continue typing to add more.</p>
+<p>This is an example showing how to use the source-option along with some events to enable autocompleting multiple values into a single field.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/autocomplete/remote-jsonp.html b/demos/autocomplete/remote-jsonp.html
index 6de227d33..986e9f0f0 100644
--- a/demos/autocomplete/remote-jsonp.html
+++ b/demos/autocomplete/remote-jsonp.html
@@ -1,25 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
- <title>jQuery UI Autocomplete Remote JSONP datasource demo</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.menu.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.autocomplete.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <meta charset="utf-8">
+ <title>jQuery UI Autocomplete - Remote JSONP datasource</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.position.js"></script>
+ <script src="../../ui/jquery.ui.menu.js"></script>
+ <script src="../../ui/jquery.ui.autocomplete.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
+ .ui-autocomplete-loading { background: white url('images/ui-anim_basic_16x16.gif') right center no-repeat; }
+ #city { width: 25em; }
+ </style>
+ <script>
$(function() {
- function log(message) {
- $("<div/>").text(message).prependTo("#log");
- $("#log").attr("scrollTop", 0);
+ function log( message ) {
+ $( "<div/>" ).text( message ).prependTo( "#log" );
+ $( "#log" ).attr( "scrollTop", 0 );
}
-
- $("#city").autocomplete({
- source: function(request, response) {
+
+ $( "#city" ).autocomplete({
+ source: function( request, response ) {
$.ajax({
url: "http://ws.geonames.org/searchJSON",
dataType: "jsonp",
@@ -29,33 +33,31 @@
maxRows: 12,
name_startsWith: request.term
},
- success: function(data) {
- response($.map(data.geonames, function(item) {
+ success: function( data ) {
+ response( $.map( data.geonames, function( item ) {
return {
label: item.name + (item.adminName1 ? ", " + item.adminName1 : "") + ", " + item.countryName,
value: item.name
}
- }))
+ }));
}
- })
+ });
},
minLength: 2,
- select: function(event, ui) {
- log(ui.item ? ("Selected: " + ui.item.label) : "Nothing selected, input was " + this.value);
+ select: function( event, ui ) {
+ log( ui.item ?
+ "Selected: " + ui.item.label :
+ "Nothing selected, input was " + this.value);
},
open: function() {
- $(this).removeClass("ui-corner-all").addClass("ui-corner-top");
+ $( this ).removeClass( "ui-corner-all" ).addClass( "ui-corner-top" );
},
close: function() {
- $(this).removeClass("ui-corner-top").addClass("ui-corner-all");
+ $( this ).removeClass( "ui-corner-top" ).addClass( "ui-corner-all" );
}
});
});
</script>
- <style>
- .ui-autocomplete-loading { background: url(indicator.gif) no-repeat right; }
- #city { width: 25em; }
- </style>
</head>
<body>
@@ -74,13 +76,11 @@
</div><!-- End demo -->
+
+
<div class="demo-description">
-<p>
-The Autocomplete widgets provides suggestions while you type into the field. Here the suggestions are cities, displayed when at least two characters are entered into the field.
-</p>
-<p>
-In this case, the datasource is the <a href="http://geonames.org">geonames.org webservice</a>. While only the city name itself ends up in the input after selecting an element, more info is displayed in the suggestions to help find the right entry. That data is also available in callbacks, as illustrated by the Result area below the input.
-</p>
+<p>The Autocomplete widgets provides suggestions while you type into the field. Here the suggestions are cities, displayed when at least two characters are entered into the field.</p>
+<p>In this case, the datasource is the <a href="http://geonames.org">geonames.org webservice</a>. While only the city name itself ends up in the input after selecting an element, more info is displayed in the suggestions to help find the right entry. That data is also available in callbacks, as illustrated by the Result area below the input.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/autocomplete/remote-with-cache.html b/demos/autocomplete/remote-with-cache.html
index 664a9989e..a6b02f255 100644
--- a/demos/autocomplete/remote-with-cache.html
+++ b/demos/autocomplete/remote-with-cache.html
@@ -1,48 +1,38 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
- <title>jQuery UI Autocomplete Remote with caching demo</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.menu.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.autocomplete.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <meta charset="utf-8">
+ <title>jQuery UI Autocomplete - Remote with caching</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.position.js"></script>
+ <script src="../../ui/jquery.ui.menu.js"></script>
+ <script src="../../ui/jquery.ui.autocomplete.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
+ .ui-autocomplete-loading { background: white url('images/ui-anim_basic_16x16.gif') right center no-repeat; }
+ </style>
+ <script>
$(function() {
- function log(message) {
- $("<div/>").text(message).prependTo("#log");
- $("#log").attr("scrollTop", 0);
- }
-
- var cache = {};
- $("#birds").autocomplete({
- source: function(request, response) {
- if (cache.term == request.term && cache.content) {
- response(cache.content);
- return;
- }
- if (new RegExp(cache.term).test(request.term) && cache.content && cache.content.length < 13) {
- response($.ui.autocomplete.filter(cache.content, request.term));
+ var cache = {},
+ lastXhr;
+ $( "#birds" ).autocomplete({
+ minLength: 2,
+ source: function( request, response ) {
+ var term = request.term;
+ if ( term in cache ) {
+ response( cache[ term ] );
return;
}
- $.ajax({
- url: "search.php",
- dataType: "json",
- data: request,
- success: function(data) {
- cache.term = request.term;
- cache.content = data;
- response(data);
+
+ lastXhr = $.getJSON( "search.php", request, function( data, status, xhr ) {
+ cache[ term ] = data;
+ if ( xhr === lastXhr ) {
+ response( data );
}
});
- },
- minLength: 2,
- select: function(event, ui) {
- log(ui.item ? ("Selected: " + ui.item.value + " aka " + ui.item.id) : "Nothing selected, input was " + this.value);
}
});
});
@@ -57,20 +47,13 @@
<input id="birds" />
</div>
-<div class="ui-widget" style="margin-top:2em; font-family:Arial">
- Result:
- <div id="log" style="height: 200px; width: 300px; overflow: auto;" class="ui-widget-content"></div>
-</div>
-
</div><!-- End demo -->
+
+
<div class="demo-description">
-<p>
-The Autocomplete widgets provides suggestions while you type into the field. Here the suggestions are bird names, displayed when at least two characters are entered into the field.
-</p>
-<p>
-Similar to the remote datasource demo, though this adds some local caching to improve performance. The cache here saves just one query, and could be extended to cache multiple values, one for each term.
-</p>
+<p>The Autocomplete widgets provides suggestions while you type into the field. Here the suggestions are bird names, displayed when at least two characters are entered into the field.</p>
+<p>Similar to the remote datasource demo, though this adds some local caching to improve performance. The cache here saves just one query, and could be extended to cache multiple values, one for each term.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/autocomplete/remote.html b/demos/autocomplete/remote.html
index 8b800b2d8..c8ee849fe 100644
--- a/demos/autocomplete/remote.html
+++ b/demos/autocomplete/remote.html
@@ -1,28 +1,33 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
- <title>jQuery UI Autocomplete Remote datasource demo</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.menu.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.autocomplete.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <meta charset="utf-8">
+ <title>jQuery UI Autocomplete - Remote datasource</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.position.js"></script>
+ <script src="../../ui/jquery.ui.menu.js"></script>
+ <script src="../../ui/jquery.ui.autocomplete.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
+ .ui-autocomplete-loading { background: white url('images/ui-anim_basic_16x16.gif') right center no-repeat; }
+ </style>
+ <script>
$(function() {
- function log(message) {
- $("<div/>").text(message).prependTo("#log");
- $("#log").attr("scrollTop", 0);
+ function log( message ) {
+ $( "<div/>" ).text( message ).prependTo( "#log" );
+ $( "#log" ).attr( "scrollTop", 0 );
}
-
- $("#birds").autocomplete({
+
+ $( "#birds" ).autocomplete({
source: "search.php",
minLength: 2,
- select: function(event, ui) {
- log(ui.item ? ("Selected: " + ui.item.value + " aka " + ui.item.id) : "Nothing selected, input was " + this.value);
+ select: function( event, ui ) {
+ log( ui.item ?
+ "Selected: " + ui.item.value + " aka " + ui.item.id :
+ "Nothing selected, input was " + this.value );
}
});
});
@@ -44,13 +49,11 @@
</div><!-- End demo -->
+
+
<div class="demo-description">
-<p>
-The Autocomplete widgets provides suggestions while you type into the field. Here the suggestions are bird names, displayed when at least two characters are entered into the field.
-</p>
-<p>
-The datasource is a server-side script which returns JSON data, specified via a simple URL for the source-option. In addition, the minLength-option is set to 2 to avoid queries that would return too many results and the select-event is used to display some feedback.
-</p>
+<p>The Autocomplete widgets provides suggestions while you type into the field. Here the suggestions are bird names, displayed when at least two characters are entered into the field.</p>
+<p>The datasource is a server-side script which returns JSON data, specified via a simple URL for the source-option. In addition, the minLength-option is set to 2 to avoid queries that would return too many results and the select-event is used to display some feedback.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/autocomplete/search.php b/demos/autocomplete/search.php
index 01206489a..8fa9d28f8 100644
--- a/demos/autocomplete/search.php
+++ b/demos/autocomplete/search.php
@@ -3,8 +3,8 @@
$q = strtolower($_GET["term"]);
if (!$q) return;
$items = array(
-"Great <em>Bittern</em>"=>"Botaurus stellaris",
-"Little <em>Grebe</em>"=>"Tachybaptus ruficollis",
+"Great Bittern"=>"Botaurus stellaris",
+"Little Grebe"=>"Tachybaptus ruficollis",
"Black-necked Grebe"=>"Podiceps nigricollis",
"Little Bittern"=>"Ixobrychus minutus",
"Black-crowned Night Heron"=>"Nycticorax nycticorax",
diff --git a/demos/autocomplete/xml.html b/demos/autocomplete/xml.html
index 83ffcf5c9..fff432e58 100644
--- a/demos/autocomplete/xml.html
+++ b/demos/autocomplete/xml.html
@@ -1,43 +1,48 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
- <title>jQuery UI Autocomplete Remote datasource demo</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.menu.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.autocomplete.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <meta charset="utf-8">
+ <title>jQuery UI Autocomplete - XML data parsed once</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.position.js"></script>
+ <script src="../../ui/jquery.ui.menu.js"></script>
+ <script src="../../ui/jquery.ui.autocomplete.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
+ .ui-autocomplete-loading { background: white url('images/ui-anim_basic_16x16.gif') right center no-repeat; }
+ </style>
+ <script>
$(function() {
- function log(message) {
- $("<div/>").text(message).prependTo("#log");
- $("#log").attr("scrollTop", 0);
+ function log( message ) {
+ $( "<div/>" ).text( message ).prependTo( "#log" );
+ $( "#log" ).attr( "scrollTop", 0 );
}
-
+
$.ajax({
url: "london.xml",
dataType: "xml",
- success: function(xmlResponse) {
- var data = $("geoname", xmlResponse).map(function() {
+ success: function( xmlResponse ) {
+ var data = $( "geoname", xmlResponse ).map(function() {
return {
- value: $("name", this).text() + ", " + ($.trim($("countryName", this).text()) || "(unknown country)"),
- id: $("geonameId", this).text()
+ value: $( "name", this ).text() + ", " +
+ ( $.trim( $( "countryName", this ).text() ) || "(unknown country)" ),
+ id: $( "geonameId", this ).text()
};
}).get();
- $("#birds").autocomplete({
+ $( "#birds" ).autocomplete({
source: data,
minLength: 0,
- select: function(event, ui) {
- log(ui.item ? ("Selected: " + ui.item.value + ", geonameId: " + ui.item.id) : "Nothing selected, input was " + this.value);
+ select: function( event, ui ) {
+ log( ui.item ?
+ "Selected: " + ui.item.value + ", geonameId: " + ui.item.id :
+ "Nothing selected, input was " + this.value );
}
});
}
- })
-
+ });
});
</script>
</head>
@@ -57,13 +62,11 @@
</div><!-- End demo -->
+
+
<div class="demo-description">
-<p>
-This demo shows how to retrieve some XML data, parse it using jQuery's methods, then provide it to the autocomplete as the datasource.
-</p>
-<p>
-This should also serve as a reference on how to parse a remote XML datasource - the parsing would just happen for each request within the source-callback.
-</p>
+<p>This demo shows how to retrieve some XML data, parse it using jQuery's methods, then provide it to the autocomplete as the datasource.</p>
+<p>This should also serve as a reference on how to parse a remote XML datasource - the parsing would just happen for each request within the source-callback.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/button/checkbox.html b/demos/button/checkbox.html
index b6192ee28..13af61ff9 100644
--- a/demos/button/checkbox.html
+++ b/demos/button/checkbox.html
@@ -1,49 +1,44 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
- <title>jQuery UI Button - Checkboxes demo</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <meta charset="utf-8">
+ <title>jQuery UI Button - Checkboxes</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.button.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- $("#check").button();
- $("#format").buttonset();
+ $( "#check" ).button();
+ $( "#format" ).buttonset();
});
</script>
<style>
- #format { margin-top: 2em; }
+ #format { margin-top: 2em; }
</style>
</head>
<body>
<div class="demo">
- <input type="checkbox" id="check" /><label for="check">Toggle</label>
-
- <div id="format">
- <input type="checkbox" id="check1" /><label for="check1">B</label>
- <input type="checkbox" id="check2" /><label for="check2">I</label>
- <input type="checkbox" id="check3" /><label for="check3">U</label>
- </div>
+<input type="checkbox" id="check" /><label for="check">Toggle</label>
+
+<div id="format">
+ <input type="checkbox" id="check1" /><label for="check1">B</label>
+ <input type="checkbox" id="check2" /><label for="check2">I</label>
+ <input type="checkbox" id="check3" /><label for="check3">U</label>
+</div>
</div><!-- End demo -->
<div class="demo-description">
-
<p>A checkbox is styled as a toggle button with the button widget. The label element associated with the checkbox is used for the button text.</p>
-
<p>This demo also demonstrates three checkboxes styled as a button set by calling <code>.buttonset()</code> on a common container.</p>
-
</div><!-- End demo-description -->
-
-
</body>
</html>
diff --git a/demos/button/default.html b/demos/button/default.html
index 700c64bcc..f11fba2f7 100644
--- a/demos/button/default.html
+++ b/demos/button/default.html
@@ -1,46 +1,38 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
- <title>jQuery UI Button - Default demo</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <meta charset="utf-8">
+ <title>jQuery UI Button - Default functionality</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.button.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- $("button, input:submit, a", ".demo").button();
-
- $("a", ".demo").click(function() { return false; });
+ $( "button, input:submit, a", ".demo" ).button();
+ $( "a", ".demo" ).click(function() { return false; });
});
</script>
- <style>
-
- </style>
</head>
<body>
<div class="demo">
- <button>A button element</button>
-
- <input type="submit" value="A submit button"/>
-
- <a href="#">An anchor</a>
+<button>A button element</button>
+
+<input type="submit" value="A submit button"/>
+
+<a href="#">An anchor</a>
</div><!-- End demo -->
<div class="demo-description">
-
<p>Examples of the markup that can be used for buttons: A button element, an input of type submit and an anchor.</p>
-
</div><!-- End demo-description -->
-
-
</body>
</html>
diff --git a/demos/button/icons.html b/demos/button/icons.html
index 2dc11c5d8..423a19fcc 100644
--- a/demos/button/icons.html
+++ b/demos/button/icons.html
@@ -1,63 +1,56 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
- <title>jQuery UI Button - Icons demo</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <meta charset="utf-8">
+ <title>jQuery UI Button - Icons</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.button.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- $(".demo button:first").button({
+ $( ".demo button:first" ).button({
icons: {
- primary: 'ui-icon-locked'
+ primary: "ui-icon-locked"
},
text: false
}).next().button({
icons: {
- primary: 'ui-icon-locked'
+ primary: "ui-icon-locked"
}
}).next().button({
icons: {
- primary: 'ui-icon-gear',
- secondary: 'ui-icon-triangle-1-s'
+ primary: "ui-icon-gear",
+ secondary: "ui-icon-triangle-1-s"
}
}).next().button({
icons: {
- primary: 'ui-icon-gear',
- secondary: 'ui-icon-triangle-1-s'
+ primary: "ui-icon-gear",
+ secondary: "ui-icon-triangle-1-s"
},
text: false
});
});
</script>
- <style>
-
- </style>
</head>
<body>
<div class="demo">
- <button>Button with icon only</button>
- <button>Button with icon on the left</button>
- <button>Button with two icons</button>
- <button>Button with two icons and no text</button>
+<button>Button with icon only</button>
+<button>Button with icon on the left</button>
+<button>Button with two icons</button>
+<button>Button with two icons and no text</button>
</div><!-- End demo -->
<div class="demo-description">
-
<p>Some buttons with various combinations of text and icons, here specified via metadata.</p>
-
</div><!-- End demo-description -->
-
-
</body>
</html>
diff --git a/demos/button/index.html b/demos/button/index.html
index c2b37200d..23977c820 100644
--- a/demos/button/index.html
+++ b/demos/button/index.html
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Button Demos</title>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <link rel="stylesheet" href="../demos.css">
</head>
<body>
diff --git a/demos/button/radio.html b/demos/button/radio.html
index 3e5dc2379..5c1f87da1 100644
--- a/demos/button/radio.html
+++ b/demos/button/radio.html
@@ -1,46 +1,39 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
- <title>jQuery UI Button - Radio Buttons demo</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <meta charset="utf-8">
+ <title>jQuery UI Button - Radios</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.button.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- $("#radio").buttonset();
+ $( "#radio" ).buttonset();
});
</script>
- <style>
-
- </style>
</head>
<body>
<div class="demo">
- <form>
- <div id="radio">
- <input type="radio" id="radio1" name="radio" /><label for="radio1">Choice 1</label>
- <input type="radio" id="radio2" name="radio" checked="checked" /><label for="radio2">Choice 2</label>
- <input type="radio" id="radio3" name="radio" /><label for="radio3">Choice 3</label>
- </div>
- </form>
+<form>
+ <div id="radio">
+ <input type="radio" id="radio1" name="radio" /><label for="radio1">Choice 1</label>
+ <input type="radio" id="radio2" name="radio" checked="checked" /><label for="radio2">Choice 2</label>
+ <input type="radio" id="radio3" name="radio" /><label for="radio3">Choice 3</label>
+ </div>
+</form>
</div><!-- End demo -->
<div class="demo-description">
-
<p>A set of three radio buttons transformed into a button set.</p>
-
</div><!-- End demo-description -->
-
-
</body>
</html>
diff --git a/demos/button/splitbutton.html b/demos/button/splitbutton.html
index a6d1f47cd..8baf12f00 100644
--- a/demos/button/splitbutton.html
+++ b/demos/button/splitbutton.html
@@ -1,21 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
- <title>jQuery UI Button - Default demo</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.menu.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <meta charset="utf-8">
+ <title>jQuery UI Button - Split button</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.button.js"></script>
+ <script src="../../ui/jquery.ui.position.js"></script>
+ <script src="../../ui/jquery.ui.menu.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- $("#rerun")
+ $( "#rerun" )
.button()
- .click( function() {
+ .click(function() {
alert( "Running the last action" );
})
.next()
@@ -74,7 +74,5 @@ and no text. Both are grouped together in a set.</p>
</div><!-- End demo-description -->
-
-
</body>
</html>
diff --git a/demos/button/toolbar.html b/demos/button/toolbar.html
index 5573872a7..647c4fca8 100644
--- a/demos/button/toolbar.html
+++ b/demos/button/toolbar.html
@@ -1,86 +1,86 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
- <title>jQuery UI Button - Toolbar demo</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <meta charset="utf-8">
+ <title>jQuery UI Button - Toolbar</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.button.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
#toolbar {
padding: 10px 4px;
}
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $('#beginning').button({
+ $( "#beginning" ).button({
text: false,
icons: {
- primary: 'ui-icon-seek-start'
+ primary: "ui-icon-seek-start"
}
});
- $('#rewind').button({
+ $( "#rewind" ).button({
text: false,
icons: {
- primary: 'ui-icon-seek-prev'
+ primary: "ui-icon-seek-prev"
}
});
- $('#play').button({
+ $( "#play" ).button({
text: false,
icons: {
- primary: 'ui-icon-play'
+ primary: "ui-icon-play"
}
})
.click(function() {
var options;
- if ($(this).text() == 'play') {
+ if ( $( this ).text() === "play" ) {
options = {
- label: 'pause',
+ label: "pause",
icons: {
- primary: 'ui-icon-pause'
+ primary: "ui-icon-pause"
}
};
} else {
options = {
- label: 'play',
+ label: "play",
icons: {
- primary: 'ui-icon-play'
+ primary: "ui-icon-play"
}
};
}
- $(this).button('option', options);
+ $( this ).button( "option", options );
});
- $('#stop').button({
+ $( "#stop" ).button({
text: false,
icons: {
- primary: 'ui-icon-stop'
+ primary: "ui-icon-stop"
}
})
.click(function() {
- $('#play').button('option', {
- label: 'play',
+ $( "#play" ).button( "option", {
+ label: "play",
icons: {
- primary: 'ui-icon-play'
+ primary: "ui-icon-play"
}
});
});
- $('#forward').button({
+ $( "#forward" ).button({
text: false,
icons: {
- primary: 'ui-icon-seek-next'
+ primary: "ui-icon-seek-next"
}
});
- $('#end').button({
+ $( "#end" ).button({
text: false,
icons: {
- primary: 'ui-icon-seek-end'
+ primary: "ui-icon-seek-end"
}
});
- $("#shuffle").button();
- $("#repeat").buttonset();
+ $( "#shuffle" ).button();
+ $( "#repeat" ).buttonset();
});
</script>
</head>
@@ -88,37 +88,33 @@
<div class="demo">
- <span id="toolbar" class="ui-widget-header ui-corner-all">
- <button id="beginning">go to beginning</button>
- <button id="rewind">rewind</button>
- <button id="play">play</button>
- <button id="stop">stop</button>
- <button id="forward">fast forward</button>
- <button id="end">go to end</button>
-
- <input type="checkbox" id="shuffle" /><label for="shuffle">Shuffle</label>
-
- <span id="repeat">
- <input type="radio" id="repeat0" name="repeat" checked="checked" /><label for="repeat0">No Repeat</label>
- <input type="radio" id="repeat1" name="repeat" /><label for="repeat1">Once</label>
- <input type="radio" id="repeatall" name="repeat" /><label for="repeatall">All</label>
- </span>
+<span id="toolbar" class="ui-widget-header ui-corner-all">
+ <button id="beginning">go to beginning</button>
+ <button id="rewind">rewind</button>
+ <button id="play">play</button>
+ <button id="stop">stop</button>
+ <button id="forward">fast forward</button>
+ <button id="end">go to end</button>
+
+ <input type="checkbox" id="shuffle" /><label for="shuffle">Shuffle</label>
+
+ <span id="repeat">
+ <input type="radio" id="repeat0" name="repeat" checked="checked" /><label for="repeat0">No Repeat</label>
+ <input type="radio" id="repeat1" name="repeat" /><label for="repeat1">Once</label>
+ <input type="radio" id="repeatall" name="repeat" /><label for="repeatall">All</label>
</span>
+</span>
</div><!-- End demo -->
<div class="demo-description">
-
<p>
A mediaplayer toolbar. Take a look at the underlying markup: A few button elements,
an input of type checkbox for the Shuffle button, and three inputs of type radio for the Repeat options.
</p>
-
</div><!-- End demo-description -->
-
-
</body>
</html>
diff --git a/demos/datepicker/alt-field.html b/demos/datepicker/alt-field.html
index d51bf0634..aade17748 100644
--- a/demos/datepicker/alt-field.html
+++ b/demos/datepicker/alt-field.html
@@ -1,17 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Datepicker - Populate alternate field</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.datepicker.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.datepicker.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- $("#datepicker").datepicker({altField: '#alternate', altFormat: 'DD, d MM, yy'});
+ $( "#datepicker" ).datepicker({
+ altField: "#alternate",
+ altFormat: "DD, d MM, yy"
+ });
});
</script>
</head>
@@ -23,10 +26,10 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Populate an alternate field with its own date format whenever a date is selected using the <code>altField</code> and <code>altFormat</code> options. This feature could be used to present a human-friendly date for user selection, while passing a more computer-friendly date through for further processing.</p>
+<div class="demo-description">
+<p>Populate an alternate field with its own date format whenever a date is selected using the <code>altField</code> and <code>altFormat</code> options. This feature could be used to present a human-friendly date for user selection, while passing a more computer-friendly date through for further processing.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/datepicker/animation.html b/demos/datepicker/animation.html
index 27f20ffb8..3bfa66730 100644
--- a/demos/datepicker/animation.html
+++ b/demos/datepicker/animation.html
@@ -1,25 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Datepicker - Animations</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.effects.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.effects.blind.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.effects.bounce.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.effects.clip.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.effects.drop.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.effects.fold.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.effects.slide.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.datepicker.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.effects.core.js"></script>
+ <script src="../../ui/jquery.effects.blind.js"></script>
+ <script src="../../ui/jquery.effects.bounce.js"></script>
+ <script src="../../ui/jquery.effects.clip.js"></script>
+ <script src="../../ui/jquery.effects.drop.js"></script>
+ <script src="../../ui/jquery.effects.fold.js"></script>
+ <script src="../../ui/jquery.effects.slide.js"></script>
+ <script src="../../ui/jquery.ui.datepicker.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- $("#datepicker").datepicker();
- $("#anim").change(function() { $('#datepicker').datepicker('option', {showAnim: $(this).val()}); });
+ $( "#datepicker" ).datepicker();
+ $( "#anim" ).change(function() {
+ $( "#datepicker" ).datepicker( "option", "showAnim", $( this ).val() );
+ });
});
</script>
</head>
@@ -34,22 +36,22 @@
<option value="show">Show (default)</option>
<option value="slideDown">Slide down</option>
<option value="fadeIn">Fade in</option>
- <!-- <option value="blind">Blind (UI Effect)</option>
+ <option value="blind">Blind (UI Effect)</option>
<option value="bounce">Bounce (UI Effect)</option>
<option value="clip">Clip (UI Effect)</option>
<option value="drop">Drop (UI Effect)</option>
<option value="fold">Fold (UI Effect)</option>
- <option value="slide">Slide (UI Effect)</option> -->
+ <option value="slide">Slide (UI Effect)</option>
<option value="">None</option>
</select>
</p>
</div><!-- End demo -->
-<div class="demo-description">
-<p>Use different animations when opening or closing the datepicker. Choose an animation from the dropdown, then click on the input to see its effect. You can use one of the three standard animations or any of the UI Effects.</p>
+<div class="demo-description">
+<p>Use different animations when opening or closing the datepicker. Choose an animation from the dropdown, then click on the input to see its effect. You can use one of the three standard animations or any of the UI Effects.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/datepicker/buttonbar.html b/demos/datepicker/buttonbar.html
index 6cd4dbedc..4e95b1c16 100644
--- a/demos/datepicker/buttonbar.html
+++ b/demos/datepicker/buttonbar.html
@@ -1,17 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Datepicker - Display button bar</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.datepicker.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.datepicker.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- $('#datepicker').datepicker({
+ $( "#datepicker" ).datepicker({
showButtonPanel: true
});
});
@@ -25,10 +25,10 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Display a button for selecting Today's date and a Done button for closing the calendar with the boolean <code>showButtonPanel</code> option. Each button is enabled by default when the bar is displayed, but can be turned off with additional options. Button text is customizable.</p>
+<div class="demo-description">
+<p>Display a button for selecting Today's date and a Done button for closing the calendar with the boolean <code>showButtonPanel</code> option. Each button is enabled by default when the bar is displayed, but can be turned off with additional options. Button text is customizable.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/datepicker/date-formats.html b/demos/datepicker/date-formats.html
index 435ef7096..e208cf62b 100644
--- a/demos/datepicker/date-formats.html
+++ b/demos/datepicker/date-formats.html
@@ -1,18 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Datepicker - Format date</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.datepicker.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.datepicker.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- $("#datepicker").datepicker();
- $("#format").change(function() { $('#datepicker').datepicker('option', {dateFormat: $(this).val()}); });
+ $( "#datepicker" ).datepicker();
+ $( "#format" ).change(function() {
+ $( "#datepicker" ).datepicker( "option", "dateFormat", $( this ).val() );
+ });
});
</script>
</head>
@@ -35,10 +37,10 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Display date feedback in a variety of ways. Choose a date format from the dropdown, then click on the input and select a date to see it in that format.</p>
+<div class="demo-description">
+<p>Display date feedback in a variety of ways. Choose a date format from the dropdown, then click on the input and select a date to see it in that format.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/datepicker/date-range.html b/demos/datepicker/date-range.html
new file mode 100644
index 000000000..1e3beb2a2
--- /dev/null
+++ b/demos/datepicker/date-range.html
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>jQuery UI Datepicker - Select a Date Range</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.datepicker.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
+ $(function() {
+ var dates = $( "#from, #to" ).datepicker({
+ defaultDate: "+1w",
+ changeMonth: true,
+ numberOfMonths: 3,
+ onSelect: function( selectedDate ) {
+ var option = this.id == "from" ? "minDate" : "maxDate",
+ instance = $( this ).data( "datepicker" );
+ date = $.datepicker.parseDate(
+ instance.settings.dateFormat ||
+ $.datepicker._defaults.dateFormat,
+ selectedDate, instance.settings );
+ dates.not( this ).datepicker( "option", option, date );
+ }
+ });
+ });
+ </script>
+</head>
+<body>
+
+<div class="demo">
+
+<label for="from">From</label>
+<input type="text" id="from" name="from"/>
+<label for="to">to</label>
+<input type="text" id="to" name="to"/>
+
+</div><!-- End demo -->
+
+
+
+<div class="demo-description">
+<p>Select the date range to search for.</p>
+</div><!-- End demo-description -->
+
+</body>
+</html>
diff --git a/demos/datepicker/default.html b/demos/datepicker/default.html
index 4ab50e174..5b87830a1 100644
--- a/demos/datepicker/default.html
+++ b/demos/datepicker/default.html
@@ -1,17 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Datepicker - Default functionality</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.datepicker.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.datepicker.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- $("#datepicker").datepicker();
+ $( "#datepicker" ).datepicker();
});
</script>
</head>
@@ -23,10 +23,10 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>The datepicker is tied to a standard form input field. Focus on the input (click, or use the tab key) to open an interactive calendar in a small overlay. Choose a date, click elsewhere on the page (blur the input), or hit the Esc key to close. If a date is chosen, feedback is shown as the input's value.</p>
+<div class="demo-description">
+<p>The datepicker is tied to a standard form input field. Focus on the input (click, or use the tab key) to open an interactive calendar in a small overlay. Choose a date, click elsewhere on the page (blur the input), or hit the Esc key to close. If a date is chosen, feedback is shown as the input's value.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/datepicker/dropdown-month-year.html b/demos/datepicker/dropdown-month-year.html
index c31d8ba85..db833db84 100644
--- a/demos/datepicker/dropdown-month-year.html
+++ b/demos/datepicker/dropdown-month-year.html
@@ -1,17 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Datepicker - Display month &amp; year menus</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.datepicker.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.datepicker.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- $('#datepicker').datepicker({
+ $( "#datepicker" ).datepicker({
changeMonth: true,
changeYear: true
});
@@ -26,10 +26,10 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Show month and year dropdowns in place of the static month/year header to facilitate navigation through large timeframes. Add the boolean <code>changeMonth</code> and <code>changeYear</code> options.</p>
+<div class="demo-description">
+<p>Show month and year dropdowns in place of the static month/year header to facilitate navigation through large timeframes. Add the boolean <code>changeMonth</code> and <code>changeYear</code> options.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/datepicker/event-search.html b/demos/datepicker/event-search.html
deleted file mode 100644
index c87ae17a4..000000000
--- a/demos/datepicker/event-search.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="UTF-8" />
- <title>jQuery UI Datepicker - Display multiple months</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.datepicker.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
- $(function() {
- var dates = $('#from, #to').datepicker({
- defaultDate: "+1w",
- changeMonth: true,
- numberOfMonths: 3,
- onSelect: function(selectedDate) {
- var option = this.id == "from" ? "minDate" : "maxDate";
- var instance = $(this).data("datepicker");
- var date = $.datepicker.parseDate(instance.settings.dateFormat || $.datepicker._defaults.dateFormat, selectedDate, instance.settings);
- dates.not(this).datepicker("option", option, date);
- }
- });
- });
- </script>
-</head>
-<body>
-
-<div class="demo">
-
-<label for="from">From</label>
-<input type="text" id="from" name="from"/>
-<label for="to">to</label>
-<input type="text" id="to" name="to"/>
-
-</div><!-- End demo -->
-
-<div class="demo-description">
-
-<p>Select the date range to search for.</p>
-
-</div><!-- End demo-description -->
-
-</body>
-</html>
diff --git a/demos/datepicker/icon-trigger.html b/demos/datepicker/icon-trigger.html
index 6da3a7792..95da8dd4b 100644
--- a/demos/datepicker/icon-trigger.html
+++ b/demos/datepicker/icon-trigger.html
@@ -1,19 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Datepicker - Icon trigger</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.datepicker.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.datepicker.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- $("#datepicker").datepicker({
- showOn: 'button',
- buttonImage: 'images/calendar.gif',
+ $( "#datepicker" ).datepicker({
+ showOn: "button",
+ buttonImage: "images/calendar.gif",
buttonImageOnly: true
});
});
@@ -27,10 +27,10 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Click the icon next to the input field to show the datepicker. Set the datepicker to open on focus (default behavior), on icon click, or both.</p>
+<div class="demo-description">
+<p>Click the icon next to the input field to show the datepicker. Set the datepicker to open on focus (default behavior), on icon click, or both.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/datepicker/index.html b/demos/datepicker/index.html
index 5749ae757..ed2477402 100644
--- a/demos/datepicker/index.html
+++ b/demos/datepicker/index.html
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Datepicker Demos</title>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <link rel="stylesheet" href="../demos.css">
</head>
<body>
@@ -23,7 +23,7 @@
<li><a href="multiple-calendars.html">Display multiple months</a></li>
<li><a href="icon-trigger.html">Icon trigger</a></li>
<li><a href="animation.html">Animations</a></li>
- <li><a href="event-search.html">Event Search</a></li>
+ <li><a href="date-range.html">Date Range</a></li>
</ul>
</div>
diff --git a/demos/datepicker/inline.html b/demos/datepicker/inline.html
index bf21fc927..8d8cac6ee 100644
--- a/demos/datepicker/inline.html
+++ b/demos/datepicker/inline.html
@@ -1,17 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Datepicker - Display inline</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.datepicker.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.datepicker.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- $("#datepicker").datepicker();
+ $( "#datepicker" ).datepicker();
});
</script>
</head>
@@ -23,10 +23,10 @@ Date: <div id="datepicker"></div>
</div><!-- End demo -->
-<div class="demo-description">
-<p>Display the datepicker embedded in the page instead of in an overlay. Simply call .datepicker() on a div instead of an input.</p>
+<div class="demo-description">
+<p>Display the datepicker embedded in the page instead of in an overlay. Simply call .datepicker() on a div instead of an input.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/datepicker/localization.html b/demos/datepicker/localization.html
index 079ae0537..9d32a4863 100644
--- a/demos/datepicker/localization.html
+++ b/demos/datepicker/localization.html
@@ -1,72 +1,76 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Datepicker - Localize calendar</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.datepicker.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-af.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-ar.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-az.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-bg.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-bs.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-ca.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-cs.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-da.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-de.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-el.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-en-GB.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-eo.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-es.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-et.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-eu.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-fa.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-fi.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-fo.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-fr.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-fr-CH.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-he.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-hr.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-hu.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-hy.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-id.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-is.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-it.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-ja.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-ko.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-lt.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-lv.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-ms.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-nl.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-no.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-pl.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-pt-BR.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-ro.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-ru.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-sk.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-sl.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-sq.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-sr.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-sr-SR.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-sv.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-ta.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-th.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-tr.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-uk.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-vi.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-zh-CN.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-zh-HK.js"></script>
- <script type="text/javascript" src="../../ui/i18n/jquery.ui.datepicker-zh-TW.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.datepicker.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-af.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-ar.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-az.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-bg.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-bs.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-ca.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-cs.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-da.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-de.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-el.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-en-GB.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-eo.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-es.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-et.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-eu.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-fa.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-fi.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-fo.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-fr.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-fr-CH.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-gl.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-he.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-hr.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-hu.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-hy.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-id.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-is.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-it.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-ja.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-ko.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-kz.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-lt.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-lv.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-ms.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-nl.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-no.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-pl.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-pt.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-pt-BR.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-ro.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-ru.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-sk.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-sl.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-sq.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-sr.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-sr-SR.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-sv.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-ta.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-th.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-tr.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-uk.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-vi.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-zh-CN.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-zh-HK.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-zh-TW.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- $.datepicker.setDefaults($.datepicker.regional['']);
- $("#datepicker").datepicker($.datepicker.regional['fr']);
- $("#locale").change(function() {
- $('#datepicker').datepicker('option', $.datepicker.regional[$(this).val()]);
+ $.datepicker.setDefaults( $.datepicker.regional[ "" ] );
+ $( "#datepicker" ).datepicker( $.datepicker.regional[ "fr" ] );
+ $( "#locale" ).change(function() {
+ $( "#datepicker" ).datepicker( "option",
+ $.datepicker.regional[ $( this ).val() ] );
});
});
</script>
@@ -90,7 +94,7 @@
<option value="zh-CN">Chinese Simplified (&#31616;&#20307;&#20013;&#25991;)</option>
<option value="zh-TW">Chinese Traditional (&#32321;&#39636;&#20013;&#25991;)</option>
<option value="hr">Croatian (Hrvatski jezik)</option>
- <option value="cs">Czech (Ce&ouml;tina)</option>
+ <option value="cs">Czech (&#269;e&#353;tina)</option>
<option value="da">Danish (Dansk)</option>
<option value="nl">Dutch (Nederlands)</option>
<option value="en-GB">English/UK</option>
@@ -101,6 +105,7 @@
<option value="fi">Finnish (suomi)</option>
<option value="fr" selected="selected">French (Fran&ccedil;ais)</option>
<option value="fr-CH">French/Swiss (Fran&ccedil;ais de Suisse)</option>
+ <option value="gl">Galician</option>
<option value="de">German (Deutsch)</option>
<option value="el">Greek (&#917;&#955;&#955;&#951;&#957;&#953;&#954;&#940;)</option>
<option value="he">Hebrew (&#8235;(&#1506;&#1489;&#1512;&#1497;&#1514;</option>
@@ -110,11 +115,13 @@
<option value="it">Italian (Italiano)</option>
<option value="ja">Japanese (&#26085;&#26412;&#35486;)</option>
<option value="ko">Korean (&#54620;&#44397;&#50612;)</option>
+ <option value="kz">Kazakhstan (Kazakh)</option>
<option value="lv">Latvian (Latvie&ouml;u Valoda)</option>
<option value="lt">Lithuanian (lietuviu kalba)</option>
<option value="ms">Malaysian (Bahasa Malaysia)</option>
<option value="no">Norwegian (Norsk)</option>
<option value="pl">Polish (Polski)</option>
+ <option value="pt">Portuguese (Portugu&ecirc;s)</option>
<option value="pt-BR">Portuguese/Brazilian (Portugu&ecirc;s)</option>
<option value="ro">Romanian (Rom&acirc;n&#259;)</option>
<option value="ru">Russian (&#1056;&#1091;&#1089;&#1089;&#1082;&#1080;&#1081;)</option>
@@ -133,10 +140,10 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Localize the datepicker calendar language and format (English / Western formatting is the default). The datepicker includes built-in support for languages that read right-to-left, such as Arabic and Hebrew.</p>
+<div class="demo-description">
+<p>Localize the datepicker calendar language and format (English / Western formatting is the default). The datepicker includes built-in support for languages that read right-to-left, such as Arabic and Hebrew.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/datepicker/min-max.html b/demos/datepicker/min-max.html
index 7573e6926..eb01daacf 100644
--- a/demos/datepicker/min-max.html
+++ b/demos/datepicker/min-max.html
@@ -1,17 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Datepicker - Restrict date range</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.datepicker.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.datepicker.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- $("#datepicker").datepicker({minDate: -20, maxDate: '+1M +10D'});
+ $( "#datepicker" ).datepicker({ minDate: -20, maxDate: "+1M +10D" });
});
</script>
</head>
@@ -23,10 +23,10 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Restrict the range of selectable dates with the <code>minDate</code> and <code>maxDate</code> options. Set the beginning and end dates as actual dates (new Date(2009, 1 - 1, 26)), as a numeric offset from today (-20), or as a string of periods and units ('+1M +10D'). For the last, use 'D' for days, 'W' for weeks, 'M' for months, or 'Y' for years.</p>
+<div class="demo-description">
+<p>Restrict the range of selectable dates with the <code>minDate</code> and <code>maxDate</code> options. Set the beginning and end dates as actual dates (new Date(2009, 1 - 1, 26)), as a numeric offset from today (-20), or as a string of periods and units ('+1M +10D'). For the last, use 'D' for days, 'W' for weeks, 'M' for months, or 'Y' for years.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/datepicker/multiple-calendars.html b/demos/datepicker/multiple-calendars.html
index 8051ca524..2098941ef 100644
--- a/demos/datepicker/multiple-calendars.html
+++ b/demos/datepicker/multiple-calendars.html
@@ -1,17 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Datepicker - Display multiple months</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.datepicker.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.datepicker.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- $('#datepicker').datepicker({
+ $( "#datepicker" ).datepicker({
numberOfMonths: 3,
showButtonPanel: true
});
@@ -26,10 +26,10 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Set the <code>numberOfMonths</code> option to an integer of 2 or more to show multiple months in a single datepicker.</p>
+<div class="demo-description">
+<p>Set the <code>numberOfMonths</code> option to an integer of 2 or more to show multiple months in a single datepicker.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/datepicker/other-months.html b/demos/datepicker/other-months.html
index 1c0b65559..ce1d63073 100644
--- a/demos/datepicker/other-months.html
+++ b/demos/datepicker/other-months.html
@@ -1,17 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Datepicker - Dates in other months</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.datepicker.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.datepicker.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- $("#datepicker").datepicker({showOtherMonths: true, selectOtherMonths: true});
+ $( "#datepicker" ).datepicker({
+ showOtherMonths: true,
+ selectOtherMonths: true
+ });
});
</script>
</head>
@@ -23,11 +26,11 @@
</div><!-- End demo -->
-<div class="demo-description">
+
+<div class="demo-description">
<p>The datepicker can show dates that come from other than the main month
being displayed. These other dates can also be made selectable.</p>
-
</div><!-- End demo-description -->
</body>
diff --git a/demos/datepicker/show-week.html b/demos/datepicker/show-week.html
index f6015a2af..5390463c4 100644
--- a/demos/datepicker/show-week.html
+++ b/demos/datepicker/show-week.html
@@ -1,17 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Datepicker - Show week of the year</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.datepicker.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.datepicker.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- $("#datepicker").datepicker({showWeek: true, firstDay: 1});
+ $( "#datepicker" ).datepicker({
+ showWeek: true,
+ firstDay: 1
+ });
});
</script>
</head>
@@ -23,13 +26,13 @@
</div><!-- End demo -->
-<div class="demo-description">
+
+<div class="demo-description">
<p>The datepicker can show the week of the year. The default calculation follows
the ISO 8601 definition: the week starts on Monday, the first week of the year
contains the first Thursday of the year. This means that some days from one
year may be placed into weeks 'belonging' to another year.</p>
-
</div><!-- End demo-description -->
</body>
diff --git a/demos/dialog/animated.html b/demos/dialog/animated.html
index 26f298acc..f96fa196d 100644
--- a/demos/dialog/animated.html
+++ b/demos/dialog/animated.html
@@ -1,34 +1,34 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Dialog - Animation</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../external/jquery.bgiframe-2.1.1.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.draggable.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.resizable.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.dialog.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.blind.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.explode.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../external/jquery.bgiframe-2.1.2.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.draggable.js"></script>
+ <script src="../../ui/jquery.ui.position.js"></script>
+ <script src="../../ui/jquery.ui.resizable.js"></script>
+ <script src="../../ui/jquery.ui.dialog.js"></script>
+ <script src="../../ui/jquery.effects.core.js"></script>
+ <script src="../../ui/jquery.effects.blind.js"></script>
+ <script src="../../ui/jquery.effects.explode.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
// increase the default animation speed to exaggerate the effect
$.fx.speeds._default = 1000;
$(function() {
- $('#dialog').dialog({
+ $( "#dialog" ).dialog({
autoOpen: false,
- show: 'blind',
- hide: 'explode'
+ show: "blind",
+ hide: "explode"
});
-
- $('#opener').click(function() {
- $('#dialog').dialog('open');
+
+ $( "#opener" ).click(function() {
+ $( "#dialog" ).dialog( "open" );
return false;
});
});
@@ -46,10 +46,10 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Dialogs may be animated by specifying an effect for the show and/or hide properties. You must include the individual effects file for any effects you would like to use.</p>
+<div class="demo-description">
+<p>Dialogs may be animated by specifying an effect for the show and/or hide properties. You must include the individual effects file for any effects you would like to use.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/dialog/default.html b/demos/dialog/default.html
index a0d4481c7..5dbea3497 100644
--- a/demos/dialog/default.html
+++ b/demos/dialog/default.html
@@ -1,22 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Dialog - Default functionality</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../external/jquery.bgiframe-2.1.1.js.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.draggable.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.resizable.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.dialog.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../external/jquery.bgiframe-2.1.2.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.draggable.js"></script>
+ <script src="../../ui/jquery.ui.position.js"></script>
+ <script src="../../ui/jquery.ui.resizable.js"></script>
+ <script src="../../ui/jquery.ui.dialog.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- $("#dialog").dialog();
+ $( "#dialog" ).dialog();
});
</script>
</head>
@@ -44,10 +44,10 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>The basic dialog window is an overlay positioned within the viewport and is protected from page content (like select elements) shining through with an iframe. It has a title bar and a content area, and can be moved, resized and closed with the 'x' icon by default.</p>
+<div class="demo-description">
+<p>The basic dialog window is an overlay positioned within the viewport and is protected from page content (like select elements) shining through with an iframe. It has a title bar and a content area, and can be moved, resized and closed with the 'x' icon by default.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/dialog/index.html b/demos/dialog/index.html
index 45d4a9f43..460e4fb36 100644
--- a/demos/dialog/index.html
+++ b/demos/dialog/index.html
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Dialog Demos</title>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <link rel="stylesheet" href="../demos.css">
</head>
<body>
diff --git a/demos/dialog/modal-confirmation.html b/demos/dialog/modal-confirmation.html
index 4affb5964..3853056f0 100644
--- a/demos/dialog/modal-confirmation.html
+++ b/demos/dialog/modal-confirmation.html
@@ -1,34 +1,34 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Dialog - Modal confirmation</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../external/jquery.bgiframe-2.1.1.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.draggable.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.dialog.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../external/jquery.bgiframe-2.1.2.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.button.js"></script>
+ <script src="../../ui/jquery.ui.draggable.js"></script>
+ <script src="../../ui/jquery.ui.position.js"></script>
+ <script src="../../ui/jquery.ui.dialog.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
// a workaround for a flaw in the demo system (http://dev.jqueryui.com/ticket/4375), ignore!
- $("#dialog").dialog("destroy");
+ $( "#dialog:ui-dialog" ).dialog( "destroy" );
- $("#dialog-confirm").dialog({
+ $( "#dialog-confirm" ).dialog({
resizable: false,
height:140,
modal: true,
buttons: {
- 'Delete all items': function() {
- $(this).dialog('close');
+ "Delete all items": function() {
+ $( this ).dialog( "close" );
},
Cancel: function() {
- $(this).dialog('close');
+ $( this ).dialog( "close" );
}
}
});
@@ -59,10 +59,10 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Confirm an action that may be destructive or important. Set the <code>modal</code> option to true, and specify primary and secondary user actions with the <code>buttons</code> option.</p>
+<div class="demo-description">
+<p>Confirm an action that may be destructive or important. Set the <code>modal</code> option to true, and specify primary and secondary user actions with the <code>buttons</code> option.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/dialog/modal-form.html b/demos/dialog/modal-form.html
index 592b4ab3c..bd8d90cfe 100644
--- a/demos/dialog/modal-form.html
+++ b/demos/dialog/modal-form.html
@@ -1,22 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Dialog - Modal form</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../external/jquery.bgiframe-2.1.1.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.draggable.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.resizable.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.dialog.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.core.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../external/jquery.bgiframe-2.1.2.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.button.js"></script>
+ <script src="../../ui/jquery.ui.draggable.js"></script>
+ <script src="../../ui/jquery.ui.position.js"></script>
+ <script src="../../ui/jquery.ui.resizable.js"></script>
+ <script src="../../ui/jquery.ui.dialog.js"></script>
+ <script src="../../ui/jquery.effects.core.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
body { font-size: 62.5%; }
label, input { display:block; }
input.text { margin-bottom:12px; width:95%; padding: .4em; }
@@ -27,97 +27,90 @@
div#users-contain table td, div#users-contain table th { border: 1px solid #eee; padding: .6em 10px; text-align: left; }
.ui-dialog .ui-state-error { padding: .3em; }
.validateTips { border: 1px solid transparent; padding: 0.3em; }
-
</style>
- <script type="text/javascript">
+ <script>
$(function() {
// a workaround for a flaw in the demo system (http://dev.jqueryui.com/ticket/4375), ignore!
- $("#dialog").dialog("destroy");
+ $( "#dialog:ui-dialog" ).dialog( "destroy" );
- var name = $("#name"),
- email = $("#email"),
- password = $("#password"),
- allFields = $([]).add(name).add(email).add(password),
- tips = $(".validateTips");
+ var name = $( "#name" ),
+ email = $( "#email" ),
+ password = $( "#password" ),
+ allFields = $( [] ).add( name ).add( email ).add( password ),
+ tips = $( ".validateTips" );
- function updateTips(t) {
+ function updateTips( t ) {
tips
- .text(t)
- .addClass('ui-state-highlight');
+ .text( t )
+ .addClass( "ui-state-highlight" );
setTimeout(function() {
- tips.removeClass('ui-state-highlight', 1500);
- }, 500);
+ tips.removeClass( "ui-state-highlight", 1500 );
+ }, 500 );
}
- function checkLength(o,n,min,max) {
-
+ function checkLength( o, n, min, max ) {
if ( o.val().length > max || o.val().length < min ) {
- o.addClass('ui-state-error');
- updateTips("Length of " + n + " must be between "+min+" and "+max+".");
+ o.addClass( "ui-state-error" );
+ updateTips( "Length of " + n + " must be between " +
+ min + " and " + max + "." );
return false;
} else {
return true;
}
-
}
- function checkRegexp(o,regexp,n) {
-
+ function checkRegexp( o, regexp, n ) {
if ( !( regexp.test( o.val() ) ) ) {
- o.addClass('ui-state-error');
- updateTips(n);
+ o.addClass( "ui-state-error" );
+ updateTips( n );
return false;
} else {
return true;
}
-
}
- $("#dialog-form").dialog({
+ $( "#dialog-form" ).dialog({
autoOpen: false,
height: 300,
width: 350,
modal: true,
buttons: {
- 'Create an account': function() {
+ "Create an account": function() {
var bValid = true;
- allFields.removeClass('ui-state-error');
+ allFields.removeClass( "ui-state-error" );
- bValid = bValid && checkLength(name,"username",3,16);
- bValid = bValid && checkLength(email,"email",6,80);
- bValid = bValid && checkLength(password,"password",5,16);
+ bValid = bValid && checkLength( name, "username", 3, 16 );
+ bValid = bValid && checkLength( email, "email", 6, 80 );
+ bValid = bValid && checkLength( password, "password", 5, 16 );
- bValid = bValid && checkRegexp(name,/^[a-z]([0-9a-z_])+$/i,"Username may consist of a-z, 0-9, underscores, begin with a letter.");
+ bValid = bValid && checkRegexp( name, /^[a-z]([0-9a-z_])+$/i, "Username may consist of a-z, 0-9, underscores, begin with a letter." );
// From jquery.validate.js (by joern), contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/
- bValid = bValid && checkRegexp(email,/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i,"eg. ui@jquery.com");
- bValid = bValid && checkRegexp(password,/^([0-9a-zA-Z])+$/,"Password field only allow : a-z 0-9");
-
- if (bValid) {
- $('#users tbody').append('<tr>' +
- '<td>' + name.val() + '</td>' +
- '<td>' + email.val() + '</td>' +
- '<td>' + password.val() + '</td>' +
- '</tr>');
- $(this).dialog('close');
+ bValid = bValid && checkRegexp( email, /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i, "eg. ui@jquery.com" );
+ bValid = bValid && checkRegexp( password, /^([0-9a-zA-Z])+$/, "Password field only allow : a-z 0-9" );
+
+ if ( bValid ) {
+ $( "#users tbody" ).append( "<tr>" +
+ "<td>" + name.val() + "</td>" +
+ "<td>" + email.val() + "</td>" +
+ "<td>" + password.val() + "</td>" +
+ "</tr>" );
+ $( this ).dialog( "close" );
}
},
Cancel: function() {
- $(this).dialog('close');
+ $( this ).dialog( "close" );
}
},
close: function() {
- allFields.val('').removeClass('ui-state-error');
+ allFields.val( "" ).removeClass( "ui-state-error" );
}
});
-
-
-
- $('#create-user')
+
+ $( "#create-user" )
.button()
.click(function() {
- $('#dialog-form').dialog('open');
+ $( "#dialog-form" ).dialog( "open" );
});
-
});
</script>
</head>
@@ -142,10 +135,7 @@
<div id="users-contain" class="ui-widget">
-
- <h1>Existing Users:</h1>
-
-
+ <h1>Existing Users:</h1>
<table id="users" class="ui-widget ui-widget-content">
<thead>
<tr class="ui-widget-header ">
@@ -167,10 +157,10 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Use a modal dialog to require that the user enter data during a multi-step process. Embed form markup in the content area, set the <code>modal</code> option to true, and specify primary and secondary user actions with the <code>buttons</code> option.</p>
+<div class="demo-description">
+<p>Use a modal dialog to require that the user enter data during a multi-step process. Embed form markup in the content area, set the <code>modal</code> option to true, and specify primary and secondary user actions with the <code>buttons</code> option.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/dialog/modal-message.html b/demos/dialog/modal-message.html
index a0ab01b21..bbac87769 100644
--- a/demos/dialog/modal-message.html
+++ b/demos/dialog/modal-message.html
@@ -1,30 +1,30 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Dialog - Modal message</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../external/jquery.bgiframe-2.1.1.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.draggable.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.resizable.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.dialog.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../external/jquery.bgiframe-2.1.2.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.button.js"></script>
+ <script src="../../ui/jquery.ui.draggable.js"></script>
+ <script src="../../ui/jquery.ui.position.js"></script>
+ <script src="../../ui/jquery.ui.resizable.js"></script>
+ <script src="../../ui/jquery.ui.dialog.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
// a workaround for a flaw in the demo system (http://dev.jqueryui.com/ticket/4375), ignore!
- $("#dialog").dialog("destroy");
+ $( "#dialog:ui-dialog" ).dialog( "destroy" );
- $("#dialog-message").dialog({
+ $( "#dialog-message" ).dialog({
modal: true,
buttons: {
Ok: function() {
- $(this).dialog('close');
+ $( this ).dialog( "close" );
}
}
});
@@ -61,10 +61,10 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Use a modal dialog to explicitly acknowledge information or an action before continuing their work. Set the <code>modal</code> option to true, and specify a primary action (Ok) with the <code>buttons</code> option.</p>
+<div class="demo-description">
+<p>Use a modal dialog to explicitly acknowledge information or an action before continuing their work. Set the <code>modal</code> option to true, and specify a primary action (Ok) with the <code>buttons</code> option.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/dialog/modal.html b/demos/dialog/modal.html
index 1eb69f028..abde0f4fe 100644
--- a/demos/dialog/modal.html
+++ b/demos/dialog/modal.html
@@ -1,25 +1,25 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Dialog - Basic modal</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../external/jquery.bgiframe-2.1.1.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.draggable.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.resizable.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.dialog.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../external/jquery.bgiframe-2.1.2.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.draggable.js"></script>
+ <script src="../../ui/jquery.ui.position.js"></script>
+ <script src="../../ui/jquery.ui.resizable.js"></script>
+ <script src="../../ui/jquery.ui.dialog.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
// a workaround for a flaw in the demo system (http://dev.jqueryui.com/ticket/4375), ignore!
- $("#dialog").dialog("destroy");
+ $( "#dialog:ui-dialog" ).dialog( "destroy" );
- $("#dialog-modal").dialog({
+ $( "#dialog-modal" ).dialog({
height: 140,
modal: true
});
@@ -28,7 +28,6 @@
</head>
<body>
-
<div class="demo">
<div id="dialog-modal" title="Basic modal dialog">
@@ -51,10 +50,10 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>A modal dialog prevents the user from interacting with the rest of the page until it is closed. To add a semi-transparent layer that dims out the page content behind the dialog, set the background color and opacity of the <code>overlay</code> option.</p>
+<div class="demo-description">
+<p>A modal dialog prevents the user from interacting with the rest of the page until it is closed.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/draggable/constrain-movement.html b/demos/draggable/constrain-movement.html
index 3bb9075e4..644802497 100644
--- a/demos/draggable/constrain-movement.html
+++ b/demos/draggable/constrain-movement.html
@@ -1,35 +1,35 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Draggable - Constrain movement</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.draggable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.draggable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
.draggable { width: 90px; height: 90px; padding: 0.5em; float: left; margin: 0 10px 10px 0; }
#draggable, #draggable2 { margin-bottom:20px; }
#draggable { cursor: n-resize; }
#draggable2 { cursor: e-resize; }
- #containment-wrapper { width: 95%; height:150px; border:2px solid #ccc; padding: 10px;}
+ #containment-wrapper { width: 95%; height:150px; border:2px solid #ccc; padding: 10px; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#draggable").draggable({ axis: 'y' });
- $("#draggable2").draggable({ axis: 'x' });
-
- $("#draggable3").draggable({ containment: '#containment-wrapper', scroll: false });
- $("#draggable4").draggable({ containment: '#demo-frame' });
- $("#draggable5").draggable({ containment: 'parent' });
+ $( "#draggable" ).draggable({ axis: "y" });
+ $( "#draggable2" ).draggable({ axis: "x" });
+ $( "#draggable3" ).draggable({ containment: "#containment-wrapper", scroll: false });
+ $( "#draggable4" ).draggable({ containment: "#demo-frame" });
+ $( "#draggable5" ).draggable({ containment: "parent" });
});
</script>
</head>
<body>
+
<div class="demo">
<h3 class="docs">Constrain movement along an axis:</h3>
@@ -59,12 +59,11 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>
-Constrain the movement of each draggable by defining the boundaries of the draggable area. Set the <code>axis</code> option to limit the draggable's path to the x- or y-axis, or use the <code>containment</code> option to specify a parent DOM element or a jQuery selector, like 'document.'
-</p>
+<div class="demo-description">
+<p>Constrain the movement of each draggable by defining the boundaries of the draggable area. Set the <code>axis</code> option to limit the draggable's path to the x- or y-axis, or use the <code>containment</code> option to specify a parent DOM element or a jQuery selector, like 'document.'</p>
</div><!-- End demo-description -->
+
</body>
</html>
diff --git a/demos/draggable/cursor-style.html b/demos/draggable/cursor-style.html
index 3263029b0..258a29b5d 100644
--- a/demos/draggable/cursor-style.html
+++ b/demos/draggable/cursor-style.html
@@ -1,27 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Draggable - Cursor style</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.draggable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.draggable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
#draggable, #draggable2, #draggable3 { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 0 10px 10px 0; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#draggable").draggable({ cursorAt: { cursor: 'move', top: 56, left: 56 } });
- $("#draggable2").draggable({ cursorAt: { cursor: 'crosshair', top: -5, left: -5 } });
- $("#draggable3").draggable({ cursorAt: { bottom: 0 } });
+ $( "#draggable" ).draggable({ cursorAt: { cursor: "move", top: 56, left: 56 } });
+ $( "#draggable2" ).draggable({ cursorAt: { cursor: "crosshair", top: -5, left: -5 } });
+ $( "#draggable3" ).draggable({ cursorAt: { bottom: 0 } });
});
</script>
</head>
<body>
+
<div class="demo">
<div id="draggable" class="ui-widget-content">
@@ -38,12 +39,11 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>
-Position the cursor while dragging the object. By default the cursor appears in the center of the dragged object; use the <code>cursorAt</code> option to specify another location relative to the draggable (specify a pixel value from the top, right, bottom, and/or left). Customize the cursor's appearance by supplying the <code>cursor</code> option with a valid CSS cursor value: default, move, pointer, crosshair, etc.
-</p>
+<div class="demo-description">
+<p>Position the cursor while dragging the object. By default the cursor appears in the center of the dragged object; use the <code>cursorAt</code> option to specify another location relative to the draggable (specify a pixel value from the top, right, bottom, and/or left). Customize the cursor's appearance by supplying the <code>cursor</code> option with a valid CSS cursor value: default, move, pointer, crosshair, etc.</p>
</div><!-- End demo-description -->
+
</body>
</html>
diff --git a/demos/draggable/default.html b/demos/draggable/default.html
index b50c54ab1..fb5e880e2 100644
--- a/demos/draggable/default.html
+++ b/demos/draggable/default.html
@@ -1,21 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Draggable - Default functionality</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.draggable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.draggable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
#draggable { width: 150px; height: 150px; padding: 0.5em; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#draggable").draggable();
+ $( "#draggable" ).draggable();
});
</script>
</head>
@@ -29,12 +29,10 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>
-Enable draggable functionality on any DOM element. Move the draggable object by clicking on it with the mouse and dragging it anywhere within the viewport.
-</p>
+<div class="demo-description">
+<p>Enable draggable functionality on any DOM element. Move the draggable object by clicking on it with the mouse and dragging it anywhere within the viewport.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/draggable/delay-start.html b/demos/draggable/delay-start.html
index c997e28e2..34dbcbdf7 100644
--- a/demos/draggable/delay-start.html
+++ b/demos/draggable/delay-start.html
@@ -1,27 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Draggable - Delay start</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.draggable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.draggable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
#draggable, #draggable2 { width: 120px; height: 120px; padding: 0.5em; float: left; margin: 0 10px 10px 0; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#draggable").draggable({ distance: 20 });
- $("#draggable2").draggable({ delay: 1000 });
- $(".ui-draggable").disableSelection();
+ $( "#draggable" ).draggable({ distance: 20 });
+ $( "#draggable2" ).draggable({ delay: 1000 });
+ $( ".ui-draggable" ).disableSelection();
});
</script>
</head>
<body>
+
<div class="demo">
<div id="draggable" class="ui-widget-content">
@@ -34,12 +35,11 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>
-Delay the start of dragging for a number of milliseconds with the <code>delay</code> option; prevent dragging until the cursor is held down and dragged a specifed number of pixels with the <code>distance</code> option.
-</p>
+<div class="demo-description">
+<p>Delay the start of dragging for a number of milliseconds with the <code>delay</code> option; prevent dragging until the cursor is held down and dragged a specifed number of pixels with the <code>distance</code> option. </p>
</div><!-- End demo-description -->
+
</body>
</html>
diff --git a/demos/draggable/events.html b/demos/draggable/events.html
index 194598ffb..accf8b562 100644
--- a/demos/draggable/events.html
+++ b/demos/draggable/events.html
@@ -1,51 +1,53 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Draggable - Events</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.draggable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
- #draggable { width: 16em; padding: 0 1em; }
- #draggable ul li { margin: 1em 0; padding: 0.5em 0; } * html #draggable ul li { height: 1%; }
- #draggable ul li span.ui-icon { float: left; }
- #draggable ul li span.count { font-weight: bold; }
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.draggable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
+ #draggable { width: 16em; padding: 0 1em; }
+ #draggable ul li { margin: 1em 0; padding: 0.5em 0; } * html #draggable ul li { height: 1%; }
+ #draggable ul li span.ui-icon { float: left; }
+ #draggable ul li span.count { font-weight: bold; }
</style>
- <script type="text/javascript">
- $(function() {
- var $start_counter = $('#event-start'), $drag_counter = $('#event-drag'), $stop_counter = $('#event-stop');
- var counts = [0,0,0];
+ <script>
+ $(function() {
+ var $start_counter = $( "#event-start" ),
+ $drag_counter = $( "#event-drag" ),
+ $stop_counter = $( "#event-stop" ),
+ counts = [ 0, 0, 0 ];
- $("#draggable").draggable({
- start: function() {
- counts[0]++;
- updateCounterStatus($start_counter,counts[0]);
- },
- drag: function() {
- counts[1]++;
- updateCounterStatus($drag_counter,counts[1]);
- },
- stop: function() {
- counts[2]++;
- updateCounterStatus($stop_counter,counts[2]);
- }
- });
+ $( "#draggable" ).draggable({
+ start: function() {
+ counts[ 0 ]++;
+ updateCounterStatus( $start_counter, counts[ 0 ] );
+ },
+ drag: function() {
+ counts[ 1 ]++;
+ updateCounterStatus( $drag_counter, counts[ 1 ] );
+ },
+ stop: function() {
+ counts[ 2 ]++;
+ updateCounterStatus( $stop_counter, counts[ 2 ] );
+ }
});
- function updateCounterStatus($event_counter,new_count) {
+ function updateCounterStatus( $event_counter, new_count ) {
// first update the status visually...
- if (!$event_counter.hasClass('ui-state-hover')) {
- $event_counter.addClass('ui-state-hover')
- .siblings().removeClass('ui-state-hover');
+ if ( !$event_counter.hasClass( "ui-state-hover" ) ) {
+ $event_counter.addClass( "ui-state-hover" )
+ .siblings().removeClass( "ui-state-hover" );
}
// ...then update the numbers
- $('span.count',$event_counter).text(new_count);
+ $( "span.count", $event_counter ).text( new_count );
}
+ });
</script>
</head>
<body>
@@ -65,12 +67,10 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>
-Layer functionality onto the draggable using the <code>start</code>, <code>drag</code>, and <code>stop</code> events. Start is fired at the start of the drag; drag during the drag; and stop when dragging stops.
-</p>
+<div class="demo-description">
+<p>Layer functionality onto the draggable using the <code>start</code>, <code>drag</code>, and <code>stop</code> events. Start is fired at the start of the drag; drag during the drag; and stop when dragging stops.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/draggable/handle.html b/demos/draggable/handle.html
index 16bd8a8d7..6a3a51c5e 100644
--- a/demos/draggable/handle.html
+++ b/demos/draggable/handle.html
@@ -1,28 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Draggable - Handles</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.draggable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.draggable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
#draggable, #draggable2 { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 0 10px 10px 0; }
#draggable p { cursor: move; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#draggable").draggable({ handle: 'p' });
- $("#draggable2").draggable({ cancel: "p.ui-widget-header" });
- $("div, p").disableSelection();
+ $( "#draggable" ).draggable({ handle: "p" });
+ $( "#draggable2" ).draggable({ cancel: "p.ui-widget-header" });
+ $( "div, p" ).disableSelection();
});
</script>
</head>
<body>
+
<div class="demo">
<div id="draggable" class="ui-widget-content">
@@ -38,11 +39,12 @@
</div><!-- End demo -->
-<div class="demo-description">
+
+<div class="demo-description">
<p>Allow dragging only when the cursor is over a specific part of the draggable. Use the <code>handle</code> option to specify the jQuery selector of an element (or group of elements) used to drag the object.</p>
<p>Or prevent dragging when the cursor is over a specific element (or group of elements) within the draggable. Use the <code>cancel</code> option to specify a jQuery selector over which to "cancel" draggable functionality.</p>
-
</div><!-- End demo-description -->
+
</body>
</html>
diff --git a/demos/draggable/index.html b/demos/draggable/index.html
index 65b900c91..0beda8e72 100644
--- a/demos/draggable/index.html
+++ b/demos/draggable/index.html
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Draggable Demos</title>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <link rel="stylesheet" href="../demos.css">
</head>
<body>
diff --git a/demos/draggable/revert.html b/demos/draggable/revert.html
index 77b79599c..7558008ad 100644
--- a/demos/draggable/revert.html
+++ b/demos/draggable/revert.html
@@ -1,26 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Draggable - Revert position</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.draggable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.draggable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
#draggable, #draggable2 { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 0 10px 10px 0; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#draggable").draggable({ revert: true });
- $("#draggable2").draggable({ revert: true, helper: 'clone' });
+ $( "#draggable" ).draggable({ revert: true });
+ $( "#draggable2" ).draggable({ revert: true, helper: "clone" });
});
</script>
</head>
<body>
+
<div class="demo">
<div id="draggable" class="ui-widget-content">
@@ -33,12 +34,11 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>
-Return the draggable (or it's helper) to its original location when dragging stops with the boolean <code>revert</code> option.
-</p>
+<div class="demo-description">
+<p>Return the draggable (or it's helper) to its original location when dragging stops with the boolean <code>revert</code> option.</p>
</div><!-- End demo-description -->
+
</body>
</html>
diff --git a/demos/draggable/scroll.html b/demos/draggable/scroll.html
index c7033b34e..943cd0ae1 100644
--- a/demos/draggable/scroll.html
+++ b/demos/draggable/scroll.html
@@ -1,27 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Draggable - Auto-scroll</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.draggable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.draggable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
#draggable, #draggable2, #draggable3 { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 0 10px 10px 0; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#draggable").draggable({ scroll: true });
- $("#draggable2").draggable({ scroll: true, scrollSensitivity: 100 });
- $("#draggable3").draggable({ scroll: true, scrollSpeed: 100 });
+ $( "#draggable" ).draggable({ scroll: true });
+ $( "#draggable2" ).draggable({ scroll: true, scrollSensitivity: 100 });
+ $( "#draggable3" ).draggable({ scroll: true, scrollSpeed: 100 });
});
</script>
</head>
<body>
+
<div class="demo">
<div id="draggable" class="ui-widget-content">
@@ -40,12 +41,11 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>
-Automatically scroll the document when the draggable is moved beyond the viewport. Set the <code>scroll</code> option to true to enable auto-scrolling, and fine-tune when scrolling is triggered and its speed with the <code>scrollSensitivity</code> and <code>scrollSpeed</code> options.
-</p>
+<div class="demo-description">
+<p>Automatically scroll the document when the draggable is moved beyond the viewport. Set the <code>scroll</code> option to true to enable auto-scrolling, and fine-tune when scrolling is triggered and its speed with the <code>scrollSensitivity</code> and <code>scrollSpeed</code> options.</p>
</div><!-- End demo-description -->
+
</body>
</html>
diff --git a/demos/draggable/snap-to.html b/demos/draggable/snap-to.html
index a9ad84642..0e4c210aa 100644
--- a/demos/draggable/snap-to.html
+++ b/demos/draggable/snap-to.html
@@ -1,31 +1,32 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Draggable - Snap to element or grid</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.draggable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.draggable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
.draggable { width: 90px; height: 80px; padding: 5px; float: left; margin: 0 10px 10px 0; font-size: .9em; }
.ui-widget-header p, .ui-widget-content p { margin: 0; }
#snaptarget { height: 140px; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#draggable").draggable({ snap: true });
- $("#draggable2").draggable({ snap: '.ui-widget-header' });
- $("#draggable3").draggable({ snap: '.ui-widget-header', snapMode: 'outer' });
- $("#draggable4").draggable({ grid: [20,20] });
- $("#draggable5").draggable({ grid: [80, 80] });
+ $( "#draggable" ).draggable({ snap: true });
+ $( "#draggable2" ).draggable({ snap: ".ui-widget-header" });
+ $( "#draggable3" ).draggable({ snap: ".ui-widget-header", snapMode: "outer" });
+ $( "#draggable4" ).draggable({ grid: [ 20,20 ] });
+ $( "#draggable5" ).draggable({ grid: [ 80, 80 ] });
});
</script>
</head>
<body>
+
<div class="demo">
<div id="snaptarget" class="ui-widget-header">
@@ -56,15 +57,12 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Snap the draggable to the inner or outer boundaries of a DOM element. Use the <code>snap</code>, <code>snapMode</code> (inner, outer, both), and <code>snapTolerance</code> (distance in pixels the draggable must be from the element when snapping is invoked) options. </p>
+<div class="demo-description">
+<p>Snap the draggable to the inner or outer boundaries of a DOM element. Use the <code>snap</code>, <code>snapMode</code> (inner, outer, both), and <code>snapTolerance</code> (distance in pixels the draggable must be from the element when snapping is invoked) options. </p>
<p>Or snap the draggable to a grid. Set the dimensions of grid cells (height and width in pixels) with the <code>grid</code> option.</p>
-
</div><!-- End demo-description -->
-
-
</body>
</html>
diff --git a/demos/draggable/sortable.html b/demos/draggable/sortable.html
index a87ddc0ef..2e526a4ce 100644
--- a/demos/draggable/sortable.html
+++ b/demos/draggable/sortable.html
@@ -1,35 +1,36 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Draggable + Sortable</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.draggable.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.sortable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.draggable.js"></script>
+ <script src="../../ui/jquery.ui.sortable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
.demo ul { list-style-type: none; margin: 0; padding: 0; margin-bottom: 10px; }
.demo li { margin: 5px; padding: 5px; width: 150px; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#sortable").sortable({
+ $( "#sortable" ).sortable({
revert: true
});
- $("#draggable").draggable({
- connectToSortable: '#sortable',
- helper: 'clone',
- revert: 'invalid'
+ $( "#draggable" ).draggable({
+ connectToSortable: "#sortable",
+ helper: "clone",
+ revert: "invalid"
});
- $("ul, li").disableSelection();
+ $( "ul, li" ).disableSelection();
});
</script>
</head>
<body>
+
<div class="demo">
<ul>
@@ -46,12 +47,11 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>
-Draggables are built to interact seamlessly with <a href="#">sortables</a>.
-</p>
+<div class="demo-description">
+<p>Draggables are built to interact seamlessly with <a href="#">sortables</a>.</p>
</div><!-- End demo-description -->
+
</body>
</html>
diff --git a/demos/draggable/visual-feedback.html b/demos/draggable/visual-feedback.html
index 4644472f0..f78c8e9f7 100644
--- a/demos/draggable/visual-feedback.html
+++ b/demos/draggable/visual-feedback.html
@@ -1,37 +1,38 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Draggable - Visual feedback</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.draggable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.draggable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
#draggable, #draggable2, #draggable3, #set div { width: 90px; height: 90px; padding: 0.5em; float: left; margin: 0 10px 10px 0; }
#draggable, #draggable2, #draggable3 { margin-bottom:20px; }
#set { clear:both; float:left; width: 368px; height: 120px; }
p { clear:both; margin:0; padding:1em 0; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#draggable").draggable({ helper: 'original' });
- $("#draggable2").draggable({ opacity: 0.7, helper: 'clone' });
- $("#draggable3").draggable({
- cursor: 'move',
+ $( "#draggable" ).draggable({ helper: "original" });
+ $( "#draggable2" ).draggable({ opacity: 0.7, helper: "clone" });
+ $( "#draggable3" ).draggable({
+ cursor: "move",
cursorAt: { top: -12, left: -20 },
- helper: function(event) {
- return $('<div class="ui-widget-header">I\'m a custom helper</div>');
+ helper: function( event ) {
+ return $( "<div class='ui-widget-header'>I'm a custom helper</div>" );
}
});
- $("#set div").draggable({ stack: '#set div' });
+ $( "#set div" ).draggable({ stack: "#set div" });
});
</script>
</head>
<body>
+
<div class="demo">
<h3 class="docs">With helpers:</h3>
@@ -65,12 +66,12 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Provide feedback to users as they drag an object in the form of a helper. The <code>helper</code> option accepts the values 'original' (the draggable object moves with the cursor), 'clone' (a duplicate of the draggable moves with the cursor), or a function that returns a DOM element (that element is shown near the cursor during drag). Control the helper's transparency with the <code>opacity</code> option.</p>
+<div class="demo-description">
+<p>Provide feedback to users as they drag an object in the form of a helper. The <code>helper</code> option accepts the values 'original' (the draggable object moves with the cursor), 'clone' (a duplicate of the draggable moves with the cursor), or a function that returns a DOM element (that element is shown near the cursor during drag). Control the helper's transparency with the <code>opacity</code> option.</p>
<p>To clarify which draggable is in play, bring the draggable in motion to front. Use the <code>zIndex</code> option to set a higher z-index for the helper, if in play, or use the <code>stack</code> option to ensure that the last item dragged will appear on top of others in the same group on drag stop.</p>
-
</div><!-- End demo-description -->
+
</body>
</html>
diff --git a/demos/droppable/accepted-elements.html b/demos/droppable/accepted-elements.html
index 0ba0207e3..18ce747e2 100644
--- a/demos/droppable/accepted-elements.html
+++ b/demos/droppable/accepted-elements.html
@@ -1,38 +1,39 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
- <title>jQuery UI Droppable - Accept Demo</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.draggable.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.droppable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <meta charset="utf-8">
+ <title>jQuery UI Droppable - Accept</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.draggable.js"></script>
+ <script src="../../ui/jquery.ui.droppable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
#droppable { width: 150px; height: 150px; padding: 0.5em; float: left; margin: 10px; }
#draggable, #draggable-nonvalid { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 10px 10px 10px 0; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
-
- $("#draggable, #draggable-nonvalid").draggable();
-
- $("#droppable").droppable({
- accept: '#draggable',
- activeClass: 'ui-state-hover',
- hoverClass: 'ui-state-active',
- drop: function(event, ui) {
- $(this).addClass('ui-state-highlight').find('p').html('Dropped!');
+ $( "#draggable, #draggable-nonvalid" ).draggable();
+ $( "#droppable" ).droppable({
+ accept: "#draggable",
+ activeClass: "ui-state-hover",
+ hoverClass: "ui-state-active",
+ drop: function( event, ui ) {
+ $( this )
+ .addClass( "ui-state-highlight" )
+ .find( "p" )
+ .html( "Dropped!" );
}
});
-
});
</script>
</head>
<body>
+
<div class="demo">
<div id="draggable-nonvalid" class="ui-widget-content">
@@ -49,10 +50,11 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Specify using the <code>accept</code> option which element (or group of elements) is accepted by the target droppable.</p>
+<div class="demo-description">
+<p>Specify using the <code>accept</code> option which element (or group of elements) is accepted by the target droppable.</p>
</div><!-- End demo-description -->
+
</body>
</html>
diff --git a/demos/droppable/default.html b/demos/droppable/default.html
index 4134dc942..6f91a3d99 100644
--- a/demos/droppable/default.html
+++ b/demos/droppable/default.html
@@ -1,33 +1,36 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
- <title>jQuery UI Droppable - Default Demo</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.draggable.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.droppable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <meta charset="utf-8">
+ <title>jQuery UI Droppable - Default functionality</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.draggable.js"></script>
+ <script src="../../ui/jquery.ui.droppable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
#draggable { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 10px 10px 10px 0; }
#droppable { width: 150px; height: 150px; padding: 0.5em; float: left; margin: 10px; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#draggable").draggable();
- $("#droppable").droppable({
- drop: function(event, ui) {
- $(this).addClass('ui-state-highlight').find('p').html('Dropped!');
+ $( "#draggable" ).draggable();
+ $( "#droppable" ).droppable({
+ drop: function( event, ui ) {
+ $( this )
+ .addClass( "ui-state-highlight" )
+ .find( "p" )
+ .html( "Dropped!" );
}
});
-
});
</script>
</head>
<body>
+
<div class="demo">
<div id="draggable" class="ui-widget-content">
@@ -40,10 +43,11 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Enable any DOM element to be droppable, a target for draggable elements.</p>
+<div class="demo-description">
+<p>Enable any DOM element to be droppable, a target for draggable elements.</p>
</div><!-- End demo-description -->
+
</body>
</html>
diff --git a/demos/droppable/images/high_tatras.jpg b/demos/droppable/images/high_tatras.jpg
index e2365c29e..5723680df 100644
--- a/demos/droppable/images/high_tatras.jpg
+++ b/demos/droppable/images/high_tatras.jpg
Binary files differ
diff --git a/demos/droppable/images/high_tatras2.jpg b/demos/droppable/images/high_tatras2.jpg
index 909024a57..1acad3afb 100644
--- a/demos/droppable/images/high_tatras2.jpg
+++ b/demos/droppable/images/high_tatras2.jpg
Binary files differ
diff --git a/demos/droppable/images/high_tatras3.jpg b/demos/droppable/images/high_tatras3.jpg
index 05a43956f..e158b1ae0 100644
--- a/demos/droppable/images/high_tatras3.jpg
+++ b/demos/droppable/images/high_tatras3.jpg
Binary files differ
diff --git a/demos/droppable/images/high_tatras4.jpg b/demos/droppable/images/high_tatras4.jpg
index ed753d1e3..da4124d88 100644
--- a/demos/droppable/images/high_tatras4.jpg
+++ b/demos/droppable/images/high_tatras4.jpg
Binary files differ
diff --git a/demos/droppable/index.html b/demos/droppable/index.html
index e0c4e6ae2..13ae9855e 100644
--- a/demos/droppable/index.html
+++ b/demos/droppable/index.html
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Droppable Demos</title>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <link rel="stylesheet" href="../demos.css">
</head>
<body>
diff --git a/demos/droppable/photo-manager.html b/demos/droppable/photo-manager.html
index a611c0c50..e1a74b08b 100644
--- a/demos/droppable/photo-manager.html
+++ b/demos/droppable/photo-manager.html
@@ -1,167 +1,184 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Droppable - Simple photo manager</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.draggable.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.droppable.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.resizable.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.dialog.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
- #gallery { float: left; width: 65%; min-height: 12em; } * html #gallery { height: 12em; } /* IE6 */
- .gallery.custom-state-active { background: #eee; }
- .gallery li { float: left; width: 96px; padding: 0.4em; margin: 0 0.4em 0.4em 0; text-align: center; }
- .gallery li h5 { margin: 0 0 0.4em; cursor: move; }
- .gallery li a { float: right; }
- .gallery li a.ui-icon-zoomin { float: left; }
- .gallery li img { width: 100%; cursor: move; }
-
- #trash { float: right; width: 32%; min-height: 18em; padding: 1%;} * html #trash { height: 18em; } /* IE6 */
- #trash h4 { line-height: 16px; margin: 0 0 0.4em; }
- #trash h4 .ui-icon { float: left; }
- #trash .gallery h5 { display: none; }
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.position.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.draggable.js"></script>
+ <script src="../../ui/jquery.ui.droppable.js"></script>
+ <script src="../../ui/jquery.ui.resizable.js"></script>
+ <script src="../../ui/jquery.ui.dialog.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
+ #gallery { float: left; width: 65%; min-height: 12em; } * html #gallery { height: 12em; } /* IE6 */
+ .gallery.custom-state-active { background: #eee; }
+ .gallery li { float: left; width: 96px; padding: 0.4em; margin: 0 0.4em 0.4em 0; text-align: center; }
+ .gallery li h5 { margin: 0 0 0.4em; cursor: move; }
+ .gallery li a { float: right; }
+ .gallery li a.ui-icon-zoomin { float: left; }
+ .gallery li img { width: 100%; cursor: move; }
+
+ #trash { float: right; width: 32%; min-height: 18em; padding: 1%;} * html #trash { height: 18em; } /* IE6 */
+ #trash h4 { line-height: 16px; margin: 0 0 0.4em; }
+ #trash h4 .ui-icon { float: left; }
+ #trash .gallery h5 { display: none; }
</style>
- <script type="text/javascript">
- $(function() {
- // there's the gallery and the trash
- var $gallery = $('#gallery'), $trash = $('#trash');
-
- // let the gallery items be draggable
- $('li',$gallery).draggable({
- cancel: 'a.ui-icon',// clicking an icon won't initiate dragging
- revert: 'invalid', // when not dropped, the item will revert back to its initial position
- containment: $('#demo-frame').length ? '#demo-frame' : 'document', // stick to demo-frame if present
- helper: 'clone',
- cursor: 'move'
- });
-
- // let the trash be droppable, accepting the gallery items
- $trash.droppable({
- accept: '#gallery > li',
- activeClass: 'ui-state-highlight',
- drop: function(ev, ui) {
- deleteImage(ui.draggable);
- }
- });
-
- // let the gallery be droppable as well, accepting items from the trash
- $gallery.droppable({
- accept: '#trash li',
- activeClass: 'custom-state-active',
- drop: function(ev, ui) {
- recycleImage(ui.draggable);
- }
- });
+ <script>
+ $(function() {
+ // there's the gallery and the trash
+ var $gallery = $( "#gallery" ),
+ $trash = $( "#trash" );
+
+ // let the gallery items be draggable
+ $( "li", $gallery ).draggable({
+ cancel: "a.ui-icon", // clicking an icon won't initiate dragging
+ revert: "invalid", // when not dropped, the item will revert back to its initial position
+ containment: $( "#demo-frame" ).length ? "#demo-frame" : "document", // stick to demo-frame if present
+ helper: "clone",
+ cursor: "move"
+ });
- // image deletion function
- var recycle_icon = '<a href="link/to/recycle/script/when/we/have/js/off" title="Recycle this image" class="ui-icon ui-icon-refresh">Recycle image</a>';
- function deleteImage($item) {
- $item.fadeOut(function() {
- var $list = $('ul',$trash).length ? $('ul',$trash) : $('<ul class="gallery ui-helper-reset"/>').appendTo($trash);
+ // let the trash be droppable, accepting the gallery items
+ $trash.droppable({
+ accept: "#gallery > li",
+ activeClass: "ui-state-highlight",
+ drop: function( event, ui ) {
+ deleteImage( ui.draggable );
+ }
+ });
- $item.find('a.ui-icon-trash').remove();
- $item.append(recycle_icon).appendTo($list).fadeIn(function() {
- $item.animate({ width: '48px' }).find('img').animate({ height: '36px' });
- });
- });
+ // let the gallery be droppable as well, accepting items from the trash
+ $gallery.droppable({
+ accept: "#trash li",
+ activeClass: "custom-state-active",
+ drop: function( event, ui ) {
+ recycleImage( ui.draggable );
}
+ });
- // image recycle function
- var trash_icon = '<a href="link/to/trash/script/when/we/have/js/off" title="Delete this image" class="ui-icon ui-icon-trash">Delete image</a>';
- function recycleImage($item) {
- $item.fadeOut(function() {
- $item.find('a.ui-icon-refresh').remove();
- $item.css('width','96px').append(trash_icon).find('img').css('height','72px').end().appendTo($gallery).fadeIn();
+ // image deletion function
+ var recycle_icon = "<a href='link/to/recycle/script/when/we/have/js/off' title='Recycle this image' class='ui-icon ui-icon-refresh'>Recycle image</a>";
+ function deleteImage( $item ) {
+ $item.fadeOut(function() {
+ var $list = $( "ul", $trash ).length ?
+ $( "ul", $trash ) :
+ $( "<ul class='gallery ui-helper-reset'/>" ).appendTo( $trash );
+
+ $item.find( "a.ui-icon-trash" ).remove();
+ $item.append( recycle_icon ).appendTo( $list ).fadeIn(function() {
+ $item
+ .animate({ width: "48px" })
+ .find( "img" )
+ .animate({ height: "36px" });
});
+ });
+ }
+
+ // image recycle function
+ var trash_icon = "<a href='link/to/trash/script/when/we/have/js/off' title='Delete this image' class='ui-icon ui-icon-trash'>Delete image</a>";
+ function recycleImage( $item ) {
+ $item.fadeOut(function() {
+ $item
+ .find( "a.ui-icon-refresh" )
+ .remove()
+ .end()
+ .css( "width", "96px")
+ .append( trash_icon )
+ .find( "img" )
+ .css( "height", "72px" )
+ .end()
+ .appendTo( $gallery )
+ .fadeIn();
+ });
+ }
+
+ // image preview function, demonstrating the ui.dialog used as a modal window
+ function viewLargerImage( $link ) {
+ var src = $link.attr( "href" ),
+ title = $link.siblings( "img" ).attr( "alt" ),
+ $modal = $( "img[src$='" + src + "']" );
+
+ if ( $modal.length ) {
+ $modal.dialog( "open" );
+ } else {
+ var img = $( "<img alt='" + title + "' width='384' height='288' style='display: none; padding: 8px;' />" )
+ .attr( "src", src ).appendTo( "body" );
+ setTimeout(function() {
+ img.dialog({
+ title: title,
+ width: 400,
+ modal: true
+ });
+ }, 1 );
}
-
- // image preview function, demonstrating the ui.dialog used as a modal window
- function viewLargerImage($link) {
- var src = $link.attr('href');
- var title = $link.siblings('img').attr('alt');
- var $modal = $('img[src$="'+src+'"]');
-
- if ($modal.length) {
- $modal.dialog('open')
- } else {
- var img = $('<img alt="'+title+'" width="384" height="288" style="display:none;padding: 8px;" />')
- .attr('src',src).appendTo('body');
- setTimeout(function() {
- img.dialog({
- title: title,
- width: 400,
- modal: true
- });
- }, 1);
- }
+ }
+
+ // resolve the icons behavior with event delegation
+ $( "ul.gallery > li" ).click(function( event ) {
+ var $item = $( this ),
+ $target = $( event.target );
+
+ if ( $target.is( "a.ui-icon-trash" ) ) {
+ deleteImage( $item );
+ } else if ( $target.is( "a.ui-icon-zoomin" ) ) {
+ viewLargerImage( $target );
+ } else if ( $target.is( "a.ui-icon-refresh" ) ) {
+ recycleImage( $item );
}
- // resolve the icons behavior with event delegation
- $('ul.gallery > li').click(function(ev) {
- var $item = $(this);
- var $target = $(ev.target);
-
- if ($target.is('a.ui-icon-trash')) {
- deleteImage($item);
- } else if ($target.is('a.ui-icon-zoomin')) {
- viewLargerImage($target);
- } else if ($target.is('a.ui-icon-refresh')) {
- recycleImage($item);
- }
-
- return false;
- });
+ return false;
});
+ });
</script>
</head>
<body>
- <div class="demo ui-widget ui-helper-clearfix">
-
- <ul id="gallery" class="gallery ui-helper-reset ui-helper-clearfix">
- <li class="ui-widget-content ui-corner-tr">
- <h5 class="ui-widget-header">High Tatras</h5>
- <img src="images/high_tatras_min.jpg" alt="The peaks of High Tatras" width="96" height="72" />
- <a href="images/high_tatras.jpg" title="View larger image" class="ui-icon ui-icon-zoomin">View larger</a>
- <a href="link/to/trash/script/when/we/have/js/off" title="Delete this image" class="ui-icon ui-icon-trash">Delete image</a>
- </li>
- <li class="ui-widget-content ui-corner-tr">
- <h5 class="ui-widget-header">High Tatras 2</h5>
- <img src="images/high_tatras2_min.jpg" alt="The chalet at the Green mountain lake" width="96" height="72" />
- <a href="images/high_tatras2.jpg" title="View larger image" class="ui-icon ui-icon-zoomin">View larger</a>
- <a href="link/to/trash/script/when/we/have/js/off" title="Delete this image" class="ui-icon ui-icon-trash">Delete image</a>
- </li>
- <li class="ui-widget-content ui-corner-tr">
- <h5 class="ui-widget-header">High Tatras 3</h5>
- <img src="images/high_tatras3_min.jpg" alt="Planning the ascent" width="96" height="72" />
- <a href="images/high_tatras3.jpg" title="View larger image" class="ui-icon ui-icon-zoomin">View larger</a>
- <a href="link/to/trash/script/when/we/have/js/off" title="Delete this image" class="ui-icon ui-icon-trash">Delete image</a>
- </li>
- <li class="ui-widget-content ui-corner-tr">
- <h5 class="ui-widget-header">High Tatras 4</h5>
- <img src="images/high_tatras4_min.jpg" alt="On top of Kozi kopka" width="96" height="72" />
- <a href="images/high_tatras4.jpg" title="View larger image" class="ui-icon ui-icon-zoomin">View larger</a>
- <a href="link/to/trash/script/when/we/have/js/off" title="Delete this image" class="ui-icon ui-icon-trash">Delete image</a>
- </li>
- </ul>
-
- <div id="trash" class="ui-widget-content ui-state-default">
- <h4 class="ui-widget-header"><span class="ui-icon ui-icon-trash">Trash</span> Trash</h4>
- </div>
-
- </div><!-- End demo -->
-
- <div class="demo-description">
-
- <p>You can delete an image either by dragging it to the Trash or by clicking the trash icon.</p>
- <p>You can "recycle" an image by dragging it back to the gallery or by clicking the recycle icon.</p>
- <p>You can view larger image by clicking the zoom icon. jQuery UI dialog widget is used for the modal window.</p>
-
- </div><!-- End demo-description -->
+
+<div class="demo ui-widget ui-helper-clearfix">
+
+<ul id="gallery" class="gallery ui-helper-reset ui-helper-clearfix">
+ <li class="ui-widget-content ui-corner-tr">
+ <h5 class="ui-widget-header">High Tatras</h5>
+ <img src="images/high_tatras_min.jpg" alt="The peaks of High Tatras" width="96" height="72" />
+ <a href="images/high_tatras.jpg" title="View larger image" class="ui-icon ui-icon-zoomin">View larger</a>
+ <a href="link/to/trash/script/when/we/have/js/off" title="Delete this image" class="ui-icon ui-icon-trash">Delete image</a>
+ </li>
+ <li class="ui-widget-content ui-corner-tr">
+ <h5 class="ui-widget-header">High Tatras 2</h5>
+ <img src="images/high_tatras2_min.jpg" alt="The chalet at the Green mountain lake" width="96" height="72" />
+ <a href="images/high_tatras2.jpg" title="View larger image" class="ui-icon ui-icon-zoomin">View larger</a>
+ <a href="link/to/trash/script/when/we/have/js/off" title="Delete this image" class="ui-icon ui-icon-trash">Delete image</a>
+ </li>
+ <li class="ui-widget-content ui-corner-tr">
+ <h5 class="ui-widget-header">High Tatras 3</h5>
+ <img src="images/high_tatras3_min.jpg" alt="Planning the ascent" width="96" height="72" />
+ <a href="images/high_tatras3.jpg" title="View larger image" class="ui-icon ui-icon-zoomin">View larger</a>
+ <a href="link/to/trash/script/when/we/have/js/off" title="Delete this image" class="ui-icon ui-icon-trash">Delete image</a>
+ </li>
+ <li class="ui-widget-content ui-corner-tr">
+ <h5 class="ui-widget-header">High Tatras 4</h5>
+ <img src="images/high_tatras4_min.jpg" alt="On top of Kozi kopka" width="96" height="72" />
+ <a href="images/high_tatras4.jpg" title="View larger image" class="ui-icon ui-icon-zoomin">View larger</a>
+ <a href="link/to/trash/script/when/we/have/js/off" title="Delete this image" class="ui-icon ui-icon-trash">Delete image</a>
+ </li>
+</ul>
+
+<div id="trash" class="ui-widget-content ui-state-default">
+ <h4 class="ui-widget-header"><span class="ui-icon ui-icon-trash">Trash</span> Trash</h4>
+</div>
+
+</div><!-- End demo -->
+
+
+<div class="demo-description">
+<p>You can delete an image either by dragging it to the Trash or by clicking the trash icon.</p>
+<p>You can "recycle" an image by dragging it back to the gallery or by clicking the recycle icon.</p>
+<p>You can view larger image by clicking the zoom icon. jQuery UI dialog widget is used for the modal window.</p>
+</div><!-- End demo-description -->
+
</body>
</html>
diff --git a/demos/droppable/propagation.html b/demos/droppable/propagation.html
index e6cf3c212..4842f0db4 100644
--- a/demos/droppable/propagation.html
+++ b/demos/droppable/propagation.html
@@ -1,48 +1,53 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Droppable - Prevent propagation</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.draggable.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.droppable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.draggable.js"></script>
+ <script src="../../ui/jquery.ui.droppable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
#draggable { width: 100px; height: 40px; padding: 0.5em; float: left; margin: 10px 10px 10px 0; }
#droppable, #droppable2 { width: 230px; height: 120px; padding: 0.5em; float: left; margin: 10px; }
#droppable-inner, #droppable2-inner { width: 170px; height: 60px; padding: 0.5em; float: left; margin: 10px; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
+ $( "#draggable" ).draggable();
- $("#draggable").draggable();
-
- $("#droppable, #droppable-inner").droppable({
- activeClass: 'ui-state-hover',
- hoverClass: 'ui-state-active',
- drop: function(event, ui) {
- $(this).addClass('ui-state-highlight').find('> p').html('Dropped!');
+ $( "#droppable, #droppable-inner" ).droppable({
+ activeClass: "ui-state-hover",
+ hoverClass: "ui-state-active",
+ drop: function( event, ui ) {
+ $( this )
+ .addClass( "ui-state-highlight" )
+ .find( "> p" )
+ .html( "Dropped!" );
return false;
}
});
- $("#droppable2, #droppable2-inner").droppable({
+ $( "#droppable2, #droppable2-inner" ).droppable({
greedy: true,
- activeClass: 'ui-state-hover',
- hoverClass: 'ui-state-active',
- drop: function(event, ui) {
- $(this).addClass('ui-state-highlight').find('> p').html('Dropped!');
+ activeClass: "ui-state-hover",
+ hoverClass: "ui-state-active",
+ drop: function( event, ui ) {
+ $( this )
+ .addClass( "ui-state-highlight" )
+ .find( "> p" )
+ .html( "Dropped!" );
}
});
-
});
</script>
</head>
<body>
+
<div class="demo">
<div id="draggable" class="ui-widget-content">
@@ -65,10 +70,11 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>When working with nested droppables &#8212; for example, you may have an editable directory structure displayed as a tree, with folder and document nodes &#8212; the <code>greedy</code> option set to true prevents event propagation when a draggable is dropped on a child node (droppable).</p>
+<div class="demo-description">
+<p>When working with nested droppables &#8212; for example, you may have an editable directory structure displayed as a tree, with folder and document nodes &#8212; the <code>greedy</code> option set to true prevents event propagation when a draggable is dropped on a child node (droppable).</p>
</div><!-- End demo-description -->
+
</body>
</html>
diff --git a/demos/droppable/revert.html b/demos/droppable/revert.html
index 1f36c7178..7bcf545fe 100644
--- a/demos/droppable/revert.html
+++ b/demos/droppable/revert.html
@@ -1,38 +1,40 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Droppable - Revert draggable position</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.draggable.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.droppable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.draggable.js"></script>
+ <script src="../../ui/jquery.ui.droppable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
#draggable, #draggable2 { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 10px 10px 10px 0; }
#droppable { width: 150px; height: 150px; padding: 0.5em; float: left; margin: 10px; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
-
- $("#draggable").draggable({ revert: 'valid' });
- $("#draggable2").draggable({ revert: 'invalid' });
-
- $("#droppable").droppable({
- activeClass: 'ui-state-hover',
- hoverClass: 'ui-state-active',
- drop: function(event, ui) {
- $(this).addClass('ui-state-highlight').find('p').html('Dropped!');
+ $( "#draggable" ).draggable({ revert: "valid" });
+ $( "#draggable2" ).draggable({ revert: "invalid" });
+
+ $( "#droppable" ).droppable({
+ activeClass: "ui-state-hover",
+ hoverClass: "ui-state-active",
+ drop: function( event, ui ) {
+ $( this )
+ .addClass( "ui-state-highlight" )
+ .find( "p" )
+ .html( "Dropped!" );
}
});
-
});
</script>
</head>
<body>
+
<div class="demo">
<div id="draggable" class="ui-widget-content">
@@ -49,10 +51,11 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Return the draggable (or it's helper) to its original location when dragging stops with the boolean <code>revert</code> option set on the draggable.</p>
+<div class="demo-description">
+<p>Return the draggable (or it's helper) to its original location when dragging stops with the boolean <code>revert</code> option set on the draggable.</p>
</div><!-- End demo-description -->
+
</body>
</html>
diff --git a/demos/droppable/shopping-cart.html b/demos/droppable/shopping-cart.html
index de8ce4fe3..39098f5d0 100644
--- a/demos/droppable/shopping-cart.html
+++ b/demos/droppable/shopping-cart.html
@@ -1,53 +1,53 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Droppable - Shopping Cart Demo</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.draggable.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.droppable.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.sortable.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.accordion.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.draggable.js"></script>
+ <script src="../../ui/jquery.ui.droppable.js"></script>
+ <script src="../../ui/jquery.ui.sortable.js"></script>
+ <script src="../../ui/jquery.ui.accordion.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
h1 { padding: .2em; margin: 0; }
#products { float:left; width: 500px; margin-right: 2em; }
#cart { width: 200px; float: left; }
/* style the list to maximize the droppable hitarea */
#cart ol { margin: 0; padding: 1em 0 1em 3em; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#catalog").accordion();
- $("#catalog li").draggable({
+ $( "#catalog" ).accordion();
+ $( "#catalog li" ).draggable({
appendTo: "body",
helper: "clone"
});
- $("#cart ol").droppable({
+ $( "#cart ol" ).droppable({
activeClass: "ui-state-default",
hoverClass: "ui-state-hover",
accept: ":not(.ui-sortable-helper)",
- drop: function(event, ui) {
- $(this).find(".placeholder").remove();
- $("<li></li>").text(ui.draggable.text()).appendTo(this);
+ drop: function( event, ui ) {
+ $( this ).find( ".placeholder" ).remove();
+ $( "<li></li>" ).text( ui.draggable.text() ).appendTo( this );
}
}).sortable({
items: "li:not(.placeholder)",
sort: function() {
// gets added unintentionally by droppable interacting with sortable
// using connectWithSortable fixes this, but doesn't allow you to customize active/hoverClass options
- $(this).removeClass("ui-state-default");
+ $( this ).removeClass( "ui-state-default" );
}
});
-
});
</script>
</head>
<body>
+
<div class="demo">
<div id="products">
@@ -91,11 +91,11 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Demonstrate how to use an accordion to structure products into a catalog and make use drag and drop for adding
-them to a shopping cart, where they are sortable.</p>
+<div class="demo-description">
+<p>Demonstrate how to use an accordion to structure products into a catalog and make use drag and drop for adding them to a shopping cart, where they are sortable.</p>
</div><!-- End demo-description -->
+
</body>
</html>
diff --git a/demos/droppable/visual-feedback.html b/demos/droppable/visual-feedback.html
index 1bb6c6038..6b58d034e 100644
--- a/demos/droppable/visual-feedback.html
+++ b/demos/droppable/visual-feedback.html
@@ -1,43 +1,49 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Droppable - Visual feedback</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.draggable.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.droppable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.draggable.js"></script>
+ <script src="../../ui/jquery.ui.droppable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
#draggable, #draggable2 { width: 90px; height: 90px; padding: 0.5em; float: left; margin: 10px 10px 10px 0; }
#droppable, #droppable2 { width: 120px; height: 120px; padding: 0.5em; float: left; margin: 10px; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#draggable").draggable();
- $("#droppable").droppable({
- hoverClass: 'ui-state-active',
- drop: function(event, ui) {
- $(this).addClass('ui-state-highlight').find('p').html('Dropped!');
+ $( "#draggable" ).draggable();
+ $( "#droppable" ).droppable({
+ hoverClass: "ui-state-active",
+ drop: function( event, ui ) {
+ $( this )
+ .addClass( "ui-state-highlight" )
+ .find( "p" )
+ .html( "Dropped!" );
}
});
-
- $("#draggable2").draggable();
- $("#droppable2").droppable({
+
+ $( "#draggable2" ).draggable();
+ $( "#droppable2" ).droppable({
accept: "#draggable2",
- activeClass: 'ui-state-hover',
- drop: function(event, ui) {
- $(this).addClass('ui-state-highlight').find('p').html('Dropped!');
+ activeClass: "ui-state-hover",
+ drop: function( event, ui ) {
+ $( this )
+ .addClass( "ui-state-highlight" )
+ .find( "p" )
+ .html( "Dropped!" );
}
});
-
});
</script>
</head>
<body>
+
<div class="demo">
<h3 class="docs">Feedback on hover:</h3>
@@ -60,14 +66,13 @@
<p>Drop here</p>
</div>
-<!-- add active class demo -->
-
</div><!-- End demo -->
-<div class="demo-description">
-<p>Change the droppable's appearance on hover, or when the droppable is active (an acceptable draggable is dropped on it). Use the <code>hoverClass</code> or <code>activeClass</code> options to specify respective classes.</p>
+<div class="demo-description">
+<p>Change the droppable's appearance on hover, or when the droppable is active (an acceptable draggable is dropped on it). Use the <code>hoverClass</code> or <code>activeClass</code> options to specify respective classes.</p>
</div><!-- End demo-description -->
+
</body>
</html>
diff --git a/demos/effect/default.html b/demos/effect/default.html
index f2988c5c3..b711f739f 100644
--- a/demos/effect/default.html
+++ b/demos/effect/default.html
@@ -1,60 +1,63 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
- <title>jQuery UI Effects - Effect Demo</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.blind.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.bounce.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.clip.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.drop.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.explode.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.fade.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.fold.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.highlight.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.pulsate.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.scale.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.shake.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.slide.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.transfer.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
- .toggler { width: 500px; height: 200px; position: relative;}
+ <meta charset="utf-8">
+ <title>jQuery UI Effects - Effect demo</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.effects.core.js"></script>
+ <script src="../../ui/jquery.effects.blind.js"></script>
+ <script src="../../ui/jquery.effects.bounce.js"></script>
+ <script src="../../ui/jquery.effects.clip.js"></script>
+ <script src="../../ui/jquery.effects.drop.js"></script>
+ <script src="../../ui/jquery.effects.explode.js"></script>
+ <script src="../../ui/jquery.effects.fade.js"></script>
+ <script src="../../ui/jquery.effects.fold.js"></script>
+ <script src="../../ui/jquery.effects.highlight.js"></script>
+ <script src="../../ui/jquery.effects.pulsate.js"></script>
+ <script src="../../ui/jquery.effects.scale.js"></script>
+ <script src="../../ui/jquery.effects.shake.js"></script>
+ <script src="../../ui/jquery.effects.slide.js"></script>
+ <script src="../../ui/jquery.effects.transfer.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
+ .toggler { width: 500px; height: 200px; position: relative; }
#button { padding: .5em 1em; text-decoration: none; }
#effect { width: 240px; height: 135px; padding: 0.4em; position: relative; }
#effect h3 { margin: 0; padding: 0.4em; text-align: center; }
.ui-effects-transfer { border: 2px dotted gray; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
-
- //run the currently selected effect
- function runEffect(){
- //get effect type from
- var selectedEffect = $('#effectTypes').val();
+ // run the currently selected effect
+ function runEffect() {
+ // get effect type from
+ var selectedEffect = $( "#effectTypes" ).val();
- //most effect types need no options passed by default
+ // most effect types need no options passed by default
var options = {};
- //check if it's scale, transfer, or size - they need options explicitly set
- if(selectedEffect == 'scale'){ options = {percent: 0}; }
- else if(selectedEffect == 'transfer'){ options = { to: "#button", className: 'ui-effects-transfer' }; }
- else if(selectedEffect == 'size'){ options = { to: {width: 200,height: 60} }; }
-
- //run the effect
- $("#effect").effect(selectedEffect,options,500,callback);
+ // some effects have required parameters
+ if ( selectedEffect === "scale" ) {
+ options = { percent: 0 };
+ } else if ( selectedEffect === "transfer" ) {
+ options = { to: "#button", className: "ui-effects-transfer" };
+ } else if ( selectedEffect === "size" ) {
+ options = { to: { width: 200, height: 60 } };
+ }
+
+ // run the effect
+ $( "#effect" ).effect( selectedEffect, options, 500, callback );
};
-
- //callback function to bring a hidden box back
- function callback(){
- setTimeout(function(){
- $("#effect:hidden").removeAttr('style').hide().fadeIn();
- }, 1000);
+
+ // callback function to bring a hidden box back
+ function callback() {
+ setTimeout(function() {
+ $( "#effect" ).removeAttr( "style" ).hide().fadeIn();
+ }, 1000 );
};
-
- //set effect from select menu value
- $("#button").click(function() {
+
+ // set effect from select menu value
+ $( "#button" ).click(function() {
runEffect();
return false;
});
@@ -94,13 +97,12 @@
<a href="#" id="button" class="ui-state-default ui-corner-all">Run Effect</a>
-
</div><!-- End demo -->
-<div class="demo-description">
-<p>Click the button above to show the effect.</p>
+<div class="demo-description">
+<p>Click the button above to show the effect.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/effect/easing.html b/demos/effect/easing.html
index 12d18fe70..b4901f505 100644
--- a/demos/effect/easing.html
+++ b/demos/effect/easing.html
@@ -1,81 +1,90 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
- <title>jQuery UI Effects - Effect Demo</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.core.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
- .graph {
- float: left;
- margin-left: 10px;
- }
+ <meta charset="utf-8">
+ <title>jQuery UI Effects - Easing demo</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.effects.core.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
+ .graph {
+ float: left;
+ margin-left: 10px;
+ }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- if (!$("<canvas/>")[0].getContext) {
- $("<div/>").text("Your browser doesn't support canvas, which is required for this demo. Give Firefox 3 a try!").appendTo("#graphs");
+ if ( !$( "<canvas/>" )[0].getContext ) {
+ $( "<div/>" ).text(
+ "Your browser doesn't support canvas, which is required for this demo. " +
+ "Give Firefox 3 a try!"
+ ).appendTo( "#graphs" );
return;
}
- var i = 0;
- var width = 100,
+
+ var i = 0,
+ width = 100,
height = 100;
- $.each($.easing, function(name, impl) {
- // skip linera/jswing and any non functioning implementation
- if (!$.isFunction(impl) || /jswing/.test(name))
+ $.each( $.easing, function( name, impl ) {
+ // skip linear/jswing and any non functioning implementation
+ if ( !$.isFunction( impl ) || /jswing/.test( name ) ) {
return;
- var graph = $("<div/>").addClass("graph").appendTo("#graphs");
- var text = $("<div/>").text(++i + ". " + name).appendTo(graph);
-
- var canvas = $("<canvas/>").appendTo(graph)[0]
+ }
+ var graph = $( "<div/>" ).addClass( "graph" ).appendTo( "#graphs" ),
+ text = $( "<div/>" ).text( ++i + ". " + name ).appendTo( graph ),
+ canvas = $( "<canvas/>" ).appendTo( graph )[ 0 ];
canvas.width = width;
canvas.height = height;
- var drawHeight = height * 0.8;
- var cradius = 10;
- var ctx = canvas.getContext("2d");
+ var drawHeight = height * 0.8,
+ cradius = 10;
+ ctx = canvas.getContext( "2d" );
ctx.fillStyle = "black";
-
+
ctx.beginPath();
- ctx.moveTo(cradius, 0);
- ctx.quadraticCurveTo(0, 0, 0, cradius);
- ctx.lineTo(0, height - cradius);
- ctx.quadraticCurveTo(0, height, cradius, height);
- ctx.lineTo(width - cradius, height);
- ctx.quadraticCurveTo(width, height, width, height - cradius);
- ctx.lineTo(width, 0);
- ctx.lineTo(cradius, 0);
+ ctx.moveTo( cradius, 0 );
+ ctx.quadraticCurveTo( 0, 0, 0, cradius );
+ ctx.lineTo( 0, height - cradius );
+ ctx.quadraticCurveTo( 0, height, cradius, height );
+ ctx.lineTo( width - cradius, height );
+ ctx.quadraticCurveTo( width, height, width, height - cradius );
+ ctx.lineTo( width, 0 );
+ ctx.lineTo( cradius, 0 );
ctx.fill();
-
+
ctx.strokeStyle = "#555";
ctx.beginPath();
- ctx.moveTo(width * 0.1, drawHeight + .5);
- ctx.lineTo(width * 0.9, drawHeight + .5);
+ ctx.moveTo( width * 0.1, drawHeight + .5 );
+ ctx.lineTo( width * 0.9, drawHeight + .5 );
ctx.stroke();
ctx.strokeStyle = "#555";
ctx.beginPath();
- ctx.moveTo(width * 0.1, drawHeight * .3 - .5);
- ctx.lineTo(width * 0.9, drawHeight * .3 - .5);
+ ctx.moveTo( width * 0.1, drawHeight * .3 - .5 );
+ ctx.lineTo( width * 0.9, drawHeight * .3 - .5 );
ctx.stroke();
ctx.strokeStyle = "white";
ctx.beginPath();
ctx.lineWidth = 2;
- ctx.moveTo(width * 0.1, drawHeight);
- $.each(new Array(width), function(position) {
- var val = impl(0, position, 0, 1, height);
- if (/linear|jswing/.test(name)) val = position / width;
- ctx.lineTo(position * 0.8 + width * 0.1, drawHeight - drawHeight * val * 0.7);
+ ctx.moveTo( width * 0.1, drawHeight );
+ $.each( new Array( width ), function( position ) {
+ var val = impl( 0, position, 0, 1, height );
+ if ( /linear|jswing/.test( name ) ) {
+ val = position / width;
+ }
+ ctx.lineTo( position * 0.8 + width * 0.1,
+ drawHeight - drawHeight * val * 0.7 );
});
ctx.stroke();
graph.click(function() {
- $(canvas).animate({height: "hide"}, 2000, name).animate({"left": "0"}, 800).animate({height: "show"}, 2000, name);
+ $( canvas )
+ .animate( { height: "hide" }, 2000, name )
+ .animate( { left: 0 }, 800 )
+ .animate( { height: "show" }, 2000, name );
});
-
- graph.width(width).height(height + text.height() + 10);
- //return false;
+
+ graph.width( width ).height( height + text.height() + 10 );
});
});
</script>
@@ -84,18 +93,15 @@
<div class="demo">
- <div id="graphs"></div>
-
- <div id="animted"></div>
+<div id="graphs"></div>
</div><!-- End demo -->
-<div class="demo-description">
-<p><strong>All easings provided by jQuery UI are drawn above, using a HTML canvas element</strong>. Click a diagram to see the easing in action.</p>
+<div class="demo-description">
+<p><strong>All easings provided by jQuery UI are drawn above, using a HTML canvas element</strong>. Click a diagram to see the easing in action.</p>
</div><!-- End demo-description -->
</body>
</html>
-
diff --git a/demos/effect/index.html b/demos/effect/index.html
index cecceb6cd..65aa3993a 100644
--- a/demos/effect/index.html
+++ b/demos/effect/index.html
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
- <title>jQuery UI Effect Demos</title>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <meta charset="utf-8">
+ <title>jQuery UI Effects Demos</title>
+ <link rel="stylesheet" href="../demos.css">
</head>
<body>
@@ -12,11 +12,6 @@
<ul>
<li class="demo-config-on"><a href="default.html">Effect showcase</a></li>
<li><a href="easing.html">Easing showcase</a></li>
- <!-- WIP
- <li class="demo-config-on"><a href="scale.html">Scale effect</a></li>
- <li class="demo-config-on"><a href="size.html">Size effect</a></li>
- <li class="demo-config-on"><a href="transfer.html">Transfer effect</a></li>
- -->
</ul>
</div>
diff --git a/demos/hide/default.html b/demos/hide/default.html
index 0e18a5581..6a2113ee0 100644
--- a/demos/hide/default.html
+++ b/demos/hide/default.html
@@ -1,63 +1,61 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Effects - Hide Demo</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.blind.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.bounce.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.clip.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.drop.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.explode.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.fold.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.highlight.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.pulsate.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.scale.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.shake.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.slide.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.transfer.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
- .toggler { width: 500px; height: 200px; }
- #button { padding: .5em 1em; text-decoration: none; }
- #effect { width: 240px; height: 135px; padding: 0.4em; position: relative; }
- #effect h3 { margin: 0; padding: 0.4em; text-align: center; }
- .ui-effects-transfer { border: 2px dotted gray; }
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.effects.core.js"></script>
+ <script src="../../ui/jquery.effects.blind.js"></script>
+ <script src="../../ui/jquery.effects.bounce.js"></script>
+ <script src="../../ui/jquery.effects.clip.js"></script>
+ <script src="../../ui/jquery.effects.drop.js"></script>
+ <script src="../../ui/jquery.effects.explode.js"></script>
+ <script src="../../ui/jquery.effects.fold.js"></script>
+ <script src="../../ui/jquery.effects.highlight.js"></script>
+ <script src="../../ui/jquery.effects.pulsate.js"></script>
+ <script src="../../ui/jquery.effects.scale.js"></script>
+ <script src="../../ui/jquery.effects.shake.js"></script>
+ <script src="../../ui/jquery.effects.slide.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
+ .toggler { width: 500px; height: 200px; }
+ #button { padding: .5em 1em; text-decoration: none; }
+ #effect { width: 240px; height: 135px; padding: 0.4em; position: relative; }
+ #effect h3 { margin: 0; padding: 0.4em; text-align: center; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
+ // run the currently selected effect
+ function runEffect() {
+ // get effect type from
+ var selectedEffect = $( "#effectTypes" ).val();
- //run the currently selected effect
- function runEffect(){
- //get effect type from
- var selectedEffect = $('#effectTypes').val();
-
- //most effect types need no options passed by default
+ // most effect types need no options passed by default
var options = {};
- //check if it's scale, transfer, or size - they need options explicitly set
- if(selectedEffect == 'scale'){ options = {percent: 0}; }
- else if(selectedEffect == 'transfer'){ options = { to: "#button", className: 'ui-effects-transfer' }; }
- else if(selectedEffect == 'size'){ options = { to: {width: 200,height: 60} }; }
-
- //run the effect
- $("#effect").hide(selectedEffect,options,500,callback);
+ // some effects have required parameters
+ if ( selectedEffect === "scale" ) {
+ options = { percent: 0 };
+ } else if ( selectedEffect === "size" ) {
+ options = { to: { width: 200, height: 60 } };
+ }
+
+ // run the effect
+ $( "#effect" ).hide( selectedEffect, options, 1000, callback );
};
-
- //callback function to bring a hidden box back
- function callback(){
- setTimeout(function(){
- $("#effect:hidden").removeAttr('style').hide().fadeIn();
- }, 1000);
+
+ // callback function to bring a hidden box back
+ function callback() {
+ setTimeout(function() {
+ $( "#effect" ).removeAttr( "style" ).hide().fadeIn();
+ }, 1000 );
};
-
- //set effect from select menu value
- $("#button").click(function() {
+
+ // set effect from select menu value
+ $( "#button" ).click(function() {
runEffect();
return false;
});
-
});
</script>
</head>
@@ -88,18 +86,16 @@
<option value="shake">Shake</option>
<option value="size">Size</option>
<option value="slide">Slide</option>
- <option value="transfer">Transfer</option>
</select>
<a href="#" id="button" class="ui-state-default ui-corner-all">Run Effect</a>
-
</div><!-- End demo -->
-<div class="demo-description">
-<p>Click the button above to preview the effect.</p>
+<div class="demo-description">
+<p>Click the button above to preview the effect.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/hide/index.html b/demos/hide/index.html
index 0e9af371f..f5bd6a0e4 100644
--- a/demos/hide/index.html
+++ b/demos/hide/index.html
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Effects Demos</title>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <link rel="stylesheet" href="../demos.css">
</head>
<body>
diff --git a/demos/images/demo-config-on-tile.gif b/demos/images/demo-config-on-tile.gif
index 359da95a7..a96b5bf33 100644
--- a/demos/images/demo-config-on-tile.gif
+++ b/demos/images/demo-config-on-tile.gif
Binary files differ
diff --git a/demos/images/demo-config-on.gif b/demos/images/demo-config-on.gif
index 9fcec1ac1..e3b6d7c0f 100644
--- a/demos/images/demo-config-on.gif
+++ b/demos/images/demo-config-on.gif
Binary files differ
diff --git a/demos/images/demo-spindown-closed.gif b/demos/images/demo-spindown-closed.gif
index b247824e9..ad4bd3781 100644
--- a/demos/images/demo-spindown-closed.gif
+++ b/demos/images/demo-spindown-closed.gif
Binary files differ
diff --git a/demos/images/icon-docs-info.gif b/demos/images/icon-docs-info.gif
index 6b0464e01..ea6d2bece 100644
--- a/demos/images/icon-docs-info.gif
+++ b/demos/images/icon-docs-info.gif
Binary files differ
diff --git a/demos/images/jquery_32x32.png b/demos/images/jquery_32x32.png
deleted file mode 100644
index 1cd42c9fe..000000000
--- a/demos/images/jquery_32x32.png
+++ /dev/null
Binary files differ
diff --git a/demos/images/jqueryui_32x32.png b/demos/images/jqueryui_32x32.png
deleted file mode 100644
index 23ca0f8b9..000000000
--- a/demos/images/jqueryui_32x32.png
+++ /dev/null
Binary files differ
diff --git a/demos/images/pbar-ani.gif b/demos/images/pbar-ani.gif
index 0dfd45b88..cb59a04f9 100644
--- a/demos/images/pbar-ani.gif
+++ b/demos/images/pbar-ani.gif
Binary files differ
diff --git a/demos/images/sizzlejs_32x32.png b/demos/images/sizzlejs_32x32.png
deleted file mode 100644
index 8d7ae1e0b..000000000
--- a/demos/images/sizzlejs_32x32.png
+++ /dev/null
Binary files differ
diff --git a/demos/images/transparent_1x1.png b/demos/images/transparent_1x1.png
deleted file mode 100644
index 209a43864..000000000
--- a/demos/images/transparent_1x1.png
+++ /dev/null
Binary files differ
diff --git a/demos/index.html b/demos/index.html
index 6d14ee6bd..298803d2f 100644
--- a/demos/index.html
+++ b/demos/index.html
@@ -1,98 +1,103 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta charset="utf-8">
<title>jQuery UI Demos</title>
- <link type="text/css" href="../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <link type="text/css" href="demos.css" rel="stylesheet" />
- <script type="text/javascript" src="../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../external/jquery.bgiframe-2.1.1.js"></script>
- <script type="text/javascript" src="../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../ui/jquery.ui.accordion.js"></script>
- <script type="text/javascript" src="../ui/jquery.ui.autocomplete.js"></script>
- <script type="text/javascript" src="../ui/jquery.ui.button.js"></script>
- <script type="text/javascript" src="../ui/jquery.ui.datepicker.js"></script>
- <script type="text/javascript" src="../ui/jquery.ui.dialog.js"></script>
- <script type="text/javascript" src="../ui/jquery.ui.draggable.js"></script>
- <script type="text/javascript" src="../ui/jquery.ui.droppable.js"></script>
- <script type="text/javascript" src="../ui/jquery.ui.menu.js"></script>
- <script type="text/javascript" src="../ui/jquery.ui.position.js"></script>
- <script type="text/javascript" src="../ui/jquery.ui.progressbar.js"></script>
- <script type="text/javascript" src="../ui/jquery.ui.resizable.js"></script>
- <script type="text/javascript" src="../ui/jquery.ui.selectable.js"></script>
- <script type="text/javascript" src="../ui/jquery.ui.slider.js"></script>
- <script type="text/javascript" src="../ui/jquery.ui.sortable.js"></script>
- <script type="text/javascript" src="../ui/jquery.ui.tabs.js"></script>
- <script type="text/javascript" src="../ui/jquery.effects.core.js"></script>
- <script type="text/javascript" src="../ui/jquery.effects.blind.js"></script>
- <script type="text/javascript" src="../ui/jquery.effects.bounce.js"></script>
- <script type="text/javascript" src="../ui/jquery.effects.clip.js"></script>
- <script type="text/javascript" src="../ui/jquery.effects.drop.js"></script>
- <script type="text/javascript" src="../ui/jquery.effects.explode.js"></script>
- <script type="text/javascript" src="../ui/jquery.effects.fold.js"></script>
- <script type="text/javascript" src="../ui/jquery.effects.highlight.js"></script>
- <script type="text/javascript" src="../ui/jquery.effects.pulsate.js"></script>
- <script type="text/javascript" src="../ui/jquery.effects.scale.js"></script>
- <script type="text/javascript" src="../ui/jquery.effects.shake.js"></script>
- <script type="text/javascript" src="../ui/jquery.effects.slide.js"></script>
- <script type="text/javascript" src="../ui/jquery.effects.transfer.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-af.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-ar.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-az.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-bs.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-bg.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-ca.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-cs.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-da.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-de.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-el.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-en-GB.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-eo.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-es.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-et.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-eu.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-fa.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-fi.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-fo.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-fr.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-fr-CH.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-he.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-hr.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-hu.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-hy.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-id.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-is.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-it.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-ja.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-ko.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-lt.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-lv.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-ms.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-nl.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-no.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-pl.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-pt-BR.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-ro.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-ru.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-sk.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-sl.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-sq.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-sr.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-sr-SR.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-sv.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-ta.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-th.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-tr.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-uk.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-vi.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-zh-CN.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-zh-HK.js"></script>
- <script type="text/javascript" src="../ui/i18n/jquery.ui.datepicker-zh-TW.js"></script>
- <script type="text/javascript">
- jQuery(function($) {
+ <link rel="stylesheet" href="../themes/base/jquery.ui.all.css">
+ <link rel="stylesheet" href="demos.css">
+ <script src="../jquery-1.4.4.js"></script>
+ <script src="../external/jquery.bgiframe-2.1.2.js"></script>
+ <script src="../external/glob.js"></script>
+ <script src="../external/glob.de-DE.js"></script>
+ <script src="../ui/jquery.ui.core.js"></script>
+ <script src="../ui/jquery.ui.widget.js"></script>
+ <script src="../ui/jquery.ui.mouse.js"></script>
+ <script src="../ui/jquery.ui.accordion.js"></script>
+ <script src="../ui/jquery.ui.autocomplete.js"></script>
+ <script src="../ui/jquery.ui.button.js"></script>
+ <script src="../ui/jquery.ui.datepicker.js"></script>
+ <script src="../ui/jquery.ui.dialog.js"></script>
+ <script src="../ui/jquery.ui.draggable.js"></script>
+ <script src="../ui/jquery.ui.droppable.js"></script>
+ <script src="../ui/jquery.ui.menu.js"></script>
+ <script src="../ui/jquery.ui.position.js"></script>
+ <script src="../ui/jquery.ui.progressbar.js"></script>
+ <script src="../ui/jquery.ui.resizable.js"></script>
+ <script src="../ui/jquery.ui.selectable.js"></script>
+ <script src="../ui/jquery.ui.slider.js"></script>
+ <script src="../ui/jquery.ui.sortable.js"></script>
+ <script src="../ui/jquery.ui.spinner.js"></script>
+ <script src="../ui/jquery.ui.tabs.js"></script>
+ <script src="../ui/jquery.effects.core.js"></script>
+ <script src="../ui/jquery.effects.blind.js"></script>
+ <script src="../ui/jquery.effects.bounce.js"></script>
+ <script src="../ui/jquery.effects.clip.js"></script>
+ <script src="../ui/jquery.effects.drop.js"></script>
+ <script src="../ui/jquery.effects.explode.js"></script>
+ <script src="../ui/jquery.effects.fold.js"></script>
+ <script src="../ui/jquery.effects.highlight.js"></script>
+ <script src="../ui/jquery.effects.pulsate.js"></script>
+ <script src="../ui/jquery.effects.scale.js"></script>
+ <script src="../ui/jquery.effects.shake.js"></script>
+ <script src="../ui/jquery.effects.slide.js"></script>
+ <script src="../ui/jquery.effects.transfer.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-af.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-ar.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-az.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-bs.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-bg.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-ca.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-cs.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-da.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-de.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-el.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-en-GB.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-eo.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-es.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-et.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-eu.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-fa.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-fi.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-fo.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-fr.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-fr-CH.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-gl.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-he.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-hr.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-hu.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-hy.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-id.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-is.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-it.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-ja.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-ko.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-kz.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-lt.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-lv.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-ms.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-nl.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-no.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-pl.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-pt.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-pt-BR.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-ro.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-ru.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-sk.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-sl.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-sq.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-sr.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-sr-SR.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-sv.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-ta.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-th.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-tr.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-uk.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-vi.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-zh-CN.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-zh-HK.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-zh-TW.js"></script>
+ <script>
+ $(function() {
$('.left-nav a').click(function(ev) {
window.location.hash = this.href.replace(/.+\/([^\/]+)\/index\.html/,'$1') + '|default';
@@ -269,6 +274,7 @@
<dd><a href="menu/index.html">Menu</a></dd>
<dd><a href="progressbar/index.html">Progressbar</a></dd>
<dd><a href="slider/index.html">Slider</a></dd>
+ <dd><a href="spinner/index.html">Spinner</a></dd>
<dd><a href="tabs/index.html">Tabs</a></dd>
<dt>Effects</dt>
<dd><a href="animate/index.html">Color Animation</a></dd>
diff --git a/demos/position/cycler.html b/demos/position/cycler.html
index fa0571e33..69b7fa0f8 100644
--- a/demos/position/cycler.html
+++ b/demos/position/cycler.html
@@ -1,30 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Position - Default functionality</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
-
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.position.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
html, body {
margin: 0;
padding: 0
}
</style>
-
- <script type="text/javascript">
+ <script>
$(function() {
-
- $.fn.position2 = function(options) {
- return this.position($.extend({
+ $.fn.position2 = function( options ) {
+ return this.position( $.extend({
of: window,
- using: function(to) {
- $(this).css({
+ using: function( to ) {
+ $( this ).css({
top: to.top,
left: to.left
})
@@ -32,8 +29,8 @@
collision: "none"
}, options));
}
-
- $.fn.left = function(using) {
+
+ $.fn.left = function( using ) {
return this.position2({
my: "right middle",
at: "left middle",
@@ -41,7 +38,7 @@
using: using
});
}
- $.fn.right = function(using) {
+ $.fn.right = function( using ) {
return this.position2({
my: "left middle",
at: "right middle",
@@ -49,76 +46,76 @@
using: using
});
}
- $.fn.center = function(using) {
+ $.fn.center = function( using ) {
return this.position2({
my: "center middle",
at: "center middle",
using: using
});
};
-
- $("img:eq(0)").left();
- $("img:eq(1)").center();
- $("img:eq(2)").right();
-
- $("body").css({
+
+ $( "img:eq(0)" ).left();
+ $( "img:eq(1)" ).center();
+ $( "img:eq(2)" ).right();
+
+ $( "body" ).css({
overflow: "hidden"
})
- $(".demo").css({
+ $( ".demo" ).css({
position: "relative",
});
- $(".demo img").css({
+ $( ".demo img" ).css({
position: "absolute",
});
-
- function animate(to) {
- $(this).animate(to);
+
+ function animate( to ) {
+ $(this).animate( to );
}
function next() {
- $("img:eq(2)").center(animate);
- $("img:eq(1)").left(animate)
- $("img:eq(0)").right().appendTo(".demo");
+ $( "img:eq(2)" ).center( animate );
+ $( "img:eq(1)" ).left( animate )
+ $( "img:eq(0)" ).right().appendTo( ".demo" );
}
function previous() {
- $("img:eq(0)").center(animate);
- $("img:eq(1)").right(animate);
- $("img:eq(2)").left().prependTo(".demo");
+ $( "img:eq(0)" ).center( animate );
+ $( "img:eq(1)" ).right( animate );
+ $( "img:eq(2)" ).left().prependTo( ".demo" );
}
- $("#previous").click(previous);
- $("#next").click(next);
-
- $(".demo img").click(function() {
- $(".demo img").index(this) == 0 ? previous() : next();
+ $( "#previous" ).click( previous );
+ $( "#next" ).click( next );
+
+ $( ".demo img" ).click(function() {
+ $( ".demo img" ).index( this ) === 0 ? previous() : next();
+ });
+
+ $( window ).resize(function() {
+ $( "img:eq(0)" ).left( animate );
+ $( "img:eq(1)" ).center( animate );
+ $( "img:eq(2)" ).right( animate );
});
-
- $(window).resize(function() {
- $("img:eq(0)").left(animate);
- $("img:eq(1)").center(animate);
- $("img:eq(2)").right(animate);
- })
});
</script>
-
</head>
<body>
<div class="demo">
- <img src="images/earth.jpg" />
- <img src="images/flight.jpg" />
- <img src="images/rocket.jpg" />
+<img src="images/earth.jpg" />
+<img src="images/flight.jpg" />
+<img src="images/rocket.jpg" />
- <a id="previous" href="#">Previous</a>
- <a id="next" href="#">Next</a>
-</div>
+<a id="previous" href="#">Previous</a>
+<a id="next" href="#">Next</a>
+
+</div><!-- End demo -->
-<div class="demo-description">
+
+<div class="demo-description">
<p>A prototype for the <a href="http://wiki.jqueryui.com/Photoviewer">Photoviewer</a> using Position to place images at the center, left and right and cycle them.
<br/>Use the links at the top to cycle, or click on the images on the left and right.
<br/>Note how the images are repositioned when resizing the window.
<br/>Warning: Doesn't currently work inside the demo viewer; open in a new window instead!</p>
-
</div><!-- End demo-description -->
</body>
diff --git a/demos/position/default.html b/demos/position/default.html
index d26959b96..13b2315f7 100644
--- a/demos/position/default.html
+++ b/demos/position/default.html
@@ -1,28 +1,25 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Position - Default functionality</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.draggable.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
-
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.draggable.js"></script>
+ <script src="../../ui/jquery.ui.position.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
div#parent {
width: 60%;
margin: 10px auto;
padding: 5px;
-
border: 1px solid #777;
background-color: #fbca93;
text-align: center;
}
-
div.positionable {
width: 75px;
height: 75px;
@@ -33,49 +30,46 @@
background-color: #bcd5e6;
text-align: center;
}
-
select, input {
margin-left: 15px;
}
-
</style>
- <script type="text/javascript">
+ <script>
$(function() {
-
- function position(using) {
- $('.positionable').position({
- of: $('#parent'),
- my: $('#my_horizontal').val() + ' ' + $('#my_vertical').val(),
- at: $('#at_horizontal').val() + ' '+ $('#at_vertical').val(),
- offset: $('#offset').val(),
+ function position( using ) {
+ $( ".positionable" ).position({
+ of: $( "#parent" ),
+ my: $( "#my_horizontal" ).val() + " " + $( "#my_vertical" ).val(),
+ at: $( "#at_horizontal" ).val() + " " + $( "#at_vertical" ).val(),
+ offset: $( "#offset" ).val(),
using: using,
- collision: $("#collision_horizontal").val() + ' ' + $("#collision_vertical").val()
+ collision: $( "#collision_horizontal" ).val() + ' ' + $( "#collision_vertical" ).val()
});
}
-
- $('.positionable').css("opacity", 0.5);
-
- $(':input').bind('click keyup change', function() { position(); });
-
- $("#parent").draggable({
+
+ $( ".positionable" ).css( "opacity", 0.5 );
+
+ $( ":input" ).bind( "click keyup change", function() { position(); });
+
+ $( "#parent" ).draggable({
drag: function() { position(); }
});
-
- $('.positionable').draggable({
- drag: function(event, ui) {
+
+ $( ".positionable" ).draggable({
+ drag: function( event, ui ) {
// reset offset before calculating it
- $("#offset").val("0");
- position(function(result) {
- $("#offset").val("" + (ui.offset.left - result.left) + " " + (ui.offset.top - result.top));
+ $( "#offset" ).val( "0" );
+ position(function( result ) {
+ $( "#offset" ).val( "" + ( ui.offset.left - result.left ) +
+ " " + ( ui.offset.top - result.top ) );
position();
});
}
});
-
+
position();
});
</script>
-
</head>
<body>
@@ -148,11 +142,11 @@
</div><!-- End demo -->
-<div class="demo-description">
+
+<div class="demo-description">
<p>Use the form controls to configure the positioning, or drag the positioned element to modify its offset.
<br/>Drag around the parent element to see collision detection in action.</p>
-
</div><!-- End demo-description -->
</body>
diff --git a/demos/position/images/earth.jpg b/demos/position/images/earth.jpg
index 87ea48803..e5477f754 100644
--- a/demos/position/images/earth.jpg
+++ b/demos/position/images/earth.jpg
Binary files differ
diff --git a/demos/position/images/flight.jpg b/demos/position/images/flight.jpg
index 9721986c0..362bd1a22 100644
--- a/demos/position/images/flight.jpg
+++ b/demos/position/images/flight.jpg
Binary files differ
diff --git a/demos/position/images/rocket.jpg b/demos/position/images/rocket.jpg
index d3bff6123..9c0495c61 100644
--- a/demos/position/images/rocket.jpg
+++ b/demos/position/images/rocket.jpg
Binary files differ
diff --git a/demos/position/index.html b/demos/position/index.html
index 54a6d54c6..498c09b2b 100644
--- a/demos/position/index.html
+++ b/demos/position/index.html
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Position Demo</title>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <link rel="stylesheet" href="../demos.css">
</head>
<body>
diff --git a/demos/progressbar/animated.html b/demos/progressbar/animated.html
index e094f64a3..bf8dbb8d5 100644
--- a/demos/progressbar/animated.html
+++ b/demos/progressbar/animated.html
@@ -1,20 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Progressbar - Animated</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.progressbar.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
- .ui-progressbar-value { background-image: url(images/pbar-ani.gif); }
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.progressbar.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
+ .ui-progressbar-value { background-image: url(images/pbar-ani.gif); }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#progressbar").progressbar({
+ $( "#progressbar" ).progressbar({
value: 59
});
});
@@ -28,8 +28,9 @@
</div><!-- End demo -->
-<div class="demo-description">
+
+<div class="demo-description">
<p>
This progressbar has an animated fill by setting the
<code>background-image</code>
@@ -37,7 +38,6 @@ on the
<code>.ui-progressbar-value</code>
element, using css.
</p>
-
</div><!-- End demo-description -->
</body>
diff --git a/demos/progressbar/default.html b/demos/progressbar/default.html
index 86c7c9c54..15133bb8c 100644
--- a/demos/progressbar/default.html
+++ b/demos/progressbar/default.html
@@ -1,17 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Progressbar - Default functionality</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.progressbar.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.progressbar.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- $("#progressbar").progressbar({
+ $( "#progressbar" ).progressbar({
value: 37
});
});
@@ -21,19 +21,15 @@
<div class="demo">
- <div id="progressbar"></div>
+<div id="progressbar"></div>
</div><!-- End demo -->
<div class="demo-description">
-
<p>Default determinate progress bar.</p>
-
</div><!-- End demo-description -->
-
-
</body>
</html>
diff --git a/demos/progressbar/images/pbar-ani.gif b/demos/progressbar/images/pbar-ani.gif
index 0dfd45b88..cb59a04f9 100644
--- a/demos/progressbar/images/pbar-ani.gif
+++ b/demos/progressbar/images/pbar-ani.gif
Binary files differ
diff --git a/demos/progressbar/index.html b/demos/progressbar/index.html
index cf8ee9fe3..9836f59aa 100644
--- a/demos/progressbar/index.html
+++ b/demos/progressbar/index.html
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Progressbar Demos</title>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <link rel="stylesheet" href="../demos.css">
</head>
<body>
diff --git a/demos/progressbar/resize.html b/demos/progressbar/resize.html
index fb99ab8ee..6674c85c3 100644
--- a/demos/progressbar/resize.html
+++ b/demos/progressbar/resize.html
@@ -1,21 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Progressbar - Resizable</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.progressbar.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.resizable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.progressbar.js"></script>
+ <script src="../../ui/jquery.ui.resizable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- $("#progressbar").progressbar({
+ $( "#progressbar" ).progressbar({
value: 37
});
- $("#progressbarWrapper").resizable();
+ $( "#progressbarWrapper" ).resizable();
});
</script>
</head>
@@ -23,16 +24,16 @@
<div class="demo">
- <div id="progressbarWrapper" style="height:30px; " class="ui-widget-default">
- <div id="progressbar" style="height:100%;"></div>
- </div>
+<div id="progressbarWrapper" style="height:30px; " class="ui-widget-default">
+ <div id="progressbar" style="height:100%;"></div>
+</div>
</div><!-- End demo -->
-<div class="demo-description">
-<p>The progress bar's widths are specified in percentages for flexible sizing so it will resize to fit its container. Try resizing the height and width of this bar to see how it maintains the correct proportions. (This is not necessarily a real-world example, but it's a good illustration of how flexibly all the plugins are coded.)</p>
+<div class="demo-description">
+<p>The progress bar's widths are specified in percentages for flexible sizing so it will resize to fit its container. Try resizing the height and width of this bar to see how it maintains the correct proportions. (This is not necessarily a real-world example, but it's a good illustration of how flexibly all the plugins are coded.)</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/removeClass/default.html b/demos/removeClass/default.html
index 15a5a5756..11e5cdfa5 100644
--- a/demos/removeClass/default.html
+++ b/demos/removeClass/default.html
@@ -1,29 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Effects - removeClass Demo</title>
- <link type="text/css" href="http://jquery-ui.googlecode.com/svn/trunk/themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="http://jquery-ui.googlecode.com/svn/trunk/jquery-1.4.2.js"></script>
- <script type="text/javascript" src="http://jquery-ui.googlecode.com/svn/trunk/ui/jquery.effects.core.js"></script>
- <link type="text/css" href="http://jquery-ui.googlecode.com/svn/trunk/demos/demos.css" rel="stylesheet" />
- <style type="text/css">
- .toggler { width: 500px; height: 200px; position: relative;}
- #button { padding: .5em 1em; text-decoration: none; }
- #effect {position: relative; width: 240px; padding: 1em; letter-spacing: 0; font-size: 1.2em; border: 1px solid #000; background: #eee; color: #333; }
- #effect.newClass { text-indent: 40px; letter-spacing: .4em; width: 410px; height: 100px; padding: 30px; margin: 10px; font-size: 1.6em; }
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.effects.core.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
+ .toggler { width: 500px; height: 200px; position: relative; }
+ #button { padding: .5em 1em; text-decoration: none; }
+ #effect { position: relative; width: 240px; padding: 1em; letter-spacing: 0; font-size: 1.2em; border: 1px solid #000; background: #eee; color: #333; }
+ .newClass { text-indent: 40px; letter-spacing: .4em; width: 410px; height: 100px; padding: 30px; margin: 10px; font-size: 1.6em; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#button").click(function() {
- $('#effect').removeClass('newClass', 1000, callback);
+ $( "#button" ).click(function() {
+ $( "#effect" ).removeClass( "newClass", 1000, callback );
return false;
});
-
- function callback(){
- setTimeout(function(){
- $('#effect').addClass('newClass');
- }, 1500);
+
+ function callback() {
+ setTimeout(function() {
+ $( "#effect" ).addClass( "newClass" );
+ }, 1500 );
}
});
</script>
@@ -34,7 +34,7 @@
<div class="toggler">
<div id="effect" class="newClass ui-corner-all">
- Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede.
+ Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede.
</div>
</div>
@@ -42,10 +42,10 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Click the button above to preview the effect.</p>
+<div class="demo-description">
+<p>Click the button above to preview the effect.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/removeClass/index.html b/demos/removeClass/index.html
index 0e9af371f..f5bd6a0e4 100644
--- a/demos/removeClass/index.html
+++ b/demos/removeClass/index.html
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Effects Demos</title>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <link rel="stylesheet" href="../demos.css">
</head>
<body>
diff --git a/demos/resizable/animate.html b/demos/resizable/animate.html
index 36739e3dd..6a4e853de 100644
--- a/demos/resizable/animate.html
+++ b/demos/resizable/animate.html
@@ -1,29 +1,30 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Resizable - Animate</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.resizable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.resizable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
#resizable { width: 150px; height: 150px; padding: 0.5em; }
#resizable h3 { text-align: center; margin: 0; }
.ui-resizable-helper { border: 1px dotted gray; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#resizable").resizable({
+ $( "#resizable" ).resizable({
animate: true
});
});
</script>
</head>
<body>
+
<div class="demo">
<div id="resizable" class="ui-widget-content">
@@ -32,10 +33,11 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Animate the resize action using the <code>animate</code> option (boolean). When this option is set to true, drag the outline to the desired location; the element animates to that size on drag stop.</p>
+<div class="demo-description">
+<p>Animate the resize action using the <code>animate</code> option (boolean). When this option is set to true, drag the outline to the desired location; the element animates to that size on drag stop.</p>
</div><!-- End demo-description -->
+
</body>
</html>
diff --git a/demos/resizable/aspect-ratio.html b/demos/resizable/aspect-ratio.html
index ae236ec59..dbfa38690 100644
--- a/demos/resizable/aspect-ratio.html
+++ b/demos/resizable/aspect-ratio.html
@@ -1,28 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Resizable - Preserve aspect ratio</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.resizable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.resizable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
#resizable { width: 160px; height: 90px; padding: 0.5em; }
#resizable h3 { text-align: center; margin: 0; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#resizable").resizable({
- aspectRatio: 16/9
+ $( "#resizable" ).resizable({
+ aspectRatio: 16 / 9
});
});
</script>
</head>
<body>
+
<div class="demo">
<div id="resizable" class="ui-widget-content">
@@ -31,10 +32,11 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Maintain the existing aspect ratio or set a new one to constrain the proportions on resize. Set the <code>aspectRatio</code> option to true, and optionally pass in a new ratio (i.e., 4/3)</p>
+<div class="demo-description">
+<p>Maintain the existing aspect ratio or set a new one to constrain the proportions on resize. Set the <code>aspectRatio</code> option to true, and optionally pass in a new ratio (i.e., 4/3)</p>
</div><!-- End demo-description -->
+
</body>
</html>
diff --git a/demos/resizable/constrain-area.html b/demos/resizable/constrain-area.html
index 2fdbbd957..edd3870f6 100644
--- a/demos/resizable/constrain-area.html
+++ b/demos/resizable/constrain-area.html
@@ -1,30 +1,31 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Resizable - Constrain resize area</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.resizable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.resizable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style\>
#container { width: 300px; height: 300px; }
#container h3 { text-align: center; margin: 0; margin-bottom: 10px; }
#resizable { background-position: top left; width: 150px; height: 150px; }
#resizable, #container { padding: 0.5em; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#resizable").resizable({
- containment: '#container'
+ $( "#resizable" ).resizable({
+ containment: "#container"
});
});
</script>
</head>
<body>
+
<div class="demo">
<div id="container" class="ui-widget-content">
@@ -36,10 +37,11 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Define the boundaries of the resizable area. Use the <code>containment</code> option to specify a parent DOM element or a jQuery selector, like 'document.'</p>
+<div class="demo-description">
+<p>Define the boundaries of the resizable area. Use the <code>containment</code> option to specify a parent DOM element or a jQuery selector, like 'document.'</p>
</div><!-- End demo-description -->
+
</body>
</html>
diff --git a/demos/resizable/default.html b/demos/resizable/default.html
index a8dfd251c..01efa472d 100644
--- a/demos/resizable/default.html
+++ b/demos/resizable/default.html
@@ -1,26 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Resizable - Default functionality</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.resizable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.resizable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
#resizable { width: 150px; height: 150px; padding: 0.5em; }
#resizable h3 { text-align: center; margin: 0; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#resizable").resizable();
+ $( "#resizable" ).resizable();
});
</script>
</head>
<body>
+
<div class="demo">
<div id="resizable" class="ui-widget-content">
@@ -29,10 +30,11 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Enable any DOM element to be resizable. With the cursor grab the right or bottom border and drag to the desired width or height.</p>
+<div class="demo-description">
+<p>Enable any DOM element to be resizable. With the cursor grab the right or bottom border and drag to the desired width or height.</p>
</div><!-- End demo-description -->
+
</body>
</html>
diff --git a/demos/resizable/delay-start.html b/demos/resizable/delay-start.html
index 16e024230..66e047a81 100644
--- a/demos/resizable/delay-start.html
+++ b/demos/resizable/delay-start.html
@@ -1,32 +1,33 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Resizable - Delay start</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.resizable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.resizable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
#resizable, #resizable2 { width: 150px; height: 150px; padding: 0.5em; }
#resizable h3, #resizable2 h3 { text-align: center; margin: 0; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#resizable").resizable({
+ $( "#resizable" ).resizable({
delay: 1000
});
- $("#resizable2").resizable({
+ $( "#resizable2" ).resizable({
distance: 40
});
});
</script>
</head>
<body>
+
<div class="demo">
<h3 class="docs">Time delay (ms):</h3>
@@ -39,14 +40,13 @@
<h3 class="ui-widget-header">Distance</h3>
</div>
-<!-- ADD DISTANCE DEMO -->
-
</div><!-- End demo -->
-<div class="demo-description">
-<p>Delay the start of resizng for a number of milliseconds with the <code>delay</code> option; prevent resizing until the cursor is held down and dragged a specifed number of pixels with the <code>distance</code> option.</p>
+<div class="demo-description">
+<p>Delay the start of resizng for a number of milliseconds with the <code>delay</code> option; prevent resizing until the cursor is held down and dragged a specifed number of pixels with the <code>distance</code> option.</p>
</div><!-- End demo-description -->
+
</body>
</html>
diff --git a/demos/resizable/helper.html b/demos/resizable/helper.html
index 49e8114ab..6e986c646 100644
--- a/demos/resizable/helper.html
+++ b/demos/resizable/helper.html
@@ -1,29 +1,30 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Resizable - Helper</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.resizable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.resizable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
#resizable { width: 150px; height: 150px; padding: 0.5em; }
#resizable h3 { text-align: center; margin: 0; }
.ui-resizable-helper { border: 2px dotted #00F; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#resizable").resizable({
- helper: 'ui-resizable-helper'
+ $( "#resizable" ).resizable({
+ helper: "ui-resizable-helper"
});
});
</script>
</head>
<body>
+
<div class="demo">
<div id="resizable" class="ui-widget-content">
@@ -32,10 +33,11 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Display only an outline of the element while resizing by setting the <code>helper</code> option to a CSS class.</p>
+<div class="demo-description">
+<p>Display only an outline of the element while resizing by setting the <code>helper</code> option to a CSS class.</p>
</div><!-- End demo-description -->
+
</body>
</html>
diff --git a/demos/resizable/index.html b/demos/resizable/index.html
index 93198d03c..45f400621 100644
--- a/demos/resizable/index.html
+++ b/demos/resizable/index.html
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Resizable Demos</title>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <link rel="stylesheet" href="../demos.css">
</head>
<body>
diff --git a/demos/resizable/max-min.html b/demos/resizable/max-min.html
index a1c9f6f86..11cb407bd 100644
--- a/demos/resizable/max-min.html
+++ b/demos/resizable/max-min.html
@@ -1,22 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Resizable - Maximum / minimum size</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.resizable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.resizable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
#resizable { width: 200px; height: 150px; padding: 5px; }
#resizable h3 { text-align: center; margin: 0; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#resizable").resizable({
+ $( "#resizable" ).resizable({
maxHeight: 250,
maxWidth: 350,
minHeight: 150,
@@ -26,6 +26,7 @@
</script>
</head>
<body>
+
<div class="demo">
<div id="resizable" class="ui-widget-content">
@@ -34,10 +35,11 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Limit the resizable element to a maximum or minimum height or width using the <code>maxHeight</code>, <code>maxWidth</code>, <code>minHeight</code>, and <code>minWidth</code> options.</p>
+<div class="demo-description">
+<p>Limit the resizable element to a maximum or minimum height or width using the <code>maxHeight</code>, <code>maxWidth</code>, <code>minHeight</code>, and <code>minWidth</code> options.</p>
</div><!-- End demo-description -->
+
</body>
</html>
diff --git a/demos/resizable/snap-to-grid.html b/demos/resizable/snap-to-grid.html
index 91ebbcd6f..45e299aea 100644
--- a/demos/resizable/snap-to-grid.html
+++ b/demos/resizable/snap-to-grid.html
@@ -1,28 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Resizable - Snap to grid</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.resizable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.resizable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
#resizable { width: 150px; height: 150px; padding: 0.5em; }
#resizable h3 { text-align: center; margin: 0; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#resizable").resizable({
+ $( "#resizable" ).resizable({
grid: 50
});
});
</script>
</head>
<body>
+
<div class="demo">
<div id="resizable" class="ui-widget-content">
@@ -31,10 +32,11 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Snap the resizable element to a grid. Set the dimensions of grid cells (height and width in pixels) with the <code>grid</code> option.</p>
+<div class="demo-description">
+<p>Snap the resizable element to a grid. Set the dimensions of grid cells (height and width in pixels) with the <code>grid</code> option.</p>
</div><!-- End demo-description -->
+
</body>
</html>
diff --git a/demos/resizable/synchronous-resize.html b/demos/resizable/synchronous-resize.html
index 3b3b37241..45f0a3eab 100644
--- a/demos/resizable/synchronous-resize.html
+++ b/demos/resizable/synchronous-resize.html
@@ -1,31 +1,32 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Resizable - Synchronous resize</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.resizable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.resizable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
#resizable { background-position: top left; }
#resizable, #also { width: 150px; height: 120px; padding: 0.5em; }
#resizable h3, #also h3 { text-align: center; margin: 0; }
#also { margin-top: 1em; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#resizable").resizable({
- alsoResize: '#also'
+ $( "#resizable" ).resizable({
+ alsoResize: "#also"
});
- $("#also").resizable();
+ $( "#also" ).resizable();
});
</script>
</head>
<body>
+
<div class="demo">
<div id="resizable" class="ui-widget-header">
@@ -38,10 +39,11 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Resize multiple elements simultaneously by clicking and dragging the sides of one. Pass a shared selector into the <code>alsoResize</code> option.</p>
+<div class="demo-description">
+<p>Resize multiple elements simultaneously by clicking and dragging the sides of one. Pass a shared selector into the <code>alsoResize</code> option.</p>
</div><!-- End demo-description -->
+
</body>
</html>
diff --git a/demos/resizable/textarea.html b/demos/resizable/textarea.html
index 2e6e42f9e..50f7ee70e 100644
--- a/demos/resizable/textarea.html
+++ b/demos/resizable/textarea.html
@@ -1,39 +1,41 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Resizable - Textarea</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.resizable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
- .ui-resizable-se {
- bottom: 17px;
- }
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.resizable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
+ .ui-resizable-se {
+ bottom: 17px;
+ }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#resizable").resizable({
+ $( "#resizable" ).resizable({
handles: "se"
});
});
</script>
</head>
<body>
+
<div class="demo">
<textarea id="resizable" rows="5" cols="20"></textarea>
</div><!-- End demo -->
-<div class="demo-description">
-<p>Display only an outline of the element while resizing by setting the <code>helper</code> option to a CSS class.</p>
+<div class="demo-description">
+<p>Display only an outline of the element while resizing by setting the <code>helper</code> option to a CSS class.</p>
</div><!-- End demo-description -->
+
</body>
</html>
diff --git a/demos/resizable/visual-feedback.html b/demos/resizable/visual-feedback.html
index 44178423c..79ef57f17 100644
--- a/demos/resizable/visual-feedback.html
+++ b/demos/resizable/visual-feedback.html
@@ -1,29 +1,30 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Resizable - Visual feedback</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.resizable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.resizable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
#resizable { width: 150px; height: 150px; padding: 0.5em; }
#resizable h3 { text-align: center; margin: 0; }
.ui-resizable-ghost { border: 1px dotted gray; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#resizable").resizable({
+ $( "#resizable" ).resizable({
ghost: true
});
});
</script>
</head>
<body>
+
<div class="demo">
<div id="resizable" class="ui-widget-content">
@@ -32,10 +33,11 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Instead of showing the actual element during resize, set the <code>ghost</code> option to true to show a semi-transparent part of the element.</p>
+<div class="demo-description">
+<p>Instead of showing the actual element during resize, set the <code>ghost</code> option to true to show a semi-transparent part of the element.</p>
</div><!-- End demo-description -->
+
</body>
</html>
diff --git a/demos/selectable/default.html b/demos/selectable/default.html
index f7d6d8693..bb3cc05dd 100644
--- a/demos/selectable/default.html
+++ b/demos/selectable/default.html
@@ -1,30 +1,31 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Selectable - Default functionality</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.selectable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.selectable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
- <style type="text/css">
+ <style>
#feedback { font-size: 1.4em; }
#selectable .ui-selecting { background: #FECA40; }
#selectable .ui-selected { background: #F39814; color: white; }
#selectable { list-style-type: none; margin: 0; padding: 0; width: 60%; }
#selectable li { margin: 3px; padding: 0.4em; font-size: 1.4em; height: 18px; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#selectable").selectable();
+ $( "#selectable" ).selectable();
});
</script>
</head>
<body>
+
<div class="demo">
<ol id="selectable">
@@ -39,10 +40,11 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Enable a DOM element (or group of elements) to be selectable. Draw a box with your cursor to select items. Hold down the Ctrl key to make multiple non-adjacent selections. </p>
+<div class="demo-description">
+<p>Enable a DOM element (or group of elements) to be selectable. Draw a box with your cursor to select items. Hold down the Ctrl key to make multiple non-adjacent selections. </p>
</div><!-- End demo-description -->
+
</body>
</html>
diff --git a/demos/selectable/display-grid.html b/demos/selectable/display-grid.html
index 654a68d5b..e486f8301 100644
--- a/demos/selectable/display-grid.html
+++ b/demos/selectable/display-grid.html
@@ -1,30 +1,31 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Selectable - Display as grid</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.selectable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.selectable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
- <style type="text/css">
+ <style>
#feedback { font-size: 1.4em; }
#selectable .ui-selecting { background: #FECA40; }
#selectable .ui-selected { background: #F39814; color: white; }
#selectable { list-style-type: none; margin: 0; padding: 0; }
#selectable li { margin: 3px; padding: 1px; float: left; width: 100px; height: 80px; font-size: 4em; text-align: center; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#selectable").selectable();
+ $( "#selectable" ).selectable();
});
</script>
</head>
<body>
+
<div class="demo">
<ol id="selectable">
@@ -44,10 +45,11 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>To arrange selectable items as a grid, give them identical dimensions and float them using CSS.</p>
+<div class="demo-description">
+<p>To arrange selectable items as a grid, give them identical dimensions and float them using CSS.</p>
</div><!-- End demo-description -->
+
</body>
</html>
diff --git a/demos/selectable/index.html b/demos/selectable/index.html
index 19ef9b1fa..21fa4d5a7 100644
--- a/demos/selectable/index.html
+++ b/demos/selectable/index.html
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Selectable Demos</title>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <link rel="stylesheet" href="../demos.css">
</head>
<body>
diff --git a/demos/selectable/serialize.html b/demos/selectable/serialize.html
index 9744944a5..924a7cc2a 100644
--- a/demos/selectable/serialize.html
+++ b/demos/selectable/serialize.html
@@ -1,31 +1,31 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Selectable - Serialize</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.selectable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.selectable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
- <style type="text/css">
+ <style>
#feedback { font-size: 1.4em; }
#selectable .ui-selecting { background: #FECA40; }
#selectable .ui-selected { background: #F39814; color: white; }
#selectable { list-style-type: none; margin: 0; padding: 0; width: 60%; }
#selectable li { margin: 3px; padding: 0.4em; font-size: 1.4em; height: 18px; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#selectable").selectable({
- stop: function(){
- var result = $("#select-result").empty();
- $(".ui-selected", this).each(function(){
- var index = $("#selectable li").index(this);
- result.append(" #" + (index + 1));
+ $( "#selectable" ).selectable({
+ stop: function() {
+ var result = $( "#select-result" ).empty();
+ $( ".ui-selected", this ).each(function() {
+ var index = $( "#selectable li" ).index( this );
+ result.append( " #" + ( index + 1 ) );
});
}
});
@@ -33,10 +33,11 @@
</script>
</head>
<body>
+
<div class="demo">
<p id="feedback">
-You've selected: <span id="select-result">none</span>.
+<span>You've selected:</span> <span id="select-result">none</span>.
</p>
<ol id="selectable">
@@ -50,10 +51,11 @@ You've selected: <span id="select-result">none</span>.
</div><!-- End demo -->
-<div class="demo-description">
-<p>Write a function that fires on the <code>stop</code> event to collect the index values of selected items. Present values as feedback, or pass as a data string.</p>
+<div class="demo-description">
+<p>Write a function that fires on the <code>stop</code> event to collect the index values of selected items. Present values as feedback, or pass as a data string.</p>
</div><!-- End demo-description -->
+
</body>
</html>
diff --git a/demos/show/default.html b/demos/show/default.html
index 24bbba6ec..9386ff1e1 100644
--- a/demos/show/default.html
+++ b/demos/show/default.html
@@ -1,64 +1,63 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Effects - Show Demo</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.blind.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.bounce.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.clip.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.drop.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.explode.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.fold.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.highlight.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.pulsate.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.scale.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.shake.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.slide.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.transfer.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
- .toggler { width: 500px; height: 200px; }
- #button { padding: .5em 1em; text-decoration: none; }
- #effect { width: 240px; height: 135px; padding: 0.4em; position: relative; }
- #effect h3 { margin: 0; padding: 0.4em; text-align: center; }
- .ui-effects-transfer { border: 2px dotted gray; }
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.effects.core.js"></script>
+ <script src="../../ui/jquery.effects.blind.js"></script>
+ <script src="../../ui/jquery.effects.bounce.js"></script>
+ <script src="../../ui/jquery.effects.clip.js"></script>
+ <script src="../../ui/jquery.effects.drop.js"></script>
+ <script src="../../ui/jquery.effects.explode.js"></script>
+ <script src="../../ui/jquery.effects.fold.js"></script>
+ <script src="../../ui/jquery.effects.highlight.js"></script>
+ <script src="../../ui/jquery.effects.pulsate.js"></script>
+ <script src="../../ui/jquery.effects.scale.js"></script>
+ <script src="../../ui/jquery.effects.shake.js"></script>
+ <script src="../../ui/jquery.effects.slide.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
+ .toggler { width: 500px; height: 200px; }
+ #button { padding: .5em 1em; text-decoration: none; }
+ #effect { width: 240px; height: 135px; padding: 0.4em; position: relative; }
+ #effect h3 { margin: 0; padding: 0.4em; text-align: center; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
+ // run the currently selected effect
+ function runEffect() {
+ // get effect type from
+ var selectedEffect = $( "#effectTypes" ).val();
- //run the currently selected effect
- function runEffect(){
- //get effect type from
- var selectedEffect = $('#effectTypes').val();
-
- //most effect types need no options passed by default
+ // most effect types need no options passed by default
var options = {};
- //check if it's scale, transfer, or size - they need options explicitly set
- if(selectedEffect == 'scale'){ options = {percent: 100}; }
- else if(selectedEffect == 'transfer'){ options = { to: "#button", className: 'ui-effects-transfer' }; }
- else if(selectedEffect == 'size'){ options = { to: {width: 280,height: 185} }; }
-
- //run the effect
- $("#effect").show(selectedEffect,options,500,callback);
+ // some effects have required parameters
+ if ( selectedEffect === "scale" ) {
+ options = { percent: 100 };
+ } else if ( selectedEffect === "size" ) {
+ options = { to: { width: 280, height: 185 } };
+ }
+
+ // run the effect
+ $( "#effect" ).show( selectedEffect, options, 500, callback );
};
-
+
//callback function to bring a hidden box back
- function callback(){
- setTimeout(function(){
- $("#effect:visible").removeAttr('style').hide().fadeOut();
- }, 1000);
+ function callback() {
+ setTimeout(function() {
+ $( "#effect:visible" ).removeAttr( "style" ).fadeOut();
+ }, 1000 );
};
-
- //set effect from select menu value
- $("#button").click(function() {
+
+ // set effect from select menu value
+ $( "#button" ).click(function() {
runEffect();
return false;
});
-
- $("#effect").hide();
+
+ $( "#effect" ).hide();
});
</script>
</head>
@@ -89,18 +88,16 @@
<option value="shake">Shake</option>
<option value="size">Size</option>
<option value="slide">Slide</option>
- <option value="transfer">Transfer</option>
</select>
<a href="#" id="button" class="ui-state-default ui-corner-all">Run Effect</a>
-
</div><!-- End demo -->
-<div class="demo-description">
-<p>Click the button above to preview the effect.</p>
+<div class="demo-description">
+<p>Click the button above to preview the effect.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/show/index.html b/demos/show/index.html
index 0e9af371f..f5bd6a0e4 100644
--- a/demos/show/index.html
+++ b/demos/show/index.html
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Effects Demos</title>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <link rel="stylesheet" href="../demos.css">
</head>
<body>
diff --git a/demos/slider/colorpicker.html b/demos/slider/colorpicker.html
index 121249e22..7aa90d49b 100644
--- a/demos/slider/colorpicker.html
+++ b/demos/slider/colorpicker.html
@@ -1,16 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Slider - Colorpicker</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.slider.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.slider.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
#red, #green, #blue {
float: left;
clear: left;
@@ -32,39 +32,39 @@
#blue .ui-slider-handle { border-color: #729fcf; }
#demo-frame > div.demo { padding: 10px !important; };
</style>
- <script type="text/javascript">
- function hexFromRGB (r, g, b) {
+ <script>
+ function hexFromRGB(r, g, b) {
var hex = [
- r.toString(16),
- g.toString(16),
- b.toString(16)
+ r.toString( 16 ),
+ g.toString( 16 ),
+ b.toString( 16 )
];
- $.each(hex, function (nr, val) {
- if (val.length == 1) {
- hex[nr] = '0' + val;
+ $.each( hex, function( nr, val ) {
+ if ( val.length === 1 ) {
+ hex[ nr ] = "0" + val;
}
});
- return hex.join('').toUpperCase();
+ return hex.join( "" ).toUpperCase();
}
function refreshSwatch() {
- var red = $("#red").slider("value")
- ,green = $("#green").slider("value")
- ,blue = $("#blue").slider("value")
- ,hex = hexFromRGB(red, green, blue);
- $("#swatch").css("background-color", "#" + hex);
+ var red = $( "#red" ).slider( "value" ),
+ green = $( "#green" ).slider( "value" ),
+ blue = $( "#blue" ).slider( "value" ),
+ hex = hexFromRGB( red, green, blue );
+ $( "#swatch" ).css( "background-color", "#" + hex );
}
$(function() {
- $("#red, #green, #blue").slider({
- orientation: 'horizontal',
+ $( "#red, #green, #blue" ).slider({
+ orientation: "horizontal",
range: "min",
max: 255,
value: 127,
slide: refreshSwatch,
change: refreshSwatch
});
- $("#red").slider("value", 255);
- $("#green").slider("value", 140);
- $("#blue").slider("value", 60);
+ $( "#red" ).slider( "value", 255 );
+ $( "#green" ).slider( "value", 140 );
+ $( "#blue" ).slider( "value", 60 );
});
</script>
</head>
@@ -73,8 +73,8 @@
<div class="demo">
<p class="ui-state-default ui-corner-all ui-helper-clearfix" style="padding:4px;">
-<span class="ui-icon ui-icon-pencil" style="float:left; margin:-2px 5px 0 0;"></span>
-Simple Colorpicker
+ <span class="ui-icon ui-icon-pencil" style="float:left; margin:-2px 5px 0 0;"></span>
+ Simple Colorpicker
</p>
<div id="red"></div>
@@ -85,10 +85,10 @@ Simple Colorpicker
</div><!-- End demo -->
-<div class="demo-description" style="clear:left;">
-<p>Combine three sliders to create a simple RGB colorpicker.</p>
+<div class="demo-description" style="clear:left;">
+<p>Combine three sliders to create a simple RGB colorpicker.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/slider/default.html b/demos/slider/default.html
index d63086b4d..e1aabef4f 100644
--- a/demos/slider/default.html
+++ b/demos/slider/default.html
@@ -1,21 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8" >
<title>jQuery UI Slider - Default functionality</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.slider.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
- #demo-frame > div.demo { padding: 10px !important; }
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.slider.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
+ #demo-frame > div.demo { padding: 10px !important; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#slider").slider();
+ $( "#slider" ).slider();
});
</script>
</head>
@@ -27,10 +27,10 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>The basic slider is horizontal and has a single handle that can be moved with the mouse or by using the arrow keys.</p>
+<div class="demo-description">
+<p>The basic slider is horizontal and has a single handle that can be moved with the mouse or by using the arrow keys.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/slider/hotelrooms.html b/demos/slider/hotelrooms.html
index 02f8b772f..c5a4954c0 100644
--- a/demos/slider/hotelrooms.html
+++ b/demos/slider/hotelrooms.html
@@ -1,32 +1,32 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Slider - Range with fixed minimum</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.slider.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
- #demo-frame > div.demo { padding: 10px !important; };
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.slider.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
+ #demo-frame > div.demo { padding: 10px !important; };
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- var select = $("#minbeds");
- var slider = $('<div id="slider"></div>').insertAfter(select).slider({
+ var select = $( "#minbeds" );
+ var slider = $( "<div id='slider'></div>" ).insertAfter( select ).slider({
min: 1,
max: 6,
range: "min",
- value: select[0].selectedIndex + 1,
- slide: function(event, ui) {
- select[0].selectedIndex = ui.value - 1;
+ value: select[ 0 ].selectedIndex + 1,
+ slide: function( event, ui ) {
+ select[ 0 ].selectedIndex = ui.value - 1;
}
});
- $("#minbeds").click(function() {
- slider.slider("value", this.selectedIndex + 1);
+ $( "#minbeds" ).change(function() {
+ slider.slider( "value", this.selectedIndex + 1 );
});
});
</script>
@@ -49,10 +49,10 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>How to bind a slider to an existing select element. The select stays visible to display the change. When the select is changed, the slider is updated, too.</p>
+<div class="demo-description">
+<p>How to bind a slider to an existing select element. The select stays visible to display the change. When the select is changed, the slider is updated, too.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/slider/index.html b/demos/slider/index.html
index ec9a2f4f3..caf68fe97 100644
--- a/demos/slider/index.html
+++ b/demos/slider/index.html
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Slider Demos</title>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <link rel="stylesheet" href="../demos.css">
</head>
<body>
diff --git a/demos/slider/multiple-vertical.html b/demos/slider/multiple-vertical.html
index 62d0b1634..36cde9c64 100644
--- a/demos/slider/multiple-vertical.html
+++ b/demos/slider/multiple-vertical.html
@@ -1,35 +1,35 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Slider - Multiple sliders</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.slider.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
- #demo-frame > div.demo { padding: 10px !important; }
- #eq span {
- height:120px; float:left; margin:15px
- }
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.slider.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
+ #demo-frame > div.demo { padding: 10px !important; }
+ #eq span {
+ height:120px; float:left; margin:15px
+ }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
// setup master volume
- $("#master").slider({
+ $( "#master" ).slider({
value: 60,
orientation: "horizontal",
range: "min",
animate: true
});
// setup graphic EQ
- $("#eq > span").each(function() {
+ $( "#eq > span" ).each(function() {
// read initial values from markup and remove that
- var value = parseInt($(this).text());
- $(this).empty().slider({
+ var value = parseInt( $( this ).text(), 10 );
+ $( this ).empty().slider({
value: value,
range: "min",
animate: true,
@@ -44,15 +44,15 @@
<div class="demo">
<p class="ui-state-default ui-corner-all ui-helper-clearfix" style="padding:4px;">
-<span class="ui-icon ui-icon-volume-on" style="float:left; margin:-2px 5px 0 0;"></span>
-Master volume
+ <span class="ui-icon ui-icon-volume-on" style="float:left; margin:-2px 5px 0 0;"></span>
+ Master volume
</p>
<div id="master" style="width:260px; margin:15px;"></div>
<p class="ui-state-default ui-corner-all" style="padding:4px;margin-top:4em;">
-<span class="ui-icon ui-icon-signal" style="float:left; margin:-2px 5px 0 0;"></span>
-Graphic EQ
+ <span class="ui-icon ui-icon-signal" style="float:left; margin:-2px 5px 0 0;"></span>
+ Graphic EQ
</p>
<div id="eq">
@@ -67,10 +67,10 @@ Graphic EQ
</div><!-- End demo -->
-<div class="demo-description" style="clear:left;">
-<p>Combine horizontal and vertical sliders, each with their own options, to create the UI for a music player.</p>
+<div class="demo-description" style="clear:left;">
+<p>Combine horizontal and vertical sliders, each with their own options, to create the UI for a music player.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/slider/range-vertical.html b/demos/slider/range-vertical.html
index 70fbb47b3..eef1e6f99 100644
--- a/demos/slider/range-vertical.html
+++ b/demos/slider/range-vertical.html
@@ -1,29 +1,30 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Slider - Vertical range slider</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.slider.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
- #demo-frame > div.demo { padding: 10px !important; };
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.slider.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
+ #demo-frame > div.demo { padding: 10px !important; };
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#slider-range").slider({
+ $( "#slider-range" ).slider({
orientation: "vertical",
range: true,
- values: [17, 67],
- slide: function(event, ui) {
- $("#amount").val('$' + ui.values[0] + ' - $' + ui.values[1]);
+ values: [ 17, 67 ],
+ slide: function( event, ui ) {
+ $( "#amount" ).val( "$" + ui.values[ 0 ] + " - $" + ui.values[ 1 ] );
}
});
- $("#amount").val('$' + $("#slider-range").slider("values", 0) + ' - $' + $("#slider-range").slider("values", 1));
+ $( "#amount" ).val( "$" + $( "#slider-range" ).slider( "values", 0 ) +
+ " - $" + $( "#slider-range" ).slider( "values", 1 ) );
});
</script>
</head>
@@ -32,18 +33,18 @@
<div class="demo">
<p>
-<label for="amount">Target sales goal (Millions):</label>
-<input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;" />
+ <label for="amount">Target sales goal (Millions):</label>
+ <input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;" />
</p>
<div id="slider-range" style="height:250px;"></div>
</div><!-- End demo -->
-<div class="demo-description">
-<p>Change the orientation of the range slider to vertical. Assign a height value via <code>.height()</code> or by setting the height through CSS, and set the <code>orientation</code> option to "vertical."</p>
+<div class="demo-description">
+<p>Change the orientation of the range slider to vertical. Assign a height value via <code>.height()</code> or by setting the height through CSS, and set the <code>orientation</code> option to "vertical."</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/slider/range.html b/demos/slider/range.html
index be4e19af4..4ee752b68 100644
--- a/demos/slider/range.html
+++ b/demos/slider/range.html
@@ -1,30 +1,31 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Slider - Range slider</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.slider.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
- #demo-frame > div.demo { padding: 10px !important; };
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.slider.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
+ #demo-frame > div.demo { padding: 10px !important; };
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#slider-range").slider({
+ $( "#slider-range" ).slider({
range: true,
min: 0,
max: 500,
- values: [75, 300],
- slide: function(event, ui) {
- $("#amount").val('$' + ui.values[0] + ' - $' + ui.values[1]);
+ values: [ 75, 300 ],
+ slide: function( event, ui ) {
+ $( "#amount" ).val( "$" + ui.values[ 0 ] + " - $" + ui.values[ 1 ] );
}
});
- $("#amount").val('$' + $("#slider-range").slider("values", 0) + ' - $' + $("#slider-range").slider("values", 1));
+ $( "#amount" ).val( "$" + $( "#slider-range" ).slider( "values", 0 ) +
+ " - $" + $( "#slider-range" ).slider( "values", 1 ) );
});
</script>
</head>
@@ -33,18 +34,18 @@
<div class="demo">
<p>
-<label for="amount">Price range:</label>
-<input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;" />
+ <label for="amount">Price range:</label>
+ <input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;" />
</p>
<div id="slider-range"></div>
</div><!-- End demo -->
-<div class="demo-description">
-<p>Set the <code>range</code> option to true to capture a range of values with two drag handles. The space between the handles is filled with a different background color to indicate those values are selected.</p>
+<div class="demo-description">
+<p>Set the <code>range</code> option to true to capture a range of values with two drag handles. The space between the handles is filled with a different background color to indicate those values are selected.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/slider/rangemax.html b/demos/slider/rangemax.html
index b4f4e1e08..8a8a3ce80 100644
--- a/demos/slider/rangemax.html
+++ b/demos/slider/rangemax.html
@@ -1,30 +1,30 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Slider - Range with fixed maximum</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.slider.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
- #demo-frame > div.demo { padding: 10px !important; };
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.slider.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
+ #demo-frame > div.demo { padding: 10px !important; };
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#slider-range-max").slider({
+ $( "#slider-range-max" ).slider({
range: "max",
min: 1,
max: 10,
value: 2,
- slide: function(event, ui) {
- $("#amount").val(ui.value);
+ slide: function( event, ui ) {
+ $( "#amount" ).val( ui.value );
}
});
- $("#amount").val($("#slider-range-max").slider("value"));
+ $( "#amount" ).val( $( "#slider-range-max" ).slider( "value" ) );
});
</script>
</head>
@@ -33,17 +33,17 @@
<div class="demo">
<p>
-<labe for="amount">Minimum number of bedrooms:</label>
-<input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;" />
+ <label for="amount">Minimum number of bedrooms:</label>
+ <input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;" />
</p>
<div id="slider-range-max"></div>
</div><!-- End demo -->
-<div class="demo-description">
-<p>Fix the maximum value of the range slider so that the user can only select a minimum. Set the <code>range</code> option to "max."</p>
+<div class="demo-description">
+<p>Fix the maximum value of the range slider so that the user can only select a minimum. Set the <code>range</code> option to "max."</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/slider/rangemin.html b/demos/slider/rangemin.html
index 4f146824a..e9527dc3c 100644
--- a/demos/slider/rangemin.html
+++ b/demos/slider/rangemin.html
@@ -1,30 +1,30 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Slider - Range with fixed minimum</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.slider.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
- #demo-frame > div.demo { padding: 10px !important; };
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.slider.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
+ #demo-frame > div.demo { padding: 10px !important; };
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#slider-range-min").slider({
+ $( "#slider-range-min" ).slider({
range: "min",
value: 37,
min: 1,
max: 700,
- slide: function(event, ui) {
- $("#amount").val('$' + ui.value);
+ slide: function( event, ui ) {
+ $( "#amount" ).val( "$" + ui.value );
}
});
- $("#amount").val('$' + $("#slider-range-min").slider("value"));
+ $( "#amount" ).val( "$" + $( "#slider-range-min" ).slider( "value" ) );
});
</script>
</head>
@@ -33,18 +33,18 @@
<div class="demo">
<p>
-<label for="amount">Maximum price:</label>
-<input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;" />
+ <label for="amount">Maximum price:</label>
+ <input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;" />
</p>
<div id="slider-range-min"></div>
</div><!-- End demo -->
-<div class="demo-description">
-<p>Fix the minimum value of the range slider so that the user can only select a maximum. Set the <code>range</code> option to "min."</p>
+<div class="demo-description">
+<p>Fix the minimum value of the range slider so that the user can only select a maximum. Set the <code>range</code> option to "min."</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/slider/side-scroll.html b/demos/slider/side-scroll.html
index fe5599bee..c159653a8 100644
--- a/demos/slider/side-scroll.html
+++ b/demos/slider/side-scroll.html
@@ -1,92 +1,98 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Slider - Slider scrollbar</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.slider.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
- #demo-frame > div.demo { padding: 10px !important; }
- .scroll-pane { overflow: auto; width: 99%; float:left; }
- .scroll-content { width: 2440px; float: left; }
- .scroll-content-item { width: 100px; height: 100px; float: left; margin: 10px; font-size: 3em; line-height: 96px; text-align: center; }
- * html .scroll-content-item { display: inline; } /* IE6 float double margin bug */
- .scroll-bar-wrap { clear: left; padding: 0 4px 0 2px; margin: 0 -1px -1px -1px; }
- .scroll-bar-wrap .ui-slider { background: none; border:0; height: 2em; margin: 0 auto; }
- .scroll-bar-wrap .ui-handle-helper-parent { position: relative; width: 100%; height: 100%; margin: 0 auto; }
- .scroll-bar-wrap .ui-slider-handle { top:.2em; height: 1.5em; }
- .scroll-bar-wrap .ui-slider-handle .ui-icon { margin: -8px auto 0; position: relative; top: 50%; }
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.slider.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
+ #demo-frame > div.demo { padding: 10px !important; }
+ .scroll-pane { overflow: auto; width: 99%; float:left; }
+ .scroll-content { width: 2440px; float: left; }
+ .scroll-content-item { width: 100px; height: 100px; float: left; margin: 10px; font-size: 3em; line-height: 96px; text-align: center; }
+ * html .scroll-content-item { display: inline; } /* IE6 float double margin bug */
+ .scroll-bar-wrap { clear: left; padding: 0 4px 0 2px; margin: 0 -1px -1px -1px; }
+ .scroll-bar-wrap .ui-slider { background: none; border:0; height: 2em; margin: 0 auto; }
+ .scroll-bar-wrap .ui-handle-helper-parent { position: relative; width: 100%; height: 100%; margin: 0 auto; }
+ .scroll-bar-wrap .ui-slider-handle { top:.2em; height: 1.5em; }
+ .scroll-bar-wrap .ui-slider-handle .ui-icon { margin: -8px auto 0; position: relative; top: 50%; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
//scrollpane parts
- var scrollPane = $('.scroll-pane');
- var scrollContent = $('.scroll-content');
+ var scrollPane = $( ".scroll-pane" ),
+ scrollContent = $( ".scroll-content" );
//build slider
- var scrollbar = $(".scroll-bar").slider({
- slide:function(e, ui){
- if( scrollContent.width() > scrollPane.width() ){ scrollContent.css('margin-left', Math.round( ui.value / 100 * ( scrollPane.width() - scrollContent.width() )) + 'px'); }
- else { scrollContent.css('margin-left', 0); }
+ var scrollbar = $( ".scroll-bar" ).slider({
+ slide: function( event, ui ) {
+ if ( scrollContent.width() > scrollPane.width() ) {
+ scrollContent.css( "margin-left", Math.round(
+ ui.value / 100 * ( scrollPane.width() - scrollContent.width() )
+ ) + "px" );
+ } else {
+ scrollContent.css( "margin-left", 0 );
+ }
}
});
//append icon to handle
- var handleHelper = scrollbar.find('.ui-slider-handle')
- .mousedown(function(){
+ var handleHelper = scrollbar.find( ".ui-slider-handle" )
+ .mousedown(function() {
scrollbar.width( handleHelper.width() );
})
- .mouseup(function(){
- scrollbar.width( '100%' );
+ .mouseup(function() {
+ scrollbar.width( "100%" );
})
- .append('<span class="ui-icon ui-icon-grip-dotted-vertical"></span>')
- .wrap('<div class="ui-handle-helper-parent"></div>').parent();
+ .append( "<span class='ui-icon ui-icon-grip-dotted-vertical'></span>" )
+ .wrap( "<div class='ui-handle-helper-parent'></div>" ).parent();
//change overflow to hidden now that slider handles the scrolling
- scrollPane.css('overflow','hidden');
+ scrollPane.css( "overflow", "hidden" );
//size scrollbar and handle proportionally to scroll distance
- function sizeScrollbar(){
+ function sizeScrollbar() {
var remainder = scrollContent.width() - scrollPane.width();
var proportion = remainder / scrollContent.width();
- var handleSize = scrollPane.width() - (proportion * scrollPane.width());
- scrollbar.find('.ui-slider-handle').css({
+ var handleSize = scrollPane.width() - ( proportion * scrollPane.width() );
+ scrollbar.find( ".ui-slider-handle" ).css({
width: handleSize,
- 'margin-left': -handleSize/2
+ "margin-left": -handleSize / 2
});
- handleHelper.width('').width( scrollbar.width() - handleSize);
+ handleHelper.width( "" ).width( scrollbar.width() - handleSize );
}
//reset slider value based on scroll content position
- function resetValue(){
+ function resetValue() {
var remainder = scrollPane.width() - scrollContent.width();
- var leftVal = scrollContent.css('margin-left') == 'auto' ? 0 : parseInt(scrollContent.css('margin-left'));
- var percentage = Math.round(leftVal / remainder * 100);
- scrollbar.slider("value", percentage);
+ var leftVal = scrollContent.css( "margin-left" ) === "auto" ? 0 :
+ parseInt( scrollContent.css( "margin-left" ) );
+ var percentage = Math.round( leftVal / remainder * 100 );
+ scrollbar.slider( "value", percentage );
}
+
//if the slider is 100% and window gets larger, reveal content
- function reflowContent(){
- var showing = scrollContent.width() + parseInt( scrollContent.css('margin-left') );
+ function reflowContent() {
+ var showing = scrollContent.width() + parseInt( scrollContent.css( "margin-left" ), 10 );
var gap = scrollPane.width() - showing;
- if(gap > 0){
- scrollContent.css('margin-left', parseInt( scrollContent.css('margin-left') ) + gap);
+ if ( gap > 0 ) {
+ scrollContent.css( "margin-left", parseInt( scrollContent.css( "margin-left" ), 10 ) + gap );
}
}
//change handle position on window resize
- $(window)
- .resize(function(){
- resetValue();
- sizeScrollbar();
- reflowContent();
+ $( window ).resize(function() {
+ resetValue();
+ sizeScrollbar();
+ reflowContent();
});
//init scrollbar size
- setTimeout(sizeScrollbar,10);//safari wants a timeout
+ setTimeout( sizeScrollbar, 10 );//safari wants a timeout
});
</script>
</head>
@@ -122,16 +128,12 @@
</div>
</div>
-
-
</div><!-- End demo -->
<div class="demo-description">
-
<p>Use a slider to manipulate the positioning of content on the page. In this case, it acts as a scrollbar with the potential to capture values if needed.</p>
-
</div><!-- End demo-description -->
</body>
diff --git a/demos/slider/slider-vertical.html b/demos/slider/slider-vertical.html
index b6b4027b1..006f45ec0 100644
--- a/demos/slider/slider-vertical.html
+++ b/demos/slider/slider-vertical.html
@@ -1,31 +1,31 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Slider - Vertical slider</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.slider.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
- #demo-frame > div.demo { padding: 10px !important; };
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.slider.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
+ #demo-frame > div.demo { padding: 10px !important; };
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#slider-vertical").slider({
+ $( "#slider-vertical" ).slider({
orientation: "vertical",
range: "min",
min: 0,
max: 100,
value: 60,
- slide: function(event, ui) {
- $("#amount").val(ui.value);
+ slide: function( event, ui ) {
+ $( "#amount" ).val( ui.value );
}
});
- $("#amount").val($("#slider-vertical").slider("value"));
+ $( "#amount" ).val( $( "#slider-vertical" ).slider( "value" ) );
});
</script>
</head>
@@ -34,18 +34,18 @@
<div class="demo">
<p>
-<label for="amount">Volume:</label>
-<input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;" />
+ <label for="amount">Volume:</label>
+ <input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;" />
</p>
<div id="slider-vertical" style="height:200px;"></div>
</div><!-- End demo -->
-<div class="demo-description">
-<p>Change the orientation of the slider to vertical. Assign a height value via <code>.height()</code> or by setting the height through CSS, and set the <code>orientation</code> option to "vertical."</p>
+<div class="demo-description">
+<p>Change the orientation of the slider to vertical. Assign a height value via <code>.height()</code> or by setting the height through CSS, and set the <code>orientation</code> option to "vertical."</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/slider/steps.html b/demos/slider/steps.html
index 66c84b0c3..6a84b2f8a 100644
--- a/demos/slider/steps.html
+++ b/demos/slider/steps.html
@@ -1,30 +1,30 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Slider - Snap to increments</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.slider.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
- #demo-frame > div.demo { padding: 10px !important; };
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.slider.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
+ #demo-frame > div.demo { padding: 10px !important; };
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#slider").slider({
+ $( "#slider" ).slider({
value:100,
min: 0,
max: 500,
step: 50,
- slide: function(event, ui) {
- $("#amount").val('$' + ui.value);
+ slide: function( event, ui ) {
+ $( "#amount" ).val( "$" + ui.value );
}
});
- $("#amount").val('$' + $("#slider").slider("value"));
+ $( "#amount" ).val( "$" + $( "#slider" ).slider( "value" ) );
});
</script>
</head>
@@ -33,18 +33,18 @@
<div class="demo">
<p>
-<label for="amount">Donation amount ($50 increments):</label>
-<input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;" />
+ <label for="amount">Donation amount ($50 increments):</label>
+ <input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;" />
</p>
<div id="slider"></div>
</div><!-- End demo -->
-<div class="demo-description">
-<p>Increment slider values with the <code>step</code> option set to an integer, commonly a dividend of the slider's maximum value. The default increment is 1.</p>
+<div class="demo-description">
+<p>Increment slider values with the <code>step</code> option set to an integer, commonly a dividend of the slider's maximum value. The default increment is 1.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/slider/tabs.html b/demos/slider/tabs.html
index 40916c46a..eabda00aa 100644
--- a/demos/slider/tabs.html
+++ b/demos/slider/tabs.html
@@ -1,31 +1,31 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Slider - Snap to increments</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.tabs.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.slider.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
- #demo-frame > div.demo { padding: 10px !important; }
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.tabs.js"></script>
+ <script src="../../ui/jquery.ui.slider.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
+ #demo-frame > div.demo { padding: 10px !important; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#tabs").tabs({
- select: function(event, ui) {
- $("#slider").slider("value", ui.index);
+ $( "#tabs" ).tabs({
+ select: function( event, ui ) {
+ $( "#slider" ).slider( "value", ui.index );
}
});
- $("#slider").slider({
+ $( "#slider" ).slider({
min: 0,
- max: $("#tabs").tabs("length") - 1,
- slide: function(event, ui) {
- $("#tabs").tabs("select", ui.value);
+ max: $( "#tabs" ).tabs( "length" ) - 1,
+ slide: function( event, ui ) {
+ $( "#tabs" ).tabs( "select", ui.value );
}
});
});
@@ -57,10 +57,10 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Control tabs with a slider.</p>
+<div class="demo-description">
+<p>Control tabs with a slider.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/sortable/connect-lists-through-tabs.html b/demos/sortable/connect-lists-through-tabs.html
index d432afe9c..c5c2dfad1 100644
--- a/demos/sortable/connect-lists-through-tabs.html
+++ b/demos/sortable/connect-lists-through-tabs.html
@@ -1,36 +1,37 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Sortable - Connect lists with Tabs</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.sortable.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.droppable.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.tabs.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.sortable.js"></script>
+ <script src="../../ui/jquery.ui.droppable.js"></script>
+ <script src="../../ui/jquery.ui.tabs.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
#sortable1 li, #sortable2 li { margin: 0 5px 5px 5px; padding: 5px; font-size: 1.2em; width: 120px; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#sortable1, #sortable2").sortable().disableSelection();
+ $( "#sortable1, #sortable2" ).sortable().disableSelection();
- var $tabs = $("#tabs").tabs();
+ var $tabs = $( "#tabs" ).tabs();
- var $tab_items = $("ul:first li",$tabs).droppable({
+ var $tab_items = $( "ul:first li", $tabs ).droppable({
accept: ".connectedSortable li",
hoverClass: "ui-state-hover",
- drop: function(ev, ui) {
- var $item = $(this);
- var $list = $($item.find('a').attr('href')).find('.connectedSortable');
+ drop: function( event, ui ) {
+ var $item = $( this );
+ var $list = $( $item.find( "a" ).attr( "href" ) )
+ .find( ".connectedSortable" );
- ui.draggable.hide('slow', function() {
- $tabs.tabs('select', $tab_items.index($item));
- $(this).appendTo($list).show('slow');
+ ui.draggable.hide( "slow", function() {
+ $tabs.tabs( "select", $tab_items.index( $item ) );
+ $( this ).appendTo( $list ).show( "slow" );
});
}
});
@@ -67,12 +68,10 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>
- Sort items from one list into another and vice versa, by dropping the list item on the appropriate tab above.
-</p>
+<div class="demo-description">
+<p>Sort items from one list into another and vice versa, by dropping the list item on the appropriate tab above.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/sortable/connect-lists.html b/demos/sortable/connect-lists.html
index b08678d61..e75e23193 100644
--- a/demos/sortable/connect-lists.html
+++ b/demos/sortable/connect-lists.html
@@ -1,23 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Sortable - Connect lists</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.sortable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.sortable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
#sortable1, #sortable2 { list-style-type: none; margin: 0; padding: 0; float: left; margin-right: 10px; }
#sortable1 li, #sortable2 li { margin: 0 5px 5px 5px; padding: 5px; font-size: 1.2em; width: 120px; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#sortable1, #sortable2").sortable({
- connectWith: '.connectedSortable'
+ $( "#sortable1, #sortable2" ).sortable({
+ connectWith: ".connectedSortable"
}).disableSelection();
});
</script>
@@ -43,15 +43,15 @@
</div><!-- End demo -->
-<div class="demo-description">
+
+<div class="demo-description">
<p>
Sort items from one list into another and vice versa, by passing a selector into
the <code>connectWith</code> option. The simplest way to do this is to
group all related lists with a CSS class, and then pass that class into the
sortable function (i.e., <code>connectWith: '.myclass'</code>).
</p>
-
</div><!-- End demo-description -->
</body>
diff --git a/demos/sortable/default.html b/demos/sortable/default.html
index ab81a8bc0..adf8343c9 100644
--- a/demos/sortable/default.html
+++ b/demos/sortable/default.html
@@ -1,24 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Sortable - Default functionality</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.sortable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.sortable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
#sortable { list-style-type: none; margin: 0; padding: 0; width: 60%; }
#sortable li { margin: 0 3px 3px 3px; padding: 0.4em; padding-left: 1.5em; font-size: 1.4em; height: 18px; }
#sortable li span { position: absolute; margin-left: -1.3em; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#sortable").sortable();
- $("#sortable").disableSelection();
+ $( "#sortable" ).sortable();
+ $( "#sortable" ).disableSelection();
});
</script>
</head>
@@ -37,14 +37,14 @@
</div><!-- End demo -->
-<div class="demo-description">
+
+<div class="demo-description">
<p>
Enable a group of DOM elements to be sortable. Click on and drag an
element to a new spot within the list, and the other items will adjust to
fit. By default, sortable items share <code>draggable</code> properties.
</p>
-
</div><!-- End demo-description -->
</body>
diff --git a/demos/sortable/delay-start.html b/demos/sortable/delay-start.html
index 7afb6be37..35d1d52f5 100644
--- a/demos/sortable/delay-start.html
+++ b/demos/sortable/delay-start.html
@@ -1,30 +1,30 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Sortable - Delay start</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.sortable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.sortable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
#sortable1, #sortable2 { list-style-type: none; margin: 0; padding: 0; margin-bottom: 15px;zoom: 1; }
#sortable1 li, #sortable2 li { margin: 0 5px 5px 5px; padding: 5px; font-size: 1.2em; width: 95%; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#sortable1").sortable({
+ $( "#sortable1" ).sortable({
delay: 300
});
- $("#sortable2").sortable({
+ $( "#sortable2" ).sortable({
distance: 15
});
- $("li").disableSelection();
+ $( "li" ).disableSelection();
});
</script>
</head>
@@ -51,8 +51,9 @@
</div><!-- End demo -->
-<div class="demo-description">
+
+<div class="demo-description">
<p>
Prevent accidental sorting either by delay (time) or distance. Set a number of
milliseconds the element needs to be dragged before sorting starts
@@ -60,7 +61,6 @@
needs to be dragged before sorting starts with the <code>distance</code>
option.
</p>
-
</div><!-- End demo-description -->
</body>
diff --git a/demos/sortable/display-grid.html b/demos/sortable/display-grid.html
index e90a38c25..aed60cdf6 100644
--- a/demos/sortable/display-grid.html
+++ b/demos/sortable/display-grid.html
@@ -1,23 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Sortable - Display as grid</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.sortable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.sortable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
#sortable { list-style-type: none; margin: 0; padding: 0; }
#sortable li { margin: 3px 3px 3px 0; padding: 1px; float: left; width: 100px; height: 90px; font-size: 4em; text-align: center; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#sortable").sortable();
- $("#sortable").disableSelection();
+ $( "#sortable" ).sortable();
+ $( "#sortable" ).disableSelection();
});
</script>
</head>
@@ -41,13 +41,13 @@
</div><!-- End demo -->
-<div class="demo-description">
+
+<div class="demo-description">
<p>
To arrange sortable items as a grid, give them identical dimensions and
float them using CSS.
</p>
-
</div><!-- End demo-description -->
</body>
diff --git a/demos/sortable/empty-lists.html b/demos/sortable/empty-lists.html
index b68ad5983..ac269dfe2 100644
--- a/demos/sortable/empty-lists.html
+++ b/demos/sortable/empty-lists.html
@@ -1,31 +1,31 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Sortable - Handle empty lists</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.sortable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.sortable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
#sortable1, #sortable2, #sortable3 { list-style-type: none; margin: 0; padding: 0; float: left; margin-right: 10px; background: #eee; padding: 5px; width: 143px;}
#sortable1 li, #sortable2 li, #sortable3 li { margin: 5px; padding: 5px; font-size: 1.2em; width: 120px; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("ul.droptrue").sortable({
- connectWith: 'ul'
+ $( "ul.droptrue" ).sortable({
+ connectWith: "ul"
});
- $("ul.dropfalse").sortable({
- connectWith: 'ul',
+ $( "ul.dropfalse" ).sortable({
+ connectWith: "ul",
dropOnEmpty: false
});
- $("#sortable1, #sortable2, #sortable3").disableSelection();
+ $( "#sortable1, #sortable2, #sortable3" ).disableSelection();
});
</script>
</head>
@@ -55,14 +55,14 @@
</div><!-- End demo -->
-<div class="demo-description">
+
+<div class="demo-description">
<p>
Prevent all items in a list from being dropped into a separate, empty list
using the <code>dropOnEmpty</code> option set to <code>false</code>. By default,
sortable items can be dropped on empty lists.
</p>
-
</div><!-- End demo-description -->
</body>
diff --git a/demos/sortable/index.html b/demos/sortable/index.html
index 9fa93801f..b307ef777 100644
--- a/demos/sortable/index.html
+++ b/demos/sortable/index.html
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Sortable Demos</title>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <link rel="stylesheet" href="../demos.css">
</head>
<body>
diff --git a/demos/sortable/items.html b/demos/sortable/items.html
index 3f1cbb6c3..8858b3019 100644
--- a/demos/sortable/items.html
+++ b/demos/sortable/items.html
@@ -1,30 +1,30 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Sortable - Include / exclude items</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.sortable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.sortable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
#sortable1, #sortable2 { list-style-type: none; margin: 0; padding: 0; zoom: 1; }
#sortable1 li, #sortable2 li { margin: 0 5px 5px 5px; padding: 3px; width: 90%; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#sortable1").sortable({
- items: 'li:not(.ui-state-disabled)'
+ $( "#sortable1" ).sortable({
+ items: "li:not(.ui-state-disabled)"
});
- $("#sortable2").sortable({
- cancel: '.ui-state-disabled'
+ $( "#sortable2" ).sortable({
+ cancel: ".ui-state-disabled"
});
- $("#sortable1 li, #sortable2 li").disableSelection();
+ $( "#sortable1 li, #sortable2 li" ).disableSelection();
});
</script>
</head>
@@ -51,20 +51,19 @@
</div><!-- End demo -->
-<div class="demo-description">
+
+<div class="demo-description">
<p>
Specify which items are eligible to sort by passing a jQuery selector into
the <code>items</code> option. Items excluded from this option are not
sortable, nor are they valid targets for sortable items.
</p>
-
<p>
To only prevent sorting on certain items, pass a jQuery selector into the
<code>cancel</code> option. Cancelled items remain valid sort targets for
others.
</p>
-
</div><!-- End demo-description -->
</body>
diff --git a/demos/sortable/placeholder.html b/demos/sortable/placeholder.html
index d9c7e838c..400c8dce8 100644
--- a/demos/sortable/placeholder.html
+++ b/demos/sortable/placeholder.html
@@ -1,27 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Sortable - Drop placeholder</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.sortable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.sortable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
#sortable { list-style-type: none; margin: 0; padding: 0; width: 60%; }
#sortable li { margin: 0 5px 5px 5px; padding: 5px; font-size: 1.2em; height: 1.5em; }
html>body #sortable li { height: 1.5em; line-height: 1.2em; }
.ui-state-highlight { height: 1.5em; line-height: 1.2em; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#sortable").sortable({
- placeholder: 'ui-state-highlight'
+ $( "#sortable" ).sortable({
+ placeholder: "ui-state-highlight"
});
- $("#sortable").disableSelection();
+ $( "#sortable" ).disableSelection();
});
</script>
</head>
@@ -40,8 +40,9 @@
</div><!-- End demo -->
-<div class="demo-description">
+
+<div class="demo-description">
<p>
When dragging a sortable item to a new location, other items will make room
for the that item by shifting to allow white space between them. Pass a
@@ -49,7 +50,6 @@
be visible. Use the boolean <code>forcePlaceholderSize</code> option
to set dimensions on the placeholder.
</p>
-
</div><!-- End demo-description -->
</body>
diff --git a/demos/sortable/portlets.html b/demos/sortable/portlets.html
index fefef3d9f..fc72c8229 100644
--- a/demos/sortable/portlets.html
+++ b/demos/sortable/portlets.html
@@ -1,16 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Sortable - Portlets</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.sortable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.sortable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
.column { width: 170px; float: left; padding-bottom: 100px; }
.portlet { margin: 0 1em 1em 0; }
.portlet-header { margin: 0.3em; padding-bottom: 4px; padding-left: 0.2em; }
@@ -19,25 +19,25 @@
.ui-sortable-placeholder { border: 1px dotted black; visibility: visible !important; height: 50px !important; }
.ui-sortable-placeholder * { visibility: hidden; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $(".column").sortable({
- connectWith: '.column'
+ $( ".column" ).sortable({
+ connectWith: ".column"
});
- $(".portlet").addClass("ui-widget ui-widget-content ui-helper-clearfix ui-corner-all")
- .find(".portlet-header")
- .addClass("ui-widget-header ui-corner-all")
- .prepend('<span class="ui-icon ui-icon-minusthick"></span>')
+ $( ".portlet" ).addClass( "ui-widget ui-widget-content ui-helper-clearfix ui-corner-all" )
+ .find( ".portlet-header" )
+ .addClass( "ui-widget-header ui-corner-all" )
+ .prepend( "<span class='ui-icon ui-icon-minusthick'></span>")
.end()
- .find(".portlet-content");
+ .find( ".portlet-content" );
- $(".portlet-header .ui-icon").click(function() {
- $(this).toggleClass("ui-icon-minusthick").toggleClass("ui-icon-plusthick");
- $(this).parents(".portlet:first").find(".portlet-content").toggle();
+ $( ".portlet-header .ui-icon" ).click(function() {
+ $( this ).toggleClass( "ui-icon-minusthick" ).toggleClass( "ui-icon-plusthick" );
+ $( this ).parents( ".portlet:first" ).find( ".portlet-content" ).toggle();
});
- $(".column").disableSelection();
+ $( ".column" ).disableSelection();
});
</script>
</head>
@@ -83,13 +83,13 @@
</div><!-- End demo -->
-<div class="demo-description">
+
+<div class="demo-description">
<p>
Enable portlets (styled divs) as sortables and use the <code>connectWith</code>
option to allow sorting between columns.
</p>
-
</div><!-- End demo-description -->
</body>
diff --git a/demos/spinner/currency.html b/demos/spinner/currency.html
new file mode 100644
index 000000000..6ecd43c1e
--- /dev/null
+++ b/demos/spinner/currency.html
@@ -0,0 +1,61 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>jQuery UI Spinner - Default functionality</title>
+ <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
+ <script type="text/javascript" src="../../jquery-1.4.3.js"></script>
+ <script type="text/javascript" src="../../external/jquery.mousewheel-3.0.4.js"></script>
+ <script type="text/javascript" src="../../external/glob.js"></script>
+ <script type="text/javascript" src="../../external/glob.de-DE.js"></script>
+ <script type="text/javascript" src="../../external/glob.ja-JP.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.spinner.js"></script>
+ <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <script type="text/javascript">
+ $(function() {
+ $("#currency").change(function() {
+ var current = $("#spinner").spinner("value");
+ Globalization.preferCulture($(this).val());
+ $("#spinner").spinner("value", current);
+ })
+
+ $("#spinner").spinner({
+ min: 5,
+ max: 2500,
+ step: 25,
+ start: 1000,
+ numberformat: "C"
+ });
+
+ });
+ </script>
+</head>
+<body>
+
+<div class="demo">
+
+<p>
+ <label for="currency">Currency to donate</label>
+ <select id="currency" name="currency">
+ <option value="en-US">US $</option>
+ <option value="de-DE">EUR €</option>
+ <option value="ja-JP">YEN ¥</option>
+ </select>
+</p>
+<p>
+ <label for="spinner">Amount to donate:</label>
+ <input id="spinner" name="spinner" value="5" />
+</p>
+</div>
+
+<div class="demo-description">
+<p>
+ Example of a donation form, with currency selection and amout spinner.
+</p>
+</div>
+
+</body>
+</html>
diff --git a/demos/spinner/decimal.html b/demos/spinner/decimal.html
new file mode 100644
index 000000000..ae45da1e7
--- /dev/null
+++ b/demos/spinner/decimal.html
@@ -0,0 +1,59 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>jQuery UI Spinner - decimal</title>
+ <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
+ <script type="text/javascript" src="../../jquery-1.4.3.js"></script>
+ <script type="text/javascript" src="../../external/jquery.mousewheel-3.0.4.js"></script>
+ <script type="text/javascript" src="../../external/glob.js"></script>
+ <script type="text/javascript" src="../../external/glob.de-DE.js"></script>
+ <script type="text/javascript" src="../../external/glob.ja-JP.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.spinner.js"></script>
+ <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <script type="text/javascript">
+ $(function() {
+ $("#spinner").spinner({
+ step: 0.01,
+ numberformat: "n"
+ });
+
+ $("#culture").change(function() {
+ var current = $("#spinner").spinner("value");
+ Globalization.preferCulture($(this).val());
+ $("#spinner").spinner("value", current);
+ })
+ });
+ </script>
+</head>
+<body>
+
+<div class="demo">
+<p>
+ <label for="spinner">Decimal spinner:</label>
+ <input id="spinner" name="spinner" value="5.06" />
+</p>
+<p>
+ <label for="culture">Select a culture to use for formatting:</label>
+ <select id="culture">
+ <option value="en-EN" selected="selected">English</option>
+ <option value="de-DE">German</option>
+ <option value="ja-JP">Japanese</option>
+ </select>
+</p>
+</div>
+
+<div class="demo-description">
+<p>
+ Example of a decimal spinner. Step is set to 0.01.
+ <br/>The code handling the culture change reads the current spinner value,
+ then changes the culture, then sets the value again, resulting in an updated
+ formatting, based on the new culture.
+</p>
+</div>
+
+</body>
+</html>
diff --git a/demos/spinner/default.html b/demos/spinner/default.html
new file mode 100644
index 000000000..b0f62308d
--- /dev/null
+++ b/demos/spinner/default.html
@@ -0,0 +1,65 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>jQuery UI Spinner - Default functionality</title>
+ <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
+ <script type="text/javascript" src="../../jquery-1.4.3.js"></script>
+ <script type="text/javascript" src="../../external/jquery.mousewheel-3.0.4.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.spinner.js"></script>
+ <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <script type="text/javascript">
+ $(function() {
+ $("#spinner").spinner();
+
+ $("#disable").toggle(function() {
+ $("#spinner").spinner("disable");
+ }, function() {
+ $("#spinner").spinner("enable");
+ });
+ $("#destroy").toggle(function() {
+ $("#spinner").spinner("destroy");
+ }, function() {
+ $("#spinner").spinner();
+ });
+ $("#getvalue").click(function() {
+ alert($("#spinner").spinner("value"));
+ });
+ $("#setvalue").click(function() {
+ $("#spinner").spinner("value", 5);
+ });
+
+ $("button").button();
+ });
+ </script>
+</head>
+<body>
+
+<div class="demo">
+
+<p><label for="spinner">Select a value:</label>
+<input id="spinner" name="value" /></p>
+
+<p>
+<button id="disable">Toggle disable/enable</button>
+<button id="destroy">Toggle widget</button>
+</p>
+
+<p>
+<button id="getvalue">Get value</button>
+<button id="setvalue">Set value to 5</button>
+</p>
+
+</div><!-- End demo -->
+
+<div class="demo-description">
+<p>
+Default spinner.
+</p>
+</div><!-- End demo-description -->
+
+</body>
+</html>
diff --git a/demos/spinner/index.html b/demos/spinner/index.html
new file mode 100644
index 000000000..a49fa1368
--- /dev/null
+++ b/demos/spinner/index.html
@@ -0,0 +1,20 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <title>jQuery UI Spinner Demos</title>
+ <link type="text/css" href="../demos.css" rel="stylesheet" />
+</head>
+<body>
+ <div class="demos-nav">
+ <h4>Examples</h4>
+ <ul>
+ <li class="demo-config-on"><a href="default.html">Default functionality</a></li>
+ <li><a href="decimal.html">Decimal</a></li>
+ <li><a href="currency.html">Currency</a></li>
+ <li><a href="latlong.html">Map</a></li>
+ <li><a href="time.html">Time</a></li>
+ <li><a href="overflow.html">Overflow</a></li>
+ </ul>
+ </div>
+</body>
+</html>
diff --git a/demos/spinner/latlong.html b/demos/spinner/latlong.html
new file mode 100644
index 000000000..7c0c9b21a
--- /dev/null
+++ b/demos/spinner/latlong.html
@@ -0,0 +1,60 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>jQuery UI Spinner - Map</title>
+ <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
+ <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
+ <script type="text/javascript" src="../../jquery-1.4.3.js"></script>
+ <script type="text/javascript" src="../../external/jquery.mousewheel-3.0.4.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.spinner.js"></script>
+ <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <script type="text/javascript">
+ $(function() {
+ function latlong() {
+ return new google.maps.LatLng($("#lat").val(),$("#lng").val());
+ }
+ function position() {
+ map.setCenter(latlong());
+ }
+ $("#lat, #lng").spinner({
+ precision: 6,
+ change: position
+ });
+
+ var map = new google.maps.Map($("#map")[0], {
+ zoom: 8,
+ center: latlong(),
+ mapTypeId: google.maps.MapTypeId.ROADMAP
+ });
+ });
+ </script>
+ <style>
+ #map { width:500px; height:500px; }
+ </style>
+</head>
+<body>
+
+<div class="demo">
+
+<label for="lat">Latitude</label>
+<input id="lat" name="lat" value="44.797916" />
+<br/>
+<label for="lng">Longitude</label>
+<input id="lng" name="lng" value="-93.278046" />
+
+<div id="map"></div>
+
+</div><!-- End demo -->
+
+<div class="demo-description">
+<p>
+Google Maps integration, using spinners to change latidude and longitude.
+</p>
+</div><!-- End demo-description -->
+
+</body>
+</html>
diff --git a/demos/spinner/overflow.html b/demos/spinner/overflow.html
new file mode 100644
index 000000000..716489155
--- /dev/null
+++ b/demos/spinner/overflow.html
@@ -0,0 +1,47 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>jQuery UI Spinner - Default functionality</title>
+ <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
+ <script type="text/javascript" src="../../jquery-1.4.3.js"></script>
+ <script type="text/javascript" src="../../external/jquery.mousewheel-3.0.4.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.spinner.js"></script>
+ <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <script type="text/javascript">
+ $(function() {
+ $("#spinner").spinner({
+ spin: function(event, ui) {
+ if (ui.value > 10) {
+ $(this).spinner("value", -10);
+ return false;
+ } else if (ui.value < -10) {
+ $(this).spinner("value", 10);
+ return false;
+ }
+ }
+ });
+ });
+ </script>
+</head>
+<body>
+
+<div class="demo">
+ <p>
+ <label for="spinner">Select a value:</label>
+ <input id="spinner" name="value" />
+ </p>
+</div>
+
+<div class="demo-description">
+ <p>
+ Overflowing spinner restricted to a range of -10 to 10.
+ For anything above 10, it'll overflow to -10, and the other way round.
+ </p>
+</div>
+
+</body>
+</html>
diff --git a/demos/spinner/time.html b/demos/spinner/time.html
new file mode 100644
index 000000000..3f1efcad2
--- /dev/null
+++ b/demos/spinner/time.html
@@ -0,0 +1,72 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>jQuery UI Spinner - decimal</title>
+ <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
+ <script type="text/javascript" src="../../jquery-1.4.3.js"></script>
+ <script type="text/javascript" src="../../external/jquery.mousewheel-3.0.4.js"></script>
+ <script type="text/javascript" src="../../external/glob.js"></script>
+ <script type="text/javascript" src="../../external/glob.de-DE.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.spinner.js"></script>
+ <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <script type="text/javascript">
+ $.widget("ui.timespinner", $.ui.spinner, {
+ options: {
+ // seconds
+ step: 60 * 1000,
+ // hours
+ page: 60
+ },
+
+ _parse: function(value) {
+ if (typeof value == 'string') {
+ return +Globalization.parseDate(value)
+ }
+ return value;
+ },
+ _format: function() {
+ this.element.val( Globalization.format(new Date(this.options.value), "t") );
+ }
+ })
+ $(function() {
+ $("#spinner").timespinner();
+
+
+ $("#culture").change(function() {
+ var current = $("#spinner").timespinner("value");
+ Globalization.preferCulture($(this).val());
+ $("#spinner").timespinner("value", current);
+ });
+ });
+ </script>
+</head>
+<body>
+
+<div class="demo">
+<p>
+ <label for="spinner">Time spinner:</label>
+ <input id="spinner" name="spinner" value="08:30 PM" />
+</p>
+<p>
+ <label for="culture">Select a culture to use for formatting:</label>
+ <select id="culture">
+ <option value="en-EN" selected="selected">English</option>
+ <option value="de-DE">German</option>
+ </select>
+</p>
+</div>
+
+<div class="demo-description">
+<p>
+ A custom widget extending spinner. Use the Globalization plugin to parse and output
+ a timestamp, with custom step and page options. Cursor up/down spins minutes, page up/down
+ spins hours.
+</p>
+</div>
+
+</body>
+</html>
diff --git a/demos/switchClass/default.html b/demos/switchClass/default.html
index bfb0c9c8b..d7257af45 100644
--- a/demos/switchClass/default.html
+++ b/demos/switchClass/default.html
@@ -1,24 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Effects - switchClass Demo</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.core.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
- .toggler { width: 500px; height: 200px; position: relative;}
- #button { padding: .5em 1em; text-decoration: none; }
- #effect {position: relative; }
- #effect.newClass { width: 240px; padding: 1em; letter-spacing: 0; font-size: 1.2em; }
- #effect.anotherNewClass { text-indent: 40px; letter-spacing: .4em; width: 410px; height: 100px; padding: 30px; margin: 10px; font-size: 1.6em; }
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.effects.core.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
+ .toggler { width: 500px; height: 200px; position: relative; }
+ #button { padding: .5em 1em; text-decoration: none; }
+ #effect {position: relative; }
+ .newClass { width: 240px; padding: 1em; letter-spacing: 0; font-size: 1.2em; margin: 0; }
+ .anotherNewClass { text-indent: 40px; letter-spacing: .4em; width: 410px; height: 100px; padding: 30px; margin: 10px; font-size: 1.6em; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#button").click(function(){
- $(".newClass").switchClass('newClass', 'anotherNewClass', 1000);
- $(".anotherNewClass").switchClass('anotherNewClass', 'newClass', 1000);
+ $( "#button" ).click(function(){
+ $( ".newClass" ).switchClass( "newClass", "anotherNewClass", 1000 );
+ $( ".anotherNewClass" ).switchClass( "anotherNewClass", "newClass", 1000 );
return false;
});
});
@@ -28,7 +28,6 @@
<div class="demo">
-
<div class="toggler">
<div id="effect" class="newClass ui-corner-all">
Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede.
@@ -38,10 +37,10 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Click the button above to preview the effect.</p>
+<div class="demo-description">
+<p>Click the button above to preview the effect.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/switchClass/index.html b/demos/switchClass/index.html
index 0e9af371f..f5bd6a0e4 100644
--- a/demos/switchClass/index.html
+++ b/demos/switchClass/index.html
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Effects Demos</title>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <link rel="stylesheet" href="../demos.css">
</head>
<body>
diff --git a/demos/tabs/ajax.html b/demos/tabs/ajax.html
index efbdf590a..da976ae75 100644
--- a/demos/tabs/ajax.html
+++ b/demos/tabs/ajax.html
@@ -1,20 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Tabs - Content via Ajax</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.tabs.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.tabs.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- $("#tabs").tabs({
+ $( "#tabs" ).tabs({
ajaxOptions: {
- error: function(xhr, status, index, anchor) {
- $(anchor.hash).html("Couldn't load this tab. We'll try to fix this as soon as possible. If this wouldn't be a demo.");
+ error: function( xhr, status, index, anchor ) {
+ $( anchor.hash ).html(
+ "Couldn't load this tab. We'll try to fix this as soon as possible. " +
+ "If this wouldn't be a demo." );
}
}
});
@@ -40,10 +42,10 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Fetch external content via Ajax for the tabs by setting an href value in the tab links. While the Ajax request is waiting for a response, the tab label changes to say "Loading...", then returns to the normal label once loaded.</p>
+<div class="demo-description">
+<p>Fetch external content via Ajax for the tabs by setting an href value in the tab links. While the Ajax request is waiting for a response, the tab label changes to say "Loading...", then returns to the normal label once loaded.</p>
<p>Tabs 3 and 4 demonstrate slow-loading and broken AJAX tabs, and how to handle serverside errors in those cases. Note: These two require a webserver to interpret PHP. They won't work from the filesystem.</p>
</div><!-- End demo-description -->
diff --git a/demos/tabs/ajax/content1.html b/demos/tabs/ajax/content1.html
index 759bf134e..472bdfb36 100644
--- a/demos/tabs/ajax/content1.html
+++ b/demos/tabs/ajax/content1.html
@@ -1,4 +1,4 @@
-<p><strong>This content was loaded via ajax.</strong>
+<p><strong>This content was loaded via ajax.</strong></p>
<p>Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.</p>
<p>Mauris vitae ante. Curabitur augue. Nulla purus nibh, lobortis ut, feugiat at, aliquam id, purus. Sed venenatis, lorem venenatis volutpat commodo, purus quam lacinia justo, mattis interdum pede pede a odio. Fusce nibh. Morbi nisl mauris, dapibus in, tristique eget, accumsan et, pede. Donec mauris risus, pulvinar ut, faucibus eu, mollis in, nunc. In augue massa, commodo a, cursus vehicula, varius eu, dui. Suspendisse sodales suscipit lorem. Morbi malesuada, eros quis condimentum dignissim, lectus nibh tristique urna, non bibendum diam massa vel risus. Morbi suscipit. Proin egestas, eros at scelerisque scelerisque, dolor lacus fringilla lacus, ut ullamcorper mi magna at quam. Aliquam sed elit. Aliquam turpis purus, congue quis, iaculis id, ullamcorper sit amet, justo. Maecenas sed mauris. Proin magna justo, interdum in, tincidunt eu, viverra eu, turpis. Suspendisse mollis. In magna. Phasellus pellentesque, urna pellentesque convallis pellentesque, augue sem blandit pede, at rhoncus libero nisl a odio.</p>
<p>Sed vitae nibh non magna semper tempor. Duis dolor. Nam congue laoreet arcu. Fusce lobortis enim quis ligula. Maecenas commodo odio id mi. Maecenas scelerisque tellus eu odio. Etiam dolor purus, lacinia a, imperdiet in, aliquam et, eros. In pellentesque. Nullam ac massa. Integer et turpis. Ut quam augue, congue non, imperdiet id, eleifend ac, nisi. Etiam ac arcu. Cras iaculis accumsan erat. Nullam vulputate sapien nec nisi pretium rhoncus. Aliquam a nibh. Vivamus est ante, fermentum a, tincidunt ut, imperdiet nec, velit. Aenean non tortor. Sed nec mauris eget tellus condimentum rutrum.</p> \ No newline at end of file
diff --git a/demos/tabs/ajax/content2.html b/demos/tabs/ajax/content2.html
index 95c25dae0..18b03e40b 100644
--- a/demos/tabs/ajax/content2.html
+++ b/demos/tabs/ajax/content2.html
@@ -1,4 +1,4 @@
-<p><strong>This other content was loaded via ajax.</strong>
+<p><strong>This other content was loaded via ajax.</strong></p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean nec turpis justo, et facilisis ligula. In congue interdum odio, a scelerisque eros posuere ac. Aenean massa tellus, dictum sit amet laoreet ut, aliquam in orci. Duis eu aliquam ligula. Nullam vel placerat ligula. Fusce venenatis viverra dictum. Phasellus dui dolor, imperdiet in sodales at, mattis sed libero. Morbi ac ipsum ligula. Quisque suscipit dui vel diam pretium nec cursus lacus malesuada. Donec sollicitudin, eros eget dignissim mollis, risus leo feugiat tellus, vel posuere nisl ipsum eu erat. Quisque posuere lacinia imperdiet. Quisque nunc leo, elementum quis ultricies et, vehicula sit amet turpis. Nullam sed nunc nec nibh condimentum mattis. Quisque sed ligula sit amet nisi ultricies bibendum eget id nisi.</p>
<p>Proin ut erat vel nunc tincidunt commodo. Curabitur feugiat, nisi et vehicula viverra, nisl orci eleifend arcu, sed blandit lectus nisl quis nisi. In hac habitasse platea dictumst. In hac habitasse platea dictumst. Aenean rutrum gravida velit ac imperdiet. Integer vitae arcu risus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Proin tincidunt orci at leo egestas porta. Vivamus ac augue et enim bibendum hendrerit ut id urna. Donec sollicitudin pulvinar turpis vitae scelerisque. Etiam tempor porttitor est sed blandit. Phasellus varius consequat leo eget tincidunt. Aliquam ac dui lectus. In et consectetur orci. Duis posuere nulla ac turpis faucibus vestibulum. Sed ut velit et dolor rhoncus dapibus. Sed sit amet pellentesque est.</p>
<p>Nam in volutpat orci. Morbi sit amet orci in erat egestas dignissim. Etiam mi sapien, tempus sed iaculis a, adipiscing quis tellus. Suspendisse potenti. Nam malesuada tristique vestibulum. In tempor tellus dignissim neque consectetur eu vestibulum nisl pellentesque. Phasellus ultrices cursus velit, id aliquam nisl fringilla quis. Cras varius elit sed urna ultrices congue. Sed ornare odio sed velit pellentesque id varius nisl sodales. Sed auctor ligula egestas mi pharetra ut consectetur erat pharetra.</p> \ No newline at end of file
diff --git a/demos/tabs/ajax/content3-slow.php b/demos/tabs/ajax/content3-slow.php
index 9e50dc3ac..7ad43ec06 100644
--- a/demos/tabs/ajax/content3-slow.php
+++ b/demos/tabs/ajax/content3-slow.php
@@ -1,7 +1,7 @@
<?php
sleep(1);
?>
-<p><strong>This content was loaded via ajax, though it took a second.</strong>
+<p><strong>This content was loaded via ajax, though it took a second.</strong></p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean nec turpis justo, et facilisis ligula. In congue interdum odio, a scelerisque eros posuere ac. Aenean massa tellus, dictum sit amet laoreet ut, aliquam in orci. Duis eu aliquam ligula. Nullam vel placerat ligula. Fusce venenatis viverra dictum. Phasellus dui dolor, imperdiet in sodales at, mattis sed libero. Morbi ac ipsum ligula. Quisque suscipit dui vel diam pretium nec cursus lacus malesuada. Donec sollicitudin, eros eget dignissim mollis, risus leo feugiat tellus, vel posuere nisl ipsum eu erat. Quisque posuere lacinia imperdiet. Quisque nunc leo, elementum quis ultricies et, vehicula sit amet turpis. Nullam sed nunc nec nibh condimentum mattis. Quisque sed ligula sit amet nisi ultricies bibendum eget id nisi.</p>
<p>Proin ut erat vel nunc tincidunt commodo. Curabitur feugiat, nisi et vehicula viverra, nisl orci eleifend arcu, sed blandit lectus nisl quis nisi. In hac habitasse platea dictumst. In hac habitasse platea dictumst. Aenean rutrum gravida velit ac imperdiet. Integer vitae arcu risus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Proin tincidunt orci at leo egestas porta. Vivamus ac augue et enim bibendum hendrerit ut id urna. Donec sollicitudin pulvinar turpis vitae scelerisque. Etiam tempor porttitor est sed blandit. Phasellus varius consequat leo eget tincidunt. Aliquam ac dui lectus. In et consectetur orci. Duis posuere nulla ac turpis faucibus vestibulum. Sed ut velit et dolor rhoncus dapibus. Sed sit amet pellentesque est.</p>
<p>Nam in volutpat orci. Morbi sit amet orci in erat egestas dignissim. Etiam mi sapien, tempus sed iaculis a, adipiscing quis tellus. Suspendisse potenti. Nam malesuada tristique vestibulum. In tempor tellus dignissim neque consectetur eu vestibulum nisl pellentesque. Phasellus ultrices cursus velit, id aliquam nisl fringilla quis. Cras varius elit sed urna ultrices congue. Sed ornare odio sed velit pellentesque id varius nisl sodales. Sed auctor ligula egestas mi pharetra ut consectetur erat pharetra.</p> \ No newline at end of file
diff --git a/demos/tabs/bottom.html b/demos/tabs/bottom.html
index c4ab31329..6d2148596 100644
--- a/demos/tabs/bottom.html
+++ b/demos/tabs/bottom.html
@@ -1,29 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Tabs - Tabs at bottom</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.tabs.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.tabs.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- $("#tabs").tabs();
- $(".tabs-bottom .ui-tabs-nav, .tabs-bottom .ui-tabs-nav > *")
- .removeClass("ui-corner-all ui-corner-top")
- .addClass("ui-corner-bottom");
+ $( "#tabs" ).tabs();
+ $( ".tabs-bottom .ui-tabs-nav, .tabs-bottom .ui-tabs-nav > *" )
+ .removeClass( "ui-corner-all ui-corner-top" )
+ .addClass( "ui-corner-bottom" );
});
</script>
<style>
- #tabs { height: 200px; }
- .tabs-bottom { position: relative; }
- .tabs-bottom .ui-tabs-panel { height: 140px; overflow: auto; }
- .tabs-bottom .ui-tabs-nav { position: absolute !important; left: 0; bottom: 0; right:0; padding: 0 0.2em 0.2em 0; }
- .tabs-bottom .ui-tabs-nav li { margin-top: -2px !important; margin-bottom: 1px !important; border-top: none; border-bottom-width: 1px; }
- .ui-tabs-selected { margin-top: -3px !important; }
+ #tabs { height: 200px; }
+ .tabs-bottom { position: relative; }
+ .tabs-bottom .ui-tabs-panel { height: 140px; overflow: auto; }
+ .tabs-bottom .ui-tabs-nav { position: absolute !important; left: 0; bottom: 0; right:0; padding: 0 0.2em 0.2em 0; }
+ .tabs-bottom .ui-tabs-nav li { margin-top: -2px !important; margin-bottom: 1px !important; border-top: none; border-bottom-width: 1px; }
+ .ui-tabs-selected { margin-top: -3px !important; }
</style>
</head>
<body>
@@ -50,10 +50,10 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>With some additional CSS (for positioning) and JS (to put the right classes on elements) the tabs can be placed below their content.</p>
+<div class="demo-description">
+<p>With some additional CSS (for positioning) and JS (to put the right classes on elements) the tabs can be placed below their content.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/tabs/collapsible.html b/demos/tabs/collapsible.html
index 7a638e295..9c3c2615a 100644
--- a/demos/tabs/collapsible.html
+++ b/demos/tabs/collapsible.html
@@ -1,17 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Tabs - Collapse content</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.tabs.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.tabs.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- $("#tabs").tabs({
+ $( "#tabs" ).tabs({
collapsible: true
});
});
@@ -43,13 +43,12 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Click the selected tab to toggle its content closed/open. To enable this functionality, set the <code>collapsible</code> option to true.</p>
+<div class="demo-description">
+<p>Click the selected tab to toggle its content closed/open. To enable this functionality, set the <code>collapsible</code> option to true.</p>
<pre><code>collapsible: true
</code></pre>
-
</div><!-- End demo-description -->
</body>
diff --git a/demos/tabs/cookie.html b/demos/tabs/cookie.html
index 638ee37f2..e8f9ead65 100644
--- a/demos/tabs/cookie.html
+++ b/demos/tabs/cookie.html
@@ -1,18 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Tabs - Default functionality</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../external/jquery.cookie.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.tabs.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../external/jquery.cookie.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.tabs.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- $("#tabs").tabs({
+ $( "#tabs" ).tabs({
cookie: {
// store cookie for a day, without, it would be a session cookie
expires: 1
@@ -45,12 +45,11 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Looks the same as the default demo, but uses cookie to store the selected tab, and restore it when the page (re)loads.
+<div class="demo-description">
+<p>Looks the same as the default demo, but uses cookie to store the selected tab, and restore it when the page (re)loads.
The cookie is stored for a day, so tabs will be restored even after closing the browser. Use cookie: {} for using cookies with default options.</p>
-
</div><!-- End demo-description -->
</body>
diff --git a/demos/tabs/default.html b/demos/tabs/default.html
index 7b01cc8b4..0f51e45c0 100644
--- a/demos/tabs/default.html
+++ b/demos/tabs/default.html
@@ -1,17 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Tabs - Default functionality</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.tabs.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.tabs.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- $("#tabs").tabs();
+ $( "#tabs" ).tabs();
});
</script>
</head>
@@ -39,10 +39,10 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Click tabs to swap between content that is broken into logical sections.</p>
+<div class="demo-description">
+<p>Click tabs to swap between content that is broken into logical sections.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/tabs/index.html b/demos/tabs/index.html
index 8fc417a4f..c0d668435 100644
--- a/demos/tabs/index.html
+++ b/demos/tabs/index.html
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Tabs Demos</title>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <link rel="stylesheet" href="../demos.css">
</head>
<body>
diff --git a/demos/tabs/manipulation.html b/demos/tabs/manipulation.html
index ec143d52a..a610138a7 100644
--- a/demos/tabs/manipulation.html
+++ b/demos/tabs/manipulation.html
@@ -1,85 +1,87 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Tabs - Simple manipulation</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.tabs.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.dialog.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
- #dialog label, #dialog input { display:block; }
- #dialog label { margin-top: 0.5em; }
- #dialog input, #dialog textarea { width: 95%; }
- #tabs { margin-top: 1em; }
- #tabs li .ui-icon-close { float: left; margin: 0.4em 0.2em 0 0; cursor: pointer; }
- #add_tab { cursor: pointer; }
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.position.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.button.js"></script>
+ <script src="../../ui/jquery.ui.tabs.js"></script>
+ <script src="../../ui/jquery.ui.dialog.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
+ #dialog label, #dialog input { display:block; }
+ #dialog label { margin-top: 0.5em; }
+ #dialog input, #dialog textarea { width: 95%; }
+ #tabs { margin-top: 1em; }
+ #tabs li .ui-icon-close { float: left; margin: 0.4em 0.2em 0 0; cursor: pointer; }
+ #add_tab { cursor: pointer; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- var $tab_title_input = $('#tab_title'), $tab_content_input = $('#tab_content');
+ var $tab_title_input = $( "#tab_title"),
+ $tab_content_input = $( "#tab_content" );
var tab_counter = 2;
// tabs init with a custom tab template and an "add" callback filling in the content
- var $tabs = $('#tabs').tabs({
- tabTemplate: '<li><a href="#{href}">#{label}</a> <span class="ui-icon ui-icon-close">Remove Tab</span></li>',
- add: function(event, ui) {
- var tab_content = $tab_content_input.val() || 'Tab '+tab_counter+' content.';
- $(ui.panel).append('<p>'+tab_content+'</p>');
+ var $tabs = $( "#tabs").tabs({
+ tabTemplate: "<li><a href='#{href}'>#{label}</a> <span class='ui-icon ui-icon-close'>Remove Tab</span></li>",
+ add: function( event, ui ) {
+ var tab_content = $tab_content_input.val() || "Tab " + tab_counter + " content.";
+ $( ui.panel ).append( "<p>" + tab_content + "</p>" );
}
});
// modal dialog init: custom buttons and a "close" callback reseting the form inside
- var $dialog = $('#dialog').dialog({
+ var $dialog = $( "#dialog" ).dialog({
autoOpen: false,
modal: true,
buttons: {
- 'Add': function() {
+ Add: function() {
addTab();
- $(this).dialog('close');
+ $( this ).dialog( "close" );
},
- 'Cancel': function() {
- $(this).dialog('close');
+ Cancel: function() {
+ $( this ).dialog( "close" );
}
},
open: function() {
$tab_title_input.focus();
},
close: function() {
- $form[0].reset();
+ $form[ 0 ].reset();
}
});
// addTab form: calls addTab function on submit and closes the dialog
- var $form = $('form',$dialog).submit(function() {
+ var $form = $( "form", $dialog ).submit(function() {
addTab();
- $dialog.dialog('close');
+ $dialog.dialog( "close" );
return false;
});
// actual addTab function: adds new tab using the title input from the form above
function addTab() {
- var tab_title = $tab_title_input.val() || 'Tab '+tab_counter;
- $tabs.tabs('add', '#tabs-'+tab_counter, tab_title);
+ var tab_title = $tab_title_input.val() || "Tab " + tab_counter;
+ $tabs.tabs( "add", "#tabs-" + tab_counter, tab_title );
tab_counter++;
}
// addTab button: just opens the dialog
- $('#add_tab')
+ $( "#add_tab" )
.button()
.click(function() {
- $dialog.dialog('open');
+ $dialog.dialog( "open" );
});
// close icon: removing the tab on click
// note: closable tabs gonna be an option in the future - see http://dev.jqueryui.com/ticket/3924
- $('#tabs span.ui-icon-close').live('click', function() {
- var index = $('li',$tabs).index($(this).parent());
- $tabs.tabs('remove', index);
+ $( "#tabs span.ui-icon-close" ).live( "click", function() {
+ var index = $( "li", $tabs ).index( $( this ).parent() );
+ $tabs.tabs( "remove", index );
});
});
</script>
@@ -112,8 +114,10 @@
</div><!-- End demo -->
+
+
<div class="demo-description">
- <p>Simple tabs adding and removing.</p>
+<p>Simple tabs adding and removing.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/tabs/mouseover.html b/demos/tabs/mouseover.html
index 30233d61e..f94295b3d 100644
--- a/demos/tabs/mouseover.html
+++ b/demos/tabs/mouseover.html
@@ -1,18 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Tabs - Open on mouseover</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.tabs.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.tabs.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- $("#tabs").tabs({
- event: 'mouseover'
+ $( "#tabs" ).tabs({
+ event: "mouseover"
});
});
</script>
@@ -41,13 +41,12 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Toggle sections open/closed on mouseover with the <code>event</code> option. The default value for event is "click."</p>
+<div class="demo-description">
+<p>Toggle sections open/closed on mouseover with the <code>event</code> option. The default value for event is "click."</p>
<pre><code>event: 'mouseover'
</code></pre>
-
</div><!-- End demo-description -->
</body>
diff --git a/demos/tabs/sortable.html b/demos/tabs/sortable.html
index e57f41309..728fcab29 100644
--- a/demos/tabs/sortable.html
+++ b/demos/tabs/sortable.html
@@ -1,19 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Tabs - Sortable</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.sortable.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.tabs.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.sortable.js"></script>
+ <script src="../../ui/jquery.ui.tabs.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- $("#tabs").tabs().find(".ui-tabs-nav").sortable({axis:'x'});
+ $( "#tabs" ).tabs().find( ".ui-tabs-nav" ).sortable({ axis: "x" });
});
</script>
</head>
@@ -41,24 +41,17 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>
-Drag the tabs above to re-order them.
-<p>
+<div class="demo-description">
+<p>Drag the tabs above to re-order them.</p>
<p>
Making tabs sortable is as simple as calling
-
<code>.sortable()</code>
-
on the
-
<code>.ui-tabs-nav</code>
-
element.
</p>
-
</div><!-- End demo-description -->
</body>
diff --git a/demos/tabs/vertical.html b/demos/tabs/vertical.html
index e13cd8290..eec467b1c 100644
--- a/demos/tabs/vertical.html
+++ b/demos/tabs/vertical.html
@@ -1,30 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Tabs - Vertical Tabs functionality</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.tabs.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.tabs.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
$(function() {
- $("#tabs").tabs().addClass('ui-tabs-vertical ui-helper-clearfix');
- $("#tabs li").removeClass('ui-corner-top').addClass('ui-corner-left');
+ $( "#tabs" ).tabs().addClass( "ui-tabs-vertical ui-helper-clearfix" );
+ $( "#tabs li" ).removeClass( "ui-corner-top" ).addClass( "ui-corner-left" );
});
</script>
- <style type="text/css">
-
-/* Vertical Tabs
-----------------------------------*/
-.ui-tabs-vertical { width: 55em; }
-.ui-tabs-vertical .ui-tabs-nav { padding: .2em .1em .2em .2em; float: left; width: 12em; }
-.ui-tabs-vertical .ui-tabs-nav li { clear: left; width: 100%; border-bottom-width: 1px !important; border-right-width: 0 !important; margin: 0 -1px .2em 0; }
-.ui-tabs-vertical .ui-tabs-nav li a { display:block; }
-.ui-tabs-vertical .ui-tabs-nav li.ui-tabs-selected { padding-bottom: 0; padding-right: .1em; border-right-width: 1px; border-right-width: 1px; }
-.ui-tabs-vertical .ui-tabs-panel { padding: 1em; float: right; width: 40em;}
+ <style>
+ .ui-tabs-vertical { width: 55em; }
+ .ui-tabs-vertical .ui-tabs-nav { padding: .2em .1em .2em .2em; float: left; width: 12em; }
+ .ui-tabs-vertical .ui-tabs-nav li { clear: left; width: 100%; border-bottom-width: 1px !important; border-right-width: 0 !important; margin: 0 -1px .2em 0; }
+ .ui-tabs-vertical .ui-tabs-nav li a { display:block; }
+ .ui-tabs-vertical .ui-tabs-nav li.ui-tabs-selected { padding-bottom: 0; padding-right: .1em; border-right-width: 1px; border-right-width: 1px; }
+ .ui-tabs-vertical .ui-tabs-panel { padding: 1em; float: right; width: 40em;}
</style>
</head>
<body>
@@ -54,10 +51,10 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Click tabs to swap between content that is broken into logical sections.</p>
+<div class="demo-description">
+<p>Click tabs to swap between content that is broken into logical sections.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/toggle/default.html b/demos/toggle/default.html
index 3659a64e8..6e38efe44 100644
--- a/demos/toggle/default.html
+++ b/demos/toggle/default.html
@@ -1,54 +1,54 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Effects - Toggle Demo</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.blind.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.bounce.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.clip.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.drop.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.explode.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.fold.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.highlight.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.pulsate.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.scale.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.shake.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.slide.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.transfer.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
- .toggler { width: 500px; height: 200px; }
- #button { padding: .5em 1em; text-decoration: none; }
- #effect { width: 240px; height: 135px; padding: 0.4em; position: relative; }
- #effect h3 { margin: 0; padding: 0.4em; text-align: center; }
- .ui-effects-transfer { border: 2px dotted gray; }
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.effects.core.js"></script>
+ <script src="../../ui/jquery.effects.blind.js"></script>
+ <script src="../../ui/jquery.effects.bounce.js"></script>
+ <script src="../../ui/jquery.effects.clip.js"></script>
+ <script src="../../ui/jquery.effects.drop.js"></script>
+ <script src="../../ui/jquery.effects.explode.js"></script>
+ <script src="../../ui/jquery.effects.fold.js"></script>
+ <script src="../../ui/jquery.effects.highlight.js"></script>
+ <script src="../../ui/jquery.effects.pulsate.js"></script>
+ <script src="../../ui/jquery.effects.scale.js"></script>
+ <script src="../../ui/jquery.effects.shake.js"></script>
+ <script src="../../ui/jquery.effects.slide.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
+ .toggler { width: 500px; height: 200px; }
+ #button { padding: .5em 1em; text-decoration: none; }
+ #effect { width: 240px; height: 135px; padding: 0.4em; position: relative; }
+ #effect h3 { margin: 0; padding: 0.4em; text-align: center; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- //run the currently selected effect
- function runEffect(){
- //get effect type from
- var selectedEffect = $('#effectTypes').val();
+ // run the currently selected effect
+ function runEffect() {
+ // get effect type from
+ var selectedEffect = $( "#effectTypes" ).val();
- //most effect types need no options passed by default
+ // most effect types need no options passed by default
var options = {};
- //check if it's scale, transfer, or size - they need options explicitly set
- if(selectedEffect == 'scale'){ options = {percent: 0}; }
- else if(selectedEffect == 'size'){ options = { to: {width: 200,height: 60} }; }
+ // some effects have required parameters
+ if ( selectedEffect === "scale" ) {
+ options = { percent: 0 };
+ } else if ( selectedEffect === "size" ) {
+ options = { to: { width: 200, height: 60 } };
+ }
- //run the effect
- $("#effect").toggle(selectedEffect,options,500);
+ // run the effect
+ $( "#effect" ).toggle( selectedEffect, options, 500 );
};
- //set effect from select menu value
- $("#button").click(function() {
+ // set effect from select menu value
+ $( "#button" ).click(function() {
runEffect();
return false;
});
-
});
</script>
</head>
@@ -79,16 +79,15 @@
<option value="shake">Shake</option>
<option value="size">Size</option>
<option value="slide">Slide</option>
- <option value="transfer">Transfer</option>
</select>
<a href="#" id="button" class="ui-state-default ui-corner-all">Run Effect</a>
</div><!-- End demo -->
-<div class="demo-description">
-<p>Click the button above to preview the effect.</p>
+<div class="demo-description">
+<p>Click the button above to preview the effect.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/toggle/index.html b/demos/toggle/index.html
index 0e9af371f..f5bd6a0e4 100644
--- a/demos/toggle/index.html
+++ b/demos/toggle/index.html
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Effects Demos</title>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <link rel="stylesheet" href="../demos.css">
</head>
<body>
diff --git a/demos/toggleClass/default.html b/demos/toggleClass/default.html
index b679c96b7..50f2a82cc 100644
--- a/demos/toggleClass/default.html
+++ b/demos/toggleClass/default.html
@@ -1,22 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Effects - toggleClass Demo</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.effects.core.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
- .toggler { width: 500px; height: 200px; position: relative;}
- #button { padding: .5em 1em; text-decoration: none; }
- #effect {position: relative; width: 240px; padding: 1em; letter-spacing: 0; font-size: 1.2em; border: 1px solid #000; background: #eee; color: #333; }
- #effect.newClass { text-indent: 40px; letter-spacing: .4em; width: 410px; height: 100px; padding: 30px; margin: 10px; font-size: 1.6em; }
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.effects.core.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
+ .toggler { width: 500px; height: 200px; position: relative; }
+ #button { padding: .5em 1em; text-decoration: none; }
+ #effect {position: relative; width: 240px; padding: 1em; letter-spacing: 0; font-size: 1.2em; border: 1px solid #000; background: #eee; color: #333; }
+ .newClass { text-indent: 40px; letter-spacing: .4em; width: 410px; height: 100px; padding: 30px; margin: 10px; font-size: 1.6em; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- $("#button").click(function() {
- $('#effect').toggleClass('newClass', 1000);
+ $( "#button" ).click(function() {
+ $( "#effect" ).toggleClass( "newClass", 1000 );
return false;
});
});
@@ -36,10 +36,10 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>Click the button above to preview the effect.</p>
+<div class="demo-description">
+<p>Click the button above to preview the effect.</p>
</div><!-- End demo-description -->
</body>
diff --git a/demos/toggleClass/index.html b/demos/toggleClass/index.html
index 0e9af371f..f5bd6a0e4 100644
--- a/demos/toggleClass/index.html
+++ b/demos/toggleClass/index.html
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Effects Demos</title>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <link rel="stylesheet" href="../demos.css">
</head>
<body>
diff --git a/external/glob.de-DE.js b/external/glob.de-DE.js
new file mode 100644
index 000000000..d68b84cc8
--- /dev/null
+++ b/external/glob.de-DE.js
@@ -0,0 +1,55 @@
+(function($) {
+ var cultures = $.cultures,
+ en = cultures.en,
+ standard = en.calendars.standard,
+ culture = cultures["de-DE"] = $.extend(true, {}, en, {
+ name: "de-DE",
+ englishName: "German (Germany)",
+ nativeName: "Deutsch (Deutschland)",
+ language: "de",
+ numberFormat: {
+ ',': ".",
+ '.': ",",
+ percent: {
+ pattern: ["-n%","n%"],
+ ',': ".",
+ '.': ","
+ },
+ currency: {
+ pattern: ["-n $","n $"],
+ ',': ".",
+ '.': ",",
+ symbol: "€"
+ }
+ },
+ calendars: {
+ standard: $.extend(true, {}, standard, {
+ '/': ".",
+ firstDay: 1,
+ days: {
+ names: ["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],
+ namesAbbr: ["So","Mo","Di","Mi","Do","Fr","Sa"],
+ namesShort: ["So","Mo","Di","Mi","Do","Fr","Sa"]
+ },
+ months: {
+ names: ["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],
+ namesAbbr: ["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""]
+ },
+ AM: null,
+ PM: null,
+ eras: [{"name":"n. Chr.","start":null,"offset":0}],
+ patterns: {
+ d: "dd.MM.yyyy",
+ D: "dddd, d. MMMM yyyy",
+ t: "HH:mm",
+ T: "HH:mm:ss",
+ f: "dddd, d. MMMM yyyy HH:mm",
+ F: "dddd, d. MMMM yyyy HH:mm:ss",
+ M: "dd MMMM",
+ Y: "MMMM yyyy"
+ }
+ })
+ }
+ }, cultures["de-DE"]);
+ culture.calendar = culture.calendars.standard;
+})(Globalization); \ No newline at end of file
diff --git a/external/glob.ja-JP.js b/external/glob.ja-JP.js
new file mode 100644
index 000000000..454d478cb
--- /dev/null
+++ b/external/glob.ja-JP.js
@@ -0,0 +1,74 @@
+(function($) {
+ var cultures = $.cultures,
+ en = cultures.en,
+ standard = en.calendars.standard,
+ culture = cultures["ja-JP"] = $.extend(true, {}, en, {
+ name: "ja-JP",
+ englishName: "Japanese (Japan)",
+ nativeName: "日本語 (日本)",
+ language: "ja",
+ numberFormat: {
+ percent: {
+ pattern: ["-n%","n%"]
+ },
+ currency: {
+ pattern: ["-$n","$n"],
+ decimals: 0,
+ symbol: "¥"
+ }
+ },
+ calendars: {
+ standard: $.extend(true, {}, standard, {
+ days: {
+ names: ["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],
+ namesAbbr: ["日","月","火","水","木","金","土"],
+ namesShort: ["日","月","火","水","木","金","土"]
+ },
+ months: {
+ names: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""],
+ namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+ },
+ AM: ["午前","午前","午前"],
+ PM: ["午後","午後","午後"],
+ eras: [{"name":"西暦","start":null,"offset":0}],
+ patterns: {
+ d: "yyyy/MM/dd",
+ D: "yyyy'年'M'月'd'日'",
+ t: "H:mm",
+ T: "H:mm:ss",
+ f: "yyyy'年'M'月'd'日' H:mm",
+ F: "yyyy'年'M'月'd'日' H:mm:ss",
+ M: "M'月'd'日'",
+ Y: "yyyy'年'M'月'"
+ }
+ }),
+ Japanese: $.extend(true, {}, standard, {
+ name: "Japanese",
+ days: {
+ names: ["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],
+ namesAbbr: ["日","月","火","水","木","金","土"],
+ namesShort: ["日","月","火","水","木","金","土"]
+ },
+ months: {
+ names: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""],
+ namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+ },
+ AM: ["午前","午前","午前"],
+ PM: ["午後","午後","午後"],
+ eras: [{"name":"平成","start":null,"offset":1867},{"name":"昭和","start":-1812153600000,"offset":1911},{"name":"大正","start":-1357603200000,"offset":1925},{"name":"明治","start":60022080000,"offset":1988}],
+ twoDigitYearMax: 99,
+ patterns: {
+ d: "gg y/M/d",
+ D: "gg y'年'M'月'd'日'",
+ t: "H:mm",
+ T: "H:mm:ss",
+ f: "gg y'年'M'月'd'日' H:mm",
+ F: "gg y'年'M'月'd'日' H:mm:ss",
+ M: "M'月'd'日'",
+ Y: "gg y'年'M'月'"
+ }
+ })
+ }
+ }, cultures["ja-JP"]);
+ culture.calendar = culture.calendars.standard;
+})(Globalization); \ No newline at end of file
diff --git a/external/glob.js b/external/glob.js
new file mode 100644
index 000000000..8075ee2bd
--- /dev/null
+++ b/external/glob.js
@@ -0,0 +1,1333 @@
+/*
+ * Globalization
+ * http://github.com/nje/jquery-glob
+ */
+(function() {
+
+var Globalization = {},
+ localized = { en: {} };
+localized["default"] = localized.en;
+
+Globalization.extend = function( deep ) {
+ var target = arguments[ 1 ] || {};
+ for ( var i = 2, l = arguments.length; i < l; i++ ) {
+ var source = arguments[ i ];
+ if ( source ) {
+ for ( var field in source ) {
+ var sourceVal = source[ field ];
+ if ( typeof sourceVal !== "undefined" ) {
+ if ( deep && (isObject( sourceVal ) || isArray( sourceVal )) ) {
+ var targetVal = target[ field ];
+ // extend onto the existing value, or create a new one
+ targetVal = targetVal && (isObject( targetVal ) || isArray( targetVal ))
+ ? targetVal
+ : (isArray( sourceVal ) ? [] : {});
+ target[ field ] = this.extend( true, targetVal, sourceVal );
+ }
+ else {
+ target[ field ] = sourceVal;
+ }
+ }
+ }
+ }
+ }
+ return target;
+}
+
+Globalization.findClosestCulture = function(name) {
+ var match;
+ if ( !name ) {
+ return this.culture || this.cultures["default"];
+ }
+ if ( isString( name ) ) {
+ name = name.split( ',' );
+ }
+ if ( isArray( name ) ) {
+ var lang,
+ cultures = this.cultures,
+ list = name,
+ i, l = list.length,
+ prioritized = [];
+ for ( i = 0; i < l; i++ ) {
+ name = trim( list[ i ] );
+ var pri, parts = name.split( ';' );
+ lang = trim( parts[ 0 ] );
+ if ( parts.length === 1 ) {
+ pri = 1;
+ }
+ else {
+ name = trim( parts[ 1 ] );
+ if ( name.indexOf("q=") === 0 ) {
+ name = name.substr( 2 );
+ pri = parseFloat( name, 10 );
+ pri = isNaN( pri ) ? 0 : pri;
+ }
+ else {
+ pri = 1;
+ }
+ }
+ prioritized.push( { lang: lang, pri: pri } );
+ }
+ prioritized.sort(function(a, b) {
+ return a.pri < b.pri ? 1 : -1;
+ });
+ for ( i = 0; i < l; i++ ) {
+ lang = prioritized[ i ].lang;
+ match = cultures[ lang ];
+ // exact match?
+ if ( match ) {
+ return match;
+ }
+ }
+ for ( i = 0; i < l; i++ ) {
+ lang = prioritized[ i ].lang;
+ // for each entry try its neutral language
+ do {
+ var index = lang.lastIndexOf( "-" );
+ if ( index === -1 ) {
+ break;
+ }
+ // strip off the last part. e.g. en-US => en
+ lang = lang.substr( 0, index );
+ match = cultures[ lang ];
+ if ( match ) {
+ return match;
+ }
+ }
+ while ( 1 );
+ }
+ }
+ else if ( typeof name === 'object' ) {
+ return name;
+ }
+ return match || null;
+}
+Globalization.preferCulture = function(name) {
+ this.culture = this.findClosestCulture( name ) || this.cultures["default"];
+}
+Globalization.localize = function(key, culture, value) {
+ if (typeof culture === 'string') {
+ culture = culture || "default";
+ culture = this.cultures[ culture ] || { name: culture };
+ }
+ var local = localized[ culture.name ];
+ if ( arguments.length === 3 ) {
+ if ( !local) {
+ local = localized[ culture.name ] = {};
+ }
+ local[ key ] = value;
+ }
+ else {
+ if ( local ) {
+ value = local[ key ];
+ }
+ if ( typeof value === 'undefined' ) {
+ var language = localized[ culture.language ];
+ if ( language ) {
+ value = language[ key ];
+ }
+ if ( typeof value === 'undefined' ) {
+ value = localized["default"][ key ];
+ }
+ }
+ }
+ return typeof value === "undefined" ? null : value;
+}
+Globalization.format = function(value, format, culture) {
+ culture = this.findClosestCulture( culture );
+ if ( typeof value === "number" ) {
+ value = formatNumber( value, format, culture );
+ }
+ else if ( value instanceof Date ) {
+ value = formatDate( value, format, culture );
+ }
+ return value;
+}
+Globalization.parseInt = function(value, radix, culture) {
+ return Math.floor( this.parseFloat( value, radix, culture ) );
+}
+Globalization.parseFloat = function(value, radix, culture) {
+ culture = this.findClosestCulture( culture );
+ var ret = NaN,
+ nf = culture.numberFormat;
+
+ // trim leading and trailing whitespace
+ value = trim( value );
+
+ // allow infinity or hexidecimal
+ if (regexInfinity.test(value)) {
+ ret = parseFloat(value, radix);
+ }
+ else if (!radix && regexHex.test(value)) {
+ ret = parseInt(value, 16);
+ }
+ else {
+ var signInfo = parseNegativePattern( value, nf, nf.pattern[0] ),
+ sign = signInfo[0],
+ num = signInfo[1];
+ // determine sign and number
+ if ( sign === "" && nf.pattern[0] !== "-n" ) {
+ signInfo = parseNegativePattern( value, nf, "-n" );
+ sign = signInfo[0];
+ num = signInfo[1];
+ }
+ sign = sign || "+";
+ // determine exponent and number
+ var exponent,
+ intAndFraction,
+ exponentPos = num.indexOf( 'e' );
+ if ( exponentPos < 0 ) exponentPos = num.indexOf( 'E' );
+ if ( exponentPos < 0 ) {
+ intAndFraction = num;
+ exponent = null;
+ }
+ else {
+ intAndFraction = num.substr( 0, exponentPos );
+ exponent = num.substr( exponentPos + 1 );
+ }
+ // determine decimal position
+ var integer,
+ fraction,
+ decSep = nf['.'],
+ decimalPos = intAndFraction.indexOf( decSep );
+ if ( decimalPos < 0 ) {
+ integer = intAndFraction;
+ fraction = null;
+ }
+ else {
+ integer = intAndFraction.substr( 0, decimalPos );
+ fraction = intAndFraction.substr( decimalPos + decSep.length );
+ }
+ // handle groups (e.g. 1,000,000)
+ var groupSep = nf[","];
+ integer = integer.split(groupSep).join('');
+ var altGroupSep = groupSep.replace(/\u00A0/g, " ");
+ if ( groupSep !== altGroupSep ) {
+ integer = integer.split(altGroupSep).join('');
+ }
+ // build a natively parsable number string
+ var p = sign + integer;
+ if ( fraction !== null ) {
+ p += '.' + fraction;
+ }
+ if ( exponent !== null ) {
+ // exponent itself may have a number patternd
+ var expSignInfo = parseNegativePattern( exponent, nf, "-n" );
+ p += 'e' + (expSignInfo[0] || "+") + expSignInfo[1];
+ }
+ if ( regexParseFloat.test( p ) ) {
+ ret = parseFloat( p );
+ }
+ }
+ return ret;
+}
+Globalization.parseDate = function(value, formats, culture) {
+ culture = this.findClosestCulture( culture );
+
+ var date, prop, patterns;
+ if ( formats ) {
+ if ( typeof formats === "string" ) {
+ formats = [ formats ];
+ }
+ if ( formats.length ) {
+ for ( var i = 0, l = formats.length; i < l; i++ ) {
+ var format = formats[ i ];
+ if ( format ) {
+ date = parseExact( value, format, culture );
+ if ( date ) {
+ break;
+ }
+ }
+ }
+ }
+ }
+ else {
+ patterns = culture.calendar.patterns;
+ for ( prop in patterns ) {
+ date = parseExact( value, patterns[prop], culture );
+ if ( date ) {
+ break;
+ }
+ }
+ }
+ return date || null;
+}
+
+// 1. When defining a culture, all fields are required except the ones stated as optional.
+// 2. You can use Globalization.extend to copy an existing culture and provide only the differing values,
+// a good practice since most cultures do not differ too much from the 'default' culture.
+// DO use the 'default' culture if you do this, as it is the only one that definitely
+// exists.
+// 3. Other plugins may add to the culture information provided by extending it. However,
+// that plugin may extend it prior to the culture being defined, or after. Therefore,
+// do not overwrite values that already exist when defining the baseline for a culture,
+// by extending your culture object with the existing one.
+// 4. Each culture should have a ".calendars" object with at least one calendar named "standard"
+// which serves as the default calendar in use by that culture.
+// 5. Each culture should have a ".calendar" object which is the current calendar being used,
+// it may be dynamically changed at any time to one of the calendars in ".calendars".
+
+// To define a culture, use the following pattern, which handles defining the culture based
+// on the 'default culture, extending it with the existing culture if it exists, and defining
+// it if it does not exist.
+// Globalization.cultures.foo = Globalization.extend(true, Globalization.extend(true, {}, Globalization.cultures['default'], fooCulture), Globalization.cultures.foo)
+
+var cultures = Globalization.cultures = Globalization.cultures || {};
+var en = cultures["default"] = cultures.en = Globalization.extend(true, {
+ // A unique name for the culture in the form <language code>-<country/region code>
+ name: "en",
+ // the name of the culture in the english language
+ englishName: "English",
+ // the name of the culture in its own language
+ nativeName: "English",
+ // whether the culture uses right-to-left text
+ isRTL: false,
+ // 'language' is used for so-called "specific" cultures.
+ // For example, the culture "es-CL" means "Spanish, in Chili".
+ // It represents the Spanish-speaking culture as it is in Chili,
+ // which might have different formatting rules or even translations
+ // than Spanish in Spain. A "neutral" culture is one that is not
+ // specific to a region. For example, the culture "es" is the generic
+ // Spanish culture, which may be a more generalized version of the language
+ // that may or may not be what a specific culture expects.
+ // For a specific culture like "es-CL", the 'language' field refers to the
+ // neutral, generic culture information for the language it is using.
+ // This is not always a simple matter of the string before the dash.
+ // For example, the "zh-Hans" culture is netural (Simplified Chinese).
+ // And the 'zh-SG' culture is Simplified Chinese in Singapore, whose lanugage
+ // field is "zh-CHS", not "zh".
+ // This field should be used to navigate from a specific culture to it's
+ // more general, neutral culture. If a culture is already as general as it
+ // can get, the language may refer to itself.
+ language: "en",
+ // numberFormat defines general number formatting rules, like the digits in
+ // each grouping, the group separator, and how negative numbers are displayed.
+ numberFormat: {
+ // [negativePattern]
+ // Note, numberFormat.pattern has no 'positivePattern' unlike percent and currency,
+ // but is still defined as an array for consistency with them.
+ // negativePattern: one of "(n)|-n|- n|n-|n -"
+ pattern: ["-n"],
+ // number of decimal places normally shown
+ decimals: 2,
+ // string that separates number groups, as in 1,000,000
+ ',': ",",
+ // string that separates a number from the fractional portion, as in 1.99
+ '.': ".",
+ // array of numbers indicating the size of each number group.
+ // TODO: more detailed description and example
+ groupSizes: [3],
+ // symbol used for positive numbers
+ '+': "+",
+ // symbol used for negative numbers
+ '-': "-",
+ percent: {
+ // [negativePattern, positivePattern]
+ // negativePattern: one of "-n %|-n%|-%n|%-n|%n-|n-%|n%-|-% n|n %-|% n-|% -n|n- %"
+ // positivePattern: one of "n %|n%|%n|% n"
+ pattern: ["-n %","n %"],
+ // number of decimal places normally shown
+ decimals: 2,
+ // array of numbers indicating the size of each number group.
+ // TODO: more detailed description and example
+ groupSizes: [3],
+ // string that separates number groups, as in 1,000,000
+ ',': ",",
+ // string that separates a number from the fractional portion, as in 1.99
+ '.': ".",
+ // symbol used to represent a percentage
+ symbol: "%"
+ },
+ currency: {
+ // [negativePattern, positivePattern]
+ // negativePattern: one of "($n)|-$n|$-n|$n-|(n$)|-n$|n-$|n$-|-n $|-$ n|n $-|$ n-|$ -n|n- $|($ n)|(n $)"
+ // positivePattern: one of "$n|n$|$ n|n $"
+ pattern: ["($n)","$n"],
+ // number of decimal places normally shown
+ decimals: 2,
+ // array of numbers indicating the size of each number group.
+ // TODO: more detailed description and example
+ groupSizes: [3],
+ // string that separates number groups, as in 1,000,000
+ ',': ",",
+ // string that separates a number from the fractional portion, as in 1.99
+ '.': ".",
+ // symbol used to represent currency
+ symbol: "$"
+ }
+ },
+ // calendars defines all the possible calendars used by this culture.
+ // There should be at least one defined with name 'standard', and is the default
+ // calendar used by the culture.
+ // A calendar contains information about how dates are formatted, information about
+ // the calendar's eras, a standard set of the date formats,
+ // translations for day and month names, and if the calendar is not based on the Gregorian
+ // calendar, conversion functions to and from the Gregorian calendar.
+ calendars: {
+ standard: {
+ // name that identifies the type of calendar this is
+ name: "Gregorian_USEnglish",
+ // separator of parts of a date (e.g. '/' in 11/05/1955)
+ '/': "/",
+ // separator of parts of a time (e.g. ':' in 05:44 PM)
+ ':': ":",
+ // the first day of the week (0 = Sunday, 1 = Monday, etc)
+ firstDay: 0,
+ days: {
+ // full day names
+ names: ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],
+ // abbreviated day names
+ namesAbbr: ["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],
+ // shortest day names
+ namesShort: ["Su","Mo","Tu","We","Th","Fr","Sa"]
+ },
+ months: {
+ // full month names (13 months for lunar calendards -- 13th month should be "" if not lunar)
+ names: ["January","February","March","April","May","June","July","August","September","October","November","December",""],
+ // abbreviated month names
+ namesAbbr: ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]
+ },
+ // AM and PM designators in one of these forms:
+ // The usual view, and the upper and lower case versions
+ // [standard,lowercase,uppercase]
+ // The culture does not use AM or PM (likely all standard date formats use 24 hour time)
+ // null
+ AM: ["AM", "am", "AM"],
+ PM: ["PM", "pm", "PM"],
+ eras: [
+ // eras in reverse chronological order.
+ // name: the name of the era in this culture (e.g. A.D., C.E.)
+ // start: when the era starts in ticks (gregorian, gmt), null if it is the earliest supported era.
+ // offset: offset in years from gregorian calendar
+ { "name": "A.D.", "start": null, "offset": 0 }
+ ],
+ // when a two digit year is given, it will never be parsed as a four digit
+ // year greater than this year (in the appropriate era for the culture)
+ // Set it as a full year (e.g. 2029) or use an offset format starting from
+ // the current year: "+19" would correspond to 2029 if the current year 2010.
+ twoDigitYearMax: 2029,
+ // set of predefined date and time patterns used by the culture
+ // these represent the format someone in this culture would expect
+ // to see given the portions of the date that are shown.
+ patterns: {
+ // short date pattern
+ d: "M/d/yyyy",
+ // long date pattern
+ D: "dddd, MMMM dd, yyyy",
+ // short time pattern
+ t: "h:mm tt",
+ // long time pattern
+ T: "h:mm:ss tt",
+ // long date, short time pattern
+ f: "dddd, MMMM dd, yyyy h:mm tt",
+ // long date, long time pattern
+ F: "dddd, MMMM dd, yyyy h:mm:ss tt",
+ // month/day pattern
+ M: "MMMM dd",
+ // month/year pattern
+ Y: "yyyy MMMM",
+ // S is a sortable format that does not vary by culture
+ S: "yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss"
+ }
+ // optional fields for each calendar:
+ /*
+ monthsGenitive:
+ Same as months but used when the day preceeds the month.
+ Omit if the culture has no genitive distinction in month names.
+ For an explaination of genitive months, see http://blogs.msdn.com/michkap/archive/2004/12/25/332259.aspx
+ convert:
+ Allows for the support of non-gregorian based calendars. This convert object is used to
+ to convert a date to and from a gregorian calendar date to handle parsing and formatting.
+ The two functions:
+ fromGregorian(date)
+ Given the date as a parameter, return an array with parts [year, month, day]
+ corresponding to the non-gregorian based year, month, and day for the calendar.
+ toGregorian(year, month, day)
+ Given the non-gregorian year, month, and day, return a new Date() object
+ set to the corresponding date in the gregorian calendar.
+ */
+ }
+ }
+}, cultures.en);
+en.calendar = en.calendar || en.calendars.standard;
+
+var regexTrim = /^\s+|\s+$/g,
+ regexInfinity = /^[+-]?infinity$/i,
+ regexHex = /^0x[a-f0-9]+$/i,
+ regexParseFloat = /^[+-]?\d*\.?\d*(e[+-]?\d+)?$/,
+ toString = Object.prototype.toString;
+
+function startsWith(value, pattern) {
+ return value.indexOf( pattern ) === 0;
+}
+
+function endsWith(value, pattern) {
+ return value.substr( value.length - pattern.length ) === pattern;
+}
+
+function trim(value) {
+ return (value+"").replace( regexTrim, "" );
+}
+
+function zeroPad(str, count, left) {
+ for (var l=str.length; l < count; l++) {
+ str = (left ? ('0' + str) : (str + '0'));
+ }
+ return str;
+}
+
+function isArray(obj) {
+ return toString.call(obj) === "[object Array]";
+}
+
+function isString(obj) {
+ return toString.call(obj) === "[object String]";
+}
+
+function isObject(obj) {
+ return toString.call(obj) === "[object Object]";
+}
+
+function arrayIndexOf( array, item ) {
+ if ( array.indexOf ) {
+ return array.indexOf( item );
+ }
+ for ( var i = 0, length = array.length; i < length; i++ ) {
+ if ( array[ i ] === item ) {
+ return i;
+ }
+ }
+ return -1;
+}
+
+// *************************************** Numbers ***************************************
+
+function expandNumber(number, precision, formatInfo) {
+ var groupSizes = formatInfo.groupSizes,
+ curSize = groupSizes[ 0 ],
+ curGroupIndex = 1,
+ factor = Math.pow( 10, precision ),
+ rounded = Math.round( number * factor ) / factor;
+ if ( !isFinite(rounded) ) {
+ rounded = number;
+ }
+ number = rounded;
+
+ var numberString = number+"",
+ right = "",
+ split = numberString.split(/e/i),
+ exponent = split.length > 1 ? parseInt( split[ 1 ], 10 ) : 0;
+ numberString = split[ 0 ];
+ split = numberString.split( "." );
+ numberString = split[ 0 ];
+ right = split.length > 1 ? split[ 1 ] : "";
+
+ var l;
+ if ( exponent > 0 ) {
+ right = zeroPad( right, exponent, false );
+ numberString += right.slice( 0, exponent );
+ right = right.substr( exponent );
+ }
+ else if ( exponent < 0 ) {
+ exponent = -exponent;
+ numberString = zeroPad( numberString, exponent + 1 );
+ right = numberString.slice( -exponent, numberString.length ) + right;
+ numberString = numberString.slice( 0, -exponent );
+ }
+
+ if ( precision > 0 ) {
+ right = formatInfo['.'] +
+ ((right.length > precision) ? right.slice( 0, precision ) : zeroPad( right, precision ));
+ }
+ else {
+ right = "";
+ }
+
+ var stringIndex = numberString.length - 1,
+ sep = formatInfo[","],
+ ret = "";
+
+ while ( stringIndex >= 0 ) {
+ if ( curSize === 0 || curSize > stringIndex ) {
+ return numberString.slice( 0, stringIndex + 1 ) + ( ret.length ? ( sep + ret + right ) : right );
+ }
+ ret = numberString.slice( stringIndex - curSize + 1, stringIndex + 1 ) + ( ret.length ? ( sep + ret ) : "" );
+
+ stringIndex -= curSize;
+
+ if ( curGroupIndex < groupSizes.length ) {
+ curSize = groupSizes[ curGroupIndex ];
+ curGroupIndex++;
+ }
+ }
+ return numberString.slice( 0, stringIndex + 1 ) + sep + ret + right;
+}
+
+
+function parseNegativePattern(value, nf, negativePattern) {
+ var neg = nf["-"],
+ pos = nf["+"],
+ ret;
+ switch (negativePattern) {
+ case "n -":
+ neg = ' ' + neg;
+ pos = ' ' + pos;
+ // fall through
+ case "n-":
+ if ( endsWith( value, neg ) ) {
+ ret = [ '-', value.substr( 0, value.length - neg.length ) ];
+ }
+ else if ( endsWith( value, pos ) ) {
+ ret = [ '+', value.substr( 0, value.length - pos.length ) ];
+ }
+ break;
+ case "- n":
+ neg += ' ';
+ pos += ' ';
+ // fall through
+ case "-n":
+ if ( startsWith( value, neg ) ) {
+ ret = [ '-', value.substr( neg.length ) ];
+ }
+ else if ( startsWith(value, pos) ) {
+ ret = [ '+', value.substr( pos.length ) ];
+ }
+ break;
+ case "(n)":
+ if ( startsWith( value, '(' ) && endsWith( value, ')' ) ) {
+ ret = [ '-', value.substr( 1, value.length - 2 ) ];
+ }
+ break;
+ }
+ return ret || [ '', value ];
+}
+
+function formatNumber(value, format, culture) {
+ if ( !format || format === 'i' ) {
+ return culture.name.length ? value.toLocaleString() : value.toString();
+ }
+ format = format || "D";
+
+ var nf = culture.numberFormat,
+ number = Math.abs(value),
+ precision = -1,
+ pattern;
+ if (format.length > 1) precision = parseInt( format.slice( 1 ), 10 );
+
+ var current = format.charAt( 0 ).toUpperCase(),
+ formatInfo;
+
+ switch (current) {
+ case "D":
+ pattern = 'n';
+ if (precision !== -1) {
+ number = zeroPad( ""+number, precision, true );
+ }
+ if (value < 0) number = -number;
+ break;
+ case "N":
+ formatInfo = nf;
+ // fall through
+ case "C":
+ formatInfo = formatInfo || nf.currency;
+ // fall through
+ case "P":
+ formatInfo = formatInfo || nf.percent;
+ pattern = value < 0 ? formatInfo.pattern[0] : (formatInfo.pattern[1] || "n");
+ if (precision === -1) precision = formatInfo.decimals;
+ number = expandNumber( number * (current === "P" ? 100 : 1), precision, formatInfo );
+ break;
+ default:
+ throw "Bad number format specifier: " + current;
+ }
+
+ var patternParts = /n|\$|-|%/g,
+ ret = "";
+ for (;;) {
+ var index = patternParts.lastIndex,
+ ar = patternParts.exec(pattern);
+
+ ret += pattern.slice( index, ar ? ar.index : pattern.length );
+
+ if (!ar) {
+ break;
+ }
+
+ switch (ar[0]) {
+ case "n":
+ ret += number;
+ break;
+ case "$":
+ ret += nf.currency.symbol;
+ break;
+ case "-":
+ // don't make 0 negative
+ if ( /[1-9]/.test( number ) ) {
+ ret += nf["-"];
+ }
+ break;
+ case "%":
+ ret += nf.percent.symbol;
+ break;
+ }
+ }
+
+ return ret;
+}
+
+// *************************************** Dates ***************************************
+
+function outOfRange(value, low, high) {
+ return value < low || value > high;
+}
+
+function expandYear(cal, year) {
+ // expands 2-digit year into 4 digits.
+ var now = new Date(),
+ era = getEra(now);
+ if ( year < 100 ) {
+ var twoDigitYearMax = cal.twoDigitYearMax;
+ twoDigitYearMax = typeof twoDigitYearMax === 'string' ? new Date().getFullYear() % 100 + parseInt( twoDigitYearMax, 10 ) : twoDigitYearMax;
+ var curr = getEraYear( now, cal, era );
+ year += curr - ( curr % 100 );
+ if ( year > twoDigitYearMax ) {
+ year -= 100;
+ }
+ }
+ return year;
+}
+
+function getEra(date, eras) {
+ if ( !eras ) return 0;
+ var start, ticks = date.getTime();
+ for ( var i = 0, l = eras.length; i < l; i++ ) {
+ start = eras[ i ].start;
+ if ( start === null || ticks >= start ) {
+ return i;
+ }
+ }
+ return 0;
+}
+
+function toUpper(value) {
+ // 'he-IL' has non-breaking space in weekday names.
+ return value.split( "\u00A0" ).join(' ').toUpperCase();
+}
+
+function toUpperArray(arr) {
+ var results = [];
+ for ( var i = 0, l = arr.length; i < l; i++ ) {
+ results[i] = toUpper(arr[i]);
+ }
+ return results;
+}
+
+function getEraYear(date, cal, era, sortable) {
+ var year = date.getFullYear();
+ if ( !sortable && cal.eras ) {
+ // convert normal gregorian year to era-shifted gregorian
+ // year by subtracting the era offset
+ year -= cal.eras[ era ].offset;
+ }
+ return year;
+}
+
+function getDayIndex(cal, value, abbr) {
+ var ret,
+ days = cal.days,
+ upperDays = cal._upperDays;
+ if ( !upperDays ) {
+ cal._upperDays = upperDays = [
+ toUpperArray( days.names ),
+ toUpperArray( days.namesAbbr ),
+ toUpperArray( days.namesShort )
+ ];
+ }
+ value = toUpper( value );
+ if ( abbr ) {
+ ret = arrayIndexOf( upperDays[ 1 ], value );
+ if ( ret === -1 ) {
+ ret = arrayIndexOf( upperDays[ 2 ], value );
+ }
+ }
+ else {
+ ret = arrayIndexOf( upperDays[ 0 ], value );
+ }
+ return ret;
+}
+
+function getMonthIndex(cal, value, abbr) {
+ var months = cal.months,
+ monthsGen = cal.monthsGenitive || cal.months,
+ upperMonths = cal._upperMonths,
+ upperMonthsGen = cal._upperMonthsGen;
+ if ( !upperMonths ) {
+ cal._upperMonths = upperMonths = [
+ toUpperArray( months.names ),
+ toUpperArray( months.namesAbbr ),
+ ];
+ cal._upperMonthsGen = upperMonthsGen = [
+ toUpperArray( monthsGen.names ),
+ toUpperArray( monthsGen.namesAbbr )
+ ];
+ }
+ value = toUpper( value );
+ var i = arrayIndexOf( abbr ? upperMonths[ 1 ] : upperMonths[ 0 ], value );
+ if ( i < 0 ) {
+ i = arrayIndexOf( abbr ? upperMonthsGen[ 1 ] : upperMonthsGen[ 0 ], value );
+ }
+ return i;
+}
+
+function appendPreOrPostMatch(preMatch, strings) {
+ // appends pre- and post- token match strings while removing escaped characters.
+ // Returns a single quote count which is used to determine if the token occurs
+ // in a string literal.
+ var quoteCount = 0,
+ escaped = false;
+ for ( var i = 0, il = preMatch.length; i < il; i++ ) {
+ var c = preMatch.charAt( i );
+ switch ( c ) {
+ case '\'':
+ if ( escaped ) {
+ strings.push( "'" );
+ }
+ else {
+ quoteCount++;
+ }
+ escaped = false;
+ break;
+ case '\\':
+ if ( escaped ) {
+ strings.push( "\\" );
+ }
+ escaped = !escaped;
+ break;
+ default:
+ strings.push( c );
+ escaped = false;
+ break;
+ }
+ }
+ return quoteCount;
+}
+
+function expandFormat(cal, format) {
+ // expands unspecified or single character date formats into the full pattern.
+ format = format || "F";
+ var pattern,
+ patterns = cal.patterns,
+ len = format.length;
+ if ( len === 1 ) {
+ pattern = patterns[ format ];
+ if ( !pattern ) {
+ throw "Invalid date format string '" + format + "'.";
+ }
+ format = pattern;
+ }
+ else if ( len === 2 && format.charAt(0) === "%" ) {
+ // %X escape format -- intended as a custom format string that is only one character, not a built-in format.
+ format = format.charAt( 1 );
+ }
+ return format;
+}
+
+function getParseRegExp(cal, format) {
+ // converts a format string into a regular expression with groups that
+ // can be used to extract date fields from a date string.
+ // check for a cached parse regex.
+ var re = cal._parseRegExp;
+ if ( !re ) {
+ cal._parseRegExp = re = {};
+ }
+ else {
+ var reFormat = re[ format ];
+ if ( reFormat ) {
+ return reFormat;
+ }
+ }
+
+ // expand single digit formats, then escape regular expression characters.
+ var expFormat = expandFormat( cal, format ).replace( /([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g, "\\\\$1" ),
+ regexp = ["^"],
+ groups = [],
+ index = 0,
+ quoteCount = 0,
+ tokenRegExp = getTokenRegExp(),
+ match;
+
+ // iterate through each date token found.
+ while ( (match = tokenRegExp.exec( expFormat )) !== null ) {
+ var preMatch = expFormat.slice( index, match.index );
+ index = tokenRegExp.lastIndex;
+
+ // don't replace any matches that occur inside a string literal.
+ quoteCount += appendPreOrPostMatch( preMatch, regexp );
+ if ( quoteCount % 2 ) {
+ regexp.push( match[ 0 ] );
+ continue;
+ }
+
+ // add a regex group for the token.
+ var m = match[ 0 ],
+ len = m.length,
+ add;
+ switch ( m ) {
+ case 'dddd': case 'ddd':
+ case 'MMMM': case 'MMM':
+ case 'gg': case 'g':
+ add = "(\\D+)";
+ break;
+ case 'tt': case 't':
+ add = "(\\D*)";
+ break;
+ case 'yyyy':
+ case 'fff':
+ case 'ff':
+ case 'f':
+ add = "(\\d{" + len + "})";
+ break;
+ case 'dd': case 'd':
+ case 'MM': case 'M':
+ case 'yy': case 'y':
+ case 'HH': case 'H':
+ case 'hh': case 'h':
+ case 'mm': case 'm':
+ case 'ss': case 's':
+ add = "(\\d\\d?)";
+ break;
+ case 'zzz':
+ add = "([+-]?\\d\\d?:\\d{2})";
+ break;
+ case 'zz': case 'z':
+ add = "([+-]?\\d\\d?)";
+ break;
+ case '/':
+ add = "(\\" + cal["/"] + ")";
+ break;
+ default:
+ throw "Invalid date format pattern '" + m + "'.";
+ break;
+ }
+ if ( add ) {
+ regexp.push( add );
+ }
+ groups.push( match[ 0 ] );
+ }
+ appendPreOrPostMatch( expFormat.slice( index ), regexp );
+ regexp.push( "$" );
+
+ // allow whitespace to differ when matching formats.
+ var regexpStr = regexp.join( '' ).replace( /\s+/g, "\\s+" ),
+ parseRegExp = {'regExp': regexpStr, 'groups': groups};
+
+ // cache the regex for this format.
+ return re[ format ] = parseRegExp;
+}
+
+function getTokenRegExp() {
+ // regular expression for matching date and time tokens in format strings.
+ return /\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g;
+}
+
+function parseExact(value, format, culture) {
+ // try to parse the date string by matching against the format string
+ // while using the specified culture for date field names.
+ value = trim( value );
+ var cal = culture.calendar,
+ // convert date formats into regular expressions with groupings.
+ // use the regexp to determine the input format and extract the date fields.
+ parseInfo = getParseRegExp(cal, format),
+ match = new RegExp(parseInfo.regExp).exec(value);
+ if (match === null) {
+ return null;
+ }
+ // found a date format that matches the input.
+ var groups = parseInfo.groups,
+ era = null, year = null, month = null, date = null, weekDay = null,
+ hour = 0, hourOffset, min = 0, sec = 0, msec = 0, tzMinOffset = null,
+ pmHour = false;
+ // iterate the format groups to extract and set the date fields.
+ for ( var j = 0, jl = groups.length; j < jl; j++ ) {
+ var matchGroup = match[ j + 1 ];
+ if ( matchGroup ) {
+ var current = groups[ j ],
+ clength = current.length,
+ matchInt = parseInt( matchGroup, 10 );
+ switch ( current ) {
+ case 'dd': case 'd':
+ // Day of month.
+ date = matchInt;
+ // check that date is generally in valid range, also checking overflow below.
+ if ( outOfRange( date, 1, 31 ) ) return null;
+ break;
+ case 'MMM':
+ case 'MMMM':
+ month = getMonthIndex( cal, matchGroup, clength === 3 );
+ if ( outOfRange( month, 0, 11 ) ) return null;
+ break;
+ case 'M': case 'MM':
+ // Month.
+ month = matchInt - 1;
+ if ( outOfRange( month, 0, 11 ) ) return null;
+ break;
+ case 'y': case 'yy':
+ case 'yyyy':
+ year = clength < 4 ? expandYear( cal, matchInt ) : matchInt;
+ if ( outOfRange( year, 0, 9999 ) ) return null;
+ break;
+ case 'h': case 'hh':
+ // Hours (12-hour clock).
+ hour = matchInt;
+ if ( hour === 12 ) hour = 0;
+ if ( outOfRange( hour, 0, 11 ) ) return null;
+ break;
+ case 'H': case 'HH':
+ // Hours (24-hour clock).
+ hour = matchInt;
+ if ( outOfRange( hour, 0, 23 ) ) return null;
+ break;
+ case 'm': case 'mm':
+ // Minutes.
+ min = matchInt;
+ if ( outOfRange( min, 0, 59 ) ) return null;
+ break;
+ case 's': case 'ss':
+ // Seconds.
+ sec = matchInt;
+ if ( outOfRange( sec, 0, 59 ) ) return null;
+ break;
+ case 'tt': case 't':
+ // AM/PM designator.
+ // see if it is standard, upper, or lower case PM. If not, ensure it is at least one of
+ // the AM tokens. If not, fail the parse for this format.
+ pmHour = cal.PM && ( matchGroup === cal.PM[0] || matchGroup === cal.PM[1] || matchGroup === cal.PM[2] );
+ if ( !pmHour && ( !cal.AM || (matchGroup !== cal.AM[0] && matchGroup !== cal.AM[1] && matchGroup !== cal.AM[2]) ) ) return null;
+ break;
+ case 'f':
+ // Deciseconds.
+ case 'ff':
+ // Centiseconds.
+ case 'fff':
+ // Milliseconds.
+ msec = matchInt * Math.pow( 10, 3-clength );
+ if ( outOfRange( msec, 0, 999 ) ) return null;
+ break;
+ case 'ddd':
+ // Day of week.
+ case 'dddd':
+ // Day of week.
+ weekDay = getDayIndex( cal, matchGroup, clength === 3 );
+ if ( outOfRange( weekDay, 0, 6 ) ) return null;
+ break;
+ case 'zzz':
+ // Time zone offset in +/- hours:min.
+ var offsets = matchGroup.split( /:/ );
+ if ( offsets.length !== 2 ) return null;
+ hourOffset = parseInt( offsets[ 0 ], 10 );
+ if ( outOfRange( hourOffset, -12, 13 ) ) return null;
+ var minOffset = parseInt( offsets[ 1 ], 10 );
+ if ( outOfRange( minOffset, 0, 59 ) ) return null;
+ tzMinOffset = (hourOffset * 60) + (startsWith( matchGroup, '-' ) ? -minOffset : minOffset);
+ break;
+ case 'z': case 'zz':
+ // Time zone offset in +/- hours.
+ hourOffset = matchInt;
+ if ( outOfRange( hourOffset, -12, 13 ) ) return null;
+ tzMinOffset = hourOffset * 60;
+ break;
+ case 'g': case 'gg':
+ var eraName = matchGroup;
+ if ( !eraName || !cal.eras ) return null;
+ eraName = trim( eraName.toLowerCase() );
+ for ( var i = 0, l = cal.eras.length; i < l; i++ ) {
+ if ( eraName === cal.eras[ i ].name.toLowerCase() ) {
+ era = i;
+ break;
+ }
+ }
+ // could not find an era with that name
+ if ( era === null ) return null;
+ break;
+ }
+ }
+ }
+ var result = new Date(), defaultYear, convert = cal.convert;
+ defaultYear = convert ? convert.fromGregorian( result )[ 0 ] : result.getFullYear();
+ if ( year === null ) {
+ year = defaultYear;
+ }
+ else if ( cal.eras ) {
+ // year must be shifted to normal gregorian year
+ // but not if year was not specified, its already normal gregorian
+ // per the main if clause above.
+ year += cal.eras[ (era || 0) ].offset;
+ }
+ // set default day and month to 1 and January, so if unspecified, these are the defaults
+ // instead of the current day/month.
+ if ( month === null ) {
+ month = 0;
+ }
+ if ( date === null ) {
+ date = 1;
+ }
+ // now have year, month, and date, but in the culture's calendar.
+ // convert to gregorian if necessary
+ if ( convert ) {
+ result = convert.toGregorian( year, month, date );
+ // conversion failed, must be an invalid match
+ if ( result === null ) return null;
+ }
+ else {
+ // have to set year, month and date together to avoid overflow based on current date.
+ result.setFullYear( year, month, date );
+ // check to see if date overflowed for specified month (only checked 1-31 above).
+ if ( result.getDate() !== date ) return null;
+ // invalid day of week.
+ if ( weekDay !== null && result.getDay() !== weekDay ) {
+ return null;
+ }
+ }
+ // if pm designator token was found make sure the hours fit the 24-hour clock.
+ if ( pmHour && hour < 12 ) {
+ hour += 12;
+ }
+ result.setHours( hour, min, sec, msec );
+ if ( tzMinOffset !== null ) {
+ // adjust timezone to utc before applying local offset.
+ var adjustedMin = result.getMinutes() - ( tzMinOffset + result.getTimezoneOffset() );
+ // Safari limits hours and minutes to the range of -127 to 127. We need to use setHours
+ // to ensure both these fields will not exceed this range. adjustedMin will range
+ // somewhere between -1440 and 1500, so we only need to split this into hours.
+ result.setHours( result.getHours() + parseInt( adjustedMin / 60, 10 ), adjustedMin % 60 );
+ }
+ return result;
+}
+
+function formatDate(value, format, culture) {
+ var cal = culture.calendar,
+ convert = cal.convert;
+ if ( !format || !format.length || format === 'i' ) {
+ var ret;
+ if ( culture && culture.name.length ) {
+ if ( convert ) {
+ // non-gregorian calendar, so we cannot use built-in toLocaleString()
+ ret = formatDate( value, cal.patterns.F, culture );
+ }
+ else {
+ var eraDate = new Date( value.getTime() ),
+ era = getEra( value, cal.eras );
+ eraDate.setFullYear( getEraYear( value, cal, era ) );
+ ret = eraDate.toLocaleString();
+ }
+ }
+ else {
+ ret = value.toString();
+ }
+ return ret;
+ }
+
+ var eras = cal.eras,
+ sortable = format === "s";
+ format = expandFormat( cal, format );
+
+ // Start with an empty string
+ ret = [];
+ var hour,
+ zeros = ['0','00','000'],
+ foundDay,
+ checkedDay,
+ dayPartRegExp = /([^d]|^)(d|dd)([^d]|$)/g,
+ quoteCount = 0,
+ tokenRegExp = getTokenRegExp(),
+ converted;
+
+ function padZeros(num, c) {
+ var r, s = num+'';
+ if ( c > 1 && s.length < c ) {
+ r = ( zeros[ c - 2 ] + s);
+ return r.substr( r.length - c, c );
+ }
+ else {
+ r = s;
+ }
+ return r;
+ }
+
+ function hasDay() {
+ if ( foundDay || checkedDay ) {
+ return foundDay;
+ }
+ foundDay = dayPartRegExp.test( format );
+ checkedDay = true;
+ return foundDay;
+ }
+
+ function getPart( date, part ) {
+ if ( converted ) {
+ return converted[ part ];
+ }
+ switch ( part ) {
+ case 0: return date.getFullYear();
+ case 1: return date.getMonth();
+ case 2: return date.getDate();
+ }
+ }
+
+ if ( !sortable && convert ) {
+ converted = convert.fromGregorian( value );
+ }
+
+ for (;;) {
+ // Save the current index
+ var index = tokenRegExp.lastIndex,
+ // Look for the next pattern
+ ar = tokenRegExp.exec( format );
+
+ // Append the text before the pattern (or the end of the string if not found)
+ var preMatch = format.slice( index, ar ? ar.index : format.length );
+ quoteCount += appendPreOrPostMatch( preMatch, ret );
+
+ if ( !ar ) {
+ break;
+ }
+
+ // do not replace any matches that occur inside a string literal.
+ if ( quoteCount % 2 ) {
+ ret.push( ar[ 0 ] );
+ continue;
+ }
+
+ var current = ar[ 0 ],
+ clength = current.length;
+
+ switch ( current ) {
+ case "ddd":
+ //Day of the week, as a three-letter abbreviation
+ case "dddd":
+ // Day of the week, using the full name
+ names = (clength === 3) ? cal.days.namesAbbr : cal.days.names;
+ ret.push( names[ value.getDay() ] );
+ break;
+ case "d":
+ // Day of month, without leading zero for single-digit days
+ case "dd":
+ // Day of month, with leading zero for single-digit days
+ foundDay = true;
+ ret.push( padZeros( getPart( value, 2 ), clength ) );
+ break;
+ case "MMM":
+ // Month, as a three-letter abbreviation
+ case "MMMM":
+ // Month, using the full name
+ var part = getPart( value, 1 );
+ ret.push( (cal.monthsGenitive && hasDay())
+ ? cal.monthsGenitive[ clength === 3 ? "namesAbbr" : "names" ][ part ]
+ : cal.months[ clength === 3 ? "namesAbbr" : "names" ][ part ] );
+ break;
+ case "M":
+ // Month, as digits, with no leading zero for single-digit months
+ case "MM":
+ // Month, as digits, with leading zero for single-digit months
+ ret.push( padZeros( getPart( value, 1 ) + 1, clength ) );
+ break;
+ case "y":
+ // Year, as two digits, but with no leading zero for years less than 10
+ case "yy":
+ // Year, as two digits, with leading zero for years less than 10
+ case "yyyy":
+ // Year represented by four full digits
+ part = converted ? converted[ 0 ] : getEraYear( value, cal, getEra( value, eras ), sortable );
+ if ( clength < 4 ) {
+ part = part % 100;
+ }
+ ret.push( padZeros( part, clength ) );
+ break;
+ case "h":
+ // Hours with no leading zero for single-digit hours, using 12-hour clock
+ case "hh":
+ // Hours with leading zero for single-digit hours, using 12-hour clock
+ hour = value.getHours() % 12;
+ if ( hour === 0 ) hour = 12;
+ ret.push( padZeros( hour, clength ) );
+ break;
+ case "H":
+ // Hours with no leading zero for single-digit hours, using 24-hour clock
+ case "HH":
+ // Hours with leading zero for single-digit hours, using 24-hour clock
+ ret.push( padZeros( value.getHours(), clength ) );
+ break;
+ case "m":
+ // Minutes with no leading zero for single-digit minutes
+ case "mm":
+ // Minutes with leading zero for single-digit minutes
+ ret.push( padZeros( value.getMinutes(), clength ) );
+ break;
+ case "s":
+ // Seconds with no leading zero for single-digit seconds
+ case "ss":
+ // Seconds with leading zero for single-digit seconds
+ ret.push( padZeros(value .getSeconds(), clength ) );
+ break;
+ case "t":
+ // One character am/pm indicator ("a" or "p")
+ case "tt":
+ // Multicharacter am/pm indicator
+ part = value.getHours() < 12 ? (cal.AM ? cal.AM[0] : " ") : (cal.PM ? cal.PM[0] : " ");
+ ret.push( clength === 1 ? part.charAt( 0 ) : part );
+ break;
+ case "f":
+ // Deciseconds
+ case "ff":
+ // Centiseconds
+ case "fff":
+ // Milliseconds
+ ret.push( padZeros( value.getMilliseconds(), 3 ).substr( 0, clength ) );
+ break;
+ case "z":
+ // Time zone offset, no leading zero
+ case "zz":
+ // Time zone offset with leading zero
+ hour = value.getTimezoneOffset() / 60;
+ ret.push( (hour <= 0 ? '+' : '-') + padZeros( Math.floor( Math.abs( hour ) ), clength ) );
+ break;
+ case "zzz":
+ // Time zone offset with leading zero
+ hour = value.getTimezoneOffset() / 60;
+ ret.push( (hour <= 0 ? '+' : '-') + padZeros( Math.floor( Math.abs( hour ) ), 2 ) +
+ // Hard coded ":" separator, rather than using cal.TimeSeparator
+ // Repeated here for consistency, plus ":" was already assumed in date parsing.
+ ":" + padZeros( Math.abs( value.getTimezoneOffset() % 60 ), 2 ) );
+ break;
+ case "g":
+ case "gg":
+ if ( cal.eras ) {
+ ret.push( cal.eras[ getEra(value, eras) ].name );
+ }
+ break;
+ case "/":
+ ret.push( cal["/"] );
+ break;
+ default:
+ throw "Invalid date format pattern '" + current + "'.";
+ break;
+ }
+ }
+ return ret.join( '' );
+}
+
+// EXPORTS
+
+window.Globalization = Globalization;
+
+//jQuery.findClosestCulture = Globalization.findClosestCulture;
+//jQuery.culture = Globalization.culture;
+//jQuery.cultures = Globalization.cultures
+//jQuery.preferCulture = Globalization.preferCulture
+//jQuery.localize = Globalization.localize
+//jQuery.format = Globalization.format
+//jQuery.parseInt = Globalization.parseInt
+//jQuery.parseFloat = Globalization.parseFloat
+//jQuery.parseDate = Globalization.parseDate
+
+})();
diff --git a/external/jquery.bgiframe-2.1.1.js b/external/jquery.bgiframe-2.1.1.js
deleted file mode 100644
index ef8679d90..000000000
--- a/external/jquery.bgiframe-2.1.1.js
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net)
- * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
- * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
- *
- * $LastChangedDate: 2007-07-21 18:45:56 -0500 (Sat, 21 Jul 2007) $
- * $Rev: 2447 $
- *
- * Version 2.1.1
- */
-(function($){$.fn.bgIframe=$.fn.bgiframe=function(s){if($.browser.msie&&/6.0/.test(navigator.userAgent)){s=$.extend({top:'auto',left:'auto',width:'auto',height:'auto',opacity:true,src:'javascript:false;'},s||{});var prop=function(n){return n&&n.constructor==Number?n+'px':n;},html='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+'style="display:block;position:absolute;z-index:-1;'+(s.opacity!==false?'filter:Alpha(Opacity=\'0\');':'')+'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+'"/>';return this.each(function(){if($('> iframe.bgiframe',this).length==0)this.insertBefore(document.createElement(html),this.firstChild);});}return this;};})(jQuery); \ No newline at end of file
diff --git a/external/jquery.bgiframe-2.1.2.js b/external/jquery.bgiframe-2.1.2.js
new file mode 100644
index 000000000..5cd38bb1d
--- /dev/null
+++ b/external/jquery.bgiframe-2.1.2.js
@@ -0,0 +1,39 @@
+/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
+ * Licensed under the MIT License (LICENSE.txt).
+ *
+ * Version 2.1.2
+ */
+
+(function($){
+
+$.fn.bgiframe = ($.browser.msie && /msie 6\.0/i.test(navigator.userAgent) ? function(s) {
+ s = $.extend({
+ top : 'auto', // auto == .currentStyle.borderTopWidth
+ left : 'auto', // auto == .currentStyle.borderLeftWidth
+ width : 'auto', // auto == offsetWidth
+ height : 'auto', // auto == offsetHeight
+ opacity : true,
+ src : 'javascript:false;'
+ }, s);
+ var html = '<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+
+ 'style="display:block;position:absolute;z-index:-1;'+
+ (s.opacity !== false?'filter:Alpha(Opacity=\'0\');':'')+
+ 'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+
+ 'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+
+ 'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+
+ 'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+
+ '"/>';
+ return this.each(function() {
+ if ( $(this).children('iframe.bgiframe').length === 0 )
+ this.insertBefore( document.createElement(html), this.firstChild );
+ });
+} : function() { return this; });
+
+// old alias
+$.fn.bgIframe = $.fn.bgiframe;
+
+function prop(n) {
+ return n && n.constructor === Number ? n + 'px' : n;
+}
+
+})(jQuery); \ No newline at end of file
diff --git a/external/jquery.mousewheel-3.0.4.js b/external/jquery.mousewheel-3.0.4.js
new file mode 100644
index 000000000..dbf8f4b0f
--- /dev/null
+++ b/external/jquery.mousewheel-3.0.4.js
@@ -0,0 +1,78 @@
+/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
+ * Licensed under the MIT License (LICENSE.txt).
+ *
+ * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
+ * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
+ * Thanks to: Seamus Leahy for adding deltaX and deltaY
+ *
+ * Version: 3.0.4
+ *
+ * Requires: 1.2.2+
+ */
+
+(function($) {
+
+var types = ['DOMMouseScroll', 'mousewheel'];
+
+$.event.special.mousewheel = {
+ setup: function() {
+ if ( this.addEventListener ) {
+ for ( var i=types.length; i; ) {
+ this.addEventListener( types[--i], handler, false );
+ }
+ } else {
+ this.onmousewheel = handler;
+ }
+ },
+
+ teardown: function() {
+ if ( this.removeEventListener ) {
+ for ( var i=types.length; i; ) {
+ this.removeEventListener( types[--i], handler, false );
+ }
+ } else {
+ this.onmousewheel = null;
+ }
+ }
+};
+
+$.fn.extend({
+ mousewheel: function(fn) {
+ return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");
+ },
+
+ unmousewheel: function(fn) {
+ return this.unbind("mousewheel", fn);
+ }
+});
+
+
+function handler(event) {
+ var orgEvent = event || window.event, args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true, deltaX = 0, deltaY = 0;
+ event = $.event.fix(orgEvent);
+ event.type = "mousewheel";
+
+ // Old school scrollwheel delta
+ if ( event.wheelDelta ) { delta = event.wheelDelta/120; }
+ if ( event.detail ) { delta = -event.detail/3; }
+
+ // New school multidimensional scroll (touchpads) deltas
+ deltaY = delta;
+
+ // Gecko
+ if ( orgEvent.axis !== undefined && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
+ deltaY = 0;
+ deltaX = -1*delta;
+ }
+
+ // Webkit
+ if ( orgEvent.wheelDeltaY !== undefined ) { deltaY = orgEvent.wheelDeltaY/120; }
+ if ( orgEvent.wheelDeltaX !== undefined ) { deltaX = -1*orgEvent.wheelDeltaX/120; }
+
+ // Add event and delta to the front of the arguments
+ args.unshift(event, delta, deltaX, deltaY);
+
+ return $.event.handle.apply(this, args);
+}
+
+})(jQuery); \ No newline at end of file
diff --git a/external/qunit.css b/external/qunit.css
index 5714bf4a5..a4daa27e4 100644
--- a/external/qunit.css
+++ b/external/qunit.css
@@ -1,119 +1,153 @@
+/** Font Family and Sizes */
+
+#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult {
+ font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
+}
+
+#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
+#qunit-tests { font-size: smaller; }
+
+
+/** Resets */
+
+#qunit-tests, #qunit-tests li ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult {
+ margin: 0;
+ padding: 0;
+}
-ol#qunit-tests {
- font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
- margin:0;
- padding:0;
- list-style-position:inside;
- font-size: smaller;
+/** Header */
+
+#qunit-header {
+ padding: 0.5em 0 0.5em 1em;
+
+ color: #fff;
+ text-shadow: rgba(0, 0, 0, 0.5) 4px 4px 1px;
+ background-color: #0d3349;
+
+ border-radius: 15px 15px 0 0;
+ -moz-border-radius: 15px 15px 0 0;
+ -webkit-border-top-right-radius: 15px;
+ -webkit-border-top-left-radius: 15px;
+}
+
+#qunit-header a {
+ text-decoration: none;
+ color: white;
+}
+
+#qunit-banner {
+ height: 5px;
+}
+
+#qunit-testrunner-toolbar {
+ padding: 0em 0 0.5em 2em;
+}
+
+#qunit-userAgent {
+ padding: 0.5em 0 0.5em 2.5em;
+ background-color: #2b81af;
+ color: #fff;
+ text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
+}
+
+
+/** Tests: Pass/Fail */
+
+#qunit-tests {
+ list-style-position: inside;
+}
+
+#qunit-tests li {
+ padding: 0.4em 0.5em 0.4em 2.5em;
+ border-bottom: 1px solid #fff;
+ list-style-position: inside;
}
-ol#qunit-tests li{
- padding:0.4em 0.5em 0.4em 2.5em;
- border-bottom:1px solid #fff;
- font-size:small;
- list-style-position:inside;
+
+#qunit-tests li strong {
+ cursor: pointer;
}
-ol#qunit-tests li ol{
+
+#qunit-tests li ol {
+ margin-top: 0.5em;
+ padding: 0.5em;
+
+ background-color: #fff;
+
+ border-radius: 15px;
+ -moz-border-radius: 15px;
+ -webkit-border-radius: 15px;
+
box-shadow: inset 0px 2px 13px #999;
-moz-box-shadow: inset 0px 2px 13px #999;
-webkit-box-shadow: inset 0px 2px 13px #999;
- margin-top:0.5em;
- margin-left:0;
- padding:0.5em;
- background-color:#fff;
- border-radius:15px;
- -moz-border-radius: 15px;
- -webkit-border-radius: 15px;
}
-ol#qunit-tests li li{
- border-bottom:none;
- margin:0.5em;
- background-color:#fff;
+
+#qunit-tests li li {
+ margin: 0.5em;
+ padding: 0.4em 0.5em 0.4em 0.5em;
+ background-color: #fff;
+ border-bottom: none;
list-style-position: inside;
- padding:0.4em 0.5em 0.4em 0.5em;
-}
-
-ol#qunit-tests li li.pass{
- border-left:26px solid #C6E746;
- background-color:#fff;
- color:#5E740B;
- }
-ol#qunit-tests li li.fail{
- border-left:26px solid #EE5757;
- background-color:#fff;
- color:#710909;
-}
-ol#qunit-tests li.pass{
- background-color:#D2E0E6;
- color:#528CE0;
-}
-ol#qunit-tests li.fail{
- background-color:#EE5757;
- color:#000;
-}
-ol#qunit-tests li strong {
- cursor:pointer;
-}
-h1#qunit-header{
- background-color:#0d3349;
- margin:0;
- padding:0.5em 0 0.5em 1em;
- color:#fff;
- font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
- border-top-right-radius:15px;
- border-top-left-radius:15px;
- -moz-border-radius-topright:15px;
- -moz-border-radius-topleft:15px;
- -webkit-border-top-right-radius:15px;
- -webkit-border-top-left-radius:15px;
- text-shadow: rgba(0, 0, 0, 0.5) 4px 4px 1px;
}
-h2#qunit-banner{
- font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
- height:5px;
- margin:0;
- padding:0;
+
+/*** Passing Styles */
+
+#qunit-tests li li.pass {
+ color: #5E740B;
+ background-color: #fff;
+ border-left: 26px solid #C6E746;
}
-h2#qunit-banner.qunit-pass{
- background-color:#C6E746;
+
+#qunit-tests li.pass { color: #528CE0; background-color: #D2E0E6; }
+#qunit-tests li.pass span.test-name { color: #366097; }
+
+#qunit-tests li li.pass span.test-actual,
+#qunit-tests li li.pass span.test-expected { color: #999999; }
+
+strong b.pass { color: #5E740B; }
+
+#qunit-banner.qunit-pass { background-color: #C6E746; }
+
+/*** Failing Styles */
+
+#qunit-tests li li.fail {
+ color: #710909;
+ background-color: #fff;
+ border-left: 26px solid #EE5757;
}
-h2#qunit-banner.qunit-fail, #qunit-testrunner-toolbar {
- background-color:#EE5757;
+
+#qunit-tests li.fail { color: #000000; background-color: #EE5757; }
+#qunit-tests li.fail span.test-name,
+#qunit-tests li.fail span.module-name { color: #000000; }
+
+#qunit-tests li li.fail span.test-actual { color: #EE5757; }
+#qunit-tests li li.fail span.test-expected { color: green; }
+
+strong b.fail { color: #710909; }
+
+#qunit-banner.qunit-fail,
+#qunit-testrunner-toolbar { background-color: #EE5757; }
+
+
+/** Footer */
+
+#qunit-testresult {
+ padding: 0.5em 0.5em 0.5em 2.5em;
+
+ color: #2b81af;
+ background-color: #D2E0E6;
+
+ border-radius: 0 0 15px 15px;
+ -moz-border-radius: 0 0 15px 15px;
+ -webkit-border-bottom-right-radius: 15px;
+ -webkit-border-bottom-left-radius: 15px;
}
-#qunit-testrunner-toolbar {
- font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
- padding:0;
- /*width:80%;*/
- padding:0em 0 0.5em 2em;
- font-size: small;
-}
-h2#qunit-userAgent {
- font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
- background-color:#2b81af;
- margin:0;
- padding:0;
- color:#fff;
- font-size: small;
- padding:0.5em 0 0.5em 2.5em;
- text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
+
+/** Fixture */
+
+#qunit-fixture {
+ position: absolute;
+ top: -10000px;
+ left: -10000px;
}
-p#qunit-testresult{
- font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
- margin:0;
- font-size: small;
- color:#2b81af;
- border-bottom-right-radius:15px;
- border-bottom-left-radius:15px;
- -moz-border-radius-bottomright:15px;
- -moz-border-radius-bottomleft:15px;
- -webkit-border-bottom-right-radius:15px;
- -webkit-border-bottom-left-radius:15px;
- background-color:#D2E0E6;
- padding:0.5em 0.5em 0.5em 2.5em;
-}
-strong b.fail{
- color:#710909;
- }
-strong b.pass{
- color:#5E740B;
- }
diff --git a/external/qunit.js b/external/qunit.js
index 9ef5f8d6f..45ad1dcf8 100644
--- a/external/qunit.js
+++ b/external/qunit.js
@@ -12,37 +12,6 @@
var QUnit = {
- // Initialize the configuration options
- init: function() {
- config = {
- stats: { all: 0, bad: 0 },
- moduleStats: { all: 0, bad: 0 },
- started: +new Date,
- updateRate: 1000,
- blocking: false,
- autorun: false,
- assertions: [],
- filters: [],
- queue: []
- };
-
- var tests = id("qunit-tests"),
- banner = id("qunit-banner"),
- result = id("qunit-testresult");
-
- if ( tests ) {
- tests.innerHTML = "";
- }
-
- if ( banner ) {
- banner.className = "";
- }
-
- if ( result ) {
- result.parentNode.removeChild( result );
- }
- },
-
// call on start of module test to prepend name to all tests
module: function(name, testEnvironment) {
config.currentModule = name;
@@ -70,7 +39,7 @@ var QUnit = {
},
test: function(testName, expected, callback, async) {
- var name = testName, testEnvironment, testEnvironmentArg;
+ var name = '<span class="test-name">' + testName + '</span>', testEnvironment, testEnvironmentArg;
if ( arguments.length === 2 ) {
callback = expected;
@@ -83,15 +52,14 @@ var QUnit = {
}
if ( config.currentModule ) {
- name = config.currentModule + " module: " + name;
+ name = '<span class="module-name">' + config.currentModule + "</span>: " + name;
}
- if ( !validTest(name) ) {
+ if ( !validTest(config.currentModule + ": " + testName) ) {
return;
}
synchronize(function() {
- QUnit.testStart( testName );
testEnvironment = extend({
setup: function() {},
@@ -101,11 +69,23 @@ var QUnit = {
extend(testEnvironment,testEnvironmentArg);
}
+ QUnit.testStart( testName, testEnvironment );
+
// allow utility functions to access the current test environment
QUnit.current_testEnvironment = testEnvironment;
config.assertions = [];
config.expected = expected;
+
+ var tests = id("qunit-tests");
+ if (tests) {
+ var b = document.createElement("strong");
+ b.innerHTML = "Running " + name;
+ var li = document.createElement("li");
+ li.appendChild( b );
+ li.id = "current-test-output";
+ tests.appendChild( li )
+ }
try {
if ( !config.pollution ) {
@@ -116,7 +96,9 @@ var QUnit = {
} catch(e) {
QUnit.ok( false, "Setup failed on " + name + ": " + e.message );
}
-
+ });
+
+ synchronize(function() {
if ( async ) {
QUnit.stop();
}
@@ -143,7 +125,9 @@ var QUnit = {
} catch(e) {
QUnit.ok( false, "Teardown failed on " + name + ": " + e.message );
}
-
+ });
+
+ synchronize(function() {
try {
QUnit.reset();
} catch(e) {
@@ -162,14 +146,13 @@ var QUnit = {
if ( tests ) {
var ol = document.createElement("ol");
- ol.style.display = "none";
for ( var i = 0; i < config.assertions.length; i++ ) {
var assertion = config.assertions[i];
var li = document.createElement("li");
li.className = assertion.result ? "pass" : "fail";
- li.appendChild(document.createTextNode(assertion.message || "(no message)"));
+ li.innerHTML = assertion.message || "(no message)";
ol.appendChild( li );
if ( assertion.result ) {
@@ -180,6 +163,9 @@ var QUnit = {
config.moduleStats.bad++;
}
}
+ if (bad == 0) {
+ ol.style.display = "none";
+ }
var b = document.createElement("strong");
b.innerHTML = name + " <b style='color:black;'>(<b class='fail'>" + bad + "</b>, <b class='pass'>" + good + "</b>, " + config.assertions.length + ")</b>";
@@ -191,27 +177,20 @@ var QUnit = {
addEvent(b, "dblclick", function(e) {
var target = e && e.target ? e.target : window.event.srcElement;
- if ( target.nodeName.toLowerCase() === "strong" ) {
- var text = "", node = target.firstChild;
-
- while ( node.nodeType === 3 ) {
- text += node.nodeValue;
- node = node.nextSibling;
- }
-
- text = text.replace(/(^\s*|\s*$)/g, "");
-
- if ( window.location ) {
- window.location.href = window.location.href.match(/^(.+?)(\?.*)?$/)[1] + "?" + encodeURIComponent(text);
- }
+ if ( target.nodeName.toLowerCase() == "span" || target.nodeName.toLowerCase() == "b" ) {
+ target = target.parentNode;
+ }
+ if ( window.location && target.nodeName.toLowerCase() === "strong" ) {
+ window.location.search = "?" + encodeURIComponent(getText([target]).replace(/\(.+\)$/, "").replace(/(^\s*|\s*$)/g, ""));
}
});
- var li = document.createElement("li");
+ var li = id("current-test-output");
+ li.id = "";
li.className = bad ? "fail" : "pass";
+ li.removeChild( li.firstChild );
li.appendChild( b );
li.appendChild( ol );
- tests.appendChild( li );
if ( bad ) {
var toolbar = id("qunit-testrunner-toolbar");
@@ -239,15 +218,7 @@ var QUnit = {
}
});
- if ( window.setTimeout && !config.doneTimer ) {
- config.doneTimer = window.setTimeout(function(){
- if ( !config.queue.length ) {
- done();
- } else {
- synchronize( done );
- }
- }, 13);
- }
+ synchronize( done );
},
/**
@@ -262,6 +233,7 @@ var QUnit = {
* @example ok( "asdfasdf".length > 5, "There must be at least 5 chars" );
*/
ok: function(a, msg) {
+ msg = escapeHtml(msg);
QUnit.log(a, msg);
config.assertions.push({
@@ -290,12 +262,12 @@ var QUnit = {
push(expected != actual, actual, expected, message);
},
- deepEqual: function(a, b, message) {
- push(QUnit.equiv(a, b), a, b, message);
+ deepEqual: function(actual, expected, message) {
+ push(QUnit.equiv(actual, expected), actual, expected, message);
},
- notDeepEqual: function(a, b, message) {
- push(!QUnit.equiv(a, b), a, b, message);
+ notDeepEqual: function(actual, expected, message) {
+ push(!QUnit.equiv(actual, expected), actual, expected, message);
},
strictEqual: function(actual, expected, message) {
@@ -305,7 +277,17 @@ var QUnit = {
notStrictEqual: function(actual, expected, message) {
push(expected !== actual, actual, expected, message);
},
-
+
+ raises: function(fn, message) {
+ try {
+ fn();
+ ok( false, message );
+ }
+ catch (e) {
+ ok( true, message );
+ }
+ },
+
start: function() {
// A slight delay, to avoid any current callbacks
if ( window.setTimeout ) {
@@ -332,51 +314,8 @@ var QUnit = {
QUnit.start();
}, timeout);
}
- },
-
- /**
- * Resets the test setup. Useful for tests that modify the DOM.
- */
- reset: function() {
- if ( window.jQuery ) {
- jQuery("#main").html( config.fixture );
- jQuery.event.global = {};
- jQuery.ajaxSettings = extend({}, config.ajaxSettings);
- }
- },
-
- /**
- * Trigger an event on an element.
- *
- * @example triggerEvent( document.body, "click" );
- *
- * @param DOMElement elem
- * @param String type
- */
- triggerEvent: function( elem, type, event ) {
- if ( document.createEvent ) {
- event = document.createEvent("MouseEvents");
- event.initMouseEvent(type, true, true, elem.ownerDocument.defaultView,
- 0, 0, 0, 0, 0, false, false, false, false, 0, null);
- elem.dispatchEvent( event );
+ }
- } else if ( elem.fireEvent ) {
- elem.fireEvent("on"+type);
- }
- },
-
- // Safe object type checking
- is: function( type, obj ) {
- return Object.prototype.toString.call( obj ) === "[object "+ type +"]";
- },
-
- // Logging callbacks
- done: function(failures, total) {},
- log: function(result, message) {},
- testStart: function(name) {},
- testDone: function(name, failures, total) {},
- moduleStart: function(name, testEnvironment) {},
- moduleDone: function(name, failures, total) {}
};
// Backwards compatibility, deprecated
@@ -426,11 +365,127 @@ if ( typeof exports === "undefined" || typeof require === "undefined" ) {
exports.QUnit = QUnit;
}
+// define these after exposing globals to keep them in these QUnit namespace only
+extend(QUnit, {
+ config: config,
+
+ // Initialize the configuration options
+ init: function() {
+ extend(config, {
+ stats: { all: 0, bad: 0 },
+ moduleStats: { all: 0, bad: 0 },
+ started: +new Date,
+ updateRate: 1000,
+ blocking: false,
+ autostart: true,
+ autorun: false,
+ assertions: [],
+ filters: [],
+ queue: []
+ });
+
+ var tests = id("qunit-tests"),
+ banner = id("qunit-banner"),
+ result = id("qunit-testresult");
+
+ if ( tests ) {
+ tests.innerHTML = "";
+ }
+
+ if ( banner ) {
+ banner.className = "";
+ }
+
+ if ( result ) {
+ result.parentNode.removeChild( result );
+ }
+ },
+
+ /**
+ * Resets the test setup. Useful for tests that modify the DOM.
+ */
+ reset: function() {
+ if ( window.jQuery ) {
+ jQuery("#main, #qunit-fixture").html( config.fixture );
+ }
+ },
+
+ /**
+ * Trigger an event on an element.
+ *
+ * @example triggerEvent( document.body, "click" );
+ *
+ * @param DOMElement elem
+ * @param String type
+ */
+ triggerEvent: function( elem, type, event ) {
+ if ( document.createEvent ) {
+ event = document.createEvent("MouseEvents");
+ event.initMouseEvent(type, true, true, elem.ownerDocument.defaultView,
+ 0, 0, 0, 0, 0, false, false, false, false, 0, null);
+ elem.dispatchEvent( event );
+
+ } else if ( elem.fireEvent ) {
+ elem.fireEvent("on"+type);
+ }
+ },
+
+ // Safe object type checking
+ is: function( type, obj ) {
+ return QUnit.objectType( obj ) == type;
+ },
+
+ objectType: function( obj ) {
+ if (typeof obj === "undefined") {
+ return "undefined";
+
+ // consider: typeof null === object
+ }
+ if (obj === null) {
+ return "null";
+ }
+
+ var type = Object.prototype.toString.call( obj )
+ .match(/^\[object\s(.*)\]$/)[1] || '';
+
+ switch (type) {
+ case 'Number':
+ if (isNaN(obj)) {
+ return "nan";
+ } else {
+ return "number";
+ }
+ case 'String':
+ case 'Boolean':
+ case 'Array':
+ case 'Date':
+ case 'RegExp':
+ case 'Function':
+ return type.toLowerCase();
+ }
+ if (typeof obj === "object") {
+ return "object";
+ }
+ return undefined;
+ },
+
+ // Logging callbacks
+ begin: function() {},
+ done: function(failures, total) {},
+ log: function(result, message) {},
+ testStart: function(name, testEnvironment) {},
+ testDone: function(name, failures, total) {},
+ moduleStart: function(name, testEnvironment) {},
+ moduleDone: function(name, failures, total) {}
+});
+
if ( typeof document === "undefined" || document.readyState === "complete" ) {
config.autorun = true;
}
addEvent(window, "load", function() {
+ QUnit.begin();
+
// Initialize the config, saving the execution queue
var oldconfig = extend({}, config);
QUnit.init();
@@ -442,6 +497,10 @@ addEvent(window, "load", function() {
if ( userAgent ) {
userAgent.innerHTML = navigator.userAgent;
}
+ var banner = id("qunit-header");
+ if ( banner ) {
+ banner.innerHTML = '<a href="' + location.href + '">' + banner.innerHTML + '</a>';
+ }
var toolbar = id("qunit-testrunner-toolbar");
if ( toolbar ) {
@@ -486,16 +545,14 @@ addEvent(window, "load", function() {
toolbar.appendChild( label );
}
- var main = id('main');
+ var main = id('main') || id('qunit-fixture');
if ( main ) {
config.fixture = main.innerHTML;
}
- if ( window.jQuery ) {
- config.ajaxSettings = window.jQuery.ajaxSettings;
+ if (config.autostart) {
+ QUnit.start();
}
-
- QUnit.start();
});
function done() {
@@ -577,9 +634,36 @@ function validTest( name ) {
return run;
}
+function escapeHtml(s) {
+ s = s === null ? "" : s + "";
+ return s.replace(/[\&"<>\\]/g, function(s) {
+ switch(s) {
+ case "&": return "&amp;";
+ case "\\": return "\\\\";
+ case '"': return '\"';
+ case "<": return "&lt;";
+ case ">": return "&gt;";
+ default: return s;
+ }
+ });
+}
+
function push(result, actual, expected, message) {
- message = message || (result ? "okay" : "failed");
- QUnit.ok( result, result ? message + ": " + QUnit.jsDump.parse(expected) : message + ", expected: " + QUnit.jsDump.parse(expected) + " result: " + QUnit.jsDump.parse(actual) );
+ message = escapeHtml(message) || (result ? "okay" : "failed");
+ message = '<span class="test-message">' + message + "</span>";
+ expected = escapeHtml(QUnit.jsDump.parse(expected));
+ actual = escapeHtml(QUnit.jsDump.parse(actual));
+ var output = message + ', expected: <span class="test-expected">' + expected + '</span>';
+ if (actual != expected) {
+ output += ' result: <span class="test-actual">' + actual + '</span>, diff: ' + QUnit.diff(expected, actual);
+ }
+
+ // can't use ok, as that would double-escape messages
+ QUnit.log(result, output);
+ config.assertions.push({
+ result: !!result,
+ message: output
+ });
}
function synchronize( callback ) {
@@ -690,60 +774,11 @@ QUnit.equiv = function () {
var callers = []; // stack to decide between skip/abort functions
var parents = []; // stack to avoiding loops from circular referencing
-
- // Determine what is o.
- function hoozit(o) {
- if (QUnit.is("String", o)) {
- return "string";
-
- } else if (QUnit.is("Boolean", o)) {
- return "boolean";
-
- } else if (QUnit.is("Number", o)) {
-
- if (isNaN(o)) {
- return "nan";
- } else {
- return "number";
- }
-
- } else if (typeof o === "undefined") {
- return "undefined";
-
- // consider: typeof null === object
- } else if (o === null) {
- return "null";
-
- // consider: typeof [] === object
- } else if (QUnit.is( "Array", o)) {
- return "array";
-
- // consider: typeof new Date() === object
- } else if (QUnit.is( "Date", o)) {
- return "date";
-
- // consider: /./ instanceof Object;
- // /./ instanceof RegExp;
- // typeof /./ === "function"; // => false in IE and Opera,
- // true in FF and Safari
- } else if (QUnit.is( "RegExp", o)) {
- return "regexp";
-
- } else if (typeof o === "object") {
- return "object";
-
- } else if (QUnit.is( "Function", o)) {
- return "function";
- } else {
- return undefined;
- }
- }
-
// Call the o related callback with the given arguments.
function bindCallbacks(o, callbacks, args) {
- var prop = hoozit(o);
+ var prop = QUnit.objectType(o);
if (prop) {
- if (hoozit(callbacks[prop]) === "function") {
+ if (QUnit.objectType(callbacks[prop]) === "function") {
return callbacks[prop].apply(callbacks, args);
} else {
return callbacks[prop]; // or undefined
@@ -777,11 +812,11 @@ QUnit.equiv = function () {
},
"date": function (b, a) {
- return hoozit(b) === "date" && a.valueOf() === b.valueOf();
+ return QUnit.objectType(b) === "date" && a.valueOf() === b.valueOf();
},
"regexp": function (b, a) {
- return hoozit(b) === "regexp" &&
+ return QUnit.objectType(b) === "regexp" &&
a.source === b.source && // the regex itself
a.global === b.global && // and its modifers (gmi) ...
a.ignoreCase === b.ignoreCase &&
@@ -802,7 +837,7 @@ QUnit.equiv = function () {
var len;
// b could be an object literal here
- if ( ! (hoozit(b) === "array")) {
+ if ( ! (QUnit.objectType(b) === "array")) {
return false;
}
@@ -880,7 +915,7 @@ QUnit.equiv = function () {
return (function (a, b) {
if (a === b) {
return true; // catch the most you can
- } else if (a === null || b === null || typeof a === "undefined" || typeof b === "undefined" || hoozit(a) !== hoozit(b)) {
+ } else if (a === null || b === null || typeof a === "undefined" || typeof b === "undefined" || QUnit.objectType(a) !== QUnit.objectType(b)) {
return false; // don't lose time with error prone cases
} else {
return bindCallbacks(a, callbacks, [b, a]);
@@ -1066,4 +1101,161 @@ QUnit.jsDump = (function() {
return jsDump;
})();
+// from Sizzle.js
+function getText( elems ) {
+ var ret = "", elem;
+
+ for ( var i = 0; elems[i]; i++ ) {
+ elem = elems[i];
+
+ // Get the text from text nodes and CDATA nodes
+ if ( elem.nodeType === 3 || elem.nodeType === 4 ) {
+ ret += elem.nodeValue;
+
+ // Traverse everything else, except comment nodes
+ } else if ( elem.nodeType !== 8 ) {
+ ret += getText( elem.childNodes );
+ }
+ }
+
+ return ret;
+};
+
+/*
+ * Javascript Diff Algorithm
+ * By John Resig (http://ejohn.org/)
+ * Modified by Chu Alan "sprite"
+ *
+ * Released under the MIT license.
+ *
+ * More Info:
+ * http://ejohn.org/projects/javascript-diff-algorithm/
+ *
+ * Usage: QUnit.diff(expected, actual)
+ *
+ * QUnit.diff("the quick brown fox jumped over", "the quick fox jumps over") == "the quick <del>brown </del> fox <del>jumped </del><ins>jumps </ins> over"
+ */
+QUnit.diff = (function() {
+ function diff(o, n){
+ var ns = new Object();
+ var os = new Object();
+
+ for (var i = 0; i < n.length; i++) {
+ if (ns[n[i]] == null)
+ ns[n[i]] = {
+ rows: new Array(),
+ o: null
+ };
+ ns[n[i]].rows.push(i);
+ }
+
+ for (var i = 0; i < o.length; i++) {
+ if (os[o[i]] == null)
+ os[o[i]] = {
+ rows: new Array(),
+ n: null
+ };
+ os[o[i]].rows.push(i);
+ }
+
+ for (var i in ns) {
+ if (ns[i].rows.length == 1 && typeof(os[i]) != "undefined" && os[i].rows.length == 1) {
+ n[ns[i].rows[0]] = {
+ text: n[ns[i].rows[0]],
+ row: os[i].rows[0]
+ };
+ o[os[i].rows[0]] = {
+ text: o[os[i].rows[0]],
+ row: ns[i].rows[0]
+ };
+ }
+ }
+
+ for (var i = 0; i < n.length - 1; i++) {
+ if (n[i].text != null && n[i + 1].text == null && n[i].row + 1 < o.length && o[n[i].row + 1].text == null &&
+ n[i + 1] == o[n[i].row + 1]) {
+ n[i + 1] = {
+ text: n[i + 1],
+ row: n[i].row + 1
+ };
+ o[n[i].row + 1] = {
+ text: o[n[i].row + 1],
+ row: i + 1
+ };
+ }
+ }
+
+ for (var i = n.length - 1; i > 0; i--) {
+ if (n[i].text != null && n[i - 1].text == null && n[i].row > 0 && o[n[i].row - 1].text == null &&
+ n[i - 1] == o[n[i].row - 1]) {
+ n[i - 1] = {
+ text: n[i - 1],
+ row: n[i].row - 1
+ };
+ o[n[i].row - 1] = {
+ text: o[n[i].row - 1],
+ row: i - 1
+ };
+ }
+ }
+
+ return {
+ o: o,
+ n: n
+ };
+ }
+
+ return function(o, n){
+ o = o.replace(/\s+$/, '');
+ n = n.replace(/\s+$/, '');
+ var out = diff(o == "" ? [] : o.split(/\s+/), n == "" ? [] : n.split(/\s+/));
+
+ var str = "";
+
+ var oSpace = o.match(/\s+/g);
+ if (oSpace == null) {
+ oSpace = [" "];
+ }
+ else {
+ oSpace.push(" ");
+ }
+ var nSpace = n.match(/\s+/g);
+ if (nSpace == null) {
+ nSpace = [" "];
+ }
+ else {
+ nSpace.push(" ");
+ }
+
+ if (out.n.length == 0) {
+ for (var i = 0; i < out.o.length; i++) {
+ str += '<del>' + out.o[i] + oSpace[i] + "</del>";
+ }
+ }
+ else {
+ if (out.n[0].text == null) {
+ for (n = 0; n < out.o.length && out.o[n].text == null; n++) {
+ str += '<del>' + out.o[n] + oSpace[n] + "</del>";
+ }
+ }
+
+ for (var i = 0; i < out.n.length; i++) {
+ if (out.n[i].text == null) {
+ str += '<ins>' + out.n[i] + nSpace[i] + "</ins>";
+ }
+ else {
+ var pre = "";
+
+ for (n = out.n[i].row + 1; n < out.o.length && out.o[n].text == null; n++) {
+ pre += '<del>' + out.o[n] + oSpace[n] + "</del>";
+ }
+ str += " " + out.n[i].text + nSpace[i] + pre;
+ }
+ }
+ }
+
+ return str;
+ }
+})();
+
})(this);
diff --git a/jquery-1.4.2.js b/jquery-1.4.4.js
index fff677643..a4f114586 100644
--- a/jquery-1.4.2.js
+++ b/jquery-1.4.4.js
@@ -1,5 +1,5 @@
/*!
- * jQuery JavaScript Library v1.4.2
+ * jQuery JavaScript Library v1.4.4
* http://jquery.com/
*
* Copyright 2010, John Resig
@@ -11,10 +11,14 @@
* Copyright 2010, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
*
- * Date: Sat Feb 13 22:33:48 2010 -0500
+ * Date: Thu Nov 11 19:04:53 2010 -0500
*/
(function( window, undefined ) {
+// Use the correct document accordingly with window argument (sandbox)
+var document = window.document;
+var jQuery = (function() {
+
// Define a local copy of jQuery
var jQuery = function( selector, context ) {
// The jQuery object is actually just the init constructor 'enhanced'
@@ -27,28 +31,45 @@ var jQuery = function( selector, context ) {
// Map over the $ in case of overwrite
_$ = window.$,
- // Use the correct document accordingly with window argument (sandbox)
- document = window.document,
-
// A central reference to the root jQuery(document)
rootjQuery,
// A simple way to check for HTML strings or ID strings
// (both of which we optimize for)
- quickExpr = /^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,
+ quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,
// Is it a simple selector
isSimple = /^.[^:#\[\.,]*$/,
// Check if a string has a non-whitespace character in it
rnotwhite = /\S/,
+ rwhite = /\s/,
// Used for trimming whitespace
- rtrim = /^(\s|\u00A0)+|(\s|\u00A0)+$/g,
+ trimLeft = /^\s+/,
+ trimRight = /\s+$/,
+
+ // Check for non-word characters
+ rnonword = /\W/,
+
+ // Check for digits
+ rdigit = /\d/,
// Match a standalone tag
rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
+ // JSON RegExp
+ rvalidchars = /^[\],:{}\s]*$/,
+ rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
+ rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
+ rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
+
+ // Useragent RegExp
+ rwebkit = /(webkit)[ \/]([\w.]+)/,
+ ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/,
+ rmsie = /(msie) ([\w.]+)/,
+ rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
+
// Keep a UserAgent string for use with jQuery.browser
userAgent = navigator.userAgent,
@@ -66,10 +87,14 @@ var jQuery = function( selector, context ) {
// Save a reference to some core methods
toString = Object.prototype.toString,
- hasOwnProperty = Object.prototype.hasOwnProperty,
+ hasOwn = Object.prototype.hasOwnProperty,
push = Array.prototype.push,
slice = Array.prototype.slice,
- indexOf = Array.prototype.indexOf;
+ trim = String.prototype.trim,
+ indexOf = Array.prototype.indexOf,
+
+ // [[Class]] -> type pairs
+ class2type = {};
jQuery.fn = jQuery.prototype = {
init: function( selector, context ) {
@@ -88,7 +113,7 @@ jQuery.fn = jQuery.prototype = {
}
// The body element only exists once, optimize finding it
- if ( selector === "body" && !context ) {
+ if ( selector === "body" && !context && document.body ) {
this.context = document;
this[0] = document.body;
this.selector = "body";
@@ -122,7 +147,7 @@ jQuery.fn = jQuery.prototype = {
}
} else {
- ret = buildFragment( [ match[1] ], [ doc ] );
+ ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
selector = (ret.cacheable ? ret.fragment.cloneNode(true) : ret.fragment).childNodes;
}
@@ -132,7 +157,9 @@ jQuery.fn = jQuery.prototype = {
} else {
elem = document.getElementById( match[2] );
- if ( elem ) {
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ if ( elem && elem.parentNode ) {
// Handle the case where IE and Opera return items
// by name instead of ID
if ( elem.id !== match[2] ) {
@@ -150,7 +177,7 @@ jQuery.fn = jQuery.prototype = {
}
// HANDLE: $("TAG")
- } else if ( !context && /^\w+$/.test( selector ) ) {
+ } else if ( !context && !rnonword.test( selector ) ) {
this.selector = selector;
this.context = document;
selector = document.getElementsByTagName( selector );
@@ -184,7 +211,7 @@ jQuery.fn = jQuery.prototype = {
selector: "",
// The current version of jQuery being used
- jquery: "1.4.2",
+ jquery: "1.4.4",
// The default length of a jQuery object is 0
length: 0,
@@ -303,8 +330,11 @@ jQuery.fn = jQuery.prototype = {
jQuery.fn.init.prototype = jQuery.fn;
jQuery.extend = jQuery.fn.extend = function() {
- // copy reference to target object
- var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options, name, src, copy;
+ var options, name, src, copy, copyIsArray, clone,
+ target = arguments[0] || {},
+ i = 1,
+ length = arguments.length,
+ deep = false;
// Handle a deep copy situation
if ( typeof target === "boolean" ) {
@@ -338,10 +368,15 @@ jQuery.extend = jQuery.fn.extend = function() {
continue;
}
- // Recurse if we're merging object literal values or arrays
- if ( deep && copy && ( jQuery.isPlainObject(copy) || jQuery.isArray(copy) ) ) {
- var clone = src && ( jQuery.isPlainObject(src) || jQuery.isArray(src) ) ? src
- : jQuery.isArray(copy) ? [] : {};
+ // Recurse if we're merging plain objects or arrays
+ if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+ if ( copyIsArray ) {
+ copyIsArray = false;
+ clone = src && jQuery.isArray(src) ? src : [];
+
+ } else {
+ clone = src && jQuery.isPlainObject(src) ? src : {};
+ }
// Never move original objects, clone them
target[ name ] = jQuery.extend( deep, clone, copy );
@@ -371,34 +406,51 @@ jQuery.extend({
// Is the DOM ready to be used? Set to true once it occurs.
isReady: false,
+
+ // A counter to track how many items to wait for before
+ // the ready event fires. See #6781
+ readyWait: 1,
// Handle when the DOM is ready
- ready: function() {
+ ready: function( wait ) {
+ // A third-party is pushing the ready event forwards
+ if ( wait === true ) {
+ jQuery.readyWait--;
+ }
+
// Make sure that the DOM is not already loaded
- if ( !jQuery.isReady ) {
+ if ( !jQuery.readyWait || (wait !== true && !jQuery.isReady) ) {
// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
if ( !document.body ) {
- return setTimeout( jQuery.ready, 13 );
+ return setTimeout( jQuery.ready, 1 );
}
// Remember that the DOM is ready
jQuery.isReady = true;
+ // If a normal DOM Ready event fired, decrement, and wait if need be
+ if ( wait !== true && --jQuery.readyWait > 0 ) {
+ return;
+ }
+
// If there are functions bound, to execute
if ( readyList ) {
// Execute all of them
- var fn, i = 0;
- while ( (fn = readyList[ i++ ]) ) {
- fn.call( document, jQuery );
- }
+ var fn,
+ i = 0,
+ ready = readyList;
// Reset the list of functions
readyList = null;
- }
- // Trigger any bound ready events
- if ( jQuery.fn.triggerHandler ) {
- jQuery( document ).triggerHandler( "ready" );
+ while ( (fn = ready[ i++ ]) ) {
+ fn.call( document, jQuery );
+ }
+
+ // Trigger any bound ready events
+ if ( jQuery.fn.trigger ) {
+ jQuery( document ).trigger( "ready" ).unbind( "ready" );
+ }
}
}
},
@@ -413,7 +465,8 @@ jQuery.extend({
// Catch cases where $(document).ready() is called after the
// browser event has already occurred.
if ( document.readyState === "complete" ) {
- return jQuery.ready();
+ // Handle it asynchronously to allow scripts the opportunity to delay ready
+ return setTimeout( jQuery.ready, 1 );
}
// Mozilla, Opera and webkit nightlies currently support this event
@@ -451,25 +504,40 @@ jQuery.extend({
// Since version 1.3, DOM methods and functions like alert
// aren't supported. They return false on IE (#2968).
isFunction: function( obj ) {
- return toString.call(obj) === "[object Function]";
+ return jQuery.type(obj) === "function";
+ },
+
+ isArray: Array.isArray || function( obj ) {
+ return jQuery.type(obj) === "array";
+ },
+
+ // A crude way of determining if an object is a window
+ isWindow: function( obj ) {
+ return obj && typeof obj === "object" && "setInterval" in obj;
+ },
+
+ isNaN: function( obj ) {
+ return obj == null || !rdigit.test( obj ) || isNaN( obj );
},
- isArray: function( obj ) {
- return toString.call(obj) === "[object Array]";
+ type: function( obj ) {
+ return obj == null ?
+ String( obj ) :
+ class2type[ toString.call(obj) ] || "object";
},
isPlainObject: function( obj ) {
// Must be an Object.
// Because of IE, we also have to check the presence of the constructor property.
// Make sure that DOM nodes and window objects don't pass through, as well
- if ( !obj || toString.call(obj) !== "[object Object]" || obj.nodeType || obj.setInterval ) {
+ if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
return false;
}
// Not own constructor property must be Object
- if ( obj.constructor
- && !hasOwnProperty.call(obj, "constructor")
- && !hasOwnProperty.call(obj.constructor.prototype, "isPrototypeOf") ) {
+ if ( obj.constructor &&
+ !hasOwn.call(obj, "constructor") &&
+ !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
return false;
}
@@ -479,7 +547,7 @@ jQuery.extend({
var key;
for ( key in obj ) {}
- return key === undefined || hasOwnProperty.call( obj, key );
+ return key === undefined || hasOwn.call( obj, key );
},
isEmptyObject: function( obj ) {
@@ -503,9 +571,9 @@ jQuery.extend({
// Make sure the incoming data is actual JSON
// Logic borrowed from http://json.org/json2.js
- if ( /^[\],:{}\s]*$/.test(data.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@")
- .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]")
- .replace(/(?:^|:|,)(?:\s*\[)+/g, "")) ) {
+ if ( rvalidchars.test(data.replace(rvalidescape, "@")
+ .replace(rvalidtokens, "]")
+ .replace(rvalidbraces, "")) ) {
// Try to use the native JSON parser first
return window.JSON && window.JSON.parse ?
@@ -584,9 +652,20 @@ jQuery.extend({
return object;
},
- trim: function( text ) {
- return (text || "").replace( rtrim, "" );
- },
+ // Use native String.trim function wherever possible
+ trim: trim ?
+ function( text ) {
+ return text == null ?
+ "" :
+ trim.call( text );
+ } :
+
+ // Otherwise use our own trimming functionality
+ function( text ) {
+ return text == null ?
+ "" :
+ text.toString().replace( trimLeft, "" ).replace( trimRight, "" );
+ },
// results is for internal usage only
makeArray: function( array, results ) {
@@ -596,7 +675,10 @@ jQuery.extend({
// The window, strings (and functions) also have 'length'
// The extra typeof function check is to prevent crashes
// in Safari 2 (See: #3039)
- if ( array.length == null || typeof array === "string" || jQuery.isFunction(array) || (typeof array !== "function" && array.setInterval) ) {
+ // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
+ var type = jQuery.type(array);
+
+ if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
push.call( ret, array );
} else {
jQuery.merge( ret, array );
@@ -621,7 +703,8 @@ jQuery.extend({
},
merge: function( first, second ) {
- var i = first.length, j = 0;
+ var i = first.length,
+ j = 0;
if ( typeof second.length === "number" ) {
for ( var l = second.length; j < l; j++ ) {
@@ -640,12 +723,14 @@ jQuery.extend({
},
grep: function( elems, callback, inv ) {
- var ret = [];
+ var ret = [], retVal;
+ inv = !!inv;
// Go through the array, only saving the items
// that pass the validator function
for ( var i = 0, length = elems.length; i < length; i++ ) {
- if ( !inv !== !callback( elems[ i ], i ) ) {
+ retVal = !!callback( elems[ i ], i );
+ if ( inv !== retVal ) {
ret.push( elems[ i ] );
}
}
@@ -701,16 +786,49 @@ jQuery.extend({
return proxy;
},
+ // Mutifunctional method to get and set values to a collection
+ // The value/s can be optionally by executed if its a function
+ access: function( elems, key, value, exec, fn, pass ) {
+ var length = elems.length;
+
+ // Setting many attributes
+ if ( typeof key === "object" ) {
+ for ( var k in key ) {
+ jQuery.access( elems, k, key[k], exec, fn, value );
+ }
+ return elems;
+ }
+
+ // Setting one attribute
+ if ( value !== undefined ) {
+ // Optionally, function values get executed if exec is true
+ exec = !pass && exec && jQuery.isFunction(value);
+
+ for ( var i = 0; i < length; i++ ) {
+ fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
+ }
+
+ return elems;
+ }
+
+ // Getting an attribute
+ return length ? fn( elems[0], key ) : undefined;
+ },
+
+ now: function() {
+ return (new Date()).getTime();
+ },
+
// Use of jQuery.browser is frowned upon.
// More details: http://docs.jquery.com/Utilities/jQuery.browser
uaMatch: function( ua ) {
ua = ua.toLowerCase();
- var match = /(webkit)[ \/]([\w.]+)/.exec( ua ) ||
- /(opera)(?:.*version)?[ \/]([\w.]+)/.exec( ua ) ||
- /(msie) ([\w.]+)/.exec( ua ) ||
- !/compatible/.test( ua ) && /(mozilla)(?:.*? rv:([\w.]+))?/.exec( ua ) ||
- [];
+ var match = rwebkit.exec( ua ) ||
+ ropera.exec( ua ) ||
+ rmsie.exec( ua ) ||
+ ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) ||
+ [];
return { browser: match[1] || "", version: match[2] || "0" };
},
@@ -718,6 +836,11 @@ jQuery.extend({
browser: {}
});
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
+ class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
browserMatch = jQuery.uaMatch( userAgent );
if ( browserMatch.browser ) {
jQuery.browser[ browserMatch.browser ] = true;
@@ -735,6 +858,13 @@ if ( indexOf ) {
};
}
+// Verify that \s matches non-breaking spaces
+// (IE fails on this test)
+if ( !rwhite.test( "\xA0" ) ) {
+ trimLeft = /^[\s\xA0]+/;
+ trimRight = /[\s\xA0]+$/;
+}
+
// All jQuery objects should point back to these
rootjQuery = jQuery(document);
@@ -765,7 +895,7 @@ function doScrollCheck() {
// If IE is used, use the trick by Diego Perini
// http://javascript.nwbox.com/IEContentLoaded/
document.documentElement.doScroll("left");
- } catch( error ) {
+ } catch(e) {
setTimeout( doScrollCheck, 1 );
return;
}
@@ -774,54 +904,12 @@ function doScrollCheck() {
jQuery.ready();
}
-function evalScript( i, elem ) {
- if ( elem.src ) {
- jQuery.ajax({
- url: elem.src,
- async: false,
- dataType: "script"
- });
- } else {
- jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" );
- }
+// Expose jQuery to the global object
+return (window.jQuery = window.$ = jQuery);
- if ( elem.parentNode ) {
- elem.parentNode.removeChild( elem );
- }
-}
+})();
-// Mutifunctional method to get and set values to a collection
-// The value/s can be optionally by executed if its a function
-function access( elems, key, value, exec, fn, pass ) {
- var length = elems.length;
-
- // Setting many attributes
- if ( typeof key === "object" ) {
- for ( var k in key ) {
- access( elems, k, key[k], exec, fn, value );
- }
- return elems;
- }
-
- // Setting one attribute
- if ( value !== undefined ) {
- // Optionally, function values get executed if exec is true
- exec = !pass && exec && jQuery.isFunction(value);
-
- for ( var i = 0; i < length; i++ ) {
- fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
- }
-
- return elems;
- }
-
- // Getting an attribute
- return length ? fn( elems[0], key ) : undefined;
-}
-function now() {
- return (new Date).getTime();
-}
(function() {
jQuery.support = {};
@@ -829,13 +917,15 @@ function now() {
var root = document.documentElement,
script = document.createElement("script"),
div = document.createElement("div"),
- id = "script" + now();
+ id = "script" + jQuery.now();
div.style.display = "none";
div.innerHTML = " <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
var all = div.getElementsByTagName("*"),
- a = div.getElementsByTagName("a")[0];
+ a = div.getElementsByTagName("a")[0],
+ select = document.createElement("select"),
+ opt = select.appendChild( document.createElement("option") );
// Can't get basic test support
if ( !all || !all.length || !a ) {
@@ -878,18 +968,25 @@ function now() {
// Make sure that a selected-by-default option has a working selected property.
// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
- optSelected: document.createElement("select").appendChild( document.createElement("option") ).selected,
-
- parentNode: div.removeChild( div.appendChild( document.createElement("div") ) ).parentNode === null,
+ optSelected: opt.selected,
// Will be defined later
deleteExpando: true,
+ optDisabled: false,
checkClone: false,
scriptEval: false,
noCloneEvent: true,
- boxModel: null
+ boxModel: null,
+ inlineBlockNeedsLayout: false,
+ shrinkWrapBlocks: false,
+ reliableHiddenOffsets: true
};
+ // Make sure that the options inside disabled selects aren't marked as disabled
+ // (WebKit marks them as diabled)
+ select.disabled = true;
+ jQuery.support.optDisabled = !opt.disabled;
+
script.type = "text/javascript";
try {
script.appendChild( document.createTextNode( "window." + id + "=1;" ) );
@@ -909,7 +1006,7 @@ function now() {
// Fails in Internet Explorer
try {
delete script.test;
-
+
} catch(e) {
jQuery.support.deleteExpando = false;
}
@@ -943,27 +1040,63 @@ function now() {
document.body.appendChild( div );
jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2;
- document.body.removeChild( div ).style.display = 'none';
- div = null;
+ if ( "zoom" in div.style ) {
+ // Check if natively block-level elements act like inline-block
+ // elements when setting their display to 'inline' and giving
+ // them layout
+ // (IE < 8 does this)
+ div.style.display = "inline";
+ div.style.zoom = 1;
+ jQuery.support.inlineBlockNeedsLayout = div.offsetWidth === 2;
+
+ // Check if elements with layout shrink-wrap their children
+ // (IE 6 does this)
+ div.style.display = "";
+ div.innerHTML = "<div style='width:4px;'></div>";
+ jQuery.support.shrinkWrapBlocks = div.offsetWidth !== 2;
+ }
+
+ div.innerHTML = "<table><tr><td style='padding:0;display:none'></td><td>t</td></tr></table>";
+ var tds = div.getElementsByTagName("td");
+
+ // Check if table cells still have offsetWidth/Height when they are set
+ // to display:none and there are still other visible table cells in a
+ // table row; if so, offsetWidth/Height are not reliable for use when
+ // determining if an element has been hidden directly using
+ // display:none (it is still safe to use offsets if a parent element is
+ // hidden; don safety goggles and see bug #4512 for more information).
+ // (only IE 8 fails this test)
+ jQuery.support.reliableHiddenOffsets = tds[0].offsetHeight === 0;
+
+ tds[0].style.display = "";
+ tds[1].style.display = "none";
+
+ // Check if empty table cells still have offsetWidth/Height
+ // (IE < 8 fail this test)
+ jQuery.support.reliableHiddenOffsets = jQuery.support.reliableHiddenOffsets && tds[0].offsetHeight === 0;
+ div.innerHTML = "";
+
+ document.body.removeChild( div ).style.display = "none";
+ div = tds = null;
});
// Technique from Juriy Zaytsev
// http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/
- var eventSupported = function( eventName ) {
- var el = document.createElement("div");
- eventName = "on" + eventName;
-
- var isSupported = (eventName in el);
- if ( !isSupported ) {
- el.setAttribute(eventName, "return;");
- isSupported = typeof el[eventName] === "function";
- }
- el = null;
-
- return isSupported;
+ var eventSupported = function( eventName ) {
+ var el = document.createElement("div");
+ eventName = "on" + eventName;
+
+ var isSupported = (eventName in el);
+ if ( !isSupported ) {
+ el.setAttribute(eventName, "return;");
+ isSupported = typeof el[eventName] === "function";
+ }
+ el = null;
+
+ return isSupported;
};
-
+
jQuery.support.submitBubbles = eventSupported("submit");
jQuery.support.changeBubbles = eventSupported("change");
@@ -971,35 +1104,31 @@ function now() {
root = script = div = all = a = null;
})();
-jQuery.props = {
- "for": "htmlFor",
- "class": "className",
- readonly: "readOnly",
- maxlength: "maxLength",
- cellspacing: "cellSpacing",
- rowspan: "rowSpan",
- colspan: "colSpan",
- tabindex: "tabIndex",
- usemap: "useMap",
- frameborder: "frameBorder"
-};
-var expando = "jQuery" + now(), uuid = 0, windowData = {};
+
+
+var windowData = {},
+ rbrace = /^(?:\{.*\}|\[.*\])$/;
jQuery.extend({
cache: {},
-
- expando:expando,
+
+ // Please use with caution
+ uuid: 0,
+
+ // Unique for each copy of jQuery on the page
+ expando: "jQuery" + jQuery.now(),
// The following elements throw uncatchable exceptions if you
// attempt to add expando properties to them.
noData: {
"embed": true,
- "object": true,
+ // Ban all objects except for Flash (which handle expandos)
+ "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
"applet": true
},
data: function( elem, name, data ) {
- if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
+ if ( !jQuery.acceptData( elem ) ) {
return;
}
@@ -1007,29 +1136,38 @@ jQuery.extend({
windowData :
elem;
- var id = elem[ expando ], cache = jQuery.cache, thisCache;
+ var isNode = elem.nodeType,
+ id = isNode ? elem[ jQuery.expando ] : null,
+ cache = jQuery.cache, thisCache;
- if ( !id && typeof name === "string" && data === undefined ) {
- return null;
+ if ( isNode && !id && typeof name === "string" && data === undefined ) {
+ return;
}
+ // Get the data from the object directly
+ if ( !isNode ) {
+ cache = elem;
+
// Compute a unique ID for the element
- if ( !id ) {
- id = ++uuid;
+ } else if ( !id ) {
+ elem[ jQuery.expando ] = id = ++jQuery.uuid;
}
// Avoid generating a new cache unless none exists and we
// want to manipulate it.
if ( typeof name === "object" ) {
- elem[ expando ] = id;
- thisCache = cache[ id ] = jQuery.extend(true, {}, name);
+ if ( isNode ) {
+ cache[ id ] = jQuery.extend(cache[ id ], name);
+
+ } else {
+ jQuery.extend( cache, name );
+ }
- } else if ( !cache[ id ] ) {
- elem[ expando ] = id;
+ } else if ( isNode && !cache[ id ] ) {
cache[ id ] = {};
}
- thisCache = cache[ id ];
+ thisCache = isNode ? cache[ id ] : cache;
// Prevent overriding the named cache with undefined values
if ( data !== undefined ) {
@@ -1040,7 +1178,7 @@ jQuery.extend({
},
removeData: function( elem, name ) {
- if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
+ if ( !jQuery.acceptData( elem ) ) {
return;
}
@@ -1048,7 +1186,10 @@ jQuery.extend({
windowData :
elem;
- var id = elem[ expando ], cache = jQuery.cache, thisCache = cache[ id ];
+ var isNode = elem.nodeType,
+ id = isNode ? elem[ jQuery.expando ] : elem,
+ cache = jQuery.cache,
+ thisCache = isNode ? cache[ id ] : id;
// If we want to remove a specific section of the element's data
if ( name ) {
@@ -1057,30 +1198,66 @@ jQuery.extend({
delete thisCache[ name ];
// If we've removed all the data, remove the element's cache
- if ( jQuery.isEmptyObject(thisCache) ) {
+ if ( isNode && jQuery.isEmptyObject(thisCache) ) {
jQuery.removeData( elem );
}
}
// Otherwise, we want to remove all of the element's data
} else {
- if ( jQuery.support.deleteExpando ) {
+ if ( isNode && jQuery.support.deleteExpando ) {
delete elem[ jQuery.expando ];
} else if ( elem.removeAttribute ) {
elem.removeAttribute( jQuery.expando );
- }
// Completely remove the data cache
- delete cache[ id ];
+ } else if ( isNode ) {
+ delete cache[ id ];
+
+ // Remove all fields from the object
+ } else {
+ for ( var n in elem ) {
+ delete elem[ n ];
+ }
+ }
}
+ },
+
+ // A method for determining if a DOM node can handle the data expando
+ acceptData: function( elem ) {
+ if ( elem.nodeName ) {
+ var match = jQuery.noData[ elem.nodeName.toLowerCase() ];
+
+ if ( match ) {
+ return !(match === true || elem.getAttribute("classid") !== match);
+ }
+ }
+
+ return true;
}
});
jQuery.fn.extend({
data: function( key, value ) {
- if ( typeof key === "undefined" && this.length ) {
- return jQuery.data( this[0] );
+ var data = null;
+
+ if ( typeof key === "undefined" ) {
+ if ( this.length ) {
+ var attr = this[0].attributes, name;
+ data = jQuery.data( this[0] );
+
+ for ( var i = 0, l = attr.length; i < l; i++ ) {
+ name = attr[i].name;
+
+ if ( name.indexOf( "data-" ) === 0 ) {
+ name = name.substr( 5 );
+ dataAttr( this[0], name, data[ name ] );
+ }
+ }
+ }
+
+ return data;
} else if ( typeof key === "object" ) {
return this.each(function() {
@@ -1092,17 +1269,26 @@ jQuery.fn.extend({
parts[1] = parts[1] ? "." + parts[1] : "";
if ( value === undefined ) {
- var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
+ data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
+ // Try to fetch any internally stored data first
if ( data === undefined && this.length ) {
data = jQuery.data( this[0], key );
+ data = dataAttr( this[0], key, data );
}
+
return data === undefined && parts[1] ?
this.data( parts[0] ) :
data;
+
} else {
- return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function() {
+ return this.each(function() {
+ var $this = jQuery( this ),
+ args = [ parts[0], value ];
+
+ $this.triggerHandler( "setData" + parts[1] + "!", args );
jQuery.data( this, key, value );
+ $this.triggerHandler( "changeData" + parts[1] + "!", args );
});
}
},
@@ -1113,6 +1299,37 @@ jQuery.fn.extend({
});
}
});
+
+function dataAttr( elem, key, data ) {
+ // If nothing was found internally, try to fetch any
+ // data from the HTML5 data-* attribute
+ if ( data === undefined && elem.nodeType === 1 ) {
+ data = elem.getAttribute( "data-" + key );
+
+ if ( typeof data === "string" ) {
+ try {
+ data = data === "true" ? true :
+ data === "false" ? false :
+ data === "null" ? null :
+ !jQuery.isNaN( data ) ? parseFloat( data ) :
+ rbrace.test( data ) ? jQuery.parseJSON( data ) :
+ data;
+ } catch( e ) {}
+
+ // Make sure we set the data so it isn't changed later
+ jQuery.data( elem, key, data );
+
+ } else {
+ data = undefined;
+ }
+ }
+
+ return data;
+}
+
+
+
+
jQuery.extend({
queue: function( elem, type, data ) {
if ( !elem ) {
@@ -1140,7 +1357,8 @@ jQuery.extend({
dequeue: function( elem, type ) {
type = type || "fx";
- var queue = jQuery.queue( elem, type ), fn = queue.shift();
+ var queue = jQuery.queue( elem, type ),
+ fn = queue.shift();
// If the fx queue is dequeued, always remove the progress sentinel
if ( fn === "inprogress" ) {
@@ -1171,7 +1389,7 @@ jQuery.fn.extend({
if ( data === undefined ) {
return jQuery.queue( this[0], type );
}
- return this.each(function( i, elem ) {
+ return this.each(function( i ) {
var queue = jQuery.queue( this, type, data );
if ( type === "fx" && queue[0] !== "inprogress" ) {
@@ -1203,18 +1421,35 @@ jQuery.fn.extend({
return this.queue( type || "fx", [] );
}
});
+
+
+
+
var rclass = /[\n\t]/g,
- rspace = /\s+/,
+ rspaces = /\s+/,
rreturn = /\r/g,
- rspecialurl = /href|src|style/,
- rtype = /(button|input)/i,
- rfocusable = /(button|input|object|select|textarea)/i,
- rclickable = /^(a|area)$/i,
- rradiocheck = /radio|checkbox/;
+ rspecialurl = /^(?:href|src|style)$/,
+ rtype = /^(?:button|input)$/i,
+ rfocusable = /^(?:button|input|object|select|textarea)$/i,
+ rclickable = /^a(?:rea)?$/i,
+ rradiocheck = /^(?:radio|checkbox)$/i;
+
+jQuery.props = {
+ "for": "htmlFor",
+ "class": "className",
+ readonly: "readOnly",
+ maxlength: "maxLength",
+ cellspacing: "cellSpacing",
+ rowspan: "rowSpan",
+ colspan: "colSpan",
+ tabindex: "tabIndex",
+ usemap: "useMap",
+ frameborder: "frameBorder"
+};
jQuery.fn.extend({
attr: function( name, value ) {
- return access( this, name, value, true, jQuery.attr );
+ return jQuery.access( this, name, value, true, jQuery.attr );
},
removeAttr: function( name, fn ) {
@@ -1235,7 +1470,7 @@ jQuery.fn.extend({
}
if ( value && typeof value === "string" ) {
- var classNames = (value || "").split( rspace );
+ var classNames = (value || "").split( rspaces );
for ( var i = 0, l = this.length; i < l; i++ ) {
var elem = this[i];
@@ -1245,7 +1480,9 @@ jQuery.fn.extend({
elem.className = value;
} else {
- var className = " " + elem.className + " ", setClass = elem.className;
+ var className = " " + elem.className + " ",
+ setClass = elem.className;
+
for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
if ( className.indexOf( " " + classNames[c] + " " ) < 0 ) {
setClass += " " + classNames[c];
@@ -1269,7 +1506,7 @@ jQuery.fn.extend({
}
if ( (value && typeof value === "string") || value === undefined ) {
- var classNames = (value || "").split(rspace);
+ var classNames = (value || "").split( rspaces );
for ( var i = 0, l = this.length; i < l; i++ ) {
var elem = this[i];
@@ -1293,7 +1530,8 @@ jQuery.fn.extend({
},
toggleClass: function( value, stateVal ) {
- var type = typeof value, isBool = typeof stateVal === "boolean";
+ var type = typeof value,
+ isBool = typeof stateVal === "boolean";
if ( jQuery.isFunction( value ) ) {
return this.each(function(i) {
@@ -1305,9 +1543,11 @@ jQuery.fn.extend({
return this.each(function() {
if ( type === "string" ) {
// toggle individual class names
- var className, i = 0, self = jQuery(this),
+ var className,
+ i = 0,
+ self = jQuery( this ),
state = stateVal,
- classNames = value.split( rspace );
+ classNames = value.split( rspaces );
while ( (className = classNames[ i++ ]) ) {
// check each className given, space seperated list
@@ -1339,12 +1579,15 @@ jQuery.fn.extend({
},
val: function( value ) {
- if ( value === undefined ) {
+ if ( !arguments.length ) {
var elem = this[0];
if ( elem ) {
if ( jQuery.nodeName( elem, "option" ) ) {
- return (elem.attributes.value || {}).specified ? elem.value : elem.text;
+ // attributes.value is undefined in Blackberry 4.7 but
+ // uses .value. See #6932
+ var val = elem.attributes.value;
+ return !val || val.specified ? elem.value : elem.text;
}
// We need to handle select boxes special
@@ -1363,8 +1606,11 @@ jQuery.fn.extend({
for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {
var option = options[ i ];
- if ( option.selected ) {
- // Get the specifc value for the option
+ // Don't return options that are disabled or in a disabled optgroup
+ if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
+ (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
+
+ // Get the specific value for the option
value = jQuery(option).val();
// We don't need an array for one selects
@@ -1407,10 +1653,15 @@ jQuery.fn.extend({
val = value.call(this, i, self.val());
}
- // Typecast each time if the value is a Function and the appended
- // value is therefore different each time.
- if ( typeof val === "number" ) {
+ // Treat null/undefined as ""; convert numbers to string
+ if ( val == null ) {
+ val = "";
+ } else if ( typeof val === "number" ) {
val += "";
+ } else if ( jQuery.isArray(val) ) {
+ val = jQuery.map(val, function (value) {
+ return value == null ? "" : value + "";
+ });
}
if ( jQuery.isArray(val) && rradiocheck.test( this.type ) ) {
@@ -1463,89 +1714,103 @@ jQuery.extend({
// Try to normalize/fix the name
name = notxml && jQuery.props[ name ] || name;
- // Only do all the following if this is a node (faster for style)
- if ( elem.nodeType === 1 ) {
- // These attributes require special treatment
- var special = rspecialurl.test( name );
-
- // Safari mis-reports the default selected property of an option
- // Accessing the parent's selectedIndex property fixes it
- if ( name === "selected" && !jQuery.support.optSelected ) {
- var parent = elem.parentNode;
- if ( parent ) {
- parent.selectedIndex;
-
- // Make sure that it also works with optgroups, see #5701
- if ( parent.parentNode ) {
- parent.parentNode.selectedIndex;
- }
- }
- }
+ // These attributes require special treatment
+ var special = rspecialurl.test( name );
- // If applicable, access the attribute via the DOM 0 way
- if ( name in elem && notxml && !special ) {
- if ( set ) {
- // We can't allow the type property to be changed (since it causes problems in IE)
- if ( name === "type" && rtype.test( elem.nodeName ) && elem.parentNode ) {
- jQuery.error( "type property can't be changed" );
- }
+ // Safari mis-reports the default selected property of an option
+ // Accessing the parent's selectedIndex property fixes it
+ if ( name === "selected" && !jQuery.support.optSelected ) {
+ var parent = elem.parentNode;
+ if ( parent ) {
+ parent.selectedIndex;
- elem[ name ] = value;
+ // Make sure that it also works with optgroups, see #5701
+ if ( parent.parentNode ) {
+ parent.parentNode.selectedIndex;
}
+ }
+ }
- // browsers index elements by id/name on forms, give priority to attributes.
- if ( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) ) {
- return elem.getAttributeNode( name ).nodeValue;
+ // If applicable, access the attribute via the DOM 0 way
+ // 'in' checks fail in Blackberry 4.7 #6931
+ if ( (name in elem || elem[ name ] !== undefined) && notxml && !special ) {
+ if ( set ) {
+ // We can't allow the type property to be changed (since it causes problems in IE)
+ if ( name === "type" && rtype.test( elem.nodeName ) && elem.parentNode ) {
+ jQuery.error( "type property can't be changed" );
}
- // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
- // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
- if ( name === "tabIndex" ) {
- var attributeNode = elem.getAttributeNode( "tabIndex" );
+ if ( value === null ) {
+ if ( elem.nodeType === 1 ) {
+ elem.removeAttribute( name );
+ }
- return attributeNode && attributeNode.specified ?
- attributeNode.value :
- rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
- 0 :
- undefined;
+ } else {
+ elem[ name ] = value;
}
+ }
- return elem[ name ];
+ // browsers index elements by id/name on forms, give priority to attributes.
+ if ( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) ) {
+ return elem.getAttributeNode( name ).nodeValue;
}
- if ( !jQuery.support.style && notxml && name === "style" ) {
- if ( set ) {
- elem.style.cssText = "" + value;
- }
+ // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
+ // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
+ if ( name === "tabIndex" ) {
+ var attributeNode = elem.getAttributeNode( "tabIndex" );
- return elem.style.cssText;
+ return attributeNode && attributeNode.specified ?
+ attributeNode.value :
+ rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
+ 0 :
+ undefined;
}
+ return elem[ name ];
+ }
+
+ if ( !jQuery.support.style && notxml && name === "style" ) {
if ( set ) {
- // convert the value to a string (all browsers do this but IE) see #1070
- elem.setAttribute( name, "" + value );
+ elem.style.cssText = "" + value;
}
- var attr = !jQuery.support.hrefNormalized && notxml && special ?
- // Some attributes require a special call on IE
- elem.getAttribute( name, 2 ) :
- elem.getAttribute( name );
+ return elem.style.cssText;
+ }
+
+ if ( set ) {
+ // convert the value to a string (all browsers do this but IE) see #1070
+ elem.setAttribute( name, "" + value );
+ }
- // Non-existent attributes return null, we normalize to undefined
- return attr === null ? undefined : attr;
+ // Ensure that missing attributes return undefined
+ // Blackberry 4.7 returns "" from getAttribute #6938
+ if ( !elem.attributes[ name ] && (elem.hasAttribute && !elem.hasAttribute( name )) ) {
+ return undefined;
}
- // elem is actually elem.style ... set the style
- // Using attr for specific style information is now deprecated. Use style instead.
- return jQuery.style( elem, name, value );
+ var attr = !jQuery.support.hrefNormalized && notxml && special ?
+ // Some attributes require a special call on IE
+ elem.getAttribute( name, 2 ) :
+ elem.getAttribute( name );
+
+ // Non-existent attributes return null, we normalize to undefined
+ return attr === null ? undefined : attr;
}
});
+
+
+
+
var rnamespaces = /\.(.*)$/,
+ rformElems = /^(?:textarea|input|select)$/i,
+ rperiod = /\./g,
+ rspace = / /g,
+ rescape = /[^\w\s.|`]/g,
fcleanup = function( nm ) {
- return nm.replace(/[^\w\s\.\|`]/g, function( ch ) {
- return "\\" + ch;
- });
- };
+ return nm.replace(rescape, "\\$&");
+ },
+ focusCounts = { focusin: 0, focusout: 0 };
/*
* A number of helper functions used for managing events.
@@ -1563,10 +1828,17 @@ jQuery.event = {
// For whatever reason, IE has trouble passing the window object
// around, causing it to be cloned in the process
- if ( elem.setInterval && ( elem !== window && !elem.frameElement ) ) {
+ if ( jQuery.isWindow( elem ) && ( elem !== window && !elem.frameElement ) ) {
elem = window;
}
+ if ( handler === false ) {
+ handler = returnFalse;
+ } else if ( !handler ) {
+ // Fixes bug #7229. Fix recommended by jdalton
+ return;
+ }
+
var handleObjIn, handleObj;
if ( handler.handler ) {
@@ -1588,8 +1860,28 @@ jQuery.event = {
return;
}
- var events = elemData.events = elemData.events || {},
- eventHandle = elemData.handle, eventHandle;
+ // Use a key less likely to result in collisions for plain JS objects.
+ // Fixes bug #7150.
+ var eventKey = elem.nodeType ? "events" : "__events__",
+ events = elemData[ eventKey ],
+ eventHandle = elemData.handle;
+
+ if ( typeof events === "function" ) {
+ // On plain objects events is a fn that holds the the data
+ // which prevents this data from being JSON serialized
+ // the function does not need to be called, it just contains the data
+ eventHandle = events.handle;
+ events = events.events;
+
+ } else if ( !events ) {
+ if ( !elem.nodeType ) {
+ // On plain objects, create a fn that acts as the holder
+ // of the values to avoid JSON serialization of event data
+ elemData[ eventKey ] = elemData = function(){};
+ }
+
+ elemData.events = events = {};
+ }
if ( !eventHandle ) {
elemData.handle = eventHandle = function() {
@@ -1628,7 +1920,9 @@ jQuery.event = {
}
handleObj.type = type;
- handleObj.guid = handler.guid;
+ if ( !handleObj.guid ) {
+ handleObj.guid = handler.guid;
+ }
// Get the current list of functions bound to this event
var handlers = events[ type ],
@@ -1680,13 +1974,23 @@ jQuery.event = {
return;
}
- var ret, type, fn, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType,
+ if ( handler === false ) {
+ handler = returnFalse;
+ }
+
+ var ret, type, fn, j, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType,
+ eventKey = elem.nodeType ? "events" : "__events__",
elemData = jQuery.data( elem ),
- events = elemData && elemData.events;
+ events = elemData && elemData[ eventKey ];
if ( !elemData || !events ) {
return;
}
+
+ if ( typeof events === "function" ) {
+ elemData = events;
+ events = events.events;
+ }
// types is actually an event object here
if ( types && types.type ) {
@@ -1721,7 +2025,7 @@ jQuery.event = {
type = namespaces.shift();
namespace = new RegExp("(^|\\.)" +
- jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)")
+ jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)");
}
eventType = events[ type ];
@@ -1731,7 +2035,7 @@ jQuery.event = {
}
if ( !handler ) {
- for ( var j = 0; j < eventType.length; j++ ) {
+ for ( j = 0; j < eventType.length; j++ ) {
handleObj = eventType[ j ];
if ( all || namespace.test( handleObj.namespace ) ) {
@@ -1745,7 +2049,7 @@ jQuery.event = {
special = jQuery.event.special[ type ] || {};
- for ( var j = pos || 0; j < eventType.length; j++ ) {
+ for ( j = pos || 0; j < eventType.length; j++ ) {
handleObj = eventType[ j ];
if ( handler.guid === handleObj.guid ) {
@@ -1769,7 +2073,7 @@ jQuery.event = {
// remove generic event handler if no more handlers exist
if ( eventType.length === 0 || pos != null && eventType.length === 1 ) {
if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
- removeEvent( elem, type, elemData.handle );
+ jQuery.removeEvent( elem, type, elemData.handle );
}
ret = null;
@@ -1787,7 +2091,10 @@ jQuery.event = {
delete elemData.events;
delete elemData.handle;
- if ( jQuery.isEmptyObject( elemData ) ) {
+ if ( typeof elemData === "function" ) {
+ jQuery.removeData( elem, eventKey );
+
+ } else if ( jQuery.isEmptyObject( elemData ) ) {
jQuery.removeData( elem );
}
}
@@ -1802,7 +2109,7 @@ jQuery.event = {
if ( !bubbling ) {
event = typeof event === "object" ?
// jQuery.Event object
- event[expando] ? event :
+ event[ jQuery.expando ] ? event :
// Object literal
jQuery.extend( jQuery.Event(type), event ) :
// Just the event type (string)
@@ -1847,7 +2154,10 @@ jQuery.event = {
event.currentTarget = elem;
// Trigger the event, it is assumed that "handle" is a function
- var handle = jQuery.data( elem, "handle" );
+ var handle = elem.nodeType ?
+ jQuery.data( elem, "handle" ) :
+ (jQuery.data( elem, "__events__" ) || {}).handle;
+
if ( handle ) {
handle.apply( elem, data );
}
@@ -1859,41 +2169,44 @@ jQuery.event = {
if ( !(elem && elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()]) ) {
if ( elem[ "on" + type ] && elem[ "on" + type ].apply( elem, data ) === false ) {
event.result = false;
+ event.preventDefault();
}
}
// prevent IE from throwing an error for some elements with some event types, see #3533
- } catch (e) {}
+ } catch (inlineError) {}
if ( !event.isPropagationStopped() && parent ) {
jQuery.event.trigger( event, data, parent, true );
} else if ( !event.isDefaultPrevented() ) {
- var target = event.target, old,
- isClick = jQuery.nodeName(target, "a") && type === "click",
- special = jQuery.event.special[ type ] || {};
+ var old,
+ target = event.target,
+ targetType = type.replace( rnamespaces, "" ),
+ isClick = jQuery.nodeName( target, "a" ) && targetType === "click",
+ special = jQuery.event.special[ targetType ] || {};
if ( (!special._default || special._default.call( elem, event ) === false) &&
!isClick && !(target && target.nodeName && jQuery.noData[target.nodeName.toLowerCase()]) ) {
try {
- if ( target[ type ] ) {
+ if ( target[ targetType ] ) {
// Make sure that we don't accidentally re-trigger the onFOO events
- old = target[ "on" + type ];
+ old = target[ "on" + targetType ];
if ( old ) {
- target[ "on" + type ] = null;
+ target[ "on" + targetType ] = null;
}
jQuery.event.triggered = true;
- target[ type ]();
+ target[ targetType ]();
}
// prevent IE from throwing an error for some elements with some event types, see #3533
- } catch (e) {}
+ } catch (triggerError) {}
if ( old ) {
- target[ "on" + type ] = old;
+ target[ "on" + targetType ] = old;
}
jQuery.event.triggered = false;
@@ -1902,9 +2215,11 @@ jQuery.event = {
},
handle: function( event ) {
- var all, handlers, namespaces, namespace, events;
+ var all, handlers, namespaces, namespace_re, events,
+ namespace_sort = [],
+ args = jQuery.makeArray( arguments );
- event = arguments[0] = jQuery.event.fix( event || window.event );
+ event = args[0] = jQuery.event.fix( event || window.event );
event.currentTarget = this;
// Namespaced event handlers
@@ -1913,10 +2228,19 @@ jQuery.event = {
if ( !all ) {
namespaces = event.type.split(".");
event.type = namespaces.shift();
- namespace = new RegExp("(^|\\.)" + namespaces.slice(0).sort().join("\\.(?:.*\\.)?") + "(\\.|$)");
+ namespace_sort = namespaces.slice(0).sort();
+ namespace_re = new RegExp("(^|\\.)" + namespace_sort.join("\\.(?:.*\\.)?") + "(\\.|$)");
}
- var events = jQuery.data(this, "events"), handlers = events[ event.type ];
+ event.namespace = event.namespace || namespace_sort.join(".");
+
+ events = jQuery.data(this, this.nodeType ? "events" : "__events__");
+
+ if ( typeof events === "function" ) {
+ events = events.events;
+ }
+
+ handlers = (events || {})[ event.type ];
if ( events && handlers ) {
// Clone the handlers to prevent manipulation
@@ -1926,14 +2250,14 @@ jQuery.event = {
var handleObj = handlers[ j ];
// Filter the functions by class
- if ( all || namespace.test( handleObj.namespace ) ) {
+ if ( all || namespace_re.test( handleObj.namespace ) ) {
// Pass in a reference to the handler function itself
// So that we can later remove it
event.handler = handleObj.handler;
event.data = handleObj.data;
event.handleObj = handleObj;
- var ret = handleObj.handler.apply( this, arguments );
+ var ret = handleObj.handler.apply( this, args );
if ( ret !== undefined ) {
event.result = ret;
@@ -1953,10 +2277,10 @@ jQuery.event = {
return event.result;
},
- props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
+ props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
fix: function( event ) {
- if ( event[ expando ] ) {
+ if ( event[ jQuery.expando ] ) {
return event;
}
@@ -1972,7 +2296,8 @@ jQuery.event = {
// Fix target property, if necessary
if ( !event.target ) {
- event.target = event.srcElement || document; // Fixes #1925 where srcElement might not be defined either
+ // Fixes #1925 where srcElement might not be defined either
+ event.target = event.srcElement || document;
}
// check if target is a textnode (safari)
@@ -1987,14 +2312,16 @@ jQuery.event = {
// Calculate pageX/Y if missing and clientX/Y available
if ( event.pageX == null && event.clientX != null ) {
- var doc = document.documentElement, body = document.body;
+ var doc = document.documentElement,
+ body = document.body;
+
event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);
}
// Add which for key events
- if ( !event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode) ) {
- event.which = event.charCode || event.keyCode;
+ if ( event.which == null && (event.charCode != null || event.keyCode != null) ) {
+ event.which = event.charCode != null ? event.charCode : event.keyCode;
}
// Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
@@ -2026,36 +2353,24 @@ jQuery.event = {
live: {
add: function( handleObj ) {
- jQuery.event.add( this, handleObj.origType, jQuery.extend({}, handleObj, {handler: liveHandler}) );
+ jQuery.event.add( this,
+ liveConvert( handleObj.origType, handleObj.selector ),
+ jQuery.extend({}, handleObj, {handler: liveHandler, guid: handleObj.handler.guid}) );
},
remove: function( handleObj ) {
- var remove = true,
- type = handleObj.origType.replace(rnamespaces, "");
-
- jQuery.each( jQuery.data(this, "events").live || [], function() {
- if ( type === this.origType.replace(rnamespaces, "") ) {
- remove = false;
- return false;
- }
- });
-
- if ( remove ) {
- jQuery.event.remove( this, handleObj.origType, liveHandler );
- }
+ jQuery.event.remove( this, liveConvert( handleObj.origType, handleObj.selector ), handleObj );
}
-
},
beforeunload: {
setup: function( data, namespaces, eventHandle ) {
// We only want to do this special case on windows
- if ( this.setInterval ) {
+ if ( jQuery.isWindow( this ) ) {
this.onbeforeunload = eventHandle;
}
-
- return false;
},
+
teardown: function( namespaces, eventHandle ) {
if ( this.onbeforeunload === eventHandle ) {
this.onbeforeunload = null;
@@ -2065,12 +2380,16 @@ jQuery.event = {
}
};
-var removeEvent = document.removeEventListener ?
+jQuery.removeEvent = document.removeEventListener ?
function( elem, type, handle ) {
- elem.removeEventListener( type, handle, false );
+ if ( elem.removeEventListener ) {
+ elem.removeEventListener( type, handle, false );
+ }
} :
function( elem, type, handle ) {
- elem.detachEvent( "on" + type, handle );
+ if ( elem.detachEvent ) {
+ elem.detachEvent( "on" + type, handle );
+ }
};
jQuery.Event = function( src ) {
@@ -2090,10 +2409,10 @@ jQuery.Event = function( src ) {
// timeStamp is buggy for some events on Firefox(#3843)
// So we won't rely on the native value
- this.timeStamp = now();
+ this.timeStamp = jQuery.now();
// Mark it as fixed
- this[ expando ] = true;
+ this[ jQuery.expando ] = true;
};
function returnFalse() {
@@ -2117,9 +2436,11 @@ jQuery.Event.prototype = {
// if preventDefault exists run it on the original event
if ( e.preventDefault ) {
e.preventDefault();
- }
+
// otherwise set the returnValue property of the original event to false (IE)
- e.returnValue = false;
+ } else {
+ e.returnValue = false;
+ }
},
stopPropagation: function() {
this.isPropagationStopped = returnTrue;
@@ -2199,17 +2520,21 @@ if ( !jQuery.support.submitBubbles ) {
setup: function( data, namespaces ) {
if ( this.nodeName.toLowerCase() !== "form" ) {
jQuery.event.add(this, "click.specialSubmit", function( e ) {
- var elem = e.target, type = elem.type;
+ var elem = e.target,
+ type = elem.type;
if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) {
+ e.liveFired = undefined;
return trigger( "submit", this, arguments );
}
});
jQuery.event.add(this, "keypress.specialSubmit", function( e ) {
- var elem = e.target, type = elem.type;
+ var elem = e.target,
+ type = elem.type;
if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) {
+ e.liveFired = undefined;
return trigger( "submit", this, arguments );
}
});
@@ -2229,9 +2554,7 @@ if ( !jQuery.support.submitBubbles ) {
// change delegation, happens here so we have bind.
if ( !jQuery.support.changeBubbles ) {
- var formElems = /textarea|input|select/i,
-
- changeFilters,
+ var changeFilters,
getVal = function( elem ) {
var type = elem.type, val = elem.value;
@@ -2256,7 +2579,7 @@ if ( !jQuery.support.changeBubbles ) {
testChange = function testChange( e ) {
var elem = e.target, data, val;
- if ( !formElems.test( elem.nodeName ) || elem.readOnly ) {
+ if ( !rformElems.test( elem.nodeName ) || elem.readOnly ) {
return;
}
@@ -2274,6 +2597,7 @@ if ( !jQuery.support.changeBubbles ) {
if ( data != null || val ) {
e.type = "change";
+ e.liveFired = undefined;
return jQuery.event.trigger( e, arguments[1], elem );
}
};
@@ -2282,6 +2606,8 @@ if ( !jQuery.support.changeBubbles ) {
filters: {
focusout: testChange,
+ beforedeactivate: testChange,
+
click: function( e ) {
var elem = e.target, type = elem.type;
@@ -2304,7 +2630,7 @@ if ( !jQuery.support.changeBubbles ) {
// Beforeactivate happens also before the previous element is blurred
// with this event you can't trigger a change event, but you can store
- // information/focus[in] is not needed anymore
+ // information
beforeactivate: function( e ) {
var elem = e.target;
jQuery.data( elem, "_change_data", getVal(elem) );
@@ -2320,17 +2646,20 @@ if ( !jQuery.support.changeBubbles ) {
jQuery.event.add( this, type + ".specialChange", changeFilters[type] );
}
- return formElems.test( this.nodeName );
+ return rformElems.test( this.nodeName );
},
teardown: function( namespaces ) {
jQuery.event.remove( this, ".specialChange" );
- return formElems.test( this.nodeName );
+ return rformElems.test( this.nodeName );
}
};
changeFilters = jQuery.event.special.change.filters;
+
+ // Handle when the input is .focus()'d
+ changeFilters.focus = changeFilters.beforeactivate;
}
function trigger( type, elem, args ) {
@@ -2343,17 +2672,21 @@ if ( document.addEventListener ) {
jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
jQuery.event.special[ fix ] = {
setup: function() {
- this.addEventListener( orig, handler, true );
+ if ( focusCounts[fix]++ === 0 ) {
+ document.addEventListener( orig, handler, true );
+ }
},
teardown: function() {
- this.removeEventListener( orig, handler, true );
+ if ( --focusCounts[fix] === 0 ) {
+ document.removeEventListener( orig, handler, true );
+ }
}
};
function handler( e ) {
e = jQuery.event.fix( e );
e.type = fix;
- return jQuery.event.handle.call( this, e );
+ return jQuery.event.trigger( e, null, e.target );
}
});
}
@@ -2368,7 +2701,7 @@ jQuery.each(["bind", "one"], function( i, name ) {
return this;
}
- if ( jQuery.isFunction( data ) ) {
+ if ( jQuery.isFunction( data ) || data === false ) {
fn = data;
data = undefined;
}
@@ -2439,7 +2772,8 @@ jQuery.fn.extend({
toggle: function( fn ) {
// Save reference to arguments for access in closure
- var args = arguments, i = 1;
+ var args = arguments,
+ i = 1;
// link all the functions, so any of them can unbind this click handler
while ( i < args.length ) {
@@ -2476,6 +2810,14 @@ jQuery.each(["live", "die"], function( i, name ) {
var type, i = 0, match, namespaces, preType,
selector = origSelector || this.selector,
context = origSelector ? this : jQuery( this.context );
+
+ if ( typeof types === "object" && !types.preventDefault ) {
+ for ( var key in types ) {
+ context[ name ]( key, data, types[key], selector );
+ }
+
+ return this;
+ }
if ( jQuery.isFunction( data ) ) {
fn = data;
@@ -2510,30 +2852,39 @@ jQuery.each(["live", "die"], function( i, name ) {
if ( name === "live" ) {
// bind live handler
- context.each(function(){
- jQuery.event.add( this, liveConvert( type, selector ),
+ for ( var j = 0, l = context.length; j < l; j++ ) {
+ jQuery.event.add( context[j], "live." + liveConvert( type, selector ),
{ data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } );
- });
+ }
} else {
// unbind live handler
- context.unbind( liveConvert( type, selector ), fn );
+ context.unbind( "live." + liveConvert( type, selector ), fn );
}
}
return this;
- }
+ };
});
function liveHandler( event ) {
- var stop, elems = [], selectors = [], args = arguments,
- related, match, handleObj, elem, j, i, l, data,
- events = jQuery.data( this, "events" );
+ var stop, maxLevel, related, match, handleObj, elem, j, i, l, data, close, namespace, ret,
+ elems = [],
+ selectors = [],
+ events = jQuery.data( this, this.nodeType ? "events" : "__events__" );
+
+ if ( typeof events === "function" ) {
+ events = events.events;
+ }
// Make sure we avoid non-left-click bubbling in Firefox (#3861)
if ( event.liveFired === this || !events || !events.live || event.button && event.type === "click" ) {
return;
}
+
+ if ( event.namespace ) {
+ namespace = new RegExp("(^|\\.)" + event.namespace.split(".").join("\\.(?:.*\\.)?") + "(\\.|$)");
+ }
event.liveFired = this;
@@ -2553,20 +2904,23 @@ function liveHandler( event ) {
match = jQuery( event.target ).closest( selectors, event.currentTarget );
for ( i = 0, l = match.length; i < l; i++ ) {
+ close = match[i];
+
for ( j = 0; j < live.length; j++ ) {
handleObj = live[j];
- if ( match[i].selector === handleObj.selector ) {
- elem = match[i].elem;
+ if ( close.selector === handleObj.selector && (!namespace || namespace.test( handleObj.namespace )) ) {
+ elem = close.elem;
related = null;
// Those two events require additional checking
if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) {
+ event.type = handleObj.preType;
related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0];
}
if ( !related || related !== elem ) {
- elems.push({ elem: elem, handleObj: handleObj });
+ elems.push({ elem: elem, handleObj: handleObj, level: close.level });
}
}
}
@@ -2574,13 +2928,26 @@ function liveHandler( event ) {
for ( i = 0, l = elems.length; i < l; i++ ) {
match = elems[i];
+
+ if ( maxLevel && match.level > maxLevel ) {
+ break;
+ }
+
event.currentTarget = match.elem;
event.data = match.handleObj.data;
event.handleObj = match.handleObj;
- if ( match.handleObj.origHandler.apply( match.elem, args ) === false ) {
- stop = false;
- break;
+ ret = match.handleObj.origHandler.apply( match.elem, arguments );
+
+ if ( ret === false || event.isPropagationStopped() ) {
+ maxLevel = match.level;
+
+ if ( ret === false ) {
+ stop = false;
+ }
+ if ( event.isImmediatePropagationStopped() ) {
+ break;
+ }
}
}
@@ -2588,7 +2955,7 @@ function liveHandler( event ) {
}
function liveConvert( type, selector ) {
- return "live." + (type && type !== "*" ? type + "." : "") + selector.replace(/\./g, "`").replace(/ /g, "&");
+ return (type && type !== "*" ? type + "." : "") + selector.replace(rperiod, "`").replace(rspace, "&");
}
jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
@@ -2596,8 +2963,15 @@ jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblcl
"change select submit keydown keypress keyup error").split(" "), function( i, name ) {
// Handle event binding
- jQuery.fn[ name ] = function( fn ) {
- return fn ? this.bind( name, fn ) : this.trigger( name );
+ jQuery.fn[ name ] = function( data, fn ) {
+ if ( fn == null ) {
+ fn = data;
+ data = null;
+ }
+
+ return arguments.length > 0 ?
+ this.bind( name, data, fn ) :
+ this.trigger( name );
};
if ( jQuery.attrFn ) {
@@ -2610,7 +2984,7 @@ jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblcl
// More info:
// - http://isaacschlueter.com/2006/10/msie-memory-leaks/
if ( window.attachEvent && !window.addEventListener ) {
- window.attachEvent("onunload", function() {
+ jQuery(window).bind("unload", function() {
for ( var id in jQuery.cache ) {
if ( jQuery.cache[ id ].handle ) {
// Try/Catch is to handle iframes being unloaded, see #4280
@@ -2621,6 +2995,8 @@ if ( window.attachEvent && !window.addEventListener ) {
}
});
}
+
+
/*!
* Sizzle CSS Selector Engine - v1.0
* Copyright 2009, The Dojo Foundation
@@ -2629,7 +3005,7 @@ if ( window.attachEvent && !window.addEventListener ) {
*/
(function(){
-var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
+var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
done = 0,
toString = Object.prototype.toString,
hasDuplicate = false,
@@ -2639,14 +3015,16 @@ var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^
// optimization where it does not always call our comparision
// function. If that is the case, discard the hasDuplicate value.
// Thus far that includes Google Chrome.
-[0, 0].sort(function(){
+[0, 0].sort(function() {
baseHasDuplicate = false;
return 0;
});
-var Sizzle = function(selector, context, results, seed) {
+var Sizzle = function( selector, context, results, seed ) {
results = results || [];
- var origContext = context = context || document;
+ context = context || document;
+
+ var origContext = context;
if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
return [];
@@ -2656,24 +3034,34 @@ var Sizzle = function(selector, context, results, seed) {
return results;
}
- var parts = [], m, set, checkSet, extra, prune = true, contextXML = isXML(context),
+ var m, set, checkSet, extra, ret, cur, pop, i,
+ prune = true,
+ contextXML = Sizzle.isXML( context ),
+ parts = [],
soFar = selector;
// Reset the position of the chunker regexp (start from head)
- while ( (chunker.exec(""), m = chunker.exec(soFar)) !== null ) {
- soFar = m[3];
+ do {
+ chunker.exec( "" );
+ m = chunker.exec( soFar );
+
+ if ( m ) {
+ soFar = m[3];
- parts.push( m[1] );
+ parts.push( m[1] );
- if ( m[2] ) {
- extra = m[3];
- break;
+ if ( m[2] ) {
+ extra = m[3];
+ break;
+ }
}
- }
+ } while ( m );
if ( parts.length > 1 && origPOS.exec( selector ) ) {
+
if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
set = posProcess( parts[0] + parts[1], context );
+
} else {
set = Expr.relative[ parts[0] ] ?
[ context ] :
@@ -2689,29 +3077,38 @@ var Sizzle = function(selector, context, results, seed) {
set = posProcess( selector, set );
}
}
+
} else {
// Take a shortcut and set the context if the root selector is an ID
// (but not if it'll be faster if the inner selector is an ID)
if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&
Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {
- var ret = Sizzle.find( parts.shift(), context, contextXML );
- context = ret.expr ? Sizzle.filter( ret.expr, ret.set )[0] : ret.set[0];
+
+ ret = Sizzle.find( parts.shift(), context, contextXML );
+ context = ret.expr ?
+ Sizzle.filter( ret.expr, ret.set )[0] :
+ ret.set[0];
}
if ( context ) {
- var ret = seed ?
+ ret = seed ?
{ expr: parts.pop(), set: makeArray(seed) } :
Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML );
- set = ret.expr ? Sizzle.filter( ret.expr, ret.set ) : ret.set;
+
+ set = ret.expr ?
+ Sizzle.filter( ret.expr, ret.set ) :
+ ret.set;
if ( parts.length > 0 ) {
- checkSet = makeArray(set);
+ checkSet = makeArray( set );
+
} else {
prune = false;
}
while ( parts.length ) {
- var cur = parts.pop(), pop = cur;
+ cur = parts.pop();
+ pop = cur;
if ( !Expr.relative[ cur ] ) {
cur = "";
@@ -2725,6 +3122,7 @@ var Sizzle = function(selector, context, results, seed) {
Expr.relative[ cur ]( checkSet, pop, contextXML );
}
+
} else {
checkSet = parts = [];
}
@@ -2741,19 +3139,22 @@ var Sizzle = function(selector, context, results, seed) {
if ( toString.call(checkSet) === "[object Array]" ) {
if ( !prune ) {
results.push.apply( results, checkSet );
+
} else if ( context && context.nodeType === 1 ) {
- for ( var i = 0; checkSet[i] != null; i++ ) {
- if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && contains(context, checkSet[i])) ) {
+ for ( i = 0; checkSet[i] != null; i++ ) {
+ if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) {
results.push( set[i] );
}
}
+
} else {
- for ( var i = 0; checkSet[i] != null; i++ ) {
+ for ( i = 0; checkSet[i] != null; i++ ) {
if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
results.push( set[i] );
}
}
}
+
} else {
makeArray( checkSet, results );
}
@@ -2766,15 +3167,15 @@ var Sizzle = function(selector, context, results, seed) {
return results;
};
-Sizzle.uniqueSort = function(results){
+Sizzle.uniqueSort = function( results ) {
if ( sortOrder ) {
hasDuplicate = baseHasDuplicate;
- results.sort(sortOrder);
+ results.sort( sortOrder );
if ( hasDuplicate ) {
for ( var i = 1; i < results.length; i++ ) {
- if ( results[i] === results[i-1] ) {
- results.splice(i--, 1);
+ if ( results[i] === results[ i - 1 ] ) {
+ results.splice( i--, 1 );
}
}
}
@@ -2783,27 +3184,33 @@ Sizzle.uniqueSort = function(results){
return results;
};
-Sizzle.matches = function(expr, set){
- return Sizzle(expr, null, null, set);
+Sizzle.matches = function( expr, set ) {
+ return Sizzle( expr, null, null, set );
+};
+
+Sizzle.matchesSelector = function( node, expr ) {
+ return Sizzle( expr, null, null, [node] ).length > 0;
};
-Sizzle.find = function(expr, context, isXML){
- var set, match;
+Sizzle.find = function( expr, context, isXML ) {
+ var set;
if ( !expr ) {
return [];
}
for ( var i = 0, l = Expr.order.length; i < l; i++ ) {
- var type = Expr.order[i], match;
+ var match,
+ type = Expr.order[i];
if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
var left = match[1];
- match.splice(1,1);
+ match.splice( 1, 1 );
if ( left.substr( left.length - 1 ) !== "\\" ) {
match[1] = (match[1] || "").replace(/\\/g, "");
set = Expr.find[ type ]( match, context, isXML );
+
if ( set != null ) {
expr = expr.replace( Expr.match[ type ], "" );
break;
@@ -2813,20 +3220,26 @@ Sizzle.find = function(expr, context, isXML){
}
if ( !set ) {
- set = context.getElementsByTagName("*");
+ set = context.getElementsByTagName( "*" );
}
- return {set: set, expr: expr};
+ return { set: set, expr: expr };
};
-Sizzle.filter = function(expr, set, inplace, not){
- var old = expr, result = [], curLoop = set, match, anyFound,
- isXMLFilter = set && set[0] && isXML(set[0]);
+Sizzle.filter = function( expr, set, inplace, not ) {
+ var match, anyFound,
+ old = expr,
+ result = [],
+ curLoop = set,
+ isXMLFilter = set && set[0] && Sizzle.isXML( set[0] );
while ( expr && set.length ) {
for ( var type in Expr.filter ) {
if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {
- var filter = Expr.filter[ type ], found, item, left = match[1];
+ var found, item,
+ filter = Expr.filter[ type ],
+ left = match[1];
+
anyFound = false;
match.splice(1,1);
@@ -2844,6 +3257,7 @@ Sizzle.filter = function(expr, set, inplace, not){
if ( !match ) {
anyFound = found = true;
+
} else if ( match === true ) {
continue;
}
@@ -2858,9 +3272,11 @@ Sizzle.filter = function(expr, set, inplace, not){
if ( inplace && found != null ) {
if ( pass ) {
anyFound = true;
+
} else {
curLoop[i] = false;
}
+
} else if ( pass ) {
result.push( item );
anyFound = true;
@@ -2889,6 +3305,7 @@ Sizzle.filter = function(expr, set, inplace, not){
if ( expr === old ) {
if ( anyFound == null ) {
Sizzle.error( expr );
+
} else {
break;
}
@@ -2906,30 +3323,35 @@ Sizzle.error = function( msg ) {
var Expr = Sizzle.selectors = {
order: [ "ID", "NAME", "TAG" ],
+
match: {
- ID: /#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
- CLASS: /\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
- NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,
- ATTR: /\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,
- TAG: /^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,
- CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,
- POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,
- PSEUDO: /:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
+ ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
+ CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
+ NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
+ ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,
+ TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
+ CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+\-]*)\))?/,
+ POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
+ PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
},
+
leftMatch: {},
+
attrMap: {
"class": "className",
"for": "htmlFor"
},
+
attrHandle: {
- href: function(elem){
- return elem.getAttribute("href");
+ href: function( elem ) {
+ return elem.getAttribute( "href" );
}
},
+
relative: {
"+": function(checkSet, part){
var isPartStr = typeof part === "string",
- isTag = isPartStr && !/\W/.test(part),
+ isTag = isPartStr && !/\W/.test( part ),
isPartStrNotTag = isPartStr && !isTag;
if ( isTag ) {
@@ -2950,22 +3372,29 @@ var Expr = Sizzle.selectors = {
Sizzle.filter( part, checkSet, true );
}
},
- ">": function(checkSet, part){
- var isPartStr = typeof part === "string";
- if ( isPartStr && !/\W/.test(part) ) {
+ ">": function( checkSet, part ) {
+ var elem,
+ isPartStr = typeof part === "string",
+ i = 0,
+ l = checkSet.length;
+
+ if ( isPartStr && !/\W/.test( part ) ) {
part = part.toLowerCase();
- for ( var i = 0, l = checkSet.length; i < l; i++ ) {
- var elem = checkSet[i];
+ for ( ; i < l; i++ ) {
+ elem = checkSet[i];
+
if ( elem ) {
var parent = elem.parentNode;
checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;
}
}
+
} else {
- for ( var i = 0, l = checkSet.length; i < l; i++ ) {
- var elem = checkSet[i];
+ for ( ; i < l; i++ ) {
+ elem = checkSet[i];
+
if ( elem ) {
checkSet[i] = isPartStr ?
elem.parentNode :
@@ -2978,37 +3407,50 @@ var Expr = Sizzle.selectors = {
}
}
},
+
"": function(checkSet, part, isXML){
- var doneName = done++, checkFn = dirCheck;
+ var nodeCheck,
+ doneName = done++,
+ checkFn = dirCheck;
if ( typeof part === "string" && !/\W/.test(part) ) {
- var nodeCheck = part = part.toLowerCase();
+ part = part.toLowerCase();
+ nodeCheck = part;
checkFn = dirNodeCheck;
}
- checkFn("parentNode", part, doneName, checkSet, nodeCheck, isXML);
+ checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML );
},
- "~": function(checkSet, part, isXML){
- var doneName = done++, checkFn = dirCheck;
- if ( typeof part === "string" && !/\W/.test(part) ) {
- var nodeCheck = part = part.toLowerCase();
+ "~": function( checkSet, part, isXML ) {
+ var nodeCheck,
+ doneName = done++,
+ checkFn = dirCheck;
+
+ if ( typeof part === "string" && !/\W/.test( part ) ) {
+ part = part.toLowerCase();
+ nodeCheck = part;
checkFn = dirNodeCheck;
}
- checkFn("previousSibling", part, doneName, checkSet, nodeCheck, isXML);
+ checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML );
}
},
+
find: {
- ID: function(match, context, isXML){
+ ID: function( match, context, isXML ) {
if ( typeof context.getElementById !== "undefined" && !isXML ) {
var m = context.getElementById(match[1]);
- return m ? [m] : [];
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ return m && m.parentNode ? [m] : [];
}
},
- NAME: function(match, context){
+
+ NAME: function( match, context ) {
if ( typeof context.getElementsByName !== "undefined" ) {
- var ret = [], results = context.getElementsByName(match[1]);
+ var ret = [],
+ results = context.getElementsByName( match[1] );
for ( var i = 0, l = results.length; i < l; i++ ) {
if ( results[i].getAttribute("name") === match[1] ) {
@@ -3019,12 +3461,13 @@ var Expr = Sizzle.selectors = {
return ret.length === 0 ? null : ret;
}
},
- TAG: function(match, context){
- return context.getElementsByTagName(match[1]);
+
+ TAG: function( match, context ) {
+ return context.getElementsByTagName( match[1] );
}
},
preFilter: {
- CLASS: function(match, curLoop, inplace, result, not, isXML){
+ CLASS: function( match, curLoop, inplace, result, not, isXML ) {
match = " " + match[1].replace(/\\/g, "") + " ";
if ( isXML ) {
@@ -3037,6 +3480,7 @@ var Expr = Sizzle.selectors = {
if ( !inplace ) {
result.push( elem );
}
+
} else if ( inplace ) {
curLoop[i] = false;
}
@@ -3045,13 +3489,16 @@ var Expr = Sizzle.selectors = {
return false;
},
- ID: function(match){
+
+ ID: function( match ) {
return match[1].replace(/\\/g, "");
},
- TAG: function(match, curLoop){
+
+ TAG: function( match, curLoop ) {
return match[1].toLowerCase();
},
- CHILD: function(match){
+
+ CHILD: function( match ) {
if ( match[1] === "nth" ) {
// parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
var test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(
@@ -3068,7 +3515,8 @@ var Expr = Sizzle.selectors = {
return match;
},
- ATTR: function(match, curLoop, inplace, result, not, isXML){
+
+ ATTR: function( match, curLoop, inplace, result, not, isXML ) {
var name = match[1].replace(/\\/g, "");
if ( !isXML && Expr.attrMap[name] ) {
@@ -3081,159 +3529,203 @@ var Expr = Sizzle.selectors = {
return match;
},
- PSEUDO: function(match, curLoop, inplace, result, not){
+
+ PSEUDO: function( match, curLoop, inplace, result, not ) {
if ( match[1] === "not" ) {
// If we're dealing with a complex expression, or a simple one
if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) {
match[3] = Sizzle(match[3], null, null, curLoop);
+
} else {
var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
+
if ( !inplace ) {
result.push.apply( result, ret );
}
+
return false;
}
+
} else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
return true;
}
return match;
},
- POS: function(match){
+
+ POS: function( match ) {
match.unshift( true );
+
return match;
}
},
+
filters: {
- enabled: function(elem){
+ enabled: function( elem ) {
return elem.disabled === false && elem.type !== "hidden";
},
- disabled: function(elem){
+
+ disabled: function( elem ) {
return elem.disabled === true;
},
- checked: function(elem){
+
+ checked: function( elem ) {
return elem.checked === true;
},
- selected: function(elem){
+
+ selected: function( elem ) {
// Accessing this property makes selected-by-default
// options in Safari work properly
elem.parentNode.selectedIndex;
+
return elem.selected === true;
},
- parent: function(elem){
+
+ parent: function( elem ) {
return !!elem.firstChild;
},
- empty: function(elem){
+
+ empty: function( elem ) {
return !elem.firstChild;
},
- has: function(elem, i, match){
+
+ has: function( elem, i, match ) {
return !!Sizzle( match[3], elem ).length;
},
- header: function(elem){
- return /h\d/i.test( elem.nodeName );
+
+ header: function( elem ) {
+ return (/h\d/i).test( elem.nodeName );
},
- text: function(elem){
+
+ text: function( elem ) {
return "text" === elem.type;
},
- radio: function(elem){
+ radio: function( elem ) {
return "radio" === elem.type;
},
- checkbox: function(elem){
+
+ checkbox: function( elem ) {
return "checkbox" === elem.type;
},
- file: function(elem){
+
+ file: function( elem ) {
return "file" === elem.type;
},
- password: function(elem){
+ password: function( elem ) {
return "password" === elem.type;
},
- submit: function(elem){
+
+ submit: function( elem ) {
return "submit" === elem.type;
},
- image: function(elem){
+
+ image: function( elem ) {
return "image" === elem.type;
},
- reset: function(elem){
+
+ reset: function( elem ) {
return "reset" === elem.type;
},
- button: function(elem){
+
+ button: function( elem ) {
return "button" === elem.type || elem.nodeName.toLowerCase() === "button";
},
- input: function(elem){
- return /input|select|textarea|button/i.test(elem.nodeName);
+
+ input: function( elem ) {
+ return (/input|select|textarea|button/i).test( elem.nodeName );
}
},
setFilters: {
- first: function(elem, i){
+ first: function( elem, i ) {
return i === 0;
},
- last: function(elem, i, match, array){
+
+ last: function( elem, i, match, array ) {
return i === array.length - 1;
},
- even: function(elem, i){
+
+ even: function( elem, i ) {
return i % 2 === 0;
},
- odd: function(elem, i){
+
+ odd: function( elem, i ) {
return i % 2 === 1;
},
- lt: function(elem, i, match){
+
+ lt: function( elem, i, match ) {
return i < match[3] - 0;
},
- gt: function(elem, i, match){
+
+ gt: function( elem, i, match ) {
return i > match[3] - 0;
},
- nth: function(elem, i, match){
+
+ nth: function( elem, i, match ) {
return match[3] - 0 === i;
},
- eq: function(elem, i, match){
+
+ eq: function( elem, i, match ) {
return match[3] - 0 === i;
}
},
filter: {
- PSEUDO: function(elem, match, i, array){
- var name = match[1], filter = Expr.filters[ name ];
+ PSEUDO: function( elem, match, i, array ) {
+ var name = match[1],
+ filter = Expr.filters[ name ];
if ( filter ) {
return filter( elem, i, match, array );
+
} else if ( name === "contains" ) {
- return (elem.textContent || elem.innerText || getText([ elem ]) || "").indexOf(match[3]) >= 0;
+ return (elem.textContent || elem.innerText || Sizzle.getText([ elem ]) || "").indexOf(match[3]) >= 0;
+
} else if ( name === "not" ) {
var not = match[3];
- for ( var i = 0, l = not.length; i < l; i++ ) {
- if ( not[i] === elem ) {
+ for ( var j = 0, l = not.length; j < l; j++ ) {
+ if ( not[j] === elem ) {
return false;
}
}
return true;
+
} else {
Sizzle.error( "Syntax error, unrecognized expression: " + name );
}
},
- CHILD: function(elem, match){
- var type = match[1], node = elem;
- switch (type) {
- case 'only':
- case 'first':
+
+ CHILD: function( elem, match ) {
+ var type = match[1],
+ node = elem;
+
+ switch ( type ) {
+ case "only":
+ case "first":
while ( (node = node.previousSibling) ) {
if ( node.nodeType === 1 ) {
return false;
}
}
+
if ( type === "first" ) {
return true;
}
+
node = elem;
- case 'last':
+
+ case "last":
while ( (node = node.nextSibling) ) {
if ( node.nodeType === 1 ) {
return false;
}
}
+
return true;
- case 'nth':
- var first = match[2], last = match[3];
+
+ case "nth":
+ var first = match[2],
+ last = match[3];
if ( first === 1 && last === 0 ) {
return true;
@@ -3244,33 +3736,41 @@ var Expr = Sizzle.selectors = {
if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) {
var count = 0;
+
for ( node = parent.firstChild; node; node = node.nextSibling ) {
if ( node.nodeType === 1 ) {
node.nodeIndex = ++count;
}
}
+
parent.sizcache = doneName;
}
var diff = elem.nodeIndex - last;
+
if ( first === 0 ) {
return diff === 0;
+
} else {
return ( diff % first === 0 && diff / first >= 0 );
}
}
},
- ID: function(elem, match){
+
+ ID: function( elem, match ) {
return elem.nodeType === 1 && elem.getAttribute("id") === match;
},
- TAG: function(elem, match){
+
+ TAG: function( elem, match ) {
return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match;
},
- CLASS: function(elem, match){
+
+ CLASS: function( elem, match ) {
return (" " + (elem.className || elem.getAttribute("class")) + " ")
.indexOf( match ) > -1;
},
- ATTR: function(elem, match){
+
+ ATTR: function( elem, match ) {
var name = match[1],
result = Expr.attrHandle[ name ] ?
Expr.attrHandle[ name ]( elem ) :
@@ -3301,8 +3801,10 @@ var Expr = Sizzle.selectors = {
value === check || value.substr(0, check.length + 1) === check + "-" :
false;
},
- POS: function(elem, match, i, array){
- var name = match[2], filter = Expr.setFilters[ name ];
+
+ POS: function( elem, match, i, array ) {
+ var name = match[2],
+ filter = Expr.setFilters[ name ];
if ( filter ) {
return filter( elem, i, match, array );
@@ -3311,16 +3813,17 @@ var Expr = Sizzle.selectors = {
}
};
-var origPOS = Expr.match.POS;
+var origPOS = Expr.match.POS,
+ fescape = function(all, num){
+ return "\\" + (num - 0 + 1);
+ };
for ( var type in Expr.match ) {
- Expr.match[ type ] = new RegExp( Expr.match[ type ].source + /(?![^\[]*\])(?![^\(]*\))/.source );
- Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, function(all, num){
- return "\\" + (num - 0 + 1);
- }));
+ Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) );
+ Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) );
}
-var makeArray = function(array, results) {
+var makeArray = function( array, results ) {
array = Array.prototype.slice.call( array, 0 );
if ( results ) {
@@ -3339,19 +3842,22 @@ try {
Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;
// Provide a fallback method if it does not work
-} catch(e){
- makeArray = function(array, results) {
- var ret = results || [];
+} catch( e ) {
+ makeArray = function( array, results ) {
+ var i = 0,
+ ret = results || [];
if ( toString.call(array) === "[object Array]" ) {
Array.prototype.push.apply( ret, array );
+
} else {
if ( typeof array.length === "number" ) {
- for ( var i = 0, l = array.length; i < l; i++ ) {
+ for ( var l = array.length; i < l; i++ ) {
ret.push( array[i] );
}
+
} else {
- for ( var i = 0; array[i]; i++ ) {
+ for ( ; array[i]; i++ ) {
ret.push( array[i] );
}
}
@@ -3361,62 +3867,99 @@ try {
};
}
-var sortOrder;
+var sortOrder, siblingCheck;
if ( document.documentElement.compareDocumentPosition ) {
sortOrder = function( a, b ) {
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+
if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
- if ( a == b ) {
- hasDuplicate = true;
- }
return a.compareDocumentPosition ? -1 : 1;
}
- var ret = a.compareDocumentPosition(b) & 4 ? -1 : a === b ? 0 : 1;
- if ( ret === 0 ) {
- hasDuplicate = true;
- }
- return ret;
+ return a.compareDocumentPosition(b) & 4 ? -1 : 1;
};
-} else if ( "sourceIndex" in document.documentElement ) {
+
+} else {
sortOrder = function( a, b ) {
- if ( !a.sourceIndex || !b.sourceIndex ) {
- if ( a == b ) {
- hasDuplicate = true;
- }
- return a.sourceIndex ? -1 : 1;
+ var al, bl,
+ ap = [],
+ bp = [],
+ aup = a.parentNode,
+ bup = b.parentNode,
+ cur = aup;
+
+ // The nodes are identical, we can exit early
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+
+ // If the nodes are siblings (or identical) we can do a quick check
+ } else if ( aup === bup ) {
+ return siblingCheck( a, b );
+
+ // If no parents were found then the nodes are disconnected
+ } else if ( !aup ) {
+ return -1;
+
+ } else if ( !bup ) {
+ return 1;
}
- var ret = a.sourceIndex - b.sourceIndex;
- if ( ret === 0 ) {
- hasDuplicate = true;
+ // Otherwise they're somewhere else in the tree so we need
+ // to build up a full list of the parentNodes for comparison
+ while ( cur ) {
+ ap.unshift( cur );
+ cur = cur.parentNode;
}
- return ret;
- };
-} else if ( document.createRange ) {
- sortOrder = function( a, b ) {
- if ( !a.ownerDocument || !b.ownerDocument ) {
- if ( a == b ) {
- hasDuplicate = true;
+
+ cur = bup;
+
+ while ( cur ) {
+ bp.unshift( cur );
+ cur = cur.parentNode;
+ }
+
+ al = ap.length;
+ bl = bp.length;
+
+ // Start walking down the tree looking for a discrepancy
+ for ( var i = 0; i < al && i < bl; i++ ) {
+ if ( ap[i] !== bp[i] ) {
+ return siblingCheck( ap[i], bp[i] );
}
- return a.ownerDocument ? -1 : 1;
}
- var aRange = a.ownerDocument.createRange(), bRange = b.ownerDocument.createRange();
- aRange.setStart(a, 0);
- aRange.setEnd(a, 0);
- bRange.setStart(b, 0);
- bRange.setEnd(b, 0);
- var ret = aRange.compareBoundaryPoints(Range.START_TO_END, bRange);
- if ( ret === 0 ) {
- hasDuplicate = true;
+ // We ended someplace up the tree so do a sibling check
+ return i === al ?
+ siblingCheck( a, bp[i], -1 ) :
+ siblingCheck( ap[i], b, 1 );
+ };
+
+ siblingCheck = function( a, b, ret ) {
+ if ( a === b ) {
+ return ret;
}
- return ret;
+
+ var cur = a.nextSibling;
+
+ while ( cur ) {
+ if ( cur === b ) {
+ return -1;
+ }
+
+ cur = cur.nextSibling;
+ }
+
+ return 1;
};
}
// Utility function for retreiving the text value of an array of DOM nodes
-function getText( elems ) {
+Sizzle.getText = function( elems ) {
var ret = "", elem;
for ( var i = 0; elems[i]; i++ ) {
@@ -3428,43 +3971,52 @@ function getText( elems ) {
// Traverse everything else, except comment nodes
} else if ( elem.nodeType !== 8 ) {
- ret += getText( elem.childNodes );
+ ret += Sizzle.getText( elem.childNodes );
}
}
return ret;
-}
+};
// Check to see if the browser returns elements by name when
// querying by getElementById (and provide a workaround)
(function(){
// We're going to inject a fake input element with a specified name
var form = document.createElement("div"),
- id = "script" + (new Date).getTime();
+ id = "script" + (new Date()).getTime(),
+ root = document.documentElement;
+
form.innerHTML = "<a name='" + id + "'/>";
// Inject it into the root element, check its status, and remove it quickly
- var root = document.documentElement;
root.insertBefore( form, root.firstChild );
// The workaround has to do additional checks after a getElementById
// Which slows things down for other browsers (hence the branching)
if ( document.getElementById( id ) ) {
- Expr.find.ID = function(match, context, isXML){
+ Expr.find.ID = function( match, context, isXML ) {
if ( typeof context.getElementById !== "undefined" && !isXML ) {
var m = context.getElementById(match[1]);
- return m ? m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? [m] : undefined : [];
+
+ return m ?
+ m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ?
+ [m] :
+ undefined :
+ [];
}
};
- Expr.filter.ID = function(elem, match){
+ Expr.filter.ID = function( elem, match ) {
var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
+
return elem.nodeType === 1 && node && node.nodeValue === match;
};
}
root.removeChild( form );
- root = form = null; // release memory in IE
+
+ // release memory in IE
+ root = form = null;
})();
(function(){
@@ -3477,8 +4029,8 @@ function getText( elems ) {
// Make sure no comments are found
if ( div.getElementsByTagName("*").length > 0 ) {
- Expr.find.TAG = function(match, context){
- var results = context.getElementsByTagName(match[1]);
+ Expr.find.TAG = function( match, context ) {
+ var results = context.getElementsByTagName( match[1] );
// Filter out possible comments
if ( match[1] === "*" ) {
@@ -3499,19 +4051,25 @@ function getText( elems ) {
// Check to see if an attribute returns normalized href attributes
div.innerHTML = "<a href='#'></a>";
+
if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
div.firstChild.getAttribute("href") !== "#" ) {
- Expr.attrHandle.href = function(elem){
- return elem.getAttribute("href", 2);
+
+ Expr.attrHandle.href = function( elem ) {
+ return elem.getAttribute( "href", 2 );
};
}
- div = null; // release memory in IE
+ // release memory in IE
+ div = null;
})();
if ( document.querySelectorAll ) {
(function(){
- var oldSizzle = Sizzle, div = document.createElement("div");
+ var oldSizzle = Sizzle,
+ div = document.createElement("div"),
+ id = "__sizzle__";
+
div.innerHTML = "<p class='TEST'></p>";
// Safari can't handle uppercase or unicode characters when
@@ -3520,15 +4078,42 @@ if ( document.querySelectorAll ) {
return;
}
- Sizzle = function(query, context, extra, seed){
+ Sizzle = function( query, context, extra, seed ) {
context = context || document;
+ // Make sure that attribute selectors are quoted
+ query = query.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
+
// Only use querySelectorAll on non-XML documents
// (ID selectors don't work in non-HTML documents)
- if ( !seed && context.nodeType === 9 && !isXML(context) ) {
- try {
- return makeArray( context.querySelectorAll(query), extra );
- } catch(e){}
+ if ( !seed && !Sizzle.isXML(context) ) {
+ if ( context.nodeType === 9 ) {
+ try {
+ return makeArray( context.querySelectorAll(query), extra );
+ } catch(qsaError) {}
+
+ // qSA works strangely on Element-rooted queries
+ // We can work around this by specifying an extra ID on the root
+ // and working up from there (Thanks to Andrew Dupont for the technique)
+ // IE 8 doesn't work on object elements
+ } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+ var old = context.getAttribute( "id" ),
+ nid = old || id;
+
+ if ( !old ) {
+ context.setAttribute( "id", nid );
+ }
+
+ try {
+ return makeArray( context.querySelectorAll( "#" + nid + " " + query ), extra );
+
+ } catch(pseudoError) {
+ } finally {
+ if ( !old ) {
+ context.removeAttribute( "id" );
+ }
+ }
+ }
}
return oldSizzle(query, context, extra, seed);
@@ -3538,11 +4123,44 @@ if ( document.querySelectorAll ) {
Sizzle[ prop ] = oldSizzle[ prop ];
}
- div = null; // release memory in IE
+ // release memory in IE
+ div = null;
})();
}
(function(){
+ var html = document.documentElement,
+ matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector,
+ pseudoWorks = false;
+
+ try {
+ // This should fail with an exception
+ // Gecko does not error, returns false instead
+ matches.call( document.documentElement, "[test!='']:sizzle" );
+
+ } catch( pseudoError ) {
+ pseudoWorks = true;
+ }
+
+ if ( matches ) {
+ Sizzle.matchesSelector = function( node, expr ) {
+ // Make sure that attribute selectors are quoted
+ expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
+
+ if ( !Sizzle.isXML( node ) ) {
+ try {
+ if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {
+ return matches.call( node, expr );
+ }
+ } catch(e) {}
+ }
+
+ return Sizzle(expr, null, null, [node]).length > 0;
+ };
+ }
+})();
+
+(function(){
var div = document.createElement("div");
div.innerHTML = "<div class='test e'></div><div class='test'></div>";
@@ -3561,22 +4179,25 @@ if ( document.querySelectorAll ) {
}
Expr.order.splice(1, 0, "CLASS");
- Expr.find.CLASS = function(match, context, isXML) {
+ Expr.find.CLASS = function( match, context, isXML ) {
if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
return context.getElementsByClassName(match[1]);
}
};
- div = null; // release memory in IE
+ // release memory in IE
+ div = null;
})();
function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
for ( var i = 0, l = checkSet.length; i < l; i++ ) {
var elem = checkSet[i];
+
if ( elem ) {
- elem = elem[dir];
var match = false;
+ elem = elem[dir];
+
while ( elem ) {
if ( elem.sizcache === doneName ) {
match = checkSet[elem.sizset];
@@ -3604,9 +4225,11 @@ function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
for ( var i = 0, l = checkSet.length; i < l; i++ ) {
var elem = checkSet[i];
+
if ( elem ) {
- elem = elem[dir];
var match = false;
+
+ elem = elem[dir];
while ( elem ) {
if ( elem.sizcache === doneName ) {
@@ -3619,6 +4242,7 @@ function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
elem.sizcache = doneName;
elem.sizset = i;
}
+
if ( typeof cur !== "string" ) {
if ( elem === cur ) {
match = true;
@@ -3639,21 +4263,34 @@ function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
}
}
-var contains = document.compareDocumentPosition ? function(a, b){
- return !!(a.compareDocumentPosition(b) & 16);
-} : function(a, b){
- return a !== b && (a.contains ? a.contains(b) : true);
-};
+if ( document.documentElement.contains ) {
+ Sizzle.contains = function( a, b ) {
+ return a !== b && (a.contains ? a.contains(b) : true);
+ };
-var isXML = function(elem){
+} else if ( document.documentElement.compareDocumentPosition ) {
+ Sizzle.contains = function( a, b ) {
+ return !!(a.compareDocumentPosition(b) & 16);
+ };
+
+} else {
+ Sizzle.contains = function() {
+ return false;
+ };
+}
+
+Sizzle.isXML = function( elem ) {
// documentElement is verified for cases where it doesn't yet exist
// (such as loading iframes in IE - #4833)
var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
+
return documentElement ? documentElement.nodeName !== "HTML" : false;
};
-var posProcess = function(selector, context){
- var tmpSet = [], later = "", match,
+var posProcess = function( selector, context ) {
+ var match,
+ tmpSet = [],
+ later = "",
root = context.nodeType ? [context] : context;
// Position selectors must be done after the filter
@@ -3677,53 +4314,26 @@ jQuery.find = Sizzle;
jQuery.expr = Sizzle.selectors;
jQuery.expr[":"] = jQuery.expr.filters;
jQuery.unique = Sizzle.uniqueSort;
-jQuery.text = getText;
-jQuery.isXMLDoc = isXML;
-jQuery.contains = contains;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
-return;
-
-window.Sizzle = Sizzle;
})();
+
+
var runtil = /Until$/,
rparentsprev = /^(?:parents|prevUntil|prevAll)/,
// Note: This RegExp should be improved, or likely pulled from Sizzle
rmultiselector = /,/,
- slice = Array.prototype.slice;
-
-// Implement the identical functionality for filter and not
-var winnow = function( elements, qualifier, keep ) {
- if ( jQuery.isFunction( qualifier ) ) {
- return jQuery.grep(elements, function( elem, i ) {
- return !!qualifier.call( elem, i, elem ) === keep;
- });
-
- } else if ( qualifier.nodeType ) {
- return jQuery.grep(elements, function( elem, i ) {
- return (elem === qualifier) === keep;
- });
-
- } else if ( typeof qualifier === "string" ) {
- var filtered = jQuery.grep(elements, function( elem ) {
- return elem.nodeType === 1;
- });
-
- if ( isSimple.test( qualifier ) ) {
- return jQuery.filter(qualifier, filtered, !keep);
- } else {
- qualifier = jQuery.filter( qualifier, filtered );
- }
- }
-
- return jQuery.grep(elements, function( elem, i ) {
- return (jQuery.inArray( elem, qualifier ) >= 0) === keep;
- });
-};
+ isSimple = /^.[^:#\[\.,]*$/,
+ slice = Array.prototype.slice,
+ POS = jQuery.expr.match.POS;
jQuery.fn.extend({
find: function( selector ) {
- var ret = this.pushStack( "", "find", selector ), length = 0;
+ var ret = this.pushStack( "", "find", selector ),
+ length = 0;
for ( var i = 0, l = this.length; i < l; i++ ) {
length = ret.length;
@@ -3769,11 +4379,15 @@ jQuery.fn.extend({
},
closest: function( selectors, context ) {
+ var ret = [], i, l, cur = this[0];
+
if ( jQuery.isArray( selectors ) ) {
- var ret = [], cur = this[0], match, matches = {}, selector;
+ var match, selector,
+ matches = {},
+ level = 1;
if ( cur && selectors.length ) {
- for ( var i = 0, l = selectors.length; i < l; i++ ) {
+ for ( i = 0, l = selectors.length; i < l; i++ ) {
selector = selectors[i];
if ( !matches[selector] ) {
@@ -3788,29 +4402,41 @@ jQuery.fn.extend({
match = matches[selector];
if ( match.jquery ? match.index(cur) > -1 : jQuery(cur).is(match) ) {
- ret.push({ selector: selector, elem: cur });
- delete matches[selector];
+ ret.push({ selector: selector, elem: cur, level: level });
}
}
+
cur = cur.parentNode;
+ level++;
}
}
return ret;
}
- var pos = jQuery.expr.match.POS.test( selectors ) ?
+ var pos = POS.test( selectors ) ?
jQuery( selectors, context || this.context ) : null;
- return this.map(function( i, cur ) {
- while ( cur && cur.ownerDocument && cur !== context ) {
- if ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selectors) ) {
- return cur;
+ for ( i = 0, l = this.length; i < l; i++ ) {
+ cur = this[i];
+
+ while ( cur ) {
+ if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
+ ret.push( cur );
+ break;
+
+ } else {
+ cur = cur.parentNode;
+ if ( !cur || !cur.ownerDocument || cur === context ) {
+ break;
+ }
}
- cur = cur.parentNode;
}
- return null;
- });
+ }
+
+ ret = ret.length > 1 ? jQuery.unique(ret) : ret;
+
+ return this.pushStack( ret, "closest", selectors );
},
// Determine the position of an element within
@@ -3918,11 +4544,15 @@ jQuery.extend({
expr = ":not(" + expr + ")";
}
- return jQuery.find.matches(expr, elems);
+ return elems.length === 1 ?
+ jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
+ jQuery.find.matches(expr, elems);
},
dir: function( elem, dir, until ) {
- var matched = [], cur = elem[dir];
+ var matched = [],
+ cur = elem[ dir ];
+
while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
if ( cur.nodeType === 1 ) {
matched.push( cur );
@@ -3957,20 +4587,50 @@ jQuery.extend({
return r;
}
});
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, keep ) {
+ if ( jQuery.isFunction( qualifier ) ) {
+ return jQuery.grep(elements, function( elem, i ) {
+ var retVal = !!qualifier.call( elem, i, elem );
+ return retVal === keep;
+ });
+
+ } else if ( qualifier.nodeType ) {
+ return jQuery.grep(elements, function( elem, i ) {
+ return (elem === qualifier) === keep;
+ });
+
+ } else if ( typeof qualifier === "string" ) {
+ var filtered = jQuery.grep(elements, function( elem ) {
+ return elem.nodeType === 1;
+ });
+
+ if ( isSimple.test( qualifier ) ) {
+ return jQuery.filter(qualifier, filtered, !keep);
+ } else {
+ qualifier = jQuery.filter( qualifier, filtered );
+ }
+ }
+
+ return jQuery.grep(elements, function( elem, i ) {
+ return (jQuery.inArray( elem, qualifier ) >= 0) === keep;
+ });
+}
+
+
+
+
var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
rleadingWhitespace = /^\s+/,
- rxhtmlTag = /(<([\w:]+)[^>]*?)\/>/g,
- rselfClosing = /^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,
+ rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
rtagName = /<([\w:]+)/,
rtbody = /<tbody/i,
rhtml = /<|&#?\w+;/,
- rnocache = /<script|<object|<embed|<option|<style/i,
- rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, // checked="checked" or checked (html5)
- fcloseTag = function( all, front, tag ) {
- return rselfClosing.test( tag ) ?
- all :
- front + "></" + tag + ">";
- },
+ rnocache = /<(?:script|object|embed|option|style)/i,
+ // checked="checked" or checked (html5)
+ rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
+ raction = /\=([^="'>\s]+\/)>/g,
wrapMap = {
option: [ 1, "<select multiple='multiple'>", "</select>" ],
legend: [ 1, "<fieldset>", "</fieldset>" ],
@@ -3995,7 +4655,8 @@ jQuery.fn.extend({
text: function( text ) {
if ( jQuery.isFunction(text) ) {
return this.each(function(i) {
- var self = jQuery(this);
+ var self = jQuery( this );
+
self.text( text.call(this, i, self.text()) );
});
}
@@ -4044,7 +4705,8 @@ jQuery.fn.extend({
}
return this.each(function() {
- var self = jQuery( this ), contents = self.contents();
+ var self = jQuery( this ),
+ contents = self.contents();
if ( contents.length ) {
contents.wrapAll( html );
@@ -4155,7 +4817,9 @@ jQuery.fn.extend({
// attributes in IE that are actually only stored
// as properties will not be copied (such as the
// the name attribute on an input).
- var html = this.outerHTML, ownerDocument = this.ownerDocument;
+ var html = this.outerHTML,
+ ownerDocument = this.ownerDocument;
+
if ( !html ) {
var div = ownerDocument.createElement("div");
div.appendChild( this.cloneNode(true) );
@@ -4164,7 +4828,7 @@ jQuery.fn.extend({
return jQuery.clean([html.replace(rinlinejQuery, "")
// Handle the case in IE 8 where action=/test/> self-closes a tag
- .replace(/=([^="'>\s]+\/)>/g, '="$1">')
+ .replace(raction, '="$1">')
.replace(rleadingWhitespace, "")], ownerDocument)[0];
} else {
return this.cloneNode(true);
@@ -4192,7 +4856,7 @@ jQuery.fn.extend({
(jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) &&
!wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) {
- value = value.replace(rxhtmlTag, fcloseTag);
+ value = value.replace(rxhtmlTag, "<$1></$2>");
try {
for ( var i = 0, l = this.length; i < l; i++ ) {
@@ -4210,10 +4874,9 @@ jQuery.fn.extend({
} else if ( jQuery.isFunction( value ) ) {
this.each(function(i){
- var self = jQuery(this), old = self.html();
- self.empty().append(function(){
- return value.call( this, i, old );
- });
+ var self = jQuery( this );
+
+ self.html( value.call(this, i, self.html()) );
});
} else {
@@ -4235,13 +4898,14 @@ jQuery.fn.extend({
}
if ( typeof value !== "string" ) {
- value = jQuery(value).detach();
+ value = jQuery( value ).detach();
}
return this.each(function() {
- var next = this.nextSibling, parent = this.parentNode;
+ var next = this.nextSibling,
+ parent = this.parentNode;
- jQuery(this).remove();
+ jQuery( this ).remove();
if ( next ) {
jQuery(next).before( value );
@@ -4259,7 +4923,9 @@ jQuery.fn.extend({
},
domManip: function( args, table, callback ) {
- var results, first, value = args[0], scripts = [], fragment, parent;
+ var results, first, fragment, parent,
+ value = args[0],
+ scripts = [];
// We can't cloneNode fragments that contain checked, in WebKit
if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) {
@@ -4284,7 +4950,7 @@ jQuery.fn.extend({
results = { fragment: parent };
} else {
- results = buildFragment( args, this, scripts );
+ results = jQuery.buildFragment( args, this, scripts );
}
fragment = results.fragment;
@@ -4316,16 +4982,16 @@ jQuery.fn.extend({
}
return this;
-
- function root( elem, cur ) {
- return jQuery.nodeName(elem, "table") ?
- (elem.getElementsByTagName("tbody")[0] ||
- elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
- elem;
- }
}
});
+function root( elem, cur ) {
+ return jQuery.nodeName(elem, "table") ?
+ (elem.getElementsByTagName("tbody")[0] ||
+ elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
+ elem;
+}
+
function cloneCopyEvent(orig, ret) {
var i = 0;
@@ -4334,7 +5000,9 @@ function cloneCopyEvent(orig, ret) {
return;
}
- var oldData = jQuery.data( orig[i++] ), curData = jQuery.data( this, oldData ), events = oldData && oldData.events;
+ var oldData = jQuery.data( orig[i++] ),
+ curData = jQuery.data( this, oldData ),
+ events = oldData && oldData.events;
if ( events ) {
delete curData.handle;
@@ -4349,7 +5017,7 @@ function cloneCopyEvent(orig, ret) {
});
}
-function buildFragment( args, nodes, scripts ) {
+jQuery.buildFragment = function( args, nodes, scripts ) {
var fragment, cacheable, cacheresults,
doc = (nodes && nodes[0] ? nodes[0].ownerDocument || nodes[0] : document);
@@ -4379,7 +5047,7 @@ function buildFragment( args, nodes, scripts ) {
}
return { fragment: fragment, cacheable: cacheable };
-}
+};
jQuery.fragments = {};
@@ -4391,7 +5059,8 @@ jQuery.each({
replaceAll: "replaceWith"
}, function( name, original ) {
jQuery.fn[ name ] = function( selector ) {
- var ret = [], insert = jQuery( selector ),
+ var ret = [],
+ insert = jQuery( selector ),
parent = this.length === 1 && this[0].parentNode;
if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
@@ -4401,7 +5070,7 @@ jQuery.each({
} else {
for ( var i = 0, l = insert.length; i < l; i++ ) {
var elems = (i > 0 ? this.clone(true) : this).get();
- jQuery.fn[ original ].apply( jQuery(insert[i]), elems );
+ jQuery( insert[i] )[ original ]( elems );
ret = ret.concat( elems );
}
@@ -4436,7 +5105,7 @@ jQuery.extend({
} else if ( typeof elem === "string" ) {
// Fix "XHTML"-style tags in all browsers
- elem = elem.replace(rxhtmlTag, fcloseTag);
+ elem = elem.replace(rxhtmlTag, "<$1></$2>");
// Trim whitespace, otherwise indexOf won't work as expected
var tag = (rtagName.exec( elem ) || ["", ""])[1].toLowerCase(),
@@ -4489,7 +5158,7 @@ jQuery.extend({
}
if ( fragment ) {
- for ( var i = 0; ret[i]; i++ ) {
+ for ( i = 0; ret[i]; i++ ) {
if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
@@ -4511,18 +5180,22 @@ jQuery.extend({
deleteExpando = jQuery.support.deleteExpando;
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+ if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
+ continue;
+ }
+
id = elem[ jQuery.expando ];
if ( id ) {
data = cache[ id ];
- if ( data.events ) {
+ if ( data && data.events ) {
for ( var type in data.events ) {
if ( special[ type ] ) {
jQuery.event.remove( elem, type );
} else {
- removeEvent( elem, type, data.handle );
+ jQuery.removeEvent( elem, type, data.handle );
}
}
}
@@ -4539,252 +5212,379 @@ jQuery.extend({
}
}
});
-// exclude the following css properties to add px
-var rexclude = /z-?index|font-?weight|opacity|zoom|line-?height/i,
- ralpha = /alpha\([^)]*\)/,
+
+function evalScript( i, elem ) {
+ if ( elem.src ) {
+ jQuery.ajax({
+ url: elem.src,
+ async: false,
+ dataType: "script"
+ });
+ } else {
+ jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" );
+ }
+
+ if ( elem.parentNode ) {
+ elem.parentNode.removeChild( elem );
+ }
+}
+
+
+
+
+var ralpha = /alpha\([^)]*\)/i,
ropacity = /opacity=([^)]*)/,
- rfloat = /float/i,
rdashAlpha = /-([a-z])/ig,
rupper = /([A-Z])/g,
rnumpx = /^-?\d+(?:px)?$/i,
rnum = /^-?\d/,
- cssShow = { position: "absolute", visibility: "hidden", display:"block" },
+ cssShow = { position: "absolute", visibility: "hidden", display: "block" },
cssWidth = [ "Left", "Right" ],
cssHeight = [ "Top", "Bottom" ],
+ curCSS,
+
+ getComputedStyle,
+ currentStyle,
- // cache check for defaultView.getComputedStyle
- getComputedStyle = document.defaultView && document.defaultView.getComputedStyle,
- // normalize float css property
- styleFloat = jQuery.support.cssFloat ? "cssFloat" : "styleFloat",
fcamelCase = function( all, letter ) {
return letter.toUpperCase();
};
jQuery.fn.css = function( name, value ) {
- return access( this, name, value, true, function( elem, name, value ) {
- if ( value === undefined ) {
- return jQuery.curCSS( elem, name );
- }
-
- if ( typeof value === "number" && !rexclude.test(name) ) {
- value += "px";
- }
+ // Setting 'undefined' is a no-op
+ if ( arguments.length === 2 && value === undefined ) {
+ return this;
+ }
- jQuery.style( elem, name, value );
+ return jQuery.access( this, name, value, true, function( elem, name, value ) {
+ return value !== undefined ?
+ jQuery.style( elem, name, value ) :
+ jQuery.css( elem, name );
});
};
jQuery.extend({
- style: function( elem, name, value ) {
- // don't set styles on text and comment nodes
- if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) {
- return undefined;
+ // Add in style property hooks for overriding the default
+ // behavior of getting and setting a style property
+ cssHooks: {
+ opacity: {
+ get: function( elem, computed ) {
+ if ( computed ) {
+ // We should always get a number back from opacity
+ var ret = curCSS( elem, "opacity", "opacity" );
+ return ret === "" ? "1" : ret;
+
+ } else {
+ return elem.style.opacity;
+ }
+ }
}
+ },
+
+ // Exclude the following css properties to add px
+ cssNumber: {
+ "zIndex": true,
+ "fontWeight": true,
+ "opacity": true,
+ "zoom": true,
+ "lineHeight": true
+ },
+
+ // Add in properties whose names you wish to fix before
+ // setting or getting the value
+ cssProps: {
+ // normalize float css property
+ "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
+ },
- // ignore negative width and height values #1599
- if ( (name === "width" || name === "height") && parseFloat(value) < 0 ) {
- value = undefined;
+ // Get and set the style property on a DOM Node
+ style: function( elem, name, value, extra ) {
+ // Don't set styles on text and comment nodes
+ if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
+ return;
}
- var style = elem.style || elem, set = value !== undefined;
+ // Make sure that we're working with the right name
+ var ret, origName = jQuery.camelCase( name ),
+ style = elem.style, hooks = jQuery.cssHooks[ origName ];
- // IE uses filters for opacity
- if ( !jQuery.support.opacity && name === "opacity" ) {
- if ( set ) {
- // IE has trouble with opacity if it does not have layout
- // Force it by setting the zoom level
- style.zoom = 1;
+ name = jQuery.cssProps[ origName ] || origName;
- // Set the alpha filter to set the opacity
- var opacity = parseInt( value, 10 ) + "" === "NaN" ? "" : "alpha(opacity=" + value * 100 + ")";
- var filter = style.filter || jQuery.curCSS( elem, "filter" ) || "";
- style.filter = ralpha.test(filter) ? filter.replace(ralpha, opacity) : opacity;
+ // Check if we're setting a value
+ if ( value !== undefined ) {
+ // Make sure that NaN and null values aren't set. See: #7116
+ if ( typeof value === "number" && isNaN( value ) || value == null ) {
+ return;
}
- return style.filter && style.filter.indexOf("opacity=") >= 0 ?
- (parseFloat( ropacity.exec(style.filter)[1] ) / 100) + "":
- "";
+ // If a number was passed in, add 'px' to the (except for certain CSS properties)
+ if ( typeof value === "number" && !jQuery.cssNumber[ origName ] ) {
+ value += "px";
+ }
+
+ // If a hook was provided, use that value, otherwise just set the specified value
+ if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value )) !== undefined ) {
+ // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
+ // Fixes bug #5509
+ try {
+ style[ name ] = value;
+ } catch(e) {}
+ }
+
+ } else {
+ // If a hook was provided get the non-computed value from there
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
+ return ret;
+ }
+
+ // Otherwise just get the value from the style object
+ return style[ name ];
}
+ },
+
+ css: function( elem, name, extra ) {
+ // Make sure that we're working with the right name
+ var ret, origName = jQuery.camelCase( name ),
+ hooks = jQuery.cssHooks[ origName ];
- // Make sure we're using the right name for getting the float value
- if ( rfloat.test( name ) ) {
- name = styleFloat;
+ name = jQuery.cssProps[ origName ] || origName;
+
+ // If a hook was provided get the computed value from there
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) {
+ return ret;
+
+ // Otherwise, if a way to get the computed value exists, use that
+ } else if ( curCSS ) {
+ return curCSS( elem, name, origName );
}
+ },
- name = name.replace(rdashAlpha, fcamelCase);
+ // A method for quickly swapping in/out CSS properties to get correct calculations
+ swap: function( elem, options, callback ) {
+ var old = {};
- if ( set ) {
- style[ name ] = value;
+ // Remember the old values, and insert the new ones
+ for ( var name in options ) {
+ old[ name ] = elem.style[ name ];
+ elem.style[ name ] = options[ name ];
}
- return style[ name ];
+ callback.call( elem );
+
+ // Revert the old values
+ for ( name in options ) {
+ elem.style[ name ] = old[ name ];
+ }
},
- css: function( elem, name, force, extra ) {
- if ( name === "width" || name === "height" ) {
- var val, props = cssShow, which = name === "width" ? cssWidth : cssHeight;
+ camelCase: function( string ) {
+ return string.replace( rdashAlpha, fcamelCase );
+ }
+});
- function getWH() {
- val = name === "width" ? elem.offsetWidth : elem.offsetHeight;
+// DEPRECATED, Use jQuery.css() instead
+jQuery.curCSS = jQuery.css;
- if ( extra === "border" ) {
- return;
+jQuery.each(["height", "width"], function( i, name ) {
+ jQuery.cssHooks[ name ] = {
+ get: function( elem, computed, extra ) {
+ var val;
+
+ if ( computed ) {
+ if ( elem.offsetWidth !== 0 ) {
+ val = getWH( elem, name, extra );
+
+ } else {
+ jQuery.swap( elem, cssShow, function() {
+ val = getWH( elem, name, extra );
+ });
}
- jQuery.each( which, function() {
- if ( !extra ) {
- val -= parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0;
+ if ( val <= 0 ) {
+ val = curCSS( elem, name, name );
+
+ if ( val === "0px" && currentStyle ) {
+ val = currentStyle( elem, name, name );
}
- if ( extra === "margin" ) {
- val += parseFloat(jQuery.curCSS( elem, "margin" + this, true)) || 0;
- } else {
- val -= parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0;
+ if ( val != null ) {
+ // Should return "auto" instead of 0, use 0 for
+ // temporary backwards-compat
+ return val === "" || val === "auto" ? "0px" : val;
}
- });
- }
+ }
- if ( elem.offsetWidth !== 0 ) {
- getWH();
- } else {
- jQuery.swap( elem, props, getWH );
- }
+ if ( val < 0 || val == null ) {
+ val = elem.style[ name ];
- return Math.max(0, Math.round(val));
- }
+ // Should return "auto" instead of 0, use 0 for
+ // temporary backwards-compat
+ return val === "" || val === "auto" ? "0px" : val;
+ }
- return jQuery.curCSS( elem, name, force );
- },
+ return typeof val === "string" ? val : val + "px";
+ }
+ },
- curCSS: function( elem, name, force ) {
- var ret, style = elem.style, filter;
+ set: function( elem, value ) {
+ if ( rnumpx.test( value ) ) {
+ // ignore negative width and height values #1599
+ value = parseFloat(value);
- // IE uses filters for opacity
- if ( !jQuery.support.opacity && name === "opacity" && elem.currentStyle ) {
- ret = ropacity.test(elem.currentStyle.filter || "") ?
- (parseFloat(RegExp.$1) / 100) + "" :
- "";
-
- return ret === "" ?
- "1" :
- ret;
- }
+ if ( value >= 0 ) {
+ return value + "px";
+ }
- // Make sure we're using the right name for getting the float value
- if ( rfloat.test( name ) ) {
- name = styleFloat;
+ } else {
+ return value;
+ }
}
+ };
+});
- if ( !force && style && style[ name ] ) {
- ret = style[ name ];
+if ( !jQuery.support.opacity ) {
+ jQuery.cssHooks.opacity = {
+ get: function( elem, computed ) {
+ // IE uses filters for opacity
+ return ropacity.test((computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "") ?
+ (parseFloat(RegExp.$1) / 100) + "" :
+ computed ? "1" : "";
+ },
- } else if ( getComputedStyle ) {
+ set: function( elem, value ) {
+ var style = elem.style;
- // Only "float" is needed here
- if ( rfloat.test( name ) ) {
- name = "float";
- }
+ // IE has trouble with opacity if it does not have layout
+ // Force it by setting the zoom level
+ style.zoom = 1;
- name = name.replace( rupper, "-$1" ).toLowerCase();
+ // Set the alpha filter to set the opacity
+ var opacity = jQuery.isNaN(value) ?
+ "" :
+ "alpha(opacity=" + value * 100 + ")",
+ filter = style.filter || "";
- var defaultView = elem.ownerDocument.defaultView;
+ style.filter = ralpha.test(filter) ?
+ filter.replace(ralpha, opacity) :
+ style.filter + ' ' + opacity;
+ }
+ };
+}
- if ( !defaultView ) {
- return null;
- }
+if ( document.defaultView && document.defaultView.getComputedStyle ) {
+ getComputedStyle = function( elem, newName, name ) {
+ var ret, defaultView, computedStyle;
- var computedStyle = defaultView.getComputedStyle( elem, null );
+ name = name.replace( rupper, "-$1" ).toLowerCase();
- if ( computedStyle ) {
- ret = computedStyle.getPropertyValue( name );
- }
+ if ( !(defaultView = elem.ownerDocument.defaultView) ) {
+ return undefined;
+ }
- // We should always get a number back from opacity
- if ( name === "opacity" && ret === "" ) {
- ret = "1";
+ if ( (computedStyle = defaultView.getComputedStyle( elem, null )) ) {
+ ret = computedStyle.getPropertyValue( name );
+ if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
+ ret = jQuery.style( elem, name );
}
+ }
- } else if ( elem.currentStyle ) {
- var camelCase = name.replace(rdashAlpha, fcamelCase);
+ return ret;
+ };
+}
- ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ];
+if ( document.documentElement.currentStyle ) {
+ currentStyle = function( elem, name ) {
+ var left, rsLeft,
+ ret = elem.currentStyle && elem.currentStyle[ name ],
+ style = elem.style;
- // From the awesome hack by Dean Edwards
- // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
+ // From the awesome hack by Dean Edwards
+ // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
- // If we're not dealing with a regular pixel number
- // but a number that has a weird ending, we need to convert it to pixels
- if ( !rnumpx.test( ret ) && rnum.test( ret ) ) {
- // Remember the original values
- var left = style.left, rsLeft = elem.runtimeStyle.left;
+ // If we're not dealing with a regular pixel number
+ // but a number that has a weird ending, we need to convert it to pixels
+ if ( !rnumpx.test( ret ) && rnum.test( ret ) ) {
+ // Remember the original values
+ left = style.left;
+ rsLeft = elem.runtimeStyle.left;
- // Put in the new values to get a computed value out
- elem.runtimeStyle.left = elem.currentStyle.left;
- style.left = camelCase === "fontSize" ? "1em" : (ret || 0);
- ret = style.pixelLeft + "px";
+ // Put in the new values to get a computed value out
+ elem.runtimeStyle.left = elem.currentStyle.left;
+ style.left = name === "fontSize" ? "1em" : (ret || 0);
+ ret = style.pixelLeft + "px";
- // Revert the changed values
- style.left = left;
- elem.runtimeStyle.left = rsLeft;
- }
+ // Revert the changed values
+ style.left = left;
+ elem.runtimeStyle.left = rsLeft;
}
- return ret;
- },
+ return ret === "" ? "auto" : ret;
+ };
+}
- // A method for quickly swapping in/out CSS properties to get correct calculations
- swap: function( elem, options, callback ) {
- var old = {};
+curCSS = getComputedStyle || currentStyle;
- // Remember the old values, and insert the new ones
- for ( var name in options ) {
- old[ name ] = elem.style[ name ];
- elem.style[ name ] = options[ name ];
+function getWH( elem, name, extra ) {
+ var which = name === "width" ? cssWidth : cssHeight,
+ val = name === "width" ? elem.offsetWidth : elem.offsetHeight;
+
+ if ( extra === "border" ) {
+ return val;
+ }
+
+ jQuery.each( which, function() {
+ if ( !extra ) {
+ val -= parseFloat(jQuery.css( elem, "padding" + this )) || 0;
}
- callback.call( elem );
+ if ( extra === "margin" ) {
+ val += parseFloat(jQuery.css( elem, "margin" + this )) || 0;
- // Revert the old values
- for ( var name in options ) {
- elem.style[ name ] = old[ name ];
+ } else {
+ val -= parseFloat(jQuery.css( elem, "border" + this + "Width" )) || 0;
}
- }
-});
+ });
+
+ return val;
+}
if ( jQuery.expr && jQuery.expr.filters ) {
jQuery.expr.filters.hidden = function( elem ) {
- var width = elem.offsetWidth, height = elem.offsetHeight,
- skip = elem.nodeName.toLowerCase() === "tr";
-
- return width === 0 && height === 0 && !skip ?
- true :
- width > 0 && height > 0 && !skip ?
- false :
- jQuery.curCSS(elem, "display") === "none";
+ var width = elem.offsetWidth,
+ height = elem.offsetHeight;
+
+ return (width === 0 && height === 0) || (!jQuery.support.reliableHiddenOffsets && (elem.style.display || jQuery.css( elem, "display" )) === "none");
};
jQuery.expr.filters.visible = function( elem ) {
return !jQuery.expr.filters.hidden( elem );
};
}
-var jsc = now(),
- rscript = /<script(.|\s)*?\/script>/gi,
- rselectTextarea = /select|textarea/i,
- rinput = /color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,
- jsre = /=\?(&|$)/,
+
+
+
+
+var jsc = jQuery.now(),
+ rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
+ rselectTextarea = /^(?:select|textarea)/i,
+ rinput = /^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
+ rnoContent = /^(?:GET|HEAD)$/,
+ rbracket = /\[\]$/,
+ jsre = /\=\?(&|$)/,
rquery = /\?/,
- rts = /(\?|&)_=.*?(&|$)/,
+ rts = /([?&])_=[^&]*/,
rurl = /^(\w+:)?\/\/([^\/?#]+)/,
r20 = /%20/g,
+ rhash = /#.*$/,
// Keep a copy of the old load method
_load = jQuery.fn.load;
jQuery.fn.extend({
load: function( url, params, callback ) {
- if ( typeof url !== "string" ) {
- return _load.call( this, url );
+ if ( typeof url !== "string" && _load ) {
+ return _load.apply( this, arguments );
// Don't do a request if no elements are being requested
} else if ( !this.length ) {
@@ -4829,7 +5629,7 @@ jQuery.fn.extend({
// See if a selector was specified
self.html( selector ?
// Create a dummy div to hold the results
- jQuery("<div />")
+ jQuery("<div>")
// inject the contents of the document in, removing the scripts
// to avoid any 'Permission Denied' errors in IE
.append(res.responseText.replace(rscript, ""))
@@ -4853,6 +5653,7 @@ jQuery.fn.extend({
serialize: function() {
return jQuery.param(this.serializeArray());
},
+
serializeArray: function() {
return this.map(function() {
return this.elements ? jQuery.makeArray(this.elements) : this;
@@ -4884,7 +5685,6 @@ jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".sp
});
jQuery.extend({
-
get: function( url, data, callback, type ) {
// shift arguments if data argument was omited
if ( jQuery.isFunction( data ) ) {
@@ -4945,19 +5745,10 @@ jQuery.extend({
password: null,
traditional: false,
*/
- // Create the request object; Microsoft failed to properly
- // implement the XMLHttpRequest in IE7 (can't request local files),
- // so we use the ActiveXObject when it is available
// This function can be overriden by calling jQuery.ajaxSetup
- xhr: window.XMLHttpRequest && (window.location.protocol !== "file:" || !window.ActiveXObject) ?
- function() {
- return new window.XMLHttpRequest();
- } :
- function() {
- try {
- return new window.ActiveXObject("Microsoft.XMLHTTP");
- } catch(e) {}
- },
+ xhr: function() {
+ return new window.XMLHttpRequest();
+ },
accepts: {
xml: "application/xml, text/xml",
html: "text/html",
@@ -4968,16 +5759,14 @@ jQuery.extend({
}
},
- // Last-Modified header cache for next request
- lastModified: {},
- etag: {},
-
ajax: function( origSettings ) {
- var s = jQuery.extend(true, {}, jQuery.ajaxSettings, origSettings);
-
- var jsonp, status, data,
- callbackContext = origSettings && origSettings.context || s,
- type = s.type.toUpperCase();
+ var s = jQuery.extend(true, {}, jQuery.ajaxSettings, origSettings),
+ jsonp, status, data, type = s.type.toUpperCase(), noContent = rnoContent.test(type);
+
+ s.url = s.url.replace( rhash, "" );
+
+ // Use original (not extended) context object if it was provided
+ s.context = origSettings && origSettings.context != null ? origSettings.context : s;
// convert data if not already a string
if ( s.data && s.processData && typeof s.data !== "string" ) {
@@ -5012,17 +5801,25 @@ jQuery.extend({
s.dataType = "script";
// Handle JSONP-style loading
- window[ jsonp ] = window[ jsonp ] || function( tmp ) {
- data = tmp;
- success();
- complete();
- // Garbage collect
- window[ jsonp ] = undefined;
+ var customJsonp = window[ jsonp ];
- try {
- delete window[ jsonp ];
- } catch(e) {}
+ window[ jsonp ] = function( tmp ) {
+ if ( jQuery.isFunction( customJsonp ) ) {
+ customJsonp( tmp );
+
+ } else {
+ // Garbage collect
+ window[ jsonp ] = undefined;
+
+ try {
+ delete window[ jsonp ];
+ } catch( jsonpError ) {}
+ }
+ data = tmp;
+ jQuery.handleSuccess( s, xhr, status, data );
+ jQuery.handleComplete( s, xhr, status, data );
+
if ( head ) {
head.removeChild( script );
}
@@ -5033,39 +5830,39 @@ jQuery.extend({
s.cache = false;
}
- if ( s.cache === false && type === "GET" ) {
- var ts = now();
+ if ( s.cache === false && noContent ) {
+ var ts = jQuery.now();
// try replacing _= if it is there
- var ret = s.url.replace(rts, "$1_=" + ts + "$2");
+ var ret = s.url.replace(rts, "$1_=" + ts);
// if nothing was replaced, add timestamp to the end
s.url = ret + ((ret === s.url) ? (rquery.test(s.url) ? "&" : "?") + "_=" + ts : "");
}
- // If data is available, append data to url for get requests
- if ( s.data && type === "GET" ) {
+ // If data is available, append data to url for GET/HEAD requests
+ if ( s.data && noContent ) {
s.url += (rquery.test(s.url) ? "&" : "?") + s.data;
}
// Watch for a new set of requests
- if ( s.global && ! jQuery.active++ ) {
+ if ( s.global && jQuery.active++ === 0 ) {
jQuery.event.trigger( "ajaxStart" );
}
// Matches an absolute URL, and saves the domain
var parts = rurl.exec( s.url ),
- remote = parts && (parts[1] && parts[1] !== location.protocol || parts[2] !== location.host);
+ remote = parts && (parts[1] && parts[1].toLowerCase() !== location.protocol || parts[2].toLowerCase() !== location.host);
// If we're requesting a remote document
// and trying to load JSON or Script with a GET
if ( s.dataType === "script" && type === "GET" && remote ) {
var head = document.getElementsByTagName("head")[0] || document.documentElement;
var script = document.createElement("script");
- script.src = s.url;
if ( s.scriptCharset ) {
script.charset = s.scriptCharset;
}
+ script.src = s.url;
// Handle Script loading
if ( !jsonp ) {
@@ -5076,8 +5873,8 @@ jQuery.extend({
if ( !done && (!this.readyState ||
this.readyState === "loaded" || this.readyState === "complete") ) {
done = true;
- success();
- complete();
+ jQuery.handleSuccess( s, xhr, status, data );
+ jQuery.handleComplete( s, xhr, status, data );
// Handle memory leak in IE
script.onload = script.onreadystatechange = null;
@@ -5115,8 +5912,8 @@ jQuery.extend({
// Need an extra try/catch for cross domain requests in Firefox 3
try {
- // Set the correct header, if data is being sent
- if ( s.data || origSettings && origSettings.contentType ) {
+ // Set content-type if data specified and content-body is valid for this type
+ if ( (s.data != null && !noContent) || (origSettings && origSettings.contentType) ) {
xhr.setRequestHeader("Content-Type", s.contentType);
}
@@ -5139,14 +5936,14 @@ jQuery.extend({
// Set the Accepts header for the server, depending on the dataType
xhr.setRequestHeader("Accept", s.dataType && s.accepts[ s.dataType ] ?
- s.accepts[ s.dataType ] + ", */*" :
+ s.accepts[ s.dataType ] + ", */*; q=0.01" :
s.accepts._default );
- } catch(e) {}
+ } catch( headerError ) {}
// Allow custom headers/mimetypes and early abort
- if ( s.beforeSend && s.beforeSend.call(callbackContext, xhr, s) === false ) {
+ if ( s.beforeSend && s.beforeSend.call(s.context, xhr, s) === false ) {
// Handle the global AJAX counter
- if ( s.global && ! --jQuery.active ) {
+ if ( s.global && jQuery.active-- === 1 ) {
jQuery.event.trigger( "ajaxStop" );
}
@@ -5156,7 +5953,7 @@ jQuery.extend({
}
if ( s.global ) {
- trigger("ajaxSend", [xhr, s]);
+ jQuery.triggerGlobal( s, "ajaxSend", [xhr, s] );
}
// Wait for a response to come back
@@ -5166,7 +5963,7 @@ jQuery.extend({
// Opera doesn't call onreadystatechange before this point
// so we simulate the call
if ( !requestDone ) {
- complete();
+ jQuery.handleComplete( s, xhr, status, data );
}
requestDone = true;
@@ -5194,9 +5991,9 @@ jQuery.extend({
try {
// process the data (runs the xml through httpData regardless of callback)
data = jQuery.httpData( xhr, s.dataType, s );
- } catch(err) {
+ } catch( parserError ) {
status = "parsererror";
- errMsg = err;
+ errMsg = parserError;
}
}
@@ -5204,14 +6001,16 @@ jQuery.extend({
if ( status === "success" || status === "notmodified" ) {
// JSONP handles its own success callback
if ( !jsonp ) {
- success();
+ jQuery.handleSuccess( s, xhr, status, data );
}
} else {
- jQuery.handleError(s, xhr, status, errMsg);
+ jQuery.handleError( s, xhr, status, errMsg );
}
// Fire the complete handlers
- complete();
+ if ( !jsonp ) {
+ jQuery.handleComplete( s, xhr, status, data );
+ }
if ( isTimeout === "timeout" ) {
xhr.abort();
@@ -5224,18 +6023,21 @@ jQuery.extend({
}
};
- // Override the abort handler, if we can (IE doesn't allow it, but that's OK)
+ // Override the abort handler, if we can (IE 6 doesn't allow it, but that's OK)
// Opera doesn't fire onreadystatechange at all on abort
try {
var oldAbort = xhr.abort;
xhr.abort = function() {
if ( xhr ) {
- oldAbort.call( xhr );
+ // oldAbort has no call property in IE7 so
+ // just do it this way, which works in all
+ // browsers
+ Function.prototype.call.call( oldAbort, xhr );
}
onreadystatechange( "abort" );
};
- } catch(e) { }
+ } catch( abortError ) {}
// Timeout checker
if ( s.async && s.timeout > 0 ) {
@@ -5249,11 +6051,13 @@ jQuery.extend({
// Send the data
try {
- xhr.send( type === "POST" || type === "PUT" || type === "DELETE" ? s.data : null );
- } catch(e) {
- jQuery.handleError(s, xhr, null, e);
+ xhr.send( noContent || s.data == null ? null : s.data );
+
+ } catch( sendError ) {
+ jQuery.handleError( s, xhr, null, sendError );
+
// Fire the complete handlers
- complete();
+ jQuery.handleComplete( s, xhr, status, data );
}
// firefox 1.5 doesn't fire statechange for sync requests
@@ -5261,66 +6065,145 @@ jQuery.extend({
onreadystatechange();
}
- function success() {
- // If a local callback was specified, fire it and pass it the data
- if ( s.success ) {
- s.success.call( callbackContext, data, status, xhr );
- }
+ // return XMLHttpRequest to allow aborting the request etc.
+ return xhr;
+ },
- // Fire the global callback
- if ( s.global ) {
- trigger( "ajaxSuccess", [xhr, s] );
+ // Serialize an array of form elements or a set of
+ // key/values into a query string
+ param: function( a, traditional ) {
+ var s = [],
+ add = function( key, value ) {
+ // If value is a function, invoke it and return its value
+ value = jQuery.isFunction(value) ? value() : value;
+ s[ s.length ] = encodeURIComponent(key) + "=" + encodeURIComponent(value);
+ };
+
+ // Set traditional to true for jQuery <= 1.3.2 behavior.
+ if ( traditional === undefined ) {
+ traditional = jQuery.ajaxSettings.traditional;
+ }
+
+ // If an array was passed in, assume that it is an array of form elements.
+ if ( jQuery.isArray(a) || a.jquery ) {
+ // Serialize the form elements
+ jQuery.each( a, function() {
+ add( this.name, this.value );
+ });
+
+ } else {
+ // If traditional, encode the "old" way (the way 1.3.2 or older
+ // did it), otherwise encode params recursively.
+ for ( var prefix in a ) {
+ buildParams( prefix, a[prefix], traditional, add );
}
}
- function complete() {
- // Process result
- if ( s.complete ) {
- s.complete.call( callbackContext, xhr, status);
- }
+ // Return the resulting serialization
+ return s.join("&").replace(r20, "+");
+ }
+});
- // The request was completed
- if ( s.global ) {
- trigger( "ajaxComplete", [xhr, s] );
- }
+function buildParams( prefix, obj, traditional, add ) {
+ if ( jQuery.isArray(obj) && obj.length ) {
+ // Serialize array item.
+ jQuery.each( obj, function( i, v ) {
+ if ( traditional || rbracket.test( prefix ) ) {
+ // Treat each array item as a scalar.
+ add( prefix, v );
- // Handle the global AJAX counter
- if ( s.global && ! --jQuery.active ) {
- jQuery.event.trigger( "ajaxStop" );
+ } else {
+ // If array item is non-scalar (array or object), encode its
+ // numeric index to resolve deserialization ambiguity issues.
+ // Note that rack (as of 1.0.0) can't currently deserialize
+ // nested arrays properly, and attempting to do so may cause
+ // a server error. Possible fixes are to modify rack's
+ // deserialization algorithm or to provide an option or flag
+ // to force array serialization to be shallow.
+ buildParams( prefix + "[" + ( typeof v === "object" || jQuery.isArray(v) ? i : "" ) + "]", v, traditional, add );
}
+ });
+
+ } else if ( !traditional && obj != null && typeof obj === "object" ) {
+ if ( jQuery.isEmptyObject( obj ) ) {
+ add( prefix, "" );
+
+ // Serialize object item.
+ } else {
+ jQuery.each( obj, function( k, v ) {
+ buildParams( prefix + "[" + k + "]", v, traditional, add );
+ });
}
-
- function trigger(type, args) {
- (s.context ? jQuery(s.context) : jQuery.event).trigger(type, args);
- }
+
+ } else {
+ // Serialize scalar item.
+ add( prefix, obj );
+ }
+}
- // return XMLHttpRequest to allow aborting the request etc.
- return xhr;
- },
+// This is still on the jQuery object... for now
+// Want to move this to jQuery.ajax some day
+jQuery.extend({
+
+ // Counter for holding the number of active queries
+ active: 0,
+
+ // Last-Modified header cache for next request
+ lastModified: {},
+ etag: {},
handleError: function( s, xhr, status, e ) {
// If a local callback was specified, fire it
if ( s.error ) {
- s.error.call( s.context || s, xhr, status, e );
+ s.error.call( s.context, xhr, status, e );
}
// Fire the global callback
if ( s.global ) {
- (s.context ? jQuery(s.context) : jQuery.event).trigger( "ajaxError", [xhr, s, e] );
+ jQuery.triggerGlobal( s, "ajaxError", [xhr, s, e] );
}
},
- // Counter for holding the number of active queries
- active: 0,
+ handleSuccess: function( s, xhr, status, data ) {
+ // If a local callback was specified, fire it and pass it the data
+ if ( s.success ) {
+ s.success.call( s.context, data, status, xhr );
+ }
+
+ // Fire the global callback
+ if ( s.global ) {
+ jQuery.triggerGlobal( s, "ajaxSuccess", [xhr, s] );
+ }
+ },
+
+ handleComplete: function( s, xhr, status ) {
+ // Process result
+ if ( s.complete ) {
+ s.complete.call( s.context, xhr, status );
+ }
+
+ // The request was completed
+ if ( s.global ) {
+ jQuery.triggerGlobal( s, "ajaxComplete", [xhr, s] );
+ }
+
+ // Handle the global AJAX counter
+ if ( s.global && jQuery.active-- === 1 ) {
+ jQuery.event.trigger( "ajaxStop" );
+ }
+ },
+
+ triggerGlobal: function( s, type, args ) {
+ (s.context && s.context.url == null ? jQuery(s.context) : jQuery.event).trigger(type, args);
+ },
// Determines if an XMLHttpRequest was successful or not
httpSuccess: function( xhr ) {
try {
// IE error sometimes returns 1223 when it should be 204 so treat it as success, see #1450
return !xhr.status && location.protocol === "file:" ||
- // Opera returns 0 when status is 304
- ( xhr.status >= 200 && xhr.status < 300 ) ||
- xhr.status === 304 || xhr.status === 1223 || xhr.status === 0;
+ xhr.status >= 200 && xhr.status < 300 ||
+ xhr.status === 304 || xhr.status === 1223;
} catch(e) {}
return false;
@@ -5339,8 +6222,7 @@ jQuery.extend({
jQuery.etag[url] = etag;
}
- // Opera returns 0 when status is 304
- return xhr.status === 304 || xhr.status === 0;
+ return xhr.status === 304;
},
httpData: function( xhr, type, s ) {
@@ -5371,77 +6253,40 @@ jQuery.extend({
}
return data;
- },
+ }
- // Serialize an array of form elements or a set of
- // key/values into a query string
- param: function( a, traditional ) {
- var s = [];
-
- // Set traditional to true for jQuery <= 1.3.2 behavior.
- if ( traditional === undefined ) {
- traditional = jQuery.ajaxSettings.traditional;
- }
-
- // If an array was passed in, assume that it is an array of form elements.
- if ( jQuery.isArray(a) || a.jquery ) {
- // Serialize the form elements
- jQuery.each( a, function() {
- add( this.name, this.value );
- });
-
- } else {
- // If traditional, encode the "old" way (the way 1.3.2 or older
- // did it), otherwise encode params recursively.
- for ( var prefix in a ) {
- buildParams( prefix, a[prefix] );
- }
+});
+
+/*
+ * Create the request object; Microsoft failed to properly
+ * implement the XMLHttpRequest in IE7 (can't request local files),
+ * so we use the ActiveXObject when it is available
+ * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
+ * we need a fallback.
+ */
+if ( window.ActiveXObject ) {
+ jQuery.ajaxSettings.xhr = function() {
+ if ( window.location.protocol !== "file:" ) {
+ try {
+ return new window.XMLHttpRequest();
+ } catch(xhrError) {}
}
- // Return the resulting serialization
- return s.join("&").replace(r20, "+");
+ try {
+ return new window.ActiveXObject("Microsoft.XMLHTTP");
+ } catch(activeError) {}
+ };
+}
+
+// Does this browser support XHR requests?
+jQuery.support.ajax = !!jQuery.ajaxSettings.xhr();
+
+
- function buildParams( prefix, obj ) {
- if ( jQuery.isArray(obj) ) {
- // Serialize array item.
- jQuery.each( obj, function( i, v ) {
- if ( traditional || /\[\]$/.test( prefix ) ) {
- // Treat each array item as a scalar.
- add( prefix, v );
- } else {
- // If array item is non-scalar (array or object), encode its
- // numeric index to resolve deserialization ambiguity issues.
- // Note that rack (as of 1.0.0) can't currently deserialize
- // nested arrays properly, and attempting to do so may cause
- // a server error. Possible fixes are to modify rack's
- // deserialization algorithm or to provide an option or flag
- // to force array serialization to be shallow.
- buildParams( prefix + "[" + ( typeof v === "object" || jQuery.isArray(v) ? i : "" ) + "]", v );
- }
- });
-
- } else if ( !traditional && obj != null && typeof obj === "object" ) {
- // Serialize object item.
- jQuery.each( obj, function( k, v ) {
- buildParams( prefix + "[" + k + "]", v );
- });
-
- } else {
- // Serialize scalar item.
- add( prefix, obj );
- }
- }
- function add( key, value ) {
- // If value is a function, invoke it and return its value
- value = jQuery.isFunction(value) ? value() : value;
- s[ s.length ] = encodeURIComponent(key) + "=" + encodeURIComponent(value);
- }
- }
-});
var elemdisplay = {},
- rfxtypes = /toggle|show|hide/,
- rfxnum = /^([+-]=)?([\d+-.]+)(.*)$/,
+ rfxtypes = /^(?:toggle|show|hide)$/,
+ rfxnum = /^([+\-]=)?([\d+.\-]+)(.*)$/,
timerId,
fxAttrs = [
// height animations
@@ -5453,66 +6298,63 @@ var elemdisplay = {},
];
jQuery.fn.extend({
- show: function( speed, callback ) {
- if ( speed || speed === 0) {
- return this.animate( genFx("show", 3), speed, callback);
-
- } else {
- for ( var i = 0, l = this.length; i < l; i++ ) {
- var old = jQuery.data(this[i], "olddisplay");
+ show: function( speed, easing, callback ) {
+ var elem, display;
- this[i].style.display = old || "";
-
- if ( jQuery.css(this[i], "display") === "none" ) {
- var nodeName = this[i].nodeName, display;
-
- if ( elemdisplay[ nodeName ] ) {
- display = elemdisplay[ nodeName ];
-
- } else {
- var elem = jQuery("<" + nodeName + " />").appendTo("body");
-
- display = elem.css("display");
-
- if ( display === "none" ) {
- display = "block";
- }
-
- elem.remove();
+ if ( speed || speed === 0 ) {
+ return this.animate( genFx("show", 3), speed, easing, callback);
- elemdisplay[ nodeName ] = display;
- }
+ } else {
+ for ( var i = 0, j = this.length; i < j; i++ ) {
+ elem = this[i];
+ display = elem.style.display;
+
+ // Reset the inline display of this element to learn if it is
+ // being hidden by cascaded rules or not
+ if ( !jQuery.data(elem, "olddisplay") && display === "none" ) {
+ display = elem.style.display = "";
+ }
- jQuery.data(this[i], "olddisplay", display);
+ // Set elements which have been overridden with display: none
+ // in a stylesheet to whatever the default browser style is
+ // for such an element
+ if ( display === "" && jQuery.css( elem, "display" ) === "none" ) {
+ jQuery.data(elem, "olddisplay", defaultDisplay(elem.nodeName));
}
}
- // Set the display of the elements in a second loop
+ // Set the display of most of the elements in a second loop
// to avoid the constant reflow
- for ( var j = 0, k = this.length; j < k; j++ ) {
- this[j].style.display = jQuery.data(this[j], "olddisplay") || "";
+ for ( i = 0; i < j; i++ ) {
+ elem = this[i];
+ display = elem.style.display;
+
+ if ( display === "" || display === "none" ) {
+ elem.style.display = jQuery.data(elem, "olddisplay") || "";
+ }
}
return this;
}
},
- hide: function( speed, callback ) {
+ hide: function( speed, easing, callback ) {
if ( speed || speed === 0 ) {
- return this.animate( genFx("hide", 3), speed, callback);
+ return this.animate( genFx("hide", 3), speed, easing, callback);
} else {
- for ( var i = 0, l = this.length; i < l; i++ ) {
- var old = jQuery.data(this[i], "olddisplay");
- if ( !old && old !== "none" ) {
- jQuery.data(this[i], "olddisplay", jQuery.css(this[i], "display"));
+ for ( var i = 0, j = this.length; i < j; i++ ) {
+ var display = jQuery.css( this[i], "display" );
+
+ if ( display !== "none" ) {
+ jQuery.data( this[i], "olddisplay", display );
}
}
// Set the display of the elements in a second loop
// to avoid the constant reflow
- for ( var j = 0, k = this.length; j < k; j++ ) {
- this[j].style.display = "none";
+ for ( i = 0; i < j; i++ ) {
+ this[i].style.display = "none";
}
return this;
@@ -5522,7 +6364,7 @@ jQuery.fn.extend({
// Save the old toggle function
_toggle: jQuery.fn.toggle,
- toggle: function( fn, fn2 ) {
+ toggle: function( fn, fn2, callback ) {
var bool = typeof fn === "boolean";
if ( jQuery.isFunction(fn) && jQuery.isFunction(fn2) ) {
@@ -5535,15 +6377,15 @@ jQuery.fn.extend({
});
} else {
- this.animate(genFx("toggle", 3), fn, fn2);
+ this.animate(genFx("toggle", 3), fn, fn2, callback);
}
return this;
},
- fadeTo: function( speed, to, callback ) {
+ fadeTo: function( speed, to, easing, callback ) {
return this.filter(":hidden").css("opacity", 0).show().end()
- .animate({opacity: to}, speed, callback);
+ .animate({opacity: to}, speed, easing, callback);
},
animate: function( prop, speed, easing, callback ) {
@@ -5554,12 +6396,16 @@ jQuery.fn.extend({
}
return this[ optall.queue === false ? "each" : "queue" ](function() {
+ // XXX 'this' does not always have a nodeName when running the
+ // test suite
+
var opt = jQuery.extend({}, optall), p,
- hidden = this.nodeType === 1 && jQuery(this).is(":hidden"),
+ isElement = this.nodeType === 1,
+ hidden = isElement && jQuery(this).is(":hidden"),
self = this;
for ( p in prop ) {
- var name = p.replace(rdashAlpha, fcamelCase);
+ var name = jQuery.camelCase( p );
if ( p !== name ) {
prop[ name ] = prop[ p ];
@@ -5571,12 +6417,35 @@ jQuery.fn.extend({
return opt.complete.call(this);
}
- if ( ( p === "height" || p === "width" ) && this.style ) {
- // Store display property
- opt.display = jQuery.css(this, "display");
-
+ if ( isElement && ( p === "height" || p === "width" ) ) {
// Make sure that nothing sneaks out
- opt.overflow = this.style.overflow;
+ // Record all 3 overflow attributes because IE does not
+ // change the overflow attribute when overflowX and
+ // overflowY are set to the same value
+ opt.overflow = [ this.style.overflow, this.style.overflowX, this.style.overflowY ];
+
+ // Set display property to inline-block for height/width
+ // animations on inline elements that are having width/height
+ // animated
+ if ( jQuery.css( this, "display" ) === "inline" &&
+ jQuery.css( this, "float" ) === "none" ) {
+ if ( !jQuery.support.inlineBlockNeedsLayout ) {
+ this.style.display = "inline-block";
+
+ } else {
+ var display = defaultDisplay(this.nodeName);
+
+ // inline-level elements accept inline-block;
+ // block-level elements need to be inline with layout
+ if ( display === "inline" ) {
+ this.style.display = "inline-block";
+
+ } else {
+ this.style.display = "inline";
+ this.style.zoom = 1;
+ }
+ }
+ }
}
if ( jQuery.isArray( prop[p] ) ) {
@@ -5600,7 +6469,7 @@ jQuery.fn.extend({
} else {
var parts = rfxnum.exec(val),
- start = e.cur(true) || 0;
+ start = e.cur() || 0;
if ( parts ) {
var end = parseFloat( parts[2] ),
@@ -5608,9 +6477,9 @@ jQuery.fn.extend({
// We need to compute starting value
if ( unit !== "px" ) {
- self.style[ name ] = (end || 1) + unit;
- start = ((end || 1) / e.cur(true)) * start;
- self.style[ name ] = start + unit;
+ jQuery.style( self, name, (end || 1) + unit);
+ start = ((end || 1) / e.cur()) * start;
+ jQuery.style( self, name, start + unit);
}
// If a +=/-= token was provided, we're doing a relative animation
@@ -5662,22 +6531,33 @@ jQuery.fn.extend({
});
+function genFx( type, num ) {
+ var obj = {};
+
+ jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function() {
+ obj[ this ] = type;
+ });
+
+ return obj;
+}
+
// Generate shortcuts for custom animations
jQuery.each({
slideDown: genFx("show", 1),
slideUp: genFx("hide", 1),
slideToggle: genFx("toggle", 1),
fadeIn: { opacity: "show" },
- fadeOut: { opacity: "hide" }
+ fadeOut: { opacity: "hide" },
+ fadeToggle: { opacity: "toggle" }
}, function( name, props ) {
- jQuery.fn[ name ] = function( speed, callback ) {
- return this.animate( props, speed, callback );
+ jQuery.fn[ name ] = function( speed, easing, callback ) {
+ return this.animate( props, speed, easing, callback );
};
});
jQuery.extend({
speed: function( speed, easing, fn ) {
- var opt = speed && typeof speed === "object" ? speed : {
+ var opt = speed && typeof speed === "object" ? jQuery.extend({}, speed) : {
complete: fn || !fn && easing ||
jQuery.isFunction( speed ) && speed,
duration: speed,
@@ -5685,7 +6565,7 @@ jQuery.extend({
};
opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
- jQuery.fx.speeds[opt.duration] || jQuery.fx.speeds._default;
+ opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[opt.duration] : jQuery.fx.speeds._default;
// Queueing
opt.old = opt.complete;
@@ -5732,33 +6612,30 @@ jQuery.fx.prototype = {
}
(jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );
-
- // Set display property to block for height/width animations
- if ( ( this.prop === "height" || this.prop === "width" ) && this.elem.style ) {
- this.elem.style.display = "block";
- }
},
// Get the current size
- cur: function( force ) {
+ cur: function() {
if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) {
return this.elem[ this.prop ];
}
- var r = parseFloat(jQuery.css(this.elem, this.prop, force));
- return r && r > -10000 ? r : parseFloat(jQuery.curCSS(this.elem, this.prop)) || 0;
+ var r = parseFloat( jQuery.css( this.elem, this.prop ) );
+ return r && r > -10000 ? r : 0;
},
// Start an animation from one number to another
custom: function( from, to, unit ) {
- this.startTime = now();
+ var self = this,
+ fx = jQuery.fx;
+
+ this.startTime = jQuery.now();
this.start = from;
this.end = to;
this.unit = unit || this.unit || "px";
this.now = this.start;
this.pos = this.state = 0;
- var self = this;
function t( gotoEnd ) {
return self.step(gotoEnd);
}
@@ -5766,7 +6643,7 @@ jQuery.fx.prototype = {
t.elem = this.elem;
if ( t() && jQuery.timers.push(t) && !timerId ) {
- timerId = setInterval(jQuery.fx.tick, 13);
+ timerId = setInterval(fx.tick, fx.interval);
}
},
@@ -5797,7 +6674,7 @@ jQuery.fx.prototype = {
// Each step of an animation
step: function( gotoEnd ) {
- var t = now(), done = true;
+ var t = jQuery.now(), done = true;
if ( gotoEnd || t >= this.options.duration + this.startTime ) {
this.now = this.end;
@@ -5813,17 +6690,14 @@ jQuery.fx.prototype = {
}
if ( done ) {
- if ( this.options.display != null ) {
- // Reset the overflow
- this.elem.style.overflow = this.options.overflow;
-
- // Reset the display
- var old = jQuery.data(this.elem, "olddisplay");
- this.elem.style.display = old ? old : this.options.display;
-
- if ( jQuery.css(this.elem, "display") === "none" ) {
- this.elem.style.display = "block";
- }
+ // Reset the overflow
+ if ( this.options.overflow != null && !jQuery.support.shrinkWrapBlocks ) {
+ var elem = this.elem,
+ options = this.options;
+
+ jQuery.each( [ "", "X", "Y" ], function (index, value) {
+ elem.style[ "overflow" + value ] = options.overflow[index];
+ } );
}
// Hide the element if the "hide" operation was done
@@ -5834,7 +6708,7 @@ jQuery.fx.prototype = {
// Reset the properties, if the item has been hidden or shown
if ( this.options.hide || this.options.show ) {
for ( var p in this.options.curAnim ) {
- jQuery.style(this.elem, p, this.options.orig[p]);
+ jQuery.style( this.elem, p, this.options.orig[p] );
}
}
@@ -5876,22 +6750,24 @@ jQuery.extend( jQuery.fx, {
jQuery.fx.stop();
}
},
-
+
+ interval: 13,
+
stop: function() {
clearInterval( timerId );
timerId = null;
},
-
+
speeds: {
slow: 600,
- fast: 200,
- // Default speed
- _default: 400
+ fast: 200,
+ // Default speed
+ _default: 400
},
step: {
opacity: function( fx ) {
- jQuery.style(fx.elem, "opacity", fx.now);
+ jQuery.style( fx.elem, "opacity", fx.now );
},
_default: function( fx ) {
@@ -5912,18 +6788,32 @@ if ( jQuery.expr && jQuery.expr.filters ) {
};
}
-function genFx( type, num ) {
- var obj = {};
+function defaultDisplay( nodeName ) {
+ if ( !elemdisplay[ nodeName ] ) {
+ var elem = jQuery("<" + nodeName + ">").appendTo("body"),
+ display = elem.css("display");
- jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function() {
- obj[ this ] = type;
- });
+ elem.remove();
- return obj;
+ if ( display === "none" || display === "" ) {
+ display = "block";
+ }
+
+ elemdisplay[ nodeName ] = display;
+ }
+
+ return elemdisplay[ nodeName ];
}
+
+
+
+
+var rtable = /^t(?:able|d|h)$/i,
+ rroot = /^(?:body|html)$/i;
+
if ( "getBoundingClientRect" in document.documentElement ) {
jQuery.fn.offset = function( options ) {
- var elem = this[0];
+ var elem = this[0], box;
if ( options ) {
return this.each(function( i ) {
@@ -5939,10 +6829,26 @@ if ( "getBoundingClientRect" in document.documentElement ) {
return jQuery.offset.bodyOffset( elem );
}
- var box = elem.getBoundingClientRect(), doc = elem.ownerDocument, body = doc.body, docElem = doc.documentElement,
- clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0,
- top = box.top + (self.pageYOffset || jQuery.support.boxModel && docElem.scrollTop || body.scrollTop ) - clientTop,
- left = box.left + (self.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft) - clientLeft;
+ try {
+ box = elem.getBoundingClientRect();
+ } catch(e) {}
+
+ var doc = elem.ownerDocument,
+ docElem = doc.documentElement;
+
+ // Make sure we're not dealing with a disconnected DOM node
+ if ( !box || !jQuery.contains( docElem, elem ) ) {
+ return box || { top: 0, left: 0 };
+ }
+
+ var body = doc.body,
+ win = getWindow(doc),
+ clientTop = docElem.clientTop || body.clientTop || 0,
+ clientLeft = docElem.clientLeft || body.clientLeft || 0,
+ scrollTop = (win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop || body.scrollTop ),
+ scrollLeft = (win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft),
+ top = box.top + scrollTop - clientTop,
+ left = box.left + scrollLeft - clientLeft;
return { top: top, left: left };
};
@@ -5967,11 +6873,16 @@ if ( "getBoundingClientRect" in document.documentElement ) {
jQuery.offset.initialize();
- var offsetParent = elem.offsetParent, prevOffsetParent = elem,
- doc = elem.ownerDocument, computedStyle, docElem = doc.documentElement,
- body = doc.body, defaultView = doc.defaultView,
+ var computedStyle,
+ offsetParent = elem.offsetParent,
+ prevOffsetParent = elem,
+ doc = elem.ownerDocument,
+ docElem = doc.documentElement,
+ body = doc.body,
+ defaultView = doc.defaultView,
prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle,
- top = elem.offsetTop, left = elem.offsetLeft;
+ top = elem.offsetTop,
+ left = elem.offsetLeft;
while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) {
@@ -5986,12 +6897,13 @@ if ( "getBoundingClientRect" in document.documentElement ) {
top += elem.offsetTop;
left += elem.offsetLeft;
- if ( jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && /^t(able|d|h)$/i.test(elem.nodeName)) ) {
+ if ( jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && rtable.test(elem.nodeName)) ) {
top += parseFloat( computedStyle.borderTopWidth ) || 0;
left += parseFloat( computedStyle.borderLeftWidth ) || 0;
}
- prevOffsetParent = offsetParent, offsetParent = elem.offsetParent;
+ prevOffsetParent = offsetParent;
+ offsetParent = elem.offsetParent;
}
if ( jQuery.offset.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) {
@@ -6018,7 +6930,7 @@ if ( "getBoundingClientRect" in document.documentElement ) {
jQuery.offset = {
initialize: function() {
- var body = document.body, container = document.createElement("div"), innerDiv, checkDiv, table, td, bodyMarginTop = parseFloat( jQuery.curCSS(body, "marginTop", true) ) || 0,
+ var body = document.body, container = document.createElement("div"), innerDiv, checkDiv, table, td, bodyMarginTop = parseFloat( jQuery.css(body, "marginTop") ) || 0,
html = "<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
jQuery.extend( container.style, { position: "absolute", top: 0, left: 0, margin: 0, border: 0, width: "1px", height: "1px", visibility: "hidden" } );
@@ -6032,12 +6944,16 @@ jQuery.offset = {
this.doesNotAddBorder = (checkDiv.offsetTop !== 5);
this.doesAddBorderForTableAndCells = (td.offsetTop === 5);
- checkDiv.style.position = "fixed", checkDiv.style.top = "20px";
+ checkDiv.style.position = "fixed";
+ checkDiv.style.top = "20px";
+
// safari subtracts parent border width here which is 5px
this.supportsFixedPosition = (checkDiv.offsetTop === 20 || checkDiv.offsetTop === 15);
checkDiv.style.position = checkDiv.style.top = "";
- innerDiv.style.overflow = "hidden", innerDiv.style.position = "relative";
+ innerDiv.style.overflow = "hidden";
+ innerDiv.style.position = "relative";
+
this.subtractsBorderForOverflowNotVisible = (checkDiv.offsetTop === -5);
this.doesNotIncludeMarginInBodyOffset = (body.offsetTop !== bodyMarginTop);
@@ -6048,36 +6964,52 @@ jQuery.offset = {
},
bodyOffset: function( body ) {
- var top = body.offsetTop, left = body.offsetLeft;
+ var top = body.offsetTop,
+ left = body.offsetLeft;
jQuery.offset.initialize();
if ( jQuery.offset.doesNotIncludeMarginInBodyOffset ) {
- top += parseFloat( jQuery.curCSS(body, "marginTop", true) ) || 0;
- left += parseFloat( jQuery.curCSS(body, "marginLeft", true) ) || 0;
+ top += parseFloat( jQuery.css(body, "marginTop") ) || 0;
+ left += parseFloat( jQuery.css(body, "marginLeft") ) || 0;
}
return { top: top, left: left };
},
setOffset: function( elem, options, i ) {
+ var position = jQuery.css( elem, "position" );
+
// set position first, in-case top/left are set even on static elem
- if ( /static/.test( jQuery.curCSS( elem, "position" ) ) ) {
+ if ( position === "static" ) {
elem.style.position = "relative";
}
- var curElem = jQuery( elem ),
+
+ var curElem = jQuery( elem ),
curOffset = curElem.offset(),
- curTop = parseInt( jQuery.curCSS( elem, "top", true ), 10 ) || 0,
- curLeft = parseInt( jQuery.curCSS( elem, "left", true ), 10 ) || 0;
+ curCSSTop = jQuery.css( elem, "top" ),
+ curCSSLeft = jQuery.css( elem, "left" ),
+ calculatePosition = (position === "absolute" && jQuery.inArray('auto', [curCSSTop, curCSSLeft]) > -1),
+ props = {}, curPosition = {}, curTop, curLeft;
+
+ // need to be able to calculate position if either top or left is auto and position is absolute
+ if ( calculatePosition ) {
+ curPosition = curElem.position();
+ }
+
+ curTop = calculatePosition ? curPosition.top : parseInt( curCSSTop, 10 ) || 0;
+ curLeft = calculatePosition ? curPosition.left : parseInt( curCSSLeft, 10 ) || 0;
if ( jQuery.isFunction( options ) ) {
options = options.call( elem, i, curOffset );
}
- var props = {
- top: (options.top - curOffset.top) + curTop,
- left: (options.left - curOffset.left) + curLeft
- };
+ if (options.top != null) {
+ props.top = (options.top - curOffset.top) + curTop;
+ }
+ if (options.left != null) {
+ props.left = (options.left - curOffset.left) + curLeft;
+ }
if ( "using" in options ) {
options.using.call( elem, props );
@@ -6101,17 +7033,17 @@ jQuery.fn.extend({
// Get correct offsets
offset = this.offset(),
- parentOffset = /^body|html$/i.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();
+ parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();
// Subtract element margins
// note: when an element has margin: auto the offsetLeft and marginLeft
// are the same in Safari causing offset.left to incorrectly be 0
- offset.top -= parseFloat( jQuery.curCSS(elem, "marginTop", true) ) || 0;
- offset.left -= parseFloat( jQuery.curCSS(elem, "marginLeft", true) ) || 0;
+ offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0;
+ offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0;
// Add offsetParent borders
- parentOffset.top += parseFloat( jQuery.curCSS(offsetParent[0], "borderTopWidth", true) ) || 0;
- parentOffset.left += parseFloat( jQuery.curCSS(offsetParent[0], "borderLeftWidth", true) ) || 0;
+ parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0;
+ parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0;
// Subtract the two offsets
return {
@@ -6123,7 +7055,7 @@ jQuery.fn.extend({
offsetParent: function() {
return this.map(function() {
var offsetParent = this.offsetParent || document.body;
- while ( offsetParent && (!/^body|html$/i.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) {
+ while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) {
offsetParent = offsetParent.offsetParent;
}
return offsetParent;
@@ -6171,12 +7103,16 @@ jQuery.each( ["Left", "Top"], function( i, name ) {
});
function getWindow( elem ) {
- return ("scrollTo" in elem && elem.document) ?
+ return jQuery.isWindow( elem ) ?
elem :
elem.nodeType === 9 ?
elem.defaultView || elem.parentWindow :
false;
}
+
+
+
+
// Create innerHeight, innerWidth, outerHeight and outerWidth methods
jQuery.each([ "Height", "Width" ], function( i, name ) {
@@ -6185,14 +7121,14 @@ jQuery.each([ "Height", "Width" ], function( i, name ) {
// innerHeight and innerWidth
jQuery.fn["inner" + name] = function() {
return this[0] ?
- jQuery.css( this[0], type, false, "padding" ) :
+ parseFloat( jQuery.css( this[0], type, "padding" ) ) :
null;
};
// outerHeight and outerWidth
jQuery.fn["outer" + name] = function( margin ) {
return this[0] ?
- jQuery.css( this[0], type, false, margin ? "margin" : "border" ) :
+ parseFloat( jQuery.css( this[0], type, margin ? "margin" : "border" ) ) :
null;
};
@@ -6210,31 +7146,34 @@ jQuery.each([ "Height", "Width" ], function( i, name ) {
});
}
- return ("scrollTo" in elem && elem.document) ? // does it walk and quack like a window?
+ if ( jQuery.isWindow( elem ) ) {
// Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
- elem.document.compatMode === "CSS1Compat" && elem.document.documentElement[ "client" + name ] ||
- elem.document.body[ "client" + name ] :
-
- // Get document width or height
- (elem.nodeType === 9) ? // is it a document
- // Either scroll[Width/Height] or offset[Width/Height], whichever is greater
- Math.max(
- elem.documentElement["client" + name],
- elem.body["scroll" + name], elem.documentElement["scroll" + name],
- elem.body["offset" + name], elem.documentElement["offset" + name]
- ) :
-
- // Get or set width or height on the element
- size === undefined ?
- // Get width or height on the element
- jQuery.css( elem, type ) :
-
- // Set the width or height on the element (default to pixels if value is unitless)
- this.css( type, typeof size === "string" ? size : size + "px" );
+ return elem.document.compatMode === "CSS1Compat" && elem.document.documentElement[ "client" + name ] ||
+ elem.document.body[ "client" + name ];
+
+ // Get document width or height
+ } else if ( elem.nodeType === 9 ) {
+ // Either scroll[Width/Height] or offset[Width/Height], whichever is greater
+ return Math.max(
+ elem.documentElement["client" + name],
+ elem.body["scroll" + name], elem.documentElement["scroll" + name],
+ elem.body["offset" + name], elem.documentElement["offset" + name]
+ );
+
+ // Get or set width or height on the element
+ } else if ( size === undefined ) {
+ var orig = jQuery.css( elem, type ),
+ ret = parseFloat( orig );
+
+ return jQuery.isNaN( ret ) ? orig : ret;
+
+ // Set the width or height on the element (default to pixels if value is unitless)
+ } else {
+ return this.css( type, typeof size === "string" ? size : size + "px" );
+ }
};
});
-// Expose jQuery to the global object
-window.jQuery = window.$ = jQuery;
+
})(window);
diff --git a/tests/index.html b/tests/index.html
index 0e5ce9058..15034e2e6 100644
--- a/tests/index.html
+++ b/tests/index.html
@@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<title>jQuery UI Tests</title>
<link rel="stylesheet" href="../themes/base/jquery.ui.all.css" type="text/css" />
- <script type="text/javascript" src="../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../jquery-1.4.4.js"></script>
<link rel="stylesheet" href="tests.css" type="text/css" />
<script type="text/javascript" src="tests.js"></script>
</head>
diff --git a/tests/jquery.simulate.js b/tests/jquery.simulate.js
index be412464b..81d7f62bf 100644
--- a/tests/jquery.simulate.js
+++ b/tests/jquery.simulate.js
@@ -1,9 +1,9 @@
/*
* jquery.simulate - simulate browser mouse and keyboard events
*
- * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
*
*/
@@ -120,6 +120,7 @@ $.extend($.simulate.prototype, {
this.simulateEvent(document, "mousemove", coord);
this.simulateEvent(document, "mousemove", coord);
this.simulateEvent(target, "mouseup", coord);
+ this.simulateEvent(target, "click", coord);
},
findCenter: function(el) {
var el = $(this.target), o = el.offset();
diff --git a/tests/static/accordion/default.html b/tests/static/accordion/default.html
index d66463e23..0527bff14 100644
--- a/tests/static/accordion/default.html
+++ b/tests/static/accordion/default.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="../static.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../static.js"></script>
</head>
<body>
diff --git a/tests/static/accordion/dl.html b/tests/static/accordion/dl.html
index b42ad57a5..33e894754 100644
--- a/tests/static/accordion/dl.html
+++ b/tests/static/accordion/dl.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="../static.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../static.js"></script>
</head>
<body>
diff --git a/tests/static/accordion/ul.html b/tests/static/accordion/ul.html
index c107d21aa..592322c6e 100644
--- a/tests/static/accordion/ul.html
+++ b/tests/static/accordion/ul.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="../static.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../static.js"></script>
</head>
<body>
diff --git a/tests/static/button/default.html b/tests/static/button/default.html
index a2c35a4ad..d6941c836 100644
--- a/tests/static/button/default.html
+++ b/tests/static/button/default.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="../static.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../static.js"></script>
<style>
div { margin: 0 0 1em; }
@@ -23,24 +23,34 @@
</button>
<button class="ui-button ui-button-icon-only ui-widget ui-state-default ui-corner-all" title="Button">
- <span class="ui-button-icon-primary ui-icon ui-icon-locked"></span>
- <span class="ui-button-text">Button</span>
+ <span class="ui-button-icon-primary ui-icon ui-icon-gear"></span>
+ <span class="ui-button-text">Primary icon</span>
</button>
-
- <button class="ui-button ui-button-text-icon ui-widget ui-state-default ui-corner-all">
- <span class="ui-button-icon-primary ui-icon ui-icon-locked"></span>
- <span class="ui-button-text">Button</span>
+
+ <button class="ui-button ui-button-icon-only ui-widget ui-state-default ui-corner-all" title="Button">
+ <span class="ui-button-text">Secondary icon</span>
+ <span class="ui-button-icon-secondary ui-icon ui-icon-triangle-1-s"></span>
+ </button>
+
+ <button class="ui-button ui-button-text-icon-primary ui-widget ui-state-default ui-corner-all">
+ <span class="ui-button-icon-primary ui-icon ui-icon-gear"></span>
+ <span class="ui-button-text">Primary icon</span>
+ </button>
+
+ <button class="ui-button ui-button-text-icon-secondary ui-widget ui-state-default ui-corner-all">
+ <span class="ui-button-text">Secondary icon</span>
+ <span class="ui-button-icon-secondary ui-icon ui-icon-triangle-1-s"></span>
</button>
<button class="ui-button ui-button-text-icons ui-widget ui-state-default ui-corner-all">
<span class="ui-button-icon-primary ui-icon ui-icon-gear"></span>
- <span class="ui-button-text">Button</span>
+ <span class="ui-button-text">Both icons</span>
<span class="ui-button-icon-secondary ui-icon ui-icon-triangle-1-s"></span>
</button>
<button class="ui-button ui-button-icons-only ui-widget ui-state-default ui-corner-all">
<span class="ui-button-icon-primary ui-icon ui-icon-gear"></span>
- <span class="ui-button-text">Button</span>
+ <span class="ui-button-text">No text</span>
<span class="ui-button-icon-secondary ui-icon ui-icon-triangle-1-s"></span>
</button>
</div>
@@ -53,24 +63,34 @@
</a>
<a href="#" class="ui-button ui-button-icon-only ui-widget ui-state-default ui-corner-all" title="Button">
- <span class="ui-button-icon-primary ui-icon ui-icon-locked"></span>
- <span class="ui-button-text">Button</span>
+ <span class="ui-button-icon-primary ui-icon ui-icon-gear"></span>
+ <span class="ui-button-text">Primary icon</span>
</a>
- <a href="#" class="ui-button ui-button-text-icon ui-widget ui-state-default ui-corner-all">
- <span class="ui-button-icon-primary ui-icon ui-icon-locked"></span>
- <span class="ui-button-text">Button</span>
+ <a href="#" class="ui-button ui-button-icon-only ui-widget ui-state-default ui-corner-all" title="Button">
+ <span class="ui-button-text">Secondary icon</span>
+ <span class="ui-button-icon-secondary ui-icon ui-icon-triangle-1-s"></span>
+ </a>
+
+ <a href="#" class="ui-button ui-button-text-icon-primary ui-widget ui-state-default ui-corner-all">
+ <span class="ui-button-icon-primary ui-icon ui-icon-gear"></span>
+ <span class="ui-button-text">Primary icon</span>
+ </a>
+
+ <a href="#" class="ui-button ui-button-text-icon-secondary ui-widget ui-state-default ui-corner-all">
+ <span class="ui-button-text">Secondary icon</span>
+ <span class="ui-button-icon-secondary ui-icon ui-icon-triangle-1-s"></span>
</a>
<a href="#" class="ui-button ui-button-text-icons ui-widget ui-state-default ui-corner-all">
<span class="ui-button-icon-primary ui-icon ui-icon-gear"></span>
- <span class="ui-button-text">Button</span>
+ <span class="ui-button-text">Both icons</span>
<span class="ui-button-icon-secondary ui-icon ui-icon-triangle-1-s"></span>
</a>
<a href="#" class="ui-button ui-button-icons-only ui-widget ui-state-default ui-corner-all">
<span class="ui-button-icon-primary ui-icon ui-icon-gear"></span>
- <span class="ui-button-text">Button</span>
+ <span class="ui-button-text">No text</span>
<span class="ui-button-icon-secondary ui-icon ui-icon-triangle-1-s"></span>
</a>
</div>
@@ -85,24 +105,34 @@
</label>
<label class="ui-button ui-button-icon-only ui-widget ui-state-default ui-corner-all" title="Button">
- <span class="ui-button-icon-primary ui-icon ui-icon-locked"></span>
- <span class="ui-button-text">Button</span>
+ <span class="ui-button-icon-primary ui-icon ui-icon-gear"></span>
+ <span class="ui-button-text">Primary icon</span>
</label>
- <label class="ui-button ui-button-text-icon ui-widget ui-state-default ui-corner-all">
- <span class="ui-button-icon-primary ui-icon ui-icon-locked"></span>
- <span class="ui-button-text">Button</span>
+ <label class="ui-button ui-button-icon-only ui-widget ui-state-default ui-corner-all" title="Button">
+ <span class="ui-button-text">Secondary icon</span>
+ <span class="ui-button-icon-secondary ui-icon ui-icon-triangle-1-s"></span>
+ </label>
+
+ <label class="ui-button ui-button-text-icon-primary ui-widget ui-state-default ui-corner-all">
+ <span class="ui-button-icon-primary ui-icon ui-icon-gear"></span>
+ <span class="ui-button-text">Primary icon</span>
+ </label>
+
+ <label class="ui-button ui-button-text-icon-secondary ui-widget ui-state-default ui-corner-all">
+ <span class="ui-button-text">Secondary icon</span>
+ <span class="ui-button-icon-secondary ui-icon ui-icon-triangle-1-s"></span>
</label>
<label class="ui-button ui-button-text-icons ui-widget ui-state-default ui-corner-all">
<span class="ui-button-icon-primary ui-icon ui-icon-gear"></span>
- <span class="ui-button-text">Button</span>
+ <span class="ui-button-text">Both icons</span>
<span class="ui-button-icon-secondary ui-icon ui-icon-triangle-1-s"></span>
</label>
<label class="ui-button ui-button-icons-only ui-widget ui-state-default ui-corner-all">
<span class="ui-button-icon-primary ui-icon ui-icon-gear"></span>
- <span class="ui-button-text">Button</span>
+ <span class="ui-button-text">No text</span>
<span class="ui-button-icon-secondary ui-icon ui-icon-triangle-1-s"></span>
</label>
</div>
@@ -111,9 +141,10 @@
<h2>Button Sets</h2>
<div class="ui-buttonset">
- <button class="ui-button ui-button-text-only ui-widget ui-state-default ui-corner-left"><span class="ui-button-text">Simple button</span></button>
- <button class="ui-button ui-button-text-only ui-widget ui-state-default"><span class="ui-button-text">Simple button</span></button>
- <button class="ui-button ui-button-text-only ui-widget ui-state-default ui-corner-right"><span class="ui-button-text">Simple button</span></button>
+ <button class="ui-button ui-button-text-only ui-widget ui-state-default ui-corner-left"><span class="ui-button-text">First</span></button>
+ <button class="ui-button ui-button-text-only ui-widget ui-state-default"><span class="ui-button-text">Middle</span></button>
+ <button class="ui-button ui-button-text-only ui-widget ui-state-default"><span class="ui-button-text">Middle</span></button>
+ <button class="ui-button ui-button-text-only ui-widget ui-state-default ui-corner-right"><span class="ui-button-text">Last</span></button>
</div>
diff --git a/tests/static/datepicker/datepicker.html b/tests/static/datepicker/datepicker.html
index 5feaa6eac..f9fde2ec6 100644
--- a/tests/static/datepicker/datepicker.html
+++ b/tests/static/datepicker/datepicker.html
@@ -5,7 +5,7 @@
<title>jQuery UI Datepicker Static Markup Test Page</title>
<link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../static.js"></script>
<style type="text/css">
.ui-datepicker { float:left; margin: 0 2em 2em 0;}
diff --git a/tests/static/datepicker/default.html b/tests/static/datepicker/default.html
index 09ed399f2..a5de6e331 100644
--- a/tests/static/datepicker/default.html
+++ b/tests/static/datepicker/default.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="../static.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../static.js"></script>
</head>
<body>
diff --git a/tests/static/dialog/default.html b/tests/static/dialog/default.html
index 8c2b9f26e..4512def2c 100644
--- a/tests/static/dialog/default.html
+++ b/tests/static/dialog/default.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="../static.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../static.js"></script>
</head>
<body>
diff --git a/tests/static/dialog/dialog.html b/tests/static/dialog/dialog.html
index b0a8acae6..12d6b4dae 100644
--- a/tests/static/dialog/dialog.html
+++ b/tests/static/dialog/dialog.html
@@ -5,7 +5,7 @@
<title>jQuery UI Dialog Static Markup Test Page</title>
<link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../static.js"></script>
</head>
<body style="font-size: 62.5%;">
diff --git a/tests/static/draggable/default.html b/tests/static/draggable/default.html
index 49ea5d13c..136d634d4 100644
--- a/tests/static/draggable/default.html
+++ b/tests/static/draggable/default.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="../static.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../static.js"></script>
</head>
<body>
diff --git a/tests/static/droppable/default.html b/tests/static/droppable/default.html
index 6ac14c458..7c5d0f042 100644
--- a/tests/static/droppable/default.html
+++ b/tests/static/droppable/default.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="../static.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../static.js"></script>
</head>
<body>
diff --git a/tests/static/highlight_error.html b/tests/static/highlight_error.html
index f93d7fe74..c72ebf817 100644
--- a/tests/static/highlight_error.html
+++ b/tests/static/highlight_error.html
@@ -6,7 +6,7 @@
<title>Themeroller CSS Framework Demo</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.base.css" type="text/css" />
<link rel="stylesheet" href="../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="static.js"></script>
<style type="text/css">
body {font-size: 62.5%; margin: 20px; font-family: Verdana, sans-serif; color: #444;}
diff --git a/tests/static/icons.html b/tests/static/icons.html
index 1917aa275..5cd8af21d 100644
--- a/tests/static/icons.html
+++ b/tests/static/icons.html
@@ -5,7 +5,7 @@
<title>jQuery UI CSS Framework Icons Test Page</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.base.css" type="text/css" />
<link rel="stylesheet" href="../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../jquery-1.4.4.js"></script>
<style type="text/css">
body {font-size: 62.5%; margin: 20px; font-family: Verdana, sans-serif; color: #444;}
diff --git a/tests/static/index.html b/tests/static/index.html
index 50a1fce55..3145ad219 100644
--- a/tests/static/index.html
+++ b/tests/static/index.html
@@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<title>jQuery UI Static Tests</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css" type="text/css" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../jquery-1.4.4.js"></script>
<script type="text/javascript">
$(function() {
diff --git a/tests/static/menu/all-menus-icons.html b/tests/static/menu/all-menus-icons.html
index b23ab0072..d7aa3ee1c 100644
--- a/tests/static/menu/all-menus-icons.html
+++ b/tests/static/menu/all-menus-icons.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="../static.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../static.js"></script>
<script src="http://jqueryui.com/themeroller/themeswitchertool/" type="text/javascript"></script>
diff --git a/tests/static/menu/default.html b/tests/static/menu/default.html
index 1d7cc9919..7f1aee441 100644
--- a/tests/static/menu/default.html
+++ b/tests/static/menu/default.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="../static.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../static.js"></script>
</head>
diff --git a/tests/static/overlay.html b/tests/static/overlay.html
index 87ccd9668..4be7ea579 100644
--- a/tests/static/overlay.html
+++ b/tests/static/overlay.html
@@ -5,7 +5,7 @@
<title>jQuery UI Dialog Static Markup Test Page</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.base.css" type="text/css" />
<link rel="stylesheet" href="../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="static.js"></script>
<script type="text/javascript">
diff --git a/tests/static/progressbar/default.html b/tests/static/progressbar/default.html
index 118a21072..14035e32a 100644
--- a/tests/static/progressbar/default.html
+++ b/tests/static/progressbar/default.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="../static.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../static.js"></script>
</head>
<body>
diff --git a/tests/static/progressbar/progressbar.html b/tests/static/progressbar/progressbar.html
index 8c4d65e18..30f1fe678 100644
--- a/tests/static/progressbar/progressbar.html
+++ b/tests/static/progressbar/progressbar.html
@@ -5,7 +5,7 @@
<title>jQuery UI Progressbar Static Markup Test Page</title>
<link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../static.js"></script>
</head>
<body style="font-size: 62.5%;">
diff --git a/tests/static/resizable/default.html b/tests/static/resizable/default.html
index 1b37e2994..69ea6bf73 100644
--- a/tests/static/resizable/default.html
+++ b/tests/static/resizable/default.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="../static.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../static.js"></script>
</head>
<body>
diff --git a/tests/static/selectable/default.html b/tests/static/selectable/default.html
index 1feee5567..1d860a7f8 100644
--- a/tests/static/selectable/default.html
+++ b/tests/static/selectable/default.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="../static.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../static.js"></script>
</head>
<body>
diff --git a/tests/static/slider/default.html b/tests/static/slider/default.html
index 71270035a..e728c530a 100644
--- a/tests/static/slider/default.html
+++ b/tests/static/slider/default.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="../static.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../static.js"></script>
</head>
<body>
diff --git a/tests/static/slider/default_vertical.html b/tests/static/slider/default_vertical.html
index bf4ca01b5..f9957b58f 100644
--- a/tests/static/slider/default_vertical.html
+++ b/tests/static/slider/default_vertical.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="../static.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../static.js"></script>
</head>
<body>
diff --git a/tests/static/slider/slider_horizontal.html b/tests/static/slider/slider_horizontal.html
index e9b2021ad..c1c82776a 100644
--- a/tests/static/slider/slider_horizontal.html
+++ b/tests/static/slider/slider_horizontal.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="../static.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../static.js"></script>
</head>
<body>
diff --git a/tests/static/slider/slider_horizontal_range.html b/tests/static/slider/slider_horizontal_range.html
index 4f5e3216f..3910a1445 100644
--- a/tests/static/slider/slider_horizontal_range.html
+++ b/tests/static/slider/slider_horizontal_range.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="../static.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../static.js"></script>
</head>
<body>
diff --git a/tests/static/slider/slider_horizontal_range_max.html b/tests/static/slider/slider_horizontal_range_max.html
index 6f354a88c..acd37bb5b 100644
--- a/tests/static/slider/slider_horizontal_range_max.html
+++ b/tests/static/slider/slider_horizontal_range_max.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="../static.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../static.js"></script>
</head>
<body>
diff --git a/tests/static/slider/slider_horizontal_range_min.html b/tests/static/slider/slider_horizontal_range_min.html
index 475ed30b3..9796fb753 100644
--- a/tests/static/slider/slider_horizontal_range_min.html
+++ b/tests/static/slider/slider_horizontal_range_min.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="../static.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../static.js"></script>
</head>
<body>
diff --git a/tests/static/slider/slider_vertical.html b/tests/static/slider/slider_vertical.html
index 7453a3a46..644ce2d62 100644
--- a/tests/static/slider/slider_vertical.html
+++ b/tests/static/slider/slider_vertical.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="../static.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../static.js"></script>
</head>
<body>
diff --git a/tests/static/slider/slider_vertical_range.html b/tests/static/slider/slider_vertical_range.html
index 377806d05..80512e212 100644
--- a/tests/static/slider/slider_vertical_range.html
+++ b/tests/static/slider/slider_vertical_range.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="../static.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../static.js"></script>
</head>
<body>
diff --git a/tests/static/slider/slider_vertical_range_max.html b/tests/static/slider/slider_vertical_range_max.html
index 29fa4cf17..ec4538a2e 100644
--- a/tests/static/slider/slider_vertical_range_max.html
+++ b/tests/static/slider/slider_vertical_range_max.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="../static.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../static.js"></script>
</head>
<body>
diff --git a/tests/static/slider/slider_vertical_range_min.html b/tests/static/slider/slider_vertical_range_min.html
index 66c3c4c13..49df1ae97 100644
--- a/tests/static/slider/slider_vertical_range_min.html
+++ b/tests/static/slider/slider_vertical_range_min.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="../static.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../static.js"></script>
</head>
<body>
diff --git a/tests/static/sortable/default.html b/tests/static/sortable/default.html
index 7912f360d..ebadef89e 100644
--- a/tests/static/sortable/default.html
+++ b/tests/static/sortable/default.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="../static.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../static.js"></script>
</head>
<body>
diff --git a/tests/static/tabs/default.html b/tests/static/tabs/default.html
index 1bcfa7401..d43f38184 100644
--- a/tests/static/tabs/default.html
+++ b/tests/static/tabs/default.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="../static.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../static.js"></script>
</head>
<body>
diff --git a/tests/static/tabs/tabs.html b/tests/static/tabs/tabs.html
index 1bcfa7401..d43f38184 100644
--- a/tests/static/tabs/tabs.html
+++ b/tests/static/tabs/tabs.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="../static.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../static.js"></script>
</head>
<body>
diff --git a/tests/unit/accordion/accordion.html b/tests/unit/accordion/accordion.html
index c53db8c75..61d168386 100644
--- a/tests/unit/accordion/accordion.html
+++ b/tests/unit/accordion/accordion.html
@@ -6,7 +6,7 @@
<link type="text/css" href="../../../themes/base/jquery.ui.accordion.css" rel="stylesheet" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.accordion.js"></script>
@@ -46,6 +46,7 @@
<script type="text/javascript" src="accordion_options.js"></script>
<script type="text/javascript" src="accordion_tickets.js"></script>
+ <script type="text/javascript" src="../swarminject.js"></script>
<style>
#main { font-size: 10pt; font-family: 'trebuchet ms', verdana, arial; }
#list, #list1 *, #navigation, #navigation * { margin: 0; padding: 0; font-size: 12px; }
@@ -63,7 +64,7 @@
<div>
<div id="list1" class="foo">
- <a class="bar">There is one obvious advantage:</a>
+ <h3 class="bar"><a class="anchor">There is one obvious advantage:</a></h3>
<div class="foo">
<p>
You've seen it coming!
@@ -73,7 +74,7 @@
Well, at least no free beer. Perhaps a bear, if you can afford it.
</p>
</div>
- <a class="bar">Now that you've got...</a>
+ <h3 class="bar"><a class="anchor">Now that you've got...</a></h3>
<div class="foo">
<p>
your bear, you have to admit it!
@@ -84,7 +85,7 @@
We could talk about renting one.
</p>
</div>
- <a class="bar">Rent one bear, ...</a>
+ <h3 class="bar"><a class="anchor">Rent one bear, ...</a></h3>
<div class="foo">
<p>
get two for three beer.
diff --git a/tests/unit/accordion/accordion_core.js b/tests/unit/accordion/accordion_core.js
index 2bef43149..640427e2e 100644
--- a/tests/unit/accordion/accordion_core.js
+++ b/tests/unit/accordion/accordion_core.js
@@ -13,6 +13,13 @@ test("handle click on header-descendant", function() {
state(ac, 0, 1, 0);
});
+test("ui-accordion-heading class added to headers anchor", function() {
+ expect(1);
+ var ac = $("#list1").accordion();
+ var anchors = $(".ui-accordion-heading");
+ equals( anchors.length, "3");
+});
+
test("accessibility", function () {
expect(9);
var ac = $('#list1').accordion().accordion("activate", 1);
diff --git a/tests/unit/accordion/accordion_defaults.js b/tests/unit/accordion/accordion_defaults.js
index e472734bc..bf5725f30 100644
--- a/tests/unit/accordion/accordion_defaults.js
+++ b/tests/unit/accordion/accordion_defaults.js
@@ -12,6 +12,7 @@ var accordion_defaults = {
event: "click",
fillSpace: false,
header: "> li > :first-child,> :not(li):even",
+ heightStyle: null,
icons: { "header": "ui-icon-triangle-1-e", "headerSelected": "ui-icon-triangle-1-s" },
navigation: false,
navigationFilter: function() {}
diff --git a/tests/unit/accordion/accordion_methods.js b/tests/unit/accordion/accordion_methods.js
index 73faff27c..ed5cb37b6 100644
--- a/tests/unit/accordion/accordion_methods.js
+++ b/tests/unit/accordion/accordion_methods.js
@@ -18,9 +18,6 @@ test("init", function() {
$('<div></div>').appendTo('body').remove().accordion().remove();
ok(true, '.accordion() called on disconnected DOMElement - removed');
- $('<div></div>').accordion().accordion("foo").remove();
- ok(true, 'arbitrary method called after init');
-
var el = $('<div></div>').accordion();
var foo = el.accordion("option", "foo");
el.remove();
@@ -98,7 +95,7 @@ test("activate, boolean, collapsible: false", function() {
});
test("activate, string expression", function() {
- var ac = $('#list1').accordion({ active: "a:last" });
+ var ac = $('#list1').accordion({ active: "h3:last" });
state(ac, 0, 0, 1);
ac.accordion("activate", ":first");
state(ac, 1, 0, 0);
@@ -109,11 +106,11 @@ test("activate, string expression", function() {
});
test("activate, jQuery or DOM element", function() {
- var ac = $('#list1').accordion({ active: $("#list1 a:last") });
+ var ac = $('#list1').accordion({ active: $("#list1 h3:last") });
state(ac, 0, 0, 1);
- ac.accordion("activate", $("#list1 a:first"));
+ ac.accordion("activate", $("#list1 h3:first"));
state(ac, 1, 0, 0);
- ac.accordion("activate", $("#list1 a")[1]);
+ ac.accordion("activate", $("#list1 h3")[1]);
state(ac, 0, 1, 0);
});
diff --git a/tests/unit/accordion/accordion_options.js b/tests/unit/accordion/accordion_options.js
index 499fec383..26bcb19e5 100644
--- a/tests/unit/accordion/accordion_options.js
+++ b/tests/unit/accordion/accordion_options.js
@@ -13,28 +13,28 @@ test("{ active: first child }, default", function() {
test("{ active: Selector }", function() {
var ac = $("#list1").accordion({
- active: "a:last"
+ active: "h3:last"
});
state(ac, 0, 0, 1);
- ac.accordion('option', 'active', "a:eq(1)");
+ ac.accordion('option', 'active', "h3:eq(1)");
state(ac, 0, 1, 0);
});
test("{ active: Element }", function() {
var ac = $("#list1").accordion({
- active: $("#list1 a:last")[0]
+ active: $("#list1 h3:last")[0]
});
state(ac, 0, 0, 1);
- ac.accordion('option', 'active', $("#list1 a:eq(1)")[0]);
+ ac.accordion('option', 'active', $("#list1 h3:eq(1)")[0]);
state(ac, 0, 1, 0);
});
test("{ active: jQuery Object }", function() {
var ac = $("#list1").accordion({
- active: $("#list1 a:last")
+ active: $("#list1 h3:last")
});
state(ac, 0, 0, 1);
- ac.accordion('option', 'active', $("#list1 a:eq(1)"));
+ ac.accordion('option', 'active', $("#list1 h3:eq(1)"));
state(ac, 0, 1, 0);
});
@@ -69,6 +69,10 @@ test("{ autoHeight: true }, default", function() {
equalHeights($('#navigation').accordion({ autoHeight: true }), 95, 130);
});
+test("{ heightStyle: 'auto' }, default", function() {
+ equalHeights($('#navigation').accordion({ heightStyle: 'auto' }), 95, 130);
+});
+
test("{ autoHeight: false }", function() {
var accordion = $('#navigation').accordion({ autoHeight: false });
var sizes = [];
@@ -80,6 +84,16 @@ test("{ autoHeight: false }", function() {
ok( sizes[2] >= 42 && sizes[2] <= 54, "was " + sizes[2] );
});
+test("{ heightStyle: 'content' }", function() {
+ var accordion = $('#navigation').accordion({ heightStyle: 'content' });
+ var sizes = [];
+ accordion.find(".ui-accordion-content").each(function() {
+ sizes.push($(this).height());
+ });
+ ok( sizes[0] >= 70 && sizes[0] <= 90, "was " + sizes[0] );
+ ok( sizes[1] >= 98 && sizes[1] <= 126, "was " + sizes[1] );
+ ok( sizes[2] >= 42 && sizes[2] <= 54, "was " + sizes[2] );
+});
test("{ collapsible: false }, default", function() {
var ac = $("#list1").accordion();
ac.accordion("activate", false);
@@ -102,6 +116,30 @@ test("{ fillSpace: true }", function() {
equalHeights($('#navigation').accordion({ fillSpace: true }), 446, 458);
});
+test("{ heightStyle: 'fill' }", function() {
+ $("#navigationWrapper").height(500);
+ equalHeights($('#navigation').accordion({ heightStyle: 'fill' }), 446, 458);
+});
+
+test("{ fillSpace: true } with sibling", function() {
+ $("#navigationWrapper").height(500);
+ var sibling = $("<p>Lorem Ipsum</p>");
+ $("#navigationWrapper").prepend( sibling.height(100) );
+ //sibling.outerHeight(true) == 126
+ equalHeights($('#navigation').accordion({ fillSpace: true}), 320, 332);
+});
+
+test("{ fillSpace: true } with multiple siblings", function() {
+ $("#navigationWrapper").height(500);
+ var sibling = $("<p>Lorem Ipsum</p>");
+ $("#navigationWrapper")
+ .prepend( sibling.clone().height(100) )
+ .prepend( sibling.clone().height(100).css( "position", "absolute" ) )
+ .prepend( sibling.clone().height(50) );
+ //sibling.outerHeight(true) == 126
+ equalHeights($('#navigation').accordion({ fillSpace: true}), 244, 256);
+});
+
test("{ header: '> li > :first-child,> :not(li):even' }, default", function() {
state($("#list1").accordion(), 1, 0, 0);
state($("#navigation").accordion(), 1, 0, 0);
diff --git a/tests/unit/autocomplete/autocomplete.html b/tests/unit/autocomplete/autocomplete.html
index 7ca96eb68..f4c7474df 100644
--- a/tests/unit/autocomplete/autocomplete.html
+++ b/tests/unit/autocomplete/autocomplete.html
@@ -6,11 +6,10 @@
<link type="text/css" href="../../../themes/base/jquery.ui.autocomplete.css" rel="stylesheet" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.position.js"></script>
- <script type="text/javascript" src="../../../ui/jquery.ui.menu.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.autocomplete.js"></script>
<link rel="stylesheet" href="../../../external/qunit.css" type="text/css"/>
@@ -25,6 +24,7 @@
<script type="text/javascript" src="autocomplete_options.js"></script>
<script type="text/javascript" src="autocomplete_tickets.js"></script>
+ <script type="text/javascript" src="../swarminject.js"></script>
</head>
<body id="body">
@@ -36,8 +36,8 @@
<div id="main" style="position: absolute; top: -10000px; left: -10000px;">
- <div><input id="autocomplete" class="foo" /></div>
-
+ <div id="ac-wrap1" class="ac-wrap"></div>
+ <div id="ac-wrap2" class="ac-wrap"><input id="autocomplete" class="foo" /></div>
</div>
</body>
diff --git a/tests/unit/autocomplete/autocomplete_core.js b/tests/unit/autocomplete/autocomplete_core.js
index 9b8709abb..fcd835d1a 100644
--- a/tests/unit/autocomplete/autocomplete_core.js
+++ b/tests/unit/autocomplete/autocomplete_core.js
@@ -23,7 +23,7 @@ test("close-on-blur is properly delayed", function() {
same( $(".ui-menu:visible").length, 0 );
start();
}, 200);
-})
+});
test("close-on-blur is cancelled when starting a search", function() {
var ac = $("#autocomplete").autocomplete({
@@ -38,6 +38,35 @@ test("close-on-blur is cancelled when starting a search", function() {
same( $(".ui-menu:visible").length, 1 );
start();
}, 200);
-})
+});
+
+test( "prevent form submit on enter when menu is active", function() {
+ var event;
+ var ac = $( "#autocomplete" ).autocomplete({
+ source: [ "java", "javascript" ]
+ }).val( "ja" ).autocomplete( "search" );
+
+ event = $.Event( "keydown" );
+ event.keyCode = $.ui.keyCode.DOWN;
+ ac.trigger( event );
+ same( $( ".ui-menu-item:has(.ui-state-hover)" ).length, 1, "menu item is active" );
+
+ event = $.Event( "keydown" );
+ event.keyCode = $.ui.keyCode.ENTER;
+ ac.trigger( event );
+ ok( event.isDefaultPrevented(), "default action is prevented" );
+});
+
+test( "allow form submit on enter when menu is not active", function() {
+ var event;
+ var ac = $( "#autocomplete" ).autocomplete({
+ source: [ "java", "javascript" ]
+ }).val( "ja" ).autocomplete( "search" );
+
+ event = $.Event( "keydown" );
+ event.keyCode = $.ui.keyCode.ENTER;
+ ac.trigger( event );
+ ok( !event.isDefaultPrevented(), "default action is prevented" );
+});
})(jQuery);
diff --git a/tests/unit/autocomplete/autocomplete_defaults.js b/tests/unit/autocomplete/autocomplete_defaults.js
index c6017d62c..fc92f3209 100644
--- a/tests/unit/autocomplete/autocomplete_defaults.js
+++ b/tests/unit/autocomplete/autocomplete_defaults.js
@@ -3,10 +3,16 @@
*/
var autocomplete_defaults = {
+ appendTo: "body",
delay: 300,
disabled: false,
minLength: 1,
- source: undefined
+ position: {
+ my: "left top",
+ at: "left bottom",
+ collision: "none"
+ },
+ source: null
};
commonWidgetTests('autocomplete', { defaults: autocomplete_defaults });
diff --git a/tests/unit/autocomplete/autocomplete_events.js b/tests/unit/autocomplete/autocomplete_events.js
index a8924e192..95a86425c 100644
--- a/tests/unit/autocomplete/autocomplete_events.js
+++ b/tests/unit/autocomplete/autocomplete_events.js
@@ -28,7 +28,7 @@ test("all events", function() {
},
close: function(event) {
same(event.type, "autocompleteclose");
- same( $(".ui-menu:visible").length, 1 );
+ same( $(".ui-menu:visible").length, 0 );
},
select: function(event, ui) {
same(event.type, "autocompleteselect");
diff --git a/tests/unit/autocomplete/autocomplete_options.js b/tests/unit/autocomplete/autocomplete_options.js
index c5aa7c961..2800fbab8 100644
--- a/tests/unit/autocomplete/autocomplete_options.js
+++ b/tests/unit/autocomplete/autocomplete_options.js
@@ -68,6 +68,36 @@ test("cache: false", function() {
var data = ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby", "python", "c", "scala", "groovy", "haskell", "perl"];
+test( "appendTo", function() {
+ var ac = $( "#autocomplete" ).autocomplete();
+ same( ac.autocomplete( "widget" ).parent()[0], document.body, "defaults to body" );
+ ac.autocomplete( "destroy" );
+
+ ac.autocomplete({
+ appendTo: "#ac-wrap2"
+ });
+ same( ac.autocomplete( "widget" ).parent()[0], $( "#ac-wrap2" )[0], "id" );
+ ac.autocomplete( "destroy" );
+
+ ac.autocomplete({
+ appendTo: ".ac-wrap"
+ });
+ same( ac.autocomplete( "widget" ).parent()[0], $( "#ac-wrap1" )[0], "class" );
+ same( $( "#ac-wrap2 .ui-autocomplete").length, 0, "class - only appends to one element")
+ ac.autocomplete( "destroy" );
+
+ ac.autocomplete({
+ appendTo: null
+ });
+ same( ac.autocomplete( "widget" ).parent()[0], document.body, "null" );
+ ac.autocomplete( "destroy" );
+
+ ac.autocomplete().autocomplete( "option", "appendTo", "#ac-wrap1" );
+ same( ac.autocomplete( "widget" ).parent()[0], $( "#ac-wrap1" )[0], "modified after init" );
+ ac.autocomplete( "destroy" );
+});
+
+
test("delay", function() {
var ac = $("#autocomplete").autocomplete({
source: data,
@@ -86,6 +116,24 @@ test("delay", function() {
}, 100);
});
+test("disabled", function() {
+ var ac = $("#autocomplete").autocomplete({
+ source: data,
+ delay: 0,
+ disabled: true
+ });
+ ac.val("ja").keydown();
+
+ same( $(".ui-menu:visible").length, 0 );
+
+ stop();
+ setTimeout(function() {
+ same( $(".ui-menu:visible").length, 0 );
+ ac.autocomplete("destroy");
+ start();
+ }, 50);
+});
+
test("minLength", function() {
var ac = $("#autocomplete").autocomplete({
source: data
diff --git a/tests/unit/button/button.html b/tests/unit/button/button.html
index 7c6d05977..fde94be72 100644
--- a/tests/unit/button/button.html
+++ b/tests/unit/button/button.html
@@ -6,7 +6,7 @@
<link type="text/css" href="../../../themes/base/jquery.ui.button.css" rel="stylesheet" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.button.js"></script>
@@ -23,6 +23,7 @@
<script type="text/javascript" src="button_options.js"></script>
<script type="text/javascript" src="button_tickets.js"></script>
+ <script type="text/javascript" src="../swarminject.js"></script>
</head>
<body>
diff --git a/tests/unit/button/button_defaults.js b/tests/unit/button/button_defaults.js
index e1657854a..b81fa7cbb 100644
--- a/tests/unit/button/button_defaults.js
+++ b/tests/unit/button/button_defaults.js
@@ -3,7 +3,7 @@
*/
var button_defaults = {
- disabled: false,
+ disabled: null,
text: true,
label: null,
icons: {
diff --git a/tests/unit/button/button_options.js b/tests/unit/button/button_options.js
index 6ee8ab541..5b25ecd63 100644
--- a/tests/unit/button/button_options.js
+++ b/tests/unit/button/button_options.js
@@ -5,6 +5,30 @@
module("button: options");
+test("disabled, explicity value", function() {
+ $("#radio01").button({ disabled: false });
+ same(false, $("#radio01").button("option", "disabled"),
+ "disabled option set to false");
+ same(false, $("#radio01").attr("disabled"), "element is disabled");
+
+ $("#radio02").button({ disabled: true });
+ same(true, $("#radio02").button("option", "disabled"),
+ "disabled option set to true");
+ same(true, $("#radio02").attr("disabled"), "element is not disabled");
+});
+
+test("disabled, null", function() {
+ $("#radio01").button({ disabled: null });
+ same(false, $("#radio01").button("option", "disabled"),
+ "disabled option set to false");
+ same(false, $("#radio01").attr("disabled"), "element is disabled");
+
+ $("#radio02").attr("disabled", "disabled").button({ disabled: null });
+ same(true, $("#radio02").button("option", "disabled"),
+ "disabled option set to true");
+ same(true, $("#radio02").attr("disabled"), "element is not disabled");
+});
+
test("text false without icon", function() {
$("#button").button({
text: false
diff --git a/tests/unit/button/button_tickets.js b/tests/unit/button/button_tickets.js
index 7f972513d..5c5053ded 100644
--- a/tests/unit/button/button_tickets.js
+++ b/tests/unit/button/button_tickets.js
@@ -1,10 +1,23 @@
/*
* button_tickets.js
*/
-(function($) {
+(function( $ ) {
-module("button: tickets");
+module( "button: tickets" );
+test( "#5946 - buttonset should ignore buttons that are not :visible", function() {
+ $( "#radio01" ).next().andSelf().hide();
+ var set = $( "#radio0" ).buttonset({ items: ":radio:visible" });
+ ok( set.find( "label:eq(0)" ).is( ":not(.ui-button):not(.ui-corner-left)" ) );
+ ok( set.find( "label:eq(1)" ).is( ".ui-button.ui-corner-left" ) );
+});
+test( "#6262 - buttonset not applying ui-corner to invisible elements", function() {
+ $( "#radio0" ).hide();
+ var set = $( "#radio0" ).buttonset();
+ ok( set.find( "label:eq(0)" ).is( ".ui-button.ui-corner-left" ) );
+ ok( set.find( "label:eq(1)" ).is( ".ui-button" ) );
+ ok( set.find( "label:eq(2)" ).is( ".ui-button.ui-corner-right" ) );
+});
-})(jQuery);
+})( jQuery );
diff --git a/tests/unit/core/core.html b/tests/unit/core/core.html
index 468c962e5..a53056470 100644
--- a/tests/unit/core/core.html
+++ b/tests/unit/core/core.html
@@ -4,28 +4,19 @@
<meta charset="UTF-8" />
<title>jQuery UI Core Test Suite</title>
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<link rel="stylesheet" href="../../../external/qunit.css" type="text/css"/>
<script type="text/javascript" src="../../../external/qunit.js"></script>
<script type="text/javascript" src="../../jquery.simulate.js"></script>
+ <script type="text/javascript" src="../testsuite.js"></script>
<script type="text/javascript" src="core.js"></script>
<script type="text/javascript" src="selector.js"></script>
- <script type="text/javascript">
- // disable this stale testsuite for testswarm only
- var url = window.location.search;
- url = decodeURIComponent( url.slice( url.indexOf("swarmURL=") + 9 ) );
- if ( url && url.indexOf("http") == 0 ) {
- // reset config to kill previous tests; make sure testsuite.js is loaded afterwards to init the testswarm script
- QUnit.init();
- test("core", function() { ok(true, "disabled core testsuite"); });
- }
- </script>
- <script type="text/javascript" src="../testsuite.js"></script>
+ <script type="text/javascript" src="../swarminject.js"></script>
<style type="text/css">
.zindex {z-index: 100}
@@ -42,6 +33,17 @@
<div id="main" style="position: absolute; top: -10000px; left: -10000px;">
+ <img src="../images/jqueryui_32x32.png" usemap="#mymap" width="10", height="10">
+ <map name="mymap">
+ <area shape="rect" coords="0,0,1,1" id="areaCoordsNoHref">
+ <area shape="rect" coords="1,1,2,2" href="foo.html" id="areaCoordsHref">
+ <area shape="rect" coords="0,0,0,0" href="foo.html" id="areaCoordsNoSizeHref">
+ <area href="foo.html" id="areaNoCoordsHref">
+ </map>
+ <map name="mymap2">
+ <area shape="rect" coords="1,1,2,2" href="foo.html" id="areaNoImg">
+ </map>
+
<div>
<input id="visibleAncestor-inputTypeNone" />
<input type="text" id="visibleAncestor-inputTypeText" />
@@ -54,13 +56,9 @@
<option>option</option>
</select>
<textarea id="visibleAncestor-textarea">x</textarea>
- <object id="visibleAncestor-object">xxx</object>
+ <object id="visibleAncestor-object" codebase="about:blank">xxx</object>
<a href="#" id="visibleAncestor-anchorWithHref">anchor</a>
<a id="visibleAncestor-anchorWithoutHref">anchor</a>
- <map>
- <area href="#" id="visibleAncestor-areaWithHref" alt="" />
- <area id="visibleAncestor-areaWithoutHref" alt="" />
- </map>
<span id="visibleAncestor-span">x</span>
<div id="visibleAncestor-div">x</div>
<span id="visibleAncestor-spanWithTabindex" tabindex="1">x</span>
@@ -82,19 +80,19 @@
<div>
<div id="displayNoneAncestor" style="display: none;">
<input id="displayNoneAncestor-input" />
- <span tabindex="1" id="displayNoneAncestor-span"></span>
+ <span tabindex="1" id="displayNoneAncestor-span">.</span>
</div>
<div id="visibilityHiddenAncestor" style="visibility: hidden;">
<input id="visibilityHiddenAncestor-input" />
- <span tabindex="1" id="visibilityHiddenAncestor-span"></span>
+ <span tabindex="1" id="visibilityHiddenAncestor-span">.</span>
</div>
+ <span tabindex="1" id="displayNone-span" style="display: none;">.</span>
+ <span tabindex="1" id="visibilityHidden-span" style="visibility: hidden;">.</span>
+
<input id="displayNone-input" style="display: none;" />
<input id="visibilityHidden-input" style="visibility: hidden;" />
-
- <span tabindex="1" id="displayNone-span" style="display: none;"></span>
- <span tabindex="1" id="visibilityHidden-span" style="visibility: hidden;"></span>
</div>
<div>
@@ -103,32 +101,32 @@
<input id="inputTabindex-1" tabindex="-1" />
<input id="inputTabindex-50" tabindex="-50" />
- <span id="spanTabindex0" tabindex="0"></span>
- <span id="spanTabindex10" tabindex="10"></span>
- <span id="spanTabindex-1" tabindex="-1"></span>
- <span id="spanTabindex-50" tabindex="-50"></span>
+ <span id="spanTabindex0" tabindex="0">.</span>
+ <span id="spanTabindex10" tabindex="10">.</span>
+ <span id="spanTabindex-1" tabindex="-1">.</span>
+ <span id="spanTabindex-50" tabindex="-50">.</span>
</div>
<div>
<input id="inputTabindexfoo" tabindex="foo" />
<input id="inputTabindex3foo" tabindex="3foo" />
- <span id="spanTabindexfoo" tabindex="foo"></span>
- <span id="spanTabindex3foo" tabindex="3foo"></span>
+ <span id="spanTabindexfoo" tabindex="foo">.</span>
+ <span id="spanTabindex3foo" tabindex="3foo">.</span>
</div>
- <div id="aria"></div>
-
<div id="zIndex100" style="z-index: 100; position: absolute">
- <div id="zIndexAutoWithParent"></div>
+ <div id="zIndexAutoWithParent">.</div>
</div>
<div id="zIndex100ViaCSS" class="zindex">
- <div id="zIndexAutoWithParentViaCSS"></div>
+ <div id="zIndexAutoWithParentViaCSS">.</div>
</div>
<div id="zIndex100ViaCSSPositioned" class="zindex absolute">
- <div id="zIndexAutoWithParentViaCSSPositioned"></div>
+ <div id="zIndexAutoWithParentViaCSSPositioned">.</div>
</div>
<div id="zIndexAutoNoParent"></div>
+
+ <div id="dimensions" style="float: left; height: 50px; width: 100px; margin: 1px 12px 11px 2px; border-style: solid; border-width: 3px 14px 13px 4px; padding: 5px 16px 15px 6px;"></div>
</div>
</body>
diff --git a/tests/unit/core/core.js b/tests/unit/core/core.js
index df811093b..03a7ab810 100644
--- a/tests/unit/core/core.js
+++ b/tests/unit/core/core.js
@@ -5,47 +5,27 @@
module('core - jQuery extensions');
-test("attr - aria", function() {
- expect(6);
-
- var el = $('#aria');
-
- ok(!el.attr('role'), 'role is empty via attr');
- equals(el.attr('role', 'tablist').attr('role'), 'tablist', 'role is tablist');
-
- equals(el.attr('aria-expanded'), undefined, 'aria expanded is undefined');
-
- el.attr('aria-expanded', true);
- equals(el.attr('aria-expanded'), 'true', 'aria expanded is true');
-
- el.removeAttr('aria-expanded');
- equals(el.attr('aria-expanded'), undefined, 'aria expanded is undefined after removing');
-
- el.attr('aria-expanded', false);
- equals(el.attr('aria-expanded'), 'false', 'aria expanded is false');
+test('focus - original functionality', function() {
+ expect(1);
+
+ $('#inputTabindex0')
+ .focus(function() {
+ ok(true, 'event triggered');
+ })
+ .focus();
});
-test('focus', function() {
- expect(3);
-
- var el = $('#inputTabindex0'),
- // used to remove focus from the main element
- other = $('#inputTabindex10');
-
- // test original functionality
- el.focus(function() {
- ok(true, 'event triggered');
- });
- el.focus();
- other.focus();
-
- // trigger event handler + callback
- stop();
- el.focus(500, function() {
- ok(true, 'callback triggered');
- start();
- });
- other.focus();
+asyncTest('focus', function() {
+ expect(2);
+ $('#inputTabindex0')
+ .focus(function() {
+ ok(true, 'event triggered');
+ })
+ .focus(500, function() {
+ ok(true, 'callback triggered');
+ $(this).unbind('focus');
+ start();
+ });
});
test('zIndex', function() {
@@ -66,4 +46,112 @@ test('zIndex', function() {
equals($('#zIndexAutoNoParent').zIndex(), 0, 'zIndex never explicitly set in hierarchy');
});
+test( "innerWidth - getter", function() {
+ var el = $( "#dimensions" );
+
+ equals( el.innerWidth(), 122, "getter passthru" );
+ el.hide();
+ equals( el.innerWidth(), 122, "getter passthru when hidden" );
+});
+
+test( "innerWidth - setter", function() {
+ var el = $( "#dimensions" );
+
+ el.innerWidth( 120 );
+ equals( el.width(), 98, "width set properly" );
+ el.hide();
+ el.innerWidth( 100 );
+ equals( el.width(), 78, "width set properly when hidden" );
+});
+
+test( "innerHeight - getter", function() {
+ var el = $( "#dimensions" );
+
+ equals( el.innerHeight(), 70, "getter passthru" );
+ el.hide();
+ equals( el.innerHeight(), 70, "getter passthru when hidden" );
+});
+
+test( "innerHeight - setter", function() {
+ var el = $( "#dimensions" );
+
+ el.innerHeight( 60 );
+ equals( el.height(), 40, "height set properly" );
+ el.hide();
+ el.innerHeight( 50 );
+ equals( el.height(), 30, "height set properly when hidden" );
+});
+
+test( "outerWidth - getter", function() {
+ var el = $( "#dimensions" );
+
+ equals( el.outerWidth(), 140, "getter passthru" );
+ el.hide();
+ equals( el.outerWidth(), 140, "getter passthru when hidden" );
+});
+
+test( "outerWidth - setter", function() {
+ var el = $( "#dimensions" );
+
+ el.outerWidth( 130 );
+ equals( el.width(), 90, "width set properly" );
+ el.hide();
+ el.outerWidth( 120 );
+ equals( el.width(), 80, "width set properly when hidden" );
+});
+
+test( "outerWidth(true) - getter", function() {
+ var el = $( "#dimensions" );
+
+ equals( el.outerWidth(true), 154, "getter passthru w/ margin" );
+ el.hide();
+ equals( el.outerWidth(true), 154, "getter passthru w/ margin when hidden" );
+});
+
+test( "outerWidth(true) - setter", function() {
+ var el = $( "#dimensions" );
+
+ el.outerWidth( 130, true );
+ equals( el.width(), 76, "width set properly" );
+ el.hide();
+ el.outerWidth( 120, true );
+ equals( el.width(), 66, "width set properly when hidden" );
+});
+
+test( "outerHeight - getter", function() {
+ var el = $( "#dimensions" );
+
+ equals( el.outerHeight(), 86, "getter passthru" );
+ el.hide();
+ equals( el.outerHeight(), 86, "getter passthru when hidden" );
+});
+
+test( "outerHeight - setter", function() {
+ var el = $( "#dimensions" );
+
+ el.outerHeight( 80 );
+ equals( el.height(), 44, "height set properly" );
+ el.hide();
+ el.outerHeight( 70 );
+ equals( el.height(), 34, "height set properly when hidden" );
+});
+
+test( "outerHeight(true) - getter", function() {
+ var el = $( "#dimensions" );
+
+ equals( el.outerHeight(true), 98, "getter passthru w/ margin" );
+ el.hide();
+ equals( el.outerHeight(true), 98, "getter passthru w/ margin when hidden" );
+});
+
+test( "outerHeight(true) - setter", function() {
+ var el = $( "#dimensions" );
+
+ el.outerHeight( 90, true );
+ equals( el.height(), 42, "height set properly" );
+ el.hide();
+ el.outerHeight( 80, true );
+ equals( el.height(), 32, "height set properly when hidden" );
+});
+
})(jQuery);
diff --git a/tests/unit/core/selector.js b/tests/unit/core/selector.js
index 269b77e08..e7b7f9b6c 100644
--- a/tests/unit/core/selector.js
+++ b/tests/unit/core/selector.js
@@ -79,7 +79,7 @@ test("data", function() {
});
test("focusable - visible, enabled elements", function() {
- expect(18);
+ expect(16);
isFocusable('#visibleAncestor-inputTypeNone', 'input, no type');
isFocusable('#visibleAncestor-inputTypeText', 'input, type text');
@@ -93,9 +93,6 @@ test("focusable - visible, enabled elements", function() {
isFocusable('#visibleAncestor-object', 'object');
isFocusable('#visibleAncestor-anchorWithHref', 'anchor with href');
isNotFocusable('#visibleAncestor-anchorWithoutHref', 'anchor without href');
- // fails: $("map").is(":visible") and $("map").is(":hidden") both return true
- isFocusable('#visibleAncestor-areaWithHref', 'area with href');
- isNotFocusable('#visibleAncestor-areaWithoutHref', 'area without href');
isNotFocusable('#visibleAncestor-span', 'span');
isNotFocusable('#visibleAncestor-div', 'div');
isFocusable("#visibleAncestor-spanWithTabindex", 'span with tabindex');
@@ -132,7 +129,7 @@ test("focusable - hidden styles", function() {
isNotFocusable('#visibilityHidden-span', 'span with tabindex, visibility: hidden');
});
-test("focusable - natively focusable with various tabindex", function() {
+test("focusable - natively focusable with various tabindex", function() {
expect(4);
isFocusable('#inputTabindex0', 'input, tabindex 0');
@@ -141,7 +138,7 @@ test("focusable - natively focusable with various tabindex", function() {
isFocusable('#inputTabindex-50', 'input, tabindex -50');
});
-test("focusable - not natively focusable with various tabindex", function() {
+test("focusable - not natively focusable with various tabindex", function() {
expect(4);
isFocusable('#spanTabindex0', 'span, tabindex 0');
@@ -159,8 +156,16 @@ test("focusable - invalid tabindex", function() {
isNotFocusable('#spanTabindex3foo', 'span, tabindex 3foo');
});
+test("focusable - area elements", function() {
+ isNotFocusable('#areaCoordsNoHref', 'coords but no href');
+ isFocusable('#areaCoordsHref', 'coords and href');
+ isFocusable('#areaCoordsNoSizeHref', 'coords of zero px and href');
+ isFocusable('#areaNoCoordsHref', 'href but no coords');
+ isNotFocusable('#areaNoImg', 'not associated with an image');
+});
+
test("tabbable - visible, enabled elements", function() {
- expect(18);
+ expect(16);
isTabbable('#visibleAncestor-inputTypeNone', 'input, no type');
isTabbable('#visibleAncestor-inputTypeText', 'input, type text');
@@ -174,16 +179,13 @@ test("tabbable - visible, enabled elements", function() {
isTabbable('#visibleAncestor-object', 'object');
isTabbable('#visibleAncestor-anchorWithHref', 'anchor with href');
isNotTabbable('#visibleAncestor-anchorWithoutHref', 'anchor without href');
- // fails: $("map").is(":visible") and $("map").is(":hidden") both return true
- isTabbable('#visibleAncestor-areaWithHref', 'area with href');
- isNotTabbable('#visibleAncestor-areaWithoutHref', 'area without href');
isNotTabbable('#visibleAncestor-span', 'span');
isNotTabbable('#visibleAncestor-div', 'div');
isTabbable("#visibleAncestor-spanWithTabindex", 'span with tabindex');
isNotTabbable("#visibleAncestor-divWithNegativeTabindex", 'div with tabindex');
});
-test("Tabbable - disabled elements", function() {
+test("tabbable - disabled elements", function() {
expect(9);
isNotTabbable('#disabledElement-inputTypeNone', 'input, no type');
@@ -197,25 +199,23 @@ test("Tabbable - disabled elements", function() {
isNotTabbable('#disabledElement-textarea', 'textarea');
});
-test("Tabbable - hidden styles", function() {
+test("tabbable - hidden styles", function() {
expect(8);
isNotTabbable('#displayNoneAncestor-input', 'input, display: none parent');
isNotTabbable('#displayNoneAncestor-span', 'span with tabindex, display: none parent');
- // fails: element hidden by parent-visibility-hidden is still visible according to :visible
isNotTabbable('#visibilityHiddenAncestor-input', 'input, visibility: hidden parent');
isNotTabbable('#visibilityHiddenAncestor-span', 'span with tabindex, visibility: hidden parent');
isNotTabbable('#displayNone-input', 'input, display: none');
- // fails: element hidden by parent-visibility-hidden is still visible according to :visible
isNotTabbable('#visibilityHidden-input', 'input, visibility: hidden');
isNotTabbable('#displayNone-span', 'span with tabindex, display: none');
isNotTabbable('#visibilityHidden-span', 'span with tabindex, visibility: hidden');
});
-test("Tabbable - natively tabbable with various tabindex", function() {
+test("tabbable - natively tabbable with various tabindex", function() {
expect(4);
isTabbable('#inputTabindex0', 'input, tabindex 0');
@@ -224,7 +224,7 @@ test("Tabbable - natively tabbable with various tabindex", function() {
isNotTabbable('#inputTabindex-50', 'input, tabindex -50');
});
-test("Tabbable - not natively tabbable with various tabindex", function() {
+test("tabbable - not natively tabbable with various tabindex", function() {
expect(4);
isTabbable('#spanTabindex0', 'span, tabindex 0');
@@ -233,7 +233,7 @@ test("Tabbable - not natively tabbable with various tabindex", function() {
isNotTabbable('#spanTabindex-50', 'span, tabindex -50');
});
-test("Tabbable - invalid tabindex", function() {
+test("tabbable - invalid tabindex", function() {
expect(4);
isTabbable('#inputTabindexfoo', 'input, tabindex foo');
@@ -242,4 +242,12 @@ test("Tabbable - invalid tabindex", function() {
isNotTabbable('#spanTabindex3foo', 'span, tabindex 3foo');
});
+test("tabbable - area elements", function() {
+ isNotTabbable('#areaCoordsNoHref', 'coords but no href');
+ isTabbable('#areaCoordsHref', 'coords and href');
+ isTabbable('#areaCoordsNoSizeHref', 'coords of zero px and href');
+ isTabbable('#areaNoCoordsHref', 'href but no coords');
+ isNotTabbable('#areaNoImg', 'not associated with an image');
+});
+
})(jQuery);
diff --git a/tests/unit/datepicker/datepicker.html b/tests/unit/datepicker/datepicker.html
index 9354e7b99..e7ff03e2d 100644
--- a/tests/unit/datepicker/datepicker.html
+++ b/tests/unit/datepicker/datepicker.html
@@ -6,7 +6,7 @@
<link type="text/css" href="../../../themes/base/jquery.ui.datepicker.css" rel="stylesheet" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.datepicker.js"></script>
@@ -16,6 +16,7 @@
<link rel="stylesheet" href="../../../external/qunit.css" type="text/css"/>
<script type="text/javascript" src="../../../external/qunit.js"></script>
<script type="text/javascript" src="../../jquery.simulate.js"></script>
+ <script type="text/javascript" src="../testsuite.js"></script>
<script type="text/javascript" src="datepicker_core.js"></script>
<script type="text/javascript" src="datepicker_defaults.js"></script>
@@ -34,7 +35,7 @@
test("datepicker", function() { ok(true, "disabled datepicker testsuite"); });
}
</script>
- <script type="text/javascript" src="../testsuite.js"></script>
+ <script type="text/javascript" src="../swarminject.js"></script>
</head>
<body>
diff --git a/tests/unit/datepicker/datepicker_options.js b/tests/unit/datepicker/datepicker_options.js
index 2769bc582..af561a783 100644
--- a/tests/unit/datepicker/datepicker_options.js
+++ b/tests/unit/datepicker/datepicker_options.js
@@ -470,6 +470,10 @@ test('setDate', function() {
equalsDate(inp.datepicker('getDate'), minDate, 'Set date min/max - setDate < min');
inp.datepicker('setDate', date2);
equalsDate(inp.datepicker('getDate'), maxDate, 'Set date min/max - setDate > max');
+ var dateAndTimeToSet = new Date(2008, 3 - 1, 28, 1, 11, 0);
+ var dateAndTimeClone = new Date(2008, 3 - 1, 28, 1, 11, 0);
+ inp.datepicker('setDate', dateAndTimeToSet);
+ equals(dateAndTimeToSet.getTime(), dateAndTimeClone.getTime(), 'Date object passed should not be changed by setDate');
});
test('altField', function() {
@@ -710,7 +714,7 @@ test('localisation', function() {
equals($('.ui-datepicker-close', dp).text(), 'Fermer', 'Localisation - close');
$('.ui-datepicker-close', dp).simulate('mouseover');
equals($('.ui-datepicker-prev', dp).text(), '<Préc', 'Localisation - previous');
- equals($('.ui-datepicker-current', dp).text(), 'Courant', 'Localisation - current');
+ equals($('.ui-datepicker-current', dp).text(), 'Aujourd\'hui', 'Localisation - current');
equals($('.ui-datepicker-next', dp).text(), 'Suiv>', 'Localisation - next');
var month = 0;
$('.ui-datepicker-month option', dp).each(function() {
@@ -777,12 +781,12 @@ test('parseDate', function() {
new Date(2001, 12 - 1, 13), 'Parse date d m y');
equalsDate($.datepicker.parseDate('dd mm yy', '13 12 2001'),
new Date(2001, 12 - 1, 13), 'Parse date dd mm yy');
- equalsDate($.datepicker.parseDate('y-o', '2001-34'),
+ equalsDate($.datepicker.parseDate('y-o', '01-34'),
new Date(2001, 2 - 1, 3), 'Parse date y-o');
equalsDate($.datepicker.parseDate('yy-oo', '2001-347'),
- new Date(2001, 12 - 1, 13), 'Parse date yy oo');
+ new Date(2001, 12 - 1, 13), 'Parse date yy-oo');
equalsDate($.datepicker.parseDate('oo yy', '348 2004'),
- new Date(2004, 12 - 1, 13), 'Parse date oo-yy');
+ new Date(2004, 12 - 1, 13), 'Parse date oo yy');
equalsDate($.datepicker.parseDate('D d M y', 'Sat 3 Feb 01'),
new Date(2001, 2 - 1, 3), 'Parse date D d M y');
equalsDate($.datepicker.parseDate('d MM DD yy', '3 February Saturday 2001'),
@@ -792,6 +796,8 @@ test('parseDate', function() {
equalsDate($.datepicker.parseDate('\'day\' d \'of\' MM (\'\'DD\'\'), yy',
'day 3 of February (\'Saturday\'), 2001'), new Date(2001, 2 - 1, 3),
'Parse date \'day\' d \'of\' MM (\'\'DD\'\'), yy');
+ equalsDate($.datepicker.parseDate('ymmdd', '010203'),
+ new Date(2001, 2 - 1, 3), 'Parse date ymmdd - default cutoff');
equalsDate($.datepicker.parseDate('y-m-d', '01-02-03'),
new Date(2001, 2 - 1, 3), 'Parse date y-m-d - default cutoff');
equalsDate($.datepicker.parseDate('y-m-d', '51-02-03'),
@@ -845,8 +851,8 @@ test('parseDateErrors', function() {
'3 2 AD01 - d m y', 'Missing number at position 4');
expectError(function() { $.datepicker.parseDate('d m yy', '3 2 AD01'); },
'3 2 AD01 - dd mm yy', 'Missing number at position 4');
- expectError(function() { $.datepicker.parseDate('y-o', '2001-D01'); },
- '2001-D01 - y-o', 'Missing number at position 5');
+ expectError(function() { $.datepicker.parseDate('y-o', '01-D01'); },
+ '2001-D01 - y-o', 'Missing number at position 3');
expectError(function() { $.datepicker.parseDate('yy-oo', '2001-D01'); },
'2001-D01 - yy-oo', 'Missing number at position 5');
expectError(function() { $.datepicker.parseDate('D d M y', 'D7 3 Feb 01'); },
diff --git a/tests/unit/datepicker/datepicker_tickets.js b/tests/unit/datepicker/datepicker_tickets.js
index 85598f949..d00dc912c 100644
--- a/tests/unit/datepicker/datepicker_tickets.js
+++ b/tests/unit/datepicker/datepicker_tickets.js
@@ -15,17 +15,17 @@ test('beforeShowDay-getDate', function() {
var inp = init('#inp', {beforeShowDay: function(date) { inp.datepicker('getDate'); return [true, '']; }});
var dp = $('#ui-datepicker-div');
inp.val('01/01/2010').datepicker('show');
- // result has line-break instead of space inbetween, therefore comparsion fails
- equals($('div.ui-datepicker-title').text(), 'January 2010', 'Initial month');
+ // contains non-breaking space
+ equals($('div.ui-datepicker-title').text(), 'January 2010', 'Initial month');
$('a.ui-datepicker-next', dp).click();
$('a.ui-datepicker-next', dp).click();
- // fails, see above
- equals($('div.ui-datepicker-title').text(), 'March 2010', 'After next clicks');
+ // contains non-breaking space
+ equals($('div.ui-datepicker-title').text(), 'March 2010', 'After next clicks');
inp.datepicker('hide').datepicker('show');
$('a.ui-datepicker-prev', dp).click();
$('a.ui-datepicker-prev', dp).click();
- // fails, see above
- equals($('div.ui-datepicker-title').text(), 'November 2009', 'After prev clicks');
+ // contains non-breaking space
+ equals($('div.ui-datepicker-title').text(), 'November 2009', 'After prev clicks');
inp.datepicker('hide');
});
diff --git a/tests/unit/defaults.html b/tests/unit/defaults.html
index 48461cd06..43cfba4e1 100644
--- a/tests/unit/defaults.html
+++ b/tests/unit/defaults.html
@@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<title>jQuery UI Defaults</title>
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../external/jquery.cookie.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
diff --git a/tests/unit/dialog/dialog.html b/tests/unit/dialog/dialog.html
index 97a5d44cd..c8252d54a 100644
--- a/tests/unit/dialog/dialog.html
+++ b/tests/unit/dialog/dialog.html
@@ -6,8 +6,8 @@
<link type="text/css" href="../../../themes/base/jquery.ui.dialog.css" rel="stylesheet" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.1.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
+ <script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.2.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
@@ -19,6 +19,7 @@
<link rel="stylesheet" href="../../../external/qunit.css" type="text/css"/>
<script type="text/javascript" src="../../../external/qunit.js"></script>
<script type="text/javascript" src="../../jquery.simulate.js"></script>
+ <script type="text/javascript" src="../testsuite.js"></script>
<script type="text/javascript" src="dialog_core.js"></script>
<script type="text/javascript" src="dialog_defaults.js"></script>
@@ -27,17 +28,7 @@
<script type="text/javascript" src="dialog_options.js"></script>
<script type="text/javascript" src="dialog_tickets.js"></script>
- <script type="text/javascript">
- // disable this stale testsuite for testswarm only
- var url = window.location.search;
- url = decodeURIComponent( url.slice( url.indexOf("swarmURL=") + 9 ) );
- if ( url && url.indexOf("http") == 0 ) {
- // reset config to kill previous tests; make sure testsuite.js is loaded afterwards to init the testswarm script
- QUnit.init();
- test("dialog", function() { ok(true, "disabled dialog testsuite"); });
- }
- </script>
- <script type="text/javascript" src="../testsuite.js"></script>
+ <script type="text/javascript" src="../swarminject.js"></script>
</head>
<body>
diff --git a/tests/unit/dialog/dialog_core.js b/tests/unit/dialog/dialog_core.js
index 4618417f0..aec3e22be 100644
--- a/tests/unit/dialog/dialog_core.js
+++ b/tests/unit/dialog/dialog_core.js
@@ -88,23 +88,6 @@ function margin(el, side) {
module("dialog: core");
-test("element types", function() {
- var typeNames = ('p,h1,h2,h3,h4,h5,h6,blockquote,ol,ul,dl,div,form'
- + ',table,fieldset,address,ins,del,em,strong,q,cite,dfn,abbr'
- + ',acronym,code,samp,kbd,var,img,object,hr'
- + ',input,button,label,select,iframe').split(',');
-
- $.each(typeNames, function(i) {
- var typeName = typeNames[i];
- el = $(document.createElement(typeName)).appendTo('body');
- (typeName == 'table' && el.append("<tr><td>content</td></tr>"));
- el.dialog();
- ok(true, '$("&lt;' + typeName + '/&gt").dialog()');
- el.dialog("destroy");
- el.remove();
- });
-});
-
test("title id", function() {
expect(3);
diff --git a/tests/unit/dialog/dialog_defaults.js b/tests/unit/dialog/dialog_defaults.js
index 999021d95..612fd58c8 100644
--- a/tests/unit/dialog/dialog_defaults.js
+++ b/tests/unit/dialog/dialog_defaults.js
@@ -17,7 +17,13 @@ var dialog_defaults = {
minHeight: 150,
minWidth: 150,
modal: false,
- position: 'center',
+ position: {
+ my: 'center',
+ at: 'center',
+ of: window,
+ collision: 'fit',
+ using: $.ui.dialog.prototype.options.position.using
+ },
resizable: true,
show: null,
stack: true,
diff --git a/tests/unit/dialog/dialog_events.js b/tests/unit/dialog/dialog_events.js
index e2b7bd9ee..40a8575b6 100644
--- a/tests/unit/dialog/dialog_events.js
+++ b/tests/unit/dialog/dialog_events.js
@@ -6,11 +6,12 @@
module("dialog: events");
test("open", function() {
- expect(11);
+ expect(13);
el = $("<div></div>");
el.dialog({
open: function(ev, ui) {
+ ok(el.data("dialog")._isOpen, "interal _isOpen flag is set");
ok(true, 'autoOpen: true fires open callback');
equals(this, el[0], "context of callback");
equals(ev.type, 'dialogopen', 'event type in callback');
@@ -29,6 +30,7 @@ test("open", function() {
same(ui, {}, 'ui hash in callback');
}
}).bind('dialogopen', function(ev, ui) {
+ ok(el.data("dialog")._isOpen, "interal _isOpen flag is set");
ok(true, 'dialog("open") fires open event');
equals(this, el[0], 'context of event');
same(ui, {}, 'ui hash in event');
@@ -210,38 +212,6 @@ test("close", function() {
el.remove();
});
-//handling of deprecated beforeclose (vs beforeClose) option
-//Ticket #4669 http://dev.jqueryui.com/ticket/4669
-//TODO: remove in 1.9pre
-test("beforeclose", function() {
- expect(10);
-
- el = $('<div></div>').dialog({
- beforeclose: function(ev, ui) {
- ok(true, '.dialog("close") fires beforeClose callback');
- equals(this, el[0], "context of callback");
- equals(ev.type, 'dialogbeforeclose', 'event type in callback');
- same(ui, {}, 'ui hash in callback');
- return false;
- }
- });
- el.dialog('close');
- isOpen('beforeclose (deprecated) callback should prevent dialog from closing');
- el.remove();
-
- el = $('<div></div>').dialog();
- el.dialog('option', 'beforeclose', function(ev, ui) {
- ok(true, '.dialog("close") fires beforeClose callback');
- equals(this, el[0], "context of callback");
- equals(ev.type, 'dialogbeforeclose', 'event type in callback');
- same(ui, {}, 'ui hash in callback');
- return false;
- });
- el.dialog('close');
- isOpen('beforeclose (deprecated) callback should prevent dialog from closing');
- el.remove();
-});
-
test("beforeClose", function() {
expect(14);
diff --git a/tests/unit/dialog/dialog_methods.js b/tests/unit/dialog/dialog_methods.js
index 93d1b25db..a961b4e03 100644
--- a/tests/unit/dialog/dialog_methods.js
+++ b/tests/unit/dialog/dialog_methods.js
@@ -10,7 +10,7 @@ module("dialog: methods", {
});
test("init", function() {
- expect(7);
+ expect(6);
$("<div></div>").appendTo('body').dialog().remove();
ok(true, '.dialog() called on element');
@@ -24,9 +24,6 @@ test("init", function() {
$('<div></div>').appendTo('body').remove().dialog().remove();
ok(true, '.dialog() called on disconnected DOMElement - removed');
- $('<div></div>').dialog().dialog("foo").remove();
- ok(true, 'arbitrary method called after init');
-
el = $('<div></div>').dialog();
var foo = el.dialog("option", "foo");
el.remove();
@@ -46,9 +43,6 @@ test("destroy", function() {
$('<div></div>').dialog().dialog("destroy").remove();
ok(true, '.dialog("destroy") called on disconnected DOMElement');
- $('<div></div>').dialog().dialog("destroy").dialog("foo").remove();
- ok(true, 'arbitrary method called after destroy');
-
var expected = $('<div></div>').dialog(),
actual = expected.dialog('destroy');
equals(actual, expected, 'destroy is chainable');
diff --git a/tests/unit/dialog/dialog_options.js b/tests/unit/dialog/dialog_options.js
index 28b3812b5..82f28bf85 100644
--- a/tests/unit/dialog/dialog_options.js
+++ b/tests/unit/dialog/dialog_options.js
@@ -43,7 +43,7 @@ test("buttons", function() {
i++;
});
- ok(btn.parent().hasClass('ui-dialog-buttonpane'), "buttons in container");
+ ok(btn.parent().hasClass('ui-dialog-buttonset'), "buttons in container");
btn.trigger("click");
var newButtons = {
@@ -71,6 +71,31 @@ test("buttons", function() {
el.remove();
});
+test("buttons - advanced", function() {
+ expect(5);
+
+ el = $("<div></div>").dialog({
+ buttons: [
+ {
+ text: "a button",
+ "class": "additional-class",
+ id: "my-button-id",
+ click: function() {
+ equals(this, el[0], "correct context");
+ }
+ }
+ ]
+ });
+ var buttons = dlg().find("button");
+ equals(buttons.length, 1, "correct number of buttons");
+ equals(buttons.attr("id"), "my-button-id", "correct id");
+ equals(buttons.text(), "a button", "correct label");
+ ok(buttons.hasClass("additional-class"), "additional classes added");
+ buttons.click();
+
+ el.remove();
+});
+
test("closeOnEscape", function() {
el = $('<div></div>').dialog({ closeOnEscape: false });
ok(true, 'closeOnEscape: false');
@@ -150,51 +175,51 @@ test("height", function() {
equals(dlg().height(), dialog_defaults.minHeight, "default height");
el.remove();
- el = $('<div></div>').dialog({ height: 437 });
- equals(dlg().height(), 437, "explicit height");
+ el = $('<div></div>').dialog({ height: 237 });
+ equals(dlg().height(), 237, "explicit height");
el.remove();
el = $('<div></div>').dialog();
- el.dialog('option', 'height', 438);
- equals(dlg().height(), 438, "explicit height set after init");
+ el.dialog('option', 'height', 238);
+ equals(dlg().height(), 238, "explicit height set after init");
el.remove();
});
test("maxHeight", function() {
expect(3);
- el = $('<div></div>').dialog({ maxHeight: 400 });
+ el = $('<div></div>').dialog({ maxHeight: 200 });
drag('.ui-resizable-s', 1000, 1000);
- equals(heightAfter, 400, "maxHeight");
+ equals(heightAfter, 200, "maxHeight");
el.remove();
- el = $('<div></div>').dialog({ maxHeight: 400 });
+ el = $('<div></div>').dialog({ maxHeight: 200 });
drag('.ui-resizable-n', -1000, -1000);
- equals(heightAfter, 400, "maxHeight");
+ equals(heightAfter, 200, "maxHeight");
el.remove();
- el = $('<div></div>').dialog({ maxHeight: 400 }).dialog('option', 'maxHeight', 600);
- drag('.ui-resizable-n', -1000, -1000);
- equals(heightAfter, 600, "maxHeight");
+ el = $('<div></div>').dialog({ maxHeight: 200 }).dialog('option', 'maxHeight', 300);
+ drag('.ui-resizable-s', 1000, 1000);
+ equals(heightAfter, 300, "maxHeight");
el.remove();
});
test("maxWidth", function() {
expect(3);
- el = $('<div></div>').dialog({ maxWidth: 400 });
+ el = $('<div></div>').dialog({ maxWidth: 200 });
drag('.ui-resizable-e', 1000, 1000);
- equals(widthAfter, 400, "maxWidth");
+ equals(widthAfter, 200, "maxWidth");
el.remove();
- el = $('<div></div>').dialog({ maxWidth: 400 });
+ el = $('<div></div>').dialog({ maxWidth: 200 });
drag('.ui-resizable-w', -1000, -1000);
- equals(widthAfter, 400, "maxWidth");
+ equals(widthAfter, 200, "maxWidth");
el.remove();
- el = $('<div></div>').dialog({ maxWidth: 400 }).dialog('option', 'maxWidth', 600);
+ el = $('<div></div>').dialog({ maxWidth: 200 }).dialog('option', 'maxWidth', 300);
drag('.ui-resizable-w', -1000, -1000);
- equals(widthAfter, 600, "maxWidth");
+ equals(widthAfter, 300, "maxWidth");
el.remove();
});
@@ -236,21 +261,112 @@ test("minWidth", function() {
el.remove();
});
-test("modal", function() {
- ok(false, 'missing test - untested code is broken code');
-});
-
test("position, default center on window", function() {
var el = $('<div></div>').dialog();
- var offset = el.parent().offset();
- // use .position() instead to avoid replicating center-logic?
- same(offset.left, Math.floor($(window).width() / 2 - el.parent().width() / 2));
- same(offset.top, Math.floor($(window).height() / 2 - el.parent().height() / 2));
+ var dialog = el.dialog('widget');
+ var offset = dialog.offset();
+ same(offset.left, Math.round($(window).width() / 2 - dialog.outerWidth() / 2) + $(window).scrollLeft());
+ same(offset.top, Math.round($(window).height() / 2 - dialog.outerHeight() / 2) + $(window).scrollTop());
+ el.remove();
+});
+
+test("position, top on window", function() {
+ var el = $('<div></div>').dialog({ position: "top" });
+ var dialog = el.dialog('widget');
+ var offset = dialog.offset();
+ same(offset.left, Math.round($(window).width() / 2 - dialog.outerWidth() / 2) + $(window).scrollLeft());
+ same(offset.top, $(window).scrollTop());
+ el.remove();
+});
+
+test("position, left on window", function() {
+ var el = $('<div></div>').dialog({ position: "left" });
+ var dialog = el.dialog('widget');
+ var offset = dialog.offset();
+ same(offset.left, 0);
+ same(offset.top, Math.round($(window).height() / 2 - dialog.outerHeight() / 2) + $(window).scrollTop());
+ el.remove();
+});
+
+test("position, right bottom on window", function() {
+ var el = $('<div></div>').dialog({ position: "right bottom" });
+ var dialog = el.dialog('widget');
+ var offset = dialog.offset();
+ same(offset.left, $(window).width() - dialog.outerWidth() + $(window).scrollLeft());
+ same(offset.top, $(window).height() - dialog.outerHeight() + $(window).scrollTop());
+ el.remove();
+});
+
+test("position, right bottom on window w/array", function() {
+ var el = $('<div></div>').dialog({ position: ["right", "bottom"] });
+ var dialog = el.dialog('widget');
+ var offset = dialog.offset();
+ same(offset.left, $(window).width() - dialog.outerWidth() + $(window).scrollLeft());
+ same(offset.top, $(window).height() - dialog.outerHeight() + $(window).scrollTop());
el.remove();
});
-test("position, others", function() {
- ok(false, 'missing test - untested code is broken code');
+test("position, offset from top left w/array", function() {
+ var el = $('<div></div>').dialog({ position: [10, 10] });
+ var dialog = el.dialog('widget');
+ var offset = dialog.offset();
+ same(offset.left, 10 + $(window).scrollLeft());
+ same(offset.top, 10 + $(window).scrollTop());
+ el.remove();
+});
+
+test("position, right bottom at right bottom via ui.position args", function() {
+ var el = $('<div></div>').dialog({
+ position: {
+ my: "right bottom",
+ at: "right bottom"
+ }
+ });
+
+ var dialog = el.dialog('widget');
+ var offset = dialog.offset();
+
+ same(offset.left, $(window).width() - dialog.outerWidth() + $(window).scrollLeft());
+ same(offset.top, $(window).height() - dialog.outerHeight() + $(window).scrollTop());
+ el.remove();
+});
+
+test("position, at another element", function() {
+ var parent = $('<div></div>').css({
+ position: 'absolute',
+ top: 400,
+ left: 600,
+ height: 10,
+ width: 10
+ }).appendTo('body');
+
+ var el = $('<div></div>').dialog({
+ position: {
+ my: "left top",
+ at: "left top",
+ of: parent
+ }
+ });
+
+ var dialog = el.dialog('widget');
+ var offset = dialog.offset();
+
+ same(offset.left, 600);
+ same(offset.top, 400);
+
+ el.dialog('option', 'position', {
+ my: "left top",
+ at: "right bottom",
+ of: parent
+ });
+
+ var offset = dialog.offset();
+
+ same(offset.left, 610);
+ same(offset.top, 410);
+
+ el.remove();
+ parent.remove();
});
test("resizable", function() {
@@ -269,31 +385,33 @@ test("resizable", function() {
el.remove();
});
-test("stack", function() {
- ok(false, 'missing test - untested code is broken code');
-});
-
test("title", function() {
- expect(5);
+ expect(9);
function titleText() {
return dlg().find(".ui-dialog-title").html();
}
el = $('<div></div>').dialog();
- equals(titleText(), "&nbsp;", "[default]");
+ // some browsers return a non-breaking space and some return "&nbsp;"
+ // so we get the text to normalize to the actual non-breaking space
+ equals(dlg().find(".ui-dialog-title").text(), " ", "[default]");
+ equals(el.dialog("option", "title"), "", "option not changed");
el.remove();
el = $('<div title="foo"/>').dialog();
equals(titleText(), "foo", "title in element attribute");
+ equals(el.dialog("option", "title"), "foo", "option updated from attribute");
el.remove();
el = $('<div></div>').dialog({ title: 'foo' });
equals(titleText(), "foo", "title in init options");
+ equals(el.dialog("option", "title"), "foo", "opiton set from options hash");
el.remove();
el = $('<div title="foo"/>').dialog({ title: 'bar' });
equals(titleText(), "bar", "title in init options should override title in element attribute");
+ equals(el.dialog("option", "title"), "bar", "opiton set from options hash");
el.remove();
el = $('<div></div>').dialog().dialog('option', 'title', 'foo');
diff --git a/tests/unit/dialog/dialog_tickets.js b/tests/unit/dialog/dialog_tickets.js
index 296102c9b..b9bf2f972 100644
--- a/tests/unit/dialog/dialog_tickets.js
+++ b/tests/unit/dialog/dialog_tickets.js
@@ -40,4 +40,52 @@ test("#5184: isOpen in dialogclose event is true", function() {
el.remove();
});
+test("#5531: dialog width should be at least minWidth on creation", function () {
+ el = $('<div></div>').dialog({
+ width: 200,
+ minWidth: 300
+ });
+
+ equals(el.dialog('option', 'width'), 300, "width is minWidth");
+ el.dialog('option', 'width', 200);
+ equals(el.dialog('option', 'width'), 300, "width unchanged when set to < minWidth");
+ el.dialog('option', 'width', 320);
+ equals(el.dialog('option', 'width'), 320, "width changed if set to > minWidth");
+ el.remove();
+
+ el = $('<div></div>').dialog({
+ minWidth: 300
+ });
+ ok(el.dialog('option', 'width') >= 300, "width is at least 300");
+ el.remove();
+
+});
+
+test("#6137: dialog('open') causes form elements to reset on IE7", function() {
+ expect(2);
+
+ d1 = $('<form><input type="radio" name="radio" id="a" value="a" checked="checked"></input>' +
+ '<input type="radio" name="radio" id="b" value="b">b</input></form>').dialog({autoOpen: false});
+
+ d1.find('#b')[0].checked = true;
+ equal($('input:checked').val(), 'b', "checkbox b is checked");
+
+ d2 = $('<div></div>').dialog({autoOpen: false});
+
+ d1.dialog('open');
+ equal($('input:checked').val(), 'b', "checkbox b is checked");
+
+ d1.add(d2).remove();
+});
+
+test("#6645: Missing element not found check in overlay", function(){
+ expect(2);
+ d1 = $('<div title="dialog 1">Dialog 1</div>').dialog({modal: true});
+ d2 = $('<div title="dialog 2">Dialog 2</div>').dialog({modal: true, close: function(){ d2.remove()}});
+ equals($.ui.dialog.overlay.instances.length, 2, 'two overlays created');
+ d2.dialog('close');
+ equals($.ui.dialog.overlay.instances.length, 1, 'one overlay remains after closing the 2nd overlay');
+ d1.add(d2).remove();
+});
+
})(jQuery);
diff --git a/tests/unit/draggable/draggable.html b/tests/unit/draggable/draggable.html
index 2be472a50..4be731d22 100644
--- a/tests/unit/draggable/draggable.html
+++ b/tests/unit/draggable/draggable.html
@@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<title>jQuery UI Draggable Test Suite</title>
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
@@ -13,6 +13,7 @@
<link rel="stylesheet" href="../../../external/qunit.css" type="text/css"/>
<script type="text/javascript" src="../../../external/qunit.js"></script>
<script type="text/javascript" src="../../jquery.simulate.js"></script>
+ <script type="text/javascript" src="../testsuite.js"></script>
<script type="text/javascript" src="draggable_core.js"></script>
<script type="text/javascript" src="draggable_defaults.js"></script>
@@ -31,7 +32,7 @@
test("draggable", function() { ok(true, "disabled draggable testsuite"); });
}
</script>
- <script type="text/javascript" src="../testsuite.js"></script>
+ <script type="text/javascript" src="../swarminject.js"></script>
</head>
<body>
diff --git a/tests/unit/draggable/draggable_options.js b/tests/unit/draggable/draggable_options.js
index 78f6c563e..8ba77fb93 100644
--- a/tests/unit/draggable/draggable_options.js
+++ b/tests/unit/draggable/draggable_options.js
@@ -202,6 +202,10 @@ test("{ containment: Selector }", function() {
ok(false, 'missing test - untested code is broken code');
});
+test("{ containment: [x1, y1, x2, y2] }", function() {
+ ok(false, 'missing test - untested code is broken code');
+});
+
test("{ cursor: 'auto' }, default", function() {
equals(draggable_defaults.cursor, 'auto');
diff --git a/tests/unit/droppable/droppable.html b/tests/unit/droppable/droppable.html
index c15992bcd..be8824243 100644
--- a/tests/unit/droppable/droppable.html
+++ b/tests/unit/droppable/droppable.html
@@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<title>jQuery UI Droppable Test Suite</title>
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
@@ -14,6 +14,7 @@
<link rel="stylesheet" href="../../../external/qunit.css" type="text/css"/>
<script type="text/javascript" src="../../../external/qunit.js"></script>
<script type="text/javascript" src="../../jquery.simulate.js"></script>
+ <script type="text/javascript" src="../testsuite.js"></script>
<script type="text/javascript" src="droppable_core.js"></script>
<script type="text/javascript" src="droppable_defaults.js"></script>
@@ -32,7 +33,7 @@
test("droppable", function() { ok(true, "disabled droppable testsuite"); });
}
</script>
- <script type="text/javascript" src="../testsuite.js"></script>
+ <script type="text/javascript" src="../swarminject.js"></script>
</head>
<body>
diff --git a/tests/unit/images/jqueryui_32x32.png b/tests/unit/images/jqueryui_32x32.png
new file mode 100644
index 000000000..e003d16c1
--- /dev/null
+++ b/tests/unit/images/jqueryui_32x32.png
Binary files differ
diff --git a/tests/unit/index.html b/tests/unit/index.html
index 6c16826f0..1566cfc38 100644
--- a/tests/unit/index.html
+++ b/tests/unit/index.html
@@ -19,7 +19,7 @@
}
</style>
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
@@ -49,6 +49,7 @@
<h2>Core</h2>
<ul>
<li><a href="core/core.html">Core</a></li>
+ <li><a href="widget/widget.html">Widget</a></li>
</ul>
<h2>Interactions</h2>
diff --git a/tests/unit/position/position.html b/tests/unit/position/position.html
index ca5f2585d..e490a7d13 100644
--- a/tests/unit/position/position.html
+++ b/tests/unit/position/position.html
@@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<title>jQuery UI Position Test Suite</title>
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.position.js"></script>
<link rel="stylesheet" href="../../../external/qunit.css" type="text/css"/>
@@ -13,6 +13,8 @@
<script type="text/javascript" src="../testsuite.js"></script>
<script type="text/javascript" src="position_core.js"></script>
+
+ <script type="text/javascript" src="../swarminject.js"></script>
</head>
<body>
@@ -22,21 +24,26 @@
<ol id="qunit-tests">
</ol>
+<!--
+elements smaller than 10px have a line-height set on them to avoid a bug in IE6
+.height() returns the greater of the height and line-height
+-->
+
<div id="main" style="position: absolute; top: 0; left: 0;">
- <div id="el1" style="position: absolute; width: 6px; height: 6px;"></div>
- <div id="el2" style="position: absolute; width: 6px; height: 6px;"></div>
- <div id="parent" style="position: absolute; width: 6px; height: 6px; top: 4px; left: 4px;"></div>
+ <div id="el1" style="position: absolute; width: 6px; height: 6px; line-height: 6px;"></div>
+ <div id="el2" style="position: absolute; width: 6px; height: 6px; line-height: 6px;"></div>
+ <div id="parent" style="position: absolute; width: 6px; height: 6px; top: 4px; left: 4px; line-height: 6px;"></div>
</div>
<div style="position: absolute; top: 0px; left: 0px">
- <div id="elx" style="position: absolute; width: 10px; height: 10px;"></div>
+ <div id="elx" style="position: absolute; width: 10px; height: 10px; line-height: 10px;"></div>
<div id="parentx" style="position: absolute; width: 20px; height: 20px; top: 40px; left: 40px;"></div>
</div>
<div style="position: absolute; top: 200px; left: 100px;">
- <div id="el-offset-100-200" style="position: absolute; width: 10px; height: 10px;"></div>
+ <div id="el-offset-100-200" style="position: absolute; width: 10px; height: 10px; line-height: 10px;"></div>
<div style="position: absolute; top: 100px; left: 50px;">
- <div id="el-two-offset-150-300" style="position: absolute; width: 10px; height: 10px;"></div>
+ <div id="el-two-offset-150-300" style="position: absolute; width: 10px; height: 10px; line-height: 10px;"></div>
<div id="el-fixed" style="position: fixed; top: 200px; left: 200px;"></div>
</div>
</div>
diff --git a/tests/unit/position/position_core.js b/tests/unit/position/position_core.js
index 3976e43ab..f4075ccfe 100644
--- a/tests/unit/position/position_core.js
+++ b/tests/unit/position/position_core.js
@@ -131,6 +131,17 @@ test('of', function() {
$('#elx').position({
my: 'right bottom',
at: 'right bottom',
+ of: $(document),
+ collision: 'none'
+ });
+ same($('#elx').offset(), {
+ top: $(document).height() - 10,
+ left: $(document).width() - 10
+ }, 'document');
+
+ $('#elx').position({
+ my: 'right bottom',
+ at: 'right bottom',
of: window,
collision: 'none'
});
@@ -139,6 +150,17 @@ test('of', function() {
left: $(window).width() - 10
}, 'window');
+ $('#elx').position({
+ my: 'right bottom',
+ at: 'right bottom',
+ of: $(window),
+ collision: 'none'
+ });
+ same($('#elx').offset(), {
+ top: $(window).height() - 10,
+ left: $(window).width() - 10
+ }, 'window');
+
$(window).scrollTop(500).scrollLeft(200);
$('#elx').position({
my: 'right bottom',
@@ -332,6 +354,58 @@ test("collision: none, with offset", function() {
}, { top: -13, left: -12 }, "left top, negative offset");
});
+test("collision: fit, with margin", function() {
+ $("#elx").css("margin", 10);
+
+ collisionTest({
+ collision: "fit"
+ }, { top: $(window).height() - 20, left: $(window).width() - 20 }, "right bottom");
+
+ collisionTest2({
+ collision: "fit"
+ }, { top: 10, left: 10 }, "left top");
+
+ $("#elx").css({
+ "margin-left": 5,
+ "margin-top": 5
+ });
+
+ collisionTest({
+ collision: "fit"
+ }, { top: $(window).height() - 20, left: $(window).width() - 20 }, "right bottom");
+
+ collisionTest2({
+ collision: "fit"
+ }, { top: 5, left: 5 }, "left top");
+
+ $("#elx").css({
+ "margin-right": 15,
+ "margin-bottom": 15
+ });
+
+ collisionTest({
+ collision: "fit"
+ }, { top: $(window).height() - 25, left: $(window).width() - 25 }, "right bottom");
+
+ collisionTest2({
+ collision: "fit"
+ }, { top: 5, left: 5 }, "left top");
+});
+
+test("collision: flip, with margin", function() {
+ $("#elx").css("margin", 10);
+
+ collisionTest({
+ collision: "flip",
+ at: "left top"
+ }, { top: $(window).height() - 10, left: $(window).width() - 10 }, "left top");
+
+ collisionTest2({
+ collision: "flip",
+ at: "right bottom"
+ }, { top: 0, left: 0 }, "right bottom");
+});
+
//test('bug #5280: consistent results (avoid fractional values)', function() {
// var wrapper = $('#bug-5280'),
// elem = wrapper.children(),
diff --git a/tests/unit/progressbar/progressbar.html b/tests/unit/progressbar/progressbar.html
index 924413505..4fa1dfb63 100644
--- a/tests/unit/progressbar/progressbar.html
+++ b/tests/unit/progressbar/progressbar.html
@@ -6,7 +6,7 @@
<link type="text/css" href="../../../themes/base/jquery.ui.progressbar.css" rel="stylesheet" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.progressbar.js"></script>
@@ -22,6 +22,8 @@
<script type="text/javascript" src="progressbar_methods.js"></script>
<script type="text/javascript" src="progressbar_options.js"></script>
<script type="text/javascript" src="progressbar_tickets.js"></script>
+
+ <script type="text/javascript" src="../swarminject.js"></script>
</head>
<body>
diff --git a/tests/unit/progressbar/progressbar_defaults.js b/tests/unit/progressbar/progressbar_defaults.js
index b663708ce..925510871 100644
--- a/tests/unit/progressbar/progressbar_defaults.js
+++ b/tests/unit/progressbar/progressbar_defaults.js
@@ -4,7 +4,8 @@
var progressbar_defaults = {
disabled: false,
- value: 0
+ value: 0,
+ max: 100
};
commonWidgetTests('progressbar', { defaults: progressbar_defaults });
diff --git a/tests/unit/progressbar/progressbar_events.js b/tests/unit/progressbar/progressbar_events.js
index b273cd5e9..585c09091 100644
--- a/tests/unit/progressbar/progressbar_events.js
+++ b/tests/unit/progressbar/progressbar_events.js
@@ -5,6 +5,19 @@
module("progressbar: events");
+test("create", function() {
+ expect(1);
+ $("#progressbar").progressbar({
+ value: 5,
+ create: function() {
+ same(5, $(this).progressbar("value") );
+ },
+ change: function() {
+ ok(false, 'create() has triggered change()');
+ }
+ })
+});
+
test("change", function() {
expect(1);
$("#progressbar").progressbar({
@@ -14,4 +27,25 @@ test("change", function() {
}).progressbar("value", 5);
});
+test( "complete", function() {
+ expect( 3 );
+ var changes = 0,
+ value;
+
+ $( "#progressbar" ).progressbar({
+ change: function() {
+ changes++;
+ same( $( this ).progressbar( "value" ), value, "change at " + value );
+ },
+ complete: function() {
+ equal( changes, 2, "complete triggered after change" );
+ }
+ });
+
+ value = 5;
+ $( "#progressbar" ).progressbar( "value", value );
+ value = 100;
+ $( "#progressbar" ).progressbar( "value", value );
+});
+
})(jQuery);
diff --git a/tests/unit/progressbar/progressbar_options.js b/tests/unit/progressbar/progressbar_options.js
index a60b0efaf..70ad7abab 100644
--- a/tests/unit/progressbar/progressbar_options.js
+++ b/tests/unit/progressbar/progressbar_options.js
@@ -17,4 +17,26 @@ test("{ value : 5 }", function() {
same( 5, $("#progressbar").progressbar("value") );
});
+test("{ value : -5 }", function() {
+ $("#progressbar").progressbar({
+ value: -5
+ });
+ same( 0, $("#progressbar").progressbar("value") );
+});
+
+test("{ value : 105 }", function() {
+ $("#progressbar").progressbar({
+ value: 105
+ });
+ same( 100, $("#progressbar").progressbar("value") );
+});
+
+test("{ max : 5, value : 10 }", function() {
+ $("#progressbar").progressbar({
+ max: 5,
+ value: 10
+ });
+ same( 5, $("#progressbar").progressbar("value") );
+});
+
})(jQuery);
diff --git a/tests/unit/resizable/images/test.jpg b/tests/unit/resizable/images/test.jpg
index 7d8ec0996..0175b13b8 100644
--- a/tests/unit/resizable/images/test.jpg
+++ b/tests/unit/resizable/images/test.jpg
Binary files differ
diff --git a/tests/unit/resizable/resizable.html b/tests/unit/resizable/resizable.html
index 0f4f91aae..d35706dd3 100644
--- a/tests/unit/resizable/resizable.html
+++ b/tests/unit/resizable/resizable.html
@@ -6,7 +6,7 @@
<link type="text/css" href="../../../themes/base/jquery.ui.resizable.css" rel="stylesheet" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
@@ -15,6 +15,7 @@
<link rel="stylesheet" href="../../../external/qunit.css" type="text/css"/>
<script type="text/javascript" src="../../../external/qunit.js"></script>
<script type="text/javascript" src="../../jquery.simulate.js"></script>
+ <script type="text/javascript" src="../testsuite.js"></script>
<script type="text/javascript" src="resizable_core.js"></script>
<script type="text/javascript" src="resizable_defaults.js"></script>
@@ -33,7 +34,7 @@
test("resizable", function() { ok(true, "disabled resizable testsuite"); });
}
</script>
- <script type="text/javascript" src="../testsuite.js"></script>
+ <script type="text/javascript" src="../swarminject.js"></script>
</head>
<body>
diff --git a/tests/unit/selectable/selectable.html b/tests/unit/selectable/selectable.html
index 278d4dde3..5771185a5 100644
--- a/tests/unit/selectable/selectable.html
+++ b/tests/unit/selectable/selectable.html
@@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<title>jQuery UI Selectable Test Suite</title>
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
@@ -13,6 +13,7 @@
<link rel="stylesheet" href="../../../external/qunit.css" type="text/css"/>
<script type="text/javascript" src="../../../external/qunit.js"></script>
<script type="text/javascript" src="../../jquery.simulate.js"></script>
+ <script type="text/javascript" src="../testsuite.js"></script>
<script type="text/javascript" src="selectable_core.js"></script>
<script type="text/javascript" src="selectable_defaults.js"></script>
@@ -31,7 +32,7 @@
test("selectable", function() { ok(true, "disabled selectable testsuite"); });
}
</script>
- <script type="text/javascript" src="../testsuite.js"></script>
+ <script type="text/javascript" src="../swarminject.js"></script>
</head>
<body>
diff --git a/tests/unit/slider/slider.html b/tests/unit/slider/slider.html
index 5b1506de5..d21911c8c 100644
--- a/tests/unit/slider/slider.html
+++ b/tests/unit/slider/slider.html
@@ -6,7 +6,7 @@
<link type="text/css" href="../../../themes/base/jquery.ui.slider.css" rel="stylesheet" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
@@ -23,6 +23,18 @@
<script type="text/javascript" src="slider_methods.js"></script>
<script type="text/javascript" src="slider_options.js"></script>
<script type="text/javascript" src="slider_tickets.js"></script>
+
+ <script type="text/javascript">
+ // disable this stale testsuite for testswarm only
+ var url = window.location.search;
+ url = decodeURIComponent( url.slice( url.indexOf("swarmURL=") + 9 ) );
+ if ( url && url.indexOf("http") == 0 ) {
+ // reset config to kill previous tests; make sure testsuite.js is loaded afterwards to init the testswarm script
+ QUnit.init();
+ test("slider", function() { ok(true, "disabled slider testsuite"); });
+ }
+ </script>
+ <script type="text/javascript" src="../swarminject.js"></script>
</head>
<body>
diff --git a/tests/unit/slider/slider_events.js b/tests/unit/slider/slider_events.js
index d7c146d84..0b7b250f2 100644
--- a/tests/unit/slider/slider_events.js
+++ b/tests/unit/slider/slider_events.js
@@ -72,7 +72,7 @@ test( "programmatic event triggers", function() {
})
.slider( "value", 0 );
- reset();
+ QUnit.reset();
// Test values method
el = $( "<div></div>" )
.slider({
@@ -83,7 +83,7 @@ test( "programmatic event triggers", function() {
})
.slider( "values", [80, 90] );
- reset();
+ QUnit.reset();
// Test value option
el = $( "<div></div>" )
.slider({
@@ -93,7 +93,7 @@ test( "programmatic event triggers", function() {
})
.slider( "option", "value", 0 );
- reset();
+ QUnit.reset();
// Test values option
el = $( "<div></div>" )
.slider({
diff --git a/tests/unit/slider/slider_methods.js b/tests/unit/slider/slider_methods.js
index 567c5de2e..77ae65148 100644
--- a/tests/unit/slider/slider_methods.js
+++ b/tests/unit/slider/slider_methods.js
@@ -6,7 +6,7 @@
module("slider: methods");
test("init", function() {
- expect(6);
+ expect(5);
$("<div></div>").appendTo('body').slider().remove();
ok(true, '.slider() called on element');
@@ -17,9 +17,6 @@ test("init", function() {
$('<div></div>').slider().remove();
ok(true, '.slider() called on disconnected DOMElement');
- $('<div></div>').slider().slider("foo").remove();
- ok(true, 'arbitrary method called after init');
-
var el = $('<div></div>').slider();
var foo = el.slider("option", "foo");
el.remove();
@@ -39,9 +36,6 @@ test("destroy", function() {
$('<div></div>').appendTo('body').remove().slider().slider("destroy").remove();
ok(true, '.slider("destroy") called on disconnected DOMElement');
- $('<div></div>').slider().slider("destroy").slider("foo").remove();
- ok(true, 'arbitrary method called after destroy');
-
var expected = $('<div></div>').slider(),
actual = expected.slider('destroy');
equals(actual, expected, 'destroy is chainable');
diff --git a/tests/unit/sortable/sortable.html b/tests/unit/sortable/sortable.html
index ad5cdca6d..44744a033 100644
--- a/tests/unit/sortable/sortable.html
+++ b/tests/unit/sortable/sortable.html
@@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<title>jQuery UI Sortable Test Suite</title>
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
@@ -13,6 +13,7 @@
<link rel="stylesheet" href="../../../external/qunit.css" type="text/css"/>
<script type="text/javascript" src="../../../external/qunit.js"></script>
<script type="text/javascript" src="../../jquery.simulate.js"></script>
+ <script type="text/javascript" src="../testsuite.js"></script>
<script type="text/javascript" src="sortable_core.js"></script>
<script type="text/javascript" src="sortable_defaults.js"></script>
@@ -31,7 +32,7 @@
test("sortable", function() { ok(true, "disabled sortable testsuite"); });
}
</script>
- <script type="text/javascript" src="../testsuite.js"></script>
+ <script type="text/javascript" src="../swarminject.js"></script>
</head>
<body>
diff --git a/tests/unit/sortable/sortable_tickets.js b/tests/unit/sortable/sortable_tickets.js
index e265c2f3a..3edc8c04c 100644
--- a/tests/unit/sortable/sortable_tickets.js
+++ b/tests/unit/sortable/sortable_tickets.js
@@ -36,4 +36,48 @@ test("#3019: Stop fires too early", function() {
});
+test('#4752: link event firing on sortable with connect list', function () {
+ var fired = {},
+ hasFired = function (type) { return (type in fired) && (true === fired[type]); };
+
+ $('#sortable').clone().attr('id', 'sortable2').insertAfter('#sortable');
+
+ $('#main ul').sortable({
+ connectWith: '#main ul',
+ change: function (e, ui) {
+ fired.change = true;
+ },
+ receive: function (e, ui) {
+ fired.receive = true;
+ },
+ remove: function (e, ui) {
+ fired.remove = true;
+ }
+ });
+
+ $('#main ul li').live('click.ui-sortable-test', function () {
+ fired.click = true;
+ });
+
+ $('#sortable li:eq(0)').simulate('click');
+ ok(!hasFired('change'), 'Click only, change event should not have fired');
+ ok(hasFired('click'), 'Click event should have fired');
+
+ // Drag an item within the first list
+ fired = {};
+ $('#sortable li:eq(0)').simulate('drag', { dx: 0, dy: 40 });
+ ok(hasFired('change'), '40px drag, change event should have fired');
+ ok(!hasFired('receive'), 'Receive event should not have fired');
+ ok(!hasFired('remove'), 'Remove event should not have fired');
+ ok(!hasFired('click'), 'Click event should not have fired');
+
+ // Drag an item from the first list to the second, connected list
+ fired = {};
+ $('#sortable li:eq(0)').simulate('drag', { dx: 0, dy: 150 });
+ ok(hasFired('change'), '150px drag, change event should have fired');
+ ok(hasFired('receive'), 'Receive event should have fired');
+ ok(hasFired('remove'), 'Remove event should have fired');
+ ok(!hasFired('click'), 'Click event should not have fired');
+});
+
})(jQuery);
diff --git a/tests/unit/spinner/spinner.html b/tests/unit/spinner/spinner.html
new file mode 100644
index 000000000..2729fce8d
--- /dev/null
+++ b/tests/unit/spinner/spinner.html
@@ -0,0 +1,42 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <title>jQuery UI Spinner Test Suite</title>
+
+ <link type="text/css" href="../../../themes/base/jquery.ui.spinner.css" rel="stylesheet" />
+
+ <script type="text/javascript" src="../../../jquery-1.4.3.js"></script>
+ <script type="text/javascript" src="../../../external/jquery.mousewheel-3.0.4.js"></script>
+ <script type="text/javascript" src="../../../external/glob.js"></script>
+ <script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
+ <script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
+ <script type="text/javascript" src="../../../ui/jquery.ui.button.js"></script>
+ <script type="text/javascript" src="../../../ui/jquery.ui.spinner.js"></script>
+
+ <link rel="stylesheet" href="../../../external/qunit.css" type="text/css"/>
+ <script type="text/javascript" src="../../../external/qunit.js"></script>
+ <script type="text/javascript" src="../../jquery.simulate.js"></script>
+ <script type="text/javascript" src="../testsuite.js"></script>
+
+ <script type="text/javascript" src="spinner_core.js"></script>
+ <script type="text/javascript" src="spinner_defaults.js"></script>
+ <script type="text/javascript" src="spinner_events.js"></script>
+ <script type="text/javascript" src="spinner_methods.js"></script>
+ <script type="text/javascript" src="spinner_options.js"></script>
+</head>
+<body>
+
+
+<h1 id="qunit-header">jQuery UI Slider Test Suite</h1>
+<h2 id="qunit-banner"></h2>
+<h2 id="qunit-userAgent"></h2>
+<ol id="qunit-tests">
+</ol>
+
+<div id="qunit-fixture">
+ <input id="spin" class="foo">
+ <input id="spin2" value="2">
+</div>
+
+</body>
+</html>
diff --git a/tests/unit/spinner/spinner_core.js b/tests/unit/spinner/spinner_core.js
new file mode 100644
index 000000000..88603708f
--- /dev/null
+++ b/tests/unit/spinner/spinner_core.js
@@ -0,0 +1,171 @@
+/*
+ * spinner_core.js
+ */
+
+var simulateKeyDownUp = function(el, kCode, shift) {
+ el.simulate("keydown",{keyCode:kCode, shiftKey: shift || false })
+ .simulate("keyup",{keyCode:kCode, shiftKey: shift || false });
+};
+
+(function($) {
+
+// Spinner Tests
+module("spinner: core");
+
+test("destroy", function() {
+ // cheat a bit to get IE6 to pass
+ $("#spin").val(0);
+ var beforeHtml = $("#spin").parent().html();
+ var afterHtml = $("#spin").spinner().spinner("destroy").parent().html();
+ equal( afterHtml, beforeHtml, "before/after html should be the same" );
+});
+
+test("keydown UP on input, increases value not greater than max", function() {
+ var el = $("#spin").spinner({
+ max:100,
+ value:50,
+ step:10
+ });
+
+ simulateKeyDownUp(el, $.ui.keyCode.UP);
+ equals(el.val(), 60);
+
+ for (i = 0; i<11; i++) {
+ simulateKeyDownUp(el, $.ui.keyCode.UP);
+ }
+ equals(el.val(), 100);
+
+ el.spinner("value", 50);
+ simulateKeyDownUp(el, $.ui.keyCode.UP);
+ equals(el.val(), 60);
+});
+
+test("keydown DOWN on input, decreases value not less than min", function() {
+ var el = $("#spin").spinner({
+ min:-100,
+ value:50,
+ step:10
+ });
+
+ simulateKeyDownUp(el, $.ui.keyCode.DOWN);
+ equals(el.val(), 40);
+
+ for (i = 0; i<21; i++) {
+ simulateKeyDownUp(el, $.ui.keyCode.DOWN);
+ }
+ equals(el.val(), -100);
+
+ el.spinner("value", 50);
+ simulateKeyDownUp(el, $.ui.keyCode.DOWN);
+ equals(el.val(), 40);
+});
+
+test("keydown PGUP on input, increases value not greater than max", function() {
+ var el = $("#spin").spinner({
+ max: 500,
+ value: 0,
+ step: 10
+ });
+
+ simulateKeyDownUp(el, $.ui.keyCode.PAGE_UP);
+ equal(el.val(), 100);
+
+ for (i = 0; i<5; i++) {
+ simulateKeyDownUp(el, $.ui.keyCode.PAGE_UP);
+ }
+ equal(el.val(), 500);
+
+ el.spinner("value", 0);
+ simulateKeyDownUp(el, $.ui.keyCode.PAGE_UP);
+ equals(el.val(), 100);
+});
+
+test("keydown PGDN on input, decreases value not less than min", function() {
+ var el = $("#spin").spinner({
+ min:-500,
+ value:0,
+ step:10
+ });
+
+ simulateKeyDownUp(el, $.ui.keyCode.PAGE_DOWN);
+ equals(el.val(), -100);
+
+ for (i = 0; i<5; i++) {
+ simulateKeyDownUp(el, $.ui.keyCode.PAGE_DOWN);
+ }
+ equals(el.val(), -500);
+
+ el.spinner("value", 0);
+ simulateKeyDownUp(el, $.ui.keyCode.PAGE_DOWN);
+ equals(el.val(), -100);
+});
+
+test("mouse click on buttons", function() {
+ var el = $("#spin").spinner(),
+ val = 0;
+
+ $(".ui-spinner-up").trigger("mousedown").trigger("mouseup");
+ equals(el.val(), ++val, "mouse click to up");
+
+ $(".ui-spinner-down").trigger("mousedown").trigger("mouseup");
+ equals(el.val(), --val, "mouse click to down");
+
+ el.spinner("value", 50);
+ $(".ui-spinner-up").trigger("mousedown").trigger("mouseup");
+ equals(el.val(), 51);
+
+ el.spinner("value", 50);
+ $(".ui-spinner-down").trigger("mousedown").trigger("mouseup");
+ equals(el.val(), 49);
+});
+
+test("mouse wheel on input", function() {
+ expect(3);
+
+ var el = $("#spin").spinner();
+ el.trigger("mousewheel", 1);
+ equal(el.val(), 1);
+
+ // mousewheel handler uses a timeout, need to accomodate that
+ stop();
+ setTimeout(function() {
+ el.trigger("mousewheel", -1);
+ equal(el.val(), 0);
+
+ setTimeout(function() {
+ el.trigger("mousewheel", -1);
+ equal(el.val(), -1);
+ start();
+ }, 100);
+ }, 100);
+
+});
+
+test("reading HTML5 attributes", function() {
+ var el = $('<input id="spinner" type="number" min="-100" max="100" value="5" step="2">').spinner();
+ equals(el.spinner('option', 'value'), 5, 'value');
+ equals(el.spinner('option', 'max'), 100, 'max');
+ equals(el.spinner('option', 'min'), -100, 'min');
+ equals(el.spinner('option', 'step'), 2, 'step');
+});
+
+test("ARIA attributes", function() {
+ var el = $('#spin').spinner({ min: -5, max: 5, value: 2 }),
+ wrapper = el.spinner("widget");
+
+ equals(wrapper.attr('role'), 'spinbutton', 'role');
+ equals(wrapper.attr('aria-valuemin'), -5, 'aria-valuemin');
+ equals(wrapper.attr('aria-valuemax'), 5, 'aria-valuemax');
+ equals(wrapper.attr('aria-valuenow'), 2, 'aria-valuenow');
+
+ el.spinner('stepUp');
+
+ equals(wrapper.attr('aria-valuenow'), 3, 'stepUp 1 step changes aria-valuenow');
+
+ el.spinner('option', { min: -10, max: 10 });
+
+ equals(wrapper.attr('aria-valuemin'), -10, 'min option changed aria-valuemin changes');
+ equals(wrapper.attr('aria-valuemax'), 10, 'max option changed aria-valuemax changes');
+});
+
+})(jQuery);
diff --git a/tests/unit/spinner/spinner_defaults.js b/tests/unit/spinner/spinner_defaults.js
new file mode 100644
index 000000000..2f5d77585
--- /dev/null
+++ b/tests/unit/spinner/spinner_defaults.js
@@ -0,0 +1,15 @@
+/*
+ * spinner_defaults.js
+ */
+
+var spinner_defaults = {
+ disabled: false,
+ incremental: true,
+ max: null,
+ min: null,
+ numberformat: null,
+ step: null,
+ value: null
+};
+
+commonWidgetTests('spinner', { defaults: spinner_defaults });
diff --git a/tests/unit/spinner/spinner_events.js b/tests/unit/spinner/spinner_events.js
new file mode 100644
index 000000000..c0771ca2f
--- /dev/null
+++ b/tests/unit/spinner/spinner_events.js
@@ -0,0 +1,64 @@
+/*
+ * spinner_events.js
+ */
+(function($) {
+
+module("spinner: events");
+
+test("start", function() {
+ var start = 0;
+
+ var el = $("#spin").spinner({
+ start: function(){
+ start++;
+ }
+ });
+
+ simulateKeyDownUp(el, $.ui.keyCode.UP);
+
+ equals(start, 1, "Start triggered");
+});
+
+test("spin", function() {
+ var spin = 0;
+
+ var el = $("#spin").spinner({
+ spin: function(){
+ spin++;
+ }
+ });
+
+ simulateKeyDownUp(el, $.ui.keyCode.UP);
+
+ equals(spin, 1, "Spin triggered");
+});
+
+test("stop", function() {
+ var stop = 0;
+
+ var el = $("#spin").spinner({
+ stop: function(){
+ stop++;
+ }
+ });
+
+ simulateKeyDownUp(el, $.ui.keyCode.DOWN);
+
+ equals(stop, 1, "Stop triggered");
+});
+
+test("change", function() {
+ var change = 0;
+
+ var el = $("#spin").spinner({
+ change: function(){
+ change++;
+ }
+ });
+
+ simulateKeyDownUp(el, $.ui.keyCode.UP);
+
+ equals(change, 1, "Change triggered");
+});
+
+})(jQuery);
diff --git a/tests/unit/spinner/spinner_methods.js b/tests/unit/spinner/spinner_methods.js
new file mode 100644
index 000000000..fb58edbdf
--- /dev/null
+++ b/tests/unit/spinner/spinner_methods.js
@@ -0,0 +1,155 @@
+/*
+ * spinner_methods.js
+ */
+(function($) {
+
+module("spinner: methods");
+
+test("disable", function() {
+ var el = $("#spin").spinner({ disabled: false }),
+ val = el.val(),
+ wrapper = $("#spin").spinner("widget");
+
+ ok(!wrapper.hasClass("ui-spinner-disabled"), "before: wrapper does not have ui-spinner-disabled class");
+ ok(!el.is(':disabled'), "before: input does not have disabled attribute");
+
+ el.spinner("disable");
+ ok(wrapper.hasClass("ui-spinner-disabled"), "after: wrapper has ui-spinner-disabled class");
+ ok(el.is(':disabled'), "after: input has disabled attribute");
+
+ simulateKeyDownUp(el, $.ui.keyCode.UP);
+ equals(val, el.val(), "keyboard - value does not change on key UP");
+
+ simulateKeyDownUp(el, $.ui.keyCode.DOWN);
+ equals(val, el.val(), "keyboard - value does not change on key DOWN");
+
+ simulateKeyDownUp(el, $.ui.keyCode.PAGE_UP);
+ equals(val, el.val(), "keyboard - value does not change on key PGUP");
+
+ simulateKeyDownUp(el, $.ui.keyCode.PAGE_DOWN);
+ equals(val, el.val(), "keyboard - value does not change on key PGDN");
+
+ wrapper.find(":ui-button").first().trigger('mousedown').trigger('mouseup');
+ equals(val, el.val(), "mouse - value does not change on clicking up button");
+
+ wrapper.find(":ui-button").last().trigger('mousedown').trigger('mouseup');
+ equals(val, el.val(), "mouse - value does not change on clicking down button");
+
+ el.spinner('stepUp', 6);
+ equals(6, el.val(), "script - stepUp 6 steps changes value");
+
+ el.spinner('stepDown');
+ equals(5, el.val(), "script - stepDown 1 step changes value");
+
+ el.spinner('pageUp');
+ equals(15, el.val(), "script - pageUp 1 page changes value");
+
+ el.spinner('pageDown');
+ equals(5, el.val(), "script - pageDown 1 page changes value");
+
+});
+
+test("enable", function() {
+ var el = $("#spin").spinner({ disabled: true })
+ val = el.val(),
+ wrapper = el.spinner("widget");
+
+ ok(wrapper.hasClass("ui-spinner-disabled"), "before: wrapper has ui-spinner-disabled class");
+ ok(el.is(':disabled'), "before: input has disabled attribute");
+
+ el.spinner("enable");
+
+ ok(!wrapper.hasClass(".ui-spinner-disabled"), "after: wrapper does not have ui-spinner-disabled class");
+ ok(!el.is(':disabled'), "after: input does not have disabled attribute");
+});
+
+test("pageDown", function() {
+ var el = $('#spin').spinner({
+ step: 2,
+ value: 0,
+ min: -100
+ });
+
+ el.spinner('pageDown');
+ equals(el.val(), -20, "pageDown 1 page");
+
+ el.spinner('pageDown', 3);
+ equals(el.val(), -80, "pageDown 3 pages");
+
+ el.val(-91).spinner('pageDown');
+ equals(el.val(), -100, "value close to min and pageDown 1 page");
+
+ el.spinner('pageDown', 10);
+ equals(el.val(), -100, "value at min and pageDown 10 pages");
+});
+
+test("pageUp", function() {
+ var el = $('#spin').spinner({
+ step: 2,
+ value: 0,
+ max: 100
+ });
+
+ el.spinner('pageUp');
+ equals(el.val(), 20, "pageUp 1 page");
+
+ el.spinner('pageUp', 3);
+ equals(el.val(), 80, "pageUp 3 pages");
+
+ el.val(91).spinner('pageUp');
+ equals(el.val(), 100, "value close to max and pageUp 1 page");
+
+ el.spinner('pageUp', 10);
+ equals(el.val(), 100, "value at max and pageUp 10 pages");
+
+});
+
+test("stepDown", function() {
+ expect(4);
+
+ el = $('#spin').spinner({ step: 2, page: 5, value: 0, min: -15 });
+
+ el.spinner('stepDown')
+ equals(el.val(), -2, "stepDown 1 step");
+
+ el.spinner('stepDown', 5)
+ equals(el.val(), -12, "stepDown 5 steps");
+
+ el.spinner('stepDown', 3);
+ equals(el.val(), -15, "close to min and stepDown 3 steps");
+
+ el.spinner('stepDown');
+ equals(el.val(), -15, "at min and stepDown 1 step");
+});
+
+test("stepUp", function() {
+ expect(4);
+
+ el = $('#spin').spinner({ step: 2, page: 5, value: 0, max: 15 });
+
+ el.spinner('stepUp')
+ equals(el.val(), 2, "stepUp 1 steps");
+
+ el.spinner('stepUp', 5)
+ equals(el.val(), 12, "stepUp 5 steps");
+
+ el.spinner('stepUp', 3);
+ equals(el.val(), 15, "close to min and stepUp 3 steps");
+
+ el.spinner('stepUp');
+ equals(el.val(), 15, "at min and stepUp 1 step");
+
+});
+
+test("value", function() {
+ expect(2);
+
+ el = $('#spin').spinner({ value: 0 });
+
+ el.spinner('value', 10);
+ equals(el.val(), 10, "change value via value method");
+
+ equals(10, el.spinner('value'), "get value via value method");
+});
+
+})(jQuery);
diff --git a/tests/unit/spinner/spinner_options.js b/tests/unit/spinner/spinner_options.js
new file mode 100644
index 000000000..3db7e5c55
--- /dev/null
+++ b/tests/unit/spinner/spinner_options.js
@@ -0,0 +1,154 @@
+/*
+ * spinner_options.js
+ */
+(function($) {
+
+module("spinner: options");
+
+test("numberformat, number", function() {
+ var el = $("#spin").spinner({
+ value: "1",
+ numberformat: "n"
+ });
+ equal(el.val(), "1.00");
+});
+
+test("numberformat, number, simple", function() {
+ var el = $("#spin").spinner({
+ value: "1",
+ numberformat: "n0"
+ });
+ equal(el.val(), "1");
+});
+
+test("numberformat, currency", function() {
+ var el = $("#spin").spinner({
+ value: "1",
+ numberformat: "C"
+ });
+ equal(el.val(), "$1.00");
+});
+
+/* TODO figure out how to test this properly
+test("incremental - false (default)", function() {
+ var el = $("#spin").spinner({ incremental:false });
+
+ for ( var i = 1 ; i<=120 ; i++ ) {
+ el.simulate("keydown",{keyCode:$.ui.keyCode.UP});
+ }
+ el.simulate("keyup",{keyCode:$.ui.keyCode.UP});
+
+ equals(el.val(), 120, "incremental false - keydown 120 times");
+
+ for ( var i = 1 ; i<=210 ; i++ ) {
+ el.simulate("keydown",{keyCode:$.ui.keyCode.DOWN});
+ }
+ el.simulate("keyup",{keyCode:$.ui.keyCode.DOWN});
+
+ equals(el.val(), -90, "incremental false - keydown 210 times");
+});
+
+test("incremental - true (default)", function() {
+ var el = $("#spin").spinner();
+
+ for ( var i = 1 ; i<=120 ; i++ ) {
+ el.simulate("keydown",{keyCode:$.ui.keyCode.UP});
+ }
+ el.simulate("keyup",{keyCode:$.ui.keyCode.UP});
+
+ equals(el.val(), 300, "incremental true - keydown 120 times (100+20*10)");
+
+ for ( var i = 1 ; i<=210 ; i++ ) {
+ el.simulate("keydown",{keyCode:$.ui.keyCode.DOWN});
+ }
+ el.simulate("keyup",{keyCode:$.ui.keyCode.DOWN});
+
+ equals(el.val(), -1800, "incremental true - keydown 210 times (300-100-100*10-10*100)");
+});
+*/
+
+test("max", function() {
+ var el = $("#spin").spinner({ max: 100, value: 1000 });
+ equals(el.val(), 100, "max constrained if value option is greater");
+
+ el.spinner('value', 1000);
+ equals(el.val(), 100, "max constrained if value method is greater");
+
+ el.val(1000).blur();
+ equals(el.val(), 100, "max constrained if manual entry");
+});
+
+test("min", function() {
+ var el = $("#spin").spinner({ min: -100, value: -1000 });
+ equals(el.val(), -100, "min constrained if value option is greater");
+
+ el.spinner('value', -1000);
+ equals(el.val(), -100, "min constrained if value method is greater");
+
+ el.val(-1000).blur();
+ equals(el.val(), -100, "min constrained if manual entry");
+});
+
+test("step, 2", function() {
+ var el = $("#spin").spinner({ step: 2 });
+ equals(el.val(), "0", "value initialized to");
+
+ for ( var i = 0 ; i < 5 ; i++ ) {
+ simulateKeyDownUp(el, $.ui.keyCode.UP);
+ }
+ equals(el.val(), "10", "UP 5 times with step: 2");
+
+ el.spinner('value', '10.5');
+ equals(el.val(), "10.5", "value reset to");
+
+ el.spinner('option', 'step', 2);
+ for ( var i = 0 ; i < 5 ; i++ ) {
+ simulateKeyDownUp(el, $.ui.keyCode.UP);
+ }
+ equals(el.val(), "20.5", "UP 5 times with step: 2");
+});
+
+test("step, 0.7", function() {
+ var el = $("#spin").spinner({
+ step: 0.7,
+ numberformat: "n1"
+ });
+ equals(el.val(), "0.0", "value initialized to");
+
+ simulateKeyDownUp(el, $.ui.keyCode.DOWN);
+ equals(el.val(), "-0.7", "DOWN 1 time with step: 0.7");
+
+ for ( var i = 0 ; i < 11 ; i++ ) {
+ simulateKeyDownUp(el, $.ui.keyCode.UP);
+ }
+ equals(el.val(), "7.0", "UP 11 times with step: 0.7");
+});
+
+test("value, default, specified in markup", function() {
+ var el = $('#spin2').spinner();
+ equals(el.val(), 2, "starting value");
+});
+
+test("value, default, nothing specified", function() {
+ var el = $('#spin').spinner();
+ equals(el.val(), 0, "starting value");
+});
+
+test("value, override", function() {
+ var el = $('#spin').spinner({ value: 100 });
+ equals(el.val(), 100, "starting value");
+});
+
+test("value, override markup", function() {
+ var el = $('#spin2').spinner({ value: 100 });
+ equals(el.val(), 100, "starting value");
+});
+
+test("value, override later", function() {
+ var el = $('#spin').spinner();
+ equals(el.val(), 0, "starting value");
+ el.spinner('option', 'value', 1000);
+ equals(el.val(), 1000, "value option changed and set as current value");
+});
+
+})(jQuery);
diff --git a/tests/unit/swarminject.js b/tests/unit/swarminject.js
new file mode 100644
index 000000000..db69326ab
--- /dev/null
+++ b/tests/unit/swarminject.js
@@ -0,0 +1,9 @@
+// load testswarm agent
+(function() {
+ var url = window.location.search;
+ url = decodeURIComponent( url.slice( url.indexOf("swarmURL=") + 9 ) );
+ if ( !url || url.indexOf("http") !== 0 ) {
+ return;
+ }
+ document.write("<scr" + "ipt src='http://swarm.jquery.org/js/inject.js?" + (new Date).getTime() + "'></scr" + "ipt>");
+})();
diff --git a/tests/unit/tabs/spinner.gif b/tests/unit/tabs/spinner.gif
index 85b99d46b..822747576 100644
--- a/tests/unit/tabs/spinner.gif
+++ b/tests/unit/tabs/spinner.gif
Binary files differ
diff --git a/tests/unit/tabs/tabs.html b/tests/unit/tabs/tabs.html
index 269f47ed5..3935082a1 100644
--- a/tests/unit/tabs/tabs.html
+++ b/tests/unit/tabs/tabs.html
@@ -6,7 +6,7 @@
<link type="text/css" href="../../../themes/base/jquery.ui.tabs.css" rel="stylesheet" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../external/jquery.cookie.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
@@ -15,7 +15,8 @@
<link rel="stylesheet" href="../../../external/qunit.css" type="text/css"/>
<script type="text/javascript" src="../../../external/qunit.js"></script>
<script type="text/javascript" src="../../jquery.simulate.js"></script>
-
+ <script type="text/javascript" src="../testsuite.js"></script>
+
<script type="text/javascript" src="tabs_core.js"></script>
<script type="text/javascript" src="tabs_defaults.js"></script>
<script type="text/javascript" src="tabs_events.js"></script>
@@ -33,7 +34,7 @@
test("tabs", function() { ok(true, "disabled tabs testsuite"); });
}
</script>
- <script type="text/javascript" src="../testsuite.js"></script>
+ <script type="text/javascript" src="../swarminject.js"></script>
</head>
<body>
@@ -60,6 +61,7 @@
<li><a href="#colon:test"><span>1</span></a></li>
<li><a href="#inline-style"><span>2</span></a></li>
<li><a href="data/test.html#test"><span>3</span></a></li>
+ <li><a href="data/test.html" title="∫ßáö Սե"><span>4</span></a></li>
</ul>
<div id="colon:test"></div>
<div style="height: 300px;" id="inline-style"></div>
@@ -92,6 +94,27 @@
<ul id="tabs5-list"></ul>
</div>
</div>
+ <div id="tabs6">
+ <ul id="tabs6-list">
+ <li><a href="#tabs6-1">1</a>
+ <ul>
+ <li><a href="#item6-3">3</a></li>
+ <li><a href="#item6-4">4</a></li>
+ </ul>
+ </li>
+ <li><a href="#tabs6-2">2</a></li>
+ </ul>
+ <div id="tabs6-1"></div>
+ <div id="tabs6-2"></div>
+ </div>
+ <div id="tabs7">
+ <ul id="tabs7-list">
+ <li><a href="#tabs7-1">1</a></li>
+ <li><a href="#tabs7-2">2</a></li>
+ </ul>
+ <div id="tabs7-2"></div>
+ <div id="tabs7-1"></div>
+ </div>
</div>
</body>
</html>
diff --git a/tests/unit/tabs/tabs_defaults.js b/tests/unit/tabs/tabs_defaults.js
index 937701688..d94fbda92 100644
--- a/tests/unit/tabs/tabs_defaults.js
+++ b/tests/unit/tabs/tabs_defaults.js
@@ -11,17 +11,17 @@ var tabs_defaults = {
disable: null,
disabled: [],
enable: null,
- event: 'click',
+ event: "click",
fx: null,
- idPrefix: 'ui-tabs-',
+ idPrefix: "ui-tabs-",
load: null,
- panelTemplate: '<div></div>',
+ panelTemplate: "<div></div>",
remove: null,
select: null,
show: null,
- spinner: '<em>Loading&#8230;</em>',
- tabTemplate: '<li><a href="#{href}"><span>#{label}</span></a></li>'
+ spinner: "<em>Loading&#8230;</em>",
+ tabTemplate: "<li><a href='#{href}'><span>#{label}</span></a></li>"
};
// FAIL: falsy values break the cookie option
-commonWidgetTests('tabs', { defaults: tabs_defaults });
+commonWidgetTests( "tabs", { defaults: tabs_defaults } );
diff --git a/tests/unit/tabs/tabs_events.js b/tests/unit/tabs/tabs_events.js
index d0bc5fee2..1203d02df 100644
--- a/tests/unit/tabs/tabs_events.js
+++ b/tests/unit/tabs/tabs_events.js
@@ -6,7 +6,18 @@
module("tabs: events");
test('select', function() {
- ok(false, "missing test - untested code is broken code.");
+ expect(6);
+ el = $('#tabs1').tabs({
+ select: function(event, ui) {
+ ok(true, 'select triggered after initialization');
+ equals(this, el[0], "context of callback");
+ equals(event.type, 'tabsselect', 'event type in callback');
+ equals(ui.tab, el.find('a')[1], 'contain tab as DOM anchor element');
+ equals(ui.panel, el.find('div')[1], 'contain panel as DOM div element');
+ equals(ui.index, 1, 'contain index');
+ }
+ });
+ el.tabs('select', 1);
});
test('load', function() {
diff --git a/tests/unit/tabs/tabs_methods.js b/tests/unit/tabs/tabs_methods.js
index 3eb627830..bfd9d7713 100644
--- a/tests/unit/tabs/tabs_methods.js
+++ b/tests/unit/tabs/tabs_methods.js
@@ -21,6 +21,42 @@ test('init', function() {
equals( $('div', el).index( $('div.ui-tabs-hide', '#tabs1') ), 1, 'second panel should be hidden' );
});
+test('init with hash', function() {
+ expect(5);
+
+ //set a hash in the url
+ location.hash = '#fragment-2';
+
+ //selection of tab with divs ordered differently than list
+ el = $('#tabs1').tabs();
+
+ equals(el.tabs('option', 'selected'), 1, 'second tab should be selected');
+
+ ok(!$('#tabs1 ul li:eq(0)').is('.ui-tabs-selected.ui-state-active'), 'first tab should not be selected nor active');
+ ok($('#tabs1 div:eq(0)').is('.ui-tabs-hide'), 'first div for first tab should be hidden');
+
+ ok($('#tabs1 ul li:eq(1)').is('.ui-tabs-selected.ui-state-active'), 'second tab should be selected and active');
+ ok(!$('#tabs1 div:eq(1)').is('.ui-tabs-hide'), 'second div for second tab should not be hidden');
+});
+
+test('init mismatched order with hash', function() {
+ expect(5);
+
+ //set a hash in the url
+ location.hash = '#tabs7-2';
+
+ //selection of tab with divs ordered differently than list
+ el = $('#tabs7').tabs();
+
+ equals(el.tabs('option', 'selected'), 1, 'second tab should be selected');
+
+ ok(!$('#tabs7-list li:eq(0)').is('.ui-tabs-selected.ui-state-active'), 'first tab should not be selected nor active');
+ ok($('#tabs7 div:eq(1)').is('.ui-tabs-hide'), 'second div for first tab should be hidden');
+
+ ok($('#tabs7-list li:eq(1)').is('.ui-tabs-selected.ui-state-active'), 'second tab should be selected and active');
+ ok(!$('#tabs7 div:eq(0)').is('.ui-tabs-hide'), 'first div for second tab should not be hidden');
+});
+
test('destroy', function() {
expect(6);
@@ -97,7 +133,7 @@ test('remove', function() {
});
test('select', function() {
- expect(9);
+ expect(6);
el = $('#tabs1').tabs();
@@ -115,20 +151,11 @@ test('select', function() {
equals(el.tabs('option', 'selected'), -1, 'should collapse tab passing in -1');
el.tabs('destroy');
- el.tabs({ collapsible: true });
- el.tabs('select', null);
- equals(el.tabs('option', 'selected'), -1, 'should collapse tab passing in null (deprecated)');
- el.tabs('select', null);
- equals(el.tabs('option', 'selected'), -1, 'should not select tab passing in null a second time (deprecated)');
-
- el.tabs('destroy');
el.tabs();
el.tabs('select', 0);
equals(el.tabs('option', 'selected'), 0, 'should not collapse tab if collapsible is not set to true');
el.tabs('select', -1);
equals(el.tabs('option', 'selected'), 0, 'should not collapse tab if collapsible is not set to true');
- el.tabs('select', null);
- equals(el.tabs('option', 'selected'), 0, 'should not collapse tab if collapsible is not set to true');
el.tabs('select', '#fragment-2');
equals(el.tabs('option', 'selected'), 1, 'should select tab by id');
@@ -149,8 +176,4 @@ test('length', function() {
equals(el.tabs('length'), $('ul a', el).length, ' should return length');
});
-test('rotate', function() {
- ok(false, "missing test - untested code is broken code.");
-});
-
})(jQuery);
diff --git a/tests/unit/tabs/tabs_options.js b/tests/unit/tabs/tabs_options.js
index a23a1cca8..4fb802b66 100644
--- a/tests/unit/tabs/tabs_options.js
+++ b/tests/unit/tabs/tabs_options.js
@@ -25,7 +25,7 @@ test('collapsible', function() {
equals($('div.ui-tabs-hide', '#tabs1').length, 3, 'all panels should be hidden');
el.tabs('option', 'collapsible', false);
ok(el.is(':not(.ui-tabs-collapsible)'), 'extra class "ui-tabs-collapsible" not attached');
-
+
});
test('cookie', function() {
@@ -47,24 +47,37 @@ test('cookie', function() {
el.tabs('select', 2);
equals(cookie(), 2, 'cookie value updated after select');
-
+
el.tabs('destroy');
$.cookie(cookieName, 1);
el.tabs({ cookie: cookieObj });
equals(cookie(), 1, 'initial cookie value, from existing cookie');
-
+
el.tabs('destroy');
el.tabs({ cookie: cookieObj, collapsible: true });
el.tabs('select', 0);
equals(cookie(), -1, 'cookie value for all tabs unselected');
-
+
el.tabs('destroy');
ok($.cookie(cookieName) === null, 'erase cookie after destroy');
});
test('disabled', function() {
- ok(false, "missing test - untested code is broken code.");
+ expect(4);
+
+ el = $('#tabs1').tabs();
+ same(el.tabs('option', 'disabled'), [ ], "should not disable any tab by default");
+
+ el.tabs('option', 'disabled', [ 1 ]);
+ same(el.tabs('option', 'disabled'), [ 1 ], "should set property"); // everything else is being tested in methods module...
+
+ // FIXME bug... property needs to be [ 1 ], since selected tab cannot be disabled!
+ el.tabs('option', 'disabled', [ 0, 1 ]);
+ same(el.tabs('option', 'disabled'), [ 1 ], "should disable given tabs but not selected one"); // ...
+
+ el.tabs('option', 'disabled', [ ]);
+ same(el.tabs('option', 'disabled'), [ ], "should not disable any tab"); // ...
});
test('event', function() {
@@ -85,10 +98,10 @@ test('panelTemplate', function() {
test('selected', function() {
expect(8);
-
+
el = $('#tabs1').tabs();
equals(el.tabs('option', 'selected'), 0, 'should be 0 by default');
-
+
el.tabs('destroy');
el.tabs({ selected: -1 });
equals(el.tabs('option', 'selected'), -1, 'should be -1 for all tabs unselected');
@@ -98,15 +111,15 @@ test('selected', function() {
el.tabs('destroy');
el.tabs({ selected: null });
equals(el.tabs('option', 'selected'), -1, 'should be -1 for all tabs unselected with value null (deprecated)');
-
+
el.tabs('destroy');
el.tabs({ selected: 1 });
equals(el.tabs('option', 'selected'), 1, 'should be specified tab');
-
+
el.tabs('destroy');
el.tabs({ selected: 99 });
equals(el.tabs('option', 'selected'), 0, 'selected should default to zero if given value is out of index');
-
+
el.tabs('destroy');
el.tabs({ collapsible: true });
el.tabs('option', 'selected', 0);
diff --git a/tests/unit/tabs/tabs_tickets.js b/tests/unit/tabs/tabs_tickets.js
index 9874a1192..4a09d59e4 100644
--- a/tests/unit/tabs/tabs_tickets.js
+++ b/tests/unit/tabs/tabs_tickets.js
@@ -59,5 +59,57 @@ test('#4033 - IE expands hash to full url and misinterprets tab as ajax', functi
});
+test('#5069 - ui.tabs.add creates two tab panels when using a full URL', function() {
+ // http://dev.jqueryui.com/ticket/5069
+ expect(2);
+
+ el = $('#tabs2').tabs();
+ equals(el.children('div').length, el.find('> ul > li').length, 'After creation, number of panels should be equal to number of tabs');
+ el.tabs('add', '/ajax_html_echo', 'Test');
+ equals(el.children('div').length, el.find('> ul > li').length, 'After add, number of panels should be equal to number of tabs');
+
+});
+
+test('#5893 - Sublist in the tab list are considered as tab', function() {
+ // http://dev.jqueryui.com/ticket/5893
+ expect(1);
+
+ el = $('#tabs6').tabs();
+ equals(el.tabs( "length" ), 2, 'should contain 2 tab');
+
+});
+
+asyncTest( "#4581 - title attribute for remote tabs does not support foreign languages", function() {
+ expect( 1 );
+
+ $( "#tabs2" ).tabs({
+ selected: 3,
+ load: function( event, ui ) {
+ equal( ui.panel.id, "∫ßáö_Սե", "proper title" );
+ start();
+ }
+ });
+});
+
+
+test('#6710 - selectors are global', function() {
+ // http://bugs.jqueryui.com/ticket/6710
+ expect(1);
+
+ var container = $('\
+ <div>\
+ <div id="tabs_6710">\
+ <ul>\
+ <li><a href="#tabs-1_6710">Nunc tincidunt</a></li>\
+ <li><a href="#tabs-2_6710">Proin dolor</a></li>\
+ </ul>\
+ <div id="tabs-1_6710"> <p>first</p> </div>\
+ <div id="tabs-2_6710"> <p>second</p>\
+ </div>\
+ </div>');
+ container.find('#tabs_6710').tabs();
+ ok( container.find('#tabs-2_6710').hasClass('ui-tabs-hide'), 'should find panels and add corresponding classes' );
+});
+
})(jQuery);
diff --git a/tests/unit/testsuite.js b/tests/unit/testsuite.js
index 9a16e9d0c..d152f84cd 100644
--- a/tests/unit/testsuite.js
+++ b/tests/unit/testsuite.js
@@ -37,13 +37,3 @@ function commonWidgetTests(widget, settings) {
testWidgetDefaults(widget, settings.defaults);
testWidgetOverrides(widget);
}
-
-// load testswarm agent
-(function() {
- var url = window.location.search;
- url = decodeURIComponent( url.slice( url.indexOf("swarmURL=") + 9 ) );
- if ( !url || url.indexOf("http") !== 0 ) {
- return;
- }
- document.write("<scr" + "ipt src='http://swarm.jquery.org/js/inject.js?" + (new Date).getTime() + "'></scr" + "ipt>");
-})();
diff --git a/tests/unit/widget/widget.html b/tests/unit/widget/widget.html
index c3c3b0875..c6fa54e41 100644
--- a/tests/unit/widget/widget.html
+++ b/tests/unit/widget/widget.html
@@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<title>jQuery UI Widget Test Suite</title>
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
@@ -13,7 +13,10 @@
<script type="text/javascript" src="../../jquery.simulate.js"></script>
<script type="text/javascript" src="../testsuite.js"></script>
- <script type="text/javascript" src="widget.js"></script>
+ <script type="text/javascript" src="widget_core.js"></script>
+ <script type="text/javascript" src="widget_tickets.js"></script>
+
+ <script type="text/javascript" src="../swarminject.js"></script>
</head>
<body>
@@ -25,6 +28,12 @@
<div id="main" style="position: absolute; top: -10000px; left: -10000px;">
+<div id="widget-wrapper">
+ <div id="widget">
+ <div>...</div>
+ </div>
+</div>
+
</div>
</body>
diff --git a/tests/unit/widget/widget.js b/tests/unit/widget/widget.js
deleted file mode 100644
index 3c870f1fe..000000000
--- a/tests/unit/widget/widget.js
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * widget unit tests
- */
-(function($) {
-
-module('widget factory', {
- teardown: function() {
- delete $.ui.testWidget;
- }
-});
-
-test('widget creation', function() {
- var myPrototype = {
- _create: function() {},
- creationTest: function() {}
- };
-
- $.widget('ui.testWidget', myPrototype);
- ok($.isFunction($.ui.testWidget), 'constructor was created');
- equals('object', typeof $.ui.testWidget.prototype, 'prototype was created');
- equals($.ui.testWidget.prototype._create, myPrototype._create, 'create function is copied over');
- equals($.ui.testWidget.prototype.creationTest, myPrototype.creationTest, 'random function is copied over');
- equals($.ui.testWidget.prototype.option, $.Widget.prototype.option, 'option method copied over from base widget');
-});
-
-test('jQuery usage', function() {
- expect(10);
-
- var shouldInit = false;
-
- $.widget('ui.testWidget', {
- getterSetterVal: 5,
- _create: function() {
- ok(shouldInit, 'init called on instantiation');
- },
- methodWithParams: function(param1, param2) {
- ok(true, 'method called via .pluginName(methodName)');
- equals(param1, 'value1', 'parameter passed via .pluginName(methodName, param)');
- equals(param2, 'value2', 'multiple parameter passed via .pluginName(methodName, param, param)');
-
- return this;
- },
- getterSetterMethod: function(val) {
- if (val) {
- this.getterSetterVal = val;
- } else {
- return this.getterSetterVal;
- }
- }
- });
-
- shouldInit = true;
- var elem = $('<div></div>').testWidget();
- shouldInit = false;
-
- var instance = elem.data('testWidget');
- equals(typeof instance, 'object', 'instance stored in .data(pluginName)');
- equals(instance.element[0], elem[0], 'element stored on widget');
- var ret = elem.testWidget('methodWithParams', 'value1', 'value2');
- equals(ret, elem, 'jQuery object returned from method call');
-
- ret = elem.testWidget('getterSetterMethod');
- equals(ret, 5, 'getter/setter can act as getter');
- ret = elem.testWidget('getterSetterMethod', 30);
- equals(ret, elem, 'getter/setter method can be chainable');
- equals(instance.getterSetterVal, 30, 'getter/setter can act as setter');
-});
-
-test('direct usage', function() {
- expect(9);
-
- var shouldInit = false;
-
- $.widget('ui.testWidget', {
- getterSetterVal: 5,
- _create: function() {
- ok(shouldInit, 'init called on instantiation');
- },
- methodWithParams: function(param1, param2) {
- ok(true, 'method called via .pluginName(methodName)');
- equals(param1, 'value1', 'parameter passed via .pluginName(methodName, param)');
- equals(param2, 'value2', 'multiple parameter passed via .pluginName(methodName, param, param)');
-
- return this;
- },
- getterSetterMethod: function(val) {
- if (val) {
- this.getterSetterVal = val;
- } else {
- return this.getterSetterVal;
- }
- }
- });
-
- var elem = $('<div></div>')[0];
-
- shouldInit = true;
- var instance = new $.ui.testWidget({}, elem);
- shouldInit = false;
-
- equals($(elem).data('testWidget'), instance, 'instance stored in .data(pluginName)');
- equals(instance.element[0], elem, 'element stored on widget');
-
- var ret = instance.methodWithParams('value1', 'value2');
- equals(ret, instance, 'plugin returned from method call');
-
- ret = instance.getterSetterMethod();
- equals(ret, 5, 'getter/setter can act as getter');
- instance.getterSetterMethod(30);
- equals(instance.getterSetterVal, 30, 'getter/setter can act as setter');
-});
-
-test('merge multiple option arguments', function() {
- expect(1);
- $.widget("ui.testWidget", {
- _create: function() {
- same(this.options, {
- disabled: false,
- option1: "value1",
- option2: "value2",
- option3: "value3",
- option4: {
- option4a: "valuea",
- option4b: "valueb"
- }
- });
- }
- });
- $("<div></div>").testWidget({
- option1: "valuex",
- option2: "valuex",
- option3: "value3",
- option4: {
- option4a: "valuex"
- }
- }, {
- option1: "value1",
- option2: "value2",
- option4: {
- option4b: "valueb"
- }
- }, {
- option4: {
- option4a: "valuea"
- }
- });
-});
-
-test(".widget() - base", function() {
- $.widget("ui.testWidget", {
- _create: function() {}
- });
- var div = $("<div></div>").testWidget()
- same(div[0], div.testWidget("widget")[0]);
-});
-
-test(".widget() - overriden", function() {
- var wrapper = $("<div></div>");
- $.widget("ui.testWidget", {
- _create: function() {},
- widget: function() {
- return wrapper;
- }
- });
- same(wrapper[0], $("<div></div>").testWidget().testWidget("widget")[0]);
-});
-
-})(jQuery);
diff --git a/tests/unit/widget/widget_core.js b/tests/unit/widget/widget_core.js
new file mode 100644
index 000000000..c01cd6542
--- /dev/null
+++ b/tests/unit/widget/widget_core.js
@@ -0,0 +1,549 @@
+/*
+ * widget unit tests
+ */
+(function( $ ) {
+
+module( "widget factory", {
+ teardown: function() {
+ delete $.ui.testWidget;
+ }
+});
+
+test( "widget creation", function() {
+ var myPrototype = {
+ _create: function() {},
+ creationTest: function() {}
+ };
+
+ $.widget( "ui.testWidget", myPrototype );
+ ok( $.isFunction( $.ui.testWidget ), "constructor was created" );
+ equals( "object", typeof $.ui.testWidget.prototype, "prototype was created" );
+ equals( $.ui.testWidget.prototype._create, myPrototype._create,
+ "create function is copied over" );
+ equals( $.ui.testWidget.prototype.creationTest, myPrototype.creationTest,
+ "random function is copied over" );
+ equals( $.ui.testWidget.prototype.option, $.Widget.prototype.option,
+ "option method copied over from base widget" );
+});
+
+test( "jQuery usage", function() {
+ expect( 11 );
+
+ var shouldCreate = false;
+
+ $.widget( "ui.testWidget", {
+ getterSetterVal: 5,
+ _create: function() {
+ ok( shouldCreate, "create called on instantiation" );
+ },
+ methodWithParams: function( param1, param2 ) {
+ ok( true, "method called via .pluginName(methodName)" );
+ equals( param1, "value1",
+ "parameter passed via .pluginName(methodName, param)" );
+ equals( param2, "value2",
+ "multiple parameters passed via .pluginName(methodName, param, param)" );
+
+ return this;
+ },
+ getterSetterMethod: function( val ) {
+ if ( val ) {
+ this.getterSetterVal = val;
+ } else {
+ return this.getterSetterVal;
+ }
+ }
+ });
+
+ shouldCreate = true;
+ var elem = $( "<div></div>" )
+ .bind( "testwidgetcreate", function() {
+ ok( shouldCreate, "create event triggered on instantiation" );
+ })
+ .testWidget();
+ shouldCreate = false;
+
+ var instance = elem.data( "testWidget" );
+ equals( typeof instance, "object", "instance stored in .data(pluginName)" );
+ equals( instance.element[0], elem[0], "element stored on widget" );
+ var ret = elem.testWidget( "methodWithParams", "value1", "value2" );
+ equals( ret, elem, "jQuery object returned from method call" );
+
+ ret = elem.testWidget( "getterSetterMethod" );
+ equals( ret, 5, "getter/setter can act as getter" );
+ ret = elem.testWidget( "getterSetterMethod", 30 );
+ equals( ret, elem, "getter/setter method can be chainable" );
+ equals( instance.getterSetterVal, 30, "getter/setter can act as setter" );
+});
+
+test( "direct usage", function() {
+ expect( 9 );
+
+ var shouldCreate = false;
+
+ $.widget( "ui.testWidget", {
+ getterSetterVal: 5,
+ _create: function() {
+ ok( shouldCreate, "create called on instantiation" );
+ },
+ methodWithParams: function( param1, param2 ) {
+ ok( true, "method called dirctly" );
+ equals( param1, "value1", "parameter passed via direct call" );
+ equals( param2, "value2", "multiple parameters passed via direct call" );
+
+ return this;
+ },
+ getterSetterMethod: function( val ) {
+ if ( val ) {
+ this.getterSetterVal = val;
+ } else {
+ return this.getterSetterVal;
+ }
+ }
+ });
+
+ var elem = $( "<div></div>" )[ 0 ];
+
+ shouldCreate = true;
+ var instance = new $.ui.testWidget( {}, elem );
+ shouldCreate = false;
+
+ equals( $( elem ).data( "testWidget" ), instance,
+ "instance stored in .data(pluginName)" );
+ equals( instance.element[ 0 ], elem, "element stored on widget" );
+
+ var ret = instance.methodWithParams( "value1", "value2" );
+ equals( ret, instance, "plugin returned from method call" );
+
+ ret = instance.getterSetterMethod();
+ equals( ret, 5, "getter/setter can act as getter" );
+ instance.getterSetterMethod( 30 );
+ equals( instance.getterSetterVal, 30, "getter/setter can act as setter" );
+});
+
+test( "error handling", function() {
+ expect( 2 );
+ var error = $.error;
+ $.widget( "ui.testWidget", {} );
+ $.error = function( msg ) {
+ equal( msg, "cannot call methods on testWidget prior to initialization; " +
+ "attempted to call method 'missing'", "method call before init" );
+ };
+ $( "<div>" ).testWidget( "missing" );
+ $.error = function( msg ) {
+ equal( msg, "no such method 'missing' for testWidget widget instance",
+ "invalid method call on widget instance" );
+ };
+ $( "<div>" ).testWidget().testWidget( "missing" );
+ $.error = error;
+});
+
+test("merge multiple option arguments", function() {
+ expect( 1 );
+ $.widget( "ui.testWidget", {
+ _create: function() {
+ same( this.options, {
+ disabled: false,
+ option1: "value1",
+ option2: "value2",
+ option3: "value3",
+ option4: {
+ option4a: "valuea",
+ option4b: "valueb"
+ }
+ });
+ }
+ });
+ $( "<div></div>" ).testWidget({
+ option1: "valuex",
+ option2: "valuex",
+ option3: "value3",
+ option4: {
+ option4a: "valuex"
+ }
+ }, {
+ option1: "value1",
+ option2: "value2",
+ option4: {
+ option4b: "valueb"
+ }
+ }, {
+ option4: {
+ option4a: "valuea"
+ }
+ });
+});
+
+test( "_getCreateOptions()", function() {
+ expect( 1 );
+ $.widget( "ui.testWidget", {
+ options: {
+ option1: "valuex",
+ option2: "valuex",
+ option3: "value3",
+ },
+ _getCreateOptions: function() {
+ return {
+ option1: "override1",
+ option2: "overideX",
+ };
+ },
+ _create: function() {
+ same( this.options, {
+ disabled: false,
+ option1: "override1",
+ option2: "value2",
+ option3: "value3"
+ });
+ }
+ });
+ $( "<div>" ).testWidget({ option2: "value2" });
+});
+
+test( "re-init", function() {
+ var div = $( "<div></div>" ),
+ actions = [];
+
+ $.widget( "ui.testWidget", {
+ _create: function() {
+ actions.push( "create" );
+ },
+ _init: function() {
+ actions.push( "init" );
+ },
+ _setOption: function( key, value ) {
+ actions.push( "option" + key );
+ }
+ });
+
+ actions = [];
+ div.testWidget({ foo: "bar" });
+ same( actions, [ "create", "init" ], "correct methods called on init" );
+
+ actions = [];
+ div.testWidget();
+ same( actions, [ "init" ], "correct methods call on re-init" );
+
+ actions = [];
+ div.testWidget({ foo: "bar" });
+ same( actions, [ "optionfoo", "init" ], "correct methods called on re-init with options" );
+});
+
+test( ".option() - getter", function() {
+ $.widget( "ui.testWidget", {
+ _create: function() {}
+ });
+
+ var div = $( "<div></div>" ).testWidget({
+ foo: "bar",
+ baz: 5,
+ qux: [ "quux", "quuux" ]
+ });
+
+ same( div.testWidget( "option", "foo"), "bar", "single option - string" );
+ same( div.testWidget( "option", "baz"), 5, "single option - number" );
+ same( div.testWidget( "option", "qux"), [ "quux", "quuux" ],
+ "single option - array" );
+
+ var options = div.testWidget( "option" );
+ same( options, {
+ disabled: false,
+ foo: "bar",
+ baz: 5,
+ qux: [ "quux", "quuux" ]
+ }, "full options hash returned" );
+ options.foo = "notbar";
+ same( div.testWidget( "option", "foo"), "bar",
+ "modifying returned options hash does not modify plugin instance" );
+});
+
+test( ".option() - delegate to ._setOptions()", function() {
+ var calls = [];
+ $.widget( "ui.testWidget", {
+ _create: function() {},
+ _setOptions: function( options ) {
+ calls.push( options );
+ }
+ });
+ var div = $( "<div></div>" ).testWidget();
+
+ calls = [];
+ div.testWidget( "option", "foo", "bar" );
+ same( calls, [{ foo: "bar" }], "_setOptions called for single option" );
+
+ calls = [];
+ div.testWidget( "option", {
+ bar: "qux",
+ quux: "quuux"
+ });
+ same( calls, [{ bar: "qux", quux: "quuux" }],
+ "_setOptions called with multiple options" );
+});
+
+test( ".option() - delegate to ._setOption()", function() {
+ var calls = [];
+ $.widget( "ui.testWidget", {
+ _create: function() {},
+ _setOption: function( key, val ) {
+ calls.push({
+ key: key,
+ val: val
+ });
+ }
+ });
+ var div = $( "<div></div>" ).testWidget();
+
+ calls = [];
+ div.testWidget( "option", "foo", "bar" );
+ same( calls, [{ key: "foo", val: "bar" }],
+ "_setOption called for single option" );
+
+ calls = [];
+ div.testWidget( "option", {
+ bar: "qux",
+ quux: "quuux"
+ });
+ same( calls, [
+ { key: "bar", val: "qux" },
+ { key: "quux", val: "quuux" }
+ ], "_setOption called with multiple options" );
+});
+
+test( ".enable()", function() {
+ expect( 2 );
+ $.widget( "ui.testWidget", {
+ _create: function() {},
+ _setOption: function( key, val ) {
+ same( key, "disabled", "_setOption called with disabled option" );
+ same( val, false, "disabled set to false" );
+ }
+ });
+ $( "<div></div>" ).testWidget().testWidget( "enable" );
+});
+
+test( ".disable()", function() {
+ expect( 2 );
+ $.widget( "ui.testWidget", {
+ _create: function() {},
+ _setOption: function( key, val ) {
+ same( key, "disabled", "_setOption called with disabled option" );
+ same( val, true, "disabled set to true" );
+ }
+ });
+ $( "<div></div>" ).testWidget().testWidget( "disable" );
+});
+
+test( ".widget() - base", function() {
+ $.widget( "ui.testWidget", {
+ _create: function() {}
+ });
+ var div = $( "<div></div>" ).testWidget();
+ same( div[0], div.testWidget( "widget" )[0]);
+});
+
+test( ".widget() - overriden", function() {
+ var wrapper = $( "<div></div>" );
+ $.widget( "ui.testWidget", {
+ _create: function() {},
+ widget: function() {
+ return wrapper;
+ }
+ });
+ same( wrapper[0], $( "<div></div>" ).testWidget().testWidget( "widget" )[0] );
+});
+
+test( "._trigger() - no event, no ui", function() {
+ expect( 7 );
+ var handlers = [];
+
+ $.widget( "ui.testWidget", {
+ _create: function() {}
+ });
+
+ $( "#widget" ).testWidget({
+ foo: function( event, ui ) {
+ same( event.type, "testwidgetfoo", "correct event type in callback" );
+ same( ui, {}, "empty ui hash passed" );
+ handlers.push( "callback" );
+ }
+ });
+ $( document ).add( "#widget-wrapper" ).add( "#widget" )
+ .bind( "testwidgetfoo", function( event, ui ) {
+ same( ui, {}, "empty ui hash passed" );
+ handlers.push( this );
+ });
+ same( $( "#widget" ).data( "testWidget" )._trigger( "foo" ), true,
+ "_trigger returns true when event is not cancelled" );
+ same( handlers, [
+ $( "#widget" )[ 0 ],
+ $( "#widget-wrapper" )[ 0 ],
+ document,
+ "callback"
+ ], "event bubbles and then invokes callback" );
+
+ $( document ).unbind( "testwidgetfoo" );
+});
+
+test( "._trigger() - cancelled event", function() {
+ expect( 3 );
+
+ $.widget( "ui.testWidget", {
+ _create: function() {}
+ });
+
+ $( "#widget" ).testWidget({
+ foo: function( event, ui ) {
+ ok( true, "callback invoked even if event is cancelled" );
+ }
+ })
+ .bind( "testwidgetfoo", function( event, ui ) {
+ ok( true, "event was triggered" );
+ return false;
+ });
+ same( $( "#widget" ).data( "testWidget" )._trigger( "foo" ), false,
+ "_trigger returns false when event is cancelled" );
+});
+
+test( "._trigger() - cancelled callback", function() {
+ $.widget( "ui.testWidget", {
+ _create: function() {}
+ });
+
+ $( "#widget" ).testWidget({
+ foo: function( event, ui ) {
+ return false;
+ }
+ });
+ same( $( "#widget" ).data( "testWidget" )._trigger( "foo" ), false,
+ "_trigger returns false when callback returns false" );
+});
+
+test( "._trigger() - provide event and ui", function() {
+ expect( 7 );
+
+ var originalEvent = $.Event( "originalTest" );
+ $.widget( "ui.testWidget", {
+ _create: function() {},
+ testEvent: function() {
+ var ui = {
+ foo: "bar",
+ baz: {
+ qux: 5,
+ quux: 20
+ }
+ };
+ this._trigger( "foo", originalEvent, ui );
+ same( ui, {
+ foo: "notbar",
+ baz: {
+ qux: 10,
+ quux: "jQuery"
+ }
+ }, "ui object modified" );
+ }
+ });
+ $( "#widget" ).bind( "testwidgetfoo", function( event, ui ) {
+ equal( event.originalEvent, originalEvent, "original event object passed" );
+ same( ui, {
+ foo: "bar",
+ baz: {
+ qux: 5,
+ quux: 20
+ }
+ }, "ui hash passed" );
+ ui.foo = "notbar";
+ });
+ $( "#widget-wrapper" ).bind( "testwidgetfoo", function( event, ui ) {
+ equal( event.originalEvent, originalEvent, "original event object passed" );
+ same( ui, {
+ foo: "notbar",
+ baz: {
+ qux: 5,
+ quux: 20
+ }
+ }, "modified ui hash passed" );
+ ui.baz.qux = 10;
+ });
+ $( "#widget" ).testWidget({
+ foo: function( event, ui ) {
+ equal( event.originalEvent, originalEvent, "original event object passed" );
+ same( ui, {
+ foo: "notbar",
+ baz: {
+ qux: 10,
+ quux: 20
+ }
+ }, "modified ui hash passed" );
+ ui.baz.quux = "jQuery";
+ }
+ })
+ .testWidget( "testEvent" );
+});
+
+test( "auto-destroy - .remove()", function() {
+ expect( 1 );
+ $.widget( "ui.testWidget", {
+ _create: function() {},
+ destroy: function() {
+ ok( true, "destroyed from .remove()" );
+ }
+ });
+ $( "#widget" ).testWidget().remove();
+});
+
+test( "auto-destroy - .remove() on parent", function() {
+ expect( 1 );
+ $.widget( "ui.testWidget", {
+ _create: function() {},
+ destroy: function() {
+ ok( true, "destroyed from .remove() on parent" );
+ }
+ });
+ $( "#widget" ).testWidget().parent().remove();
+});
+
+test( "auto-destroy - .remove() on child", function() {
+ $.widget( "ui.testWidget", {
+ _create: function() {},
+ destroy: function() {
+ ok( false, "destroyed from .remove() on child" );
+ }
+ });
+ $( "#widget" ).testWidget().children().remove();
+ // http://github.com/jquery/qunit/pull/34
+ $.ui.testWidget.prototype.destroy = $.noop;
+});
+
+test( "auto-destroy - .empty()", function() {
+ $.widget( "ui.testWidget", {
+ _create: function() {},
+ destroy: function() {
+ ok( false, "destroyed from .empty()" );
+ }
+ });
+ $( "#widget" ).testWidget().empty();
+ // http://github.com/jquery/qunit/pull/34
+ $.ui.testWidget.prototype.destroy = $.noop;
+});
+
+test( "auto-destroy - .empty() on parent", function() {
+ expect( 1 );
+ $.widget( "ui.testWidget", {
+ _create: function() {},
+ destroy: function() {
+ ok( true, "destroyed from .empty() on parent" );
+ }
+ });
+ $( "#widget" ).testWidget().parent().empty();
+});
+
+test( "auto-destroy - .detach()", function() {
+ $.widget( "ui.testWidget", {
+ _create: function() {},
+ destroy: function() {
+ ok( false, "destroyed from .detach()" );
+ }
+ });
+ $( "#widget" ).testWidget().detach();
+});
+
+})( jQuery );
diff --git a/tests/unit/widget/widget_tickets.js b/tests/unit/widget/widget_tickets.js
new file mode 100644
index 000000000..21f44b54c
--- /dev/null
+++ b/tests/unit/widget/widget_tickets.js
@@ -0,0 +1,46 @@
+/*
+ * widget unit tests
+ */
+(function( $ ) {
+
+module( "widget: tickets" );
+
+test( "#5830 - Widget: Using inheritance overwrites the base classes options", function() {
+ $.widget( "ui.testWidgetBase", {
+ options: {
+ obj: {
+ key1: "foo",
+ key2: "bar"
+ },
+ arr: [ "testing" ]
+ }
+ });
+
+ $.widget( "ui.testWidgetExtension", $.ui.testWidgetBase, {
+ options: {
+ obj: {
+ key1: "baz"
+ },
+ arr: [ "alpha", "beta" ]
+ }
+ });
+
+ same( $.ui.testWidgetBase.prototype.options.obj, {
+ key1: "foo",
+ key2: "bar"
+ }, "base class option object not overridden");
+ same( $.ui.testWidgetBase.prototype.options.arr, [ "testing" ],
+ "base class option array not overridden");
+
+ same( $.ui.testWidgetExtension.prototype.options.obj, {
+ key1: "baz",
+ key2: "bar"
+ }, "extension class option object extends base");
+ same( $.ui.testWidgetExtension.prototype.options.arr, [ "alpha", "beta" ],
+ "extension class option array overwrites base");
+
+ delete $.ui.testWidgetBase;
+ delete $.ui.testWidgetExtension;
+});
+
+})( jQuery );
diff --git a/tests/visual/accordion/accordion.html b/tests/visual/accordion/accordion.html
index 01a6fc0ad..ade2e610c 100644
--- a/tests/visual/accordion/accordion.html
+++ b/tests/visual/accordion/accordion.html
@@ -5,7 +5,7 @@
<title>Accordion Visual Test : Default</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.accordion.js"></script>
diff --git a/tests/visual/accordion/accordion_dl.html b/tests/visual/accordion/accordion_dl.html
index 5159bff94..149d5161c 100644
--- a/tests/visual/accordion/accordion_dl.html
+++ b/tests/visual/accordion/accordion_dl.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="../../static/static.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.accordion.js"></script>
diff --git a/tests/visual/accordion/accordion_method_destroy.html b/tests/visual/accordion/accordion_method_destroy.html
index d10a5f772..18eea8af5 100644
--- a/tests/visual/accordion/accordion_method_destroy.html
+++ b/tests/visual/accordion/accordion_method_destroy.html
@@ -5,7 +5,7 @@
<title>Accordion Visual Test : Accordion method destroy</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.accordion.js"></script>
diff --git a/tests/visual/accordion/accordion_method_disable.html b/tests/visual/accordion/accordion_method_disable.html
index c975d84f7..6b29a7ef9 100644
--- a/tests/visual/accordion/accordion_method_disable.html
+++ b/tests/visual/accordion/accordion_method_disable.html
@@ -5,7 +5,7 @@
<title>Accordion Visual Test : Accordion method disable</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.accordion.js"></script>
diff --git a/tests/visual/accordion/accordion_option_animated_bounceslide.html b/tests/visual/accordion/accordion_option_animated_bounceslide.html
index ff216e947..a8e91ea7c 100644
--- a/tests/visual/accordion/accordion_option_animated_bounceslide.html
+++ b/tests/visual/accordion/accordion_option_animated_bounceslide.html
@@ -5,7 +5,7 @@
<title>Accordion Visual Test : Accordion option animated 'bounceslide'</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.accordion.js"></script>
diff --git a/tests/visual/accordion/accordion_option_animated_easeslide.html b/tests/visual/accordion/accordion_option_animated_easeslide.html
index 88118fd1a..baad73c91 100644
--- a/tests/visual/accordion/accordion_option_animated_easeslide.html
+++ b/tests/visual/accordion/accordion_option_animated_easeslide.html
@@ -5,7 +5,7 @@
<title>Accordion Visual Test : Accordion option animated easeslide</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.accordion.js"></script>
diff --git a/tests/visual/accordion/accordion_option_animated_false.html b/tests/visual/accordion/accordion_option_animated_false.html
index 954a15ad0..4f80fd88e 100644
--- a/tests/visual/accordion/accordion_option_animated_false.html
+++ b/tests/visual/accordion/accordion_option_animated_false.html
@@ -5,7 +5,7 @@
<title>Accordion Visual Test : Accordion option animated false</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.accordion.js"></script>
diff --git a/tests/visual/accordion/accordion_option_animated_slide.html b/tests/visual/accordion/accordion_option_animated_slide.html
index f327ccf22..a2a68c340 100644
--- a/tests/visual/accordion/accordion_option_animated_slide.html
+++ b/tests/visual/accordion/accordion_option_animated_slide.html
@@ -5,7 +5,7 @@
<title>Accordion Visual Test : Accordion option animated slide</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.accordion.js"></script>
diff --git a/tests/visual/accordion/accordion_option_animated_true.html b/tests/visual/accordion/accordion_option_animated_true.html
index ac5c75974..92f0310fc 100644
--- a/tests/visual/accordion/accordion_option_animated_true.html
+++ b/tests/visual/accordion/accordion_option_animated_true.html
@@ -5,7 +5,7 @@
<title>Accordion Visual Test : Accordion option animated true</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.accordion.js"></script>
diff --git a/tests/visual/accordion/accordion_option_autoHeight_false.html b/tests/visual/accordion/accordion_option_autoHeight_false.html
index 881b94b48..cd331d2bc 100644
--- a/tests/visual/accordion/accordion_option_autoHeight_false.html
+++ b/tests/visual/accordion/accordion_option_autoHeight_false.html
@@ -5,7 +5,7 @@
<title>Accordion Visual Test : Accordion option autoHeight false</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.accordion.js"></script>
diff --git a/tests/visual/accordion/accordion_option_autoHeight_true.html b/tests/visual/accordion/accordion_option_autoHeight_true.html
index 60af64fe2..23bd26407 100644
--- a/tests/visual/accordion/accordion_option_autoHeight_true.html
+++ b/tests/visual/accordion/accordion_option_autoHeight_true.html
@@ -5,7 +5,7 @@
<title>Accordion Visual Test : Accordion option autoHeight true</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.accordion.js"></script>
diff --git a/tests/visual/accordion/accordion_option_fillSpace_true.html b/tests/visual/accordion/accordion_option_fillSpace_true.html
index 8fa88dedb..7642d0621 100644
--- a/tests/visual/accordion/accordion_option_fillSpace_true.html
+++ b/tests/visual/accordion/accordion_option_fillSpace_true.html
@@ -5,7 +5,7 @@
<title>Accordion Visual Test : Accordion option autoHeight true</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.accordion.js"></script>
@@ -20,6 +20,7 @@
<body>
<div style="height: 500px; width: 500px; border: 1px solid red;">
+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ultricies enim augue. Vestibulum quis risus massa. Donec ut augue vitae velit dignissim auctor ac eleifend nisi. Donec et urna sapien. Donec bibendum rhoncus erat sit amet suscipit. Ut sodales vestibulum urna, blandit tempor enim sodales ac. Integer sagittis mauris nec sapien ornare ut malesuada nunc egestas. Ut auctor metus eget leo imperdiet non cursus velit rutrum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed consectetur euismod ipsum ac sodales. Proin volutpat, est non ultricies iaculis, augue orci pulvinar lectus, quis tincidunt nibh odio a augue. Sed posuere interdum augue a consequat. Ut ac nunc nulla, quis aliquet purus. Nullam convallis elit id magna pretium pretium. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce commodo, ipsum ac ultrices porta, purus leo suscipit dui, sit amet ultricies ligula ante a dui. Morbi a sem quam, quis rhoncus quam.</p>
<div id="accordion" style="width:490px;">
<h3><a href="#">Accordion Header 1</a></h3>
<div style="padding-top: 1em">
diff --git a/tests/visual/accordion/accordion_option_navigation_true.html b/tests/visual/accordion/accordion_option_navigation_true.html
index af2beb2ad..ec0a3e479 100644
--- a/tests/visual/accordion/accordion_option_navigation_true.html
+++ b/tests/visual/accordion/accordion_option_navigation_true.html
@@ -5,7 +5,7 @@
<title>Accordion Visual Test : Accordion option navigation true</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.accordion.js"></script>
diff --git a/tests/visual/accordion/accordion_ticket_4322.html b/tests/visual/accordion/accordion_ticket_4322.html
index 8f8738af9..98a0bfcd6 100644
--- a/tests/visual/accordion/accordion_ticket_4322.html
+++ b/tests/visual/accordion/accordion_ticket_4322.html
@@ -5,7 +5,7 @@
<title>Accordion Visual Test : Accordion ticket #4322</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.accordion.js"></script>
diff --git a/tests/visual/accordion/accordion_ticket_4331.html b/tests/visual/accordion/accordion_ticket_4331.html
index acbdc546c..f21124f8d 100644
--- a/tests/visual/accordion/accordion_ticket_4331.html
+++ b/tests/visual/accordion/accordion_ticket_4331.html
@@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<title>Accordion Visual Test : Accordion ticket #4331</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.accordion.js"></script>
diff --git a/tests/visual/accordion/accordion_ticket_4444.html b/tests/visual/accordion/accordion_ticket_4444.html
index 07214f7ed..303cc4839 100644
--- a/tests/visual/accordion/accordion_ticket_4444.html
+++ b/tests/visual/accordion/accordion_ticket_4444.html
@@ -5,7 +5,7 @@
<title>Accordion Visual Test : Accordion ticket #4444</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.accordion.js"></script>
diff --git a/tests/visual/accordion/accordion_ul.html b/tests/visual/accordion/accordion_ul.html
index c81e2ddab..97fa88f2d 100644
--- a/tests/visual/accordion/accordion_ul.html
+++ b/tests/visual/accordion/accordion_ul.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="../../static/static.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.accordion.js"></script>
diff --git a/tests/visual/addClass/addClass_queue.html b/tests/visual/addClass/addClass_queue.html
new file mode 100644
index 000000000..27c3848a7
--- /dev/null
+++ b/tests/visual/addClass/addClass_queue.html
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>addClass Visual Test : Queue</title>
+ <link rel="stylesheet" href="../visual.css">
+ <link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css">
+ <script src="../../../jquery-1.4.4.js"></script>
+ <script src="../../../ui/jquery.effects.core.js"></script>
+ <style>
+ .box {
+ width: 100px;
+ height: 100px;
+ background-color: #000;
+ }
+ .red {
+ background-color: #f00;
+ }
+ .green {
+ background-color: #0f0;
+ }
+ .blue {
+ background-color: #00f;
+ }
+ </style>
+ <script>
+ $(function() {
+ $( "#box1" )
+ .delay( 500 )
+ .addClass( "red", 2000 )
+ .delay( 500 )
+ .addClass( "green", 2000 )
+ .delay( 500 )
+ .addClass( "blue", 2000 );
+ $( "#box2" )
+ .addClass( "red", 2000 )
+ .delay( 500 )
+ .addClass( "green", 2000 )
+ .delay( 500 )
+ .addClass( "blue", 2000 );
+ });
+ </script>
+</head>
+<body>
+
+<div id="box1" class="box"></div>
+<div id="box2" class="box"></div>
+
+</body>
+</html>
diff --git a/tests/visual/all.html b/tests/visual/all.html
index 5116a22ab..c50465a47 100644
--- a/tests/visual/all.html
+++ b/tests/visual/all.html
@@ -5,7 +5,7 @@
<title>Simple All</title>
<link rel="stylesheet" href="all.css" type="text/css">
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/animate/animate_backgroundColor_hex.html b/tests/visual/animate/animate_backgroundColor_hex.html
index 87795935e..42120064e 100644
--- a/tests/visual/animate/animate_backgroundColor_hex.html
+++ b/tests/visual/animate/animate_backgroundColor_hex.html
@@ -5,7 +5,7 @@
<title>Animate Visual Test : Animate backgroundColor hex</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.effects.core.js"></script>
<script type="text/javascript">
function hexFromRGB (r, g, b) {
diff --git a/tests/visual/animate/animate_backgroundColor_rgb.html b/tests/visual/animate/animate_backgroundColor_rgb.html
index 363553beb..0092c1928 100644
--- a/tests/visual/animate/animate_backgroundColor_rgb.html
+++ b/tests/visual/animate/animate_backgroundColor_rgb.html
@@ -5,7 +5,7 @@
<title>Animate Visual Test : Animate backgroundColor rgb</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.effects.core.js"></script>
<script type="text/javascript">
function randomColorRGB() {
diff --git a/tests/visual/animate/animate_color_hex.html b/tests/visual/animate/animate_color_hex.html
index 25d0da5b2..b904f6eed 100644
--- a/tests/visual/animate/animate_color_hex.html
+++ b/tests/visual/animate/animate_color_hex.html
@@ -5,7 +5,7 @@
<title>Animate Visual Test : Animate color hex</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.effects.core.js"></script>
<script type="text/javascript">
function hexFromRGB (r, g, b) {
diff --git a/tests/visual/animate/animate_color_rgb.html b/tests/visual/animate/animate_color_rgb.html
index 152ca631e..a762a322f 100644
--- a/tests/visual/animate/animate_color_rgb.html
+++ b/tests/visual/animate/animate_color_rgb.html
@@ -5,7 +5,7 @@
<title>Animate Visual Test : Animate color rgb</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.effects.core.js"></script>
<script type="text/javascript">
function randomColorRGB() {
diff --git a/tests/visual/autocomplete/autocomplete.html b/tests/visual/autocomplete/autocomplete.html
index 3076f8640..199451e9c 100644
--- a/tests/visual/autocomplete/autocomplete.html
+++ b/tests/visual/autocomplete/autocomplete.html
@@ -5,7 +5,7 @@
<title>Autocomplete Visual Test: Default</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.position.js"></script>
@@ -41,8 +41,11 @@
close: function() {
log("Hiding suggestions");
},
+ select: function(event, ui) {
+ log("Selected: " + ui.item.value);
+ },
change: function(event, ui) {
- log(ui.item ? ("Selected: " + ui.item.value) : "Nothing selected, input was " + this.value);
+ log(ui.item ? ("Changed to: " + ui.item.value) : "Nothing selected, input was " + this.value);
}
});
}
diff --git a/tests/visual/button/button.html b/tests/visual/button/button.html
index 13e19302c..0e091c4d8 100644
--- a/tests/visual/button/button.html
+++ b/tests/visual/button/button.html
@@ -9,7 +9,7 @@
#toolbar { margin-top: 2em; padding:0.2em; }
#ops1, #ops2, #format, #mode { margin-right: 1em }
</style>
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../external/jquery.metadata.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
@@ -58,9 +58,10 @@
<div>
With icon
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
- <button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
- <button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
- <button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
+ <button class="{button:{icons:{primary:'ui-icon-locked'}}}">Primary icon</button>
+ <button class="{button:{icons:{secondary:'ui-icon-triangle-1-s'}}}">Secondary icon</button>
+ <button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Both icons</button>
+ <button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons and no text</button>
</div>
</div>
diff --git a/tests/visual/button/button_disabled_true.html b/tests/visual/button/button_disabled_true.html
index 8ffe445ee..0188655fa 100644
--- a/tests/visual/button/button_disabled_true.html
+++ b/tests/visual/button/button_disabled_true.html
@@ -5,7 +5,7 @@
<title>Button Visual Test : Button disabled true</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.button.js"></script>
diff --git a/tests/visual/button/button_input_type_checkbox.html b/tests/visual/button/button_input_type_checkbox.html
index 37be580fe..c3ceb271e 100644
--- a/tests/visual/button/button_input_type_checkbox.html
+++ b/tests/visual/button/button_input_type_checkbox.html
@@ -5,7 +5,7 @@
<title>Button Visual Test : Button input type checkbox</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.button.js"></script>
diff --git a/tests/visual/button/button_option_disabled_true.html b/tests/visual/button/button_option_disabled_true.html
index 8ffe445ee..0188655fa 100644
--- a/tests/visual/button/button_option_disabled_true.html
+++ b/tests/visual/button/button_option_disabled_true.html
@@ -5,7 +5,7 @@
<title>Button Visual Test : Button disabled true</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.button.js"></script>
diff --git a/tests/visual/button/button_performance.html b/tests/visual/button/button_performance.html
index 2d31c2f27..1cd9c992b 100644
--- a/tests/visual/button/button_performance.html
+++ b/tests/visual/button/button_performance.html
@@ -9,14 +9,17 @@
#toolbar { margin-top: 2em; padding:0.2em; }
#ops1, #ops2, #format, #mode { margin-right: 1em }
</style>
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../external/jquery.metadata.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.button.js"></script>
<script type="text/javascript">
$(function() {
+ var start = +new Date();
$("button").button();
+ var end = +new Date();
+ $("<p></p>").text( "Time to initialize: " + (end - start) + "ms" ).prependTo("body");
});
</script>
</head>
diff --git a/tests/visual/button/button_ticket_5254.html b/tests/visual/button/button_ticket_5254.html
index af97d3d12..95ecbeabd 100644
--- a/tests/visual/button/button_ticket_5254.html
+++ b/tests/visual/button/button_ticket_5254.html
@@ -5,7 +5,7 @@
<title>Button Visual Test : Button ticket #5254</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.button.js"></script>
diff --git a/tests/visual/button/button_ticket_5261.html b/tests/visual/button/button_ticket_5261.html
index 285d3ea86..3d2f81729 100644
--- a/tests/visual/button/button_ticket_5261.html
+++ b/tests/visual/button/button_ticket_5261.html
@@ -5,7 +5,7 @@
<title>Button Visual Test : Button ticket #5261</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.button.js"></script>
diff --git a/tests/visual/button/button_ticket_5278.html b/tests/visual/button/button_ticket_5278.html
index d43f1ed79..253b52f8c 100644
--- a/tests/visual/button/button_ticket_5278.html
+++ b/tests/visual/button/button_ticket_5278.html
@@ -5,7 +5,7 @@
<title>Button Visual Test : Button ticket #5278</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.button.js"></script>
diff --git a/tests/visual/compound/accordion_dialog.html b/tests/visual/compound/accordion_dialog.html
new file mode 100644
index 000000000..5f10357c8
--- /dev/null
+++ b/tests/visual/compound/accordion_dialog.html
@@ -0,0 +1,202 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <title>Compound Visual Test : Accordion in Dialog</title>
+ <link rel="stylesheet" href="../visual.css" type="text/css" />
+ <link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
+ <script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
+ <script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
+ <script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
+ <script type="text/javascript" src="../../../ui/jquery.ui.position.js"></script>
+ <script type="text/javascript" src="../../../ui/jquery.ui.accordion.js"></script>
+ <script type="text/javascript" src="../../../ui/jquery.ui.resizable.js"></script>
+ <script type="text/javascript" src="../../../ui/jquery.ui.draggable.js"></script>
+ <script type="text/javascript" src="../../../ui/jquery.ui.dialog.js"></script>
+ <script type="text/javascript">
+ $(function() {
+ $('#accordion').accordion({
+ collapsible: true,
+ active: false
+ });
+ $('#dialog').dialog({
+ buttons: {
+ Test: $.noop
+ }
+ });
+ });
+ </script>
+</head>
+<body>
+
+<div id="dialog">
+ <div id="accordion">
+ <h3><a href="#">Section 1</a></h3>
+ <div>
+ <p>
+ Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer
+ ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit
+ amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut
+ odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.
+ </p>
+ </div>
+ <h3><a href="#">Section 2</a></h3>
+ <div>
+ <p>
+ Cras dictum. Pellentesque habitant morbi tristique senectus et netus
+ et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in
+ faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia
+ mauris vel est.
+ </p>
+ <p>
+ Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus.
+ Class aptent taciti sociosqu ad litora torquent per conubia nostra, per
+ inceptos himenaeos.
+ </p>
+ </div>
+ <h3><a href="#">Section 3</a></h3>
+ <div>
+ <p>
+ Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis.
+ Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero
+ ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis
+ lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui.
+ </p>
+ <ul>
+ <li>List item one</li>
+ <li>List item two</li>
+ <li>List item three</li>
+ </ul>
+ </div>
+ </div>
+</div>
+
+<p>
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam vitae urna quam. Fusce adipiscing erat eget magna malesuada vel mollis ligula ullamcorper. Donec pulvinar, libero et vehicula facilisis, odio orci fringilla magna, non ultricies ipsum justo a tellus. Proin facilisis magna vitae quam vestibulum tempor. Aenean semper placerat posuere. In nisi diam, ullamcorper sit amet viverra sed, pretium sed neque. Sed posuere vulputate mauris vitae placerat. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam in odio elit, non tempor felis. Integer non iaculis ante. Sed erat mauris, aliquam nec consequat id, congue id libero. Maecenas elementum gravida tincidunt. Suspendisse lacinia enim sit amet nulla cursus pulvinar.
+</p>
+<p>
+Proin ut sem nulla, at cursus sapien. Duis sagittis lacus vitae justo mattis in sagittis ligula eleifend. Curabitur sit amet felis pharetra justo facilisis mollis eget nec massa. Sed nisi urna, semper lobortis pretium ac, interdum nec lacus. In gravida, leo sit amet vehicula malesuada, augue nunc consectetur nulla, vel tincidunt est nunc aliquet neque. Maecenas imperdiet eros id ligula tempor dapibus. Integer commodo metus sit amet quam vestibulum volutpat. In et lorem ac leo rhoncus auctor sit amet ut urna. Nulla sed nisl quis turpis vestibulum accumsan. Duis mollis aliquam sollicitudin. Pellentesque porta semper interdum. Sed eros orci, congue quis sollicitudin ut, rutrum vitae nibh. Nunc et leo non ligula interdum imperdiet. Integer tincidunt rhoncus ullamcorper. Curabitur et ullamcorper lorem. Ut at tellus eu metus congue sollicitudin eget at orci.
+</p>
+<p>
+Duis sem mauris, pulvinar quis placerat vel, aliquet non leo. Cras eros arcu, ullamcorper sit amet imperdiet at, blandit interdum augue. Phasellus non nunc ac ante condimentum tristique vitae sed urna. Integer nec sapien et dolor volutpat bibendum ac vitae justo. Aliquam gravida fermentum felis, nec dictum dui dictum ac. Maecenas eget magna leo. Phasellus ac nulla risus, dapibus ornare turpis. Morbi a massa tortor. Duis ac turpis lacus. Duis nibh metus, euismod quis ultrices vitae, sollicitudin vel leo. Nullam volutpat odio ac elit imperdiet gravida.
+</p>
+<p>
+Donec luctus magna id ipsum aliquam eget convallis tortor tristique. Etiam est quam, aliquam ac rutrum quis, pretium sed tortor. Aliquam lacus diam, rhoncus molestie convallis ut, luctus ac lacus. Nunc porttitor ante a ligula rutrum elementum. Cras dui tellus, pulvinar vel convallis sit amet, facilisis nec ipsum. Donec fermentum lectus lorem, id accumsan eros. Nunc semper laoreet lacus quis ullamcorper. Nunc luctus erat vitae orci sodales facilisis non ut felis. Aliquam pretium sapien sed enim adipiscing in feugiat est ornare. Aenean ultricies convallis tortor sit amet ullamcorper.
+</p>
+<p>
+Etiam ultricies elit non enim elementum aliquet. Vivamus quis fringilla mauris. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nunc blandit felis at massa interdum ac molestie lectus volutpat. Mauris commodo nibh id sem porta id feugiat ante euismod. Nullam fermentum libero varius turpis pharetra cursus ut sed lacus. Mauris molestie egestas augue eu bibendum. Quisque pulvinar, leo luctus vehicula faucibus, quam mi ornare dui, a rhoncus nisi eros nec dolor. Sed dictum ultricies ipsum eu ultrices. Etiam semper condimentum nibh in tempor.
+</p>
+<p>
+
+Vivamus interdum ligula nec neque sollicitudin ornare. Vestibulum a eros eget nisi accumsan hendrerit quis sit amet ipsum. Phasellus condimentum vestibulum felis eu hendrerit. Suspendisse in est tellus, et consequat ante. Nam at sapien lobortis risus dignissim malesuada. In dapibus lectus sed nibh adipiscing dictum. Nulla pellentesque convallis auctor. Suspendisse ut purus et nibh pulvinar tincidunt. Maecenas dapibus purus at odio commodo ac cursus risus luctus. Ut quis libero justo. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nullam vestibulum ipsum quis ante porttitor porta. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Ut in ante neque. Donec ante ante, porttitor non egestas a, pulvinar sed sem. Nam augue quam, fringilla sed egestas et, vulputate non nisi.
+</p>
+<p>
+Nunc sit amet arcu ac nulla bibendum sollicitudin. Pellentesque sed ligula urna. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Quisque egestas, tortor a vestibulum malesuada, ante dui condimentum massa, ac rutrum massa mauris non mi. Praesent in nisi leo. Sed ac augue nisl. Donec eget enim ut arcu posuere condimentum vel id magna. Vestibulum laoreet imperdiet massa, ut venenatis ante dapibus eu. Phasellus faucibus vestibulum eros mollis adipiscing. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque aliquet lectus at enim gravida tempus tincidunt mi porta. Sed vehicula molestie ligula, sed tincidunt diam suscipit vitae.
+</p>
+<p>
+Nullam euismod tempus ante, vel semper turpis pharetra eget. Nulla pretium ante et ipsum dapibus imperdiet. Praesent ipsum velit, gravida sed adipiscing id, condimentum in odio. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Fusce blandit vehicula felis, pretium ullamcorper leo tempor non. Nunc eget nisi nunc, posuere pellentesque enim. Nunc gravida orci quis odio semper ultricies. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque eu neque a sapien commodo placerat. Aenean non eros semper metus viverra porttitor. Integer vel tortor eu neque commodo ultrices eu quis tellus. Nam commodo sagittis dolor in consequat. Fusce hendrerit turpis eget leo rutrum ut scelerisque nibh condimentum. Fusce sit amet feugiat mauris. Maecenas elementum tellus nec augue rutrum mattis. Sed viverra tempor blandit. Pellentesque adipiscing tincidunt est sit amet tincidunt. Proin suscipit suscipit odio, eu pellentesque dolor pharetra non. Aliquam erat volutpat.
+</p>
+<p>
+Duis pellentesque, enim sed mollis congue, ante mauris feugiat nisi, bibendum euismod erat enim ac magna. Mauris risus nisl, sodales vel viverra ut, interdum sed neque. Nunc ac dignissim felis. Proin tincidunt orci elementum erat molestie suscipit. Cras suscipit, sem ac vehicula vehicula, lorem orci dictum nibh, ut bibendum odio sem non erat. Maecenas quis metus eget mauris feugiat porta a eu ipsum. Vivamus tortor purus, posuere ut luctus sed, ullamcorper feugiat neque. In hac habitasse platea dictumst. Vivamus nec justo vel lacus mattis pellentesque. Nunc vel gravida quam. Etiam at aliquam magna.
+</p>
+<p>
+Sed ac lacus ac felis auctor suscipit. Aliquam lacinia lectus ac nunc placerat aliquam accumsan neque interdum. Aenean in sapien sem. Suspendisse potenti. Aenean congue vulputate scelerisque. Proin eget eros tortor. Morbi rhoncus, mi vitae sollicitudin luctus, est orci porttitor turpis, vitae cursus est dui sed leo. Curabitur erat nunc, placerat bibendum tempus in, blandit eget ipsum. Cras in feugiat ipsum. Vestibulum dapibus quam nec odio pretium non dapibus purus dapibus. Pellentesque vehicula metus bibendum orci ultrices tincidunt. Sed fermentum, neque eget porta tempor, sem neque pulvinar ligula, vitae elementum massa metus eget nunc. Nunc sed orci eu purus sodales fringilla. Quisque aliquet arcu ac dolor ultrices fringilla. Nullam ornare tempus lorem, in mattis magna mollis laoreet. Vestibulum convallis arcu in purus lobortis et sollicitudin ipsum aliquet. Quisque risus est, sagittis eu aliquam ac, condimentum at massa. Fusce consectetur dignissim sem vel ornare. Maecenas posuere ultricies sollicitudin. Duis luctus, purus quis auctor egestas, diam felis scelerisque diam, a varius tellus erat a nunc.
+</p>
+<p>
+Phasellus id ante neque, eget volutpat risus. Vivamus scelerisque, nisi rutrum ultrices varius, sem quam suscipit purus, in elementum nibh nulla nec nisi. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Phasellus interdum hendrerit mi, nec cursus nisi tempor ac. Phasellus luctus ligula bibendum mauris iaculis id tempor odio volutpat. Nunc in augue metus. Suspendisse at libero at libero lacinia convallis eu vitae metus. Duis eget risus odio. Nam id mi tellus, non vulputate libero. In placerat dictum orci eu pellentesque. Etiam sed varius felis. Phasellus ut adipiscing leo. Morbi ante eros, interdum eget dapibus ac, varius congue nunc. Donec vulputate sapien id risus sodales sit amet pretium velit iaculis. Etiam ultrices tempor euismod.
+</p>
+
+<p>
+Praesent in turpis ut mauris cursus commodo. Mauris lectus tellus, congue sit amet dictum id, convallis ac nisi. Curabitur ante dolor, sagittis ac auctor ac, aliquet vel nisl. Nulla non porta sapien. Nunc non aliquet erat. Vestibulum euismod auctor volutpat. Mauris libero tellus, pharetra eget lacinia sit amet, viverra eget velit. Sed viverra varius velit at pharetra. Sed pharetra dolor sed erat interdum in placerat magna lacinia. Cras venenatis tellus non sapien egestas sollicitudin. Duis congue pharetra lacinia. Curabitur eu diam vel tortor rhoncus dignissim vel sed enim. Proin ut congue mi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce viverra elit eu dolor tincidunt tempor vel nec magna. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae;
+</p>
+<p>
+Sed ligula purus, tristique nec condimentum sed, facilisis ac augue. Integer volutpat velit urna, et posuere ligula. In tempus luctus dignissim. Duis augue neque, egestas ut tincidunt in, congue a enim. Aliquam ut odio dui, id congue tortor. Nullam venenatis erat non nulla tincidunt scelerisque. Morbi in urna ac nulla molestie scelerisque eu a nulla. Aliquam erat volutpat. Praesent dictum scelerisque lorem mattis vehicula. Quisque ut rutrum metus. Mauris pharetra ante vitae nunc mattis vulputate. Mauris molestie volutpat mauris, ut iaculis dui bibendum ac. Ut egestas laoreet est, eget mollis libero laoreet at. In sagittis vestibulum accumsan. Nam dapibus ultrices urna sit amet accumsan. Pellentesque id ultrices elit. Aliquam quis magna ut leo sagittis posuere sit amet id enim. Etiam congue eros sit amet nulla aliquam gravida. In accumsan lectus nibh. Proin volutpat pretium facilisis.
+</p>
+<p>
+Mauris pulvinar erat at quam egestas ac aliquet mi gravida. Integer pellentesque quam vel massa commodo vitae sollicitudin eros volutpat. Aenean mollis felis molestie quam placerat et elementum eros gravida. In hac habitasse platea dictumst. Mauris ullamcorper facilisis eros, nec rutrum mi auctor sed. Ut viverra, orci a viverra ultricies, turpis enim pellentesque urna, sit amet viverra metus enim ut justo. Donec aliquam, urna id condimentum rutrum, nibh nunc tristique magna, at luctus quam enim at turpis. Maecenas dapibus dui ac velit adipiscing fringilla. Nullam malesuada nunc vel lorem cursus sed congue felis lacinia. Pellentesque vehicula gravida est nec facilisis. Nullam imperdiet fringilla orci in dignissim. Praesent orci dolor, vestibulum eu auctor quis, tristique auctor mi. Nunc euismod dui sit amet metus malesuada feugiat. Fusce iaculis neque in velit interdum rhoncus. Aenean at risus ut arcu dapibus congue a tincidunt dolor. Donec porttitor lacus et urna vestibulum a sagittis nunc mollis.
+</p>
+<p>
+In metus tellus, eleifend id aliquet at, pulvinar ut tortor. Aliquam erat volutpat. Vivamus lacus magna, consequat vel euismod sed, viverra a ipsum. Praesent dapibus laoreet nisi, nec posuere massa commodo vel. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ullamcorper adipiscing ante, dapibus molestie velit cursus id. Nam cursus arcu consectetur lectus sollicitudin gravida. Maecenas urna sapien, fermentum sit amet consectetur at, feugiat ut massa. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer sit amet ante nec arcu bibendum bibendum ut ut justo. Nulla ut libero est.
+</p>
+<p>
+Aenean sem augue, malesuada quis elementum id, aliquet at turpis. Nam volutpat interdum purus, at dictum risus posuere rhoncus. Praesent metus diam, egestas in lacinia eu, tincidunt in nibh. Phasellus sollicitudin volutpat erat, sit amet mattis sapien fringilla in. Quisque rhoncus, felis a pellentesque dictum, arcu urna molestie sem, ut tincidunt nulla magna in enim. Vestibulum erat nulla, sollicitudin quis faucibus et, blandit quis est. Nam vehicula justo augue. Vivamus elementum sodales aliquet. Donec convallis neque sed dui euismod aliquet. Morbi elementum hendrerit odio, vel mollis felis dignissim vitae. Phasellus a diam lacus. Integer congue, mi vehicula egestas imperdiet, nulla mi commodo tortor, sit amet fermentum urna leo non dolor. Donec elementum elementum urna at sollicitudin. Vestibulum placerat tortor in nibh lobortis ac consectetur felis interdum. Integer faucibus diam nec magna porttitor sit amet dictum elit consectetur. Suspendisse risus velit, pellentesque eget viverra in, porta eget metus. Sed porta elit erat.
+</p>
+<p>
+Nulla facilisi. Aliquam vulputate dolor quis nisi auctor luctus. Fusce vitae scelerisque velit. Sed sit amet tortor a nisi convallis pulvinar et eget sapien. Nulla condimentum auctor velit, a viverra nibh pellentesque eget. Aenean at lacus quam, lobortis posuere justo. Duis et diam in ligula rhoncus pellentesque. Morbi massa tellus, mattis nec condimentum ut, tempus eu lectus. In mi orci, luctus at pulvinar vel, scelerisque nec enim. Vestibulum vehicula odio in augue dignissim tincidunt. Integer ac velit ligula. Integer elit turpis, mattis eget ornare ut, eleifend in magna. Curabitur sagittis dui in felis ultricies gravida.
+
+</p>
+<p>
+Praesent adipiscing rhoncus rutrum. Aenean ultricies auctor risus at fringilla. Mauris quam lectus, ullamcorper sed ultricies at, interdum eget tellus. Vestibulum ac mi erat. Sed ac tellus erat, sed laoreet arcu. Fusce eget ipsum ac sem volutpat viverra. Suspendisse ac felis sit amet purus viverra luctus non eget ipsum. Praesent eleifend euismod tortor, vel malesuada felis consectetur ac. Nunc a mi sit amet nulla venenatis tincidunt. Morbi vitae nisl nulla, nec adipiscing sem. Nullam porttitor scelerisque urna, id dapibus diam malesuada vitae. Duis auctor eleifend lectus, a tempor odio aliquet quis. Nam eu est urna, nec ultricies lectus. Ut egestas aliquet nunc, et hendrerit erat vehicula non. Aliquam tempus faucibus arcu, at vulputate erat tempor eu. Quisque tempus, lectus adipiscing blandit scelerisque, magna felis eleifend odio, non volutpat felis enim sit amet leo. Mauris augue tortor, ultrices ac sagittis non, vulputate quis nisl.
+</p>
+<p>
+Fusce erat sem, dictum in bibendum ac, feugiat ut odio. Duis aliquam felis sit amet diam egestas consectetur. Phasellus consequat, mauris eget venenatis porta, velit sapien malesuada nibh, id dignissim ante tellus vitae lacus. Duis non nisl sit amet nunc euismod posuere. Donec eros erat, fringilla vel iaculis condimentum, vestibulum at neque. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Aliquam lorem sapien, bibendum eu mollis nec, gravida dapibus lectus. Aenean pretium volutpat nunc a placerat. Nullam eget tellus quis ipsum ultrices ullamcorper non eu mauris. Donec volutpat tincidunt elit, sit amet cursus justo elementum quis. Mauris volutpat, enim sit amet tempor commodo, purus lacus luctus dui, sed aliquet ligula nisi vel diam. Donec est elit, lobortis at eleifend id, feugiat egestas massa. Fusce elementum sollicitudin adipiscing. Vivamus et dapibus ipsum. Morbi interdum libero a nisl dignissim sed facilisis ipsum lacinia.
+</p>
+<p>
+Cras a augue dui, vitae tincidunt enim. In hac habitasse platea dictumst. Proin nec magna sed nulla mollis tempus id ut lectus. Morbi volutpat ultricies ipsum, quis imperdiet libero tempor nec. Donec bibendum ornare blandit. Aliquam rutrum risus non turpis commodo non commodo erat molestie. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fermentum, magna vel euismod convallis, mi magna vehicula velit, aliquet rhoncus ipsum massa et nunc. Nullam blandit purus non neque ullamcorper a aliquet nisl tristique. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed sit amet velit magna, sit amet rutrum dui. Donec elementum mi sed velit consectetur vulputate. Sed interdum adipiscing mattis.
+</p>
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam vitae urna quam. Fusce adipiscing erat eget magna malesuada vel mollis ligula ullamcorper. Donec pulvinar, libero et vehicula facilisis, odio orci fringilla magna, non ultricies ipsum justo a tellus. Proin facilisis magna vitae quam vestibulum tempor. Aenean semper placerat posuere. In nisi diam, ullamcorper sit amet viverra sed, pretium sed neque. Sed posuere vulputate mauris vitae placerat. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam in odio elit, non tempor felis. Integer non iaculis ante. Sed erat mauris, aliquam nec consequat id, congue id libero. Maecenas elementum gravida tincidunt. Suspendisse lacinia enim sit amet nulla cursus pulvinar.
+</p>
+<p>
+Proin ut sem nulla, at cursus sapien. Duis sagittis lacus vitae justo mattis in sagittis ligula eleifend. Curabitur sit amet felis pharetra justo facilisis mollis eget nec massa. Sed nisi urna, semper lobortis pretium ac, interdum nec lacus. In gravida, leo sit amet vehicula malesuada, augue nunc consectetur nulla, vel tincidunt est nunc aliquet neque. Maecenas imperdiet eros id ligula tempor dapibus. Integer commodo metus sit amet quam vestibulum volutpat. In et lorem ac leo rhoncus auctor sit amet ut urna. Nulla sed nisl quis turpis vestibulum accumsan. Duis mollis aliquam sollicitudin. Pellentesque porta semper interdum. Sed eros orci, congue quis sollicitudin ut, rutrum vitae nibh. Nunc et leo non ligula interdum imperdiet. Integer tincidunt rhoncus ullamcorper. Curabitur et ullamcorper lorem. Ut at tellus eu metus congue sollicitudin eget at orci.
+</p>
+<p>
+Duis sem mauris, pulvinar quis placerat vel, aliquet non leo. Cras eros arcu, ullamcorper sit amet imperdiet at, blandit interdum augue. Phasellus non nunc ac ante condimentum tristique vitae sed urna. Integer nec sapien et dolor volutpat bibendum ac vitae justo. Aliquam gravida fermentum felis, nec dictum dui dictum ac. Maecenas eget magna leo. Phasellus ac nulla risus, dapibus ornare turpis. Morbi a massa tortor. Duis ac turpis lacus. Duis nibh metus, euismod quis ultrices vitae, sollicitudin vel leo. Nullam volutpat odio ac elit imperdiet gravida.
+</p>
+<p>
+Donec luctus magna id ipsum aliquam eget convallis tortor tristique. Etiam est quam, aliquam ac rutrum quis, pretium sed tortor. Aliquam lacus diam, rhoncus molestie convallis ut, luctus ac lacus. Nunc porttitor ante a ligula rutrum elementum. Cras dui tellus, pulvinar vel convallis sit amet, facilisis nec ipsum. Donec fermentum lectus lorem, id accumsan eros. Nunc semper laoreet lacus quis ullamcorper. Nunc luctus erat vitae orci sodales facilisis non ut felis. Aliquam pretium sapien sed enim adipiscing in feugiat est ornare. Aenean ultricies convallis tortor sit amet ullamcorper.
+</p>
+<p>
+Etiam ultricies elit non enim elementum aliquet. Vivamus quis fringilla mauris. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nunc blandit felis at massa interdum ac molestie lectus volutpat. Mauris commodo nibh id sem porta id feugiat ante euismod. Nullam fermentum libero varius turpis pharetra cursus ut sed lacus. Mauris molestie egestas augue eu bibendum. Quisque pulvinar, leo luctus vehicula faucibus, quam mi ornare dui, a rhoncus nisi eros nec dolor. Sed dictum ultricies ipsum eu ultrices. Etiam semper condimentum nibh in tempor.
+</p>
+<p>
+
+Vivamus interdum ligula nec neque sollicitudin ornare. Vestibulum a eros eget nisi accumsan hendrerit quis sit amet ipsum. Phasellus condimentum vestibulum felis eu hendrerit. Suspendisse in est tellus, et consequat ante. Nam at sapien lobortis risus dignissim malesuada. In dapibus lectus sed nibh adipiscing dictum. Nulla pellentesque convallis auctor. Suspendisse ut purus et nibh pulvinar tincidunt. Maecenas dapibus purus at odio commodo ac cursus risus luctus. Ut quis libero justo. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nullam vestibulum ipsum quis ante porttitor porta. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Ut in ante neque. Donec ante ante, porttitor non egestas a, pulvinar sed sem. Nam augue quam, fringilla sed egestas et, vulputate non nisi.
+</p>
+<p>
+Nunc sit amet arcu ac nulla bibendum sollicitudin. Pellentesque sed ligula urna. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Quisque egestas, tortor a vestibulum malesuada, ante dui condimentum massa, ac rutrum massa mauris non mi. Praesent in nisi leo. Sed ac augue nisl. Donec eget enim ut arcu posuere condimentum vel id magna. Vestibulum laoreet imperdiet massa, ut venenatis ante dapibus eu. Phasellus faucibus vestibulum eros mollis adipiscing. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque aliquet lectus at enim gravida tempus tincidunt mi porta. Sed vehicula molestie ligula, sed tincidunt diam suscipit vitae.
+</p>
+<p>
+Nullam euismod tempus ante, vel semper turpis pharetra eget. Nulla pretium ante et ipsum dapibus imperdiet. Praesent ipsum velit, gravida sed adipiscing id, condimentum in odio. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Fusce blandit vehicula felis, pretium ullamcorper leo tempor non. Nunc eget nisi nunc, posuere pellentesque enim. Nunc gravida orci quis odio semper ultricies. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque eu neque a sapien commodo placerat. Aenean non eros semper metus viverra porttitor. Integer vel tortor eu neque commodo ultrices eu quis tellus. Nam commodo sagittis dolor in consequat. Fusce hendrerit turpis eget leo rutrum ut scelerisque nibh condimentum. Fusce sit amet feugiat mauris. Maecenas elementum tellus nec augue rutrum mattis. Sed viverra tempor blandit. Pellentesque adipiscing tincidunt est sit amet tincidunt. Proin suscipit suscipit odio, eu pellentesque dolor pharetra non. Aliquam erat volutpat.
+</p>
+<p>
+Duis pellentesque, enim sed mollis congue, ante mauris feugiat nisi, bibendum euismod erat enim ac magna. Mauris risus nisl, sodales vel viverra ut, interdum sed neque. Nunc ac dignissim felis. Proin tincidunt orci elementum erat molestie suscipit. Cras suscipit, sem ac vehicula vehicula, lorem orci dictum nibh, ut bibendum odio sem non erat. Maecenas quis metus eget mauris feugiat porta a eu ipsum. Vivamus tortor purus, posuere ut luctus sed, ullamcorper feugiat neque. In hac habitasse platea dictumst. Vivamus nec justo vel lacus mattis pellentesque. Nunc vel gravida quam. Etiam at aliquam magna.
+</p>
+<p>
+Sed ac lacus ac felis auctor suscipit. Aliquam lacinia lectus ac nunc placerat aliquam accumsan neque interdum. Aenean in sapien sem. Suspendisse potenti. Aenean congue vulputate scelerisque. Proin eget eros tortor. Morbi rhoncus, mi vitae sollicitudin luctus, est orci porttitor turpis, vitae cursus est dui sed leo. Curabitur erat nunc, placerat bibendum tempus in, blandit eget ipsum. Cras in feugiat ipsum. Vestibulum dapibus quam nec odio pretium non dapibus purus dapibus. Pellentesque vehicula metus bibendum orci ultrices tincidunt. Sed fermentum, neque eget porta tempor, sem neque pulvinar ligula, vitae elementum massa metus eget nunc. Nunc sed orci eu purus sodales fringilla. Quisque aliquet arcu ac dolor ultrices fringilla. Nullam ornare tempus lorem, in mattis magna mollis laoreet. Vestibulum convallis arcu in purus lobortis et sollicitudin ipsum aliquet. Quisque risus est, sagittis eu aliquam ac, condimentum at massa. Fusce consectetur dignissim sem vel ornare. Maecenas posuere ultricies sollicitudin. Duis luctus, purus quis auctor egestas, diam felis scelerisque diam, a varius tellus erat a nunc.
+</p>
+<p>
+Phasellus id ante neque, eget volutpat risus. Vivamus scelerisque, nisi rutrum ultrices varius, sem quam suscipit purus, in elementum nibh nulla nec nisi. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Phasellus interdum hendrerit mi, nec cursus nisi tempor ac. Phasellus luctus ligula bibendum mauris iaculis id tempor odio volutpat. Nunc in augue metus. Suspendisse at libero at libero lacinia convallis eu vitae metus. Duis eget risus odio. Nam id mi tellus, non vulputate libero. In placerat dictum orci eu pellentesque. Etiam sed varius felis. Phasellus ut adipiscing leo. Morbi ante eros, interdum eget dapibus ac, varius congue nunc. Donec vulputate sapien id risus sodales sit amet pretium velit iaculis. Etiam ultrices tempor euismod.
+</p>
+
+<p>
+Praesent in turpis ut mauris cursus commodo. Mauris lectus tellus, congue sit amet dictum id, convallis ac nisi. Curabitur ante dolor, sagittis ac auctor ac, aliquet vel nisl. Nulla non porta sapien. Nunc non aliquet erat. Vestibulum euismod auctor volutpat. Mauris libero tellus, pharetra eget lacinia sit amet, viverra eget velit. Sed viverra varius velit at pharetra. Sed pharetra dolor sed erat interdum in placerat magna lacinia. Cras venenatis tellus non sapien egestas sollicitudin. Duis congue pharetra lacinia. Curabitur eu diam vel tortor rhoncus dignissim vel sed enim. Proin ut congue mi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce viverra elit eu dolor tincidunt tempor vel nec magna. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae;
+</p>
+<p>
+Sed ligula purus, tristique nec condimentum sed, facilisis ac augue. Integer volutpat velit urna, et posuere ligula. In tempus luctus dignissim. Duis augue neque, egestas ut tincidunt in, congue a enim. Aliquam ut odio dui, id congue tortor. Nullam venenatis erat non nulla tincidunt scelerisque. Morbi in urna ac nulla molestie scelerisque eu a nulla. Aliquam erat volutpat. Praesent dictum scelerisque lorem mattis vehicula. Quisque ut rutrum metus. Mauris pharetra ante vitae nunc mattis vulputate. Mauris molestie volutpat mauris, ut iaculis dui bibendum ac. Ut egestas laoreet est, eget mollis libero laoreet at. In sagittis vestibulum accumsan. Nam dapibus ultrices urna sit amet accumsan. Pellentesque id ultrices elit. Aliquam quis magna ut leo sagittis posuere sit amet id enim. Etiam congue eros sit amet nulla aliquam gravida. In accumsan lectus nibh. Proin volutpat pretium facilisis.
+</p>
+<p>
+Mauris pulvinar erat at quam egestas ac aliquet mi gravida. Integer pellentesque quam vel massa commodo vitae sollicitudin eros volutpat. Aenean mollis felis molestie quam placerat et elementum eros gravida. In hac habitasse platea dictumst. Mauris ullamcorper facilisis eros, nec rutrum mi auctor sed. Ut viverra, orci a viverra ultricies, turpis enim pellentesque urna, sit amet viverra metus enim ut justo. Donec aliquam, urna id condimentum rutrum, nibh nunc tristique magna, at luctus quam enim at turpis. Maecenas dapibus dui ac velit adipiscing fringilla. Nullam malesuada nunc vel lorem cursus sed congue felis lacinia. Pellentesque vehicula gravida est nec facilisis. Nullam imperdiet fringilla orci in dignissim. Praesent orci dolor, vestibulum eu auctor quis, tristique auctor mi. Nunc euismod dui sit amet metus malesuada feugiat. Fusce iaculis neque in velit interdum rhoncus. Aenean at risus ut arcu dapibus congue a tincidunt dolor. Donec porttitor lacus et urna vestibulum a sagittis nunc mollis.
+</p>
+<p>
+In metus tellus, eleifend id aliquet at, pulvinar ut tortor. Aliquam erat volutpat. Vivamus lacus magna, consequat vel euismod sed, viverra a ipsum. Praesent dapibus laoreet nisi, nec posuere massa commodo vel. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ullamcorper adipiscing ante, dapibus molestie velit cursus id. Nam cursus arcu consectetur lectus sollicitudin gravida. Maecenas urna sapien, fermentum sit amet consectetur at, feugiat ut massa. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer sit amet ante nec arcu bibendum bibendum ut ut justo. Nulla ut libero est.
+</p>
+<p>
+Aenean sem augue, malesuada quis elementum id, aliquet at turpis. Nam volutpat interdum purus, at dictum risus posuere rhoncus. Praesent metus diam, egestas in lacinia eu, tincidunt in nibh. Phasellus sollicitudin volutpat erat, sit amet mattis sapien fringilla in. Quisque rhoncus, felis a pellentesque dictum, arcu urna molestie sem, ut tincidunt nulla magna in enim. Vestibulum erat nulla, sollicitudin quis faucibus et, blandit quis est. Nam vehicula justo augue. Vivamus elementum sodales aliquet. Donec convallis neque sed dui euismod aliquet. Morbi elementum hendrerit odio, vel mollis felis dignissim vitae. Phasellus a diam lacus. Integer congue, mi vehicula egestas imperdiet, nulla mi commodo tortor, sit amet fermentum urna leo non dolor. Donec elementum elementum urna at sollicitudin. Vestibulum placerat tortor in nibh lobortis ac consectetur felis interdum. Integer faucibus diam nec magna porttitor sit amet dictum elit consectetur. Suspendisse risus velit, pellentesque eget viverra in, porta eget metus. Sed porta elit erat.
+</p>
+<p>
+Nulla facilisi. Aliquam vulputate dolor quis nisi auctor luctus. Fusce vitae scelerisque velit. Sed sit amet tortor a nisi convallis pulvinar et eget sapien. Nulla condimentum auctor velit, a viverra nibh pellentesque eget. Aenean at lacus quam, lobortis posuere justo. Duis et diam in ligula rhoncus pellentesque. Morbi massa tellus, mattis nec condimentum ut, tempus eu lectus. In mi orci, luctus at pulvinar vel, scelerisque nec enim. Vestibulum vehicula odio in augue dignissim tincidunt. Integer ac velit ligula. Integer elit turpis, mattis eget ornare ut, eleifend in magna. Curabitur sagittis dui in felis ultricies gravida.
+
+</p>
+<p>
+Praesent adipiscing rhoncus rutrum. Aenean ultricies auctor risus at fringilla. Mauris quam lectus, ullamcorper sed ultricies at, interdum eget tellus. Vestibulum ac mi erat. Sed ac tellus erat, sed laoreet arcu. Fusce eget ipsum ac sem volutpat viverra. Suspendisse ac felis sit amet purus viverra luctus non eget ipsum. Praesent eleifend euismod tortor, vel malesuada felis consectetur ac. Nunc a mi sit amet nulla venenatis tincidunt. Morbi vitae nisl nulla, nec adipiscing sem. Nullam porttitor scelerisque urna, id dapibus diam malesuada vitae. Duis auctor eleifend lectus, a tempor odio aliquet quis. Nam eu est urna, nec ultricies lectus. Ut egestas aliquet nunc, et hendrerit erat vehicula non. Aliquam tempus faucibus arcu, at vulputate erat tempor eu. Quisque tempus, lectus adipiscing blandit scelerisque, magna felis eleifend odio, non volutpat felis enim sit amet leo. Mauris augue tortor, ultrices ac sagittis non, vulputate quis nisl.
+</p>
+<p>
+Fusce erat sem, dictum in bibendum ac, feugiat ut odio. Duis aliquam felis sit amet diam egestas consectetur. Phasellus consequat, mauris eget venenatis porta, velit sapien malesuada nibh, id dignissim ante tellus vitae lacus. Duis non nisl sit amet nunc euismod posuere. Donec eros erat, fringilla vel iaculis condimentum, vestibulum at neque. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Aliquam lorem sapien, bibendum eu mollis nec, gravida dapibus lectus. Aenean pretium volutpat nunc a placerat. Nullam eget tellus quis ipsum ultrices ullamcorper non eu mauris. Donec volutpat tincidunt elit, sit amet cursus justo elementum quis. Mauris volutpat, enim sit amet tempor commodo, purus lacus luctus dui, sed aliquet ligula nisi vel diam. Donec est elit, lobortis at eleifend id, feugiat egestas massa. Fusce elementum sollicitudin adipiscing. Vivamus et dapibus ipsum. Morbi interdum libero a nisl dignissim sed facilisis ipsum lacinia.
+</p>
+<p>
+Cras a augue dui, vitae tincidunt enim. In hac habitasse platea dictumst. Proin nec magna sed nulla mollis tempus id ut lectus. Morbi volutpat ultricies ipsum, quis imperdiet libero tempor nec. Donec bibendum ornare blandit. Aliquam rutrum risus non turpis commodo non commodo erat molestie. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fermentum, magna vel euismod convallis, mi magna vehicula velit, aliquet rhoncus ipsum massa et nunc. Nullam blandit purus non neque ullamcorper a aliquet nisl tristique. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed sit amet velit magna, sit amet rutrum dui. Donec elementum mi sed velit consectetur vulputate. Sed interdum adipiscing mattis.
+</p>
+
+</body>
+</html>
diff --git a/tests/visual/compound/accordion_tabs.html b/tests/visual/compound/accordion_tabs.html
index bb9f96ffc..3acf78366 100644
--- a/tests/visual/compound/accordion_tabs.html
+++ b/tests/visual/compound/accordion_tabs.html
@@ -5,7 +5,7 @@
<title>Compound Visual Test : Accordion in Tabs</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.accordion.js"></script>
diff --git a/tests/visual/compound/datepicker_dialog.html b/tests/visual/compound/datepicker_dialog.html
index 2c742e9df..78019c028 100644
--- a/tests/visual/compound/datepicker_dialog.html
+++ b/tests/visual/compound/datepicker_dialog.html
@@ -5,7 +5,7 @@
<title>Compound Visual Test : Datepicker in Dialog</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/compound/draggable_accordion.html b/tests/visual/compound/draggable_accordion.html
index f40c0eb12..d54343be9 100644
--- a/tests/visual/compound/draggable_accordion.html
+++ b/tests/visual/compound/draggable_accordion.html
@@ -5,7 +5,7 @@
<title>Compound Visual Test : Draggable in Accordion</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/compound/draggable_accordion_accordion_tabs_draggable.html b/tests/visual/compound/draggable_accordion_accordion_tabs_draggable.html
index 508977061..bbeb9f8c2 100644
--- a/tests/visual/compound/draggable_accordion_accordion_tabs_draggable.html
+++ b/tests/visual/compound/draggable_accordion_accordion_tabs_draggable.html
@@ -5,7 +5,7 @@
<title>Compound Visual Test : Draggable in Accordion</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/compound/sortable_accordion_sortable_tabs.html b/tests/visual/compound/sortable_accordion_sortable_tabs.html
index 28c389c09..bf20a6f39 100644
--- a/tests/visual/compound/sortable_accordion_sortable_tabs.html
+++ b/tests/visual/compound/sortable_accordion_sortable_tabs.html
@@ -5,7 +5,7 @@
<title>Compound Visual Test : Accordion in Tabs</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/compound/tabs_tabs.html b/tests/visual/compound/tabs_tabs.html
index a342dcebe..0f96a6615 100644
--- a/tests/visual/compound/tabs_tabs.html
+++ b/tests/visual/compound/tabs_tabs.html
@@ -5,7 +5,7 @@
<title>Compound Visual Test : Tabs in Tabs</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.accordion.js"></script>
diff --git a/tests/visual/compound/widgets_in_dialog.html b/tests/visual/compound/widgets_in_dialog.html
index 66c152a30..dc1b551cf 100644
--- a/tests/visual/compound/widgets_in_dialog.html
+++ b/tests/visual/compound/widgets_in_dialog.html
@@ -5,7 +5,7 @@
<title>Compound Visual Test : All Widgets in Dialog</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/datepicker/datepicker.html b/tests/visual/datepicker/datepicker.html
index 760bcd94d..d4af3c61f 100644
--- a/tests/visual/datepicker/datepicker.html
+++ b/tests/visual/datepicker/datepicker.html
@@ -5,7 +5,7 @@
<title>Datepicker Visual Test : Default</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.datepicker.js"></script>
diff --git a/tests/visual/datepicker/datepicker_multi_inline.html b/tests/visual/datepicker/datepicker_multi_inline.html
index 988ada690..30209bfd4 100644
--- a/tests/visual/datepicker/datepicker_multi_inline.html
+++ b/tests/visual/datepicker/datepicker_multi_inline.html
@@ -5,7 +5,7 @@
<title>Simple Datepicker</title>
<link rel="stylesheet" href="../all.css" type="text/css">
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.datepicker.js"></script>
diff --git a/tests/visual/datepicker/datepicker_ticket_4071.html b/tests/visual/datepicker/datepicker_ticket_4071.html
index 2447a0f98..3a97017e4 100644
--- a/tests/visual/datepicker/datepicker_ticket_4071.html
+++ b/tests/visual/datepicker/datepicker_ticket_4071.html
@@ -5,7 +5,7 @@
<title>Datepicker Visual Test : Datepicker ticket #4071</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.datepicker.js"></script>
diff --git a/tests/visual/datepicker/datepicker_ticket_4240.html b/tests/visual/datepicker/datepicker_ticket_4240.html
index 481ab12af..a547a3f2a 100644
--- a/tests/visual/datepicker/datepicker_ticket_4240.html
+++ b/tests/visual/datepicker/datepicker_ticket_4240.html
@@ -5,7 +5,7 @@
<title>Datepicker Visual Test : Datepicker ticket #4240</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.datepicker.js"></script>
diff --git a/tests/visual/datepicker/datepicker_ticket_4443.html b/tests/visual/datepicker/datepicker_ticket_4443.html
index 083a79941..018dd5783 100644
--- a/tests/visual/datepicker/datepicker_ticket_4443.html
+++ b/tests/visual/datepicker/datepicker_ticket_4443.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
<link rel="stylesheet" href="http://jquery.com/demo/thickbox/thickbox-code/thickbox.css" type="text/css" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script src="http://jquery.com/demo/thickbox/thickbox-code/thickbox-compressed.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
diff --git a/tests/visual/datepicker/datepicker_ticket_5676.html b/tests/visual/datepicker/datepicker_ticket_5676.html
new file mode 100644
index 000000000..6bda5d528
--- /dev/null
+++ b/tests/visual/datepicker/datepicker_ticket_5676.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <title>Datepicker Visual Test : Datepicker ticket #5676</title>
+ <link href="../visual.css" type="text/css" rel="stylesheet" />
+ <link href="../../../themes/base/jquery.ui.all.css" type="text/css" rel="stylesheet">
+ <script src="../../../jquery-1.4.4.js"></script>
+ <script src="../../../ui/jquery.ui.core.js"></script>
+ <script src="../../../ui/jquery.ui.widget.js"></script>
+ <script src="../../../ui/jquery.ui.datepicker.js"></script>
+ <script>
+ $(function() {
+
+ $('.datepicker').datepicker({
+ defaultDate: +7
+ }).focus();
+
+ });
+ </script>
+</head>
+<body>
+
+<h1 class="ui-widget-header"><a href="http://dev.jqueryui.com/ticket/5676">#5676 - DatePicker Dialog defaultDate incorrect behaviour</a></h1>
+
+<div class="datepicker"></div>
+<input class="datepicker" />
+
+</body>
+</html>
diff --git a/tests/visual/datepicker/multimonth.html b/tests/visual/datepicker/multimonth.html
index d0b175a61..17290e6b0 100644
--- a/tests/visual/datepicker/multimonth.html
+++ b/tests/visual/datepicker/multimonth.html
@@ -5,7 +5,7 @@
<title>Datepicker Visual Test : Default</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.datepicker.js"></script>
diff --git a/tests/visual/datepicker/viewport.html b/tests/visual/datepicker/viewport.html
index 665b9eaf3..fe64bb803 100644
--- a/tests/visual/datepicker/viewport.html
+++ b/tests/visual/datepicker/viewport.html
@@ -15,7 +15,7 @@
}
</style>
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.datepicker.js"></script>
diff --git a/tests/visual/dialog/dialog.html b/tests/visual/dialog/dialog.html
index 31ffda0b0..b59360eb9 100644
--- a/tests/visual/dialog/dialog.html
+++ b/tests/visual/dialog/dialog.html
@@ -5,8 +5,8 @@
<title>Dialog Visual Test : Default</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.1.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
+ <script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.2.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/dialog/dialog_on_page_with_large_dom.html b/tests/visual/dialog/dialog_on_page_with_large_dom.html
index 92f03eb5b..74d5aa537 100644
--- a/tests/visual/dialog/dialog_on_page_with_large_dom.html
+++ b/tests/visual/dialog/dialog_on_page_with_large_dom.html
@@ -5,8 +5,8 @@
<title>Dialog Visual Test : Modal Dialog in Large DOM</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.1.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
+ <script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.2.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.draggable.js"></script>
diff --git a/tests/visual/dialog/dialog_on_page_with_scrollbars.html b/tests/visual/dialog/dialog_on_page_with_scrollbars.html
index a43ee6e42..9d7f68720 100644
--- a/tests/visual/dialog/dialog_on_page_with_scrollbars.html
+++ b/tests/visual/dialog/dialog_on_page_with_scrollbars.html
@@ -5,8 +5,8 @@
<title>Dialog Visual Test : Dialog on page with scrollbars</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.1.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
+ <script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.2.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.draggable.js"></script>
diff --git a/tests/visual/dialog/dialog_option_buttons_OK_Cancel.html b/tests/visual/dialog/dialog_option_buttons_OK_Cancel.html
index d51186039..3a9bb56f4 100644
--- a/tests/visual/dialog/dialog_option_buttons_OK_Cancel.html
+++ b/tests/visual/dialog/dialog_option_buttons_OK_Cancel.html
@@ -5,8 +5,8 @@
<title>Dialog Visual Test : Dialog option buttons OK Cancel</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.1.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
+ <script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.2.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.draggable.js"></script>
diff --git a/tests/visual/dialog/dialog_option_closeOnEscape_false.html b/tests/visual/dialog/dialog_option_closeOnEscape_false.html
index 681cc3c65..43a1f3513 100644
--- a/tests/visual/dialog/dialog_option_closeOnEscape_false.html
+++ b/tests/visual/dialog/dialog_option_closeOnEscape_false.html
@@ -5,8 +5,8 @@
<title>Dialog Visual Test : Dialog option closeOnEscape true</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.1.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
+ <script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.2.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.draggable.js"></script>
diff --git a/tests/visual/dialog/dialog_option_closeOnEscape_true.html b/tests/visual/dialog/dialog_option_closeOnEscape_true.html
index c05cb5251..4c83ef735 100644
--- a/tests/visual/dialog/dialog_option_closeOnEscape_true.html
+++ b/tests/visual/dialog/dialog_option_closeOnEscape_true.html
@@ -5,8 +5,8 @@
<title>Dialog Visual Test : Dialog option closeOnEscape true</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.1.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
+ <script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.2.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.draggable.js"></script>
diff --git a/tests/visual/dialog/dialog_option_modal_false.html b/tests/visual/dialog/dialog_option_modal_false.html
index 43829ae38..7bd6a3b6b 100644
--- a/tests/visual/dialog/dialog_option_modal_false.html
+++ b/tests/visual/dialog/dialog_option_modal_false.html
@@ -5,8 +5,8 @@
<title>Dialog Visual Test : Dialog option modal false</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.1.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
+ <script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.2.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.draggable.js"></script>
diff --git a/tests/visual/dialog/dialog_option_modal_true.html b/tests/visual/dialog/dialog_option_modal_true.html
index dcebd5a65..7d58a75c9 100644
--- a/tests/visual/dialog/dialog_option_modal_true.html
+++ b/tests/visual/dialog/dialog_option_modal_true.html
@@ -5,8 +5,8 @@
<title>Dialog Visual Test : Dialog option modal true</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.1.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
+ <script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.2.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.draggable.js"></script>
diff --git a/tests/visual/dialog/dialog_option_position_right_top.html b/tests/visual/dialog/dialog_option_position_right_top.html
index d30e19011..3dad98f82 100644
--- a/tests/visual/dialog/dialog_option_position_right_top.html
+++ b/tests/visual/dialog/dialog_option_position_right_top.html
@@ -5,8 +5,8 @@
<title>Dialog Visual Test : Dialog option position right top</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.1.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
+ <script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.2.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.draggable.js"></script>
diff --git a/tests/visual/dialog/dialog_ticket_4350.html b/tests/visual/dialog/dialog_ticket_4350.html
index 67279754e..e4cf8d102 100644
--- a/tests/visual/dialog/dialog_ticket_4350.html
+++ b/tests/visual/dialog/dialog_ticket_4350.html
@@ -5,8 +5,8 @@
<title>Dialog Visual Test : Dialog ticket #4350</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.1.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
+ <script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.2.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/dialog/dialog_ticket_4826.html b/tests/visual/dialog/dialog_ticket_4826.html
index 29b2337ce..e184c443c 100644
--- a/tests/visual/dialog/dialog_ticket_4826.html
+++ b/tests/visual/dialog/dialog_ticket_4826.html
@@ -5,8 +5,8 @@
<title>Dialog Visual Test : Dialog ticket #4826</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.1.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
+ <script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.2.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.draggable.js"></script>
diff --git a/tests/visual/draggable/draggable.html b/tests/visual/draggable/draggable.html
index 394d5475b..d5ad10783 100644
--- a/tests/visual/draggable/draggable.html
+++ b/tests/visual/draggable/draggable.html
@@ -5,7 +5,7 @@
<title>Draggable Visual Test : Default</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/draggable/draggable.scroll.html b/tests/visual/draggable/draggable.scroll.html
index e0311c4c1..2ac5a6909 100644
--- a/tests/visual/draggable/draggable.scroll.html
+++ b/tests/visual/draggable/draggable.scroll.html
@@ -5,7 +5,7 @@
<title>Draggable Scroll Tests</title>
<link rel="stylesheet" href="../all.css" type="text/css">
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/draggable/draggable_option_containment_array.html b/tests/visual/draggable/draggable_option_containment_array.html
index 03e5288b5..0a6b7871f 100644
--- a/tests/visual/draggable/draggable_option_containment_array.html
+++ b/tests/visual/draggable/draggable_option_containment_array.html
@@ -5,7 +5,7 @@
<title>Draggable Visual Test : Draggable option containment array</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/draggable/draggable_option_cursorAt_object.html b/tests/visual/draggable/draggable_option_cursorAt_object.html
index d51d29d1e..afe532e42 100644
--- a/tests/visual/draggable/draggable_option_cursorAt_object.html
+++ b/tests/visual/draggable/draggable_option_cursorAt_object.html
@@ -5,7 +5,7 @@
<title>Draggable Visual Test : Draggable option cursorAt object</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/draggable/draggable_option_handle_selector.html b/tests/visual/draggable/draggable_option_handle_selector.html
index 84d6609c8..ee4657e66 100644
--- a/tests/visual/draggable/draggable_option_handle_selector.html
+++ b/tests/visual/draggable/draggable_option_handle_selector.html
@@ -5,7 +5,7 @@
<title>Draggable Visual Test : Draggable option handle selector</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/draggable/draggable_option_iframeFix_false.html b/tests/visual/draggable/draggable_option_iframeFix_false.html
index 1fbad8924..36daa46fd 100644
--- a/tests/visual/draggable/draggable_option_iframeFix_false.html
+++ b/tests/visual/draggable/draggable_option_iframeFix_false.html
@@ -5,7 +5,7 @@
<title>Draggable Visual Test : Draggable option iframeFix false</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/draggable/draggable_option_iframeFix_selector.html b/tests/visual/draggable/draggable_option_iframeFix_selector.html
index 5670148c0..2d0278902 100644
--- a/tests/visual/draggable/draggable_option_iframeFix_selector.html
+++ b/tests/visual/draggable/draggable_option_iframeFix_selector.html
@@ -5,7 +5,7 @@
<title>Draggable Visual Test : Draggable option iframeFix selector</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/draggable/draggable_option_iframeFix_true.html b/tests/visual/draggable/draggable_option_iframeFix_true.html
index 917b71827..f7ae43308 100644
--- a/tests/visual/draggable/draggable_option_iframeFix_true.html
+++ b/tests/visual/draggable/draggable_option_iframeFix_true.html
@@ -5,7 +5,7 @@
<title>Draggable Visual Test : Draggable option iframeFix true</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/droppable/droppable.html b/tests/visual/droppable/droppable.html
index 0d306f709..31eac495e 100644
--- a/tests/visual/droppable/droppable.html
+++ b/tests/visual/droppable/droppable.html
@@ -5,7 +5,7 @@
<title>Droppable Visual Test : Default</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/droppable/droppable_option_accept_default.html b/tests/visual/droppable/droppable_option_accept_default.html
index ce3ff9a04..54681d81e 100644
--- a/tests/visual/droppable/droppable_option_accept_default.html
+++ b/tests/visual/droppable/droppable_option_accept_default.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="droppable.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/droppable/droppable_option_accept_function.html b/tests/visual/droppable/droppable_option_accept_function.html
index ee6f4395c..e3db4a4fa 100644
--- a/tests/visual/droppable/droppable_option_accept_function.html
+++ b/tests/visual/droppable/droppable_option_accept_function.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="droppable.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/droppable/droppable_option_accept_selector.html b/tests/visual/droppable/droppable_option_accept_selector.html
index 7a71cf88b..9012d0e98 100644
--- a/tests/visual/droppable/droppable_option_accept_selector.html
+++ b/tests/visual/droppable/droppable_option_accept_selector.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="droppable.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/droppable/droppable_ticket_4087.html b/tests/visual/droppable/droppable_ticket_4087.html
index f18922a77..6dca11cd8 100644
--- a/tests/visual/droppable/droppable_ticket_4087.html
+++ b/tests/visual/droppable/droppable_ticket_4087.html
@@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<title>Droppable Visual Test - Droppable ticket 4087</title>
<link type="text/css" href="../../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/droppable/droppable_ticket_4088.html b/tests/visual/droppable/droppable_ticket_4088.html
index 9eb1128e5..cbc01ea4c 100644
--- a/tests/visual/droppable/droppable_ticket_4088.html
+++ b/tests/visual/droppable/droppable_ticket_4088.html
@@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<title>Droppable Visual Test - Droppable ticket 4088</title>
<link type="text/css" href="../../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/effects.all.html b/tests/visual/effects.all.html
index c132381cb..6fd07fb39 100644
--- a/tests/visual/effects.all.html
+++ b/tests/visual/effects.all.html
@@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<title>jQuery UI Effects Test Suite</title>
<link rel="stylesheet" href="effects.all.css" type="text/css" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../ui/jquery.effects.core.js"></script>
<script type="text/javascript" src="../../ui/jquery.effects.blind.js"></script>
<script type="text/javascript" src="../../ui/jquery.effects.bounce.js"></script>
diff --git a/tests/visual/index.html b/tests/visual/index.html
index 9deb665cd..04e23fddd 100644
--- a/tests/visual/index.html
+++ b/tests/visual/index.html
@@ -13,6 +13,7 @@
<h2>Composites</h2>
<ul>
<li><a href="all.html">All Widgets</a></li>
+ <li><a href="theme.html">All Widgets with Themes</a></li>
<li><a href="effects.all.html">Effects</a></li>
<li><a href="compound/accordion_tabs.html">Tabs contain Accordion</a></li>
<li><a href="compound/datepicker_dialog.html">Datepicker within a Dialog</a></li>
@@ -50,6 +51,7 @@
</li>
<li><a href="progressbar/progressbar.html">Progressbar</a></li>
<li><a href="slider/slider.html">Slider</a></li>
+ <li><a href="spinner/spinner.html">Spinner</a></li>
<li><a href="tabs/tabs.html">Tabs</a></li>
</ul>
diff --git a/tests/visual/menu/contextmenu.html b/tests/visual/menu/contextmenu.html
index d73be5ee4..d3fdc4e7c 100644
--- a/tests/visual/menu/contextmenu.html
+++ b/tests/visual/menu/contextmenu.html
@@ -4,7 +4,7 @@
<title>Menu Visual Test: Default</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.position.js"></script>
diff --git a/tests/visual/menu/drilldown.html b/tests/visual/menu/drilldown.html
index 7b24cd5e4..65cdf1111 100644
--- a/tests/visual/menu/drilldown.html
+++ b/tests/visual/menu/drilldown.html
@@ -4,7 +4,7 @@
<title>Menu Visual Test: Default</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.position.js"></script>
@@ -259,7 +259,7 @@
<a href="#">Go back</a>
</div>
-<div class="ui-widget" style="margin-top:2em; font-family:Arial">
+<div class="ui-widget" style="clear: left; margin-top:2em; font-family:Arial">
Log:
<div id="log" style="height: 400px; width: 300px; overflow: auto;" class="ui-widget-content"></div>
</div>
diff --git a/tests/visual/menu/menu.html b/tests/visual/menu/menu.html
index 1247fd7ea..ec31a0f96 100644
--- a/tests/visual/menu/menu.html
+++ b/tests/visual/menu/menu.html
@@ -4,7 +4,7 @@
<title>Menu Visual Test: Default</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.menu.js"></script>
@@ -94,7 +94,7 @@
<li><a href="#">Amesville</a></li>
</ul>
-<div class="ui-widget" style="margin-top:2em; font-family:Arial">
+<div class="ui-widget" style="clear: left; margin-top:2em; font-family:Arial">
Log:
<div id="log" style="height: 400px; width: 300px; overflow: auto;" class="ui-widget-content"></div>
</div>
diff --git a/tests/visual/menu/nested.html b/tests/visual/menu/nested.html
index 396b64a64..2508c55c4 100644
--- a/tests/visual/menu/nested.html
+++ b/tests/visual/menu/nested.html
@@ -4,7 +4,7 @@
<title>Menu Visual Test: Default</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.position.js"></script>
diff --git a/tests/visual/position/position.html b/tests/visual/position/position.html
index 0048350c3..11fb48d6e 100644
--- a/tests/visual/position/position.html
+++ b/tests/visual/position/position.html
@@ -5,7 +5,7 @@
<title>Position Visual Test: Default</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.position.js"></script>
@@ -13,27 +13,29 @@
<script type="text/javascript" src="http://jqueryui.com/themeroller/themeswitchertool/"></script>
<script type="text/javascript">
$(function() {
- var ul = $("ul");
- $("input").each(function() {
- $(this).position({
- my: this.id.replace(/-/, " "),
- at: this.id.replace(/-/, " "),
- of: "#container",
- collision: "none"
+ var inputs = $("input");
+ $("ul").insertAfter(inputs);
+ $(window).resize(function() {
+ inputs.each(function() {
+ $(this).position({
+ my: this.id.replace(/-/, " "),
+ at: this.id.replace(/-/, " "),
+ of: "#container",
+ collision: "none"
+ });
+ $(this).next().menu().position({
+ my: "left top",
+ at: "left bottom",
+ of: this
+ });
});
- ul.clone().insertAfter(this).menu().position({
- my: "left top",
- at: "left bottom",
- of: this
- });
- });
- ul.remove();
+ }).resize();
});
</script>
<style>
input, .ui-menu { position: absolute; }
.ui-menu { width: 200px; }
- html, body { width: 100%; height: 100% }
+ html, body { width: 99%; height: 99% }
#container { width: 95%; height: 95%; border: 1px solid black; margin: auto; }
</style>
</head>
diff --git a/tests/visual/position/position_margin.html b/tests/visual/position/position_margin.html
new file mode 100644
index 000000000..7a2625846
--- /dev/null
+++ b/tests/visual/position/position_margin.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <title>Position Visual Test: Default</title>
+ <link rel="stylesheet" href="../visual.css" type="text/css" />
+ <link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" title="ui-theme" />
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
+ <script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
+ <script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
+ <script type="text/javascript" src="../../../ui/jquery.ui.position.js"></script>
+ <script type="text/javascript" src="http://jqueryui.com/themeroller/themeswitchertool/"></script>
+ <script type="text/javascript">
+ $(function() {
+ $( "#elem" ).position({
+ my: "right bottom",
+ at: "right bottom",
+ of: window,
+ collision: "fit"
+ });
+ });
+ </script>
+ <style>
+ #elem {
+ position: absolute;
+ top: 100px;
+ left: 100px;
+ width: 200px;
+ height: 200px;
+ box-shadow: 10px 10px 5px #888;
+ -moz-box-shadow: 10px 10px 5px #888;
+ -webkit-box-shadow: 10px 10px 5px #888;
+ background-color: #aaa;
+ margin: 15px;
+ }
+ </style>
+</head>
+<body>
+
+<div id="elem"></div>
+
+</body>
+</html>
diff --git a/tests/visual/progressbar/progressbar.html b/tests/visual/progressbar/progressbar.html
index 44cd47e02..b98a01844 100644
--- a/tests/visual/progressbar/progressbar.html
+++ b/tests/visual/progressbar/progressbar.html
@@ -5,7 +5,7 @@
<title>Progressbar Visual Test: Default</title>
<link rel="stylesheet" href="../all.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.progressbar.js"></script>
diff --git a/tests/visual/resizable/images/test.png b/tests/visual/resizable/images/test.png
index 1ac7d6c1f..61242c62b 100644
--- a/tests/visual/resizable/images/test.png
+++ b/tests/visual/resizable/images/test.png
Binary files differ
diff --git a/tests/visual/resizable/resizable.html b/tests/visual/resizable/resizable.html
index 65636ba6d..c903abbc1 100644
--- a/tests/visual/resizable/resizable.html
+++ b/tests/visual/resizable/resizable.html
@@ -5,7 +5,7 @@
<title>Resizable Visual Test : Default</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/resizable/resizable_option_alsoResize_child.html b/tests/visual/resizable/resizable_option_alsoResize_child.html
index ffd48be39..9defdd6fe 100644
--- a/tests/visual/resizable/resizable_option_alsoResize_child.html
+++ b/tests/visual/resizable/resizable_option_alsoResize_child.html
@@ -5,7 +5,7 @@
<title>Resizable Visual Test : Resizable option alsoResize child</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/resizable/resizable_option_aspectRatio_0.5.html b/tests/visual/resizable/resizable_option_aspectRatio_0.5.html
index 928cb8fd8..bfe36f99d 100644
--- a/tests/visual/resizable/resizable_option_aspectRatio_0.5.html
+++ b/tests/visual/resizable/resizable_option_aspectRatio_0.5.html
@@ -5,7 +5,7 @@
<title>Resizable Visual Test : Resizable option aspectRatio 0.5</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/resizable/resizable_option_aspectRatio_1.0.html b/tests/visual/resizable/resizable_option_aspectRatio_1.0.html
index be37d9765..9d7ee1b37 100644
--- a/tests/visual/resizable/resizable_option_aspectRatio_1.0.html
+++ b/tests/visual/resizable/resizable_option_aspectRatio_1.0.html
@@ -5,7 +5,7 @@
<title>Resizable Visual Test : Resizable option aspectRatio 1.0</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/resizable/resizable_option_aspectRatio_1.5.html b/tests/visual/resizable/resizable_option_aspectRatio_1.5.html
index 41eccaa1b..328f2a72f 100644
--- a/tests/visual/resizable/resizable_option_aspectRatio_1.5.html
+++ b/tests/visual/resizable/resizable_option_aspectRatio_1.5.html
@@ -5,7 +5,7 @@
<title>Resizable Visual Test : Resizable option aspectRatio 1.5</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/resizable/resizable_option_aspectRatio_preserve_maxHeight_150.html b/tests/visual/resizable/resizable_option_aspectRatio_preserve_maxHeight_150.html
index 20b058c4a..f6f67f44f 100644
--- a/tests/visual/resizable/resizable_option_aspectRatio_preserve_maxHeight_150.html
+++ b/tests/visual/resizable/resizable_option_aspectRatio_preserve_maxHeight_150.html
@@ -5,7 +5,7 @@
<title>Resizable Visual Test : Resizable option aspectRatio 1.0 maxHeight 150</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/resizable/resizable_option_aspectRatio_preserve_maxWidth_150.html b/tests/visual/resizable/resizable_option_aspectRatio_preserve_maxWidth_150.html
index 7e10e1dfe..6ce622ef9 100644
--- a/tests/visual/resizable/resizable_option_aspectRatio_preserve_maxWidth_150.html
+++ b/tests/visual/resizable/resizable_option_aspectRatio_preserve_maxWidth_150.html
@@ -5,7 +5,7 @@
<title>Resizable Visual Test : Resizable option aspectRatio 1.0 maxWidth 150</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/resizable/resizable_option_aspectRatio_preserve_minHeight_50.html b/tests/visual/resizable/resizable_option_aspectRatio_preserve_minHeight_50.html
index 64ea440a7..969e6db96 100644
--- a/tests/visual/resizable/resizable_option_aspectRatio_preserve_minHeight_50.html
+++ b/tests/visual/resizable/resizable_option_aspectRatio_preserve_minHeight_50.html
@@ -5,7 +5,7 @@
<title>Resizable Visual Test : Resizable option aspectRatio 1.0 minHeight 50</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/resizable/resizable_option_aspectRatio_preserve_minWidth_50.html b/tests/visual/resizable/resizable_option_aspectRatio_preserve_minWidth_50.html
index 9aefb17e8..2095ff70f 100644
--- a/tests/visual/resizable/resizable_option_aspectRatio_preserve_minWidth_50.html
+++ b/tests/visual/resizable/resizable_option_aspectRatio_preserve_minWidth_50.html
@@ -5,7 +5,7 @@
<title>Resizable Visual Test : Resizable option aspectRatio 1.0 maxWidth 50</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/resizable/resizable_option_aspectRatio_preserve_w100xh100.html b/tests/visual/resizable/resizable_option_aspectRatio_preserve_w100xh100.html
index 7b635094d..89ad5a11a 100644
--- a/tests/visual/resizable/resizable_option_aspectRatio_preserve_w100xh100.html
+++ b/tests/visual/resizable/resizable_option_aspectRatio_preserve_w100xh100.html
@@ -5,7 +5,7 @@
<title>Resizable Visual Test : Default</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/resizable/resizable_option_aspectRatio_preserve_w100xh50.html b/tests/visual/resizable/resizable_option_aspectRatio_preserve_w100xh50.html
index bd897fa30..b536a59a7 100644
--- a/tests/visual/resizable/resizable_option_aspectRatio_preserve_w100xh50.html
+++ b/tests/visual/resizable/resizable_option_aspectRatio_preserve_w100xh50.html
@@ -5,7 +5,7 @@
<title>Resizable Visual Test : Default</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/resizable/resizable_option_aspectRatio_preserve_w50xh100.html b/tests/visual/resizable/resizable_option_aspectRatio_preserve_w50xh100.html
index 91b460e7d..0958983cd 100644
--- a/tests/visual/resizable/resizable_option_aspectRatio_preserve_w50xh100.html
+++ b/tests/visual/resizable/resizable_option_aspectRatio_preserve_w50xh100.html
@@ -5,7 +5,7 @@
<title>Resizable Visual Test : Default</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/resizable/resizable_ticket_3053.html b/tests/visual/resizable/resizable_ticket_3053.html
index c5cb6a6bf..10a449567 100644
--- a/tests/visual/resizable/resizable_ticket_3053.html
+++ b/tests/visual/resizable/resizable_ticket_3053.html
@@ -5,7 +5,7 @@
<title>Resizable Visual Test : Resizable ticket #3053</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/resizable/resizable_ticket_4199.html b/tests/visual/resizable/resizable_ticket_4199.html
index b5809fc90..18b995892 100644
--- a/tests/visual/resizable/resizable_ticket_4199.html
+++ b/tests/visual/resizable/resizable_ticket_4199.html
@@ -5,7 +5,7 @@
<title>Resizable Visual Test : Resizable ticket #4199</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/resizable/resizable_ticket_4217.html b/tests/visual/resizable/resizable_ticket_4217.html
index c34682b68..c759fc02d 100644
--- a/tests/visual/resizable/resizable_ticket_4217.html
+++ b/tests/visual/resizable/resizable_ticket_4217.html
@@ -5,7 +5,7 @@
<title>Resizable Visual Test : Resizable ticket #4217</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/resizable/resizable_ticket_4940.html b/tests/visual/resizable/resizable_ticket_4940.html
index c25e9a4d3..01e9976b7 100644
--- a/tests/visual/resizable/resizable_ticket_4940.html
+++ b/tests/visual/resizable/resizable_ticket_4940.html
@@ -5,7 +5,7 @@
<title>Resizable Visual Test : Resizable ticket #4940</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/resizable/resizable_ticket_5335.html b/tests/visual/resizable/resizable_ticket_5335.html
new file mode 100644
index 000000000..50f6b0497
--- /dev/null
+++ b/tests/visual/resizable/resizable_ticket_5335.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8" />
+ <title>Resizable Visual Test : Resizable ticket #5335</title>
+ <link rel="stylesheet" href="../visual.css" type="text/css" />
+ <link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" />
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
+ <script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
+ <script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
+ <script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
+ <script type="text/javascript" src="../../../ui/jquery.ui.draggable.js"></script>
+ <script type="text/javascript" src="../../../ui/jquery.ui.droppable.js"></script>
+ <script type="text/javascript" src="../../../ui/jquery.ui.resizable.js"></script>
+ <script type="text/javascript">
+ $(function() {
+ $('.item.to-be-draggable').draggable({ revert: true });
+ $('.item').resizable({ maxWidth: 500, minHeight: 150, minWidth: 170, maxHeight: 400,handles: 'n,s' });
+ }
+ );
+ </script>
+ <style type="text/css">
+ #main {
+ width: 900px;
+ height: 500px;
+ overflow: scroll;
+ }
+ .item {
+ width: 170px;
+ height: 150px;
+ margin: 10px;
+ border: 1px solid #aaa;
+ }
+ #sub {
+ height: 2000px;
+ }
+ .i1 { background-color: #acacac; }
+ .i2 { background-color: #bcacac; }
+
+ </style>
+ </head>
+ <body>
+ <h1 class="ui-widget-header"><a href="http://dev.jqueryui.com/ticket/5335">#5335 - Resizable: position set to absolute at end of resize</a></h1>
+ <div id="main">
+ <div id="sub">
+ <div class="item i1 to-be-draggable">Draggable</div>
+ <div class="item i2">Not draggable</div>
+ </div>
+
+ </div>
+ </body>
+</html>
diff --git a/tests/visual/selectable/selectable.html b/tests/visual/selectable/selectable.html
index ef4f9c11f..80abda9b4 100644
--- a/tests/visual/selectable/selectable.html
+++ b/tests/visual/selectable/selectable.html
@@ -5,7 +5,7 @@
<title>Selectable Visual Test : Default</title>
<link rel="stylesheet" href="../all.css" type="text/css">
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/selectable/selectable_ticket_4341.html b/tests/visual/selectable/selectable_ticket_4341.html
index ca929f97c..5ec1f2f3f 100644
--- a/tests/visual/selectable/selectable_ticket_4341.html
+++ b/tests/visual/selectable/selectable_ticket_4341.html
@@ -5,7 +5,7 @@
<title>Selectable Visual Test : Selectable ticket #4341</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider.html b/tests/visual/slider/slider.html
index 6b79b1eac..3600727b7 100644
--- a/tests/visual/slider/slider.html
+++ b/tests/visual/slider/slider.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Default</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_horizontal.html b/tests/visual/slider/slider_horizontal.html
index 75a43b61b..57028ea48 100644
--- a/tests/visual/slider/slider_horizontal.html
+++ b/tests/visual/slider/slider_horizontal.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider horizontal</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_horizontal_range.html b/tests/visual/slider/slider_horizontal_range.html
index ee8ea16bb..09a2c7d20 100644
--- a/tests/visual/slider/slider_horizontal_range.html
+++ b/tests/visual/slider/slider_horizontal_range.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider horizontal range</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_horizontal_range_max.html b/tests/visual/slider/slider_horizontal_range_max.html
index aa3857f44..b36cf4f59 100644
--- a/tests/visual/slider/slider_horizontal_range_max.html
+++ b/tests/visual/slider/slider_horizontal_range_max.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider horizontal range max</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_horizontal_range_min.html b/tests/visual/slider/slider_horizontal_range_min.html
index bbeef8e2c..c257edf6f 100644
--- a/tests/visual/slider/slider_horizontal_range_min.html
+++ b/tests/visual/slider/slider_horizontal_range_min.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider horizontal range min</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_in_container_with_scrollbars.html b/tests/visual/slider/slider_in_container_with_scrollbars.html
index 7517a68b7..22a563f31 100644
--- a/tests/visual/slider/slider_in_container_with_scrollbars.html
+++ b/tests/visual/slider/slider_in_container_with_scrollbars.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider in container with scrollbars</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_method_destroy.html b/tests/visual/slider/slider_method_destroy.html
index 8697d26a6..9cb1926cc 100644
--- a/tests/visual/slider/slider_method_destroy.html
+++ b/tests/visual/slider/slider_method_destroy.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider method destroy</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_method_disable.html b/tests/visual/slider/slider_method_disable.html
index 901ed1756..6fdd16365 100644
--- a/tests/visual/slider/slider_method_disable.html
+++ b/tests/visual/slider/slider_method_disable.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider method disable</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_option_animate_false.html b/tests/visual/slider/slider_option_animate_false.html
index 2faf6863e..297ab83cd 100644
--- a/tests/visual/slider/slider_option_animate_false.html
+++ b/tests/visual/slider/slider_option_animate_false.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider option animate false</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_option_animate_true.html b/tests/visual/slider/slider_option_animate_true.html
index 3af28ac02..4f5b484e7 100644
--- a/tests/visual/slider/slider_option_animate_true.html
+++ b/tests/visual/slider/slider_option_animate_true.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider option animate true</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_option_max_3.html b/tests/visual/slider/slider_option_max_3.html
index d895627af..4e79e0ec6 100644
--- a/tests/visual/slider/slider_option_max_3.html
+++ b/tests/visual/slider/slider_option_max_3.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider option max 3</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_option_max_30.html b/tests/visual/slider/slider_option_max_30.html
index 04e717051..e2fd7a6f2 100644
--- a/tests/visual/slider/slider_option_max_30.html
+++ b/tests/visual/slider/slider_option_max_30.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider option max 30</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_option_max_300.html b/tests/visual/slider/slider_option_max_300.html
index b61f05bf3..1a48f306a 100644
--- a/tests/visual/slider/slider_option_max_300.html
+++ b/tests/visual/slider/slider_option_max_300.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider option max 300</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_option_min_-3.html b/tests/visual/slider/slider_option_min_-3.html
index 40255e51b..f7620d81b 100644
--- a/tests/visual/slider/slider_option_min_-3.html
+++ b/tests/visual/slider/slider_option_min_-3.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider option min -3</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_option_min_-30.html b/tests/visual/slider/slider_option_min_-30.html
index 6231ba641..f17f17dfb 100644
--- a/tests/visual/slider/slider_option_min_-30.html
+++ b/tests/visual/slider/slider_option_min_-30.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider option min -30</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_option_min_-300.html b/tests/visual/slider/slider_option_min_-300.html
index ad676b5ce..cf15d0da6 100644
--- a/tests/visual/slider/slider_option_min_-300.html
+++ b/tests/visual/slider/slider_option_min_-300.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider option min -300</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_option_orientation_horizontal.html b/tests/visual/slider/slider_option_orientation_horizontal.html
index 814ab086a..9edbe066a 100644
--- a/tests/visual/slider/slider_option_orientation_horizontal.html
+++ b/tests/visual/slider/slider_option_orientation_horizontal.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider option orientation 'horizontal'</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_option_orientation_vertical.html b/tests/visual/slider/slider_option_orientation_vertical.html
index 3c1a9471d..e5d2588ef 100644
--- a/tests/visual/slider/slider_option_orientation_vertical.html
+++ b/tests/visual/slider/slider_option_orientation_vertical.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider option orientation 'vertical'</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_option_range_false.html b/tests/visual/slider/slider_option_range_false.html
index 16bf3d2bc..b053347f6 100644
--- a/tests/visual/slider/slider_option_range_false.html
+++ b/tests/visual/slider/slider_option_range_false.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider option range false</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_option_range_max.html b/tests/visual/slider/slider_option_range_max.html
index 4eaf438a6..f768f7ccd 100644
--- a/tests/visual/slider/slider_option_range_max.html
+++ b/tests/visual/slider/slider_option_range_max.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider option range 'max'</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_option_range_min.html b/tests/visual/slider/slider_option_range_min.html
index 6d0c7218c..54861db12 100644
--- a/tests/visual/slider/slider_option_range_min.html
+++ b/tests/visual/slider/slider_option_range_min.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider option range 'min'</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_option_range_true.html b/tests/visual/slider/slider_option_range_true.html
index 06ade9f78..457442220 100644
--- a/tests/visual/slider/slider_option_range_true.html
+++ b/tests/visual/slider/slider_option_range_true.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider option range true</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_option_step_25.html b/tests/visual/slider/slider_option_step_25.html
index 5dedec5e2..2d16a7975 100644
--- a/tests/visual/slider/slider_option_step_25.html
+++ b/tests/visual/slider/slider_option_step_25.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider option step 25</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_option_step_5.html b/tests/visual/slider/slider_option_step_5.html
index 8b1ee3690..e0ef74d4f 100644
--- a/tests/visual/slider/slider_option_step_5.html
+++ b/tests/visual/slider/slider_option_step_5.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider option step 5</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_option_value_3.html b/tests/visual/slider/slider_option_value_3.html
index db5261147..d4e5bc1f2 100644
--- a/tests/visual/slider/slider_option_value_3.html
+++ b/tests/visual/slider/slider_option_value_3.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider option value 3</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_option_value_30.html b/tests/visual/slider/slider_option_value_30.html
index bb9682835..3be2802bf 100644
--- a/tests/visual/slider/slider_option_value_30.html
+++ b/tests/visual/slider/slider_option_value_30.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider option value 30</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_option_values_25_50_75.html b/tests/visual/slider/slider_option_values_25_50_75.html
index e359d195e..b317555ac 100644
--- a/tests/visual/slider/slider_option_values_25_50_75.html
+++ b/tests/visual/slider/slider_option_values_25_50_75.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider option values 25 50 75</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_option_values_25_75.html b/tests/visual/slider/slider_option_values_25_75.html
index 37facd54a..a6c048392 100644
--- a/tests/visual/slider/slider_option_values_25_75.html
+++ b/tests/visual/slider/slider_option_values_25_75.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider option values 25 75</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_option_values_50.html b/tests/visual/slider/slider_option_values_50.html
index b2eb8adfc..7fd7de958 100644
--- a/tests/visual/slider/slider_option_values_50.html
+++ b/tests/visual/slider/slider_option_values_50.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider option values 50</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_ticket_3736.html b/tests/visual/slider/slider_ticket_3736.html
index 27b3a3755..cf102f9ef 100644
--- a/tests/visual/slider/slider_ticket_3736.html
+++ b/tests/visual/slider/slider_ticket_3736.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider ticket #3736</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_ticket_3762.html b/tests/visual/slider/slider_ticket_3762.html
index f04916fc4..55ae963b7 100644
--- a/tests/visual/slider/slider_ticket_3762.html
+++ b/tests/visual/slider/slider_ticket_3762.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider ticket #3762</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_ticket_4385.html b/tests/visual/slider/slider_ticket_4385.html
index 17b627b90..d179aa7e9 100644
--- a/tests/visual/slider/slider_ticket_4385.html
+++ b/tests/visual/slider/slider_ticket_4385.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider ticket #4385</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_ticket_4467.html b/tests/visual/slider/slider_ticket_4467.html
index b7c45235f..5439148f0 100644
--- a/tests/visual/slider/slider_ticket_4467.html
+++ b/tests/visual/slider/slider_ticket_4467.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider ticket #4467</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_vertical.html b/tests/visual/slider/slider_vertical.html
index 924dec795..a3a0f4776 100644
--- a/tests/visual/slider/slider_vertical.html
+++ b/tests/visual/slider/slider_vertical.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider vertical</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_vertical_range.html b/tests/visual/slider/slider_vertical_range.html
index 384224ace..597cf50e0 100644
--- a/tests/visual/slider/slider_vertical_range.html
+++ b/tests/visual/slider/slider_vertical_range.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider vertical range</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_vertical_range_max.html b/tests/visual/slider/slider_vertical_range_max.html
index 2f22f339b..c7ed8463d 100644
--- a/tests/visual/slider/slider_vertical_range_max.html
+++ b/tests/visual/slider/slider_vertical_range_max.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider vertical range max</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/slider/slider_vertical_range_min.html b/tests/visual/slider/slider_vertical_range_min.html
index a190d4823..2c257928d 100644
--- a/tests/visual/slider/slider_vertical_range_min.html
+++ b/tests/visual/slider/slider_vertical_range_min.html
@@ -5,7 +5,7 @@
<title>Slider Visual Test : Slider vertical range min</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/sortable/sortable.html b/tests/visual/sortable/sortable.html
index 1fb08993e..8e3de319d 100644
--- a/tests/visual/sortable/sortable.html
+++ b/tests/visual/sortable/sortable.html
@@ -5,7 +5,7 @@
<title>Sortable Visual Test : Default</title>
<link rel="stylesheet" href="../all.css" type="text/css">
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/sortable/sortable_massive_scale.html b/tests/visual/sortable/sortable_massive_scale.html
index 17a9a3e20..2683cd166 100644
--- a/tests/visual/sortable/sortable_massive_scale.html
+++ b/tests/visual/sortable/sortable_massive_scale.html
@@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<title>Sortable Massive Scale Test</title>
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/sortable/sortable_option_revert_false.html b/tests/visual/sortable/sortable_option_revert_false.html
index 3139e6afa..e86cc9a00 100644
--- a/tests/visual/sortable/sortable_option_revert_false.html
+++ b/tests/visual/sortable/sortable_option_revert_false.html
@@ -5,7 +5,7 @@
<title>Sortable Visual Test : Sortable option revert false</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/sortable/sortable_option_revert_true.html b/tests/visual/sortable/sortable_option_revert_true.html
index 031aec7a0..b2c79b3b6 100644
--- a/tests/visual/sortable/sortable_option_revert_true.html
+++ b/tests/visual/sortable/sortable_option_revert_true.html
@@ -5,7 +5,7 @@
<title>Sortable Visual Test : Sortable option revert true</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" />
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/sortable/sortable_ticket_4231.html b/tests/visual/sortable/sortable_ticket_4231.html
index 554b4990e..ca4a93db3 100644
--- a/tests/visual/sortable/sortable_ticket_4231.html
+++ b/tests/visual/sortable/sortable_ticket_4231.html
@@ -5,7 +5,7 @@
<title>Visual testcase for #4231</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/sortable/sortable_ticket_4551.html b/tests/visual/sortable/sortable_ticket_4551.html
index 37efffe56..eccdbe66e 100644
--- a/tests/visual/sortable/sortable_ticket_4551.html
+++ b/tests/visual/sortable/sortable_ticket_4551.html
@@ -5,7 +5,7 @@
<title>Sortable Visual Test : Sortable ticket #4551</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/sortable/sortable_ticket_5355.html b/tests/visual/sortable/sortable_ticket_5355.html
index d7511f2c4..3f43a69ef 100644
--- a/tests/visual/sortable/sortable_ticket_5355.html
+++ b/tests/visual/sortable/sortable_ticket_5355.html
@@ -5,7 +5,7 @@
<title>Sortable Visual Test : Sortable ticket #5355</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
diff --git a/tests/visual/spinner/spinner.html b/tests/visual/spinner/spinner.html
new file mode 100644
index 000000000..dc723a514
--- /dev/null
+++ b/tests/visual/spinner/spinner.html
@@ -0,0 +1,43 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <title>Spinner Visual Test Page</title>
+ <link rel="stylesheet" href="../visual.css" type="text/css" />
+ <link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" title="ui-theme" />
+ <script type="text/javascript" src="../../../jquery-1.4.3.js"></script>
+ <script type="text/javascript" src="../../../external/jquery.mousewheel-3.0.4.js"></script>
+ <script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
+ <script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
+ <script type="text/javascript" src="../../../ui/jquery.ui.button.js"></script>
+ <script type="text/javascript" src="../../../ui/jquery.ui.spinner.js"></script>
+ <script type="text/javascript" src="http://jqueryui.com/themeroller/themeswitchertool/"></script>
+ <script type="text/javascript">
+ $(function() {
+ $.fn.themeswitcher && $('<div/>').css({
+ position: "absolute",
+ right: 10,
+ top: 10
+ }).appendTo(document.body).themeswitcher();
+
+ $('#spinner').spinner({
+ start: function(event, ui) {
+ console.log(event.type, ui.value, $(this).spinner("value"));
+ },
+ spin: function(event, ui) {
+ console.log(event.type, ui.value, $(this).spinner("value"));
+ },
+ stop: function(event) {
+ console.log(event.type, $(this).spinner("value"));
+ },
+ change: function(event) {
+ console.log(event.type, $(this).spinner("value"));
+ }
+ });
+ });
+ </script>
+</head>
+<body>
+
+<p><label for="spinner">Basic with event callbacks:</label> <input id="spinner"></p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/visual/tabs/tabs.html b/tests/visual/tabs/tabs.html
index ff444cad5..db4e41b33 100644
--- a/tests/visual/tabs/tabs.html
+++ b/tests/visual/tabs/tabs.html
@@ -5,7 +5,7 @@
<title>Tabs Visual Test : Default</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
- <script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.tabs.js"></script>
diff --git a/tests/visual/theme.html b/tests/visual/theme.html
new file mode 100644
index 000000000..28599bff7
--- /dev/null
+++ b/tests/visual/theme.html
@@ -0,0 +1,532 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <title>jQuery UI Example Page</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css" type="text/css">
+ <script type="text/javascript" src="../../jquery-1.4.4.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.accordion.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.autocomplete.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.datepicker.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.dialog.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.draggable.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.droppable.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.progressbar.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.resizable.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.selectable.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.slider.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.sortable.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.tabs.js"></script>
+ <script type="text/javascript">
+ $(function(){
+
+ // Accordion
+ $(".accordion").accordion({ header: "h3" });
+ $(".accordion").last().accordion("option", "icons", false);
+
+
+ // Tabs
+ $('#tabs').tabs();
+
+
+ // Dialog
+ $('#dialog').dialog({
+ autoOpen: false,
+ width: 600,
+ buttons: {
+ "Ok": function() {
+ $(this).dialog("close");
+ },
+ "Cancel": function() {
+ $(this).dialog("close");
+ }
+ }
+ });
+
+ // Dialog Link
+ $('#dialog_link').click(function(){
+ $('#dialog').dialog('open');
+ return false;
+ });
+
+ // Datepicker
+ $('#datepicker').datepicker({
+ inline: true,
+ showWeek: true
+ });
+
+ $('#multidatepicker').datepicker({
+ numberOfMonths: 3,
+ showButtonPanel: true,
+ inline: true
+ });
+
+ // Slider
+ $('.slider').slider({
+ range: true,
+ values: [17, 67]
+ });
+
+ $("#eq > span").each(function() {
+ var value = parseInt($(this).text());
+ $(this).empty().slider({
+ value: value,
+ range: "min",
+ animate: true,
+ orientation: "vertical"
+ });
+ });
+
+
+ // Progressbar
+ $("#progressbar").progressbar({
+ value: 20
+ });
+
+ //hover states on the static widgets
+ $('#dialog_link, ul#icons li').hover(
+ function() { $(this).addClass('ui-state-hover'); },
+ function() { $(this).removeClass('ui-state-hover'); }
+ );
+
+ $(".buttonset > button").button()
+ .next()
+ .button({
+ text: false,
+ icons: {
+ primary: "ui-icon-triangle-1-s"
+ }
+ })
+ .parent()
+ .buttonset();
+
+
+ $('#beginning').button({
+ text: false,
+ icons: {
+ primary: 'ui-icon-seek-start'
+ }
+ });
+ $('#rewind').button({
+ text: false,
+ icons: {
+ primary: 'ui-icon-seek-prev'
+ }
+ });
+ $('#play').button({
+ text: false,
+ icons: {
+ primary: 'ui-icon-play'
+ }
+ });
+ $('#stop').button({
+ text: false,
+ icons: {
+ primary: 'ui-icon-stop'
+ }
+ });
+ $('#forward').button({
+ text: false,
+ icons: {
+ primary: 'ui-icon-seek-next'
+ }
+ });
+ $('#end').button({
+ text: false,
+ icons: {
+ primary: 'ui-icon-seek-end'
+ }
+ });
+ $("#shuffle").button();
+ $("#repeat").buttonset();
+
+ });
+ </script>
+ <style type="text/css">
+ /*demo page css*/
+ body{ font: 62.5% "Trebuchet MS", sans-serif; margin: 50px;}
+ .demoHeaders { margin-top: 2em; clear:both; }
+ #dialog_link {padding: .4em 1em .4em 20px;text-decoration: none;position: relative;}
+ #dialog_link span.ui-icon {margin: 0 5px 0 0;position: absolute;left: .2em;top: 50%;margin-top: -8px;}
+ ul#icons {margin: 0; padding: 0;}
+ ul#icons li {margin: 2px; position: relative; padding: 4px 0; cursor: pointer; float: left; list-style: none;}
+ ul#icons span.ui-icon {float: left; margin: 0 4px;}
+ .columnbox { height: 150px; width: 48%; float:left; margin-right: 1%; }
+ #eq span { height:120px; float:left; margin:15px }
+ .buttonset {margin-bottom: 5px; }
+ #toolbar { padding: 10px 4px; }
+ </style>
+ </head>
+ <body>
+
+ <!-- <p style="font-size: 1.3em; line-height: 1.5; margin: 1em 0; width: 50%;">This page demonstrates the widgets using a theme.</p> -->
+ <div id="switcher" style="position:absolute; right: 20px; top: 20px;"></div>
+
+ <!-- Accordion -->
+ <h2 class="demoHeaders">Accordion</h2>
+ <div class="columnbox">
+ <div class="accordion">
+ <div>
+ <h3><a href="#">First</a></h3>
+ <div>Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.</div>
+ </div>
+ <div>
+ <h3><a href="#">Second</a></h3>
+ <div>Phasellus mattis tincidunt nibh.</div>
+ </div>
+ <div>
+ <h3><a href="#">Third</a></h3>
+ <div>Nam dui erat, auctor a, dignissim quis.</div>
+ </div>
+ </div>
+ </div>
+ <div class="columnbox">
+ <div class="accordion">
+ <div>
+ <h3><a href="#">First no icons</a></h3>
+ <div>Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.</div>
+ </div>
+ <div>
+ <h3><a href="#">Second no icons</a></h3>
+ <div>Phasellus mattis tincidunt nibh.</div>
+ </div>
+ <div>
+ <h3><a href="#">Third no icons</a></h3>
+ <div>Nam dui erat, auctor a, dignissim quis.</div>
+ </div>
+ </div>
+ </div>
+
+
+ <!-- Tabs -->
+ <h2 class="demoHeaders">Tabs</h2>
+ <div id="tabs">
+ <ul>
+ <li><a href="#tabs-1">First</a></li>
+ <li><a href="#tabs-2">Second</a></li>
+ <li><a href="#tabs-3">Third</a></li>
+ </ul>
+ <div id="tabs-1">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</div>
+ <div id="tabs-2">Phasellus mattis tincidunt nibh. Cras orci urna, blandit id, pretium vel, aliquet ornare, felis. Maecenas scelerisque sem non nisl. Fusce sed lorem in enim dictum bibendum.</div>
+ <div id="tabs-3">Nam dui erat, auctor a, dignissim quis, sollicitudin eu, felis. Pellentesque nisi urna, interdum eget, sagittis et, consequat vestibulum, lacus. Mauris porttitor ullamcorper augue.</div>
+ </div>
+
+ <!-- Dialog NOTE: Dialog is not generated by UI in this demo so it can be visually styled in themeroller-->
+ <h2 class="demoHeaders">Dialog</h2>
+ <p><a href="#" id="dialog_link" class="ui-state-default ui-corner-all"><span class="ui-icon ui-icon-newwin"></span>Open Dialog</a></p>
+
+ <div class="ui-dialog ui-widget ui-widget-content ui-corner-all ui-draggable ui-resizable" ><div class="ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix"><span class="ui-dialog-title">Inline Dialog</span><a href="#" class="ui-dialog-titlebar-close ui-corner-all" ><span class="ui-icon ui-icon-closethick" >close</span></a></div><div class="ui-dialog-content ui-widget-content" >
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
+ </div><div class="ui-resizable-handle ui-resizable-n" ></div><div class="ui-resizable-handle ui-resizable-e" ></div><div class="ui-resizable-handle ui-resizable-s" ></div><div class="ui-resizable-handle ui-resizable-w" ></div><div class="ui-resizable-handle ui-resizable-se ui-icon ui-icon-gripsmall-diagonal-se ui-icon-grip-diagonal-se" ></div><div class="ui-resizable-handle ui-resizable-sw" ></div><div class="ui-resizable-handle ui-resizable-ne" ></div><div class="ui-resizable-handle ui-resizable-nw" ></div><div class="ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"><button type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button" aria-disabled="false"><span class="ui-button-text">Ok</span></button><button type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button" aria-disabled="false"><span class="ui-button-text">Cancel</span></button></div></div>
+
+
+ <h2 class="demoHeaders">Overlay and Shadow Classes <em>(not currently used in UI widgets)</em></h2>
+ <div style="position: relative; width: 96%; height: 200px; padding:1% 4%; overflow:hidden;" class="fakewindowcontain">
+ <p>Lorem ipsum dolor sit amet, Nulla nec tortor. Donec id elit quis purus consectetur consequat. </p><p>Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. Aliquam ante. Suspendisse scelerisque dui nec velit. Duis augue augue, gravida euismod, vulputate ac, facilisis id, sem. Morbi in orci. </p><p>Nulla purus lacus, pulvinar vel, malesuada ac, mattis nec, quam. Nam molestie scelerisque quam. Nullam feugiat cursus lacus.orem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero risus, commodo vitae, pharetra mollis, posuere eu, pede. Nulla nec tortor. Donec id elit quis purus consectetur consequat. </p><p>Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. Aliquam ante. Suspendisse scelerisque dui nec velit. Duis augue augue, gravida euismod, vulputate ac, facilisis id, sem. Morbi in orci. Nulla purus lacus, pulvinar vel, malesuada ac, mattis nec, quam. Nam molestie scelerisque quam. </p><p>Nullam feugiat cursus lacus.orem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero risus, commodo vitae, pharetra mollis, posuere eu, pede. Nulla nec tortor. Donec id elit quis purus consectetur consequat. Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. Aliquam ante. </p><p>Suspendisse scelerisque dui nec velit. Duis augue augue, gravida euismod, vulputate ac, facilisis id, sem. Morbi in orci. Nulla purus lacus, pulvinar vel, malesuada ac, mattis nec, quam. Nam molestie scelerisque quam. Nullam feugiat cursus lacus.orem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero risus, commodo vitae, pharetra mollis, posuere eu, pede. Nulla nec tortor. Donec id elit quis purus consectetur consequat. Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. </p>
+
+ <!-- ui-dialog -->
+ <div class="ui-overlay"><div class="ui-widget-overlay"></div><div class="ui-widget-shadow ui-corner-all" style="width: 302px; height: 152px; position: absolute; left: 50px; top: 30px;"></div></div>
+ <div style="position: absolute; width: 280px; height: 130px;left: 50px; top: 30px; padding: 10px;" class="ui-widget ui-widget-content ui-corner-all">
+ <div class="ui-dialog-content ui-widget-content" style="background: none; border: 0;">
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
+ </div>
+ </div>
+
+ </div>
+
+
+ <!-- ui-dialog -->
+ <div id="dialog" title="Dialog Title">
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
+ </div>
+
+
+
+ <h2 class="demoHeaders">Framework Icons (content color preview)</h2>
+ <ul id="icons" class="ui-widget ui-helper-clearfix">
+
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-n"><span class="ui-icon ui-icon-carat-1-n"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-ne"><span class="ui-icon ui-icon-carat-1-ne"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-e"><span class="ui-icon ui-icon-carat-1-e"></span></li>
+
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-se"><span class="ui-icon ui-icon-carat-1-se"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-s"><span class="ui-icon ui-icon-carat-1-s"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-sw"><span class="ui-icon ui-icon-carat-1-sw"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-w"><span class="ui-icon ui-icon-carat-1-w"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-nw"><span class="ui-icon ui-icon-carat-1-nw"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-2-n-s"><span class="ui-icon ui-icon-carat-2-n-s"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-2-e-w"><span class="ui-icon ui-icon-carat-2-e-w"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-n"><span class="ui-icon ui-icon-triangle-1-n"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-ne"><span class="ui-icon ui-icon-triangle-1-ne"></span></li>
+
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-e"><span class="ui-icon ui-icon-triangle-1-e"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-se"><span class="ui-icon ui-icon-triangle-1-se"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-s"><span class="ui-icon ui-icon-triangle-1-s"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-sw"><span class="ui-icon ui-icon-triangle-1-sw"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-w"><span class="ui-icon ui-icon-triangle-1-w"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-nw"><span class="ui-icon ui-icon-triangle-1-nw"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-2-n-s"><span class="ui-icon ui-icon-triangle-2-n-s"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-2-e-w"><span class="ui-icon ui-icon-triangle-2-e-w"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-n"><span class="ui-icon ui-icon-arrow-1-n"></span></li>
+
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-ne"><span class="ui-icon ui-icon-arrow-1-ne"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-e"><span class="ui-icon ui-icon-arrow-1-e"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-se"><span class="ui-icon ui-icon-arrow-1-se"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-s"><span class="ui-icon ui-icon-arrow-1-s"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-sw"><span class="ui-icon ui-icon-arrow-1-sw"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-w"><span class="ui-icon ui-icon-arrow-1-w"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-nw"><span class="ui-icon ui-icon-arrow-1-nw"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-2-n-s"><span class="ui-icon ui-icon-arrow-2-n-s"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-2-ne-sw"><span class="ui-icon ui-icon-arrow-2-ne-sw"></span></li>
+
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-2-e-w"><span class="ui-icon ui-icon-arrow-2-e-w"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-2-se-nw"><span class="ui-icon ui-icon-arrow-2-se-nw"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowstop-1-n"><span class="ui-icon ui-icon-arrowstop-1-n"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowstop-1-e"><span class="ui-icon ui-icon-arrowstop-1-e"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowstop-1-s"><span class="ui-icon ui-icon-arrowstop-1-s"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowstop-1-w"><span class="ui-icon ui-icon-arrowstop-1-w"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-n"><span class="ui-icon ui-icon-arrowthick-1-n"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-ne"><span class="ui-icon ui-icon-arrowthick-1-ne"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-e"><span class="ui-icon ui-icon-arrowthick-1-e"></span></li>
+
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-se"><span class="ui-icon ui-icon-arrowthick-1-se"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-s"><span class="ui-icon ui-icon-arrowthick-1-s"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-sw"><span class="ui-icon ui-icon-arrowthick-1-sw"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-w"><span class="ui-icon ui-icon-arrowthick-1-w"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-nw"><span class="ui-icon ui-icon-arrowthick-1-nw"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-2-n-s"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-2-ne-sw"><span class="ui-icon ui-icon-arrowthick-2-ne-sw"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-2-e-w"><span class="ui-icon ui-icon-arrowthick-2-e-w"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-2-se-nw"><span class="ui-icon ui-icon-arrowthick-2-se-nw"></span></li>
+
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthickstop-1-n"><span class="ui-icon ui-icon-arrowthickstop-1-n"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthickstop-1-e"><span class="ui-icon ui-icon-arrowthickstop-1-e"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthickstop-1-s"><span class="ui-icon ui-icon-arrowthickstop-1-s"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthickstop-1-w"><span class="ui-icon ui-icon-arrowthickstop-1-w"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturnthick-1-w"><span class="ui-icon ui-icon-arrowreturnthick-1-w"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturnthick-1-n"><span class="ui-icon ui-icon-arrowreturnthick-1-n"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturnthick-1-e"><span class="ui-icon ui-icon-arrowreturnthick-1-e"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturnthick-1-s"><span class="ui-icon ui-icon-arrowreturnthick-1-s"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturn-1-w"><span class="ui-icon ui-icon-arrowreturn-1-w"></span></li>
+
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturn-1-n"><span class="ui-icon ui-icon-arrowreturn-1-n"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturn-1-e"><span class="ui-icon ui-icon-arrowreturn-1-e"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturn-1-s"><span class="ui-icon ui-icon-arrowreturn-1-s"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowrefresh-1-w"><span class="ui-icon ui-icon-arrowrefresh-1-w"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowrefresh-1-n"><span class="ui-icon ui-icon-arrowrefresh-1-n"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowrefresh-1-e"><span class="ui-icon ui-icon-arrowrefresh-1-e"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowrefresh-1-s"><span class="ui-icon ui-icon-arrowrefresh-1-s"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-4"><span class="ui-icon ui-icon-arrow-4"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-4-diag"><span class="ui-icon ui-icon-arrow-4-diag"></span></li>
+
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-extlink"><span class="ui-icon ui-icon-extlink"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-newwin"><span class="ui-icon ui-icon-newwin"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-refresh"><span class="ui-icon ui-icon-refresh"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-shuffle"><span class="ui-icon ui-icon-shuffle"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-transfer-e-w"><span class="ui-icon ui-icon-transfer-e-w"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-transferthick-e-w"><span class="ui-icon ui-icon-transferthick-e-w"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-folder-collapsed"><span class="ui-icon ui-icon-folder-collapsed"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-folder-open"><span class="ui-icon ui-icon-folder-open"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-document"><span class="ui-icon ui-icon-document"></span></li>
+
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-document-b"><span class="ui-icon ui-icon-document-b"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-note"><span class="ui-icon ui-icon-note"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-mail-closed"><span class="ui-icon ui-icon-mail-closed"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-mail-open"><span class="ui-icon ui-icon-mail-open"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-suitcase"><span class="ui-icon ui-icon-suitcase"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-comment"><span class="ui-icon ui-icon-comment"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-person"><span class="ui-icon ui-icon-person"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-print"><span class="ui-icon ui-icon-print"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-trash"><span class="ui-icon ui-icon-trash"></span></li>
+
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-locked"><span class="ui-icon ui-icon-locked"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-unlocked"><span class="ui-icon ui-icon-unlocked"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-bookmark"><span class="ui-icon ui-icon-bookmark"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-tag"><span class="ui-icon ui-icon-tag"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-home"><span class="ui-icon ui-icon-home"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-flag"><span class="ui-icon ui-icon-flag"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-calculator"><span class="ui-icon ui-icon-calculator"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-cart"><span class="ui-icon ui-icon-cart"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-pencil"><span class="ui-icon ui-icon-pencil"></span></li>
+
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-clock"><span class="ui-icon ui-icon-clock"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-disk"><span class="ui-icon ui-icon-disk"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-calendar"><span class="ui-icon ui-icon-calendar"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-zoomin"><span class="ui-icon ui-icon-zoomin"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-zoomout"><span class="ui-icon ui-icon-zoomout"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-search"><span class="ui-icon ui-icon-search"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-wrench"><span class="ui-icon ui-icon-wrench"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-gear"><span class="ui-icon ui-icon-gear"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-heart"><span class="ui-icon ui-icon-heart"></span></li>
+
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-star"><span class="ui-icon ui-icon-star"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-link"><span class="ui-icon ui-icon-link"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-cancel"><span class="ui-icon ui-icon-cancel"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-plus"><span class="ui-icon ui-icon-plus"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-plusthick"><span class="ui-icon ui-icon-plusthick"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-minus"><span class="ui-icon ui-icon-minus"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-minusthick"><span class="ui-icon ui-icon-minusthick"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-close"><span class="ui-icon ui-icon-close"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-closethick"><span class="ui-icon ui-icon-closethick"></span></li>
+
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-key"><span class="ui-icon ui-icon-key"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-lightbulb"><span class="ui-icon ui-icon-lightbulb"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-scissors"><span class="ui-icon ui-icon-scissors"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-clipboard"><span class="ui-icon ui-icon-clipboard"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-copy"><span class="ui-icon ui-icon-copy"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-contact"><span class="ui-icon ui-icon-contact"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-image"><span class="ui-icon ui-icon-image"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-video"><span class="ui-icon ui-icon-video"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-script"><span class="ui-icon ui-icon-script"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-alert"><span class="ui-icon ui-icon-alert"></span></li>
+
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-info"><span class="ui-icon ui-icon-info"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-notice"><span class="ui-icon ui-icon-notice"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-help"><span class="ui-icon ui-icon-help"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-check"><span class="ui-icon ui-icon-check"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-bullet"><span class="ui-icon ui-icon-bullet"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-radio-off"><span class="ui-icon ui-icon-radio-off"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-radio-on"><span class="ui-icon ui-icon-radio-on"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-pin-w"><span class="ui-icon ui-icon-pin-w"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-pin-s"><span class="ui-icon ui-icon-pin-s"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-play"><span class="ui-icon ui-icon-play"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-pause"><span class="ui-icon ui-icon-pause"></span></li>
+
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-seek-next"><span class="ui-icon ui-icon-seek-next"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-seek-prev"><span class="ui-icon ui-icon-seek-prev"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-seek-end"><span class="ui-icon ui-icon-seek-end"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-seek-first"><span class="ui-icon ui-icon-seek-first"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-stop"><span class="ui-icon ui-icon-stop"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-eject"><span class="ui-icon ui-icon-eject"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-volume-off"><span class="ui-icon ui-icon-volume-off"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-volume-on"><span class="ui-icon ui-icon-volume-on"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-power"><span class="ui-icon ui-icon-power"></span></li>
+
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-signal-diag"><span class="ui-icon ui-icon-signal-diag"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-signal"><span class="ui-icon ui-icon-signal"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-battery-0"><span class="ui-icon ui-icon-battery-0"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-battery-1"><span class="ui-icon ui-icon-battery-1"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-battery-2"><span class="ui-icon ui-icon-battery-2"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-battery-3"><span class="ui-icon ui-icon-battery-3"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-plus"><span class="ui-icon ui-icon-circle-plus"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-minus"><span class="ui-icon ui-icon-circle-minus"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-close"><span class="ui-icon ui-icon-circle-close"></span></li>
+
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-triangle-e"><span class="ui-icon ui-icon-circle-triangle-e"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-triangle-s"><span class="ui-icon ui-icon-circle-triangle-s"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-triangle-w"><span class="ui-icon ui-icon-circle-triangle-w"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-triangle-n"><span class="ui-icon ui-icon-circle-triangle-n"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-arrow-e"><span class="ui-icon ui-icon-circle-arrow-e"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-arrow-s"><span class="ui-icon ui-icon-circle-arrow-s"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-arrow-w"><span class="ui-icon ui-icon-circle-arrow-w"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-arrow-n"><span class="ui-icon ui-icon-circle-arrow-n"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-zoomin"><span class="ui-icon ui-icon-circle-zoomin"></span></li>
+
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-zoomout"><span class="ui-icon ui-icon-circle-zoomout"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-check"><span class="ui-icon ui-icon-circle-check"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-circlesmall-plus"><span class="ui-icon ui-icon-circlesmall-plus"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-circlesmall-minus"><span class="ui-icon ui-icon-circlesmall-minus"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-circlesmall-close"><span class="ui-icon ui-icon-circlesmall-close"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-squaresmall-plus"><span class="ui-icon ui-icon-squaresmall-plus"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-squaresmall-minus"><span class="ui-icon ui-icon-squaresmall-minus"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-squaresmall-close"><span class="ui-icon ui-icon-squaresmall-close"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-grip-dotted-vertical"><span class="ui-icon ui-icon-grip-dotted-vertical"></span></li>
+
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-grip-dotted-horizontal"><span class="ui-icon ui-icon-grip-dotted-horizontal"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-grip-solid-vertical"><span class="ui-icon ui-icon-grip-solid-vertical"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-grip-solid-horizontal"><span class="ui-icon ui-icon-grip-solid-horizontal"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-gripsmall-diagonal-se"><span class="ui-icon ui-icon-gripsmall-diagonal-se"></span></li>
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-grip-diagonal-se"><span class="ui-icon ui-icon-grip-diagonal-se"></span></li>
+ </ul>
+
+
+ <!-- Slider -->
+ <h2 class="demoHeaders">Slider</h2>
+ <div class="columnbox">
+ <div class="slider"></div>
+ </div>
+ <div class="columnbox">
+ <div id="eq">
+ <span>88</span>
+ <span>77</span>
+ <span>55</span>
+ <span>33</span>
+ <span>40</span>
+ <span>45</span>
+ <span>70</span>
+ </div>
+ </div>
+
+
+ <!-- Datepicker -->
+ <h2 class="demoHeaders">Datepicker</h2>
+ <div class="columnbox" style="width: 32%">
+ <div id="datepicker"></div>
+ </div>
+ <div class="columnbox" style="width: 66%; height: 220px;">
+ <div id="multidatepicker"></div>
+ </div>
+
+
+ <!-- Progressbar -->
+ <h2 class="demoHeaders">Progressbar</h2>
+ <div id="progressbar"></div>
+
+ <!-- Highlight / Error -->
+ <h2 class="demoHeaders">Highlight / Error</h2>
+ <div class="ui-widget">
+ <div class="ui-state-highlight ui-corner-all" style="margin-top: 20px; padding: 0 .7em;">
+ <p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
+ <strong>Hey!</strong> Sample ui-state-highlight style.</p>
+ </div>
+ </div>
+ <br/>
+ <div class="ui-widget">
+ <div class="ui-state-error ui-corner-all" style="padding: 0 .7em;">
+ <p><span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span>
+ <strong>Alert:</strong> Sample ui-state-error style.</p>
+ </div>
+ </div>
+
+ <h2 class="demoHeaders">Button</h2>
+
+ <div class="buttonset">
+ <button id="rerun">Run last action</button>
+ <button id="select">Select an action</button>
+ </div>
+
+ <span id="toolbar" class="ui-widget-header ui-corner-all">
+ <button id="beginning">go to beginning</button>
+ <button id="rewind">rewind</button>
+ <button id="play">play</button>
+ <button id="stop">stop</button>
+ <button id="forward">fast forward</button>
+ <button id="end">go to end</button>
+
+ <input type="checkbox" id="shuffle" /><label for="shuffle">Shuffle</label>
+
+ <span id="repeat">
+ <input type="radio" id="repeat0" name="repeat" checked="checked" /><label for="repeat0">No Repeat</label>
+ <input type="radio" id="repeat1" name="repeat" /><label for="repeat1">Once</label>
+ <input type="radio" id="repeatall" name="repeat" /><label for="repeatall">All</label>
+ </span>
+ </span>
+
+ <!-- theme switcher -->
+
+ <script src="http://jqueryui.com/themeroller/themeswitchertool/"></script>
+ <script>
+ $('#switcher').themeswitcher();
+ </script>
+
+
+
+ </body>
+</html>
+
+
diff --git a/themes/base/images/ui-anim_basic_16x16.gif b/themes/base/images/ui-anim_basic_16x16.gif
deleted file mode 100644
index 085ccaeca..000000000
--- a/themes/base/images/ui-anim_basic_16x16.gif
+++ /dev/null
Binary files differ
diff --git a/themes/base/jquery.ui.accordion.css b/themes/base/jquery.ui.accordion.css
index 8d8a1a6e1..23446e1f6 100644
--- a/themes/base/jquery.ui.accordion.css
+++ b/themes/base/jquery.ui.accordion.css
@@ -1,12 +1,19 @@
-/* Accordion
-----------------------------------*/
+/*
+ * jQuery UI Accordion @VERSION
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Accordion#theming
+ */
+/* IE/Win - Fix animation bug - #4615 */
+.ui-accordion { width: 100%; }
.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
.ui-accordion .ui-accordion-li-fix { display: inline; }
.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
-.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
-/* IE7-/Win - Fix extra vertical space in lists */
-.ui-accordion a { zoom: 1; }
-.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
+.ui-accordion .ui-accordion-heading { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
+.ui-accordion-icons .ui-accordion-heading { padding-left: 2.2em; }
.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
-.ui-accordion .ui-accordion-content-active { display: block; } \ No newline at end of file
+.ui-accordion .ui-accordion-content-active { display: block; }
diff --git a/themes/base/jquery.ui.all.css b/themes/base/jquery.ui.all.css
index 6ee0fdf4a..0302dfb96 100644
--- a/themes/base/jquery.ui.all.css
+++ b/themes/base/jquery.ui.all.css
@@ -1,2 +1,11 @@
+/*
+ * jQuery UI CSS Framework @VERSION
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming
+ */
@import "jquery.ui.base.css";
@import "jquery.ui.theme.css";
diff --git a/themes/base/jquery.ui.autocomplete.css b/themes/base/jquery.ui.autocomplete.css
index 79a25bd6c..aab7e8d63 100644
--- a/themes/base/jquery.ui.autocomplete.css
+++ b/themes/base/jquery.ui.autocomplete.css
@@ -1,7 +1,13 @@
-/* Autocomplete
-----------------------------------*/
+/*
+ * jQuery UI Autocomplete @VERSION
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Autocomplete#theming
+ */
.ui-autocomplete { position: absolute; cursor: default; }
-.ui-autocomplete-loading { background: white url('images/ui-anim_basic_16x16.gif') right center no-repeat; }
/* workarounds */
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
diff --git a/themes/base/jquery.ui.base.css b/themes/base/jquery.ui.base.css
index 30032c7f8..34d2c8fc6 100644
--- a/themes/base/jquery.ui.base.css
+++ b/themes/base/jquery.ui.base.css
@@ -1,3 +1,12 @@
+/*
+ * jQuery UI CSS Framework @VERSION
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming
+ */
@import url("jquery.ui.core.css");
@import url("jquery.ui.accordion.css");
@@ -8,5 +17,7 @@
@import url("jquery.ui.menu.css");
@import url("jquery.ui.progressbar.css");
@import url("jquery.ui.resizable.css");
+@import url("jquery.ui.selectable.css");
@import url("jquery.ui.slider.css");
+@import url("jquery.ui.spinner.css");
@import url("jquery.ui.tabs.css");
diff --git a/themes/base/jquery.ui.button.css b/themes/base/jquery.ui.button.css
index 47777a428..00c2b3b15 100644
--- a/themes/base/jquery.ui.button.css
+++ b/themes/base/jquery.ui.button.css
@@ -1,6 +1,12 @@
-/* Button
-----------------------------------*/
-
+/*
+ * jQuery UI Button @VERSION
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Button#theming
+ */
.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
@@ -11,15 +17,17 @@ button.ui-button-icons-only { width: 3.7em; }
.ui-button .ui-button-text { display: block; line-height: 1.4; }
.ui-button-text-only .ui-button-text { padding: .4em 1em; }
.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
-.ui-button-text-icon .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
+.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
+.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
/* no icon support for input elements, provide padding by default */
input.ui-button { padding: .4em 1em; }
/*button icon element(s) */
-.ui-button-icon-only .ui-icon, .ui-button-text-icon .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
+.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
-.ui-button-text-icon .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
+.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
+.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
/*button sets*/
@@ -28,8 +36,3 @@ input.ui-button { padding: .4em 1em; }
/* workarounds */
button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
-
-
-
-
-
diff --git a/themes/base/jquery.ui.core.css b/themes/base/jquery.ui.core.css
index b3e819305..5cb485cd1 100644
--- a/themes/base/jquery.ui.core.css
+++ b/themes/base/jquery.ui.core.css
@@ -1,13 +1,17 @@
/*
-* jQuery UI CSS Framework
-* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
-* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
-*/
+ * jQuery UI CSS Framework @VERSION
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming/API
+ */
/* Layout helpers
----------------------------------*/
.ui-helper-hidden { display: none; }
-.ui-helper-hidden-accessible { position: absolute; left: -99999999px; }
+.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
.ui-helper-clearfix { display: inline-block; }
diff --git a/themes/base/jquery.ui.datepicker.css b/themes/base/jquery.ui.datepicker.css
index a1116e69c..f9098e3a7 100644
--- a/themes/base/jquery.ui.datepicker.css
+++ b/themes/base/jquery.ui.datepicker.css
@@ -1,6 +1,13 @@
-/* Datepicker
-----------------------------------*/
-.ui-datepicker { width: 17em; padding: .2em .2em 0; }
+/*
+ * jQuery UI Datepicker @VERSION
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Datepicker#theming
+ */
+.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
diff --git a/themes/base/jquery.ui.dialog.css b/themes/base/jquery.ui.dialog.css
index f8354642a..035464447 100644
--- a/themes/base/jquery.ui.dialog.css
+++ b/themes/base/jquery.ui.dialog.css
@@ -1,13 +1,21 @@
-/* Dialog
-----------------------------------*/
+/*
+ * jQuery UI Dialog @VERSION
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Dialog#theming
+ */
.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
.ui-dialog .ui-dialog-titlebar { padding: .5em 1em .3em; position: relative; }
.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .2em 0; }
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
-.ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
+.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
-.ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; }
+.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
+.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
.ui-draggable .ui-dialog-titlebar { cursor: move; }
diff --git a/themes/base/jquery.ui.progressbar.css b/themes/base/jquery.ui.progressbar.css
index bc0939ecf..50fe84a6f 100644
--- a/themes/base/jquery.ui.progressbar.css
+++ b/themes/base/jquery.ui.progressbar.css
@@ -1,4 +1,11 @@
-/* Progressbar
-----------------------------------*/
+/*
+ * jQuery UI Progressbar @VERSION
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Progressbar#theming
+ */
.ui-progressbar { height:2em; text-align: left; }
.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } \ No newline at end of file
diff --git a/themes/base/jquery.ui.resizable.css b/themes/base/jquery.ui.resizable.css
index 366643b54..3b86c7c3a 100644
--- a/themes/base/jquery.ui.resizable.css
+++ b/themes/base/jquery.ui.resizable.css
@@ -1,5 +1,12 @@
-/* Resizable
-----------------------------------*/
+/*
+ * jQuery UI Resizable @VERSION
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Resizable#theming
+ */
.ui-resizable { position: relative;}
.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;}
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
diff --git a/themes/base/jquery.ui.selectable.css b/themes/base/jquery.ui.selectable.css
new file mode 100644
index 000000000..de2f7f3b6
--- /dev/null
+++ b/themes/base/jquery.ui.selectable.css
@@ -0,0 +1,10 @@
+/*
+ * jQuery UI Selectable @VERSION
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Selectable#theming
+ */
+.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
diff --git a/themes/base/jquery.ui.slider.css b/themes/base/jquery.ui.slider.css
index 07c6f4e5e..0b1d31e94 100644
--- a/themes/base/jquery.ui.slider.css
+++ b/themes/base/jquery.ui.slider.css
@@ -1,5 +1,12 @@
-/* Slider
-----------------------------------*/
+/*
+ * jQuery UI Slider @VERSION
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Slider#theming
+ */
.ui-slider { position: relative; text-align: left; }
.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
diff --git a/themes/base/jquery.ui.spinner.css b/themes/base/jquery.ui.spinner.css
new file mode 100644
index 000000000..cd195ee47
--- /dev/null
+++ b/themes/base/jquery.ui.spinner.css
@@ -0,0 +1,16 @@
+/* Spinner
+----------------------------------*/
+.ui-spinner { position:relative; display: inline-block; overflow: hidden; padding: 0; vertical-align: middle; }
+.ui-spinner-input { border: none; background: none; padding: 0; margin: .2em 0; vertical-align: middle; margin-left: .4em; margin-right: 22px; }
+.ui-spinner-button { width: 16px; height: 50%; font-size: .5em; padding: 0; margin: 0; z-index: 100; text-align: center; vertical-align: middle; position: absolute; cursor: default; display: block; overflow: hidden; right: 0; }
+.ui-spinner a.ui-spinner-button { border-top: none; border-bottom: none; border-right: none; } /* more specificity required here to overide default borders */
+.ui-spinner .ui-icon { position: absolute; margin-top: -8px; top: 50%; left: 0; } /* vertical centre icon */
+.ui-spinner-up { top: 0; }
+.ui-spinner-down { bottom: 0; }
+
+/* TR overrides */
+span.ui-spinner { background: none; }
+.ui-spinner .ui-icon-triangle-1-s {
+ /* need to fix icons sprite */
+ background-position:-65px -16px;
+}
diff --git a/themes/base/jquery.ui.tabs.css b/themes/base/jquery.ui.tabs.css
index 99e16dbdb..5b3b58e81 100644
--- a/themes/base/jquery.ui.tabs.css
+++ b/themes/base/jquery.ui.tabs.css
@@ -1,5 +1,12 @@
-/* Tabs
-----------------------------------*/
+/*
+ * jQuery UI Tabs @VERSION
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Tabs#theming
+ */
.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
diff --git a/themes/base/jquery.ui.theme.css b/themes/base/jquery.ui.theme.css
index 3fcc20a50..922054384 100644
--- a/themes/base/jquery.ui.theme.css
+++ b/themes/base/jquery.ui.theme.css
@@ -1,9 +1,14 @@
/*
-* jQuery UI CSS Framework
-* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
-* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
-* To view and modify this theme, visit http://jqueryui.com/themeroller/
-*/
+ * jQuery UI CSS Framework @VERSION
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming/API
+ *
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/
+ */
/* Component containers
diff --git a/ui/i18n/jquery.ui.datepicker-ar.js b/ui/i18n/jquery.ui.datepicker-ar.js
index c799b48d8..9e37911c2 100644
--- a/ui/i18n/jquery.ui.datepicker-ar.js
+++ b/ui/i18n/jquery.ui.datepicker-ar.js
@@ -1,6 +1,5 @@
/* Arabic Translation for jQuery UI date picker plugin. */
-/* Khaled Al Horani -- koko.dw@gmail.com */
-/* خالد الحوراني -- koko.dw@gmail.com */
+/* Khaled Alhourani -- me@khaledalhourani.com */
/* NOTE: monthNames are the original months names and they are the Arabic names, not the new months name فبراير - يناير and there isn't any Arabic roots for these months */
jQuery(function($){
$.datepicker.regional['ar'] = {
@@ -10,13 +9,13 @@ jQuery(function($){
currentText: 'اليوم',
monthNames: ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'آذار', 'حزيران',
'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'],
- monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'],
- dayNames: ['السبت', 'الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة'],
- dayNamesShort: ['سبت', 'أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة'],
- dayNamesMin: ['سبت', 'أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة'],
+ monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
+ dayNames: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
+ dayNamesShort: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
+ dayNamesMin: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
weekHeader: 'أسبوع',
dateFormat: 'dd/mm/yy',
- firstDay: 0,
+ firstDay: 6,
isRTL: true,
showMonthAfterYear: false,
yearSuffix: ''};
diff --git a/ui/i18n/jquery.ui.datepicker-fr.js b/ui/i18n/jquery.ui.datepicker-fr.js
index 134bda65d..74ea1c231 100644
--- a/ui/i18n/jquery.ui.datepicker-fr.js
+++ b/ui/i18n/jquery.ui.datepicker-fr.js
@@ -1,23 +1,25 @@
/* French initialisation for the jQuery UI date picker plugin. */
-/* Written by Keith Wood (kbwood{at}iinet.com.au) and Stéphane Nahmani (sholby@sholby.net). */
+/* Written by Keith Wood (kbwood{at}iinet.com.au),
+ Stéphane Nahmani (sholby@sholby.net),
+ Stéphane Raimbault <stephane.raimbault@gmail.com> */
jQuery(function($){
$.datepicker.regional['fr'] = {
closeText: 'Fermer',
- prevText: '&#x3c;Préc',
- nextText: 'Suiv&#x3e;',
- currentText: 'Courant',
+ prevText: 'Précédent',
+ nextText: 'Suivant',
+ currentText: 'Aujourd\'hui',
monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
- monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Jun',
- 'Jul','Aoû','Sep','Oct','Nov','Déc'],
+ monthNamesShort: ['Janv.','Févr.','Mars','Avril','Mai','Juin',
+ 'Juil.','Août','Sept.','Oct.','Nov.','Déc.'],
dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
- dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'],
- dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'],
- weekHeader: 'Sm',
+ dayNamesShort: ['Dim.','Lun.','Mar.','Mer.','Jeu.','Ven.','Sam.'],
+ dayNamesMin: ['D','L','M','M','J','V','S'],
+ weekHeader: 'Sem.',
dateFormat: 'dd/mm/yy',
firstDay: 1,
isRTL: false,
showMonthAfterYear: false,
yearSuffix: ''};
$.datepicker.setDefaults($.datepicker.regional['fr']);
-}); \ No newline at end of file
+});
diff --git a/ui/i18n/jquery.ui.datepicker-gl.js b/ui/i18n/jquery.ui.datepicker-gl.js
new file mode 100644
index 000000000..278403e8f
--- /dev/null
+++ b/ui/i18n/jquery.ui.datepicker-gl.js
@@ -0,0 +1,23 @@
+/* Galician localization for 'UI date picker' jQuery extension. */
+/* Translated by Jorge Barreiro <yortx.barry@gmail.com>. */
+jQuery(function($){
+ $.datepicker.regional['gl'] = {
+ closeText: 'Pechar',
+ prevText: '&#x3c;Ant',
+ nextText: 'Seg&#x3e;',
+ currentText: 'Hoxe',
+ monthNames: ['Xaneiro','Febreiro','Marzo','Abril','Maio','Xuño',
+ 'Xullo','Agosto','Setembro','Outubro','Novembro','Decembro'],
+ monthNamesShort: ['Xan','Feb','Mar','Abr','Mai','Xuñ',
+ 'Xul','Ago','Set','Out','Nov','Dec'],
+ dayNames: ['Domingo','Luns','Martes','M&eacute;rcores','Xoves','Venres','S&aacute;bado'],
+ dayNamesShort: ['Dom','Lun','Mar','M&eacute;r','Xov','Ven','S&aacute;b'],
+ dayNamesMin: ['Do','Lu','Ma','M&eacute;','Xo','Ve','S&aacute;'],
+ weekHeader: 'Sm',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['gl']);
+}); \ No newline at end of file
diff --git a/ui/i18n/jquery.ui.datepicker-kz.js b/ui/i18n/jquery.ui.datepicker-kz.js
new file mode 100644
index 000000000..f1f897b00
--- /dev/null
+++ b/ui/i18n/jquery.ui.datepicker-kz.js
@@ -0,0 +1,23 @@
+/* Kazakh (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Dmitriy Karasyov (dmitriy.karasyov@gmail.com). */
+jQuery(function($){
+ $.datepicker.regional['kz'] = {
+ closeText: 'Жабу',
+ prevText: '&#x3c;Алдыңғы',
+ nextText: 'Келесі&#x3e;',
+ currentText: 'Бүгін',
+ monthNames: ['Қаңтар','Ақпан','Наурыз','Сәуір','Мамыр','Маусым',
+ 'Шілде','Тамыз','Қыркүйек','Қазан','Қараша','Желтоқсан'],
+ monthNamesShort: ['Қаң','Ақп','Нау','Сәу','Мам','Мау',
+ 'Шіл','Там','Қыр','Қаз','Қар','Жел'],
+ dayNames: ['Жексенбі','Дүйсенбі','Сейсенбі','Сәрсенбі','Бейсенбі','Жұма','Сенбі'],
+ dayNamesShort: ['жкс','дсн','ссн','срс','бсн','жма','снб'],
+ dayNamesMin: ['Жк','Дс','Сс','Ср','Бс','Жм','Сн'],
+ weekHeader: 'Не',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['kz']);
+});
diff --git a/ui/i18n/jquery.ui.datepicker-no.js b/ui/i18n/jquery.ui.datepicker-no.js
index 12b2356bf..6b3a498be 100644
--- a/ui/i18n/jquery.ui.datepicker-no.js
+++ b/ui/i18n/jquery.ui.datepicker-no.js
@@ -14,8 +14,8 @@ jQuery(function($){
dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'],
dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'],
weekHeader: 'Uke',
- dateFormat: 'yy-mm-dd',
- firstDay: 0,
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
isRTL: false,
showMonthAfterYear: false,
yearSuffix: ''};
diff --git a/ui/i18n/jquery.ui.datepicker-pl.js b/ui/i18n/jquery.ui.datepicker-pl.js
index d315bf523..61fa29ccd 100644
--- a/ui/i18n/jquery.ui.datepicker-pl.js
+++ b/ui/i18n/jquery.ui.datepicker-pl.js
@@ -14,7 +14,7 @@ jQuery(function($){
dayNamesShort: ['Nie','Pn','Wt','Śr','Czw','Pt','So'],
dayNamesMin: ['N','Pn','Wt','Śr','Cz','Pt','So'],
weekHeader: 'Tydz',
- dateFormat: 'yy-mm-dd',
+ dateFormat: 'dd.mm.yy',
firstDay: 1,
isRTL: false,
showMonthAfterYear: false,
diff --git a/ui/i18n/jquery.ui.datepicker-pt-BR.js b/ui/i18n/jquery.ui.datepicker-pt-BR.js
index 38818637d..3cc8c796c 100644
--- a/ui/i18n/jquery.ui.datepicker-pt-BR.js
+++ b/ui/i18n/jquery.ui.datepicker-pt-BR.js
@@ -10,9 +10,9 @@ jQuery(function($){
'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
'Jul','Ago','Set','Out','Nov','Dez'],
- dayNames: ['Domingo','Segunda-feira','Ter&ccedil;a-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sabado'],
- dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sab'],
- dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sab'],
+ dayNames: ['Domingo','Segunda-feira','Ter&ccedil;a-feira','Quarta-feira','Quinta-feira','Sexta-feira','S&aacute;bado'],
+ dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','S&aacute;b'],
+ dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','S&aacute;b'],
weekHeader: 'Sm',
dateFormat: 'dd/mm/yy',
firstDay: 0,
diff --git a/ui/i18n/jquery.ui.datepicker-pt.js b/ui/i18n/jquery.ui.datepicker-pt.js
new file mode 100644
index 000000000..f09f5aeb0
--- /dev/null
+++ b/ui/i18n/jquery.ui.datepicker-pt.js
@@ -0,0 +1,22 @@
+/* Portuguese initialisation for the jQuery UI date picker plugin. */
+jQuery(function($){
+ $.datepicker.regional['pt'] = {
+ closeText: 'Fechar',
+ prevText: '&#x3c;Anterior',
+ nextText: 'Seguinte',
+ currentText: 'Hoje',
+ monthNames: ['Janeiro','Fevereiro','Mar&ccedil;o','Abril','Maio','Junho',
+ 'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
+ monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
+ 'Jul','Ago','Set','Out','Nov','Dez'],
+ dayNames: ['Domingo','Segunda-feira','Ter&ccedil;a-feira','Quarta-feira','Quinta-feira','Sexta-feira','S&aacute;bado'],
+ dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','S&aacute;b'],
+ dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','S&aacute;b'],
+ weekHeader: 'Sem',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['pt']);
+}); \ No newline at end of file
diff --git a/ui/i18n/jquery.ui.datepicker-rm.js b/ui/i18n/jquery.ui.datepicker-rm.js
new file mode 100644
index 000000000..cf03cd4c1
--- /dev/null
+++ b/ui/i18n/jquery.ui.datepicker-rm.js
@@ -0,0 +1,21 @@
+/* Romansh initialisation for the jQuery UI date picker plugin. */
+/* Written by Yvonne Gienal (yvonne.gienal@educa.ch). */
+jQuery(function($){
+ $.datepicker.regional['rm'] = {
+ closeText: 'Serrar',
+ prevText: '&#x3c;Suandant',
+ nextText: 'Precedent&#x3e;',
+ currentText: 'Actual',
+ monthNames: ['Schaner','Favrer','Mars','Avrigl','Matg','Zercladur', 'Fanadur','Avust','Settember','October','November','December'],
+ monthNamesShort: ['Scha','Fev','Mar','Avr','Matg','Zer', 'Fan','Avu','Sett','Oct','Nov','Dec'],
+ dayNames: ['Dumengia','Glindesdi','Mardi','Mesemna','Gievgia','Venderdi','Sonda'],
+ dayNamesShort: ['Dum','Gli','Mar','Mes','Gie','Ven','Som'],
+ dayNamesMin: ['Du','Gl','Ma','Me','Gi','Ve','So'],
+ weekHeader: 'emna',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['rm']);
+});
diff --git a/ui/i18n/jquery.ui.datepicker-ru.js b/ui/i18n/jquery.ui.datepicker-ru.js
index b8091f9ec..50a461352 100644
--- a/ui/i18n/jquery.ui.datepicker-ru.js
+++ b/ui/i18n/jquery.ui.datepicker-ru.js
@@ -13,7 +13,7 @@ jQuery(function($){
dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'],
dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'],
dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'],
- weekHeader: 'Не',
+ weekHeader: 'Нед',
dateFormat: 'dd.mm.yy',
firstDay: 1,
isRTL: false,
diff --git a/ui/i18n/jquery.ui.datepicker-sk.js b/ui/i18n/jquery.ui.datepicker-sk.js
index e8e73e671..8a6771c1e 100644
--- a/ui/i18n/jquery.ui.datepicker-sk.js
+++ b/ui/i18n/jquery.ui.datepicker-sk.js
@@ -15,7 +15,7 @@ jQuery(function($){
dayNamesMin: ['Ne','Po','Ut','St','Št','Pia','So'],
weekHeader: 'Ty',
dateFormat: 'dd.mm.yy',
- firstDay: 0,
+ firstDay: 1,
isRTL: false,
showMonthAfterYear: false,
yearSuffix: ''};
diff --git a/ui/i18n/jquery.ui.datepicker-th.js b/ui/i18n/jquery.ui.datepicker-th.js
index 978500ab1..c090c6b81 100644
--- a/ui/i18n/jquery.ui.datepicker-th.js
+++ b/ui/i18n/jquery.ui.datepicker-th.js
@@ -7,7 +7,7 @@ jQuery(function($){
nextText: 'ถัดไป&nbsp;&raquo;',
currentText: 'วันนี้',
monthNames: ['มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน',
- 'กรกฏาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม'],
+ 'กรกฎาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม'],
monthNamesShort: ['ม.ค.','ก.พ.','มี.ค.','เม.ย.','พ.ค.','มิ.ย.',
'ก.ค.','ส.ค.','ก.ย.','ต.ค.','พ.ย.','ธ.ค.'],
dayNames: ['อาทิตย์','จันทร์','อังคาร','พุธ','พฤหัสบดี','ศุกร์','เสาร์'],
diff --git a/ui/jquery.effects.blind.js b/ui/jquery.effects.blind.js
index c510e6ef3..44f398a55 100644
--- a/ui/jquery.effects.blind.js
+++ b/ui/jquery.effects.blind.js
@@ -1,23 +1,23 @@
/*
* jQuery UI Effects Blind @VERSION
*
- * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
*
* http://docs.jquery.com/UI/Effects/Blind
*
* Depends:
* jquery.effects.core.js
*/
-(function($) {
+(function( $, undefined ) {
$.effects.blind = function(o) {
return this.queue(function() {
// Create element
- var el = $(this), props = ['position','top','left'];
+ var el = $(this), props = ['position','top','bottom','left','right'];
// Set options
var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
diff --git a/ui/jquery.effects.bounce.js b/ui/jquery.effects.bounce.js
index 1cfc00643..ec4a77ec4 100644
--- a/ui/jquery.effects.bounce.js
+++ b/ui/jquery.effects.bounce.js
@@ -1,23 +1,23 @@
/*
* jQuery UI Effects Bounce @VERSION
*
- * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
*
* http://docs.jquery.com/UI/Effects/Bounce
*
* Depends:
* jquery.effects.core.js
*/
-(function($) {
+(function( $, undefined ) {
$.effects.bounce = function(o) {
return this.queue(function() {
// Create element
- var el = $(this), props = ['position','top','left'];
+ var el = $(this), props = ['position','top','bottom','left','right'];
// Set options
var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
diff --git a/ui/jquery.effects.clip.js b/ui/jquery.effects.clip.js
index 2ad7622fc..9fa8df94a 100644
--- a/ui/jquery.effects.clip.js
+++ b/ui/jquery.effects.clip.js
@@ -1,23 +1,23 @@
/*
* jQuery UI Effects Clip @VERSION
*
- * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
*
* http://docs.jquery.com/UI/Effects/Clip
*
* Depends:
* jquery.effects.core.js
*/
-(function($) {
+(function( $, undefined ) {
$.effects.clip = function(o) {
return this.queue(function() {
// Create element
- var el = $(this), props = ['position','top','left','height','width'];
+ var el = $(this), props = ['position','top','bottom','left','right','height','width'];
// Set options
var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
diff --git a/ui/jquery.effects.core.js b/ui/jquery.effects.core.js
index ed7eb099e..bb88dcf19 100644
--- a/ui/jquery.effects.core.js
+++ b/ui/jquery.effects.core.js
@@ -1,13 +1,13 @@
/*
* jQuery UI Effects @VERSION
*
- * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
*
* http://docs.jquery.com/UI/Effects/
*/
-;jQuery.effects || (function($) {
+;jQuery.effects || (function($, undefined) {
$.effects = {};
@@ -19,7 +19,7 @@ $.effects = {};
// override the animation for color styles
$.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor',
- 'borderRightColor', 'borderTopColor', 'color', 'outlineColor'],
+ 'borderRightColor', 'borderTopColor', 'borderColor', 'color', 'outlineColor'],
function(i, attr) {
$.fx.step[attr] = function(fx) {
if (!fx.colorInit) {
@@ -231,8 +231,7 @@ $.effects.animateClass = function(value, duration, easing, callback) {
easing = null;
}
- return this.each(function() {
-
+ return this.queue('fx', function() {
var that = $(this),
originalStyleAttr = that.attr('style') || ' ',
originalStyle = filterStyles(getElementStyles.call(this)),
@@ -260,6 +259,13 @@ $.effects.animateClass = function(value, duration, easing, callback) {
}
if (callback) { callback.apply(this, arguments); }
});
+
+ // $.animate adds a function to the end of the queue
+ // but we want it at the front
+ var queue = $.queue(this),
+ anim = queue.splice(queue.length - 1, 1)[0];
+ queue.splice(1, 0, anim);
+ $.dequeue(this);
});
};
@@ -382,7 +388,7 @@ $.extend($.effects, {
props[pos] = 'auto';
}
});
- element.css({position: 'relative', top: 0, left: 0 });
+ element.css({position: 'relative', top: 0, left: 0, right: 'auto', bottom: 'auto' });
}
return wrapper.css(props).show();
@@ -418,44 +424,72 @@ function _normalizeArguments(effect, options, speed, callback) {
speed = null;
options = {};
}
- if ($.isFunction(speed)) {
- callback = speed;
- speed = null;
- }
- if (typeof options == 'number' || $.fx.speeds[options]) {
+ if (typeof options == 'number' || $.fx.speeds[options]) {
callback = speed;
speed = options;
options = {};
}
+ if ($.isFunction(speed)) {
+ callback = speed;
+ speed = null;
+ }
options = options || {};
speed = speed || options.duration;
speed = $.fx.off ? 0 : typeof speed == 'number'
- ? speed : $.fx.speeds[speed] || $.fx.speeds._default;
+ ? speed : speed in $.fx.speeds ? $.fx.speeds[speed] : $.fx.speeds._default;
callback = callback || options.complete;
return [effect, options, speed, callback];
}
+function standardSpeed( speed ) {
+ // valid standard speeds
+ if ( !speed || typeof speed === "number" || $.fx.speeds[ speed ] ) {
+ return true;
+ }
+
+ // invalid strings - treat as "normal" speed
+ if ( typeof speed === "string" && !$.effects[ speed ] ) {
+ return true;
+ }
+
+ return false;
+}
+
$.fn.extend({
effect: function(effect, options, speed, callback) {
var args = _normalizeArguments.apply(this, arguments),
- // TODO: make effects takes actual parameters instead of a hash
+ // TODO: make effects take actual parameters instead of a hash
args2 = {
options: args[1],
duration: args[2],
callback: args[3]
},
+ mode = args2.options.mode,
effectMethod = $.effects[effect];
- return effectMethod && !$.fx.off ? effectMethod.call(this, args2) : this;
+ if ( $.fx.off || !effectMethod ) {
+ // delegate to the original method (e.g., .show()) if possible
+ if ( mode ) {
+ return this[ mode ]( args2.duration, args2.callback );
+ } else {
+ return this.each(function() {
+ if ( args2.callback ) {
+ args2.callback.call( this );
+ }
+ });
+ }
+ }
+
+ return effectMethod.call(this, args2);
},
_show: $.fn.show,
show: function(speed) {
- if (!speed || typeof speed == 'number' || $.fx.speeds[speed]) {
+ if ( standardSpeed( speed ) ) {
return this._show.apply(this, arguments);
} else {
var args = _normalizeArguments.apply(this, arguments);
@@ -466,7 +500,7 @@ $.fn.extend({
_hide: $.fn.hide,
hide: function(speed) {
- if (!speed || typeof speed == 'number' || $.fx.speeds[speed]) {
+ if ( standardSpeed( speed ) ) {
return this._hide.apply(this, arguments);
} else {
var args = _normalizeArguments.apply(this, arguments);
@@ -475,11 +509,10 @@ $.fn.extend({
}
},
- // jQuery core overloads toggle and create _toggle
+ // jQuery core overloads toggle and creates _toggle
__toggle: $.fn.toggle,
toggle: function(speed) {
- if (!speed || typeof speed == 'number' || $.fx.speeds[speed] ||
- typeof speed == 'boolean' || $.isFunction(speed)) {
+ if ( standardSpeed( speed ) || typeof speed === "boolean" || $.isFunction( speed ) ) {
return this.__toggle.apply(this, arguments);
} else {
var args = _normalizeArguments.apply(this, arguments);
diff --git a/ui/jquery.effects.drop.js b/ui/jquery.effects.drop.js
index 6a637e49a..941508b2e 100644
--- a/ui/jquery.effects.drop.js
+++ b/ui/jquery.effects.drop.js
@@ -1,23 +1,23 @@
/*
* jQuery UI Effects Drop @VERSION
*
- * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
*
* http://docs.jquery.com/UI/Effects/Drop
*
* Depends:
* jquery.effects.core.js
*/
-(function($) {
+(function( $, undefined ) {
$.effects.drop = function(o) {
return this.queue(function() {
// Create element
- var el = $(this), props = ['position','top','left','opacity'];
+ var el = $(this), props = ['position','top','bottom','left','right','opacity'];
// Set options
var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
diff --git a/ui/jquery.effects.explode.js b/ui/jquery.effects.explode.js
index 8f4f413bf..05d9bcd39 100644
--- a/ui/jquery.effects.explode.js
+++ b/ui/jquery.effects.explode.js
@@ -1,16 +1,16 @@
/*
* jQuery UI Effects Explode @VERSION
*
- * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
*
* http://docs.jquery.com/UI/Effects/Explode
*
* Depends:
* jquery.effects.core.js
*/
-(function($) {
+(function( $, undefined ) {
$.effects.explode = function(o) {
diff --git a/ui/jquery.effects.fade.js b/ui/jquery.effects.fade.js
index c42a9f565..40483ee0c 100644
--- a/ui/jquery.effects.fade.js
+++ b/ui/jquery.effects.fade.js
@@ -1,16 +1,16 @@
/*
* jQuery UI Effects Fade @VERSION
*
- * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
*
* http://docs.jquery.com/UI/Effects/Fade
*
* Depends:
* jquery.effects.core.js
*/
-(function($) {
+(function( $, undefined ) {
$.effects.fade = function(o) {
return this.queue(function() {
diff --git a/ui/jquery.effects.fold.js b/ui/jquery.effects.fold.js
index 1098ee420..f19ae1bf2 100644
--- a/ui/jquery.effects.fold.js
+++ b/ui/jquery.effects.fold.js
@@ -1,23 +1,23 @@
/*
* jQuery UI Effects Fold @VERSION
*
- * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
*
* http://docs.jquery.com/UI/Effects/Fold
*
* Depends:
* jquery.effects.core.js
*/
-(function($) {
+(function( $, undefined ) {
$.effects.fold = function(o) {
return this.queue(function() {
// Create element
- var el = $(this), props = ['position','top','left'];
+ var el = $(this), props = ['position','top','bottom','left','right'];
// Set options
var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
diff --git a/ui/jquery.effects.highlight.js b/ui/jquery.effects.highlight.js
index 4719abed9..bd6d21b25 100644
--- a/ui/jquery.effects.highlight.js
+++ b/ui/jquery.effects.highlight.js
@@ -1,16 +1,16 @@
/*
* jQuery UI Effects Highlight @VERSION
*
- * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
*
* http://docs.jquery.com/UI/Effects/Highlight
*
* Depends:
* jquery.effects.core.js
*/
-(function($) {
+(function( $, undefined ) {
$.effects.highlight = function(o) {
return this.queue(function() {
diff --git a/ui/jquery.effects.pulsate.js b/ui/jquery.effects.pulsate.js
index ca1af19fd..4d325c4e1 100644
--- a/ui/jquery.effects.pulsate.js
+++ b/ui/jquery.effects.pulsate.js
@@ -1,16 +1,16 @@
/*
* jQuery UI Effects Pulsate @VERSION
*
- * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
*
* http://docs.jquery.com/UI/Effects/Pulsate
*
* Depends:
* jquery.effects.core.js
*/
-(function($) {
+(function( $, undefined ) {
$.effects.pulsate = function(o) {
return this.queue(function() {
diff --git a/ui/jquery.effects.scale.js b/ui/jquery.effects.scale.js
index ee430e7b8..d980882db 100644
--- a/ui/jquery.effects.scale.js
+++ b/ui/jquery.effects.scale.js
@@ -1,16 +1,16 @@
/*
* jQuery UI Effects Scale @VERSION
*
- * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
*
* http://docs.jquery.com/UI/Effects/Scale
*
* Depends:
* jquery.effects.core.js
*/
-(function($) {
+(function( $, undefined ) {
$.effects.puff = function(o) {
return this.queue(function() {
@@ -84,8 +84,8 @@ $.effects.size = function(o) {
return this.queue(function() {
// Create element
- var el = $(this), props = ['position','top','left','width','height','overflow','opacity'];
- var props1 = ['position','top','left','overflow','opacity']; // Always restore
+ var el = $(this), props = ['position','top','bottom','left','right','width','height','overflow','opacity'];
+ var props1 = ['position','top','bottom','left','right','overflow','opacity']; // Always restore
var props2 = ['width','height','overflow']; // Copy for children
var cProps = ['fontSize'];
var vProps = ['borderTopWidth', 'borderBottomWidth', 'paddingTop', 'paddingBottom'];
diff --git a/ui/jquery.effects.shake.js b/ui/jquery.effects.shake.js
index dd3e1cb61..b94e5a5ab 100644
--- a/ui/jquery.effects.shake.js
+++ b/ui/jquery.effects.shake.js
@@ -1,23 +1,23 @@
/*
* jQuery UI Effects Shake @VERSION
*
- * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
*
* http://docs.jquery.com/UI/Effects/Shake
*
* Depends:
* jquery.effects.core.js
*/
-(function($) {
+(function( $, undefined ) {
$.effects.shake = function(o) {
return this.queue(function() {
// Create element
- var el = $(this), props = ['position','top','left'];
+ var el = $(this), props = ['position','top','bottom','left','right'];
// Set options
var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
diff --git a/ui/jquery.effects.slide.js b/ui/jquery.effects.slide.js
index d84447d13..59f6dc578 100644
--- a/ui/jquery.effects.slide.js
+++ b/ui/jquery.effects.slide.js
@@ -1,23 +1,23 @@
/*
* jQuery UI Effects Slide @VERSION
*
- * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
*
* http://docs.jquery.com/UI/Effects/Slide
*
* Depends:
* jquery.effects.core.js
*/
-(function($) {
+(function( $, undefined ) {
$.effects.slide = function(o) {
return this.queue(function() {
// Create element
- var el = $(this), props = ['position','top','left'];
+ var el = $(this), props = ['position','top','bottom','left','right'];
// Set options
var mode = $.effects.setMode(el, o.options.mode || 'show'); // Set Mode
@@ -29,7 +29,7 @@ $.effects.slide = function(o) {
var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';
var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';
var distance = o.options.distance || (ref == 'top' ? el.outerHeight({margin:true}) : el.outerWidth({margin:true}));
- if (mode == 'show') el.css(ref, motion == 'pos' ? -distance : distance); // Shift
+ if (mode == 'show') el.css(ref, motion == 'pos' ? (isNaN(distance) ? "-" + distance : -distance) : distance); // Shift
// Animation
var animation = {};
diff --git a/ui/jquery.effects.transfer.js b/ui/jquery.effects.transfer.js
index f597d4b43..2741e9d4b 100644
--- a/ui/jquery.effects.transfer.js
+++ b/ui/jquery.effects.transfer.js
@@ -1,16 +1,16 @@
/*
* jQuery UI Effects Transfer @VERSION
*
- * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
*
* http://docs.jquery.com/UI/Effects/Transfer
*
* Depends:
* jquery.effects.core.js
*/
-(function($) {
+(function( $, undefined ) {
$.effects.transfer = function(o) {
return this.queue(function() {
diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js
index 0ac478b73..955030ccc 100644
--- a/ui/jquery.ui.accordion.js
+++ b/ui/jquery.ui.accordion.js
@@ -1,9 +1,9 @@
/*
* jQuery UI Accordion @VERSION
*
- * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
*
* http://docs.jquery.com/UI/Accordion
*
@@ -11,342 +11,401 @@
* jquery.ui.core.js
* jquery.ui.widget.js
*/
-(function($) {
+(function( $, undefined ) {
-$.widget("ui.accordion", {
+$.widget( "ui.accordion", {
options: {
active: 0,
- animated: 'slide',
- autoHeight: true,
- clearStyle: false,
+ animated: "slide",
collapsible: false,
event: "click",
- fillSpace: false,
header: "> li > :first-child,> :not(li):even",
+ // TODO: set to "auto" in 2.0 (#5868, #5872)
+ heightStyle: null, // "auto"
icons: {
header: "ui-icon-triangle-1-e",
headerSelected: "ui-icon-triangle-1-s"
- },
- navigation: false,
- navigationFilter: function() {
- return this.href.toLowerCase() == location.href.toLowerCase();
}
},
- _create: function() {
-
- var o = this.options, self = this;
- this.running = 0;
-
- this.element.addClass("ui-accordion ui-widget ui-helper-reset");
-
- // in lack of child-selectors in CSS we need to mark top-LIs in a UL-accordion for some IE-fix
- if (this.element[0].nodeName == "UL") {
- this.element.children("li").addClass("ui-accordion-li-fix");
- }
-
- this.headers = this.element.find(o.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all")
- .bind("mouseenter.accordion", function(){ $(this).addClass('ui-state-hover'); })
- .bind("mouseleave.accordion", function(){ $(this).removeClass('ui-state-hover'); })
- .bind("focus.accordion", function(){ $(this).addClass('ui-state-focus'); })
- .bind("blur.accordion", function(){ $(this).removeClass('ui-state-focus'); });
- this.headers
- .next()
- .addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");
-
- if ( o.navigation ) {
- var current = this.element.find("a").filter(o.navigationFilter);
- if ( current.length ) {
- var header = current.closest(".ui-accordion-header");
- if ( header.length ) {
- // anchor within header
- this.active = header;
- } else {
- // anchor within content
- this.active = current.closest(".ui-accordion-content").prev();
+ _create: function() {
+ var self = this,
+ options = self.options;
+
+ self.running = 0;
+
+ self.element
+ .addClass( "ui-accordion ui-widget ui-helper-reset" )
+ // in lack of child-selectors in CSS
+ // we need to mark top-LIs in a UL-accordion for some IE-fix
+ .children( "li" )
+ .addClass( "ui-accordion-li-fix" );
+
+ self.headers = self.element.find( options.header )
+ .addClass( "ui-accordion-header ui-helper-reset ui-state-default ui-corner-all" )
+ .bind( "mouseenter.accordion", function() {
+ if ( options.disabled ) {
+ return;
}
- }
- }
-
- this.active = this._findActive(this.active || o.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");
- this.active.next().addClass('ui-accordion-content-active');
-
- //Append icon elements
- this._createIcons();
+ $( this ).addClass( "ui-state-hover" );
+ })
+ .bind( "mouseleave.accordion", function() {
+ if ( options.disabled ) {
+ return;
+ }
+ $( this ).removeClass( "ui-state-hover" );
+ })
+ .bind( "focus.accordion", function() {
+ if ( options.disabled ) {
+ return;
+ }
+ $( this ).addClass( "ui-state-focus" );
+ })
+ .bind( "blur.accordion", function() {
+ if ( options.disabled ) {
+ return;
+ }
+ $( this ).removeClass( "ui-state-focus" );
+ });
- this.resize();
+ self.headers.next()
+ .addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" );
+ self.headers.find( ":first-child" ).addClass( "ui-accordion-heading" );
- //ARIA
- this.element.attr('role','tablist');
+ self.active = self._findActive( self.active || options.active )
+ .addClass( "ui-state-default ui-state-active" )
+ .toggleClass( "ui-corner-all" )
+ .toggleClass( "ui-corner-top" );
+ self.active.next().addClass( "ui-accordion-content-active" );
- this.headers
- .attr('role','tab')
- .bind('keydown', function(event) { return self._keydown(event); })
+ self._createIcons();
+ self.resize();
+
+ // ARIA
+ self.element.attr( "role", "tablist" );
+
+ self.headers
+ .attr( "role", "tab" )
+ .bind( "keydown.accordion", function( event ) {
+ return self._keydown( event );
+ })
.next()
- .attr('role','tabpanel');
-
- this.headers
- .not(this.active || "")
- .attr('aria-expanded','false')
- .attr("tabIndex", "-1")
+ .attr( "role", "tabpanel" );
+
+ self.headers
+ .not( self.active || "" )
+ .attr({
+ "aria-expanded": "false",
+ tabIndex: -1
+ })
.next()
- .hide();
+ .hide();
// make sure at least one header is in the tab order
- if (!this.active.length) {
- this.headers.eq(0).attr('tabIndex','0');
+ if ( !self.active.length ) {
+ self.headers.eq( 0 ).attr( "tabIndex", 0 );
} else {
- this.active
- .attr('aria-expanded','true')
- .attr('tabIndex', '0');
+ self.active
+ .attr({
+ "aria-expanded": "true",
+ tabIndex: 0
+ });
}
- // only need links in taborder for Safari
- if (!$.browser.safari)
- this.headers.find('a').attr('tabIndex','-1');
+ // only need links in tab order for Safari
+ if ( !$.browser.safari ) {
+ self.headers.find( "a" ).attr( "tabIndex", -1 );
+ }
- if (o.event) {
- this.headers.bind((o.event) + ".accordion", function(event) {
- self._clickHandler.call(self, event, this);
+ if ( options.event ) {
+ self.headers.bind( options.event.split(" ").join(".accordion ") + ".accordion", function(event) {
+ self._clickHandler.call( self, event, this );
event.preventDefault();
});
}
-
},
-
+
_createIcons: function() {
- var o = this.options;
- if (o.icons) {
- $("<span/>").addClass("ui-icon " + o.icons.header).prependTo(this.headers);
- this.active.find(".ui-icon").toggleClass(o.icons.header).toggleClass(o.icons.headerSelected);
- this.element.addClass("ui-accordion-icons");
+ var options = this.options;
+ if ( options.icons ) {
+ $( "<span></span>" )
+ .addClass( "ui-icon " + options.icons.header )
+ .prependTo( this.headers );
+ this.active.children( ".ui-icon" )
+ .toggleClass(options.icons.header)
+ .toggleClass(options.icons.headerSelected);
+ this.element.addClass( "ui-accordion-icons" );
}
},
-
+
_destroyIcons: function() {
- this.headers.children(".ui-icon").remove();
- this.element.removeClass("ui-accordion-icons");
+ this.headers.children( ".ui-icon" ).remove();
+ this.element.removeClass( "ui-accordion-icons" );
},
destroy: function() {
- var o = this.options;
+ var options = this.options;
this.element
- .removeClass("ui-accordion ui-widget ui-helper-reset")
- .removeAttr("role")
- .unbind('.accordion')
- .removeData('accordion');
+ .removeClass( "ui-accordion ui-widget ui-helper-reset" )
+ .removeAttr( "role" );
this.headers
- .unbind(".accordion")
- .removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top")
- .removeAttr("role").removeAttr("aria-expanded").removeAttr("tabIndex");
+ .unbind( ".accordion" )
+ .removeClass( "ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top" )
+ .removeAttr( "role" )
+ .removeAttr( "aria-expanded" )
+ .removeAttr( "tabIndex" );
- this.headers.find("a").removeAttr("tabIndex");
+ this.headers.find( "a" ).removeAttr( "tabIndex" );
this._destroyIcons();
- var contents = this.headers.next().css("display", "").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active");
- if (o.autoHeight || o.fillHeight) {
- contents.css("height", "");
+ this.headers.find( "a:first-child" ).removeClass( "ui-accordion-heading" );
+ var contents = this.headers.next()
+ .css( "display", "" )
+ .removeAttr( "role" )
+ .removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled" );
+ if ( options.heightStyle !== "content" ) {
+ contents.css( "height", "" );
}
- return this;
+ return $.Widget.prototype.destroy.call( this );
},
-
- _setOption: function(key, value) {
- $.Widget.prototype._setOption.apply(this, arguments);
-
- if (key == "active") {
- this.activate(value);
+
+ _setOption: function( key, value ) {
+ $.Widget.prototype._setOption.apply( this, arguments );
+
+ if ( key == "active" ) {
+ this.activate( value );
}
- if (key == "icons") {
+ if ( key == "icons" ) {
this._destroyIcons();
- if (value) {
+ if ( value ) {
this._createIcons();
}
}
-
+ // #5332 - opacity doesn't cascade to positioned elements in IE
+ // so we need to add the disabled class to the headers and panels
+ if ( key == "disabled" ) {
+ this.headers.add(this.headers.next())
+ .toggleClass( "ui-accordion-disabled ui-state-disabled", !!value );
+ }
},
- _keydown: function(event) {
-
- var o = this.options, keyCode = $.ui.keyCode;
-
- if (o.disabled || event.altKey || event.ctrlKey)
+ _keydown: function( event ) {
+ if ( this.options.disabled || event.altKey || event.ctrlKey ) {
return;
+ }
- var length = this.headers.length;
- var currentIndex = this.headers.index(event.target);
- var toFocus = false;
+ var keyCode = $.ui.keyCode,
+ length = this.headers.length,
+ currentIndex = this.headers.index( event.target ),
+ toFocus = false;
- switch(event.keyCode) {
+ switch ( event.keyCode ) {
case keyCode.RIGHT:
case keyCode.DOWN:
- toFocus = this.headers[(currentIndex + 1) % length];
+ toFocus = this.headers[ ( currentIndex + 1 ) % length ];
break;
case keyCode.LEFT:
case keyCode.UP:
- toFocus = this.headers[(currentIndex - 1 + length) % length];
+ toFocus = this.headers[ ( currentIndex - 1 + length ) % length ];
break;
case keyCode.SPACE:
case keyCode.ENTER:
- this._clickHandler({ target: event.target }, event.target);
+ this._clickHandler( { target: event.target }, event.target );
event.preventDefault();
}
- if (toFocus) {
- $(event.target).attr('tabIndex','-1');
- $(toFocus).attr('tabIndex','0');
+ if ( toFocus ) {
+ $( event.target ).attr( "tabIndex", -1 );
+ $( toFocus ).attr( "tabIndex", 0 );
toFocus.focus();
return false;
}
return true;
-
},
resize: function() {
+ var options = this.options,
+ maxHeight;
- var o = this.options, maxHeight;
-
- if (o.fillSpace) {
-
- if($.browser.msie) { var defOverflow = this.element.parent().css('overflow'); this.element.parent().css('overflow', 'hidden'); }
+ if ( options.heightStyle === "fill" ) {
+ if ( $.browser.msie ) {
+ var defOverflow = this.element.parent().css( "overflow" );
+ this.element.parent().css( "overflow", "hidden");
+ }
maxHeight = this.element.parent().height();
- if($.browser.msie) { this.element.parent().css('overflow', defOverflow); }
-
- this.headers.each(function() {
- maxHeight -= $(this).outerHeight(true);
+ this.element.siblings( ":visible" ).each(function() {
+ var elem = $( this ),
+ position = elem.css( "position" );
+
+ if ( position === "absolute" || position === "fixed" ) {
+ return;
+ }
+ maxHeight -= elem.outerHeight( true );
});
+ if ($.browser.msie) {
+ this.element.parent().css( "overflow", defOverflow );
+ }
- this.headers.next().each(function() {
- $(this).height(Math.max(0, maxHeight - $(this).innerHeight() + $(this).height()));
- }).css('overflow', 'auto');
+ this.headers.each(function() {
+ maxHeight -= $( this ).outerHeight( true );
+ });
- } else if ( o.autoHeight ) {
+ this.headers.next()
+ .each(function() {
+ $( this ).height( Math.max( 0, maxHeight -
+ $( this ).innerHeight() + $( this ).height() ) );
+ })
+ .css( "overflow", "auto" );
+ } else if ( options.heightStyle === "auto" ) {
maxHeight = 0;
- this.headers.next().each(function() {
- maxHeight = Math.max(maxHeight, $(this).height());
- }).height(maxHeight);
+ this.headers.next()
+ .each(function() {
+ maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() );
+ })
+ .height( maxHeight );
}
return this;
},
- activate: function(index) {
+ activate: function( index ) {
// TODO this gets called on init, changing the option without an explicit call for that
this.options.active = index;
// call clickHandler with custom event
- var active = this._findActive(index)[0];
- this._clickHandler({ target: active }, active);
+ var active = this._findActive( index )[ 0 ];
+ this._clickHandler( { target: active }, active );
return this;
},
- _findActive: function(selector) {
+ _findActive: function( selector ) {
return selector
- ? typeof selector == "number"
- ? this.headers.filter(":eq(" + selector + ")")
- : this.headers.not(this.headers.not(selector))
+ ? typeof selector === "number"
+ ? this.headers.filter( ":eq(" + selector + ")" )
+ : this.headers.not( this.headers.not( selector ) )
: selector === false
- ? $([])
- : this.headers.filter(":eq(0)");
+ ? $( [] )
+ : this.headers.filter( ":eq(0)" );
},
- // TODO isn't event.target enough? why the seperate target argument?
- _clickHandler: function(event, target) {
-
- var o = this.options;
- if (o.disabled)
+ // TODO isn't event.target enough? why the separate target argument?
+ _clickHandler: function( event, target ) {
+ var options = this.options;
+ if ( options.disabled ) {
return;
+ }
// called only when using activate(false) to close all parts programmatically
- if (!event.target) {
- if (!o.collapsible)
+ if ( !event.target ) {
+ if ( !options.collapsible ) {
return;
- this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all")
- .find(".ui-icon").removeClass(o.icons.headerSelected).addClass(o.icons.header);
- this.active.next().addClass('ui-accordion-content-active');
+ }
+ this.active
+ .removeClass( "ui-state-active ui-corner-top" )
+ .addClass( "ui-state-default ui-corner-all" )
+ .children( ".ui-icon" )
+ .removeClass( options.icons.headerSelected )
+ .addClass( options.icons.header );
+ this.active.next().addClass( "ui-accordion-content-active" );
var toHide = this.active.next(),
data = {
- options: o,
- newHeader: $([]),
- oldHeader: o.active,
- newContent: $([]),
+ options: options,
+ newHeader: $( [] ),
+ oldHeader: options.active,
+ newContent: $( [] ),
oldContent: toHide
},
- toShow = (this.active = $([]));
- this._toggle(toShow, toHide, data);
+ toShow = ( this.active = $( [] ) );
+ this._toggle( toShow, toHide, data );
return;
}
// get the click target
- var clicked = $(event.currentTarget || target);
- var clickedIsActive = clicked[0] == this.active[0];
-
+ var clicked = $( event.currentTarget || target ),
+ clickedIsActive = clicked[0] === this.active[0];
+
// TODO the option is changed, is that correct?
// TODO if it is correct, shouldn't that happen after determining that the click is valid?
- o.active = o.collapsible && clickedIsActive ? false : $('.ui-accordion-header', this.element).index(clicked);
+ options.active = options.collapsible && clickedIsActive ?
+ false :
+ this.headers.index( clicked );
// if animations are still active, or the active header is the target, ignore click
- if (this.running || (!o.collapsible && clickedIsActive)) {
+ if ( this.running || ( !options.collapsible && clickedIsActive ) ) {
return;
}
// switch classes
- this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all")
- .find(".ui-icon").removeClass(o.icons.headerSelected).addClass(o.icons.header);
- if (!clickedIsActive) {
- clicked.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top")
- .find(".ui-icon").removeClass(o.icons.header).addClass(o.icons.headerSelected);
- clicked.next().addClass('ui-accordion-content-active');
+ this.active
+ .removeClass( "ui-state-active ui-corner-top" )
+ .addClass( "ui-state-default ui-corner-all" )
+ .children( ".ui-icon" )
+ .removeClass( options.icons.headerSelected )
+ .addClass( options.icons.header );
+ if ( !clickedIsActive ) {
+ clicked
+ .removeClass( "ui-state-default ui-corner-all" )
+ .addClass( "ui-state-active ui-corner-top" )
+ .children( ".ui-icon" )
+ .removeClass( options.icons.header )
+ .addClass( options.icons.headerSelected );
+ clicked
+ .next()
+ .addClass( "ui-accordion-content-active" );
}
// find elements to show and hide
var toShow = clicked.next(),
toHide = this.active.next(),
data = {
- options: o,
- newHeader: clickedIsActive && o.collapsible ? $([]) : clicked,
+ options: options,
+ newHeader: clickedIsActive && options.collapsible ? $([]) : clicked,
oldHeader: this.active,
- newContent: clickedIsActive && o.collapsible ? $([]) : toShow,
+ newContent: clickedIsActive && options.collapsible ? $([]) : toShow,
oldContent: toHide
},
down = this.headers.index( this.active[0] ) > this.headers.index( clicked[0] );
this.active = clickedIsActive ? $([]) : clicked;
- this._toggle(toShow, toHide, data, clickedIsActive, down);
+ this._toggle( toShow, toHide, data, clickedIsActive, down );
return;
-
},
- _toggle: function(toShow, toHide, data, clickedIsActive, down) {
+ _toggle: function( toShow, toHide, data, clickedIsActive, down ) {
+ var self = this,
+ options = self.options;
- var o = this.options, self = this;
+ self.toShow = toShow;
+ self.toHide = toHide;
+ self.data = data;
- this.toShow = toShow;
- this.toHide = toHide;
- this.data = data;
-
- var complete = function() { if(!self) return; return self._completed.apply(self, arguments); };
+ var complete = function() {
+ if ( !self ) {
+ return;
+ }
+ return self._completed.apply( self, arguments );
+ };
// trigger changestart event
- this._trigger("changestart", null, this.data);
+ self._trigger( "changestart", null, self.data );
// count elements to animate
- this.running = toHide.size() === 0 ? toShow.size() : toHide.size();
-
- if (o.animated) {
+ self.running = toHide.size() === 0 ? toShow.size() : toHide.size();
+ if ( options.animated ) {
var animOptions = {};
- if ( o.collapsible && clickedIsActive ) {
+ if ( options.collapsible && clickedIsActive ) {
animOptions = {
- toShow: $([]),
+ toShow: $( [] ),
toHide: toHide,
complete: complete,
down: down,
- autoHeight: o.autoHeight || o.fillSpace
+ autoHeight: options.heightStyle !== "content"
};
} else {
animOptions = {
@@ -354,101 +413,114 @@ $.widget("ui.accordion", {
toHide: toHide,
complete: complete,
down: down,
- autoHeight: o.autoHeight || o.fillSpace
+ autoHeight: options.heightStyle !== "content"
};
}
- if (!o.proxied) {
- o.proxied = o.animated;
+ if ( !options.proxied ) {
+ options.proxied = options.animated;
}
- if (!o.proxiedDuration) {
- o.proxiedDuration = o.duration;
+ if ( !options.proxiedDuration ) {
+ options.proxiedDuration = options.duration;
}
- o.animated = $.isFunction(o.proxied) ?
- o.proxied(animOptions) : o.proxied;
+ options.animated = $.isFunction( options.proxied ) ?
+ options.proxied( animOptions ) :
+ options.proxied;
- o.duration = $.isFunction(o.proxiedDuration) ?
- o.proxiedDuration(animOptions) : o.proxiedDuration;
+ options.duration = $.isFunction( options.proxiedDuration ) ?
+ options.proxiedDuration( animOptions ) :
+ options.proxiedDuration;
var animations = $.ui.accordion.animations,
- duration = o.duration,
- easing = o.animated;
+ duration = options.duration,
+ easing = options.animated;
- if (easing && !animations[easing] && !$.easing[easing]) {
- easing = 'slide';
+ if ( easing && !animations[ easing ] && !$.easing[ easing ] ) {
+ easing = "slide";
}
- if (!animations[easing]) {
- animations[easing] = function(options) {
- this.slide(options, {
+ if ( !animations[ easing ] ) {
+ animations[ easing ] = function( options ) {
+ this.slide( options, {
easing: easing,
duration: duration || 700
});
};
}
- animations[easing](animOptions);
-
+ animations[ easing ]( animOptions );
} else {
-
- if (o.collapsible && clickedIsActive) {
+ if ( options.collapsible && clickedIsActive ) {
toShow.toggle();
} else {
toHide.hide();
toShow.show();
}
- complete(true);
-
+ complete( true );
}
// TODO assert that the blur and focus triggers are really necessary, remove otherwise
- toHide.prev().attr('aria-expanded','false').attr("tabIndex", "-1").blur();
- toShow.prev().attr('aria-expanded','true').attr("tabIndex", "0").focus();
-
+ toHide.prev()
+ .attr({
+ "aria-expanded": "false",
+ tabIndex: -1
+ })
+ .blur();
+ toShow.prev()
+ .attr({
+ "aria-expanded": "true",
+ tabIndex: 0
+ })
+ .focus();
},
- _completed: function(cancel) {
-
- var o = this.options;
-
+ _completed: function( cancel ) {
this.running = cancel ? 0 : --this.running;
- if (this.running) return;
+ if ( this.running ) {
+ return;
+ }
- if (o.clearStyle) {
- this.toShow.add(this.toHide).css({
+ if ( this.options.heightStyle === "content" ) {
+ this.toShow.add( this.toHide ).css({
height: "",
overflow: ""
});
}
-
+
// other classes are removed before the animation; this one needs to stay until completed
- this.toHide.removeClass("ui-accordion-content-active");
+ this.toHide.removeClass( "ui-accordion-content-active" );
- this._trigger('change', null, this.data);
+ this._trigger( "change", null, this.data );
}
-
});
-
-$.extend($.ui.accordion, {
+$.extend( $.ui.accordion, {
version: "@VERSION",
animations: {
- slide: function(options, additions) {
+ slide: function( options, additions ) {
options = $.extend({
easing: "swing",
duration: 300
- }, options, additions);
+ }, options, additions );
if ( !options.toHide.size() ) {
- options.toShow.animate({height: "show"}, options);
+ options.toShow.animate({
+ height: "show",
+ paddingTop: "show",
+ paddingBottom: "show"
+ }, options );
return;
}
if ( !options.toShow.size() ) {
- options.toHide.animate({height: "hide"}, options);
+ options.toHide.animate({
+ height: "hide",
+ paddingTop: "hide",
+ paddingBottom: "hide"
+ }, options );
return;
}
- var overflow = options.toShow.css('overflow'),
+ var overflow = options.toShow.css( "overflow" ),
percentDone = 0,
showProps = {},
hideProps = {},
@@ -457,45 +529,57 @@ $.extend($.ui.accordion, {
// fix width before calculating height of hidden element
var s = options.toShow;
originalWidth = s[0].style.width;
- s.width( parseInt(s.parent().width(),10) - parseInt(s.css("paddingLeft"),10) - parseInt(s.css("paddingRight"),10) - (parseInt(s.css("borderLeftWidth"),10) || 0) - (parseInt(s.css("borderRightWidth"),10) || 0) );
-
- $.each(fxAttrs, function(i, prop) {
- hideProps[prop] = 'hide';
-
- var parts = ('' + $.css(options.toShow[0], prop)).match(/^([\d+-.]+)(.*)$/);
- showProps[prop] = {
- value: parts[1],
- unit: parts[2] || 'px'
+ s.width( parseInt( s.parent().width(), 10 )
+ - parseInt( s.css( "paddingLeft" ), 10 )
+ - parseInt( s.css( "paddingRight" ), 10 )
+ - ( parseInt( s.css( "borderLeftWidth" ), 10 ) || 0 )
+ - ( parseInt( s.css( "borderRightWidth" ), 10) || 0 ) );
+
+ $.each( fxAttrs, function( i, prop ) {
+ hideProps[ prop ] = "hide";
+
+ var parts = ( "" + $.css( options.toShow[0], prop ) ).match( /^([\d+-.]+)(.*)$/ );
+ showProps[ prop ] = {
+ value: parts[ 1 ],
+ unit: parts[ 2 ] || "px"
};
});
- options.toShow.css({ height: 0, overflow: 'hidden' }).show();
- options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate(hideProps,{
- step: function(now, settings) {
+ options.toShow.css({ height: 0, overflow: "hidden" }).show();
+ options.toHide
+ .filter( ":hidden" )
+ .each( options.complete )
+ .end()
+ .filter( ":visible" )
+ .animate( hideProps, {
+ step: function( now, settings ) {
// only calculate the percent when animating height
// IE gets very inconsistent results when animating elements
// with small values, which is common for padding
- if (settings.prop == 'height') {
+ if ( settings.prop == "height" ) {
percentDone = ( settings.end - settings.start === 0 ) ? 0 :
- (settings.now - settings.start) / (settings.end - settings.start);
+ ( settings.now - settings.start ) / ( settings.end - settings.start );
}
-
- options.toShow[0].style[settings.prop] =
- (percentDone * showProps[settings.prop].value) + showProps[settings.prop].unit;
+
+ options.toShow[ 0 ].style[ settings.prop ] =
+ ( percentDone * showProps[ settings.prop ].value )
+ + showProps[ settings.prop ].unit;
},
duration: options.duration,
easing: options.easing,
complete: function() {
if ( !options.autoHeight ) {
- options.toShow.css("height", "");
+ options.toShow.css( "height", "" );
}
- options.toShow.css("width", originalWidth);
- options.toShow.css({overflow: overflow});
+ options.toShow.css({
+ width: originalWidth,
+ overflow: overflow
+ });
options.complete();
}
});
},
- bounceslide: function(options) {
- this.slide(options, {
+ bounceslide: function( options ) {
+ this.slide( options, {
easing: options.down ? "easeOutBounce" : "swing",
duration: options.down ? 1000 : 200
});
@@ -503,4 +587,82 @@ $.extend($.ui.accordion, {
}
});
-})(jQuery);
+
+
+// DEPRECATED
+
+// navigation options
+(function( $, prototype ) {
+ $.extend( prototype.options, {
+ navigation: false,
+ navigationFilter: function() {
+ return this.href.toLowerCase() === location.href.toLowerCase();
+ }
+ });
+
+ var _create = prototype._create;
+ prototype._create = function() {
+ if ( this.options.navigation ) {
+ var self = this,
+ headers = this.element.find( this.options.header ),
+ content = headers.next();
+ current = headers.add( content )
+ .find( "a" )
+ .filter( this.options.navigationFilter )
+ [ 0 ];
+ if ( current ) {
+ headers.add( content ).each( function( index ) {
+ if ( $.contains( this, current ) ) {
+ self.options.active = Math.floor( index / 2 );
+ return false;
+ }
+ });
+ }
+ }
+ _create.call( this );
+ };
+}( jQuery, jQuery.ui.accordion.prototype ) );
+
+(function( $, prototype ) {
+ $.extend( prototype.options, {
+ autoHeight: true, // use heightStyle: "auto"
+ clearStyle: false, // use heightStyle: "content"
+ fillSpace: false // use heightStyle: "fill"
+ });
+
+ var _create = prototype._create,
+ _setOption = prototype._setOption;
+
+ $.extend( prototype, {
+ _create: function() {
+ this.options.heightStyle = this.options.heightStyle ||
+ this._mergeHeightStyle();
+ _create.call( this );
+ },
+
+ _setOption: function( key, value ) {
+ if ( key === "autoHeight" || key === "clearStyle" || key === "fillSpace" ) {
+ this.options.heightStyle = this._mergeHeightStyle();
+ }
+ _setOption.apply( this, arguments );
+ },
+
+ _mergeHeightStyle: function() {
+ var options = this.options;
+
+ if ( options.fillSpace ) {
+ return "fill";
+ }
+
+ if ( options.clearStyle ) {
+ return "content";
+ }
+
+ if ( options.autoHeight ) {
+ return "auto";
+ }
+ }
+ });
+}( jQuery, jQuery.ui.accordion.prototype ) );
+
+})( jQuery );
diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js
index bd55c1ed4..f48dc032a 100644
--- a/ui/jquery.ui.autocomplete.js
+++ b/ui/jquery.ui.autocomplete.js
@@ -1,9 +1,9 @@
/*
* jQuery UI Autocomplete @VERSION
*
- * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
*
* http://docs.jquery.com/UI/Autocomplete
*
@@ -13,16 +13,28 @@
* jquery.ui.position.js
* jquery.ui.menu.js
*/
-(function( $ ) {
+(function( $, undefined ) {
$.widget( "ui.autocomplete", {
options: {
+ appendTo: "body",
+ delay: 300,
minLength: 1,
- delay: 300
+ position: {
+ my: "left top",
+ at: "left bottom",
+ collision: "none"
+ },
+ source: null
},
+
+ pending: 0,
+
_create: function() {
var self = this,
- doc = this.element[ 0 ].ownerDocument;
+ doc = this.element[ 0 ].ownerDocument,
+ suppressKeyPress;
+
this.element
.addClass( "ui-autocomplete-input" )
.attr( "autocomplete", "off" )
@@ -33,6 +45,11 @@ $.widget( "ui.autocomplete", {
"aria-haspopup": "true"
})
.bind( "keydown.autocomplete", function( event ) {
+ if ( self.options.disabled || self.element.attr( "readonly" ) ) {
+ return;
+ }
+
+ suppressKeyPress = false;
var keyCode = $.ui.keyCode;
switch( event.keyCode ) {
case keyCode.PAGE_UP:
@@ -52,8 +69,12 @@ $.widget( "ui.autocomplete", {
event.preventDefault();
break;
case keyCode.ENTER:
- // when menu is open or has focus
+ case keyCode.NUMPAD_ENTER:
+ // when menu is open and has focus
if ( self.menu.active ) {
+ // #6055 - Opera still allows the keypress to occur
+ // which causes forms to submit
+ suppressKeyPress = true;
event.preventDefault();
}
//passthrough - ENTER and TAB both select the current element
@@ -67,30 +88,40 @@ $.widget( "ui.autocomplete", {
self.element.val( self.term );
self.close( event );
break;
- case keyCode.LEFT:
- case keyCode.RIGHT:
- case keyCode.SHIFT:
- case keyCode.CONTROL:
- case keyCode.ALT:
- // ignore metakeys (shift, ctrl, alt)
- break;
default:
// keypress is triggered before the input value is changed
clearTimeout( self.searching );
self.searching = setTimeout(function() {
- self.search( null, event );
+ // only search if the value has changed
+ if ( self.term != self.element.val() ) {
+ self.selectedItem = null;
+ self.search( null, event );
+ }
}, self.options.delay );
break;
}
})
+ .bind( "keypress.autocomplete", function( event ) {
+ if ( suppressKeyPress ) {
+ suppressKeyPress = false;
+ event.preventDefault();
+ }
+ })
.bind( "focus.autocomplete", function() {
+ if ( self.options.disabled ) {
+ return;
+ }
+
self.selectedItem = null;
self.previous = self.element.val();
})
.bind( "blur.autocomplete", function( event ) {
+ if ( self.options.disabled ) {
+ return;
+ }
+
clearTimeout( self.searching );
// clicks on the menu (or a button to trigger a search) will cause a blur event
- // TODO try to implement this without a timeout, see clearTimeout in search()
self.closing = setTimeout(function() {
self.close( event );
self._change( event );
@@ -102,13 +133,37 @@ $.widget( "ui.autocomplete", {
};
this.menu = $( "<ul></ul>" )
.addClass( "ui-autocomplete" )
- .appendTo( "body", doc )
+ .appendTo( $( this.options.appendTo || "body", doc )[0] )
+ // prevent the close-on-blur in case of a "slow" click on the menu (long mousedown)
+ .mousedown(function( event ) {
+ // clicking on the scrollbar causes focus to shift to the body
+ // but we can't detect a mouseup or a click immediately afterward
+ // so we have to track the next mousedown and close the menu if
+ // the user clicks somewhere outside of the autocomplete
+ var menuElement = self.menu.element[ 0 ];
+ if ( !$( event.target ).closest( ".ui-menu-item" ).length ) {
+ setTimeout(function() {
+ $( document ).one( 'mousedown', function( event ) {
+ if ( event.target !== self.element[ 0 ] &&
+ event.target !== menuElement &&
+ !$.contains( menuElement, event.target ) ) {
+ self.close();
+ }
+ });
+ }, 1 );
+ }
+
+ // use another timeout to make sure the blur-event-handler on the input was already triggered
+ setTimeout(function() {
+ clearTimeout( self.closing );
+ }, 13);
+ })
.menu({
// custom key handling for now
input: $(),
focus: function( event, ui ) {
var item = ui.item.data( "item.autocomplete" );
- if ( false !== self._trigger( "focus", null, { item: item } ) ) {
+ if ( false !== self._trigger( "focus", event, { item: item } ) ) {
// use value to match what will end up in the input, if it was a key event
if ( /^key/.test(event.originalEvent.type) ) {
self.element.val( item.value );
@@ -116,28 +171,42 @@ $.widget( "ui.autocomplete", {
}
},
select: function( event, ui ) {
- var item = ui.item.data( "item.autocomplete" );
- if ( false !== self._trigger( "select", event, { item: item } ) ) {
- self.element.val( item.value );
- }
- self.close( event );
+ var item = ui.item.data( "item.autocomplete" ),
+ previous = self.previous;
+
// only trigger when focus was lost (click on menu)
- var previous = self.previous;
if ( self.element[0] !== doc.activeElement ) {
self.element.focus();
self.previous = previous;
+ // #6109 - IE triggers two focus events and the second
+ // is asynchronous, so we need to reset the previous
+ // term synchronously and asynchronously :-(
+ setTimeout(function() {
+ self.previous = previous;
+ self.selectedItem = item;
+ }, 1);
}
+
+ if ( false !== self._trigger( "select", event, { item: item } ) ) {
+ self.element.val( item.value );
+ }
+ // reset the term after the select event
+ // this allows custom select handling to work properly
+ self.term = self.element.val();
+
+ self.close( event );
self.selectedItem = item;
},
blur: function( event, ui ) {
- if ( self.menu.element.is(":visible") ) {
+ // don't set the value of the text field if it's already correct
+ // this prevents moving the cursor unnecessarily
+ if ( self.menu.element.is(":visible") &&
+ ( self.element.val() !== self.term ) ) {
self.element.val( self.term );
}
}
})
.zIndex( this.element.zIndex() + 1 )
- // workaround for jQuery bug #5781 http://dev.jquery.com/ticket/5781
- .css({ top: 0, left: 0 })
.hide()
.data( "menu" );
if ( $.fn.bgiframe ) {
@@ -156,15 +225,22 @@ $.widget( "ui.autocomplete", {
$.Widget.prototype.destroy.call( this );
},
- _setOption: function( key ) {
+ _setOption: function( key, value ) {
$.Widget.prototype._setOption.apply( this, arguments );
if ( key === "source" ) {
this._initSource();
}
+ if ( key === "appendTo" ) {
+ this.menu.element.appendTo( $( value || "body", this.element[0].ownerDocument )[0] )
+ }
+ if ( key === "disabled" && value && this.xhr ) {
+ this.xhr.abort();
+ }
},
_initSource: function() {
- var array,
+ var self = this,
+ array,
url;
if ( $.isArray(this.options.source) ) {
array = this.options.source;
@@ -174,7 +250,26 @@ $.widget( "ui.autocomplete", {
} else if ( typeof this.options.source === "string" ) {
url = this.options.source;
this.source = function( request, response ) {
- $.getJSON( url, request, response );
+ if ( self.xhr ) {
+ self.xhr.abort();
+ }
+ self.xhr = $.ajax({
+ url: url,
+ data: request,
+ dataType: "json",
+ success: function( data, status, xhr ) {
+ if ( xhr === self.xhr ) {
+ response( data );
+ }
+ self.xhr = null;
+ },
+ error: function( xhr ) {
+ if ( xhr === self.xhr ) {
+ response( [] );
+ }
+ self.xhr = null;
+ }
+ });
};
} else {
this.source = this.options.source;
@@ -183,12 +278,16 @@ $.widget( "ui.autocomplete", {
search: function( value, event ) {
value = value != null ? value : this.element.val();
+
+ // always save the actual value, not the one passed as an argument
+ this.term = this.element.val();
+
if ( value.length < this.options.minLength ) {
return this.close( event );
}
clearTimeout( this.closing );
- if ( this._trigger("search") === false ) {
+ if ( this._trigger( "search", event ) === false ) {
return;
}
@@ -196,31 +295,32 @@ $.widget( "ui.autocomplete", {
},
_search: function( value ) {
- this.term = this.element
- .addClass( "ui-autocomplete-loading" )
- // always save the actual value, not the one passed as an argument
- .val();
+ this.pending++;
+ this.element.addClass( "ui-autocomplete-loading" );
this.source( { term: value }, this.response );
},
_response: function( content ) {
- if ( content.length ) {
+ if ( !this.options.disabled && content && content.length ) {
content = this._normalize( content );
this._suggest( content );
this._trigger( "open" );
} else {
this.close();
}
- this.element.removeClass( "ui-autocomplete-loading" );
+ this.pending--;
+ if ( !this.pending ) {
+ this.element.removeClass( "ui-autocomplete-loading" );
+ }
},
close: function( event ) {
clearTimeout( this.closing );
if ( this.menu.element.is(":visible") ) {
- this._trigger( "close", event );
this.menu.element.hide();
this.menu.deactivate();
+ this._trigger( "close", event );
}
},
@@ -251,26 +351,29 @@ $.widget( "ui.autocomplete", {
_suggest: function( items ) {
var ul = this.menu.element
- .empty()
- .zIndex( this.element.zIndex() + 1 ),
- menuWidth,
- textWidth;
+ .empty()
+ .zIndex( this.element.zIndex() + 1 );
this._renderMenu( ul, items );
// TODO refresh should check if the active item is still in the dom, removing the need for a manual deactivate
this.menu.deactivate();
this.menu.refresh();
- this.menu.element.show().position({
- my: "left top",
- at: "left bottom",
- of: this.element,
- collision: "none"
- });
- menuWidth = ul.width( "" ).width();
- textWidth = this.element.width();
- ul.width( Math.max( menuWidth, textWidth ) );
+ // size and position menu
+ ul.show();
+ this._resizeMenu();
+ ul.position( $.extend({
+ of: this.element
+ }, this.options.position ));
},
-
+
+ _resizeMenu: function() {
+ var ul = this.menu.element;
+ ul.outerWidth( Math.max(
+ ul.width( "" ).outerWidth(),
+ this.element.outerWidth()
+ ) );
+ },
+
_renderMenu: function( ul, items ) {
var self = this;
$.each( items, function( index, item ) {
@@ -281,7 +384,7 @@ $.widget( "ui.autocomplete", {
_renderItem: function( ul, item) {
return $( "<li></li>" )
.data( "item.autocomplete", item )
- .append( "<a>" + item.label + "</a>" )
+ .append( $( "<a></a>" ).text( item.label ) )
.appendTo( ul );
},
@@ -306,7 +409,7 @@ $.widget( "ui.autocomplete", {
$.extend( $.ui.autocomplete, {
escapeRegex: function( value ) {
- return value.replace( /([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1" );
+ return value.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
},
filter: function(array, term) {
var matcher = new RegExp( $.ui.autocomplete.escapeRegex(term), "i" );
diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js
index ff2c1ebb6..78134e308 100644
--- a/ui/jquery.ui.button.js
+++ b/ui/jquery.ui.button.js
@@ -1,9 +1,9 @@
/*
* jQuery UI Button @VERSION
*
- * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
*
* http://docs.jquery.com/UI/Button
*
@@ -11,12 +11,12 @@
* jquery.ui.core.js
* jquery.ui.widget.js
*/
-(function( $ ) {
+(function( $, undefined ) {
var lastActive,
baseClasses = "ui-button ui-widget ui-state-default ui-corner-all",
- otherClasses = "ui-state-hover ui-state-active " +
- "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon ui-button-text-only",
+ stateClasses = "ui-state-hover ui-state-active ",
+ typeClasses = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",
formResetHandler = function( event ) {
$( ":ui-button", event.target.form ).each(function() {
var inst = $( this ).data( "button" );
@@ -44,6 +44,7 @@ var lastActive,
$.widget( "ui.button", {
options: {
+ disabled: null,
text: true,
label: null,
icons: {
@@ -56,6 +57,10 @@ $.widget( "ui.button", {
.unbind( "reset.button" )
.bind( "reset.button", formResetHandler );
+ if ( typeof this.options.disabled !== "boolean" ) {
+ this.options.disabled = this.element.attr( "disabled" );
+ }
+
this._determineButtonType();
this.hasTitle = !!this.buttonElement.attr( "title" );
@@ -196,7 +201,7 @@ $.widget( "ui.button", {
// we don't search against the document in case the element
// is disconnected from the DOM
this.buttonElement = this.element.parents().last()
- .find( "[for=" + this.element.attr("id") + "]" );
+ .find( "label[for=" + this.element.attr("id") + "]" );
this.element.addClass( "ui-helper-hidden-accessible" );
var checked = this.element.is( ":checked" );
@@ -217,7 +222,7 @@ $.widget( "ui.button", {
this.element
.removeClass( "ui-helper-hidden-accessible" );
this.buttonElement
- .removeClass( baseClasses + " " + otherClasses )
+ .removeClass( baseClasses + " " + stateClasses + " " + typeClasses )
.removeAttr( "role" )
.removeAttr( "aria-pressed" )
.html( this.buttonElement.find(".ui-button-text").html() );
@@ -278,7 +283,7 @@ $.widget( "ui.button", {
}
return;
}
- var buttonElement = this.buttonElement,
+ var buttonElement = this.buttonElement.removeClass( typeClasses ),
buttonText = $( "<span></span>" )
.addClass( "ui-button-text" )
.html( this.options.label )
@@ -288,7 +293,7 @@ $.widget( "ui.button", {
multipleIcons = icons.primary && icons.secondary;
if ( icons.primary || icons.secondary ) {
buttonElement.addClass( "ui-button-text-icon" +
- ( multipleIcons ? "s" : "" ) );
+ ( multipleIcons ? "s" : ( icons.primary ? "-primary" : "-secondary" ) ) );
if ( icons.primary ) {
buttonElement.prepend( "<span class='ui-button-icon-primary ui-icon " + icons.primary + "'></span>" );
}
@@ -298,7 +303,7 @@ $.widget( "ui.button", {
if ( !this.options.text ) {
buttonElement
.addClass( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" )
- .removeClass( "ui-button-text-icons ui-button-text-icon" );
+ .removeClass( "ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary" );
if ( !this.hasTitle ) {
buttonElement.attr( "title", buttonText );
}
@@ -310,9 +315,12 @@ $.widget( "ui.button", {
});
$.widget( "ui.buttonset", {
+ options: {
+ items: ":button, :submit, :reset, :checkbox, :radio, a, :data(button)"
+ },
+
_create: function() {
this.element.addClass( "ui-buttonset" );
- this._init();
},
_init: function() {
@@ -328,7 +336,7 @@ $.widget( "ui.buttonset", {
},
refresh: function() {
- this.buttons = this.element.find( ":button, :submit, :reset, :checkbox, :radio, a, :data(button)" )
+ this.buttons = this.element.find( this.options.items )
.filter( ":ui-button" )
.button( "refresh" )
.end()
@@ -356,7 +364,7 @@ $.widget( "ui.buttonset", {
})
.removeClass( "ui-corner-left ui-corner-right" )
.end()
- .button( "destroy" )
+ .button( "destroy" );
$.Widget.prototype.destroy.call( this );
}
diff --git a/ui/jquery.ui.core.js b/ui/jquery.ui.core.js
index c0eab46b4..d41654b29 100644
--- a/ui/jquery.ui.core.js
+++ b/ui/jquery.ui.core.js
@@ -1,79 +1,33 @@
/*!
* jQuery UI @VERSION
*
- * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
*
* http://docs.jquery.com/UI
*/
-;jQuery.ui || (function($) {
+(function( $, undefined ) {
-//Helper functions and ui object
-$.ui = {
- version: "@VERSION",
-
- // $.ui.plugin is deprecated. Use the proxy pattern instead.
- plugin: {
- add: function(module, option, set) {
- var proto = $.ui[module].prototype;
- for(var i in set) {
- proto.plugins[i] = proto.plugins[i] || [];
- proto.plugins[i].push([option, set[i]]);
- }
- },
- call: function(instance, name, args) {
- var set = instance.plugins[name];
- if(!set || !instance.element[0].parentNode) { return; }
-
- for (var i = 0; i < set.length; i++) {
- if (instance.options[set[i][0]]) {
- set[i][1].apply(instance.element, args);
- }
- }
- }
- },
-
- contains: function(a, b) {
- return document.compareDocumentPosition
- ? a.compareDocumentPosition(b) & 16
- : a !== b && a.contains(b);
- },
+// prevent duplicate loading
+// this is only a problem because we proxy existing functions
+// and we don't want to double proxy them
+$.ui = $.ui || {};
+if ( $.ui.version ) {
+ return;
+}
- hasScroll: function(el, a) {
-
- //If overflow is hidden, the element might have extra content, but the user wants to hide it
- if ($(el).css('overflow') == 'hidden') { return false; }
-
- var scroll = (a && a == 'left') ? 'scrollLeft' : 'scrollTop',
- has = false;
-
- if (el[scroll] > 0) { return true; }
-
- // TODO: determine which cases actually cause this to happen
- // if the element doesn't have the scroll set, see if it's possible to
- // set the scroll
- el[scroll] = 1;
- has = (el[scroll] > 0);
- el[scroll] = 0;
- return has;
- },
-
- isOverAxis: function(x, reference, size) {
- //Determines when x coordinate is over "b" element axis
- return (x > reference) && (x < (reference + size));
- },
-
- isOver: function(y, x, top, left, height, width) {
- //Determines when x, y coordinates is over "b" element
- return $.ui.isOverAxis(y, top, height) && $.ui.isOverAxis(x, left, width);
- },
+$.extend( $.ui, {
+ version: "@VERSION",
keyCode: {
ALT: 18,
BACKSPACE: 8,
CAPS_LOCK: 20,
COMMA: 188,
+ COMMAND: 91,
+ COMMAND_LEFT: 91, // COMMAND
+ COMMAND_RIGHT: 93,
CONTROL: 17,
DELETE: 46,
DOWN: 40,
@@ -83,6 +37,7 @@ $.ui = {
HOME: 36,
INSERT: 45,
LEFT: 37,
+ MENU: 93, // COMMAND_RIGHT
NUMPAD_ADD: 107,
NUMPAD_DECIMAL: 110,
NUMPAD_DIVIDE: 111,
@@ -96,40 +51,31 @@ $.ui = {
SHIFT: 16,
SPACE: 32,
TAB: 9,
- UP: 38
+ UP: 38,
+ WINDOWS: 91 // COMMAND
}
-};
+});
-//jQuery plugins
+// plugins
$.fn.extend({
_focus: $.fn.focus,
- focus: function(delay, fn) {
- return typeof delay === 'number'
- ? this.each(function() {
+ focus: function( delay, fn ) {
+ return typeof delay === "number" ?
+ this.each(function() {
var elem = this;
setTimeout(function() {
- $(elem).focus();
- (fn && fn.call(elem));
- }, delay);
- })
- : this._focus.apply(this, arguments);
- },
-
- enableSelection: function() {
- return this
- .attr('unselectable', 'off')
- .css('MozUserSelect', '');
- },
-
- disableSelection: function() {
- return this
- .attr('unselectable', 'on')
- .css('MozUserSelect', 'none');
+ $( elem ).focus();
+ if ( fn ) {
+ fn.call( elem );
+ }
+ }, delay );
+ }) :
+ this._focus.apply( this, arguments );
},
scrollParent: function() {
var scrollParent;
- if(($.browser.msie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {
+ if (($.browser.msie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {
scrollParent = this.parents().filter(function() {
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));
}).eq(0);
@@ -142,26 +88,25 @@ $.fn.extend({
return (/fixed/).test(this.css('position')) || !scrollParent.length ? $(document) : scrollParent;
},
- zIndex: function(zIndex) {
- if (zIndex !== undefined) {
- return this.css('zIndex', zIndex);
+ zIndex: function( zIndex ) {
+ if ( zIndex !== undefined ) {
+ return this.css( "zIndex", zIndex );
}
-
- if (this.length) {
- var elem = $(this[0]), position, value;
- while (elem.length && elem[0] !== document) {
+
+ if ( this.length ) {
+ var elem = $( this[ 0 ] ), position, value;
+ while ( elem.length && elem[ 0 ] !== document ) {
// Ignore z-index if position is set to a value where z-index is ignored by the browser
// This makes behavior of this function consistent across browsers
// WebKit always returns auto if the element is positioned
- position = elem.css('position');
- if (position == 'absolute' || position == 'relative' || position == 'fixed')
- {
+ position = elem.css( "position" );
+ if ( position === "absolute" || position === "relative" || position === "fixed" ) {
// IE returns 0 when zIndex is not specified
// other browsers return a string
// we ignore the case of nested elements with an explicit value of 0
// <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
- value = parseInt(elem.css('zIndex'));
- if (!isNaN(value) && value != 0) {
+ value = parseInt( elem.css( "zIndex" ), 10 );
+ if ( !isNaN( value ) && value !== 0 ) {
return value;
}
}
@@ -170,33 +115,189 @@ $.fn.extend({
}
return 0;
+ },
+
+ disableSelection: function() {
+ return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
+ ".ui-disableSelection", function( event ) {
+ event.preventDefault();
+ });
+ },
+
+ enableSelection: function() {
+ return this.unbind( ".ui-disableSelection" );
}
});
+$.each( [ "Width", "Height" ], function( i, name ) {
+ var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
+ type = name.toLowerCase(),
+ orig = {
+ innerWidth: $.fn.innerWidth,
+ innerHeight: $.fn.innerHeight,
+ outerWidth: $.fn.outerWidth,
+ outerHeight: $.fn.outerHeight
+ };
+
+ function reduce( elem, size, border, margin ) {
+ $.each( side, function() {
+ size -= parseFloat( $.curCSS( elem, "padding" + this, true) ) || 0;
+ if ( border ) {
+ size -= parseFloat( $.curCSS( elem, "border" + this + "Width", true) ) || 0;
+ }
+ if ( margin ) {
+ size -= parseFloat( $.curCSS( elem, "margin" + this, true) ) || 0;
+ }
+ });
+ return size;
+ }
-//Additional selectors
-$.extend($.expr[':'], {
- data: function(elem, i, match) {
- return !!$.data(elem, match[3]);
+ $.fn[ "inner" + name ] = function( size ) {
+ if ( size === undefined ) {
+ return orig[ "inner" + name ].call( this );
+ }
+
+ return this.each(function() {
+ $( this ).css( type, reduce( this, size ) + "px" );
+ });
+ };
+
+ $.fn[ "outer" + name] = function( size, margin ) {
+ if ( typeof size !== "number" ) {
+ return orig[ "outer" + name ].call( this, size );
+ }
+
+ return this.each(function() {
+ $( this).css( type, reduce( this, size, true, margin ) + "px" );
+ });
+ };
+});
+
+// selectors
+function visible( element ) {
+ return !$( element ).parents().andSelf().filter(function() {
+ return $.curCSS( this, "visibility" ) === "hidden" ||
+ $.expr.filters.hidden( this );
+ }).length;
+}
+
+$.extend( $.expr[ ":" ], {
+ data: function( elem, i, match ) {
+ return !!$.data( elem, match[ 3 ] );
},
- focusable: function(element) {
+ focusable: function( element ) {
var nodeName = element.nodeName.toLowerCase(),
- tabIndex = $.attr(element, 'tabindex');
- return (/input|select|textarea|button|object/.test(nodeName)
+ tabIndex = $.attr( element, "tabindex" );
+ if ( "area" === nodeName ) {
+ var map = element.parentNode,
+ mapName = map.name,
+ img;
+ if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
+ return false;
+ }
+ img = $( "img[usemap=#" + mapName + "]" )[0];
+ return !!img && visible( img );
+ }
+ return ( /input|select|textarea|button|object/.test( nodeName )
? !element.disabled
- : 'a' == nodeName || 'area' == nodeName
- ? element.href || !isNaN(tabIndex)
- : !isNaN(tabIndex))
+ : "a" == nodeName
+ ? element.href || !isNaN( tabIndex )
+ : !isNaN( tabIndex ))
// the element and all of its ancestors must be visible
- // the browser may report that the area is hidden
- && !$(element)['area' == nodeName ? 'parents' : 'closest'](':hidden').length;
+ && visible( element );
},
- tabbable: function(element) {
- var tabIndex = $.attr(element, 'tabindex');
- return (isNaN(tabIndex) || tabIndex >= 0) && $(element).is(':focusable');
+ tabbable: function( element ) {
+ var tabIndex = $.attr( element, "tabindex" );
+ return ( isNaN( tabIndex ) || tabIndex >= 0 ) && $( element ).is( ":focusable" );
+ }
+});
+
+// support
+$(function() {
+ var body = document.body,
+ div = body.appendChild( div = document.createElement( "div" ) );
+
+ $.extend( div.style, {
+ minHeight: "100px",
+ height: "auto",
+ padding: 0,
+ borderWidth: 0
+ });
+
+ $.support.minHeight = div.offsetHeight === 100;
+ $.support.selectstart = "onselectstart" in div;
+
+ // set display to none to avoid a layout bug in IE
+ // http://dev.jquery.com/ticket/4014
+ body.removeChild( div ).style.display = "none";
+});
+
+
+
+
+
+// deprecated
+$.extend( $.ui, {
+ // $.ui.plugin is deprecated. Use the proxy pattern instead.
+ plugin: {
+ add: function( module, option, set ) {
+ var proto = $.ui[ module ].prototype;
+ for ( var i in set ) {
+ proto.plugins[ i ] = proto.plugins[ i ] || [];
+ proto.plugins[ i ].push( [ option, set[ i ] ] );
+ }
+ },
+ call: function( instance, name, args ) {
+ var set = instance.plugins[ name ];
+ if ( !set || !instance.element[ 0 ].parentNode ) {
+ return;
+ }
+
+ for ( var i = 0; i < set.length; i++ ) {
+ if ( instance.options[ set[ i ][ 0 ] ] ) {
+ set[ i ][ 1 ].apply( instance.element, args );
+ }
+ }
+ }
+ },
+
+ contains: $.contains,
+
+ // only used by resizable
+ hasScroll: function( el, a ) {
+
+ //If overflow is hidden, the element might have extra content, but the user wants to hide it
+ if ( $( el ).css( "overflow" ) === "hidden") {
+ return false;
+ }
+
+ var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
+ has = false;
+
+ if ( el[ scroll ] > 0 ) {
+ return true;
+ }
+
+ // TODO: determine which cases actually cause this to happen
+ // if the element doesn't have the scroll set, see if it's possible to
+ // set the scroll
+ el[ scroll ] = 1;
+ has = ( el[ scroll ] > 0 );
+ el[ scroll ] = 0;
+ return has;
+ },
+
+ // these are odd functions, fix the API or move into individual plugins
+ isOverAxis: function( x, reference, size ) {
+ //Determines when x coordinate is over "b" element axis
+ return ( x > reference ) && ( x < ( reference + size ) );
+ },
+ isOver: function( y, x, top, left, height, width ) {
+ //Determines when x, y coordinates is over "b" element
+ return $.ui.isOverAxis( y, top, height ) && $.ui.isOverAxis( x, left, width );
}
});
-})(jQuery);
+})( jQuery );
diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js
index e41ae62a3..abcb37067 100644
--- a/ui/jquery.ui.datepicker.js
+++ b/ui/jquery.ui.datepicker.js
@@ -1,17 +1,16 @@
/*
* jQuery UI Datepicker @VERSION
*
- * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
*
* http://docs.jquery.com/UI/Datepicker
*
* Depends:
* jquery.ui.core.js
*/
-
-(function($) { // hide the namespace
+(function( $, undefined ) {
$.extend($.ui, { datepicker: { version: "@VERSION" } });
@@ -61,7 +60,7 @@ function Datepicker() {
this._defaults = { // Global defaults for all the date picker instances
showOn: 'focus', // 'focus' for popup on focus,
// 'button' for trigger button, or 'both' for either
- showAnim: 'show', // Name of jQuery animation for popup
+ showAnim: 'fadeIn', // Name of jQuery animation for popup
showOptions: {}, // Options for enhanced animations
defaultDate: null, // Used when field is blank: actual date,
// +/-number for offset from today, null for today
@@ -88,7 +87,7 @@ function Datepicker() {
// string value starting with '+' for current year + value
minDate: null, // The earliest selectable date, or null for no limit
maxDate: null, // The latest selectable date, or null for no limit
- duration: '_default', // Duration of display/closure
+ duration: 'fast', // Duration of display/closure
beforeShowDay: null, // Function that takes a date and returns an array with
// [0] = true if selectable, false if not, [1] = custom CSS class name(s) or '',
// [2] = cell title (optional), e.g. $.datepicker.noWeekends
@@ -108,7 +107,7 @@ function Datepicker() {
autoSize: false // True to size the input for the date format, false to leave as is
};
$.extend(this._defaults, this.regional['']);
- this.dpDiv = $('<div id="' + this._mainDivId + '" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>');
+ this.dpDiv = $('<div id="' + this._mainDivId + '" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>');
}
$.extend(Datepicker.prototype, {
@@ -153,8 +152,10 @@ $.extend(Datepicker.prototype, {
}
var nodeName = target.nodeName.toLowerCase();
var inline = (nodeName == 'div' || nodeName == 'span');
- if (!target.id)
- target.id = 'dp' + (++this.uuid);
+ if (!target.id) {
+ this.uuid += 1;
+ target.id = 'dp' + this.uuid;
+ }
var inst = this._newInst($(target), inline);
inst.settings = $.extend({}, settings || {}, inlineSettings || {});
if (nodeName == 'input') {
@@ -166,7 +167,7 @@ $.extend(Datepicker.prototype, {
/* Create a new instance object. */
_newInst: function(target, inline) {
- var id = target[0].id.replace(/([^A-Za-z0-9_])/g, '\\\\$1'); // escape jQuery meta chars
+ var id = target[0].id.replace(/([^A-Za-z0-9_-])/g, '\\\\$1'); // escape jQuery meta chars
return {id: id, input: target, // associated target
selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
drawMonth: 0, drawYear: 0, // month being drawn
@@ -271,6 +272,7 @@ $.extend(Datepicker.prototype, {
this._setDate(inst, this._getDefaultDate(inst), true);
this._updateDatepicker(inst);
this._updateAlternate(inst);
+ inst.dpDiv.show();
},
/* Pop-up the date picker in a "dialog" box.
@@ -285,7 +287,8 @@ $.extend(Datepicker.prototype, {
_dialogDatepicker: function(input, date, onSelect, settings, pos) {
var inst = this._dialogInst; // internal instance
if (!inst) {
- var id = 'dp' + (++this.uuid);
+ this.uuid += 1;
+ var id = 'dp' + this.uuid;
this._dialogInput = $('<input type="text" id="' + id +
'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');
this._dialogInput.keydown(this._doKeyDown);
@@ -497,8 +500,8 @@ $.extend(Datepicker.prototype, {
case 9: $.datepicker._hideDatepicker();
handled = false;
break; // hide on tab out
- case 13: var sel = $('td.' + $.datepicker._dayOverClass, inst.dpDiv).
- add($('td.' + $.datepicker._currentClass, inst.dpDiv));
+ case 13: var sel = $('td.' + $.datepicker._dayOverClass + ':not(.' +
+ $.datepicker._currentClass + ')', inst.dpDiv);
if (sel[0])
$.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]);
else
@@ -562,7 +565,7 @@ $.extend(Datepicker.prototype, {
if ($.datepicker._get(inst, 'constrainInput')) {
var chars = $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat'));
var chr = String.fromCharCode(event.charCode == undefined ? event.keyCode : event.charCode);
- return event.ctrlKey || (chr < ' ' || !chars || chars.indexOf(chr) > -1);
+ return event.ctrlKey || event.metaKey || (chr < ' ' || !chars || chars.indexOf(chr) > -1);
}
},
@@ -622,6 +625,8 @@ $.extend(Datepicker.prototype, {
}
var offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]};
$.datepicker._pos = null;
+ //to avoid flashes on Firefox
+ inst.dpDiv.empty();
// determine sizing offscreen
inst.dpDiv.css({position: 'absolute', display: 'block', top: '-1000px'});
$.datepicker._updateDatepicker(inst);
@@ -636,10 +641,12 @@ $.extend(Datepicker.prototype, {
var duration = $.datepicker._get(inst, 'duration');
var postProcess = function() {
$.datepicker._datepickerShowing = true;
- var borders = $.datepicker._getBorders(inst.dpDiv);
- inst.dpDiv.find('iframe.ui-datepicker-cover'). // IE6- only
- css({left: -borders[0], top: -borders[1],
+ var cover = inst.dpDiv.find('iframe.ui-datepicker-cover'); // IE6- only
+ if( !! cover.length ){
+ var borders = $.datepicker._getBorders(inst.dpDiv);
+ cover.css({left: -borders[0], top: -borders[1],
width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()});
+ }
};
inst.dpDiv.zIndex($(input).zIndex()+1);
if ($.effects && $.effects[showAnim])
@@ -658,12 +665,12 @@ $.extend(Datepicker.prototype, {
_updateDatepicker: function(inst) {
var self = this;
var borders = $.datepicker._getBorders(inst.dpDiv);
- inst.dpDiv.empty().append(this._generateHTML(inst))
- .find('iframe.ui-datepicker-cover') // IE6- only
- .css({left: -borders[0], top: -borders[1],
- width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()})
- .end()
- .find('button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a')
+ inst.dpDiv.empty().append(this._generateHTML(inst));
+ var cover = inst.dpDiv.find('iframe.ui-datepicker-cover'); // IE6- only
+ if( !!cover.length ){ //avoid call to outerXXXX() when not in IE6
+ cover.css({left: -borders[0], top: -borders[1], width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()})
+ }
+ inst.dpDiv.find('button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a')
.bind('mouseout', function(){
$(this).removeClass('ui-state-hover');
if(this.className.indexOf('ui-datepicker-prev') != -1) $(this).removeClass('ui-datepicker-prev-hover');
@@ -695,6 +702,17 @@ $.extend(Datepicker.prototype, {
if (inst == $.datepicker._curInst && $.datepicker._datepickerShowing && inst.input &&
inst.input.is(':visible') && !inst.input.is(':disabled'))
inst.input.focus();
+ // deffered render of the years select (to avoid flashes on Firefox)
+ if( inst.yearshtml ){
+ var origyearshtml = inst.yearshtml;
+ setTimeout(function(){
+ //assure that inst.yearshtml didn't change.
+ if( origyearshtml === inst.yearshtml ){
+ inst.dpDiv.find('select.ui-datepicker-year:first').replaceWith(inst.yearshtml);
+ }
+ origyearshtml = inst.yearshtml = null;
+ }, 0);
+ }
},
/* Retrieve the size of left and top borders for an element.
@@ -844,8 +862,11 @@ $.extend(Datepicker.prototype, {
_clickMonthYear: function(id) {
var target = $(id);
var inst = this._getInst(target[0]);
- if (inst.input && inst._selectingMonthYear && !$.browser.msie)
- inst.input.focus();
+ if (inst.input && inst._selectingMonthYear) {
+ setTimeout(function() {
+ inst.input.focus();
+ }, 0);
+ }
inst._selectingMonthYear = !inst._selectingMonthYear;
},
@@ -963,9 +984,9 @@ $.extend(Datepicker.prototype, {
};
// Extract a number from the string value
var getNumber = function(match) {
- lookAhead(match);
+ var isDoubled = lookAhead(match);
var size = (match == '@' ? 14 : (match == '!' ? 20 :
- (match == 'y' ? 4 : (match == 'o' ? 3 : 2))));
+ (match == 'y' && isDoubled ? 4 : (match == 'o' ? 3 : 2))));
var digits = new RegExp('^\\d{1,' + size + '}');
var num = value.substring(iValue).match(digits);
if (!num)
@@ -977,7 +998,7 @@ $.extend(Datepicker.prototype, {
var getName = function(match, shortNames, longNames) {
var names = (lookAhead(match) ? longNames : shortNames);
for (var i = 0; i < names.length; i++) {
- if (value.substr(iValue, names[i].length) == names[i]) {
+ if (value.substr(iValue, names[i].length).toLowerCase() == names[i].toLowerCase()) {
iValue += names[i].length;
return i + 1;
}
@@ -1295,16 +1316,16 @@ $.extend(Datepicker.prototype, {
}
return new Date(year, month, day);
};
- date = (date == null ? defaultDate : (typeof date == 'string' ? offsetString(date) :
- (typeof date == 'number' ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : date)));
- date = (date && date.toString() == 'Invalid Date' ? defaultDate : date);
- if (date) {
- date.setHours(0);
- date.setMinutes(0);
- date.setSeconds(0);
- date.setMilliseconds(0);
+ var newDate = (date == null || date === '' ? defaultDate : (typeof date == 'string' ? offsetString(date) :
+ (typeof date == 'number' ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : new Date(date.getTime()))));
+ newDate = (newDate && newDate.toString() == 'Invalid Date' ? defaultDate : newDate);
+ if (newDate) {
+ newDate.setHours(0);
+ newDate.setMinutes(0);
+ newDate.setSeconds(0);
+ newDate.setMilliseconds(0);
}
- return this._daylightSavingAdjust(date);
+ return this._daylightSavingAdjust(newDate);
},
/* Handle switch to/from daylight saving.
@@ -1321,13 +1342,13 @@ $.extend(Datepicker.prototype, {
/* Set the date(s) directly. */
_setDate: function(inst, date, noChange) {
- var clear = !(date);
+ var clear = !date;
var origMonth = inst.selectedMonth;
var origYear = inst.selectedYear;
- date = this._restrictMinMax(inst, this._determineDate(inst, date, new Date()));
- inst.selectedDay = inst.currentDay = date.getDate();
- inst.drawMonth = inst.selectedMonth = inst.currentMonth = date.getMonth();
- inst.drawYear = inst.selectedYear = inst.currentYear = date.getFullYear();
+ var newDate = this._restrictMinMax(inst, this._determineDate(inst, date, new Date()));
+ inst.selectedDay = inst.currentDay = newDate.getDate();
+ inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth();
+ inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear();
if ((origMonth != inst.selectedMonth || origYear != inst.selectedYear) && !noChange)
this._notifyChange(inst);
this._adjustInstDate(inst);
@@ -1543,6 +1564,7 @@ $.extend(Datepicker.prototype, {
if (!showMonthAfterYear)
html += monthHtml + (secondary || !(changeMonth && changeYear) ? '&#xa0;' : '');
// year selection
+ inst.yearshtml = '';
if (secondary || !changeYear)
html += '<span class="ui-datepicker-year">' + drawYear + '</span>';
else {
@@ -1559,16 +1581,24 @@ $.extend(Datepicker.prototype, {
var endYear = Math.max(year, determineYear(years[1] || ''));
year = (minDate ? Math.max(year, minDate.getFullYear()) : year);
endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);
- html += '<select class="ui-datepicker-year" ' +
+ inst.yearshtml += '<select class="ui-datepicker-year" ' +
'onchange="DP_jQuery_' + dpuuid + '.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'Y\');" ' +
'onclick="DP_jQuery_' + dpuuid + '.datepicker._clickMonthYear(\'#' + inst.id + '\');"' +
'>';
for (; year <= endYear; year++) {
- html += '<option value="' + year + '"' +
+ inst.yearshtml += '<option value="' + year + '"' +
(year == drawYear ? ' selected="selected"' : '') +
'>' + year + '</option>';
}
- html += '</select>';
+ inst.yearshtml += '</select>';
+ //when showing there is no need for later update
+ if( ! $.browser.mozilla ){
+ html += inst.yearshtml;
+ inst.yearshtml = null;
+ } else {
+ // will be replaced later with inst.yearshtml
+ html += '<select class="ui-datepicker-year"><option value="' + drawYear + '" selected="selected">' + drawYear + '</option></select>';
+ }
}
html += this._get(inst, 'yearSuffix');
if (showMonthAfterYear)
@@ -1596,9 +1626,9 @@ $.extend(Datepicker.prototype, {
_restrictMinMax: function(inst, date) {
var minDate = this._getMinMaxDate(inst, 'min');
var maxDate = this._getMinMaxDate(inst, 'max');
- date = (minDate && date < minDate ? minDate : date);
- date = (maxDate && date > maxDate ? maxDate : date);
- return date;
+ var newDate = (minDate && date < minDate ? minDate : date);
+ newDate = (maxDate && newDate > maxDate ? maxDate : newDate);
+ return newDate;
},
/* Notify change of month/year. */
diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js
index 6e538b6e5..501772eb5 100644
--- a/ui/jquery.ui.dialog.js
+++ b/ui/jquery.ui.dialog.js
@@ -1,9 +1,9 @@
/*
* jQuery UI Dialog @VERSION
*
- * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
*
* http://docs.jquery.com/UI/Dialog
*
@@ -16,151 +16,163 @@
* jquery.ui.position.js
* jquery.ui.resizable.js
*/
-(function($) {
-
-var uiDialogClasses =
- 'ui-dialog ' +
- 'ui-widget ' +
- 'ui-widget-content ' +
- 'ui-corner-all ';
+(function( $, undefined ) {
+
+var uiDialogClasses = "ui-dialog ui-widget ui-widget-content ui-corner-all ",
+ sizeRelatedOptions = {
+ buttons: true,
+ height: true,
+ maxHeight: true,
+ maxWidth: true,
+ minHeight: true,
+ minWidth: true,
+ width: true
+ },
+ resizableRelatedOptions = {
+ maxHeight: true,
+ maxWidth: true,
+ minHeight: true,
+ minWidth: true
+ };
$.widget("ui.dialog", {
options: {
autoOpen: true,
buttons: {},
closeOnEscape: true,
- closeText: 'close',
- dialogClass: '',
+ closeText: "close",
+ dialogClass: "",
draggable: true,
hide: null,
- height: 'auto',
+ height: "auto",
maxHeight: false,
maxWidth: false,
minHeight: 150,
minWidth: 150,
modal: false,
- position: 'center',
+ position: {
+ my: "center",
+ at: "center",
+ of: window,
+ collision: "fit",
+ // ensure that the titlebar is never outside the document
+ using: function( pos ) {
+ var topOffset = $( this ).css( pos ).offset().top;
+ if ( topOffset < 0 ) {
+ $( this ).css( "top", pos.top - topOffset );
+ }
+ }
+ },
resizable: true,
show: null,
stack: true,
- title: '',
+ title: "",
width: 300,
zIndex: 1000
},
+
_create: function() {
- this.originalTitle = this.element.attr('title');
+ this.originalTitle = this.element.attr( "title" );
+ // #5742 - .attr() might return a DOMElement
+ if ( typeof this.originalTitle !== "string" ) {
+ this.originalTitle = "";
+ }
+ this.options.title = this.options.title || this.originalTitle;
var self = this,
options = self.options,
- title = options.title || self.originalTitle || '&#160;',
- titleId = $.ui.dialog.getTitleId(self.element),
+ title = options.title || "&#160;",
+ titleId = $.ui.dialog.getTitleId( self.element ),
- uiDialog = (self.uiDialog = $('<div></div>'))
- .appendTo(document.body)
+ uiDialog = ( self.uiDialog = $( "<div>" ) )
+ .appendTo( document.body )
.hide()
- .addClass(uiDialogClasses + options.dialogClass)
+ .addClass( uiDialogClasses + options.dialogClass )
.css({
zIndex: options.zIndex
})
// setting tabIndex makes the div focusable
- // setting outline to 0 prevents a border on focus in Mozilla
- .attr('tabIndex', -1).css('outline', 0).keydown(function(event) {
- if (options.closeOnEscape && event.keyCode &&
- event.keyCode === $.ui.keyCode.ESCAPE) {
-
- self.close(event);
+ .attr( "tabIndex", -1)
+ // TODO: move to stylesheet
+ .css( "outline", 0 )
+ .keydown(function( event ) {
+ if ( options.closeOnEscape && event.keyCode &&
+ event.keyCode === $.ui.keyCode.ESCAPE ) {
+ self.close( event );
event.preventDefault();
}
})
.attr({
- role: 'dialog',
- 'aria-labelledby': titleId
+ role: "dialog",
+ "aria-labelledby": titleId
})
- .mousedown(function(event) {
- self.moveToTop(false, event);
+ .mousedown(function( event ) {
+ self.moveToTop( false, event );
}),
uiDialogContent = self.element
.show()
- .removeAttr('title')
- .addClass(
- 'ui-dialog-content ' +
- 'ui-widget-content')
- .appendTo(uiDialog),
-
- uiDialogTitlebar = (self.uiDialogTitlebar = $('<div></div>'))
- .addClass(
- 'ui-dialog-titlebar ' +
- 'ui-widget-header ' +
- 'ui-corner-all ' +
- 'ui-helper-clearfix'
- )
- .prependTo(uiDialog),
-
- uiDialogTitlebarClose = $('<a href="#"></a>')
- .addClass(
- 'ui-dialog-titlebar-close ' +
- 'ui-corner-all'
- )
- .attr('role', 'button')
+ .removeAttr( "title" )
+ .addClass( "ui-dialog-content ui-widget-content" )
+ .appendTo( uiDialog ),
+
+ uiDialogTitlebar = ( self.uiDialogTitlebar = $( "<div>" ) )
+ .addClass( "ui-dialog-titlebar ui-widget-header " +
+ "ui-corner-all ui-helper-clearfix" )
+ .prependTo( uiDialog ),
+
+ uiDialogTitlebarClose = $( "<a href='#'>" )
+ .addClass( "ui-dialog-titlebar-close ui-corner-all" )
+ .attr( "role", "button" )
.hover(
function() {
- uiDialogTitlebarClose.addClass('ui-state-hover');
+ uiDialogTitlebarClose.addClass( "ui-state-hover" );
},
function() {
- uiDialogTitlebarClose.removeClass('ui-state-hover');
+ uiDialogTitlebarClose.removeClass( "ui-state-hover" );
}
)
.focus(function() {
- uiDialogTitlebarClose.addClass('ui-state-focus');
+ uiDialogTitlebarClose.addClass( "ui-state-focus" );
})
.blur(function() {
- uiDialogTitlebarClose.removeClass('ui-state-focus');
+ uiDialogTitlebarClose.removeClass( "ui-state-focus" );
})
- .click(function(event) {
- self.close(event);
- return false;
+ .click(function( event ) {
+ event.preventDefault();
+ self.close( event );
})
- .appendTo(uiDialogTitlebar),
+ .appendTo( uiDialogTitlebar ),
- uiDialogTitlebarCloseText = (self.uiDialogTitlebarCloseText = $('<span></span>'))
- .addClass(
- 'ui-icon ' +
- 'ui-icon-closethick'
- )
- .text(options.closeText)
- .appendTo(uiDialogTitlebarClose),
-
- uiDialogTitle = $('<span></span>')
- .addClass('ui-dialog-title')
- .attr('id', titleId)
- .html(title)
- .prependTo(uiDialogTitlebar);
+ uiDialogTitlebarCloseText = ( self.uiDialogTitlebarCloseText = $( "<span>" ) )
+ .addClass( "ui-icon ui-icon-closethick" )
+ .text( options.closeText )
+ .appendTo( uiDialogTitlebarClose ),
- //handling of deprecated beforeclose (vs beforeClose) option
- //Ticket #4669 http://dev.jqueryui.com/ticket/4669
- //TODO: remove in 1.9pre
- if ($.isFunction(options.beforeclose) && !$.isFunction(options.beforeClose)) {
- options.beforeClose = options.beforeclose;
- }
+ uiDialogTitle = $( "<span>" )
+ .addClass( "ui-dialog-title" )
+ .attr( "id", titleId )
+ .html( title )
+ .prependTo( uiDialogTitlebar );
- uiDialogTitlebar.find("*").add(uiDialogTitlebar).disableSelection();
+ uiDialogTitlebar.find( "*" ).add( uiDialogTitlebar ).disableSelection();
- if (options.draggable && $.fn.draggable) {
+ if ( options.draggable && $.fn.draggable ) {
self._makeDraggable();
}
- if (options.resizable && $.fn.resizable) {
+ if ( options.resizable && $.fn.resizable ) {
self._makeResizable();
}
- self._createButtons(options.buttons);
+ self._createButtons( options.buttons );
self._isOpen = false;
- if ($.fn.bgiframe) {
+ if ( $.fn.bgiframe ) {
uiDialog.bgiframe();
}
},
+
_init: function() {
if ( this.options.autoOpen ) {
this.open();
@@ -170,60 +182,63 @@ $.widget("ui.dialog", {
destroy: function() {
var self = this;
- if (self.overlay) {
+ if ( self.overlay ) {
self.overlay.destroy();
}
self.uiDialog.hide();
self.element
- .unbind('.dialog')
- .removeData('dialog')
- .removeClass('ui-dialog-content ui-widget-content')
- .hide().appendTo('body');
+ .removeClass( "ui-dialog-content ui-widget-content" )
+ .hide()
+ .appendTo( "body" );
self.uiDialog.remove();
- if (self.originalTitle) {
- self.element.attr('title', self.originalTitle);
+ if ( self.originalTitle ) {
+ self.element.attr( "title", self.originalTitle );
}
+ $.Widget.prototype.destroy.call( this );
return self;
},
-
+
widget: function() {
return this.uiDialog;
},
- close: function(event) {
+ close: function( event ) {
var self = this,
- maxZ;
+ maxZ, thisZ;
- if (false === self._trigger('beforeClose', event)) {
+ if ( false === self._trigger( "beforeClose", event ) ) {
return;
}
- if (self.overlay) {
+ if ( self.overlay ) {
self.overlay.destroy();
}
- self.uiDialog.unbind('keypress.ui-dialog');
+ self.uiDialog.unbind( "keypress.ui-dialog" );
self._isOpen = false;
- if (self.options.hide) {
- self.uiDialog.hide(self.options.hide, function() {
- self._trigger('close', event);
+ if ( self.options.hide ) {
+ self.uiDialog.hide( self.options.hide, function() {
+ self._trigger( "close", event );
});
} else {
self.uiDialog.hide();
- self._trigger('close', event);
+ self._trigger( "close", event );
}
$.ui.dialog.overlay.resize();
// adjust the maxZ to allow other modal dialogs to continue to work (see #4309)
- if (self.options.modal) {
+ if ( self.options.modal ) {
maxZ = 0;
- $('.ui-dialog').each(function() {
- if (this !== self.uiDialog[0]) {
- maxZ = Math.max(maxZ, $(this).css('z-index'));
+ $( ".ui-dialog" ).each(function() {
+ if ( this !== self.uiDialog[0] ) {
+ thisZ = $( this ).css( "z-index" );
+ if ( !isNaN( thisZ ) ) {
+ maxZ = Math.max( maxZ, thisZ );
+ }
}
});
$.ui.dialog.maxZ = maxZ;
@@ -238,67 +253,71 @@ $.widget("ui.dialog", {
// the force parameter allows us to move modal dialogs to their correct
// position on open
- moveToTop: function(force, event) {
+ moveToTop: function( force, event ) {
var self = this,
options = self.options,
saveScroll;
-
- if ((options.modal && !force) ||
- (!options.stack && !options.modal)) {
- return self._trigger('focus', event);
+
+ if ( ( options.modal && !force ) ||
+ ( !options.stack && !options.modal ) ) {
+ return self._trigger( "focus", event );
}
-
- if (options.zIndex > $.ui.dialog.maxZ) {
+
+ if ( options.zIndex > $.ui.dialog.maxZ ) {
$.ui.dialog.maxZ = options.zIndex;
}
- if (self.overlay) {
+ if ( self.overlay ) {
$.ui.dialog.maxZ += 1;
- self.overlay.$el.css('z-index', $.ui.dialog.overlay.maxZ = $.ui.dialog.maxZ);
+ $.ui.dialog.overlay.maxZ = $.ui.dialog.maxZ;
+ self.overlay.$el.css( "z-index", $.ui.dialog.overlay.maxZ );
}
- //Save and then restore scroll since Opera 9.5+ resets when parent z-Index is changed.
- // http://ui.jquery.com/bugs/ticket/3193
- saveScroll = { scrollTop: self.element.attr('scrollTop'), scrollLeft: self.element.attr('scrollLeft') };
+ // Save and then restore scroll
+ // Opera 9.5+ resets when parent z-index is changed.
+ // http://bugs.jqueryui.com/ticket/3193
+ saveScroll = {
+ scrollTop: self.element.attr( "scrollTop" ),
+ scrollLeft: self.element.attr( "scrollLeft" )
+ };
$.ui.dialog.maxZ += 1;
- self.uiDialog.css('z-index', $.ui.dialog.maxZ);
- self.element.attr(saveScroll);
- self._trigger('focus', event);
+ self.uiDialog.css( "z-index", $.ui.dialog.maxZ );
+ self.element.attr( saveScroll );
+ self._trigger( "focus", event );
return self;
},
open: function() {
- if (this._isOpen) { return; }
+ if ( this._isOpen ) {
+ return;
+ }
var self = this,
options = self.options,
uiDialog = self.uiDialog;
- self.overlay = options.modal ? new $.ui.dialog.overlay(self) : null;
- if (uiDialog.next().length) {
- uiDialog.appendTo('body');
- }
+ self.overlay = options.modal ? new $.ui.dialog.overlay( self ) : null;
self._size();
- self._position(options.position);
- uiDialog.show(options.show);
- self.moveToTop(true);
+ self._position( options.position );
+ uiDialog.show( options.show );
+ self.moveToTop( true );
// prevent tabbing out of modal dialogs
- if (options.modal) {
- uiDialog.bind('keypress.ui-dialog', function(event) {
- if (event.keyCode !== $.ui.keyCode.TAB) {
+ if ( options.modal ) {
+ uiDialog.bind( "keypress.ui-dialog", function( event ) {
+ if ( event.keyCode !== $.ui.keyCode.TAB ) {
return;
}
-
- var tabbables = $(':tabbable', this),
- first = tabbables.filter(':first'),
- last = tabbables.filter(':last');
-
- if (event.target === last[0] && !event.shiftKey) {
- first.focus(1);
+
+ var tabbables = $( ":tabbable", this ),
+ first = tabbables.filter( ":first" ),
+ last = tabbables.filter( ":last" );
+
+ if ( event.target === last[0] && !event.shiftKey ) {
+ first.focus( 1 );
return false;
- } else if (event.target === first[0] && event.shiftKey) {
- last.focus(1);
+ } else if ( event.target === first[0] && event.shiftKey ) {
+ last.focus( 1 );
return false;
}
});
@@ -306,58 +325,60 @@ $.widget("ui.dialog", {
// set focus to the first tabbable element in the content area or the first button
// if there are no tabbable elements, set focus on the dialog itself
- $([])
- .add(uiDialog.find('.ui-dialog-content :tabbable:first'))
- .add(uiDialog.find('.ui-dialog-buttonpane :tabbable:first'))
- .add(uiDialog)
- .filter(':first')
- .focus();
-
- self._trigger('open');
+ $( self.element.find( ":tabbable" ).get().concat(
+ uiDialog.find( ".ui-dialog-buttonpane :tabbable" ).get().concat(
+ uiDialog.get() ) ) ).eq( 0 ).focus();
+
self._isOpen = true;
+ self._trigger( "open" );
return self;
},
- _createButtons: function(buttons) {
+ _createButtons: function( buttons ) {
var self = this,
hasButtons = false,
- uiDialogButtonPane = $('<div></div>')
- .addClass(
- 'ui-dialog-buttonpane ' +
- 'ui-widget-content ' +
- 'ui-helper-clearfix'
- );
+ uiDialogButtonPane = $( "<div>" )
+ .addClass( "ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" ),
+ uiButtonSet = $( "<div>" )
+ .addClass( "ui-dialog-buttonset" )
+ .appendTo( uiDialogButtonPane );
// if we already have a button pane, remove it
- self.uiDialog.find('.ui-dialog-buttonpane').remove();
+ self.uiDialog.find( ".ui-dialog-buttonpane" ).remove();
- if (typeof buttons === 'object' && buttons !== null) {
- $.each(buttons, function() {
+ if ( typeof buttons === "object" && buttons !== null ) {
+ $.each( buttons, function() {
return !(hasButtons = true);
});
}
- if (hasButtons) {
- $.each(buttons, function(name, fn) {
- var button = $('<button type="button"></button>')
- .text(name)
- .click(function() { fn.apply(self.element[0], arguments); })
- .appendTo(uiDialogButtonPane);
- if ($.fn.button) {
+ if ( hasButtons ) {
+ $.each( buttons, function( name, props ) {
+ props = $.isFunction( props ) ?
+ { click: props, text: name } :
+ props;
+ var button = $( "<button type='button'>" )
+ .attr( props, true )
+ .unbind( "click" )
+ .click(function() {
+ props.click.apply( self.element[0], arguments );
+ })
+ .appendTo( uiButtonSet );
+ if ( $.fn.button ) {
button.button();
}
});
- uiDialogButtonPane.appendTo(self.uiDialog);
+ uiDialogButtonPane.appendTo( self.uiDialog );
}
},
_makeDraggable: function() {
var self = this,
options = self.options,
- doc = $(document),
+ doc = $( document ),
heightBeforeDrag;
- function filteredUi(ui) {
+ function filteredUi( ui ) {
return {
position: ui.position,
offset: ui.offset
@@ -365,40 +386,45 @@ $.widget("ui.dialog", {
}
self.uiDialog.draggable({
- cancel: '.ui-dialog-content, .ui-dialog-titlebar-close',
- handle: '.ui-dialog-titlebar',
- containment: 'document',
- start: function(event, ui) {
- heightBeforeDrag = options.height === "auto" ? "auto" : $(this).height();
- $(this).height($(this).height()).addClass("ui-dialog-dragging");
- self._trigger('dragStart', event, filteredUi(ui));
+ cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
+ handle: ".ui-dialog-titlebar",
+ containment: "document",
+ start: function( event, ui ) {
+ heightBeforeDrag = options.height === "auto" ? "auto" : $( this ).height();
+ $( this )
+ .height( $( this ).height() )
+ .addClass( "ui-dialog-dragging" );
+ self._trigger( "dragStart", event, filteredUi( ui ) );
},
- drag: function(event, ui) {
- self._trigger('drag', event, filteredUi(ui));
+ drag: function( event, ui ) {
+ self._trigger( "drag", event, filteredUi( ui ) );
},
- stop: function(event, ui) {
- options.position = [ui.position.left - doc.scrollLeft(),
- ui.position.top - doc.scrollTop()];
- $(this).removeClass("ui-dialog-dragging").height(heightBeforeDrag);
- self._trigger('dragStop', event, filteredUi(ui));
+ stop: function( event, ui ) {
+ options.position = [
+ ui.position.left - doc.scrollLeft(),
+ ui.position.top - doc.scrollTop()
+ ];
+ $( this )
+ .removeClass( "ui-dialog-dragging" )
+ .height( heightBeforeDrag );
+ self._trigger( "dragStop", event, filteredUi( ui ) );
$.ui.dialog.overlay.resize();
}
});
},
- _makeResizable: function(handles) {
+ _makeResizable: function( handles ) {
handles = (handles === undefined ? this.options.resizable : handles);
var self = this,
options = self.options,
// .ui-resizable has position: relative defined in the stylesheet
// but dialogs have to use absolute or fixed positioning
- position = self.uiDialog.css('position'),
- resizeHandles = (typeof handles === 'string' ?
+ position = self.uiDialog.css( "position" ),
+ resizeHandles = typeof handles === 'string' ?
handles :
- 'n,e,s,w,se,sw,ne,nw'
- );
+ "n,e,s,w,se,sw,ne,nw";
- function filteredUi(ui) {
+ function filteredUi( ui ) {
return {
originalPosition: ui.originalPosition,
originalSize: ui.originalSize,
@@ -408,209 +434,176 @@ $.widget("ui.dialog", {
}
self.uiDialog.resizable({
- cancel: '.ui-dialog-content',
- containment: 'document',
+ cancel: ".ui-dialog-content",
+ containment: "document",
alsoResize: self.element,
maxWidth: options.maxWidth,
maxHeight: options.maxHeight,
minWidth: options.minWidth,
minHeight: self._minHeight(),
handles: resizeHandles,
- start: function(event, ui) {
- $(this).addClass("ui-dialog-resizing");
- self._trigger('resizeStart', event, filteredUi(ui));
+ start: function( event, ui ) {
+ $( this ).addClass( "ui-dialog-resizing" );
+ self._trigger( "resizeStart", event, filteredUi( ui ) );
},
- resize: function(event, ui) {
- self._trigger('resize', event, filteredUi(ui));
+ resize: function( event, ui ) {
+ self._trigger( "resize", event, filteredUi( ui ) );
},
- stop: function(event, ui) {
- $(this).removeClass("ui-dialog-resizing");
- options.height = $(this).height();
- options.width = $(this).width();
- self._trigger('resizeStop', event, filteredUi(ui));
+ stop: function( event, ui ) {
+ $( this ).removeClass( "ui-dialog-resizing" );
+ options.height = $( this ).height();
+ options.width = $( this ).width();
+ self._trigger( "resizeStop", event, filteredUi( ui ) );
$.ui.dialog.overlay.resize();
}
})
- .css('position', position)
- .find('.ui-resizable-se').addClass('ui-icon ui-icon-grip-diagonal-se');
+ .css( "position", position )
+ .find( ".ui-resizable-se" )
+ .addClass( "ui-icon ui-icon-grip-diagonal-se" );
},
_minHeight: function() {
var options = this.options;
- if (options.height === 'auto') {
+ if ( options.height === "auto" ) {
return options.minHeight;
} else {
- return Math.min(options.minHeight, options.height);
+ return Math.min( options.minHeight, options.height );
}
},
- _position: function(position) {
+ _position: function( position ) {
var myAt = [],
- offset = [0, 0],
+ offset = [ 0, 0 ],
isVisible;
- position = position || $.ui.dialog.prototype.options.position;
+ if ( position ) {
+ // deep extending converts arrays to objects in jQuery <= 1.3.2 :-(
+ // if (typeof position == 'string' || $.isArray(position)) {
+ // myAt = $.isArray(position) ? position : position.split(' ');
- // deep extending converts arrays to objects in jQuery <= 1.3.2 :-(
-// if (typeof position == 'string' || $.isArray(position)) {
-// myAt = $.isArray(position) ? position : position.split(' ');
+ if ( typeof position === "string" || (typeof position === "object" && "0" in position ) ) {
+ myAt = position.split ? position.split( " " ) : [ position[ 0 ], position[ 1 ] ];
+ if ( myAt.length === 1 ) {
+ myAt[ 1 ] = myAt[ 0 ];
+ }
- if (typeof position === 'string' || (typeof position === 'object' && '0' in position)) {
- myAt = position.split ? position.split(' ') : [position[0], position[1]];
- if (myAt.length === 1) {
- myAt[1] = myAt[0];
- }
+ $.each( [ "left", "top" ], function( i, offsetPosition ) {
+ if ( +myAt[ i ] === myAt[ i ] ) {
+ offset[ i ] = myAt[ i ];
+ myAt[ i ] = offsetPosition;
+ }
+ });
- $.each(['left', 'top'], function(i, offsetPosition) {
- if (+myAt[i] === myAt[i]) {
- offset[i] = myAt[i];
- myAt[i] = offsetPosition;
- }
- });
- } else if (typeof position === 'object') {
- if ('left' in position) {
- myAt[0] = 'left';
- offset[0] = position.left;
- } else if ('right' in position) {
- myAt[0] = 'right';
- offset[0] = -position.right;
- }
+ position = {
+ my: myAt.join( " " ),
+ at: myAt.join( " " ),
+ offset: offset.join( " " )
+ };
+ }
- if ('top' in position) {
- myAt[1] = 'top';
- offset[1] = position.top;
- } else if ('bottom' in position) {
- myAt[1] = 'bottom';
- offset[1] = -position.bottom;
- }
+ position = $.extend( {}, $.ui.dialog.prototype.options.position, position );
+ } else {
+ position = $.ui.dialog.prototype.options.position;
}
// need to show the dialog to get the actual offset in the position plugin
- isVisible = this.uiDialog.is(':visible');
- if (!isVisible) {
+ isVisible = this.uiDialog.is( ":visible" );
+ if ( !isVisible ) {
this.uiDialog.show();
}
- this.uiDialog
- // workaround for jQuery bug #5781 http://dev.jquery.com/ticket/5781
- .css({ top: 0, left: 0 })
- .position({
- my: myAt.join(' '),
- at: myAt.join(' '),
- offset: offset.join(' '),
- of: window,
- collision: 'fit',
- // ensure that the titlebar is never outside the document
- using: function(pos) {
- var topOffset = $(this).css(pos).offset().top;
- if (topOffset < 0) {
- $(this).css('top', pos.top - topOffset);
- }
- }
- });
- if (!isVisible) {
+ this.uiDialog.position( position );
+ if ( !isVisible ) {
this.uiDialog.hide();
}
},
- _setOption: function(key, value){
+ _setOptions: function( options ) {
var self = this,
- uiDialog = self.uiDialog,
- isResizable = uiDialog.is(':data(resizable)'),
+ resizableOptions = {},
resize = false;
-
- switch (key) {
- //handling of deprecated beforeclose (vs beforeClose) option
- //Ticket #4669 http://dev.jqueryui.com/ticket/4669
- //TODO: remove in 1.9pre
- case "beforeclose":
- key = "beforeClose";
- break;
+
+ $.each( options, function( key, value ) {
+ self._setOption( key, value );
+
+ if ( key in sizeRelatedOptions ) {
+ resize = true;
+ }
+ if ( key in resizableRelatedOptions ) {
+ resizableOptions[ key ] = value;
+ }
+ });
+
+ if ( resize ) {
+ this._size();
+ }
+ if ( this.uiDialog.is( ":data(resizable)" ) ) {
+ this.uiDialog.resizable( "option", resizableOptions );
+ }
+ },
+
+ _setOption: function( key, value ) {
+ var self = this,
+ uiDialog = self.uiDialog;
+
+ switch ( key ) {
case "buttons":
- self._createButtons(value);
+ self._createButtons( value );
break;
case "closeText":
- // convert whatever was passed in to a string, for text() to not throw up
- self.uiDialogTitlebarCloseText.text("" + value);
+ // ensure that we always pass a string
+ self.uiDialogTitlebarCloseText.text( "" + value );
break;
case "dialogClass":
uiDialog
- .removeClass(self.options.dialogClass)
- .addClass(uiDialogClasses + value);
+ .removeClass( self.options.dialogClass )
+ .addClass( uiDialogClasses + value );
break;
case "disabled":
- if (value) {
- uiDialog.addClass('ui-dialog-disabled');
+ if ( value ) {
+ uiDialog.addClass( "ui-dialog-disabled" );
} else {
- uiDialog.removeClass('ui-dialog-disabled');
+ uiDialog.removeClass( "ui-dialog-disabled" );
}
break;
case "draggable":
- if (value) {
- self._makeDraggable();
- } else {
- uiDialog.draggable('destroy');
- }
- break;
- case "height":
- resize = true;
- break;
- case "maxHeight":
- if (isResizable) {
- uiDialog.resizable('option', 'maxHeight', value);
+ var isDraggable = uiDialog.is( ":data(draggable)" );
+ if ( isDraggable && !value ) {
+ uiDialog.draggable( "destroy" );
}
- resize = true;
- break;
- case "maxWidth":
- if (isResizable) {
- uiDialog.resizable('option', 'maxWidth', value);
- }
- resize = true;
- break;
- case "minHeight":
- if (isResizable) {
- uiDialog.resizable('option', 'minHeight', value);
- }
- resize = true;
- break;
- case "minWidth":
- if (isResizable) {
- uiDialog.resizable('option', 'minWidth', value);
+
+ if ( !isDraggable && value ) {
+ self._makeDraggable();
}
- resize = true;
break;
case "position":
- self._position(value);
+ self._position( value );
break;
case "resizable":
// currently resizable, becoming non-resizable
- if (isResizable && !value) {
- uiDialog.resizable('destroy');
+ var isResizable = uiDialog.is( ":data(resizable)" );
+ if ( isResizable && !value ) {
+ uiDialog.resizable( "destroy" );
}
// currently resizable, changing handles
- if (isResizable && typeof value === 'string') {
- uiDialog.resizable('option', 'handles', value);
+ if ( isResizable && typeof value === "string" ) {
+ uiDialog.resizable( "option", "handles", value );
}
// currently non-resizable, becoming resizable
- if (!isResizable && value !== false) {
- self._makeResizable(value);
+ if ( !isResizable && value !== false ) {
+ self._makeResizable( value );
}
break;
case "title":
// convert whatever was passed in o a string, for html() to not throw up
- $(".ui-dialog-title", self.uiDialogTitlebar).html("" + (value || '&#160;'));
- break;
- case "width":
- resize = true;
+ $( ".ui-dialog-title", self.uiDialogTitlebar )
+ .html( "" + ( value || "&#160;" ) );
break;
}
- $.Widget.prototype._setOption.apply(self, arguments);
- if (resize) {
- self._size();
- }
+ $.Widget.prototype._setOption.apply( self, arguments );
},
_size: function() {
@@ -618,36 +611,51 @@ $.widget("ui.dialog", {
* divs will both have width and height set, so we need to reset them
*/
var options = this.options,
- nonContentHeight;
+ nonContentHeight,
+ minContentHeight,
+ isVisible = this.uiDialog.is( ":visible" );
// reset content sizing
- // hide for non content measurement because height: 0 doesn't work in IE quirks mode (see #4350)
- this.element.css({
- width: 'auto',
+ this.element.show().css({
+ width: "auto",
minHeight: 0,
height: 0
});
+ if ( options.minWidth > options.width ) {
+ options.width = options.minWidth;
+ }
+
// reset wrapper sizing
// determine the height of all the non-content elements
nonContentHeight = this.uiDialog.css({
- height: 'auto',
+ height: "auto",
width: options.width
})
.height();
+ minContentHeight = Math.max( 0, options.minHeight - nonContentHeight );
+
+ if ( options.height === "auto" ) {
+ // only needed for IE6 support
+ if ( $.support.minHeight ) {
+ this.element.css({
+ minHeight: minContentHeight,
+ height: "auto"
+ });
+ } else {
+ this.uiDialog.show();
+ var autoHeight = this.element.css( "height", "auto" ).height();
+ if ( !isVisible ) {
+ this.uiDialog.hide();
+ }
+ this.element.height( Math.max( autoHeight, minContentHeight ) );
+ }
+ } else {
+ this.element.height( Math.max( options.height - nonContentHeight, 0 ) );
+ }
- this.element
- .css(options.height === 'auto' ? {
- minHeight: Math.max(options.minHeight - nonContentHeight, 0),
- height: 'auto'
- } : {
- minHeight: 0,
- height: Math.max(options.height - nonContentHeight, 0)
- })
- .show();
-
- if (this.uiDialog.is(':data(resizable)')) {
- this.uiDialog.resizable('option', 'minHeight', this._minHeight());
+ if (this.uiDialog.is( ":data(resizable)" ) ) {
+ this.uiDialog.resizable( "option", "minHeight", this._minHeight() );
}
}
});
@@ -659,83 +667,93 @@ $.extend($.ui.dialog, {
maxZ: 0,
getTitleId: function($el) {
- var id = $el.attr('id');
- if (!id) {
+ var id = $el.attr( "id" );
+ if ( !id ) {
this.uuid += 1;
id = this.uuid;
}
- return 'ui-dialog-title-' + id;
+ return "ui-dialog-title-" + id;
},
- overlay: function(dialog) {
- this.$el = $.ui.dialog.overlay.create(dialog);
+ overlay: function( dialog ) {
+ this.$el = $.ui.dialog.overlay.create( dialog );
}
});
-$.extend($.ui.dialog.overlay, {
+$.extend( $.ui.dialog.overlay, {
instances: [],
// reuse old instances due to IE memory leak with alpha transparency (see #5185)
oldInstances: [],
maxZ: 0,
- events: $.map('focus,mousedown,mouseup,keydown,keypress,click'.split(','),
- function(event) { return event + '.dialog-overlay'; }).join(' '),
- create: function(dialog) {
- if (this.instances.length === 0) {
+ events: $.map(
+ "focus,mousedown,mouseup,keydown,keypress,click".split( "," ),
+ function( event ) {
+ return event + ".dialog-overlay";
+ }
+ ).join( " " ),
+ create: function( dialog ) {
+ if ( this.instances.length === 0 ) {
// prevent use of anchors and inputs
// we use a setTimeout in case the overlay is created from an
// event that we're going to be cancelling (see #2804)
setTimeout(function() {
// handle $(el).dialog().dialog('close') (see #4065)
- if ($.ui.dialog.overlay.instances.length) {
- $(document).bind($.ui.dialog.overlay.events, function(event) {
+ if ( $.ui.dialog.overlay.instances.length ) {
+ $( document ).bind( $.ui.dialog.overlay.events, function( event ) {
// stop events if the z-index of the target is < the z-index of the overlay
- return ($(event.target).zIndex() >= $.ui.dialog.overlay.maxZ);
+ // we cannot return true when we don't want to cancel the event (#3523)
+ if ( $( event.target ).zIndex() < $.ui.dialog.overlay.maxZ ) {
+ return false;
+ }
});
}
- }, 1);
+ }, 1 );
// allow closing by pressing the escape key
- $(document).bind('keydown.dialog-overlay', function(event) {
- if (dialog.options.closeOnEscape && event.keyCode &&
- event.keyCode === $.ui.keyCode.ESCAPE) {
+ $( document ).bind( "keydown.dialog-overlay", function( event ) {
+ if ( dialog.options.closeOnEscape && event.keyCode &&
+ event.keyCode === $.ui.keyCode.ESCAPE ) {
- dialog.close(event);
+ dialog.close( event );
event.preventDefault();
}
});
// handle window resize
- $(window).bind('resize.dialog-overlay', $.ui.dialog.overlay.resize);
+ $( window ).bind( "resize.dialog-overlay", $.ui.dialog.overlay.resize );
}
- var $el = (this.oldInstances.pop() || $('<div></div>').addClass('ui-widget-overlay'))
- .appendTo(document.body)
+ var $el = ( this.oldInstances.pop() || $( "<div>" ).addClass( "ui-widget-overlay" ) )
+ .appendTo( document.body )
.css({
width: this.width(),
height: this.height()
});
- if ($.fn.bgiframe) {
+ if ( $.fn.bgiframe ) {
$el.bgiframe();
}
- this.instances.push($el);
+ this.instances.push( $el );
return $el;
},
- destroy: function($el) {
- this.oldInstances.push(this.instances.splice($.inArray($el, this.instances), 1)[0]);
+ destroy: function( $el ) {
+ var indexOf = $.inArray( $el, this.instances );
+ if ( indexOf !== -1 ) {
+ this.oldInstances.push( this.instances.splice( indexOf, 1 )[ 0 ] );
+ }
- if (this.instances.length === 0) {
- $([document, window]).unbind('.dialog-overlay');
+ if ( this.instances.length === 0 ) {
+ $( [ document, window ] ).unbind( ".dialog-overlay" );
}
$el.remove();
-
+
// adjust the maxZ to allow other modal dialogs to continue to work (see #4309)
var maxZ = 0;
- $.each(this.instances, function() {
- maxZ = Math.max(maxZ, this.css('z-index'));
+ $.each( this.instances, function() {
+ maxZ = Math.max( maxZ, this.css( "z-index" ) );
});
this.maxZ = maxZ;
},
@@ -744,7 +762,7 @@ $.extend($.ui.dialog.overlay, {
var scrollHeight,
offsetHeight;
// handle IE 6
- if ($.browser.msie && $.browser.version < 7) {
+ if ( $.browser.msie && $.browser.version < 7 ) {
scrollHeight = Math.max(
document.documentElement.scrollHeight,
document.body.scrollHeight
@@ -754,14 +772,14 @@ $.extend($.ui.dialog.overlay, {
document.body.offsetHeight
);
- if (scrollHeight < offsetHeight) {
- return $(window).height() + 'px';
+ if ( scrollHeight < offsetHeight ) {
+ return $( window ).height() + "px";
} else {
- return scrollHeight + 'px';
+ return scrollHeight + "px";
}
// handle "good" browsers
} else {
- return $(document).height() + 'px';
+ return $( document ).height() + "px";
}
},
@@ -769,7 +787,7 @@ $.extend($.ui.dialog.overlay, {
var scrollWidth,
offsetWidth;
// handle IE 6
- if ($.browser.msie && $.browser.version < 7) {
+ if ( $.browser.msie && $.browser.version < 7 ) {
scrollWidth = Math.max(
document.documentElement.scrollWidth,
document.body.scrollWidth
@@ -779,14 +797,14 @@ $.extend($.ui.dialog.overlay, {
document.body.offsetWidth
);
- if (scrollWidth < offsetWidth) {
- return $(window).width() + 'px';
+ if ( scrollWidth < offsetWidth ) {
+ return $( window ).width() + "px";
} else {
- return scrollWidth + 'px';
+ return scrollWidth + "px";
}
// handle "good" browsers
} else {
- return $(document).width() + 'px';
+ return $( document ).width() + "px";
}
},
@@ -799,9 +817,9 @@ $.extend($.ui.dialog.overlay, {
* This is handled by shrinking the overlay before setting it
* to the full document size.
*/
- var $overlays = $([]);
- $.each($.ui.dialog.overlay.instances, function() {
- $overlays = $overlays.add(this);
+ var $overlays = $( [] );
+ $.each( $.ui.dialog.overlay.instances, function() {
+ $overlays = $overlays.add( this );
});
$overlays.css({
@@ -814,10 +832,10 @@ $.extend($.ui.dialog.overlay, {
}
});
-$.extend($.ui.dialog.overlay.prototype, {
+$.extend( $.ui.dialog.overlay.prototype, {
destroy: function() {
- $.ui.dialog.overlay.destroy(this.$el);
+ $.ui.dialog.overlay.destroy( this.$el );
}
});
-}(jQuery));
+}( jQuery ) );
diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js
index 9496ce3f5..2d4947145 100644
--- a/ui/jquery.ui.draggable.js
+++ b/ui/jquery.ui.draggable.js
@@ -1,9 +1,9 @@
/*
* jQuery UI Draggable @VERSION
*
- * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
*
* http://docs.jquery.com/UI/Draggables
*
@@ -12,7 +12,7 @@
* jquery.ui.mouse.js
* jquery.ui.widget.js
*/
-(function($) {
+(function( $, undefined ) {
$.widget("ui.draggable", $.ui.mouse, {
widgetEventPrefix: "drag",
@@ -284,7 +284,7 @@ $.widget("ui.draggable", $.ui.mouse, {
// 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
// the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
- if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) {
+ if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
po.left += this.scrollParent.scrollLeft();
po.top += this.scrollParent.scrollTop();
}
@@ -333,10 +333,10 @@ $.widget("ui.draggable", $.ui.mouse, {
var o = this.options;
if(o.containment == 'parent') o.containment = this.helper[0].parentNode;
if(o.containment == 'document' || o.containment == 'window') this.containment = [
- 0 - this.offset.relative.left - this.offset.parent.left,
- 0 - this.offset.relative.top - this.offset.parent.top,
- $(o.containment == 'document' ? document : window).width() - this.helperProportions.width - this.margins.left,
- ($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
+ (o.containment == 'document' ? 0 : $(window).scrollLeft()) - this.offset.relative.left - this.offset.parent.left,
+ (o.containment == 'document' ? 0 : $(window).scrollTop()) - this.offset.relative.top - this.offset.parent.top,
+ (o.containment == 'document' ? 0 : $(window).scrollLeft()) + $(o.containment == 'document' ? document : window).width() - this.helperProportions.width - this.margins.left,
+ (o.containment == 'document' ? 0 : $(window).scrollTop()) + ($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
];
if(!(/^(document|window|parent)$/).test(o.containment) && o.containment.constructor != Array) {
@@ -360,7 +360,7 @@ $.widget("ui.draggable", $.ui.mouse, {
if(!pos) pos = this.position;
var mod = d == "absolute" ? 1 : -1;
- var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+ var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
return {
top: (
@@ -381,7 +381,7 @@ $.widget("ui.draggable", $.ui.mouse, {
_generatePosition: function(event) {
- var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+ var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
var pageX = event.pageX;
var pageY = event.pageY;
diff --git a/ui/jquery.ui.droppable.js b/ui/jquery.ui.droppable.js
index 4cd7f56e2..084f845c7 100644
--- a/ui/jquery.ui.droppable.js
+++ b/ui/jquery.ui.droppable.js
@@ -1,9 +1,9 @@
/*
* jQuery UI Droppable @VERSION
*
- * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
*
* http://docs.jquery.com/UI/Droppables
*
@@ -13,7 +13,7 @@
* jquery.ui.mouse.js
* jquery.ui.draggable.js
*/
-(function($) {
+(function( $, undefined ) {
$.widget("ui.droppable", {
widgetEventPrefix: "drop",
@@ -161,8 +161,8 @@ $.ui.intersect = function(draggable, droppable, toleranceMode) {
switch (toleranceMode) {
case 'fit':
- return (l < x1 && x2 < r
- && t < y1 && y2 < b);
+ return (l <= x1 && x2 <= r
+ && t <= y1 && y2 <= b);
break;
case 'intersect':
return (l < x1 + (draggable.helperProportions.width / 2) // Right Half
diff --git a/ui/jquery.ui.mouse.js b/ui/jquery.ui.mouse.js
index 30c5f14a2..bfe8640a2 100644
--- a/ui/jquery.ui.mouse.js
+++ b/ui/jquery.ui.mouse.js
@@ -1,16 +1,16 @@
/*!
* jQuery UI Mouse @VERSION
*
- * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
*
* http://docs.jquery.com/UI/Mouse
*
* Depends:
* jquery.ui.widget.js
*/
-(function($) {
+(function( $, undefined ) {
$.widget("ui.mouse", {
options: {
@@ -26,8 +26,8 @@ $.widget("ui.mouse", {
return self._mouseDown(event);
})
.bind('click.'+this.widgetName, function(event) {
- if(self._preventClickEvent) {
- self._preventClickEvent = false;
+ if (true === $.data(event.target, self.widgetName + '.preventClickEvent')) {
+ $.removeData(event.target, self.widgetName + '.preventClickEvent');
event.stopImmediatePropagation();
return false;
}
@@ -86,18 +86,14 @@ $.widget("ui.mouse", {
.bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
.bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
- // preventDefault() is used to prevent the selection of text here -
- // however, in Safari, this causes select boxes not to be selectable
- // anymore, so this fix is needed
- ($.browser.safari || event.preventDefault());
-
+ event.preventDefault();
event.originalEvent.mouseHandled = true;
return true;
},
_mouseMove: function(event) {
// IE mouseup check - mouseup happened when mouse was out of window
- if ($.browser.msie && !event.button) {
+ if ($.browser.msie && !(document.documentMode >= 9) && !event.button) {
return this._mouseUp(event);
}
@@ -122,7 +118,11 @@ $.widget("ui.mouse", {
if (this._mouseStarted) {
this._mouseStarted = false;
- this._preventClickEvent = (event.target == this._mouseDownEvent.target);
+
+ if (event.target == this._mouseDownEvent.target) {
+ $.data(event.target, this.widgetName + '.preventClickEvent', true);
+ }
+
this._mouseStop(event);
}
diff --git a/ui/jquery.ui.position.js b/ui/jquery.ui.position.js
index 11f8baa06..3992e1c63 100644
--- a/ui/jquery.ui.position.js
+++ b/ui/jquery.ui.position.js
@@ -1,20 +1,19 @@
/*
* jQuery UI Position @VERSION
*
- * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
*
* http://docs.jquery.com/UI/Position
*/
-(function( $ ) {
+(function( $, undefined ) {
$.ui = $.ui || {};
var horizontalPositions = /left|center|right/,
- horizontalDefault = "center",
verticalPositions = /top|center|bottom/,
- verticalDefault = "center",
+ center = "center",
_position = $.fn.position,
_offset = $.fn.offset;
@@ -27,21 +26,22 @@ $.fn.position = function( options ) {
options = $.extend( {}, options );
var target = $( options.of ),
+ targetElem = target[0],
collision = ( options.collision || "flip" ).split( " " ),
offset = options.offset ? options.offset.split( " " ) : [ 0, 0 ],
targetWidth,
targetHeight,
basePosition;
- if ( options.of.nodeType === 9 ) {
+ if ( targetElem.nodeType === 9 ) {
targetWidth = target.width();
targetHeight = target.height();
basePosition = { top: 0, left: 0 };
- } else if ( options.of.scrollTo && options.of.document ) {
+ } else if ( $.isWindow( targetElem ) ) {
targetWidth = target.width();
targetHeight = target.height();
basePosition = { top: target.scrollTop(), left: target.scrollLeft() };
- } else if ( options.of.preventDefault ) {
+ } else if ( targetElem.preventDefault ) {
// force left top to allow flipping
options.at = "left top";
targetWidth = targetHeight = 0;
@@ -58,13 +58,13 @@ $.fn.position = function( options ) {
var pos = ( options[this] || "" ).split( " " );
if ( pos.length === 1) {
pos = horizontalPositions.test( pos[0] ) ?
- pos.concat( [verticalDefault] ) :
+ pos.concat( [center] ) :
verticalPositions.test( pos[0] ) ?
- [ horizontalDefault ].concat( pos ) :
- [ horizontalDefault, verticalDefault ];
+ [ center ].concat( pos ) :
+ [ center, center ];
}
- pos[ 0 ] = horizontalPositions.test( pos[0] ) ? pos[ 0 ] : horizontalDefault;
- pos[ 1 ] = verticalPositions.test( pos[1] ) ? pos[ 1 ] : verticalDefault;
+ pos[ 0 ] = horizontalPositions.test( pos[0] ) ? pos[ 0 ] : center;
+ pos[ 1 ] = verticalPositions.test( pos[1] ) ? pos[ 1 ] : center;
options[ this ] = pos;
});
@@ -82,13 +82,13 @@ $.fn.position = function( options ) {
if ( options.at[0] === "right" ) {
basePosition.left += targetWidth;
- } else if (options.at[0] === horizontalDefault ) {
+ } else if (options.at[0] === center ) {
basePosition.left += targetWidth / 2;
}
if ( options.at[1] === "bottom" ) {
basePosition.top += targetHeight;
- } else if ( options.at[1] === verticalDefault ) {
+ } else if ( options.at[1] === center ) {
basePosition.top += targetHeight / 2;
}
@@ -99,23 +99,35 @@ $.fn.position = function( options ) {
var elem = $( this ),
elemWidth = elem.outerWidth(),
elemHeight = elem.outerHeight(),
- position = $.extend( {}, basePosition );
+ marginLeft = parseInt( $.curCSS( this, "marginLeft", true ) ) || 0,
+ marginTop = parseInt( $.curCSS( this, "marginTop", true ) ) || 0,
+ collisionWidth = elemWidth + marginLeft +
+ parseInt( $.curCSS( this, "marginRight", true ) ) || 0,
+ collisionHeight = elemHeight + marginTop +
+ parseInt( $.curCSS( this, "marginBottom", true ) ) || 0,
+ position = $.extend( {}, basePosition ),
+ collisionPosition;
if ( options.my[0] === "right" ) {
position.left -= elemWidth;
- } else if ( options.my[0] === horizontalDefault ) {
+ } else if ( options.my[0] === center ) {
position.left -= elemWidth / 2;
}
if ( options.my[1] === "bottom" ) {
position.top -= elemHeight;
- } else if ( options.my[1] === verticalDefault ) {
+ } else if ( options.my[1] === center ) {
position.top -= elemHeight / 2;
}
// prevent fractions (see #5280)
- position.left = parseInt( position.left );
- position.top = parseInt( position.top );
+ position.left = Math.round( position.left );
+ position.top = Math.round( position.top );
+
+ collisionPosition = {
+ left: position.left - marginLeft,
+ top: position.top - marginTop
+ };
$.each( [ "left", "top" ], function( i, dir ) {
if ( $.ui.position[ collision[i] ] ) {
@@ -124,6 +136,9 @@ $.fn.position = function( options ) {
targetHeight: targetHeight,
elemWidth: elemWidth,
elemHeight: elemHeight,
+ collisionPosition: collisionPosition,
+ collisionWidth: collisionWidth,
+ collisionHeight: collisionHeight,
offset: offset,
my: options.my,
at: options.at
@@ -142,41 +157,44 @@ $.ui.position = {
fit: {
left: function( position, data ) {
var win = $( window ),
- over = position.left + data.elemWidth - win.width() - win.scrollLeft();
- position.left = over > 0 ? position.left - over : Math.max( 0, position.left );
+ over = data.collisionPosition.left + data.collisionWidth - win.width() - win.scrollLeft();
+ position.left = over > 0 ? position.left - over : Math.max( position.left - data.collisionPosition.left, position.left );
},
top: function( position, data ) {
var win = $( window ),
- over = position.top + data.elemHeight - win.height() - win.scrollTop();
- position.top = over > 0 ? position.top - over : Math.max( 0, position.top );
+ over = data.collisionPosition.top + data.collisionHeight - win.height() - win.scrollTop();
+ position.top = over > 0 ? position.top - over : Math.max( position.top - data.collisionPosition.top, position.top );
}
},
flip: {
left: function( position, data ) {
- if ( data.at[0] === "center" ) {
+ if ( data.at[0] === center ) {
return;
}
var win = $( window ),
- over = position.left + data.elemWidth - win.width() - win.scrollLeft(),
+ over = data.collisionPosition.left + data.collisionWidth - win.width() - win.scrollLeft(),
myOffset = data.my[ 0 ] === "left" ?
-data.elemWidth :
data.my[ 0 ] === "right" ?
data.elemWidth :
0,
+ atOffset = data.at[ 0 ] === "left" ?
+ data.targetWidth :
+ -data.targetWidth,
offset = -2 * data.offset[ 0 ];
- position.left += position.left < 0 ?
- myOffset + data.targetWidth + offset :
+ position.left += data.collisionPosition.left < 0 ?
+ myOffset + atOffset + offset :
over > 0 ?
- myOffset - data.targetWidth + offset :
+ myOffset + atOffset + offset :
0;
},
top: function( position, data ) {
- if ( data.at[1] === "center" ) {
+ if ( data.at[1] === center ) {
return;
}
var win = $( window ),
- over = position.top + data.elemHeight - win.height() - win.scrollTop(),
+ over = data.collisionPosition.top + data.collisionHeight - win.height() - win.scrollTop(),
myOffset = data.my[ 1 ] === "top" ?
-data.elemHeight :
data.my[ 1 ] === "bottom" ?
@@ -186,8 +204,8 @@ $.ui.position = {
data.targetHeight :
-data.targetHeight,
offset = -2 * data.offset[ 1 ];
- position.top += position.top < 0 ?
- myOffset + data.targetHeight + offset :
+ position.top += data.collisionPosition.top < 0 ?
+ myOffset + atOffset + offset :
over > 0 ?
myOffset + atOffset + offset :
0;
diff --git a/ui/jquery.ui.progressbar.js b/ui/jquery.ui.progressbar.js
index b38d826f0..009049d27 100644
--- a/ui/jquery.ui.progressbar.js
+++ b/ui/jquery.ui.progressbar.js
@@ -1,9 +1,9 @@
/*
* jQuery UI Progressbar @VERSION
*
- * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
*
* http://docs.jquery.com/UI/Progressbar
*
@@ -11,25 +11,30 @@
* jquery.ui.core.js
* jquery.ui.widget.js
*/
-(function( $ ) {
+(function( $, undefined ) {
$.widget( "ui.progressbar", {
options: {
- value: 0
+ value: 0,
+ max: 100
},
+
+ min: 0,
+
_create: function() {
this.element
.addClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" )
.attr({
role: "progressbar",
- "aria-valuemin": this._valueMin(),
- "aria-valuemax": this._valueMax(),
+ "aria-valuemin": this.min,
+ "aria-valuemax": this.options.max,
"aria-valuenow": this._value()
});
this.valueDiv = $( "<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>" )
.appendTo( this.element );
+ this.oldValue = this._value();
this._refreshValue();
},
@@ -56,12 +61,12 @@ $.widget( "ui.progressbar", {
},
_setOption: function( key, value ) {
- switch ( key ) {
- case "value":
- this.options.value = value;
- this._refreshValue();
- this._trigger( "change" );
- break;
+ if ( key === "value" ) {
+ this.options.value = value;
+ this._refreshValue();
+ if ( this._value() === this.options.max ) {
+ this._trigger( "complete" );
+ }
}
$.Widget.prototype._setOption.apply( this, arguments );
@@ -73,29 +78,25 @@ $.widget( "ui.progressbar", {
if ( typeof val !== "number" ) {
val = 0;
}
- if ( val < this._valueMin() ) {
- val = this._valueMin();
- }
- if ( val > this._valueMax() ) {
- val = this._valueMax();
- }
-
- return val;
+ return Math.min( this.options.max, Math.max( this.min, val ) );
},
- _valueMin: function() {
- return 0;
- },
-
- _valueMax: function() {
- return 100;
+ _percentage: function() {
+ return 100 * this._value() / this.options.max;
},
_refreshValue: function() {
var value = this.value();
+ var percentage = this._percentage();
+
+ if ( this.oldValue !== value ) {
+ this.oldValue = value;
+ this._trigger( "change" );
+ }
+
this.valueDiv
- [ value === this._valueMax() ? "addClass" : "removeClass"]( "ui-corner-right" )
- .width( value + "%" );
+ .toggleClass( "ui-corner-right", value === this.options.max )
+ .width( percentage.toFixed(0) + "%" );
this.element.attr( "aria-valuenow", value );
}
});
diff --git a/ui/jquery.ui.resizable.js b/ui/jquery.ui.resizable.js
index 4ba723884..a835ef9a8 100644
--- a/ui/jquery.ui.resizable.js
+++ b/ui/jquery.ui.resizable.js
@@ -1,9 +1,9 @@
/*
* jQuery UI Resizable @VERSION
*
- * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
*
* http://docs.jquery.com/UI/Resizables
*
@@ -12,7 +12,7 @@
* jquery.ui.mouse.js
* jquery.ui.widget.js
*/
-(function($) {
+(function( $, undefined ) {
$.widget("ui.resizable", $.ui.mouse, {
widgetEventPrefix: "resize",
@@ -528,28 +528,29 @@ $.extend($.ui.resizable, {
$.ui.plugin.add("resizable", "alsoResize", {
- start: function(event, ui) {
-
+ start: function (event, ui) {
var self = $(this).data("resizable"), o = self.options;
- var _store = function(exp) {
+ var _store = function (exp) {
$(exp).each(function() {
- $(this).data("resizable-alsoresize", {
- width: parseInt($(this).width(), 10), height: parseInt($(this).height(), 10),
- left: parseInt($(this).css('left'), 10), top: parseInt($(this).css('top'), 10)
+ var el = $(this);
+ el.data("resizable-alsoresize", {
+ width: parseInt(el.width(), 10), height: parseInt(el.height(), 10),
+ left: parseInt(el.css('left'), 10), top: parseInt(el.css('top'), 10),
+ position: el.css('position') // to reset Opera on stop()
});
});
};
if (typeof(o.alsoResize) == 'object' && !o.alsoResize.parentNode) {
- if (o.alsoResize.length) { o.alsoResize = o.alsoResize[0]; _store(o.alsoResize); }
- else { $.each(o.alsoResize, function(exp, c) { _store(exp); }); }
+ if (o.alsoResize.length) { o.alsoResize = o.alsoResize[0]; _store(o.alsoResize); }
+ else { $.each(o.alsoResize, function (exp) { _store(exp); }); }
}else{
_store(o.alsoResize);
}
},
- resize: function(event, ui){
+ resize: function (event, ui) {
var self = $(this).data("resizable"), o = self.options, os = self.originalSize, op = self.originalPosition;
var delta = {
@@ -557,18 +558,19 @@ $.ui.plugin.add("resizable", "alsoResize", {
top: (self.position.top - op.top) || 0, left: (self.position.left - op.left) || 0
},
- _alsoResize = function(exp, c) {
+ _alsoResize = function (exp, c) {
$(exp).each(function() {
- var el = $(this), start = $(this).data("resizable-alsoresize"), style = {}, css = c && c.length ? c : ['width', 'height', 'top', 'left'];
+ var el = $(this), start = $(this).data("resizable-alsoresize"), style = {},
+ css = c && c.length ? c : el.parents(ui.originalElement[0]).length ? ['width', 'height'] : ['width', 'height', 'top', 'left'];
- $.each(css || ['width', 'height', 'top', 'left'], function(i, prop) {
+ $.each(css, function (i, prop) {
var sum = (start[prop]||0) + (delta[prop]||0);
if (sum && sum >= 0)
style[prop] = sum || null;
});
- //Opera fixing relative position
- if (/relative/.test(el.css('position')) && $.browser.opera) {
+ // Opera fixing relative position
+ if ($.browser.opera && /relative/.test(el.css('position'))) {
self._revertToRelativePosition = true;
el.css({ position: 'absolute', top: 'auto', left: 'auto' });
}
@@ -578,22 +580,33 @@ $.ui.plugin.add("resizable", "alsoResize", {
};
if (typeof(o.alsoResize) == 'object' && !o.alsoResize.nodeType) {
- $.each(o.alsoResize, function(exp, c) { _alsoResize(exp, c); });
+ $.each(o.alsoResize, function (exp, c) { _alsoResize(exp, c); });
}else{
_alsoResize(o.alsoResize);
}
},
- stop: function(event, ui){
- var self = $(this).data("resizable");
+ stop: function (event, ui) {
+ var self = $(this).data("resizable"), o = self.options;
- //Opera fixing relative position
- if (self._revertToRelativePosition && $.browser.opera) {
+ var _reset = function (exp) {
+ $(exp).each(function() {
+ var el = $(this);
+ // reset position for Opera - no need to verify it was changed
+ el.css({ position: el.data("resizable-alsoresize").position });
+ });
+ };
+
+ if (self._revertToRelativePosition) {
self._revertToRelativePosition = false;
- el.css({ position: 'relative' });
+ if (typeof(o.alsoResize) == 'object' && !o.alsoResize.nodeType) {
+ $.each(o.alsoResize, function (exp) { _reset(exp); });
+ }else{
+ _reset(o.alsoResize);
+ }
}
- $(this).removeData("resizable-alsoresize-start");
+ $(this).removeData("resizable-alsoresize");
}
});
diff --git a/ui/jquery.ui.selectable.js b/ui/jquery.ui.selectable.js
index a14f720b7..e776e483d 100644
--- a/ui/jquery.ui.selectable.js
+++ b/ui/jquery.ui.selectable.js
@@ -1,9 +1,9 @@
/*
* jQuery UI Selectable @VERSION
*
- * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
*
* http://docs.jquery.com/UI/Selectables
*
@@ -12,7 +12,7 @@
* jquery.ui.mouse.js
* jquery.ui.widget.js
*/
-(function($) {
+(function( $, undefined ) {
$.widget("ui.selectable", $.ui.mouse, {
options: {
@@ -56,9 +56,7 @@ $.widget("ui.selectable", $.ui.mouse, {
this._mouseInit();
- this.helper = $(document.createElement('div'))
- .css({border:'1px dotted black'})
- .addClass("ui-selectable-helper");
+ this.helper = $("<div class='ui-selectable-helper'></div>");
},
destroy: function() {
@@ -91,8 +89,6 @@ $.widget("ui.selectable", $.ui.mouse, {
$(options.appendTo).append(this.helper);
// position helper (lasso)
this.helper.css({
- "z-index": 100,
- "position": "absolute",
"left": event.clientX,
"top": event.clientY,
"width": 0,
@@ -121,14 +117,23 @@ $.widget("ui.selectable", $.ui.mouse, {
$(event.target).parents().andSelf().each(function() {
var selectee = $.data(this, "selectable-item");
if (selectee) {
- selectee.$element.removeClass("ui-unselecting").addClass('ui-selecting');
- selectee.unselecting = false;
- selectee.selecting = true;
- selectee.selected = true;
- // selectable SELECTING callback
- self._trigger("selecting", event, {
- selecting: selectee.element
- });
+ var doSelect = !event.metaKey || !selectee.$element.hasClass('ui-selected');
+ selectee.$element
+ .removeClass(doSelect ? "ui-unselecting" : "ui-selected")
+ .addClass(doSelect ? "ui-selecting" : "ui-unselecting");
+ selectee.unselecting = !doSelect;
+ selectee.selecting = doSelect;
+ selectee.selected = doSelect;
+ // selectable (UN)SELECTING callback
+ if (doSelect) {
+ self._trigger("selecting", event, {
+ selecting: selectee.element
+ });
+ } else {
+ self._trigger("unselecting", event, {
+ unselecting: selectee.element
+ });
+ }
return false;
}
});
diff --git a/ui/jquery.ui.slider.js b/ui/jquery.ui.slider.js
index 440e75635..d3b4744e3 100644
--- a/ui/jquery.ui.slider.js
+++ b/ui/jquery.ui.slider.js
@@ -1,9 +1,9 @@
/*
* jQuery UI Slider @VERSION
*
- * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
*
* http://docs.jquery.com/UI/Slider
*
@@ -12,8 +12,7 @@
* jquery.ui.mouse.js
* jquery.ui.widget.js
*/
-
-(function( $ ) {
+(function( $, undefined ) {
// number of pages in a slider
// (how many times can you page up/down to go through the whole range)
@@ -181,24 +180,24 @@ $.widget( "ui.slider", $.ui.mouse, {
newVal = self._valueMax();
break;
case $.ui.keyCode.PAGE_UP:
- newVal = curVal + ( (self._valueMax() - self._valueMin()) / numPages );
+ newVal = self._trimAlignValue( curVal + ( (self._valueMax() - self._valueMin()) / numPages ) );
break;
case $.ui.keyCode.PAGE_DOWN:
- newVal = curVal - ( (self._valueMax() - self._valueMin()) / numPages );
+ newVal = self._trimAlignValue( curVal - ( (self._valueMax() - self._valueMin()) / numPages ) );
break;
case $.ui.keyCode.UP:
case $.ui.keyCode.RIGHT:
if ( curVal === self._valueMax() ) {
return;
}
- newVal = curVal + step;
+ newVal = self._trimAlignValue( curVal + step );
break;
case $.ui.keyCode.DOWN:
case $.ui.keyCode.LEFT:
if ( curVal === self._valueMin() ) {
return;
}
- newVal = curVal - step;
+ newVal = self._trimAlignValue( curVal - step );
break;
}
@@ -310,8 +309,9 @@ $.widget( "ui.slider", $.ui.mouse, {
( parseInt( closestHandle.css("marginTop"), 10 ) || 0)
};
- normValue = this._normValueFromMouse( position );
- this._slide( event, index, normValue );
+ if ( !this.handles.hasClass( "ui-state-hover" ) ) {
+ this._slide( event, index, normValue );
+ }
this._animateOff = true;
return true;
},
@@ -585,18 +585,18 @@ $.widget( "ui.slider", $.ui.mouse, {
// returns the step-aligned value that val is closest to, between (inclusive) min and max
_trimAlignValue: function( val ) {
- if ( val < this._valueMin() ) {
+ if ( val <= this._valueMin() ) {
return this._valueMin();
}
- if ( val > this._valueMax() ) {
+ if ( val >= this._valueMax() ) {
return this._valueMax();
}
- var step = this.options.step,
- valModStep = val % step,
+ var step = ( this.options.step > 0 ) ? this.options.step : 1,
+ valModStep = (val - this._valueMin()) % step;
alignValue = val - valModStep;
- if ( valModStep >= ( step / 2 ) ) {
- alignValue += step;
+ if ( Math.abs(valModStep) * 2 >= step ) {
+ alignValue += ( valModStep > 0 ) ? step : ( -step );
}
// Since JavaScript has problems with large floats, round
diff --git a/ui/jquery.ui.sortable.js b/ui/jquery.ui.sortable.js
index 0fa3a1253..32757d41c 100644
--- a/ui/jquery.ui.sortable.js
+++ b/ui/jquery.ui.sortable.js
@@ -1,9 +1,9 @@
/*
* jQuery UI Sortable @VERSION
*
- * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
*
* http://docs.jquery.com/UI/Sortables
*
@@ -12,7 +12,7 @@
* jquery.ui.mouse.js
* jquery.ui.widget.js
*/
-(function($) {
+(function( $, undefined ) {
$.widget("ui.sortable", $.ui.mouse, {
widgetEventPrefix: "sort",
@@ -77,11 +77,10 @@ $.widget("ui.sortable", $.ui.mouse, {
if ( key === "disabled" ) {
this.options[ key ] = value;
- this.widget()
- [ value ? "addClass" : "removeClass"]( "ui-sortable-disabled" );
+ this.widget().toggleClass( "ui-sortable-disabled", !!value );
} else {
// Don't call widget base _setOption for disable as it adds ui-state-disabled class
- $.Widget.prototype._setOption.apply(self, arguments);
+ $.Widget.prototype._setOption.apply(this, arguments);
}
},
@@ -294,8 +293,8 @@ $.widget("ui.sortable", $.ui.mouse, {
if(itemElement != this.currentItem[0] //cannot intersect with itself
&& this.placeholder[intersection == 1 ? "next" : "prev"]()[0] != itemElement //no useless actions that have been done before
- && !$.ui.contains(this.placeholder[0], itemElement) //no action if the item moved is the parent of the item checked
- && (this.options.type == 'semi-dynamic' ? !$.ui.contains(this.element[0], itemElement) : true)
+ && !$.contains(this.placeholder[0], itemElement) //no action if the item moved is the parent of the item checked
+ && (this.options.type == 'semi-dynamic' ? !$.contains(this.element[0], itemElement) : true)
//&& itemElement.parentNode == this.placeholder[0].parentNode // only rearrange items within the same container
) {
@@ -409,6 +408,10 @@ $.widget("ui.sortable", $.ui.mouse, {
if(res) str.push((o.key || res[1]+'[]')+'='+(o.key && o.expression ? res[1] : res[2]));
});
+ if(!str.length && o.key) {
+ str.push(o.key + '=');
+ }
+
return str.join('&');
},
@@ -687,13 +690,13 @@ $.widget("ui.sortable", $.ui.mouse, {
for (var i = this.containers.length - 1; i >= 0; i--){
// never consider a container that's located within the item itself
- if($.ui.contains(this.currentItem[0], this.containers[i].element[0]))
+ if($.contains(this.currentItem[0], this.containers[i].element[0]))
continue;
if(this._intersectsWith(this.containers[i].containerCache)) {
// if we've already found a container and it's more "inner" than this, then continue
- if(innermostContainer && $.ui.contains(this.containers[i].element[0], innermostContainer.element[0]))
+ if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0]))
continue;
innermostContainer = this.containers[i];
@@ -721,7 +724,7 @@ $.widget("ui.sortable", $.ui.mouse, {
//When entering a new container, we will find the item with the least distance and append our item near it
var dist = 10000; var itemWithLeastDistance = null; var base = this.positionAbs[this.containers[innermostIndex].floating ? 'left' : 'top'];
for (var j = this.items.length - 1; j >= 0; j--) {
- if(!$.ui.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) continue;
+ if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) continue;
var cur = this.items[j][this.containers[innermostIndex].floating ? 'left' : 'top'];
if(Math.abs(cur - base) < dist) {
dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];
@@ -796,7 +799,7 @@ $.widget("ui.sortable", $.ui.mouse, {
// 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
// the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
- if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) {
+ if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
po.left += this.scrollParent.scrollLeft();
po.top += this.scrollParent.scrollTop();
}
@@ -870,7 +873,7 @@ $.widget("ui.sortable", $.ui.mouse, {
if(!pos) pos = this.position;
var mod = d == "absolute" ? 1 : -1;
- var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+ var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
return {
top: (
@@ -891,7 +894,7 @@ $.widget("ui.sortable", $.ui.mouse, {
_generatePosition: function(event) {
- var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+ var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
// This is another very weird special case that only happens for relative elements:
// 1. If the css position is relative
@@ -988,10 +991,10 @@ $.widget("ui.sortable", $.ui.mouse, {
if(this.fromOutside && !noPropagation) delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); });
if((this.fromOutside || this.domPosition.prev != this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent != this.currentItem.parent()[0]) && !noPropagation) delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed
- if(!$.ui.contains(this.element[0], this.currentItem[0])) { //Node was moved out of the current element
+ if(!$.contains(this.element[0], this.currentItem[0])) { //Node was moved out of the current element
if(!noPropagation) delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); });
for (var i = this.containers.length - 1; i >= 0; i--){
- if($.ui.contains(this.containers[i].element[0], this.currentItem[0]) && !noPropagation) {
+ if($.contains(this.containers[i].element[0], this.currentItem[0]) && !noPropagation) {
delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
}
diff --git a/ui/jquery.ui.spinner.js b/ui/jquery.ui.spinner.js
new file mode 100644
index 000000000..39a498359
--- /dev/null
+++ b/ui/jquery.ui.spinner.js
@@ -0,0 +1,360 @@
+/*
+ * jQuery UI Spinner @VERSION
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Spinner
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.widget.js
+ */
+(function($) {
+
+$.widget('ui.spinner', {
+ options: {
+ incremental: true,
+ max: null,
+ min: null,
+ numberformat: null,
+ page: 10,
+ step: null,
+ value: null
+ },
+
+ _create: function() {
+ this._draw();
+ this._markupOptions();
+ this._mousewheel();
+ this._aria();
+ },
+
+ _markupOptions: function() {
+ var _this = this;
+ $.each({
+ min: -Number.MAX_VALUE,
+ max: Number.MAX_VALUE,
+ step: 1
+ }, function(attr, defaultValue) {
+ if (_this.options[attr] === null) {
+ var value = _this.element.attr(attr);
+ _this.options[attr] = typeof value == "string" && value.length > 0 ? _this._parse(value) : defaultValue;
+ }
+ });
+ this.value(this.options.value !== null ? this.options.value : this.element.val() || 0);
+ },
+
+ _draw: function() {
+ var self = this,
+ options = self.options;
+
+ var uiSpinner = this.uiSpinner = self.element
+ .addClass('ui-spinner-input')
+ .attr('autocomplete', 'off')
+ .wrap(self._uiSpinnerHtml())
+ .parent()
+ // add buttons
+ .append(self._buttonHtml())
+ // add behaviours
+ .hover(function() {
+ if (!options.disabled) {
+ $(this).addClass('ui-state-hover');
+ }
+ self.hovered = true;
+ }, function() {
+ $(this).removeClass('ui-state-hover');
+ self.hovered = false;
+ });
+
+ this.element
+ .bind('keydown.spinner', function(event) {
+ if (self.options.disabled) {
+ return;
+ }
+ if (self._start(event)) {
+ return self._keydown(event);
+ }
+ return true;
+ })
+ .bind('keyup.spinner', function(event) {
+ if (self.options.disabled) {
+ return;
+ }
+ if (self.spinning) {
+ self._stop(event);
+ self._change(event);
+ }
+ })
+ .bind('focus.spinner', function() {
+ uiSpinner.addClass('ui-state-active');
+ self.focused = true;
+ })
+ .bind('blur.spinner', function(event) {
+ self.value(self.element.val());
+ if (!self.hovered) {
+ uiSpinner.removeClass('ui-state-active');
+ }
+ self.focused = false;
+ });
+
+ // button bindings
+ this.buttons = uiSpinner.find('.ui-spinner-button')
+ .attr("tabIndex", -1)
+ .button()
+ .removeClass("ui-corner-all")
+ .bind('mousedown', function(event) {
+ if (self.options.disabled) {
+ return;
+ }
+ if (self._start(event) === false) {
+ return false;
+ }
+ self._repeat(null, $(this).hasClass('ui-spinner-up') ? 1 : -1, event);
+ })
+ .bind('mouseup', function(event) {
+ if (self.options.disabled) {
+ return;
+ }
+ if (self.spinning) {
+ self._stop(event);
+ self._change(event);
+ }
+ })
+ .bind("mouseenter", function() {
+ if (self.options.disabled) {
+ return;
+ }
+ // button will add ui-state-active if mouse was down while mouseleave and kept down
+ if ($(this).hasClass("ui-state-active")) {
+ if (self._start(event) === false) {
+ return false;
+ }
+ self._repeat(null, $(this).hasClass('ui-spinner-up') ? 1 : -1, event);
+ }
+ })
+ .bind("mouseleave", function() {
+ if (self.spinning) {
+ self._stop(event);
+ self._change(event);
+ }
+ });
+
+ // disable spinner if element was already disabled
+ if (options.disabled) {
+ this.disable();
+ }
+ },
+
+ _keydown: function(event) {
+ var o = this.options,
+ KEYS = $.ui.keyCode;
+
+ switch (event.keyCode) {
+ case KEYS.UP:
+ this._repeat(null, 1, event);
+ return false;
+ case KEYS.DOWN:
+ this._repeat(null, -1, event);
+ return false;
+ case KEYS.PAGE_UP:
+ this._repeat(null, this.options.page, event);
+ return false;
+ case KEYS.PAGE_DOWN:
+ this._repeat(null, -this.options.page, event);
+ return false;
+
+ case KEYS.ENTER:
+ this.value(this.element.val());
+ }
+
+ return true;
+ },
+
+ _mousewheel: function() {
+ // need the delta normalization that mousewheel plugin provides
+ if (!$.fn.mousewheel) {
+ return;
+ }
+ var self = this;
+ this.element.bind("mousewheel.spinner", function(event, delta) {
+ if (self.options.disabled) {
+ return;
+ }
+ if (!self.spinning && !self._start(event)) {
+ return false;
+ }
+ self._spin((delta > 0 ? 1 : -1) * self.options.step, event);
+ clearTimeout(self.timeout);
+ self.timeout = setTimeout(function() {
+ if (self.spinning) {
+ self._stop(event);
+ self._change(event);
+ }
+ }, 100);
+ event.preventDefault();
+ });
+ },
+
+ _uiSpinnerHtml: function() {
+ return '<span role="spinbutton" class="ui-spinner ui-state-default ui-widget ui-widget-content ui-corner-all"></span>';
+ },
+
+ _buttonHtml: function() {
+ return '<a class="ui-spinner-button ui-spinner-up ui-corner-tr"><span class="ui-icon ui-icon-triangle-1-n">&#9650;</span></a>' +
+ '<a class="ui-spinner-button ui-spinner-down ui-corner-br"><span class="ui-icon ui-icon-triangle-1-s">&#9660;</span></a>';
+ },
+
+ _start: function(event) {
+ if (!this.spinning && this._trigger('start', event) !== false) {
+ if (!this.counter) {
+ this.counter = 1;
+ }
+ this.spinning = true;
+ return true;
+ }
+ return false;
+ },
+
+ _repeat: function(i, steps, event) {
+ var self = this;
+ i = i || 500;
+
+ clearTimeout(this.timer);
+ this.timer = setTimeout(function() {
+ self._repeat(40, steps, event);
+ }, i);
+
+ self._spin(steps * self.options.step, event);
+ },
+
+ _spin: function(step, event) {
+ if (!this.counter) {
+ this.counter = 1;
+ }
+
+ // TODO refactor, maybe figure out some non-linear math
+ var newVal = this.value() + step * (this.options.incremental &&
+ this.counter > 20
+ ? this.counter > 100
+ ? this.counter > 200
+ ? 100
+ : 10
+ : 2
+ : 1);
+
+ if (this._trigger('spin', event, { value: newVal }) !== false) {
+ this.value(newVal);
+ this.counter++;
+ }
+ },
+
+ _stop: function(event) {
+ this.counter = 0;
+ if (this.timer) {
+ window.clearTimeout(this.timer);
+ }
+ this.element[0].focus();
+ this.spinning = false;
+ this._trigger('stop', event);
+ },
+
+ _change: function(event) {
+ this._trigger('change', event);
+ },
+
+ _setOption: function(key, value) {
+ if (key == 'value') {
+ value = this._parse(value);
+ if (value < this.options.min) {
+ value = this.options.min;
+ }
+ if (value > this.options.max) {
+ value = this.options.max;
+ }
+ }
+ if (key == 'disabled') {
+ if (value) {
+ this.element.attr("disabled", true);
+ this.buttons.button("disable");
+ } else {
+ this.element.removeAttr("disabled");
+ this.buttons.button("enable");
+ }
+ }
+ $.Widget.prototype._setOption.call( this, key, value );
+ },
+
+ _setOptions: function( options ) {
+ $.Widget.prototype._setOptions.call( this, options );
+ if ( "value" in options ) {
+ this._format( this.options.value );
+ }
+ this._aria();
+ },
+
+ _aria: function() {
+ this.element
+ .attr('aria-valuemin', this.options.min)
+ .attr('aria-valuemax', this.options.max)
+ .attr('aria-valuenow', this.options.value);
+ },
+
+ _parse: function(val) {
+ var input = val;
+ if (typeof val == 'string') {
+ // special case for currency formatting until Globalization handles currencies
+ if (this.options.numberformat == "C" && window.Globalization) {
+ // parseFloat should accept number format, including currency
+ var culture = Globalization.culture || Globalization.cultures['default'];
+ val = val.replace(culture.numberFormat.currency.symbol, "");
+ }
+ val = window.Globalization && this.options.numberformat ? Globalization.parseFloat(val) : +val;
+ }
+ return isNaN(val) ? null : val;
+ },
+
+ _format: function(num) {
+ var num = this.options.value;
+ this.element.val( window.Globalization && this.options.numberformat ? Globalization.format(num, this.options.numberformat) : num );
+ },
+
+ destroy: function() {
+ this.element
+ .removeClass('ui-spinner-input')
+ .removeAttr('disabled')
+ .removeAttr('autocomplete');
+ $.Widget.prototype.destroy.call( this );
+ this.uiSpinner.replaceWith(this.element);
+ },
+
+ stepUp: function(steps) {
+ this._spin((steps || 1) * this.options.step);
+ },
+
+ stepDown: function(steps) {
+ this._spin((steps || 1) * -this.options.step);
+ },
+
+ pageUp: function(pages) {
+ this.stepUp((pages || 1) * this.options.page);
+ },
+
+ pageDown: function(pages) {
+ this.stepDown((pages || 1) * this.options.page);
+ },
+
+ value: function(newVal) {
+ if (!arguments.length) {
+ return this._parse(this.element.val());
+ }
+ this.option('value', newVal);
+ },
+
+ widget: function() {
+ return this.uiSpinner;
+ }
+});
+
+})(jQuery);
diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js
index 8b6d72329..82da51d5b 100644..100755
--- a/ui/jquery.ui.tabs.js
+++ b/ui/jquery.ui.tabs.js
@@ -1,9 +1,9 @@
/*
* jQuery UI Tabs @VERSION
*
- * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
*
* http://docs.jquery.com/UI/Tabs
*
@@ -11,12 +11,20 @@
* jquery.ui.core.js
* jquery.ui.widget.js
*/
-(function($) {
+(function( $, undefined ) {
var tabId = 0,
listId = 0;
-$.widget("ui.tabs", {
+function getNextTabId() {
+ return ++tabId;
+}
+
+function getNextListId() {
+ return ++listId;
+}
+
+$.widget( "ui.tabs", {
options: {
add: null,
ajaxOptions: null,
@@ -26,619 +34,648 @@ $.widget("ui.tabs", {
disable: null,
disabled: [],
enable: null,
- event: 'click',
+ event: "click",
fx: null, // e.g. { height: 'toggle', opacity: 'toggle', duration: 200 }
- idPrefix: 'ui-tabs-',
+ idPrefix: "ui-tabs-",
load: null,
- panelTemplate: '<div></div>',
+ panelTemplate: "<div></div>",
remove: null,
select: null,
show: null,
- spinner: '<em>Loading&#8230;</em>',
- tabTemplate: '<li><a href="#{href}"><span>#{label}</span></a></li>'
+ spinner: "<em>Loading&#8230;</em>",
+ tabTemplate: "<li><a href='#{href}'><span>#{label}</span></a></li>"
},
+
_create: function() {
- this._tabify(true);
+ this._tabify( true );
},
- _setOption: function(key, value) {
- if (key == 'selected') {
- if (this.options.collapsible && value == this.options.selected) {
+ _setOption: function( key, value ) {
+ if ( key == "selected" ) {
+ if (this.options.collapsible && value == this.options.selected ) {
return;
}
- this.select(value);
- }
- else {
- this.options[key] = value;
+ this.select( value );
+ } else {
+ this.options[ key ] = value;
this._tabify();
}
},
- _tabId: function(a) {
- return a.title && a.title.replace(/\s/g, '_').replace(/[^A-Za-z0-9\-_:\.]/g, '') ||
- this.options.idPrefix + (++tabId);
+ _tabId: function( a ) {
+ return a.title && a.title.replace( /\s/g, "_" ).replace( /[^\w\u00c0-\uFFFF-]/g, "" ) ||
+ this.options.idPrefix + getNextTabId();
},
- _sanitizeSelector: function(hash) {
- return hash.replace(/:/g, '\\:'); // we need this because an id may contain a ":"
+ _sanitizeSelector: function( hash ) {
+ // we need this because an id may contain a ":"
+ return hash.replace( /:/g, "\\:" );
},
_cookie: function() {
- var cookie = this.cookie || (this.cookie = this.options.cookie.name || 'ui-tabs-' + (++listId));
- return $.cookie.apply(null, [cookie].concat($.makeArray(arguments)));
+ var cookie = this.cookie ||
+ ( this.cookie = this.options.cookie.name || "ui-tabs-" + getNextListId() );
+ return $.cookie.apply( null, [ cookie ].concat( $.makeArray( arguments ) ) );
},
- _ui: function(tab, panel) {
+ _ui: function( tab, panel ) {
return {
tab: tab,
panel: panel,
- index: this.anchors.index(tab)
+ index: this.anchors.index( tab )
};
},
_cleanup: function() {
// restore all former loading tabs labels
- this.lis.filter('.ui-state-processing').removeClass('ui-state-processing')
- .find('span:data(label.tabs)')
+ this.lis.filter( ".ui-state-processing" )
+ .removeClass( "ui-state-processing" )
+ .find( "span:data(label.tabs)" )
.each(function() {
- var el = $(this);
- el.html(el.data('label.tabs')).removeData('label.tabs');
+ var el = $( this );
+ el.html( el.data( "label.tabs" ) ).removeData( "label.tabs" );
});
},
- _tabify: function(init) {
+ _tabify: function( init ) {
+ var self = this,
+ o = this.options,
+ fragmentId = /^#.+/; // Safari 2 reports '#' for an empty hash
- this.list = this.element.find('ol,ul').eq(0);
- this.lis = $('li:has(a[href])', this.list);
- this.anchors = this.lis.map(function() { return $('a', this)[0]; });
- this.panels = $([]);
-
- var self = this, o = this.options;
-
- var fragmentId = /^#.+/; // Safari 2 reports '#' for an empty hash
- this.anchors.each(function(i, a) {
- var href = $(a).attr('href');
+ this.list = this.element.find( "ol,ul" ).eq( 0 );
+ this.lis = $( " > li:has(a[href])", this.list );
+ this.anchors = this.lis.map(function() {
+ return $( "a", this )[ 0 ];
+ });
+ this.panels = $( [] );
+ this.anchors.each(function( i, a ) {
+ var href = $( a ).attr( "href" );
// For dynamically created HTML that contains a hash as href IE < 8 expands
// such href to the full page url with hash and then misinterprets tab as ajax.
// Same consideration applies for an added tab with a fragment identifier
// since a[href=#fragment-identifier] does unexpectedly not match.
// Thus normalize href attribute...
- var hrefBase = href.split('#')[0], baseEl;
- if (hrefBase && (hrefBase === location.toString().split('#')[0] ||
- (baseEl = $('base')[0]) && hrefBase === baseEl.href)) {
+ var hrefBase = href.split( "#" )[ 0 ],
+ baseEl;
+ if ( hrefBase && ( hrefBase === location.toString().split( "#" )[ 0 ] ||
+ ( baseEl = $( "base" )[ 0 ]) && hrefBase === baseEl.href ) ) {
href = a.hash;
a.href = href;
}
// inline tab
- if (fragmentId.test(href)) {
- self.panels = self.panels.add(self._sanitizeSelector(href));
- }
-
+ if ( fragmentId.test( href ) ) {
+ self.panels = self.panels.add( self.element.find( self._sanitizeSelector( href ) ) );
// remote tab
- else if (href != '#') { // prevent loading the page itself if href is just "#"
- $.data(a, 'href.tabs', href); // required for restore on destroy
+ // prevent loading the page itself if href is just "#"
+ } else if ( href && href !== "#" ) {
+ // required for restore on destroy
+ $.data( a, "href.tabs", href );
// TODO until #3808 is fixed strip fragment identifier from url
// (IE fails to load from such url)
- $.data(a, 'load.tabs', href.replace(/#.*$/, '')); // mutable data
-
- var id = self._tabId(a);
- a.href = '#' + id;
- var $panel = $('#' + id);
- if (!$panel.length) {
- $panel = $(o.panelTemplate).attr('id', id).addClass('ui-tabs-panel ui-widget-content ui-corner-bottom')
- .insertAfter(self.panels[i - 1] || self.list);
- $panel.data('destroy.tabs', true);
+ $.data( a, "load.tabs", href.replace( /#.*$/, "" ) );
+
+ var id = self._tabId( a );
+ a.href = "#" + id;
+ var $panel = self.element.find( "#" + id );
+ if ( !$panel.length ) {
+ $panel = $( o.panelTemplate )
+ .attr( "id", id )
+ .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )
+ .insertAfter( self.panels[ i - 1 ] || self.list );
+ $panel.data( "destroy.tabs", true );
}
- self.panels = self.panels.add($panel);
- }
-
+ self.panels = self.panels.add( $panel );
// invalid tab href
- else {
- o.disabled.push(i);
+ } else {
+ o.disabled.push( i );
}
});
// initialization from scratch
- if (init) {
-
+ if ( init ) {
// attach necessary classes for styling
- this.element.addClass('ui-tabs ui-widget ui-widget-content ui-corner-all');
- this.list.addClass('ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all');
- this.lis.addClass('ui-state-default ui-corner-top');
- this.panels.addClass('ui-tabs-panel ui-widget-content ui-corner-bottom');
+ this.element.addClass( "ui-tabs ui-widget ui-widget-content ui-corner-all" );
+ this.list.addClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" );
+ this.lis.addClass( "ui-state-default ui-corner-top" );
+ this.panels.addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" );
// Selected tab
// use "selected" option or try to retrieve:
// 1. from fragment identifier in url
// 2. from cookie
// 3. from selected class attribute on <li>
- if (o.selected === undefined) {
- if (location.hash) {
- this.anchors.each(function(i, a) {
- if (a.hash == location.hash) {
+ if ( o.selected === undefined ) {
+ if ( location.hash ) {
+ this.anchors.each(function( i, a ) {
+ if ( a.hash == location.hash ) {
o.selected = i;
- return false; // break
+ return false;
}
});
}
- if (typeof o.selected != 'number' && o.cookie) {
- o.selected = parseInt(self._cookie(), 10);
+ if ( typeof o.selected !== "number" && o.cookie ) {
+ o.selected = parseInt( self._cookie(), 10 );
}
- if (typeof o.selected != 'number' && this.lis.filter('.ui-tabs-selected').length) {
- o.selected = this.lis.index(this.lis.filter('.ui-tabs-selected'));
+ if ( typeof o.selected !== "number" && this.lis.filter( ".ui-tabs-selected" ).length ) {
+ o.selected = this.lis.index( this.lis.filter( ".ui-tabs-selected" ) );
}
- o.selected = o.selected || (this.lis.length ? 0 : -1);
- }
- else if (o.selected === null) { // usage of null is deprecated, TODO remove in next release
+ o.selected = o.selected || ( this.lis.length ? 0 : -1 );
+ } else if ( o.selected === null ) { // usage of null is deprecated, TODO remove in next release
o.selected = -1;
}
// sanity check - default to first tab...
- o.selected = ((o.selected >= 0 && this.anchors[o.selected]) || o.selected < 0) ? o.selected : 0;
+ o.selected = ( ( o.selected >= 0 && this.anchors[ o.selected ] ) || o.selected < 0 )
+ ? o.selected
+ : 0;
// Take disabling tabs via class attribute from HTML
// into account and update option properly.
// A selected tab cannot become disabled.
- o.disabled = $.unique(o.disabled.concat(
- $.map(this.lis.filter('.ui-state-disabled'),
- function(n, i) { return self.lis.index(n); } )
- )).sort();
-
- if ($.inArray(o.selected, o.disabled) != -1) {
- o.disabled.splice($.inArray(o.selected, o.disabled), 1);
+ o.disabled = $.unique( o.disabled.concat(
+ $.map( this.lis.filter( ".ui-state-disabled" ), function( n, i ) {
+ return self.lis.index( n );
+ })
+ ) ).sort();
+
+ if ( $.inArray( o.selected, o.disabled ) != -1 ) {
+ o.disabled.splice( $.inArray( o.selected, o.disabled ), 1 );
}
// highlight selected tab
- this.panels.addClass('ui-tabs-hide');
- this.lis.removeClass('ui-tabs-selected ui-state-active');
- if (o.selected >= 0 && this.anchors.length) { // check for length avoids error when initializing empty list
- this.panels.eq(o.selected).removeClass('ui-tabs-hide');
- this.lis.eq(o.selected).addClass('ui-tabs-selected ui-state-active');
+ this.panels.addClass( "ui-tabs-hide" );
+ this.lis.removeClass( "ui-tabs-selected ui-state-active" );
+ // check for length avoids error when initializing empty list
+ if ( o.selected >= 0 && this.anchors.length ) {
+ self.element.find( self._sanitizeSelector( self.anchors[ o.selected ].hash ) ).removeClass( "ui-tabs-hide" );
+ this.lis.eq( o.selected ).addClass( "ui-tabs-selected ui-state-active" );
// seems to be expected behavior that the show callback is fired
- self.element.queue("tabs", function() {
- self._trigger('show', null, self._ui(self.anchors[o.selected], self.panels[o.selected]));
+ self.element.queue( "tabs", function() {
+ self._trigger( "show", null,
+ self._ui( self.anchors[ o.selected ], self.element.find( self._sanitizeSelector( self.anchors[ o.selected ].hash ) ) ) );
});
-
- this.load(o.selected);
+
+ this.load( o.selected );
}
// clean up to avoid memory leaks in certain versions of IE 6
- $(window).bind('unload', function() {
- self.lis.add(self.anchors).unbind('.tabs');
+ // TODO: namespace this event
+ $( window ).bind( "unload", function() {
+ self.lis.add( self.anchors ).unbind( ".tabs" );
self.lis = self.anchors = self.panels = null;
});
-
- }
// update selected after add/remove
- else {
- o.selected = this.lis.index(this.lis.filter('.ui-tabs-selected'));
+ } else {
+ o.selected = this.lis.index( this.lis.filter( ".ui-tabs-selected" ) );
}
- // update collapsible
- this.element[o.collapsible ? 'addClass' : 'removeClass']('ui-tabs-collapsible');
+ this.element.toggleClass( "ui-tabs-collapsible", o.collapsible );
// set or update cookie after init and add/remove respectively
- if (o.cookie) {
- this._cookie(o.selected, o.cookie);
+ if ( o.cookie ) {
+ this._cookie( o.selected, o.cookie );
}
// disable tabs
- for (var i = 0, li; (li = this.lis[i]); i++) {
- $(li)[$.inArray(i, o.disabled) != -1 &&
- !$(li).hasClass('ui-tabs-selected') ? 'addClass' : 'removeClass']('ui-state-disabled');
+ for ( var i = 0, li; ( li = this.lis[ i ] ); i++ ) {
+ $( li ).toggleClass( "ui-state-disabled",
+ $.inArray( i, o.disabled ) != -1 && !$( li ).hasClass( "ui-tabs-selected" ) );
}
// reset cache if switching from cached to not cached
- if (o.cache === false) {
- this.anchors.removeData('cache.tabs');
+ if ( o.cache === false ) {
+ this.anchors.removeData( "cache.tabs" );
}
// remove all handlers before, tabify may run on existing tabs after add or option change
- this.lis.add(this.anchors).unbind('.tabs');
+ this.lis.add( this.anchors ).unbind( ".tabs" );
- if (o.event != 'mouseover') {
- var addState = function(state, el) {
- if (el.is(':not(.ui-state-disabled)')) {
- el.addClass('ui-state-' + state);
+ if ( o.event !== "mouseover" ) {
+ var addState = function( state, el ) {
+ if ( el.is( ":not(.ui-state-disabled)" ) ) {
+ el.addClass( "ui-state-" + state );
}
};
- var removeState = function(state, el) {
- el.removeClass('ui-state-' + state);
+ var removeState = function( state, el ) {
+ el.removeClass( "ui-state-" + state );
};
- this.lis.bind('mouseover.tabs', function() {
- addState('hover', $(this));
+ this.lis.bind( "mouseover.tabs" , function() {
+ addState( "hover", $( this ) );
});
- this.lis.bind('mouseout.tabs', function() {
- removeState('hover', $(this));
+ this.lis.bind( "mouseout.tabs", function() {
+ removeState( "hover", $( this ) );
});
- this.anchors.bind('focus.tabs', function() {
- addState('focus', $(this).closest('li'));
+ this.anchors.bind( "focus.tabs", function() {
+ addState( "focus", $( this ).closest( "li" ) );
});
- this.anchors.bind('blur.tabs', function() {
- removeState('focus', $(this).closest('li'));
+ this.anchors.bind( "blur.tabs", function() {
+ removeState( "focus", $( this ).closest( "li" ) );
});
}
// set up animations
var hideFx, showFx;
- if (o.fx) {
- if ($.isArray(o.fx)) {
- hideFx = o.fx[0];
- showFx = o.fx[1];
- }
- else {
+ if ( o.fx ) {
+ if ( $.isArray( o.fx ) ) {
+ hideFx = o.fx[ 0 ];
+ showFx = o.fx[ 1 ];
+ } else {
hideFx = showFx = o.fx;
}
}
// Reset certain styles left over from animation
// and prevent IE's ClearType bug...
- function resetStyle($el, fx) {
- $el.css({ display: '' });
- if (!$.support.opacity && fx.opacity) {
- $el[0].style.removeAttribute('filter');
+ function resetStyle( $el, fx ) {
+ $el.css( "display", "" );
+ if ( !$.support.opacity && fx.opacity ) {
+ $el[ 0 ].style.removeAttribute( "filter" );
}
}
// Show a tab...
- var showTab = showFx ?
- function(clicked, $show) {
- $(clicked).closest('li').addClass('ui-tabs-selected ui-state-active');
- $show.hide().removeClass('ui-tabs-hide') // avoid flicker that way
- .animate(showFx, showFx.duration || 'normal', function() {
- resetStyle($show, showFx);
- self._trigger('show', null, self._ui(clicked, $show[0]));
+ var showTab = showFx
+ ? function( clicked, $show ) {
+ $( clicked ).closest( "li" ).addClass( "ui-tabs-selected ui-state-active" );
+ $show.hide().removeClass( "ui-tabs-hide" ) // avoid flicker that way
+ .animate( showFx, showFx.duration || "normal", function() {
+ resetStyle( $show, showFx );
+ self._trigger( "show", null, self._ui( clicked, $show[ 0 ] ) );
});
- } :
- function(clicked, $show) {
- $(clicked).closest('li').addClass('ui-tabs-selected ui-state-active');
- $show.removeClass('ui-tabs-hide');
- self._trigger('show', null, self._ui(clicked, $show[0]));
+ }
+ : function( clicked, $show ) {
+ $( clicked ).closest( "li" ).addClass( "ui-tabs-selected ui-state-active" );
+ $show.removeClass( "ui-tabs-hide" );
+ self._trigger( "show", null, self._ui( clicked, $show[ 0 ] ) );
};
// Hide a tab, $show is optional...
- var hideTab = hideFx ?
- function(clicked, $hide) {
- $hide.animate(hideFx, hideFx.duration || 'normal', function() {
- self.lis.removeClass('ui-tabs-selected ui-state-active');
- $hide.addClass('ui-tabs-hide');
- resetStyle($hide, hideFx);
- self.element.dequeue("tabs");
+ var hideTab = hideFx
+ ? function( clicked, $hide ) {
+ $hide.animate( hideFx, hideFx.duration || "normal", function() {
+ self.lis.removeClass( "ui-tabs-selected ui-state-active" );
+ $hide.addClass( "ui-tabs-hide" );
+ resetStyle( $hide, hideFx );
+ self.element.dequeue( "tabs" );
});
- } :
- function(clicked, $hide, $show) {
- self.lis.removeClass('ui-tabs-selected ui-state-active');
- $hide.addClass('ui-tabs-hide');
- self.element.dequeue("tabs");
+ }
+ : function( clicked, $hide, $show ) {
+ self.lis.removeClass( "ui-tabs-selected ui-state-active" );
+ $hide.addClass( "ui-tabs-hide" );
+ self.element.dequeue( "tabs" );
};
// attach tab event handler, unbind to avoid duplicates from former tabifying...
- this.anchors.bind(o.event + '.tabs', function() {
- var el = this, $li = $(this).closest('li'), $hide = self.panels.filter(':not(.ui-tabs-hide)'),
- $show = $(self._sanitizeSelector(this.hash));
+ this.anchors.bind( o.event + ".tabs", function( event ) {
+ event.preventDefault();
+ var el = this,
+ $li = $(el).closest( "li" ),
+ $hide = self.panels.filter( ":not(.ui-tabs-hide)" ),
+ $show = self.element.find( self._sanitizeSelector( el.hash ) );
// If tab is already selected and not collapsible or tab disabled or
// or is already loading or click callback returns false stop here.
// Check if click handler returns false last so that it is not executed
// for a disabled or loading tab!
- if (($li.hasClass('ui-tabs-selected') && !o.collapsible) ||
- $li.hasClass('ui-state-disabled') ||
- $li.hasClass('ui-state-processing') ||
- self._trigger('select', null, self._ui(this, $show[0])) === false) {
+ if ( ( $li.hasClass( "ui-tabs-selected" ) && !o.collapsible) ||
+ $li.hasClass( "ui-state-disabled" ) ||
+ $li.hasClass( "ui-state-processing" ) ||
+ self.panels.filter( ":animated" ).length ||
+ self._trigger( "select", null, self._ui( this, $show[ 0 ] ) ) === false ) {
this.blur();
- return false;
+ return;
}
- o.selected = self.anchors.index(this);
+ o.selected = self.anchors.index( this );
self.abort();
// if tab may be closed
- if (o.collapsible) {
- if ($li.hasClass('ui-tabs-selected')) {
+ if ( o.collapsible ) {
+ if ( $li.hasClass( "ui-tabs-selected" ) ) {
o.selected = -1;
- if (o.cookie) {
- self._cookie(o.selected, o.cookie);
+ if ( o.cookie ) {
+ self._cookie( o.selected, o.cookie );
}
- self.element.queue("tabs", function() {
- hideTab(el, $hide);
- }).dequeue("tabs");
-
+ self.element.queue( "tabs", function() {
+ hideTab( el, $hide );
+ }).dequeue( "tabs" );
+
this.blur();
- return false;
- }
- else if (!$hide.length) {
- if (o.cookie) {
- self._cookie(o.selected, o.cookie);
+ return;
+ } else if ( !$hide.length ) {
+ if ( o.cookie ) {
+ self._cookie( o.selected, o.cookie );
}
-
- self.element.queue("tabs", function() {
- showTab(el, $show);
+
+ self.element.queue( "tabs", function() {
+ showTab( el, $show );
});
- self.load(self.anchors.index(this)); // TODO make passing in node possible, see also http://dev.jqueryui.com/ticket/3171
-
+ // TODO make passing in node possible, see also http://dev.jqueryui.com/ticket/3171
+ self.load( self.anchors.index( this ) );
+
this.blur();
- return false;
+ return;
}
}
- if (o.cookie) {
- self._cookie(o.selected, o.cookie);
+ if ( o.cookie ) {
+ self._cookie( o.selected, o.cookie );
}
// show new tab
- if ($show.length) {
- if ($hide.length) {
- self.element.queue("tabs", function() {
- hideTab(el, $hide);
+ if ( $show.length ) {
+ if ( $hide.length ) {
+ self.element.queue( "tabs", function() {
+ hideTab( el, $hide );
});
}
- self.element.queue("tabs", function() {
- showTab(el, $show);
+ self.element.queue( "tabs", function() {
+ showTab( el, $show );
});
-
- self.load(self.anchors.index(this));
- }
- else {
- throw 'jQuery UI Tabs: Mismatching fragment identifier.';
+
+ self.load( self.anchors.index( this ) );
+ } else {
+ throw "jQuery UI Tabs: Mismatching fragment identifier.";
}
// Prevent IE from keeping other link focussed when using the back button
// and remove dotted border from clicked link. This is controlled via CSS
// in modern browsers; blur() removes focus from address bar in Firefox
- // which can become a usability and annoying problem with tabs('rotate').
- if ($.browser.msie) {
+ // which can become a usability
+ if ( $.browser.msie ) {
this.blur();
}
-
});
// disable click in any case
- this.anchors.bind('click.tabs', function(){return false;});
+ this.anchors.bind( "click.tabs", function( event ){
+ event.preventDefault();
+ });
+ },
+
+ _getIndex: function( index ) {
+ // meta-function to give users option to provide a href string instead of a numerical index.
+ // also sanitizes numerical indexes to valid values.
+ if ( typeof index == "string" ) {
+ index = this.anchors.index( this.anchors.filter( "[href$=" + index + "]" ) );
+ }
+ return index;
},
destroy: function() {
var o = this.options;
this.abort();
-
- this.element.unbind('.tabs')
- .removeClass('ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible')
- .removeData('tabs');
- this.list.removeClass('ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all');
+ this.element
+ .unbind( ".tabs" )
+ .removeClass( "ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible" )
+ .removeData( "tabs" );
+
+ this.list.removeClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" );
this.anchors.each(function() {
- var href = $.data(this, 'href.tabs');
- if (href) {
+ var href = $.data( this, "href.tabs" );
+ if ( href ) {
this.href = href;
}
- var $this = $(this).unbind('.tabs');
- $.each(['href', 'load', 'cache'], function(i, prefix) {
- $this.removeData(prefix + '.tabs');
+ var $this = $( this ).unbind( ".tabs" );
+ $.each( [ "href", "load", "cache" ], function( i, prefix ) {
+ $this.removeData( prefix + ".tabs" );
});
});
- this.lis.unbind('.tabs').add(this.panels).each(function() {
- if ($.data(this, 'destroy.tabs')) {
- $(this).remove();
- }
- else {
- $(this).removeClass([
- 'ui-state-default',
- 'ui-corner-top',
- 'ui-tabs-selected',
- 'ui-state-active',
- 'ui-state-hover',
- 'ui-state-focus',
- 'ui-state-disabled',
- 'ui-tabs-panel',
- 'ui-widget-content',
- 'ui-corner-bottom',
- 'ui-tabs-hide'
- ].join(' '));
+ this.lis.unbind( ".tabs" ).add( this.panels ).each(function() {
+ if ( $.data( this, "destroy.tabs" ) ) {
+ $( this ).remove();
+ } else {
+ $( this ).removeClass([
+ "ui-state-default",
+ "ui-corner-top",
+ "ui-tabs-selected",
+ "ui-state-active",
+ "ui-state-hover",
+ "ui-state-focus",
+ "ui-state-disabled",
+ "ui-tabs-panel",
+ "ui-widget-content",
+ "ui-corner-bottom",
+ "ui-tabs-hide"
+ ].join( " " ) );
}
});
- if (o.cookie) {
- this._cookie(null, o.cookie);
+ if ( o.cookie ) {
+ this._cookie( null, o.cookie );
}
return this;
},
- add: function(url, label, index) {
- if (index === undefined) {
- index = this.anchors.length; // append by default
+ add: function( url, label, index ) {
+ if ( index === undefined ) {
+ index = this.anchors.length;
}
- var self = this, o = this.options,
- $li = $(o.tabTemplate.replace(/#\{href\}/g, url).replace(/#\{label\}/g, label)),
- id = !url.indexOf('#') ? url.replace('#', '') : this._tabId($('a', $li)[0]);
+ var self = this,
+ o = this.options,
+ $li = $( o.tabTemplate.replace( /#\{href\}/g, url ).replace( /#\{label\}/g, label ) ),
+ id = !url.indexOf( "#" ) ? url.replace( "#", "" ) : this._tabId( $( "a", $li )[ 0 ] );
- $li.addClass('ui-state-default ui-corner-top').data('destroy.tabs', true);
+ $li.addClass( "ui-state-default ui-corner-top" ).data( "destroy.tabs", true );
// try to find an existing element before creating a new one
- var $panel = $('#' + id);
- if (!$panel.length) {
- $panel = $(o.panelTemplate).attr('id', id).data('destroy.tabs', true);
- }
- $panel.addClass('ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide');
-
- if (index >= this.lis.length) {
- $li.appendTo(this.list);
- $panel.appendTo(this.list[0].parentNode);
+ var $panel = self.element.find( "#" + id );
+ if ( !$panel.length ) {
+ $panel = $( o.panelTemplate )
+ .attr( "id", id )
+ .data( "destroy.tabs", true );
}
- else {
- $li.insertBefore(this.lis[index]);
- $panel.insertBefore(this.panels[index]);
+ $panel.addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" );
+
+ if ( index >= this.lis.length ) {
+ $li.appendTo( this.list );
+ $panel.appendTo( this.list[ 0 ].parentNode );
+ } else {
+ $li.insertBefore( this.lis[ index ] );
+ $panel.insertBefore( this.panels[ index ] );
}
- o.disabled = $.map(o.disabled,
- function(n, i) { return n >= index ? ++n : n; });
+ o.disabled = $.map( o.disabled, function( n, i ) {
+ return n >= index ? ++n : n;
+ });
this._tabify();
- if (this.anchors.length == 1) { // after tabify
+ if ( this.anchors.length == 1 ) {
o.selected = 0;
- $li.addClass('ui-tabs-selected ui-state-active');
- $panel.removeClass('ui-tabs-hide');
- this.element.queue("tabs", function() {
- self._trigger('show', null, self._ui(self.anchors[0], self.panels[0]));
+ $li.addClass( "ui-tabs-selected ui-state-active" );
+ $panel.removeClass( "ui-tabs-hide" );
+ this.element.queue( "tabs", function() {
+ self._trigger( "show", null, self._ui( self.anchors[ 0 ], self.panels[ 0 ] ) );
});
-
- this.load(0);
+
+ this.load( 0 );
}
- // callback
- this._trigger('add', null, this._ui(this.anchors[index], this.panels[index]));
+ this._trigger( "add", null, this._ui( this.anchors[ index ], this.panels[ index ] ) );
return this;
},
- remove: function(index) {
- var o = this.options, $li = this.lis.eq(index).remove(),
- $panel = this.panels.eq(index).remove();
+ remove: function( index ) {
+ index = this._getIndex( index );
+ var o = this.options,
+ $li = this.lis.eq( index ).remove(),
+ $panel = this.panels.eq( index ).remove();
// If selected tab was removed focus tab to the right or
// in case the last tab was removed the tab to the left.
- if ($li.hasClass('ui-tabs-selected') && this.anchors.length > 1) {
- this.select(index + (index + 1 < this.anchors.length ? 1 : -1));
+ if ( $li.hasClass( "ui-tabs-selected" ) && this.anchors.length > 1) {
+ this.select( index + ( index + 1 < this.anchors.length ? 1 : -1 ) );
}
- o.disabled = $.map($.grep(o.disabled, function(n, i) { return n != index; }),
- function(n, i) { return n >= index ? --n : n; });
+ o.disabled = $.map(
+ $.grep( o.disabled, function(n, i) {
+ return n != index;
+ }),
+ function( n, i ) {
+ return n >= index ? --n : n;
+ });
this._tabify();
- // callback
- this._trigger('remove', null, this._ui($li.find('a')[0], $panel[0]));
+ this._trigger( "remove", null, this._ui( $li.find( "a" )[ 0 ], $panel[ 0 ] ) );
return this;
},
- enable: function(index) {
+ enable: function( index ) {
+ index = this._getIndex( index );
var o = this.options;
- if ($.inArray(index, o.disabled) == -1) {
+ if ( $.inArray( index, o.disabled ) == -1 ) {
return;
}
- this.lis.eq(index).removeClass('ui-state-disabled');
- o.disabled = $.grep(o.disabled, function(n, i) { return n != index; });
+ this.lis.eq( index ).removeClass( "ui-state-disabled" );
+ o.disabled = $.grep( o.disabled, function( n, i ) {
+ return n != index;
+ });
- // callback
- this._trigger('enable', null, this._ui(this.anchors[index], this.panels[index]));
+ this._trigger( "enable", null, this._ui( this.anchors[ index ], this.panels[ index ] ) );
return this;
},
- disable: function(index) {
+ disable: function( index ) {
+ index = this._getIndex( index );
var self = this, o = this.options;
- if (index != o.selected) { // cannot disable already selected tab
- this.lis.eq(index).addClass('ui-state-disabled');
+ // cannot disable already selected tab
+ if ( index != o.selected ) {
+ this.lis.eq( index ).addClass( "ui-state-disabled" );
- o.disabled.push(index);
+ o.disabled.push( index );
o.disabled.sort();
- // callback
- this._trigger('disable', null, this._ui(this.anchors[index], this.panels[index]));
+ this._trigger( "disable", null, this._ui( this.anchors[ index ], this.panels[ index ] ) );
}
return this;
},
- select: function(index) {
- if (typeof index == 'string') {
- index = this.anchors.index(this.anchors.filter('[href$=' + index + ']'));
- }
- else if (index === null) { // usage of null is deprecated, TODO remove in next release
- index = -1;
- }
- if (index == -1 && this.options.collapsible) {
- index = this.options.selected;
+ select: function( index ) {
+ index = this._getIndex( index );
+ if ( index == -1 ) {
+ if ( this.options.collapsible && this.options.selected != -1 ) {
+ index = this.options.selected;
+ } else {
+ return this;
+ }
}
-
- this.anchors.eq(index).trigger(this.options.event + '.tabs');
+ this.anchors.eq( index ).trigger( this.options.event + ".tabs" );
return this;
},
- load: function(index) {
- var self = this, o = this.options, a = this.anchors.eq(index)[0], url = $.data(a, 'load.tabs');
+ load: function( index ) {
+ index = this._getIndex( index );
+ var self = this,
+ o = this.options,
+ a = this.anchors.eq( index )[ 0 ],
+ url = $.data( a, "load.tabs" );
this.abort();
// not remote or from cache
- if (!url || this.element.queue("tabs").length !== 0 && $.data(a, 'cache.tabs')) {
- this.element.dequeue("tabs");
+ if ( !url || this.element.queue( "tabs" ).length !== 0 && $.data( a, "cache.tabs" ) ) {
+ this.element.dequeue( "tabs" );
return;
}
// load remote from here on
- this.lis.eq(index).addClass('ui-state-processing');
+ this.lis.eq( index ).addClass( "ui-state-processing" );
- if (o.spinner) {
- var span = $('span', a);
- span.data('label.tabs', span.html()).html(o.spinner);
+ if ( o.spinner ) {
+ var span = $( "span", a );
+ span.data( "label.tabs", span.html() ).html( o.spinner );
}
- this.xhr = $.ajax($.extend({}, o.ajaxOptions, {
+ this.xhr = $.ajax( $.extend( {}, o.ajaxOptions, {
url: url,
- success: function(r, s) {
- $(self._sanitizeSelector(a.hash)).html(r);
+ success: function( r, s ) {
+ self.element.find( self._sanitizeSelector( a.hash ) ).html( r );
// take care of tab labels
self._cleanup();
- if (o.cache) {
- $.data(a, 'cache.tabs', true); // if loaded once do not load them again
+ if ( o.cache ) {
+ $.data( a, "cache.tabs", true );
}
- // callbacks
- self._trigger('load', null, self._ui(self.anchors[index], self.panels[index]));
+ self._trigger( "load", null, self._ui( self.anchors[ index ], self.panels[ index ] ) );
try {
- o.ajaxOptions.success(r, s);
+ o.ajaxOptions.success( r, s );
}
- catch (e) {}
+ catch ( e ) {}
},
- error: function(xhr, s, e) {
+ error: function( xhr, s, e ) {
// take care of tab labels
self._cleanup();
- // callbacks
- self._trigger('load', null, self._ui(self.anchors[index], self.panels[index]));
+ self._trigger( "load", null, self._ui( self.anchors[ index ], self.panels[ index ] ) );
try {
// Passing index avoid a race condition when this method is
// called after the user has selected another tab.
// Pass the anchor that initiated this request allows
// loadError to manipulate the tab content panel via $(a.hash)
- o.ajaxOptions.error(xhr, s, index, a);
+ o.ajaxOptions.error( xhr, s, index, a );
}
- catch (e) {}
+ catch ( e ) {}
}
- }));
+ } ) );
// last, so that load event is fired before show...
- self.element.dequeue("tabs");
+ self.element.dequeue( "tabs" );
return this;
},
abort: function() {
// stop possibly running animations
- this.element.queue([]);
- this.panels.stop(false, true);
+ this.element.queue( [] );
+ this.panels.stop( false, true );
// "tabs" queue must not contain more than two elements,
// which are the callbacks for the latest clicked tab...
- this.element.queue("tabs", this.element.queue("tabs").splice(-2, 2));
+ this.element.queue( "tabs", this.element.queue( "tabs" ).splice( -2, 2 ) );
// terminate pending requests from other tabs
- if (this.xhr) {
+ if ( this.xhr ) {
this.xhr.abort();
delete this.xhr;
}
@@ -648,74 +685,18 @@ $.widget("ui.tabs", {
return this;
},
- url: function(index, url) {
- this.anchors.eq(index).removeData('cache.tabs').data('load.tabs', url);
+ url: function( index, url ) {
+ this.anchors.eq( index ).removeData( "cache.tabs" ).data( "load.tabs", url );
return this;
},
length: function() {
return this.anchors.length;
}
-
-});
-
-$.extend($.ui.tabs, {
- version: '@VERSION'
});
-/*
- * Tabs Extensions
- */
-
-/*
- * Rotate
- */
-$.extend($.ui.tabs.prototype, {
- rotation: null,
- rotate: function(ms, continuing) {
-
- var self = this, o = this.options;
-
- var rotate = self._rotate || (self._rotate = function(e) {
- clearTimeout(self.rotation);
- self.rotation = setTimeout(function() {
- var t = o.selected;
- self.select( ++t < self.anchors.length ? t : 0 );
- }, ms);
-
- if (e) {
- e.stopPropagation();
- }
- });
-
- var stop = self._unrotate || (self._unrotate = !continuing ?
- function(e) {
- if (e.clientX) { // in case of a true click
- self.rotate(null);
- }
- } :
- function(e) {
- t = o.selected;
- rotate();
- });
-
- // start rotation
- if (ms) {
- this.element.bind('tabsshow', rotate);
- this.anchors.bind(o.event + '.tabs', stop);
- rotate();
- }
- // stop rotation
- else {
- clearTimeout(self.rotation);
- this.element.unbind('tabsshow', rotate);
- this.anchors.unbind(o.event + '.tabs', stop);
- delete this._rotate;
- delete this._unrotate;
- }
-
- return this;
- }
+$.extend( $.ui.tabs, {
+ version: "@VERSION"
});
-})(jQuery);
+})( jQuery );
diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js
index a9829d2e5..b5fb600d9 100644
--- a/ui/jquery.ui.widget.js
+++ b/ui/jquery.ui.widget.js
@@ -1,28 +1,38 @@
/*!
* jQuery UI Widget @VERSION
*
- * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
*
* http://docs.jquery.com/UI/Widget
*/
-(function( $ ) {
-
-var _remove = $.fn.remove;
-
-$.fn.remove = function( selector, keepData ) {
- return this.each(function() {
- if ( !keepData ) {
- if ( !selector || $.filter( selector, [ this ] ).length ) {
- $( "*", this ).add( this ).each(function() {
- $( this ).triggerHandler( "remove" );
- });
- }
+(function( $, undefined ) {
+
+// jQuery 1.4+
+if ( $.cleanData ) {
+ var _cleanData = $.cleanData;
+ $.cleanData = function( elems ) {
+ for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+ $( elem ).triggerHandler( "remove" );
}
- return _remove.call( $(this), selector, keepData );
- });
-};
+ _cleanData( elems );
+ };
+} else {
+ var _remove = $.fn.remove;
+ $.fn.remove = function( selector, keepData ) {
+ return this.each(function() {
+ if ( !keepData ) {
+ if ( !selector || $.filter( selector, [ this ] ).length ) {
+ $( "*", this ).add( [ this ] ).each(function() {
+ $( this ).triggerHandler( "remove" );
+ });
+ }
+ }
+ return _remove.call( $(this), selector, keepData );
+ });
+ };
+}
$.widget = function( name, base, prototype ) {
var namespace = name.split( "." )[ 0 ],
@@ -57,7 +67,7 @@ $.widget = function( name, base, prototype ) {
// basePrototype[ key ] = $.extend( {}, val );
// }
// });
- basePrototype.options = $.extend( {}, basePrototype.options );
+ basePrototype.options = $.extend( true, {}, basePrototype.options );
$[ namespace ][ name ].prototype = $.extend( true, basePrototype, {
namespace: namespace,
widgetName: name,
@@ -80,16 +90,21 @@ $.widget.bridge = function( name, object ) {
options;
// prevent calls to internal methods
- if ( isMethodCall && options.substring( 0, 1 ) === "_" ) {
+ if ( isMethodCall && options.charAt( 0 ) === "_" ) {
return returnValue;
}
if ( isMethodCall ) {
this.each(function() {
- var instance = $.data( this, name ),
- methodValue = instance && $.isFunction( instance[options] ) ?
- instance[ options ].apply( instance, args ) :
- instance;
+ var instance = $.data( this, name );
+ if ( !instance ) {
+ return $.error( "cannot call methods on " + name + " prior to initialization; " +
+ "attempted to call method '" + options + "'" );
+ }
+ if ( !$.isFunction( instance[options] ) ) {
+ return $.error( "no such method '" + options + "' for " + name + " widget instance" );
+ }
+ var methodValue = instance[ options ].apply( instance, args );
if ( methodValue !== instance && methodValue !== undefined ) {
returnValue = methodValue;
return false;
@@ -99,10 +114,7 @@ $.widget.bridge = function( name, object ) {
this.each(function() {
var instance = $.data( this, name );
if ( instance ) {
- if ( options ) {
- instance.option( options );
- }
- instance._init();
+ instance.option( options || {} )._init();
} else {
$.data( this, name, new object( options, this ) );
}
@@ -129,10 +141,11 @@ $.Widget.prototype = {
_createWidget: function( options, element ) {
// $.widget.bridge stores the plugin instance, but we do it anyway
// so that it's stored even before the _create function runs
- this.element = $( element ).data( this.widgetName, this );
+ $.data( element, this.widgetName, this );
+ this.element = $( element );
this.options = $.extend( true, {},
this.options,
- $.metadata && $.metadata.get( element )[ this.widgetName ],
+ this._getCreateOptions(),
options );
var self = this;
@@ -141,8 +154,12 @@ $.Widget.prototype = {
});
this._create();
+ this._trigger( "create" );
this._init();
},
+ _getCreateOptions: function() {
+ return $.metadata && $.metadata.get( this.element[0] )[ this.widgetName ];
+ },
_create: function() {},
_init: function() {},
@@ -163,12 +180,11 @@ $.Widget.prototype = {
},
option: function( key, value ) {
- var options = key,
- self = this;
+ var options = key;
if ( arguments.length === 0 ) {
// don't return a reference to the internal hash
- return $.extend( {}, self.options );
+ return $.extend( {}, this.options );
}
if (typeof key === "string" ) {
@@ -179,20 +195,24 @@ $.Widget.prototype = {
options[ key ] = value;
}
+ this._setOptions( options );
+
+ return this;
+ },
+ _setOptions: function( options ) {
+ var self = this;
$.each( options, function( key, value ) {
self._setOption( key, value );
});
- return self;
+ return this;
},
_setOption: function( key, value ) {
this.options[ key ] = value;
if ( key === "disabled" ) {
this.widget()
- [ value ? "addClass" : "removeClass"](
- this.widgetBaseClass + "-disabled" + " " +
- "ui-state-disabled" )
+ .toggleClass( this.widgetBaseClass + "-disabled ui-state-disabled", !!value )
.attr( "aria-disabled", value );
}
diff --git a/version.txt b/version.txt
index b9268dae2..13c1a7371 100644
--- a/version.txt
+++ b/version.txt
@@ -1 +1 @@
-1.8.1 \ No newline at end of file
+1.9pre