hydroponics 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +2 -2
- data/Rakefile +1 -0
- data/VERSION +1 -1
- data/bin/hydro +19 -5
- data/hydroponics.gemspec +409 -3
- data/lib/db_remote.rb +23 -0
- data/lib/hydroponics.rb +17 -4
- data/lib/views/index.erb +26 -0
- data/static/jquery-ui-1.8.5.custom/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/static/jquery-ui-1.8.5.custom/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/static/jquery-ui-1.8.5.custom/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/static/jquery-ui-1.8.5.custom/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/static/jquery-ui-1.8.5.custom/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/static/jquery-ui-1.8.5.custom/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/static/jquery-ui-1.8.5.custom/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/static/jquery-ui-1.8.5.custom/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/static/jquery-ui-1.8.5.custom/css/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/static/jquery-ui-1.8.5.custom/css/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/static/jquery-ui-1.8.5.custom/css/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/static/jquery-ui-1.8.5.custom/css/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/static/jquery-ui-1.8.5.custom/css/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/static/jquery-ui-1.8.5.custom/css/smoothness/jquery-ui-1.8.5.custom.css +572 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/AUTHORS.txt +30 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/GPL-LICENSE.txt +278 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/MIT-LICENSE.txt +25 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/accordion/collapsible.html +57 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/accordion/custom-icons.html +69 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/accordion/default.html +85 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/accordion/fillspace.html +76 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/accordion/hoverintent.html +134 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/accordion/index.html +25 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/accordion/mouseover.html +57 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/accordion/no-auto-height.html +60 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/accordion/sortable.html +83 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/addClass/default.html +52 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/addClass/index.html +18 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/animate/default.html +61 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/animate/index.html +18 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/autocomplete/categories.html +71 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/autocomplete/combobox.html +163 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/autocomplete/custom-data.html +95 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/autocomplete/default.html +64 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/autocomplete/folding.html +62 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/autocomplete/images/jquery_32x32.png +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/autocomplete/images/jqueryui_32x32.png +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/autocomplete/images/sizzlejs_32x32.png +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/autocomplete/images/transparent_1x1.png +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/autocomplete/images/ui-anim_basic_16x16.gif +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/autocomplete/index.html +27 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/autocomplete/london.xml +114 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/autocomplete/maxheight.html +75 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/autocomplete/multiple-remote.html +76 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/autocomplete/multiple.html +91 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/autocomplete/remote-jsonp.html +86 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/autocomplete/remote-with-cache.html +59 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/autocomplete/remote.html +59 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/autocomplete/search.php +640 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/autocomplete/xml.html +72 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/button/checkbox.html +44 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/button/default.html +38 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/button/icons.html +56 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/button/index.html +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/button/radio.html +39 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/button/splitbutton.html +55 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/button/toolbar.html +120 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/datepicker/alt-field.html +36 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/datepicker/animation.html +58 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/datepicker/buttonbar.html +35 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/datepicker/date-formats.html +47 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/datepicker/default.html +33 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/datepicker/dropdown-month-year.html +36 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/datepicker/event-search.html +49 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/datepicker/icon-trigger.html +37 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/datepicker/images/calendar.gif +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/datepicker/index.html +31 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/datepicker/inline.html +33 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/datepicker/localization.html +146 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/datepicker/min-max.html +33 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/datepicker/multiple-calendars.html +36 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/datepicker/other-months.html +37 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/datepicker/show-week.html +39 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/demos.css +334 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/dialog/animated.html +56 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/dialog/default.html +54 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/dialog/index.html +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/dialog/modal-confirmation.html +69 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/dialog/modal-form.html +167 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/dialog/modal-message.html +71 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/dialog/modal.html +60 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/draggable/constrain-movement.html +69 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/draggable/cursor-style.html +49 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/draggable/default.html +39 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/draggable/delay-start.html +45 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/draggable/events.html +77 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/draggable/handle.html +50 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/draggable/index.html +28 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/draggable/revert.html +44 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/draggable/scroll.html +51 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/draggable/snap-to.html +68 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/draggable/sortable.html +57 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/draggable/visual-feedback.html +77 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/droppable/accepted-elements.html +60 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/droppable/default.html +53 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/droppable/images/high_tatras.jpg +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/droppable/images/high_tatras2.jpg +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/droppable/images/high_tatras2_min.jpg +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/droppable/images/high_tatras3.jpg +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/droppable/images/high_tatras3_min.jpg +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/droppable/images/high_tatras4.jpg +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/droppable/images/high_tatras4_min.jpg +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/droppable/images/high_tatras_min.jpg +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/droppable/index.html +24 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/droppable/photo-manager.html +184 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/droppable/propagation.html +80 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/droppable/revert.html +61 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/droppable/shopping-cart.html +101 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/droppable/visual-feedback.html +78 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/effect/default.html +109 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/effect/easing.html +107 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/effect/index.html +19 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/hide/default.html +102 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/hide/index.html +18 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/images/calendar.gif +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/images/demo-config-on-tile.gif +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/images/demo-config-on.gif +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/images/demo-spindown-closed.gif +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/images/demo-spindown-open.gif +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/images/icon-docs-info.gif +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/images/pbar-ani.gif +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/index.html +314 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/position/cycler.html +122 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/position/default.html +153 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/position/images/earth.jpg +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/position/images/flight.jpg +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/position/images/rocket.jpg +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/position/index.html +19 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/progressbar/animated.html +44 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/progressbar/default.html +35 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/progressbar/images/pbar-ani.gif +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/progressbar/index.html +20 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/progressbar/resize.html +40 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/removeClass/default.html +52 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/removeClass/index.html +18 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/resizable/animate.html +41 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/resizable/aspect-ratio.html +40 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/resizable/constrain-area.html +45 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/resizable/default.html +38 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/resizable/delay-start.html +52 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/resizable/helper.html +41 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/resizable/index.html +28 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/resizable/max-min.html +43 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/resizable/snap-to-grid.html +40 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/resizable/synchronous-resize.html +47 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/resizable/textarea.html +39 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/resizable/visual-feedback.html +41 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/selectable/default.html +48 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/selectable/display-grid.html +53 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/selectable/index.html +20 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/selectable/serialize.html +59 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/show/default.html +103 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/show/index.html +18 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/slider/colorpicker.html +95 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/slider/default.html +37 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/slider/hotelrooms.html +59 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/slider/index.html +29 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/slider/multiple-vertical.html +77 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/slider/range-vertical.html +50 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/slider/range.html +51 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/slider/rangemax.html +50 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/slider/rangemin.html +51 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/slider/side-scroll.html +138 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/slider/slider-vertical.html +52 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/slider/steps.html +51 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/slider/tabs.html +67 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/sortable/connect-lists-through-tabs.html +79 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/sortable/connect-lists.html +58 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/sortable/default.html +51 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/sortable/delay-start.html +67 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/sortable/display-grid.html +54 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/sortable/empty-lists.html +69 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/sortable/index.html +26 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/sortable/items.html +71 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/sortable/placeholder.html +56 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/sortable/portlets.html +96 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/switchClass/default.html +48 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/switchClass/index.html +18 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/tabs/ajax/content1.html +4 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/tabs/ajax/content2.html +4 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/tabs/ajax/content3-slow.php +7 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/tabs/ajax/content4-broken.php +3 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/tabs/ajax.html +51 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/tabs/bottom.html +60 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/tabs/collapsible.html +56 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/tabs/cookie.html +57 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/tabs/default.html +49 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/tabs/index.html +25 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/tabs/manipulation.html +121 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/tabs/mouseover.html +54 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/tabs/sortable.html +65 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/tabs/vertical.html +64 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/toggle/default.html +92 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/toggle/index.html +18 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/toggleClass/default.html +46 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/demos/toggleClass/index.html +18 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/docs/accordion.html +977 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/docs/addClass.html +109 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/docs/animate.html +78 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/docs/autocomplete.html +710 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/docs/button.html +461 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/docs/datepicker.html +2531 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/docs/dialog.html +1603 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/docs/draggable.html +1536 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/docs/droppable.html +788 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/docs/effect.html +143 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/docs/hide.html +144 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/docs/position.html +226 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/docs/progressbar.html +381 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/docs/removeClass.html +113 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/docs/resizable.html +1160 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/docs/selectable.html +807 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/docs/show.html +144 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/docs/slider.html +821 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/docs/sortable.html +1910 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/docs/switchClass.html +129 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/docs/tabs.html +1513 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/docs/toggle.html +144 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/docs/toggleClass.html +111 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/external/jquery.bgiframe-2.1.1.js +10 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/external/jquery.cookie.js +89 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/external/jquery.metadata.js +122 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/external/qunit.css +153 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/external/qunit.js +1261 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/jquery-1.4.2.js +6240 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/base/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/base/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/base/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/base/images/ui-icons_222222_256x240.png +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/base/images/ui-icons_2e83ff_256x240.png +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/base/images/ui-icons_454545_256x240.png +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/base/images/ui-icons_888888_256x240.png +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/base/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/base/jquery.ui.accordion.css +19 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/base/jquery.ui.all.css +11 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/base/jquery.ui.autocomplete.css +53 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/base/jquery.ui.base.css +11 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/base/jquery.ui.button.css +38 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/base/jquery.ui.core.css +41 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/base/jquery.ui.datepicker.css +68 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/base/jquery.ui.dialog.css +21 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/base/jquery.ui.progressbar.css +11 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/base/jquery.ui.resizable.css +20 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/base/jquery.ui.selectable.css +10 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/base/jquery.ui.slider.css +24 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/base/jquery.ui.tabs.css +18 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/base/jquery.ui.theme.css +252 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/smoothness/jquery-ui-1.8.5.custom.css +572 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/smoothness/jquery.ui.accordion.css +19 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/smoothness/jquery.ui.all.css +11 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/smoothness/jquery.ui.autocomplete.css +53 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/smoothness/jquery.ui.base.css +11 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/smoothness/jquery.ui.button.css +38 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/smoothness/jquery.ui.core.css +41 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/smoothness/jquery.ui.datepicker.css +68 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/smoothness/jquery.ui.dialog.css +21 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/smoothness/jquery.ui.progressbar.css +11 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/smoothness/jquery.ui.resizable.css +20 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/smoothness/jquery.ui.selectable.css +10 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/smoothness/jquery.ui.slider.css +24 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/smoothness/jquery.ui.tabs.css +18 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/themes/smoothness/jquery.ui.theme.css +254 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery-ui-i18n.js +1199 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-af.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-ar.js +24 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-az.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-bg.js +24 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-bs.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-ca.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-cs.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-da.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-de.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-el.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-en-GB.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-eo.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-es.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-et.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-eu.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-fa.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-fi.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-fo.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-fr-CH.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-fr.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-he.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-hr.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-hu.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-hy.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-id.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-is.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-it.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-ja.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-ko.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-kz.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-lt.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-lv.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-ms.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-nl.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-no.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-pl.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-pt-BR.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-ro.js +26 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-ru.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-sk.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-sl.js +24 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-sq.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-sr-SR.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-sr.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-sv.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-ta.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-th.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-tr.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-uk.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-vi.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-zh-CN.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-zh-HK.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/i18n/jquery.ui.datepicker-zh-TW.js +23 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/jquery-ui-1.8.5.custom.js +11358 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/jquery.effects.blind.js +49 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/jquery.effects.bounce.js +78 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/jquery.effects.clip.js +54 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/jquery.effects.core.js +714 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/jquery.effects.drop.js +50 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/jquery.effects.explode.js +79 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/jquery.effects.fade.js +32 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/jquery.effects.fold.js +56 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/jquery.effects.highlight.js +50 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/jquery.effects.pulsate.js +51 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/jquery.effects.scale.js +178 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/jquery.effects.shake.js +57 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/jquery.effects.slide.js +50 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/jquery.effects.transfer.js +45 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/jquery.ui.accordion.js +598 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/jquery.ui.autocomplete.js +555 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/jquery.ui.button.js +372 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/jquery.ui.core.js +307 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/jquery.ui.datepicker.js +1732 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/jquery.ui.dialog.js +837 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/jquery.ui.draggable.js +797 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/jquery.ui.droppable.js +285 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/jquery.ui.mouse.js +151 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/jquery.ui.position.js +251 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/jquery.ui.progressbar.js +94 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/jquery.ui.resizable.js +812 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/jquery.ui.selectable.js +266 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/jquery.ui.slider.js +680 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/jquery.ui.sortable.js +1071 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/jquery.ui.tabs.js +758 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/jquery.ui.widget.js +249 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/minified/jquery.effects.blind.min.js +14 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/minified/jquery.effects.bounce.min.js +15 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/minified/jquery.effects.clip.min.js +14 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/minified/jquery.effects.core.min.js +30 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/minified/jquery.effects.drop.min.js +14 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/minified/jquery.effects.explode.min.js +15 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/minified/jquery.effects.fade.min.js +13 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/minified/jquery.effects.fold.min.js +14 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/minified/jquery.effects.highlight.min.js +14 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/minified/jquery.effects.pulsate.min.js +14 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/minified/jquery.effects.scale.min.js +20 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/minified/jquery.effects.shake.min.js +14 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/minified/jquery.effects.slide.min.js +14 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/minified/jquery.effects.transfer.min.js +14 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/minified/jquery.ui.accordion.min.js +30 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/minified/jquery.ui.autocomplete.min.js +31 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/minified/jquery.ui.button.min.js +25 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/minified/jquery.ui.core.min.js +17 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/minified/jquery.ui.datepicker.min.js +80 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/minified/jquery.ui.dialog.min.js +39 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/minified/jquery.ui.draggable.min.js +49 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/minified/jquery.ui.droppable.min.js +26 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/minified/jquery.ui.mouse.min.js +17 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/minified/jquery.ui.position.min.js +16 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/minified/jquery.ui.progressbar.min.js +16 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/minified/jquery.ui.resizable.min.js +47 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/minified/jquery.ui.selectable.min.js +22 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/minified/jquery.ui.slider.min.js +33 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/minified/jquery.ui.sortable.min.js +60 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/minified/jquery.ui.tabs.min.js +35 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/ui/minified/jquery.ui.widget.min.js +15 -0
- data/static/jquery-ui-1.8.5.custom/development-bundle/version.txt +1 -0
- data/static/jquery-ui-1.8.5.custom/index.html +395 -0
- data/static/jquery-ui-1.8.5.custom/js/jquery-1.4.2.min.js +154 -0
- data/static/jquery-ui-1.8.5.custom/js/jquery-ui-1.8.5.custom.min.js +778 -0
- metadata +421 -4
@@ -0,0 +1,1071 @@
|
|
1
|
+
/*
|
2
|
+
* jQuery UI Sortable 1.8.5
|
3
|
+
*
|
4
|
+
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
5
|
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6
|
+
* http://jquery.org/license
|
7
|
+
*
|
8
|
+
* http://docs.jquery.com/UI/Sortables
|
9
|
+
*
|
10
|
+
* Depends:
|
11
|
+
* jquery.ui.core.js
|
12
|
+
* jquery.ui.mouse.js
|
13
|
+
* jquery.ui.widget.js
|
14
|
+
*/
|
15
|
+
(function( $, undefined ) {
|
16
|
+
|
17
|
+
$.widget("ui.sortable", $.ui.mouse, {
|
18
|
+
widgetEventPrefix: "sort",
|
19
|
+
options: {
|
20
|
+
appendTo: "parent",
|
21
|
+
axis: false,
|
22
|
+
connectWith: false,
|
23
|
+
containment: false,
|
24
|
+
cursor: 'auto',
|
25
|
+
cursorAt: false,
|
26
|
+
dropOnEmpty: true,
|
27
|
+
forcePlaceholderSize: false,
|
28
|
+
forceHelperSize: false,
|
29
|
+
grid: false,
|
30
|
+
handle: false,
|
31
|
+
helper: "original",
|
32
|
+
items: '> *',
|
33
|
+
opacity: false,
|
34
|
+
placeholder: false,
|
35
|
+
revert: false,
|
36
|
+
scroll: true,
|
37
|
+
scrollSensitivity: 20,
|
38
|
+
scrollSpeed: 20,
|
39
|
+
scope: "default",
|
40
|
+
tolerance: "intersect",
|
41
|
+
zIndex: 1000
|
42
|
+
},
|
43
|
+
_create: function() {
|
44
|
+
|
45
|
+
var o = this.options;
|
46
|
+
this.containerCache = {};
|
47
|
+
this.element.addClass("ui-sortable");
|
48
|
+
|
49
|
+
//Get the items
|
50
|
+
this.refresh();
|
51
|
+
|
52
|
+
//Let's determine if the items are floating
|
53
|
+
this.floating = this.items.length ? (/left|right/).test(this.items[0].item.css('float')) : false;
|
54
|
+
|
55
|
+
//Let's determine the parent's offset
|
56
|
+
this.offset = this.element.offset();
|
57
|
+
|
58
|
+
//Initialize mouse events for interaction
|
59
|
+
this._mouseInit();
|
60
|
+
|
61
|
+
},
|
62
|
+
|
63
|
+
destroy: function() {
|
64
|
+
this.element
|
65
|
+
.removeClass("ui-sortable ui-sortable-disabled")
|
66
|
+
.removeData("sortable")
|
67
|
+
.unbind(".sortable");
|
68
|
+
this._mouseDestroy();
|
69
|
+
|
70
|
+
for ( var i = this.items.length - 1; i >= 0; i-- )
|
71
|
+
this.items[i].item.removeData("sortable-item");
|
72
|
+
|
73
|
+
return this;
|
74
|
+
},
|
75
|
+
|
76
|
+
_setOption: function(key, value){
|
77
|
+
if ( key === "disabled" ) {
|
78
|
+
this.options[ key ] = value;
|
79
|
+
|
80
|
+
this.widget()
|
81
|
+
[ value ? "addClass" : "removeClass"]( "ui-sortable-disabled" );
|
82
|
+
} else {
|
83
|
+
// Don't call widget base _setOption for disable as it adds ui-state-disabled class
|
84
|
+
$.Widget.prototype._setOption.apply(this, arguments);
|
85
|
+
}
|
86
|
+
},
|
87
|
+
|
88
|
+
_mouseCapture: function(event, overrideHandle) {
|
89
|
+
|
90
|
+
if (this.reverting) {
|
91
|
+
return false;
|
92
|
+
}
|
93
|
+
|
94
|
+
if(this.options.disabled || this.options.type == 'static') return false;
|
95
|
+
|
96
|
+
//We have to refresh the items data once first
|
97
|
+
this._refreshItems(event);
|
98
|
+
|
99
|
+
//Find out if the clicked node (or one of its parents) is a actual item in this.items
|
100
|
+
var currentItem = null, self = this, nodes = $(event.target).parents().each(function() {
|
101
|
+
if($.data(this, 'sortable-item') == self) {
|
102
|
+
currentItem = $(this);
|
103
|
+
return false;
|
104
|
+
}
|
105
|
+
});
|
106
|
+
if($.data(event.target, 'sortable-item') == self) currentItem = $(event.target);
|
107
|
+
|
108
|
+
if(!currentItem) return false;
|
109
|
+
if(this.options.handle && !overrideHandle) {
|
110
|
+
var validHandle = false;
|
111
|
+
|
112
|
+
$(this.options.handle, currentItem).find("*").andSelf().each(function() { if(this == event.target) validHandle = true; });
|
113
|
+
if(!validHandle) return false;
|
114
|
+
}
|
115
|
+
|
116
|
+
this.currentItem = currentItem;
|
117
|
+
this._removeCurrentsFromItems();
|
118
|
+
return true;
|
119
|
+
|
120
|
+
},
|
121
|
+
|
122
|
+
_mouseStart: function(event, overrideHandle, noActivation) {
|
123
|
+
|
124
|
+
var o = this.options, self = this;
|
125
|
+
this.currentContainer = this;
|
126
|
+
|
127
|
+
//We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture
|
128
|
+
this.refreshPositions();
|
129
|
+
|
130
|
+
//Create and append the visible helper
|
131
|
+
this.helper = this._createHelper(event);
|
132
|
+
|
133
|
+
//Cache the helper size
|
134
|
+
this._cacheHelperProportions();
|
135
|
+
|
136
|
+
/*
|
137
|
+
* - Position generation -
|
138
|
+
* This block generates everything position related - it's the core of draggables.
|
139
|
+
*/
|
140
|
+
|
141
|
+
//Cache the margins of the original element
|
142
|
+
this._cacheMargins();
|
143
|
+
|
144
|
+
//Get the next scrolling parent
|
145
|
+
this.scrollParent = this.helper.scrollParent();
|
146
|
+
|
147
|
+
//The element's absolute position on the page minus margins
|
148
|
+
this.offset = this.currentItem.offset();
|
149
|
+
this.offset = {
|
150
|
+
top: this.offset.top - this.margins.top,
|
151
|
+
left: this.offset.left - this.margins.left
|
152
|
+
};
|
153
|
+
|
154
|
+
// Only after we got the offset, we can change the helper's position to absolute
|
155
|
+
// TODO: Still need to figure out a way to make relative sorting possible
|
156
|
+
this.helper.css("position", "absolute");
|
157
|
+
this.cssPosition = this.helper.css("position");
|
158
|
+
|
159
|
+
$.extend(this.offset, {
|
160
|
+
click: { //Where the click happened, relative to the element
|
161
|
+
left: event.pageX - this.offset.left,
|
162
|
+
top: event.pageY - this.offset.top
|
163
|
+
},
|
164
|
+
parent: this._getParentOffset(),
|
165
|
+
relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
|
166
|
+
});
|
167
|
+
|
168
|
+
//Generate the original position
|
169
|
+
this.originalPosition = this._generatePosition(event);
|
170
|
+
this.originalPageX = event.pageX;
|
171
|
+
this.originalPageY = event.pageY;
|
172
|
+
|
173
|
+
//Adjust the mouse offset relative to the helper if 'cursorAt' is supplied
|
174
|
+
(o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
|
175
|
+
|
176
|
+
//Cache the former DOM position
|
177
|
+
this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] };
|
178
|
+
|
179
|
+
//If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way
|
180
|
+
if(this.helper[0] != this.currentItem[0]) {
|
181
|
+
this.currentItem.hide();
|
182
|
+
}
|
183
|
+
|
184
|
+
//Create the placeholder
|
185
|
+
this._createPlaceholder();
|
186
|
+
|
187
|
+
//Set a containment if given in the options
|
188
|
+
if(o.containment)
|
189
|
+
this._setContainment();
|
190
|
+
|
191
|
+
if(o.cursor) { // cursor option
|
192
|
+
if ($('body').css("cursor")) this._storedCursor = $('body').css("cursor");
|
193
|
+
$('body').css("cursor", o.cursor);
|
194
|
+
}
|
195
|
+
|
196
|
+
if(o.opacity) { // opacity option
|
197
|
+
if (this.helper.css("opacity")) this._storedOpacity = this.helper.css("opacity");
|
198
|
+
this.helper.css("opacity", o.opacity);
|
199
|
+
}
|
200
|
+
|
201
|
+
if(o.zIndex) { // zIndex option
|
202
|
+
if (this.helper.css("zIndex")) this._storedZIndex = this.helper.css("zIndex");
|
203
|
+
this.helper.css("zIndex", o.zIndex);
|
204
|
+
}
|
205
|
+
|
206
|
+
//Prepare scrolling
|
207
|
+
if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML')
|
208
|
+
this.overflowOffset = this.scrollParent.offset();
|
209
|
+
|
210
|
+
//Call callbacks
|
211
|
+
this._trigger("start", event, this._uiHash());
|
212
|
+
|
213
|
+
//Recache the helper size
|
214
|
+
if(!this._preserveHelperProportions)
|
215
|
+
this._cacheHelperProportions();
|
216
|
+
|
217
|
+
|
218
|
+
//Post 'activate' events to possible containers
|
219
|
+
if(!noActivation) {
|
220
|
+
for (var i = this.containers.length - 1; i >= 0; i--) { this.containers[i]._trigger("activate", event, self._uiHash(this)); }
|
221
|
+
}
|
222
|
+
|
223
|
+
//Prepare possible droppables
|
224
|
+
if($.ui.ddmanager)
|
225
|
+
$.ui.ddmanager.current = this;
|
226
|
+
|
227
|
+
if ($.ui.ddmanager && !o.dropBehaviour)
|
228
|
+
$.ui.ddmanager.prepareOffsets(this, event);
|
229
|
+
|
230
|
+
this.dragging = true;
|
231
|
+
|
232
|
+
this.helper.addClass("ui-sortable-helper");
|
233
|
+
this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position
|
234
|
+
return true;
|
235
|
+
|
236
|
+
},
|
237
|
+
|
238
|
+
_mouseDrag: function(event) {
|
239
|
+
|
240
|
+
//Compute the helpers position
|
241
|
+
this.position = this._generatePosition(event);
|
242
|
+
this.positionAbs = this._convertPositionTo("absolute");
|
243
|
+
|
244
|
+
if (!this.lastPositionAbs) {
|
245
|
+
this.lastPositionAbs = this.positionAbs;
|
246
|
+
}
|
247
|
+
|
248
|
+
//Do scrolling
|
249
|
+
if(this.options.scroll) {
|
250
|
+
var o = this.options, scrolled = false;
|
251
|
+
if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML') {
|
252
|
+
|
253
|
+
if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity)
|
254
|
+
this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;
|
255
|
+
else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity)
|
256
|
+
this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed;
|
257
|
+
|
258
|
+
if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity)
|
259
|
+
this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed;
|
260
|
+
else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity)
|
261
|
+
this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed;
|
262
|
+
|
263
|
+
} else {
|
264
|
+
|
265
|
+
if(event.pageY - $(document).scrollTop() < o.scrollSensitivity)
|
266
|
+
scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
|
267
|
+
else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity)
|
268
|
+
scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
|
269
|
+
|
270
|
+
if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity)
|
271
|
+
scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
|
272
|
+
else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity)
|
273
|
+
scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
|
274
|
+
|
275
|
+
}
|
276
|
+
|
277
|
+
if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour)
|
278
|
+
$.ui.ddmanager.prepareOffsets(this, event);
|
279
|
+
}
|
280
|
+
|
281
|
+
//Regenerate the absolute position used for position checks
|
282
|
+
this.positionAbs = this._convertPositionTo("absolute");
|
283
|
+
|
284
|
+
//Set the helper position
|
285
|
+
if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px';
|
286
|
+
if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px';
|
287
|
+
|
288
|
+
//Rearrange
|
289
|
+
for (var i = this.items.length - 1; i >= 0; i--) {
|
290
|
+
|
291
|
+
//Cache variables and intersection, continue if no intersection
|
292
|
+
var item = this.items[i], itemElement = item.item[0], intersection = this._intersectsWithPointer(item);
|
293
|
+
if (!intersection) continue;
|
294
|
+
|
295
|
+
if(itemElement != this.currentItem[0] //cannot intersect with itself
|
296
|
+
&& this.placeholder[intersection == 1 ? "next" : "prev"]()[0] != itemElement //no useless actions that have been done before
|
297
|
+
&& !$.ui.contains(this.placeholder[0], itemElement) //no action if the item moved is the parent of the item checked
|
298
|
+
&& (this.options.type == 'semi-dynamic' ? !$.ui.contains(this.element[0], itemElement) : true)
|
299
|
+
//&& itemElement.parentNode == this.placeholder[0].parentNode // only rearrange items within the same container
|
300
|
+
) {
|
301
|
+
|
302
|
+
this.direction = intersection == 1 ? "down" : "up";
|
303
|
+
|
304
|
+
if (this.options.tolerance == "pointer" || this._intersectsWithSides(item)) {
|
305
|
+
this._rearrange(event, item);
|
306
|
+
} else {
|
307
|
+
break;
|
308
|
+
}
|
309
|
+
|
310
|
+
this._trigger("change", event, this._uiHash());
|
311
|
+
break;
|
312
|
+
}
|
313
|
+
}
|
314
|
+
|
315
|
+
//Post events to containers
|
316
|
+
this._contactContainers(event);
|
317
|
+
|
318
|
+
//Interconnect with droppables
|
319
|
+
if($.ui.ddmanager) $.ui.ddmanager.drag(this, event);
|
320
|
+
|
321
|
+
//Call callbacks
|
322
|
+
this._trigger('sort', event, this._uiHash());
|
323
|
+
|
324
|
+
this.lastPositionAbs = this.positionAbs;
|
325
|
+
return false;
|
326
|
+
|
327
|
+
},
|
328
|
+
|
329
|
+
_mouseStop: function(event, noPropagation) {
|
330
|
+
|
331
|
+
if(!event) return;
|
332
|
+
|
333
|
+
//If we are using droppables, inform the manager about the drop
|
334
|
+
if ($.ui.ddmanager && !this.options.dropBehaviour)
|
335
|
+
$.ui.ddmanager.drop(this, event);
|
336
|
+
|
337
|
+
if(this.options.revert) {
|
338
|
+
var self = this;
|
339
|
+
var cur = self.placeholder.offset();
|
340
|
+
|
341
|
+
self.reverting = true;
|
342
|
+
|
343
|
+
$(this.helper).animate({
|
344
|
+
left: cur.left - this.offset.parent.left - self.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft),
|
345
|
+
top: cur.top - this.offset.parent.top - self.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop)
|
346
|
+
}, parseInt(this.options.revert, 10) || 500, function() {
|
347
|
+
self._clear(event);
|
348
|
+
});
|
349
|
+
} else {
|
350
|
+
this._clear(event, noPropagation);
|
351
|
+
}
|
352
|
+
|
353
|
+
return false;
|
354
|
+
|
355
|
+
},
|
356
|
+
|
357
|
+
cancel: function() {
|
358
|
+
|
359
|
+
var self = this;
|
360
|
+
|
361
|
+
if(this.dragging) {
|
362
|
+
|
363
|
+
this._mouseUp();
|
364
|
+
|
365
|
+
if(this.options.helper == "original")
|
366
|
+
this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
|
367
|
+
else
|
368
|
+
this.currentItem.show();
|
369
|
+
|
370
|
+
//Post deactivating events to containers
|
371
|
+
for (var i = this.containers.length - 1; i >= 0; i--){
|
372
|
+
this.containers[i]._trigger("deactivate", null, self._uiHash(this));
|
373
|
+
if(this.containers[i].containerCache.over) {
|
374
|
+
this.containers[i]._trigger("out", null, self._uiHash(this));
|
375
|
+
this.containers[i].containerCache.over = 0;
|
376
|
+
}
|
377
|
+
}
|
378
|
+
|
379
|
+
}
|
380
|
+
|
381
|
+
//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
|
382
|
+
if(this.placeholder[0].parentNode) this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
|
383
|
+
if(this.options.helper != "original" && this.helper && this.helper[0].parentNode) this.helper.remove();
|
384
|
+
|
385
|
+
$.extend(this, {
|
386
|
+
helper: null,
|
387
|
+
dragging: false,
|
388
|
+
reverting: false,
|
389
|
+
_noFinalSort: null
|
390
|
+
});
|
391
|
+
|
392
|
+
if(this.domPosition.prev) {
|
393
|
+
$(this.domPosition.prev).after(this.currentItem);
|
394
|
+
} else {
|
395
|
+
$(this.domPosition.parent).prepend(this.currentItem);
|
396
|
+
}
|
397
|
+
|
398
|
+
return this;
|
399
|
+
|
400
|
+
},
|
401
|
+
|
402
|
+
serialize: function(o) {
|
403
|
+
|
404
|
+
var items = this._getItemsAsjQuery(o && o.connected);
|
405
|
+
var str = []; o = o || {};
|
406
|
+
|
407
|
+
$(items).each(function() {
|
408
|
+
var res = ($(o.item || this).attr(o.attribute || 'id') || '').match(o.expression || (/(.+)[-=_](.+)/));
|
409
|
+
if(res) str.push((o.key || res[1]+'[]')+'='+(o.key && o.expression ? res[1] : res[2]));
|
410
|
+
});
|
411
|
+
|
412
|
+
if(!str.length && o.key) {
|
413
|
+
str.push(o.key + '=');
|
414
|
+
}
|
415
|
+
|
416
|
+
return str.join('&');
|
417
|
+
|
418
|
+
},
|
419
|
+
|
420
|
+
toArray: function(o) {
|
421
|
+
|
422
|
+
var items = this._getItemsAsjQuery(o && o.connected);
|
423
|
+
var ret = []; o = o || {};
|
424
|
+
|
425
|
+
items.each(function() { ret.push($(o.item || this).attr(o.attribute || 'id') || ''); });
|
426
|
+
return ret;
|
427
|
+
|
428
|
+
},
|
429
|
+
|
430
|
+
/* Be careful with the following core functions */
|
431
|
+
_intersectsWith: function(item) {
|
432
|
+
|
433
|
+
var x1 = this.positionAbs.left,
|
434
|
+
x2 = x1 + this.helperProportions.width,
|
435
|
+
y1 = this.positionAbs.top,
|
436
|
+
y2 = y1 + this.helperProportions.height;
|
437
|
+
|
438
|
+
var l = item.left,
|
439
|
+
r = l + item.width,
|
440
|
+
t = item.top,
|
441
|
+
b = t + item.height;
|
442
|
+
|
443
|
+
var dyClick = this.offset.click.top,
|
444
|
+
dxClick = this.offset.click.left;
|
445
|
+
|
446
|
+
var isOverElement = (y1 + dyClick) > t && (y1 + dyClick) < b && (x1 + dxClick) > l && (x1 + dxClick) < r;
|
447
|
+
|
448
|
+
if( this.options.tolerance == "pointer"
|
449
|
+
|| this.options.forcePointerForContainers
|
450
|
+
|| (this.options.tolerance != "pointer" && this.helperProportions[this.floating ? 'width' : 'height'] > item[this.floating ? 'width' : 'height'])
|
451
|
+
) {
|
452
|
+
return isOverElement;
|
453
|
+
} else {
|
454
|
+
|
455
|
+
return (l < x1 + (this.helperProportions.width / 2) // Right Half
|
456
|
+
&& x2 - (this.helperProportions.width / 2) < r // Left Half
|
457
|
+
&& t < y1 + (this.helperProportions.height / 2) // Bottom Half
|
458
|
+
&& y2 - (this.helperProportions.height / 2) < b ); // Top Half
|
459
|
+
|
460
|
+
}
|
461
|
+
},
|
462
|
+
|
463
|
+
_intersectsWithPointer: function(item) {
|
464
|
+
|
465
|
+
var isOverElementHeight = $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),
|
466
|
+
isOverElementWidth = $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),
|
467
|
+
isOverElement = isOverElementHeight && isOverElementWidth,
|
468
|
+
verticalDirection = this._getDragVerticalDirection(),
|
469
|
+
horizontalDirection = this._getDragHorizontalDirection();
|
470
|
+
|
471
|
+
if (!isOverElement)
|
472
|
+
return false;
|
473
|
+
|
474
|
+
return this.floating ?
|
475
|
+
( ((horizontalDirection && horizontalDirection == "right") || verticalDirection == "down") ? 2 : 1 )
|
476
|
+
: ( verticalDirection && (verticalDirection == "down" ? 2 : 1) );
|
477
|
+
|
478
|
+
},
|
479
|
+
|
480
|
+
_intersectsWithSides: function(item) {
|
481
|
+
|
482
|
+
var isOverBottomHalf = $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),
|
483
|
+
isOverRightHalf = $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width),
|
484
|
+
verticalDirection = this._getDragVerticalDirection(),
|
485
|
+
horizontalDirection = this._getDragHorizontalDirection();
|
486
|
+
|
487
|
+
if (this.floating && horizontalDirection) {
|
488
|
+
return ((horizontalDirection == "right" && isOverRightHalf) || (horizontalDirection == "left" && !isOverRightHalf));
|
489
|
+
} else {
|
490
|
+
return verticalDirection && ((verticalDirection == "down" && isOverBottomHalf) || (verticalDirection == "up" && !isOverBottomHalf));
|
491
|
+
}
|
492
|
+
|
493
|
+
},
|
494
|
+
|
495
|
+
_getDragVerticalDirection: function() {
|
496
|
+
var delta = this.positionAbs.top - this.lastPositionAbs.top;
|
497
|
+
return delta != 0 && (delta > 0 ? "down" : "up");
|
498
|
+
},
|
499
|
+
|
500
|
+
_getDragHorizontalDirection: function() {
|
501
|
+
var delta = this.positionAbs.left - this.lastPositionAbs.left;
|
502
|
+
return delta != 0 && (delta > 0 ? "right" : "left");
|
503
|
+
},
|
504
|
+
|
505
|
+
refresh: function(event) {
|
506
|
+
this._refreshItems(event);
|
507
|
+
this.refreshPositions();
|
508
|
+
return this;
|
509
|
+
},
|
510
|
+
|
511
|
+
_connectWith: function() {
|
512
|
+
var options = this.options;
|
513
|
+
return options.connectWith.constructor == String
|
514
|
+
? [options.connectWith]
|
515
|
+
: options.connectWith;
|
516
|
+
},
|
517
|
+
|
518
|
+
_getItemsAsjQuery: function(connected) {
|
519
|
+
|
520
|
+
var self = this;
|
521
|
+
var items = [];
|
522
|
+
var queries = [];
|
523
|
+
var connectWith = this._connectWith();
|
524
|
+
|
525
|
+
if(connectWith && connected) {
|
526
|
+
for (var i = connectWith.length - 1; i >= 0; i--){
|
527
|
+
var cur = $(connectWith[i]);
|
528
|
+
for (var j = cur.length - 1; j >= 0; j--){
|
529
|
+
var inst = $.data(cur[j], 'sortable');
|
530
|
+
if(inst && inst != this && !inst.options.disabled) {
|
531
|
+
queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper").not('.ui-sortable-placeholder'), inst]);
|
532
|
+
}
|
533
|
+
};
|
534
|
+
};
|
535
|
+
}
|
536
|
+
|
537
|
+
queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper").not('.ui-sortable-placeholder'), this]);
|
538
|
+
|
539
|
+
for (var i = queries.length - 1; i >= 0; i--){
|
540
|
+
queries[i][0].each(function() {
|
541
|
+
items.push(this);
|
542
|
+
});
|
543
|
+
};
|
544
|
+
|
545
|
+
return $(items);
|
546
|
+
|
547
|
+
},
|
548
|
+
|
549
|
+
_removeCurrentsFromItems: function() {
|
550
|
+
|
551
|
+
var list = this.currentItem.find(":data(sortable-item)");
|
552
|
+
|
553
|
+
for (var i=0; i < this.items.length; i++) {
|
554
|
+
|
555
|
+
for (var j=0; j < list.length; j++) {
|
556
|
+
if(list[j] == this.items[i].item[0])
|
557
|
+
this.items.splice(i,1);
|
558
|
+
};
|
559
|
+
|
560
|
+
};
|
561
|
+
|
562
|
+
},
|
563
|
+
|
564
|
+
_refreshItems: function(event) {
|
565
|
+
|
566
|
+
this.items = [];
|
567
|
+
this.containers = [this];
|
568
|
+
var items = this.items;
|
569
|
+
var self = this;
|
570
|
+
var queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]];
|
571
|
+
var connectWith = this._connectWith();
|
572
|
+
|
573
|
+
if(connectWith) {
|
574
|
+
for (var i = connectWith.length - 1; i >= 0; i--){
|
575
|
+
var cur = $(connectWith[i]);
|
576
|
+
for (var j = cur.length - 1; j >= 0; j--){
|
577
|
+
var inst = $.data(cur[j], 'sortable');
|
578
|
+
if(inst && inst != this && !inst.options.disabled) {
|
579
|
+
queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]);
|
580
|
+
this.containers.push(inst);
|
581
|
+
}
|
582
|
+
};
|
583
|
+
};
|
584
|
+
}
|
585
|
+
|
586
|
+
for (var i = queries.length - 1; i >= 0; i--) {
|
587
|
+
var targetData = queries[i][1];
|
588
|
+
var _queries = queries[i][0];
|
589
|
+
|
590
|
+
for (var j=0, queriesLength = _queries.length; j < queriesLength; j++) {
|
591
|
+
var item = $(_queries[j]);
|
592
|
+
|
593
|
+
item.data('sortable-item', targetData); // Data for target checking (mouse manager)
|
594
|
+
|
595
|
+
items.push({
|
596
|
+
item: item,
|
597
|
+
instance: targetData,
|
598
|
+
width: 0, height: 0,
|
599
|
+
left: 0, top: 0
|
600
|
+
});
|
601
|
+
};
|
602
|
+
};
|
603
|
+
|
604
|
+
},
|
605
|
+
|
606
|
+
refreshPositions: function(fast) {
|
607
|
+
|
608
|
+
//This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change
|
609
|
+
if(this.offsetParent && this.helper) {
|
610
|
+
this.offset.parent = this._getParentOffset();
|
611
|
+
}
|
612
|
+
|
613
|
+
for (var i = this.items.length - 1; i >= 0; i--){
|
614
|
+
var item = this.items[i];
|
615
|
+
|
616
|
+
var t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;
|
617
|
+
|
618
|
+
if (!fast) {
|
619
|
+
item.width = t.outerWidth();
|
620
|
+
item.height = t.outerHeight();
|
621
|
+
}
|
622
|
+
|
623
|
+
var p = t.offset();
|
624
|
+
item.left = p.left;
|
625
|
+
item.top = p.top;
|
626
|
+
};
|
627
|
+
|
628
|
+
if(this.options.custom && this.options.custom.refreshContainers) {
|
629
|
+
this.options.custom.refreshContainers.call(this);
|
630
|
+
} else {
|
631
|
+
for (var i = this.containers.length - 1; i >= 0; i--){
|
632
|
+
var p = this.containers[i].element.offset();
|
633
|
+
this.containers[i].containerCache.left = p.left;
|
634
|
+
this.containers[i].containerCache.top = p.top;
|
635
|
+
this.containers[i].containerCache.width = this.containers[i].element.outerWidth();
|
636
|
+
this.containers[i].containerCache.height = this.containers[i].element.outerHeight();
|
637
|
+
};
|
638
|
+
}
|
639
|
+
|
640
|
+
return this;
|
641
|
+
},
|
642
|
+
|
643
|
+
_createPlaceholder: function(that) {
|
644
|
+
|
645
|
+
var self = that || this, o = self.options;
|
646
|
+
|
647
|
+
if(!o.placeholder || o.placeholder.constructor == String) {
|
648
|
+
var className = o.placeholder;
|
649
|
+
o.placeholder = {
|
650
|
+
element: function() {
|
651
|
+
|
652
|
+
var el = $(document.createElement(self.currentItem[0].nodeName))
|
653
|
+
.addClass(className || self.currentItem[0].className+" ui-sortable-placeholder")
|
654
|
+
.removeClass("ui-sortable-helper")[0];
|
655
|
+
|
656
|
+
if(!className)
|
657
|
+
el.style.visibility = "hidden";
|
658
|
+
|
659
|
+
return el;
|
660
|
+
},
|
661
|
+
update: function(container, p) {
|
662
|
+
|
663
|
+
// 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that
|
664
|
+
// 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified
|
665
|
+
if(className && !o.forcePlaceholderSize) return;
|
666
|
+
|
667
|
+
//If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item
|
668
|
+
if(!p.height()) { p.height(self.currentItem.innerHeight() - parseInt(self.currentItem.css('paddingTop')||0, 10) - parseInt(self.currentItem.css('paddingBottom')||0, 10)); };
|
669
|
+
if(!p.width()) { p.width(self.currentItem.innerWidth() - parseInt(self.currentItem.css('paddingLeft')||0, 10) - parseInt(self.currentItem.css('paddingRight')||0, 10)); };
|
670
|
+
}
|
671
|
+
};
|
672
|
+
}
|
673
|
+
|
674
|
+
//Create the placeholder
|
675
|
+
self.placeholder = $(o.placeholder.element.call(self.element, self.currentItem));
|
676
|
+
|
677
|
+
//Append it after the actual current item
|
678
|
+
self.currentItem.after(self.placeholder);
|
679
|
+
|
680
|
+
//Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)
|
681
|
+
o.placeholder.update(self, self.placeholder);
|
682
|
+
|
683
|
+
},
|
684
|
+
|
685
|
+
_contactContainers: function(event) {
|
686
|
+
|
687
|
+
// get innermost container that intersects with item
|
688
|
+
var innermostContainer = null, innermostIndex = null;
|
689
|
+
|
690
|
+
|
691
|
+
for (var i = this.containers.length - 1; i >= 0; i--){
|
692
|
+
|
693
|
+
// never consider a container that's located within the item itself
|
694
|
+
if($.ui.contains(this.currentItem[0], this.containers[i].element[0]))
|
695
|
+
continue;
|
696
|
+
|
697
|
+
if(this._intersectsWith(this.containers[i].containerCache)) {
|
698
|
+
|
699
|
+
// if we've already found a container and it's more "inner" than this, then continue
|
700
|
+
if(innermostContainer && $.ui.contains(this.containers[i].element[0], innermostContainer.element[0]))
|
701
|
+
continue;
|
702
|
+
|
703
|
+
innermostContainer = this.containers[i];
|
704
|
+
innermostIndex = i;
|
705
|
+
|
706
|
+
} else {
|
707
|
+
// container doesn't intersect. trigger "out" event if necessary
|
708
|
+
if(this.containers[i].containerCache.over) {
|
709
|
+
this.containers[i]._trigger("out", event, this._uiHash(this));
|
710
|
+
this.containers[i].containerCache.over = 0;
|
711
|
+
}
|
712
|
+
}
|
713
|
+
|
714
|
+
}
|
715
|
+
|
716
|
+
// if no intersecting containers found, return
|
717
|
+
if(!innermostContainer) return;
|
718
|
+
|
719
|
+
// move the item into the container if it's not there already
|
720
|
+
if(this.containers.length === 1) {
|
721
|
+
this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
|
722
|
+
this.containers[innermostIndex].containerCache.over = 1;
|
723
|
+
} else if(this.currentContainer != this.containers[innermostIndex]) {
|
724
|
+
|
725
|
+
//When entering a new container, we will find the item with the least distance and append our item near it
|
726
|
+
var dist = 10000; var itemWithLeastDistance = null; var base = this.positionAbs[this.containers[innermostIndex].floating ? 'left' : 'top'];
|
727
|
+
for (var j = this.items.length - 1; j >= 0; j--) {
|
728
|
+
if(!$.ui.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) continue;
|
729
|
+
var cur = this.items[j][this.containers[innermostIndex].floating ? 'left' : 'top'];
|
730
|
+
if(Math.abs(cur - base) < dist) {
|
731
|
+
dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];
|
732
|
+
}
|
733
|
+
}
|
734
|
+
|
735
|
+
if(!itemWithLeastDistance && !this.options.dropOnEmpty) //Check if dropOnEmpty is enabled
|
736
|
+
return;
|
737
|
+
|
738
|
+
this.currentContainer = this.containers[innermostIndex];
|
739
|
+
itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true);
|
740
|
+
this._trigger("change", event, this._uiHash());
|
741
|
+
this.containers[innermostIndex]._trigger("change", event, this._uiHash(this));
|
742
|
+
|
743
|
+
//Update the placeholder
|
744
|
+
this.options.placeholder.update(this.currentContainer, this.placeholder);
|
745
|
+
|
746
|
+
this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
|
747
|
+
this.containers[innermostIndex].containerCache.over = 1;
|
748
|
+
}
|
749
|
+
|
750
|
+
|
751
|
+
},
|
752
|
+
|
753
|
+
_createHelper: function(event) {
|
754
|
+
|
755
|
+
var o = this.options;
|
756
|
+
var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper == 'clone' ? this.currentItem.clone() : this.currentItem);
|
757
|
+
|
758
|
+
if(!helper.parents('body').length) //Add the helper to the DOM if that didn't happen already
|
759
|
+
$(o.appendTo != 'parent' ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]);
|
760
|
+
|
761
|
+
if(helper[0] == this.currentItem[0])
|
762
|
+
this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") };
|
763
|
+
|
764
|
+
if(helper[0].style.width == '' || o.forceHelperSize) helper.width(this.currentItem.width());
|
765
|
+
if(helper[0].style.height == '' || o.forceHelperSize) helper.height(this.currentItem.height());
|
766
|
+
|
767
|
+
return helper;
|
768
|
+
|
769
|
+
},
|
770
|
+
|
771
|
+
_adjustOffsetFromHelper: function(obj) {
|
772
|
+
if (typeof obj == 'string') {
|
773
|
+
obj = obj.split(' ');
|
774
|
+
}
|
775
|
+
if ($.isArray(obj)) {
|
776
|
+
obj = {left: +obj[0], top: +obj[1] || 0};
|
777
|
+
}
|
778
|
+
if ('left' in obj) {
|
779
|
+
this.offset.click.left = obj.left + this.margins.left;
|
780
|
+
}
|
781
|
+
if ('right' in obj) {
|
782
|
+
this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
|
783
|
+
}
|
784
|
+
if ('top' in obj) {
|
785
|
+
this.offset.click.top = obj.top + this.margins.top;
|
786
|
+
}
|
787
|
+
if ('bottom' in obj) {
|
788
|
+
this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
|
789
|
+
}
|
790
|
+
},
|
791
|
+
|
792
|
+
_getParentOffset: function() {
|
793
|
+
|
794
|
+
|
795
|
+
//Get the offsetParent and cache its position
|
796
|
+
this.offsetParent = this.helper.offsetParent();
|
797
|
+
var po = this.offsetParent.offset();
|
798
|
+
|
799
|
+
// This is a special case where we need to modify a offset calculated on start, since the following happened:
|
800
|
+
// 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
|
801
|
+
// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
|
802
|
+
// the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
|
803
|
+
if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) {
|
804
|
+
po.left += this.scrollParent.scrollLeft();
|
805
|
+
po.top += this.scrollParent.scrollTop();
|
806
|
+
}
|
807
|
+
|
808
|
+
if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information
|
809
|
+
|| (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.browser.msie)) //Ugly IE fix
|
810
|
+
po = { top: 0, left: 0 };
|
811
|
+
|
812
|
+
return {
|
813
|
+
top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
|
814
|
+
left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
|
815
|
+
};
|
816
|
+
|
817
|
+
},
|
818
|
+
|
819
|
+
_getRelativeOffset: function() {
|
820
|
+
|
821
|
+
if(this.cssPosition == "relative") {
|
822
|
+
var p = this.currentItem.position();
|
823
|
+
return {
|
824
|
+
top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
|
825
|
+
left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
|
826
|
+
};
|
827
|
+
} else {
|
828
|
+
return { top: 0, left: 0 };
|
829
|
+
}
|
830
|
+
|
831
|
+
},
|
832
|
+
|
833
|
+
_cacheMargins: function() {
|
834
|
+
this.margins = {
|
835
|
+
left: (parseInt(this.currentItem.css("marginLeft"),10) || 0),
|
836
|
+
top: (parseInt(this.currentItem.css("marginTop"),10) || 0)
|
837
|
+
};
|
838
|
+
},
|
839
|
+
|
840
|
+
_cacheHelperProportions: function() {
|
841
|
+
this.helperProportions = {
|
842
|
+
width: this.helper.outerWidth(),
|
843
|
+
height: this.helper.outerHeight()
|
844
|
+
};
|
845
|
+
},
|
846
|
+
|
847
|
+
_setContainment: function() {
|
848
|
+
|
849
|
+
var o = this.options;
|
850
|
+
if(o.containment == 'parent') o.containment = this.helper[0].parentNode;
|
851
|
+
if(o.containment == 'document' || o.containment == 'window') this.containment = [
|
852
|
+
0 - this.offset.relative.left - this.offset.parent.left,
|
853
|
+
0 - this.offset.relative.top - this.offset.parent.top,
|
854
|
+
$(o.containment == 'document' ? document : window).width() - this.helperProportions.width - this.margins.left,
|
855
|
+
($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
|
856
|
+
];
|
857
|
+
|
858
|
+
if(!(/^(document|window|parent)$/).test(o.containment)) {
|
859
|
+
var ce = $(o.containment)[0];
|
860
|
+
var co = $(o.containment).offset();
|
861
|
+
var over = ($(ce).css("overflow") != 'hidden');
|
862
|
+
|
863
|
+
this.containment = [
|
864
|
+
co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left,
|
865
|
+
co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top,
|
866
|
+
co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left,
|
867
|
+
co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top
|
868
|
+
];
|
869
|
+
}
|
870
|
+
|
871
|
+
},
|
872
|
+
|
873
|
+
_convertPositionTo: function(d, pos) {
|
874
|
+
|
875
|
+
if(!pos) pos = this.position;
|
876
|
+
var mod = d == "absolute" ? 1 : -1;
|
877
|
+
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);
|
878
|
+
|
879
|
+
return {
|
880
|
+
top: (
|
881
|
+
pos.top // The absolute mouse position
|
882
|
+
+ this.offset.relative.top * mod // Only for relative positioned nodes: Relative offset from element to offset parent
|
883
|
+
+ this.offset.parent.top * mod // The offsetParent's offset without borders (offset + border)
|
884
|
+
- ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
|
885
|
+
),
|
886
|
+
left: (
|
887
|
+
pos.left // The absolute mouse position
|
888
|
+
+ this.offset.relative.left * mod // Only for relative positioned nodes: Relative offset from element to offset parent
|
889
|
+
+ this.offset.parent.left * mod // The offsetParent's offset without borders (offset + border)
|
890
|
+
- ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
|
891
|
+
)
|
892
|
+
};
|
893
|
+
|
894
|
+
},
|
895
|
+
|
896
|
+
_generatePosition: function(event) {
|
897
|
+
|
898
|
+
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);
|
899
|
+
|
900
|
+
// This is another very weird special case that only happens for relative elements:
|
901
|
+
// 1. If the css position is relative
|
902
|
+
// 2. and the scroll parent is the document or similar to the offset parent
|
903
|
+
// we have to refresh the relative offset during the scroll so there are no jumps
|
904
|
+
if(this.cssPosition == 'relative' && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0])) {
|
905
|
+
this.offset.relative = this._getRelativeOffset();
|
906
|
+
}
|
907
|
+
|
908
|
+
var pageX = event.pageX;
|
909
|
+
var pageY = event.pageY;
|
910
|
+
|
911
|
+
/*
|
912
|
+
* - Position constraining -
|
913
|
+
* Constrain the position to a mix of grid, containment.
|
914
|
+
*/
|
915
|
+
|
916
|
+
if(this.originalPosition) { //If we are not dragging yet, we won't check for options
|
917
|
+
|
918
|
+
if(this.containment) {
|
919
|
+
if(event.pageX - this.offset.click.left < this.containment[0]) pageX = this.containment[0] + this.offset.click.left;
|
920
|
+
if(event.pageY - this.offset.click.top < this.containment[1]) pageY = this.containment[1] + this.offset.click.top;
|
921
|
+
if(event.pageX - this.offset.click.left > this.containment[2]) pageX = this.containment[2] + this.offset.click.left;
|
922
|
+
if(event.pageY - this.offset.click.top > this.containment[3]) pageY = this.containment[3] + this.offset.click.top;
|
923
|
+
}
|
924
|
+
|
925
|
+
if(o.grid) {
|
926
|
+
var top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];
|
927
|
+
pageY = this.containment ? (!(top - this.offset.click.top < this.containment[1] || top - this.offset.click.top > this.containment[3]) ? top : (!(top - this.offset.click.top < this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
|
928
|
+
|
929
|
+
var left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];
|
930
|
+
pageX = this.containment ? (!(left - this.offset.click.left < this.containment[0] || left - this.offset.click.left > this.containment[2]) ? left : (!(left - this.offset.click.left < this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
|
931
|
+
}
|
932
|
+
|
933
|
+
}
|
934
|
+
|
935
|
+
return {
|
936
|
+
top: (
|
937
|
+
pageY // The absolute mouse position
|
938
|
+
- this.offset.click.top // Click offset (relative to the element)
|
939
|
+
- this.offset.relative.top // Only for relative positioned nodes: Relative offset from element to offset parent
|
940
|
+
- this.offset.parent.top // The offsetParent's offset without borders (offset + border)
|
941
|
+
+ ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
|
942
|
+
),
|
943
|
+
left: (
|
944
|
+
pageX // The absolute mouse position
|
945
|
+
- this.offset.click.left // Click offset (relative to the element)
|
946
|
+
- this.offset.relative.left // Only for relative positioned nodes: Relative offset from element to offset parent
|
947
|
+
- this.offset.parent.left // The offsetParent's offset without borders (offset + border)
|
948
|
+
+ ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
|
949
|
+
)
|
950
|
+
};
|
951
|
+
|
952
|
+
},
|
953
|
+
|
954
|
+
_rearrange: function(event, i, a, hardRefresh) {
|
955
|
+
|
956
|
+
a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction == 'down' ? i.item[0] : i.item[0].nextSibling));
|
957
|
+
|
958
|
+
//Various things done here to improve the performance:
|
959
|
+
// 1. we create a setTimeout, that calls refreshPositions
|
960
|
+
// 2. on the instance, we have a counter variable, that get's higher after every append
|
961
|
+
// 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same
|
962
|
+
// 4. this lets only the last addition to the timeout stack through
|
963
|
+
this.counter = this.counter ? ++this.counter : 1;
|
964
|
+
var self = this, counter = this.counter;
|
965
|
+
|
966
|
+
window.setTimeout(function() {
|
967
|
+
if(counter == self.counter) self.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove
|
968
|
+
},0);
|
969
|
+
|
970
|
+
},
|
971
|
+
|
972
|
+
_clear: function(event, noPropagation) {
|
973
|
+
|
974
|
+
this.reverting = false;
|
975
|
+
// We delay all events that have to be triggered to after the point where the placeholder has been removed and
|
976
|
+
// everything else normalized again
|
977
|
+
var delayedTriggers = [], self = this;
|
978
|
+
|
979
|
+
// We first have to update the dom position of the actual currentItem
|
980
|
+
// Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088)
|
981
|
+
if(!this._noFinalSort && this.currentItem[0].parentNode) this.placeholder.before(this.currentItem);
|
982
|
+
this._noFinalSort = null;
|
983
|
+
|
984
|
+
if(this.helper[0] == this.currentItem[0]) {
|
985
|
+
for(var i in this._storedCSS) {
|
986
|
+
if(this._storedCSS[i] == 'auto' || this._storedCSS[i] == 'static') this._storedCSS[i] = '';
|
987
|
+
}
|
988
|
+
this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
|
989
|
+
} else {
|
990
|
+
this.currentItem.show();
|
991
|
+
}
|
992
|
+
|
993
|
+
if(this.fromOutside && !noPropagation) delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); });
|
994
|
+
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
|
995
|
+
if(!$.ui.contains(this.element[0], this.currentItem[0])) { //Node was moved out of the current element
|
996
|
+
if(!noPropagation) delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); });
|
997
|
+
for (var i = this.containers.length - 1; i >= 0; i--){
|
998
|
+
if($.ui.contains(this.containers[i].element[0], this.currentItem[0]) && !noPropagation) {
|
999
|
+
delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
|
1000
|
+
delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
|
1001
|
+
}
|
1002
|
+
};
|
1003
|
+
};
|
1004
|
+
|
1005
|
+
//Post events to containers
|
1006
|
+
for (var i = this.containers.length - 1; i >= 0; i--){
|
1007
|
+
if(!noPropagation) delayedTriggers.push((function(c) { return function(event) { c._trigger("deactivate", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
|
1008
|
+
if(this.containers[i].containerCache.over) {
|
1009
|
+
delayedTriggers.push((function(c) { return function(event) { c._trigger("out", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
|
1010
|
+
this.containers[i].containerCache.over = 0;
|
1011
|
+
}
|
1012
|
+
}
|
1013
|
+
|
1014
|
+
//Do what was originally in plugins
|
1015
|
+
if(this._storedCursor) $('body').css("cursor", this._storedCursor); //Reset cursor
|
1016
|
+
if(this._storedOpacity) this.helper.css("opacity", this._storedOpacity); //Reset opacity
|
1017
|
+
if(this._storedZIndex) this.helper.css("zIndex", this._storedZIndex == 'auto' ? '' : this._storedZIndex); //Reset z-index
|
1018
|
+
|
1019
|
+
this.dragging = false;
|
1020
|
+
if(this.cancelHelperRemoval) {
|
1021
|
+
if(!noPropagation) {
|
1022
|
+
this._trigger("beforeStop", event, this._uiHash());
|
1023
|
+
for (var i=0; i < delayedTriggers.length; i++) { delayedTriggers[i].call(this, event); }; //Trigger all delayed events
|
1024
|
+
this._trigger("stop", event, this._uiHash());
|
1025
|
+
}
|
1026
|
+
return false;
|
1027
|
+
}
|
1028
|
+
|
1029
|
+
if(!noPropagation) this._trigger("beforeStop", event, this._uiHash());
|
1030
|
+
|
1031
|
+
//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
|
1032
|
+
this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
|
1033
|
+
|
1034
|
+
if(this.helper[0] != this.currentItem[0]) this.helper.remove(); this.helper = null;
|
1035
|
+
|
1036
|
+
if(!noPropagation) {
|
1037
|
+
for (var i=0; i < delayedTriggers.length; i++) { delayedTriggers[i].call(this, event); }; //Trigger all delayed events
|
1038
|
+
this._trigger("stop", event, this._uiHash());
|
1039
|
+
}
|
1040
|
+
|
1041
|
+
this.fromOutside = false;
|
1042
|
+
return true;
|
1043
|
+
|
1044
|
+
},
|
1045
|
+
|
1046
|
+
_trigger: function() {
|
1047
|
+
if ($.Widget.prototype._trigger.apply(this, arguments) === false) {
|
1048
|
+
this.cancel();
|
1049
|
+
}
|
1050
|
+
},
|
1051
|
+
|
1052
|
+
_uiHash: function(inst) {
|
1053
|
+
var self = inst || this;
|
1054
|
+
return {
|
1055
|
+
helper: self.helper,
|
1056
|
+
placeholder: self.placeholder || $([]),
|
1057
|
+
position: self.position,
|
1058
|
+
originalPosition: self.originalPosition,
|
1059
|
+
offset: self.positionAbs,
|
1060
|
+
item: self.currentItem,
|
1061
|
+
sender: inst ? inst.element : null
|
1062
|
+
};
|
1063
|
+
}
|
1064
|
+
|
1065
|
+
});
|
1066
|
+
|
1067
|
+
$.extend($.ui.sortable, {
|
1068
|
+
version: "1.8.5"
|
1069
|
+
});
|
1070
|
+
|
1071
|
+
})(jQuery);
|