From c1f9b1f7b1b77776192048005dcc66dcf3df2bfb Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 27 Dec 2014 15:41:37 +0100 Subject: Update to MediaWiki 1.24.1 --- resources/Resources.php | 1318 ++- resources/assets/file-type-icons/COPYING | 43 + resources/assets/file-type-icons/fileicon-c.png | Bin 0 -> 1753 bytes resources/assets/file-type-icons/fileicon-cpp.png | Bin 0 -> 1382 bytes resources/assets/file-type-icons/fileicon-deb.png | Bin 0 -> 4527 bytes resources/assets/file-type-icons/fileicon-djvu.png | Bin 0 -> 10436 bytes resources/assets/file-type-icons/fileicon-dvi.png | Bin 0 -> 12476 bytes resources/assets/file-type-icons/fileicon-exe.png | Bin 0 -> 5469 bytes resources/assets/file-type-icons/fileicon-h.png | Bin 0 -> 803 bytes resources/assets/file-type-icons/fileicon-html.png | Bin 0 -> 7171 bytes resources/assets/file-type-icons/fileicon-iso.png | Bin 0 -> 6105 bytes resources/assets/file-type-icons/fileicon-java.png | Bin 0 -> 5706 bytes resources/assets/file-type-icons/fileicon-mid.png | Bin 0 -> 6316 bytes resources/assets/file-type-icons/fileicon-mov.png | Bin 0 -> 7579 bytes resources/assets/file-type-icons/fileicon-o.png | Bin 0 -> 1742 bytes resources/assets/file-type-icons/fileicon-ogg.png | Bin 0 -> 3151 bytes resources/assets/file-type-icons/fileicon-pdf.png | Bin 0 -> 4710 bytes resources/assets/file-type-icons/fileicon-ps.png | Bin 0 -> 2786 bytes resources/assets/file-type-icons/fileicon-psd.png | Bin 0 -> 7756 bytes resources/assets/file-type-icons/fileicon-rm.png | Bin 0 -> 2519 bytes resources/assets/file-type-icons/fileicon-rpm.png | Bin 0 -> 3784 bytes resources/assets/file-type-icons/fileicon-svg.png | Bin 0 -> 4793 bytes resources/assets/file-type-icons/fileicon-tar.png | Bin 0 -> 6025 bytes resources/assets/file-type-icons/fileicon-tex.png | Bin 0 -> 3738 bytes resources/assets/file-type-icons/fileicon-ttf.png | Bin 0 -> 3193 bytes resources/assets/file-type-icons/fileicon-txt.png | Bin 0 -> 3388 bytes resources/assets/file-type-icons/fileicon-xcf.png | Bin 0 -> 12540 bytes resources/assets/file-type-icons/fileicon.png | Bin 0 -> 789 bytes resources/assets/licenses/cc-0.png | Bin 0 -> 969 bytes resources/assets/licenses/cc-by-nc-sa.png | Bin 0 -> 1530 bytes resources/assets/licenses/cc-by-sa.png | Bin 0 -> 1377 bytes resources/assets/licenses/cc-by.png | Bin 0 -> 1165 bytes resources/assets/licenses/gnu-fdl.png | Bin 0 -> 1573 bytes resources/assets/licenses/public-domain.png | Bin 0 -> 2017 bytes resources/assets/mediawiki.png | Bin 0 -> 22589 bytes resources/assets/poweredby_mediawiki_88x31.png | Bin 0 -> 3525 bytes resources/assets/wiki.png | Bin 0 -> 24358 bytes resources/jquery.chosen/LICENSE | 24 - resources/jquery.chosen/chosen-sprite.png | Bin 646 -> 0 bytes resources/jquery.chosen/chosen-sprite@2x.png | Bin 871 -> 0 bytes resources/jquery.chosen/chosen.css | 440 - resources/jquery.chosen/chosen.jquery.js | 1103 -- resources/jquery.effects/jquery.effects.blind.js | 49 - resources/jquery.effects/jquery.effects.bounce.js | 78 - resources/jquery.effects/jquery.effects.clip.js | 54 - resources/jquery.effects/jquery.effects.core.js | 612 - resources/jquery.effects/jquery.effects.drop.js | 50 - resources/jquery.effects/jquery.effects.explode.js | 79 - resources/jquery.effects/jquery.effects.fade.js | 32 - resources/jquery.effects/jquery.effects.fold.js | 56 - .../jquery.effects/jquery.effects.highlight.js | 50 - resources/jquery.effects/jquery.effects.pulsate.js | 51 - resources/jquery.effects/jquery.effects.scale.js | 178 - resources/jquery.effects/jquery.effects.shake.js | 57 - resources/jquery.effects/jquery.effects.slide.js | 50 - .../jquery.effects/jquery.effects.transfer.js | 45 - resources/jquery.tipsy/images/tipsy.png | Bin 133 -> 0 bytes resources/jquery.tipsy/jquery.tipsy.css | 75 - resources/jquery.tipsy/jquery.tipsy.js | 218 - .../jquery.ui/i18n/jquery.ui.datepicker-af.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-ar.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-az.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-bg.js | 24 - .../jquery.ui/i18n/jquery.ui.datepicker-bs.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-ca.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-cs.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-da.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-de.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-el.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-en-GB.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-eo.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-es.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-et.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-eu.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-fa.js | 59 - .../jquery.ui/i18n/jquery.ui.datepicker-fi.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-fo.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-fr.js | 25 - .../jquery.ui/i18n/jquery.ui.datepicker-gl.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-he.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-hi.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-hr.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-hu.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-hy.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-id.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-is.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-it.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-ja.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-ka.js | 21 - .../jquery.ui/i18n/jquery.ui.datepicker-kk.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-km.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-ko.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-lb.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-lt.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-lv.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-mk.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-ml.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-ms.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-nl.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-no.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-pl.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-pt-BR.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-pt.js | 22 - .../jquery.ui/i18n/jquery.ui.datepicker-rm.js | 21 - .../jquery.ui/i18n/jquery.ui.datepicker-ro.js | 26 - .../jquery.ui/i18n/jquery.ui.datepicker-ru.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-sk.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-sl.js | 24 - .../jquery.ui/i18n/jquery.ui.datepicker-sq.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-sr-SR.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-sr.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-sv.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-ta.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-th.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-tr.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-uk.js | 24 - .../jquery.ui/i18n/jquery.ui.datepicker-vi.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-zh-CN.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-zh-HK.js | 23 - .../jquery.ui/i18n/jquery.ui.datepicker-zh-TW.js | 23 - resources/jquery.ui/jquery.ui.accordion.js | 611 - resources/jquery.ui/jquery.ui.autocomplete.js | 631 -- resources/jquery.ui/jquery.ui.button.js | 414 - resources/jquery.ui/jquery.ui.core.js | 334 - resources/jquery.ui/jquery.ui.datepicker.js | 1854 --- resources/jquery.ui/jquery.ui.dialog.js | 866 -- resources/jquery.ui/jquery.ui.draggable.js | 832 -- resources/jquery.ui/jquery.ui.droppable.js | 301 - resources/jquery.ui/jquery.ui.mouse.js | 167 - resources/jquery.ui/jquery.ui.position.js | 308 - resources/jquery.ui/jquery.ui.progressbar.js | 109 - resources/jquery.ui/jquery.ui.resizable.js | 807 -- resources/jquery.ui/jquery.ui.selectable.js | 267 - resources/jquery.ui/jquery.ui.slider.js | 662 -- resources/jquery.ui/jquery.ui.sortable.js | 1094 -- resources/jquery.ui/jquery.ui.tabs.js | 757 -- resources/jquery.ui/jquery.ui.widget.js | 272 - .../default/images/ui-bg_flat_0_aaaaaa_40x100.png | Bin 87 -> 0 bytes .../default/images/ui-bg_flat_75_ffffff_40x100.png | Bin 87 -> 0 bytes .../default/images/ui-bg_glass_55_fbf9ee_1x400.png | Bin 115 -> 0 bytes .../default/images/ui-bg_glass_65_ffffff_1x400.png | Bin 99 -> 0 bytes .../default/images/ui-bg_glass_75_dadada_1x400.png | Bin 111 -> 0 bytes .../default/images/ui-bg_glass_75_e6e6e6_1x400.png | Bin 110 -> 0 bytes .../default/images/ui-bg_glass_95_fef1ec_1x400.png | Bin 119 -> 0 bytes .../ui-bg_highlight-soft_75_cccccc_1x100.png | Bin 86 -> 0 bytes .../default/images/ui-icons_222222_256x240.png | Bin 3702 -> 0 bytes .../default/images/ui-icons_2e83ff_256x240.png | Bin 3702 -> 0 bytes .../default/images/ui-icons_454545_256x240.png | Bin 3702 -> 0 bytes .../default/images/ui-icons_888888_256x240.png | Bin 3702 -> 0 bytes .../default/images/ui-icons_cd0a0a_256x240.png | Bin 3702 -> 0 bytes .../themes/default/jquery.ui.accordion.css | 19 - .../themes/default/jquery.ui.autocomplete.css | 53 - .../jquery.ui/themes/default/jquery.ui.button.css | 110 - .../jquery.ui/themes/default/jquery.ui.core.css | 38 - .../themes/default/jquery.ui.datepicker.css | 66 - .../jquery.ui/themes/default/jquery.ui.dialog.css | 21 - .../themes/default/jquery.ui.progressbar.css | 11 - .../themes/default/jquery.ui.resizable.css | 20 - .../themes/default/jquery.ui.selectable.css | 10 - .../jquery.ui/themes/default/jquery.ui.slider.css | 24 - .../jquery.ui/themes/default/jquery.ui.tabs.css | 18 - .../jquery.ui/themes/default/jquery.ui.theme.css | 247 - resources/jquery.ui/themes/vector/images/close.png | Bin 139 -> 0 bytes .../themes/vector/images/titlebar-fade.png | Bin 81 -> 0 bytes .../themes/vector/images/ui-anim_basic_16x16.gif | Bin 1553 -> 0 bytes .../vector/images/ui-bg_flat_15_cd0a0a_40x100.png | Bin 87 -> 0 bytes .../vector/images/ui-bg_flat_70_000000_40x100.png | Bin 87 -> 0 bytes .../ui-bg_highlight-hard_100_f2f5f7_1x100.png | Bin 97 -> 0 bytes .../ui-bg_highlight-hard_80_d7ebf9_1x100.png | Bin 104 -> 0 bytes .../ui-bg_highlight-soft_100_e4f1fb_1x100.png | Bin 106 -> 0 bytes .../ui-bg_highlight-soft_100_ffffff_1x100.png | Bin 80 -> 0 bytes .../ui-bg_highlight-soft_25_ffef8f_1x100.png | Bin 152 -> 0 bytes .../images/ui-bg_inset-hard_100_f0f0f0_1x100.png | Bin 89 -> 0 bytes .../vector/images/ui-icons_2694e8_256x240.png | Bin 3702 -> 0 bytes .../vector/images/ui-icons_2e83ff_256x240.png | Bin 3702 -> 0 bytes .../vector/images/ui-icons_3d80b3_256x240.png | Bin 3702 -> 0 bytes .../vector/images/ui-icons_666666_256x240.png | Bin 3702 -> 0 bytes .../vector/images/ui-icons_72a7cf_256x240.png | Bin 3702 -> 0 bytes .../vector/images/ui-icons_ffffff_256x240.png | Bin 3702 -> 0 bytes .../themes/vector/jquery.ui.accordion.css | 12 - .../themes/vector/jquery.ui.autocomplete.css | 40 - .../jquery.ui/themes/vector/jquery.ui.button.css | 379 - .../jquery.ui/themes/vector/jquery.ui.core.css | 37 - .../themes/vector/jquery.ui.datepicker.css | 61 - .../jquery.ui/themes/vector/jquery.ui.dialog.css | 37 - .../themes/vector/jquery.ui.progressbar.css | 4 - .../themes/vector/jquery.ui.resizable.css | 19 - .../themes/vector/jquery.ui.selectable.css | 3 - .../jquery.ui/themes/vector/jquery.ui.slider.css | 17 - .../jquery.ui/themes/vector/jquery.ui.tabs.css | 11 - .../jquery.ui/themes/vector/jquery.ui.theme.css | 248 - .../images/jquery.arrowSteps.divider-ltr.png | Bin 126 -> 0 bytes .../images/jquery.arrowSteps.divider-rtl.png | Bin 127 -> 0 bytes .../jquery/images/jquery.arrowSteps.head-ltr.png | Bin 303 -> 0 bytes .../jquery/images/jquery.arrowSteps.head-rtl.png | Bin 311 -> 0 bytes .../jquery/images/jquery.arrowSteps.tail-ltr.png | Bin 222 -> 0 bytes .../jquery/images/jquery.arrowSteps.tail-rtl.png | Bin 219 -> 0 bytes resources/jquery/images/marker.png | Bin 472 -> 0 bytes resources/jquery/images/mask.png | Bin 1795 -> 0 bytes resources/jquery/images/sort_both.gif | Bin 1184 -> 0 bytes resources/jquery/images/sort_down.gif | Bin 1174 -> 0 bytes resources/jquery/images/sort_none.gif | Bin 462 -> 0 bytes resources/jquery/images/sort_up.gif | Bin 1174 -> 0 bytes resources/jquery/images/spinner-large.gif | Bin 1788 -> 0 bytes resources/jquery/images/spinner.gif | Bin 1819 -> 0 bytes resources/jquery/images/wheel.png | Bin 11505 -> 0 bytes resources/jquery/jquery.appear.js | 138 - resources/jquery/jquery.arrowSteps.css | 45 - resources/jquery/jquery.arrowSteps.js | 82 - resources/jquery/jquery.async.js | 69 - resources/jquery/jquery.autoEllipsis.js | 149 - resources/jquery/jquery.badge.css | 37 - resources/jquery/jquery.badge.js | 76 - resources/jquery/jquery.byteLength.js | 31 - resources/jquery/jquery.byteLimit.js | 233 - resources/jquery/jquery.checkboxShiftClick.js | 35 - resources/jquery/jquery.client.js | 263 - resources/jquery/jquery.color.js | 54 - resources/jquery/jquery.colorUtil.js | 219 - resources/jquery/jquery.cookie.js | 47 - resources/jquery/jquery.cycle.all.js | 1529 --- resources/jquery/jquery.delayedBind.js | 76 - resources/jquery/jquery.expandableField.js | 137 - resources/jquery/jquery.farbtastic.css | 54 - resources/jquery/jquery.farbtastic.js | 286 - resources/jquery/jquery.footHovzer.css | 6 - resources/jquery/jquery.footHovzer.js | 45 - resources/jquery/jquery.form.js | 1089 -- resources/jquery/jquery.getAttrs.js | 24 - resources/jquery/jquery.hidpi.js | 117 - resources/jquery/jquery.highlightText.js | 69 - resources/jquery/jquery.hoverIntent.js | 111 - resources/jquery/jquery.jStorage.js | 1143 -- resources/jquery/jquery.js | 9472 ---------------- resources/jquery/jquery.json.js | 199 - resources/jquery/jquery.localize.js | 170 - resources/jquery/jquery.makeCollapsible.css | 14 - resources/jquery/jquery.makeCollapsible.js | 381 - resources/jquery/jquery.mockjax.js | 382 - resources/jquery/jquery.mw-jump.js | 15 - resources/jquery/jquery.mwExtension.js | 122 - resources/jquery/jquery.placeholder.js | 94 - resources/jquery/jquery.qunit.completenessTest.js | 360 - resources/jquery/jquery.qunit.css | 244 - resources/jquery/jquery.qunit.js | 2152 ---- resources/jquery/jquery.spinner.css | 40 - resources/jquery/jquery.spinner.js | 108 - resources/jquery/jquery.suggestions.css | 77 - resources/jquery/jquery.suggestions.js | 631 -- resources/jquery/jquery.tabIndex.js | 52 - resources/jquery/jquery.tablesorter.css | 17 - resources/jquery/jquery.tablesorter.js | 1113 -- resources/jquery/jquery.textSelection.js | 573 - resources/jquery/jquery.validate.js | 1166 -- resources/jquery/jquery.xmldom.js | 46 - resources/lib/es5-shim/es5-shim.js | 1431 +++ resources/lib/jquery.chosen/LICENSE | 24 + resources/lib/jquery.chosen/chosen-sprite.png | Bin 0 -> 646 bytes resources/lib/jquery.chosen/chosen-sprite@2x.png | Bin 0 -> 871 bytes resources/lib/jquery.chosen/chosen.css | 440 + resources/lib/jquery.chosen/chosen.jquery.js | 1103 ++ .../lib/jquery.ui/i18n/jquery.ui.datepicker-af.js | 23 + .../jquery.ui/i18n/jquery.ui.datepicker-ar-DZ.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-ar.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-az.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-bg.js | 24 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-bs.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-ca.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-cs.js | 23 + .../jquery.ui/i18n/jquery.ui.datepicker-cy-GB.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-da.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-de.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-el.js | 23 + .../jquery.ui/i18n/jquery.ui.datepicker-en-AU.js | 23 + .../jquery.ui/i18n/jquery.ui.datepicker-en-GB.js | 23 + .../jquery.ui/i18n/jquery.ui.datepicker-en-NZ.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-eo.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-es.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-et.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-eu.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-fa.js | 59 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-fi.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-fo.js | 23 + .../jquery.ui/i18n/jquery.ui.datepicker-fr-CH.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-fr.js | 25 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-gl.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-he.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-hi.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-hr.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-hu.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-hy.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-id.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-is.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-it.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-ja.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-ka.js | 21 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-kk.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-km.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-ko.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-lb.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-lt.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-lv.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-mk.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-ml.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-ms.js | 23 + .../jquery.ui/i18n/jquery.ui.datepicker-nl-BE.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-nl.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-no.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-pl.js | 23 + .../jquery.ui/i18n/jquery.ui.datepicker-pt-BR.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-pt.js | 22 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-rm.js | 21 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-ro.js | 26 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-ru.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-sk.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-sl.js | 24 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-sq.js | 23 + .../jquery.ui/i18n/jquery.ui.datepicker-sr-SR.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-sr.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-sv.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-ta.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-th.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-tj.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-tr.js | 23 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-uk.js | 24 + .../lib/jquery.ui/i18n/jquery.ui.datepicker-vi.js | 23 + .../jquery.ui/i18n/jquery.ui.datepicker-zh-CN.js | 23 + .../jquery.ui/i18n/jquery.ui.datepicker-zh-HK.js | 23 + .../jquery.ui/i18n/jquery.ui.datepicker-zh-TW.js | 23 + resources/lib/jquery.ui/jquery.ui.accordion.js | 731 ++ resources/lib/jquery.ui/jquery.ui.autocomplete.js | 602 + resources/lib/jquery.ui/jquery.ui.button.js | 418 + resources/lib/jquery.ui/jquery.ui.core.js | 356 + resources/lib/jquery.ui/jquery.ui.datepicker.js | 1846 +++ resources/lib/jquery.ui/jquery.ui.dialog.js | 858 ++ resources/lib/jquery.ui/jquery.ui.draggable.js | 836 ++ resources/lib/jquery.ui/jquery.ui.droppable.js | 294 + resources/lib/jquery.ui/jquery.ui.effect-blind.js | 82 + resources/lib/jquery.ui/jquery.ui.effect-bounce.js | 113 + resources/lib/jquery.ui/jquery.ui.effect-clip.js | 67 + resources/lib/jquery.ui/jquery.ui.effect-drop.js | 65 + .../lib/jquery.ui/jquery.ui.effect-explode.js | 97 + resources/lib/jquery.ui/jquery.ui.effect-fade.js | 30 + resources/lib/jquery.ui/jquery.ui.effect-fold.js | 76 + .../lib/jquery.ui/jquery.ui.effect-highlight.js | 50 + .../lib/jquery.ui/jquery.ui.effect-pulsate.js | 63 + resources/lib/jquery.ui/jquery.ui.effect-scale.js | 318 + resources/lib/jquery.ui/jquery.ui.effect-shake.js | 74 + resources/lib/jquery.ui/jquery.ui.effect-slide.js | 64 + .../lib/jquery.ui/jquery.ui.effect-transfer.js | 47 + resources/lib/jquery.ui/jquery.ui.effect.js | 1276 +++ resources/lib/jquery.ui/jquery.ui.menu.js | 610 + resources/lib/jquery.ui/jquery.ui.mouse.js | 169 + resources/lib/jquery.ui/jquery.ui.position.js | 517 + resources/lib/jquery.ui/jquery.ui.progressbar.js | 105 + resources/lib/jquery.ui/jquery.ui.resizable.js | 801 ++ resources/lib/jquery.ui/jquery.ui.selectable.js | 261 + resources/lib/jquery.ui/jquery.ui.slider.js | 644 ++ resources/lib/jquery.ui/jquery.ui.sortable.js | 1096 ++ resources/lib/jquery.ui/jquery.ui.spinner.js | 478 + resources/lib/jquery.ui/jquery.ui.tabs.js | 1366 +++ resources/lib/jquery.ui/jquery.ui.tooltip.js | 398 + resources/lib/jquery.ui/jquery.ui.widget.js | 528 + .../images/ui-bg_flat_0_aaaaaa_40x100.png | Bin 0 -> 212 bytes .../images/ui-bg_flat_75_ffffff_40x100.png | Bin 0 -> 208 bytes .../images/ui-bg_glass_55_fbf9ee_1x400.png | Bin 0 -> 335 bytes .../images/ui-bg_glass_65_ffffff_1x400.png | Bin 0 -> 207 bytes .../images/ui-bg_glass_75_dadada_1x400.png | Bin 0 -> 262 bytes .../images/ui-bg_glass_75_e6e6e6_1x400.png | Bin 0 -> 262 bytes .../images/ui-bg_glass_95_fef1ec_1x400.png | Bin 0 -> 332 bytes .../ui-bg_highlight-soft_75_cccccc_1x100.png | Bin 0 -> 280 bytes .../smoothness/images/ui-icons_222222_256x240.png | Bin 0 -> 6922 bytes .../smoothness/images/ui-icons_2e83ff_256x240.png | Bin 0 -> 4549 bytes .../smoothness/images/ui-icons_454545_256x240.png | Bin 0 -> 6992 bytes .../smoothness/images/ui-icons_888888_256x240.png | Bin 0 -> 6999 bytes .../smoothness/images/ui-icons_cd0a0a_256x240.png | Bin 0 -> 4549 bytes .../themes/smoothness/jquery.ui.accordion.css | 16 + .../themes/smoothness/jquery.ui.autocomplete.css | 19 + .../themes/smoothness/jquery.ui.button.css | 40 + .../jquery.ui/themes/smoothness/jquery.ui.core.css | 39 + .../themes/smoothness/jquery.ui.datepicker.css | 67 + .../themes/smoothness/jquery.ui.dialog.css | 22 + .../jquery.ui/themes/smoothness/jquery.ui.menu.css | 30 + .../themes/smoothness/jquery.ui.progressbar.css | 12 + .../themes/smoothness/jquery.ui.resizable.css | 21 + .../themes/smoothness/jquery.ui.selectable.css | 11 + .../themes/smoothness/jquery.ui.slider.css | 25 + .../themes/smoothness/jquery.ui.spinner.css | 23 + .../jquery.ui/themes/smoothness/jquery.ui.tabs.css | 18 + .../themes/smoothness/jquery.ui.theme.css | 248 + .../themes/smoothness/jquery.ui.tooltip.css | 21 + resources/lib/jquery/jquery.appear.js | 138 + resources/lib/jquery/jquery.async.js | 69 + .../lib/jquery/jquery.ba-throttle-debounce.js | 252 + resources/lib/jquery/jquery.cookie.js | 90 + resources/lib/jquery/jquery.form.js | 1089 ++ resources/lib/jquery/jquery.fullscreen.js | 175 + resources/lib/jquery/jquery.hoverIntent.js | 111 + resources/lib/jquery/jquery.jStorage.js | 986 ++ resources/lib/jquery/jquery.js | 10308 +++++++++++++++++ resources/lib/jquery/jquery.json.js | 199 + resources/lib/jquery/jquery.migrate.js | 551 + resources/lib/jquery/jquery.mockjax.js | 382 + resources/lib/jquery/jquery.qunit.css | 237 + resources/lib/jquery/jquery.qunit.js | 2288 ++++ resources/lib/jquery/jquery.validate.js | 1166 ++ resources/lib/jquery/jquery.xmldom.js | 46 + resources/lib/json2/json2.js | 489 + resources/lib/moment/LICENSE | 22 + resources/lib/moment/locale/af.js | 65 + resources/lib/moment/locale/ar-ma.js | 56 + resources/lib/moment/locale/ar-sa.js | 96 + resources/lib/moment/locale/ar.js | 129 + resources/lib/moment/locale/az.js | 101 + resources/lib/moment/locale/be.js | 150 + resources/lib/moment/locale/bg.js | 86 + resources/lib/moment/locale/bn.js | 106 + resources/lib/moment/locale/bo.js | 103 + resources/lib/moment/locale/br.js | 107 + resources/lib/moment/locale/bs.js | 138 + resources/lib/moment/locale/ca.js | 66 + resources/lib/moment/locale/cs.js | 155 + resources/lib/moment/locale/cv.js | 59 + resources/lib/moment/locale/cy.js | 77 + resources/lib/moment/locale/da.js | 56 + resources/lib/moment/locale/de-at.js | 72 + resources/lib/moment/locale/de.js | 71 + resources/lib/moment/locale/el.js | 94 + resources/lib/moment/locale/en-au.js | 62 + resources/lib/moment/locale/en-ca.js | 59 + resources/lib/moment/locale/en-gb.js | 63 + resources/lib/moment/locale/eo.js | 65 + resources/lib/moment/locale/es.js | 75 + resources/lib/moment/locale/et.js | 76 + resources/lib/moment/locale/eu.js | 60 + resources/lib/moment/locale/fa.js | 97 + resources/lib/moment/locale/fi.js | 105 + resources/lib/moment/locale/fo.js | 56 + resources/lib/moment/locale/fr-ca.js | 54 + resources/lib/moment/locale/fr.js | 58 + resources/lib/moment/locale/gl.js | 71 + resources/lib/moment/locale/he.js | 77 + resources/lib/moment/locale/hi.js | 105 + resources/lib/moment/locale/hr.js | 139 + resources/lib/moment/locale/hu.js | 105 + resources/lib/moment/locale/hy-am.js | 112 + resources/lib/moment/locale/id.js | 67 + resources/lib/moment/locale/is.js | 124 + resources/lib/moment/locale/it.js | 59 + resources/lib/moment/locale/ja.js | 58 + resources/lib/moment/locale/ka.js | 107 + resources/lib/moment/locale/km.js | 55 + resources/lib/moment/locale/ko.js | 63 + resources/lib/moment/locale/lb.js | 137 + resources/lib/moment/locale/lt.js | 118 + resources/lib/moment/locale/lv.js | 77 + resources/lib/moment/locale/mk.js | 86 + resources/lib/moment/locale/ml.js | 64 + resources/lib/moment/locale/mr.js | 104 + resources/lib/moment/locale/ms-my.js | 66 + resources/lib/moment/locale/my.js | 88 + resources/lib/moment/locale/nb.js | 57 + resources/lib/moment/locale/ne.js | 105 + resources/lib/moment/locale/nl.js | 67 + resources/lib/moment/locale/nn.js | 56 + resources/lib/moment/locale/pl.js | 98 + resources/lib/moment/locale/pt-br.js | 56 + resources/lib/moment/locale/pt.js | 60 + resources/lib/moment/locale/ro.js | 72 + resources/lib/moment/locale/ru.js | 166 + resources/lib/moment/locale/sk.js | 156 + resources/lib/moment/locale/sl.js | 144 + resources/lib/moment/locale/sq.js | 61 + resources/lib/moment/locale/sr-cyrl.js | 105 + resources/lib/moment/locale/sr.js | 105 + resources/lib/moment/locale/sv.js | 63 + resources/lib/moment/locale/ta.js | 112 + resources/lib/moment/locale/th.js | 58 + resources/lib/moment/locale/tl-ph.js | 58 + resources/lib/moment/locale/tr.js | 92 + resources/lib/moment/locale/tzm-latn.js | 55 + resources/lib/moment/locale/tzm.js | 55 + resources/lib/moment/locale/uk.js | 157 + resources/lib/moment/locale/uz.js | 55 + resources/lib/moment/locale/vi.js | 62 + resources/lib/moment/locale/zh-cn.js | 108 + resources/lib/moment/locale/zh-tw.js | 84 + resources/lib/moment/moment.js | 2856 +++++ resources/lib/oojs-ui/i18n/ace.json | 11 + resources/lib/oojs-ui/i18n/af.json | 10 + resources/lib/oojs-ui/i18n/am.json | 8 + resources/lib/oojs-ui/i18n/ar.json | 24 + resources/lib/oojs-ui/i18n/arc.json | 8 + resources/lib/oojs-ui/i18n/arq.json | 16 + resources/lib/oojs-ui/i18n/ast.json | 18 + resources/lib/oojs-ui/i18n/az.json | 14 + resources/lib/oojs-ui/i18n/ba.json | 15 + resources/lib/oojs-ui/i18n/bcl.json | 12 + resources/lib/oojs-ui/i18n/be-tarask.json | 14 + resources/lib/oojs-ui/i18n/be.json | 13 + resources/lib/oojs-ui/i18n/bg.json | 13 + resources/lib/oojs-ui/i18n/bn.json | 20 + resources/lib/oojs-ui/i18n/br.json | 18 + resources/lib/oojs-ui/i18n/bs.json | 16 + resources/lib/oojs-ui/i18n/ca.json | 20 + resources/lib/oojs-ui/i18n/ce.json | 17 + resources/lib/oojs-ui/i18n/ckb.json | 13 + resources/lib/oojs-ui/i18n/co.json | 10 + resources/lib/oojs-ui/i18n/cs.json | 25 + resources/lib/oojs-ui/i18n/cu.json | 9 + resources/lib/oojs-ui/i18n/cy.json | 15 + resources/lib/oojs-ui/i18n/da.json | 17 + resources/lib/oojs-ui/i18n/de.json | 25 + resources/lib/oojs-ui/i18n/diq.json | 17 + resources/lib/oojs-ui/i18n/dsb.json | 12 + resources/lib/oojs-ui/i18n/egl.json | 17 + resources/lib/oojs-ui/i18n/el.json | 23 + resources/lib/oojs-ui/i18n/eml.json | 17 + resources/lib/oojs-ui/i18n/en.json | 28 + resources/lib/oojs-ui/i18n/eo.json | 14 + resources/lib/oojs-ui/i18n/es.json | 30 + resources/lib/oojs-ui/i18n/et.json | 17 + resources/lib/oojs-ui/i18n/eu.json | 13 + resources/lib/oojs-ui/i18n/fa.json | 25 + resources/lib/oojs-ui/i18n/fi.json | 28 + resources/lib/oojs-ui/i18n/fo.json | 11 + resources/lib/oojs-ui/i18n/fr.json | 41 + resources/lib/oojs-ui/i18n/frr.json | 13 + resources/lib/oojs-ui/i18n/fur.json | 12 + resources/lib/oojs-ui/i18n/gd.json | 13 + resources/lib/oojs-ui/i18n/gl.json | 18 + resources/lib/oojs-ui/i18n/gu.json | 17 + resources/lib/oojs-ui/i18n/he.json | 27 + resources/lib/oojs-ui/i18n/hi.json | 16 + resources/lib/oojs-ui/i18n/hr.json | 19 + resources/lib/oojs-ui/i18n/hsb.json | 13 + resources/lib/oojs-ui/i18n/hu.json | 20 + resources/lib/oojs-ui/i18n/hy.json | 18 + resources/lib/oojs-ui/i18n/ia.json | 16 + resources/lib/oojs-ui/i18n/id.json | 18 + resources/lib/oojs-ui/i18n/ie.json | 11 + resources/lib/oojs-ui/i18n/ilo.json | 16 + resources/lib/oojs-ui/i18n/is.json | 12 + resources/lib/oojs-ui/i18n/it.json | 27 + resources/lib/oojs-ui/i18n/ja.json | 20 + resources/lib/oojs-ui/i18n/jv.json | 11 + resources/lib/oojs-ui/i18n/ka.json | 18 + resources/lib/oojs-ui/i18n/kk-cyrl.json | 12 + resources/lib/oojs-ui/i18n/km.json | 12 + resources/lib/oojs-ui/i18n/kn.json | 17 + resources/lib/oojs-ui/i18n/ko.json | 22 + resources/lib/oojs-ui/i18n/krc.json | 12 + resources/lib/oojs-ui/i18n/kw.json | 10 + resources/lib/oojs-ui/i18n/ky.json | 12 + resources/lib/oojs-ui/i18n/lb.json | 22 + resources/lib/oojs-ui/i18n/lmo.json | 11 + resources/lib/oojs-ui/i18n/lt.json | 11 + resources/lib/oojs-ui/i18n/lv.json | 17 + resources/lib/oojs-ui/i18n/lzh.json | 8 + resources/lib/oojs-ui/i18n/mg.json | 8 + resources/lib/oojs-ui/i18n/min.json | 17 + resources/lib/oojs-ui/i18n/mk.json | 18 + resources/lib/oojs-ui/i18n/ml.json | 14 + resources/lib/oojs-ui/i18n/mr.json | 16 + resources/lib/oojs-ui/i18n/ms.json | 17 + resources/lib/oojs-ui/i18n/nap.json | 11 + resources/lib/oojs-ui/i18n/nb.json | 21 + resources/lib/oojs-ui/i18n/nds-nl.json | 10 + resources/lib/oojs-ui/i18n/nds.json | 11 + resources/lib/oojs-ui/i18n/ne.json | 18 + resources/lib/oojs-ui/i18n/nl.json | 32 + resources/lib/oojs-ui/i18n/nn.json | 12 + resources/lib/oojs-ui/i18n/oc.json | 16 + resources/lib/oojs-ui/i18n/om.json | 17 + resources/lib/oojs-ui/i18n/or.json | 10 + resources/lib/oojs-ui/i18n/pa.json | 11 + resources/lib/oojs-ui/i18n/pfl.json | 15 + resources/lib/oojs-ui/i18n/pl.json | 31 + resources/lib/oojs-ui/i18n/pms.json | 13 + resources/lib/oojs-ui/i18n/ps.json | 11 + resources/lib/oojs-ui/i18n/pt-br.json | 19 + resources/lib/oojs-ui/i18n/pt.json | 25 + resources/lib/oojs-ui/i18n/qqq.json | 32 + resources/lib/oojs-ui/i18n/qu.json | 13 + resources/lib/oojs-ui/i18n/ro.json | 20 + resources/lib/oojs-ui/i18n/roa-tara.json | 11 + resources/lib/oojs-ui/i18n/ru.json | 30 + resources/lib/oojs-ui/i18n/sah.json | 9 + resources/lib/oojs-ui/i18n/scn.json | 15 + resources/lib/oojs-ui/i18n/sco.json | 12 + resources/lib/oojs-ui/i18n/sh.json | 10 + resources/lib/oojs-ui/i18n/si.json | 12 + resources/lib/oojs-ui/i18n/sk.json | 12 + resources/lib/oojs-ui/i18n/sl.json | 19 + resources/lib/oojs-ui/i18n/sq.json | 19 + resources/lib/oojs-ui/i18n/sr-ec.json | 18 + resources/lib/oojs-ui/i18n/sr-el.json | 13 + resources/lib/oojs-ui/i18n/sv.json | 26 + resources/lib/oojs-ui/i18n/sw.json | 15 + resources/lib/oojs-ui/i18n/ta.json | 11 + resources/lib/oojs-ui/i18n/te.json | 14 + resources/lib/oojs-ui/i18n/tg-cyrl.json | 12 + resources/lib/oojs-ui/i18n/th.json | 11 + resources/lib/oojs-ui/i18n/tl.json | 17 + resources/lib/oojs-ui/i18n/tr.json | 18 + resources/lib/oojs-ui/i18n/tt-cyrl.json | 10 + resources/lib/oojs-ui/i18n/ug-arab.json | 9 + resources/lib/oojs-ui/i18n/uk.json | 29 + resources/lib/oojs-ui/i18n/uz.json | 14 + resources/lib/oojs-ui/i18n/vec.json | 15 + resources/lib/oojs-ui/i18n/vi.json | 18 + resources/lib/oojs-ui/i18n/vo.json | 9 + resources/lib/oojs-ui/i18n/wuu.json | 9 + resources/lib/oojs-ui/i18n/yi.json | 18 + resources/lib/oojs-ui/i18n/yo.json | 11 + resources/lib/oojs-ui/i18n/yue.json | 16 + resources/lib/oojs-ui/i18n/zh-hans.json | 31 + resources/lib/oojs-ui/i18n/zh-hant.json | 28 + resources/lib/oojs-ui/images/anchor.png | Bin 0 -> 203 bytes resources/lib/oojs-ui/images/anchor.svg | 7 + resources/lib/oojs-ui/images/icons/accept.png | Bin 0 -> 332 bytes resources/lib/oojs-ui/images/icons/accept.svg | 6 + resources/lib/oojs-ui/images/icons/add-item.png | Bin 0 -> 145 bytes resources/lib/oojs-ui/images/icons/add-item.svg | 6 + resources/lib/oojs-ui/images/icons/advanced.png | Bin 0 -> 531 bytes resources/lib/oojs-ui/images/icons/advanced.svg | 6 + resources/lib/oojs-ui/images/icons/alert.png | Bin 0 -> 448 bytes resources/lib/oojs-ui/images/icons/alert.svg | 8 + .../lib/oojs-ui/images/icons/arched-arrow-ltr.png | Bin 0 -> 294 bytes .../lib/oojs-ui/images/icons/arched-arrow-ltr.svg | 6 + .../lib/oojs-ui/images/icons/arched-arrow-rtl.png | Bin 0 -> 296 bytes .../lib/oojs-ui/images/icons/arched-arrow-rtl.svg | 6 + resources/lib/oojs-ui/images/icons/check.png | Bin 0 -> 235 bytes resources/lib/oojs-ui/images/icons/check.svg | 6 + resources/lib/oojs-ui/images/icons/clear.png | Bin 0 -> 430 bytes resources/lib/oojs-ui/images/icons/clear.svg | 6 + resources/lib/oojs-ui/images/icons/close.png | Bin 0 -> 286 bytes resources/lib/oojs-ui/images/icons/close.svg | 6 + resources/lib/oojs-ui/images/icons/code.png | Bin 0 -> 313 bytes resources/lib/oojs-ui/images/icons/code.svg | 7 + resources/lib/oojs-ui/images/icons/collapse.png | Bin 0 -> 221 bytes resources/lib/oojs-ui/images/icons/collapse.svg | 6 + resources/lib/oojs-ui/images/icons/comment.png | Bin 0 -> 244 bytes resources/lib/oojs-ui/images/icons/comment.svg | 6 + resources/lib/oojs-ui/images/icons/expand.png | Bin 0 -> 237 bytes resources/lib/oojs-ui/images/icons/expand.svg | 6 + resources/lib/oojs-ui/images/icons/help.png | Bin 0 -> 591 bytes resources/lib/oojs-ui/images/icons/help.svg | 10 + resources/lib/oojs-ui/images/icons/history.png | Bin 0 -> 591 bytes resources/lib/oojs-ui/images/icons/history.svg | 7 + resources/lib/oojs-ui/images/icons/info.png | Bin 0 -> 349 bytes resources/lib/oojs-ui/images/icons/info.svg | 6 + resources/lib/oojs-ui/images/icons/link.png | Bin 0 -> 348 bytes resources/lib/oojs-ui/images/icons/link.svg | 8 + resources/lib/oojs-ui/images/icons/menu.png | Bin 0 -> 190 bytes resources/lib/oojs-ui/images/icons/menu.svg | 6 + resources/lib/oojs-ui/images/icons/move-ltr.png | Bin 0 -> 254 bytes resources/lib/oojs-ui/images/icons/move-ltr.svg | 6 + resources/lib/oojs-ui/images/icons/move-rtl.png | Bin 0 -> 250 bytes resources/lib/oojs-ui/images/icons/move-rtl.svg | 6 + resources/lib/oojs-ui/images/icons/picture.png | Bin 0 -> 402 bytes resources/lib/oojs-ui/images/icons/picture.svg | 8 + resources/lib/oojs-ui/images/icons/remove-item.png | Bin 0 -> 131 bytes resources/lib/oojs-ui/images/icons/remove-item.svg | 6 + resources/lib/oojs-ui/images/icons/remove.png | Bin 0 -> 175 bytes resources/lib/oojs-ui/images/icons/remove.svg | 6 + resources/lib/oojs-ui/images/icons/search.png | Bin 0 -> 267 bytes resources/lib/oojs-ui/images/icons/search.svg | 6 + resources/lib/oojs-ui/images/icons/settings.png | Bin 0 -> 230 bytes resources/lib/oojs-ui/images/icons/settings.svg | 6 + resources/lib/oojs-ui/images/icons/tag.png | Bin 0 -> 319 bytes resources/lib/oojs-ui/images/icons/tag.svg | 6 + resources/lib/oojs-ui/images/icons/window.png | Bin 0 -> 309 bytes resources/lib/oojs-ui/images/icons/window.svg | 7 + resources/lib/oojs-ui/images/indicators/alert.png | Bin 0 -> 256 bytes resources/lib/oojs-ui/images/indicators/alert.svg | 6 + .../lib/oojs-ui/images/indicators/arrow-down.png | Bin 0 -> 199 bytes .../lib/oojs-ui/images/indicators/arrow-down.svg | 6 + .../lib/oojs-ui/images/indicators/arrow-ltr.png | Bin 0 -> 204 bytes .../lib/oojs-ui/images/indicators/arrow-ltr.svg | 6 + .../lib/oojs-ui/images/indicators/arrow-rtl.png | Bin 0 -> 194 bytes .../lib/oojs-ui/images/indicators/arrow-rtl.svg | 6 + .../lib/oojs-ui/images/indicators/arrow-up.png | Bin 0 -> 180 bytes .../lib/oojs-ui/images/indicators/arrow-up.svg | 6 + .../lib/oojs-ui/images/indicators/required.png | Bin 0 -> 264 bytes .../lib/oojs-ui/images/indicators/required.svg | 6 + resources/lib/oojs-ui/images/textures/pending.gif | Bin 0 -> 2032 bytes .../lib/oojs-ui/images/textures/transparency.png | Bin 0 -> 145 bytes .../lib/oojs-ui/images/textures/transparency.svg | 10 + resources/lib/oojs-ui/images/toolbar-shadow.png | Bin 0 -> 131 bytes resources/lib/oojs-ui/oojs-ui-apex.css | 1945 ++++ resources/lib/oojs-ui/oojs-ui-apex.rtl.css | 1929 ++++ resources/lib/oojs-ui/oojs-ui-minerva.css | 1397 +++ resources/lib/oojs-ui/oojs-ui-minerva.rtl.css | 1381 +++ resources/lib/oojs-ui/oojs-ui.css | 1159 ++ resources/lib/oojs-ui/oojs-ui.js | 11247 +++++++++++++++++++ resources/lib/oojs-ui/oojs-ui.rtl.css | 112 + resources/lib/oojs-ui/oojs-ui.svg.css | 112 + resources/lib/oojs-ui/oojs-ui.svg.rtl.css | 112 + .../oojs-ui/themes/minerva/images/icons/check.png | Bin 0 -> 640 bytes .../oojs-ui/themes/minerva/images/icons/check.svg | 8 + resources/lib/oojs/oojs.jquery.js | 879 ++ resources/lib/sinonjs/sinon-1.10.3.js | 5073 +++++++++ resources/lib/sinonjs/sinon-ie-1.10.3.js | 100 + .../mediawiki.action/images/green-checkmark.png | Bin 681 -> 0 bytes .../mediawiki.action.edit.collapsibleFooter.css | 17 - .../mediawiki.action.edit.collapsibleFooter.js | 54 - .../mediawiki.action.edit.editWarning.js | 56 - .../mediawiki.action/mediawiki.action.edit.js | 204 - .../mediawiki.action.edit.preview.js | 136 - .../mediawiki.action.edit.styles.css | 44 - .../mediawiki.action.history.diff.css | 94 - .../mediawiki.action/mediawiki.action.history.js | 126 - .../mediawiki.action.view.dblClickEdit.js | 12 - .../mediawiki.action.view.metadata.js | 43 - .../mediawiki.action.view.postEdit.css | 77 - .../mediawiki.action.view.postEdit.js | 76 - .../mediawiki.action.view.rightClickEdit.js | 26 - resources/mediawiki.api/mediawiki.api.category.js | 133 - resources/mediawiki.api/mediawiki.api.edit.js | 62 - resources/mediawiki.api/mediawiki.api.js | 322 - resources/mediawiki.api/mediawiki.api.login.js | 54 - resources/mediawiki.api/mediawiki.api.parse.js | 45 - resources/mediawiki.api/mediawiki.api.watch.js | 74 - resources/mediawiki.language/languages/bs.js | 19 - resources/mediawiki.language/languages/dsb.js | 19 - resources/mediawiki.language/languages/fi.js | 47 - resources/mediawiki.language/languages/ga.js | 38 - resources/mediawiki.language/languages/he.js | 29 - resources/mediawiki.language/languages/hsb.js | 19 - resources/mediawiki.language/languages/hu.js | 23 - resources/mediawiki.language/languages/hy.js | 29 - resources/mediawiki.language/languages/la.js | 50 - resources/mediawiki.language/languages/os.js | 70 - resources/mediawiki.language/languages/ru.js | 53 - resources/mediawiki.language/languages/sl.js | 19 - resources/mediawiki.language/languages/uk.js | 37 - resources/mediawiki.language/mediawiki.cldr.js | 29 - .../mediawiki.language/mediawiki.language.init.js | 61 - resources/mediawiki.language/mediawiki.language.js | 148 - .../mediawiki.language.months.js | 54 - .../mediawiki.language.numbers.js | 243 - resources/mediawiki.less/mediawiki.mixins.less | 46 - resources/mediawiki.libs/CLDRPluralRuleParser.js | 475 - .../mediawiki.libs/mediawiki.libs.jpegmeta.js | 731 -- resources/mediawiki.page/mediawiki.page.gallery.js | 248 - .../mediawiki.page.image.pagination.js | 60 - .../mediawiki.page/mediawiki.page.patrol.ajax.js | 63 - resources/mediawiki.page/mediawiki.page.ready.js | 40 - resources/mediawiki.page/mediawiki.page.startup.js | 27 - .../mediawiki.page/mediawiki.page.watch.ajax.js | 178 - .../images/glyph-people-large.png | Bin 1663 -> 0 bytes .../mediawiki.special/images/icon-contributors.png | Bin 1169 -> 0 bytes resources/mediawiki.special/images/icon-edits.png | Bin 780 -> 0 bytes resources/mediawiki.special/images/icon-lock.png | Bin 172 -> 0 bytes resources/mediawiki.special/images/icon-pages.png | Bin 528 -> 0 bytes .../mediawiki.special/mediawiki.special.block.js | 46 - .../mediawiki.special.changeemail.css | 19 - .../mediawiki.special.changeemail.js | 42 - .../mediawiki.special.changeslist.css | 7 - .../mediawiki.special.changeslist.enhanced.css | 66 - .../mediawiki.special.createAccount.css | 89 - .../mediawiki.special.createAccount.js | 112 - resources/mediawiki.special/mediawiki.special.css | 274 - .../mediawiki.special.javaScriptTest.js | 37 - resources/mediawiki.special/mediawiki.special.js | 5 - .../mediawiki.special.movePage.js | 6 - .../mediawiki.special.pagesWithProp.css | 4 - .../mediawiki.special.preferences.css | 11 - .../mediawiki.special.preferences.js | 199 - .../mediawiki.special.recentchanges.js | 34 - .../mediawiki.special/mediawiki.special.search.css | 14 - .../mediawiki.special/mediawiki.special.search.js | 53 - .../mediawiki.special.undelete.js | 11 - .../mediawiki.special/mediawiki.special.upload.js | 320 - .../mediawiki.special.userLogin.css | 39 - .../mediawiki.special/mediawiki.special.vforms.css | 46 - resources/mediawiki.ui/mediawiki.ui.default.css | 272 - resources/mediawiki.ui/mediawiki.ui.vector.css | 414 - resources/mediawiki.ui/sourcefiles/Makefile | 24 - resources/mediawiki.ui/sourcefiles/config.rb | 27 - .../sourcefiles/scss/components/_default.scss | 3 - .../sourcefiles/scss/components/_utilities.scss | 17 - .../sourcefiles/scss/components/_vector.scss | 4 - .../scss/components/default/_buttons.scss | 69 - .../scss/components/default/_forms.scss | 114 - .../scss/components/vector/_buttons.scss | 19 - .../scss/components/vector/_containers.scss | 5 - .../sourcefiles/scss/components/vector/_forms.scss | 7 - .../sourcefiles/scss/mediawiki.ui.default.scss | 16 - .../sourcefiles/scss/mediawiki.ui.vector.scss | 15 - .../mediawiki.ui/sourcefiles/scss/mixins/_all.scss | 4 - .../sourcefiles/scss/mixins/_effects.scss | 62 - .../sourcefiles/scss/mixins/_forms.scss | 66 - .../sourcefiles/scss/mixins/_type.scss | 6 - .../sourcefiles/scss/mixins/_utilities.scss | 19 - .../sourcefiles/scss/settings/_all.scss | 2 - .../sourcefiles/scss/settings/_colors.scss | 17 - .../sourcefiles/scss/settings/_typography.scss | 5 - resources/mediawiki/images/arrow-collapsed-ltr.png | Bin 133 -> 0 bytes resources/mediawiki/images/arrow-collapsed-rtl.png | Bin 136 -> 0 bytes resources/mediawiki/images/arrow-expanded.png | Bin 134 -> 0 bytes resources/mediawiki/mediawiki.Title.js | 587 - resources/mediawiki/mediawiki.Uri.js | 334 - resources/mediawiki/mediawiki.debug.css | 183 - resources/mediawiki/mediawiki.debug.init.js | 3 - resources/mediawiki/mediawiki.debug.js | 365 - resources/mediawiki/mediawiki.feedback.css | 9 - resources/mediawiki/mediawiki.feedback.js | 279 - resources/mediawiki/mediawiki.feedback.spinner.gif | Bin 1108 -> 0 bytes resources/mediawiki/mediawiki.hidpi.js | 5 - resources/mediawiki/mediawiki.htmlform.js | 128 - resources/mediawiki/mediawiki.icon.css | 15 - resources/mediawiki/mediawiki.inspect.js | 204 - resources/mediawiki/mediawiki.jqueryMsg.js | 1148 -- resources/mediawiki/mediawiki.jqueryMsg.peg | 81 - resources/mediawiki/mediawiki.js | 1938 ---- resources/mediawiki/mediawiki.log.js | 126 - resources/mediawiki/mediawiki.notification.css | 36 - resources/mediawiki/mediawiki.notification.js | 504 - resources/mediawiki/mediawiki.notify.js | 28 - resources/mediawiki/mediawiki.searchSuggest.css | 16 - resources/mediawiki/mediawiki.searchSuggest.js | 218 - resources/mediawiki/mediawiki.user.js | 255 - resources/mediawiki/mediawiki.util.js | 624 - resources/src/es5-skip.js | 18 + resources/src/jquery.json-deprecate.js | 8 + resources/src/jquery.tipsy/images/tipsy.png | Bin 0 -> 133 bytes resources/src/jquery.tipsy/jquery.tipsy.css | 73 + resources/src/jquery.tipsy/jquery.tipsy.js | 259 + .../images/jquery.arrowSteps.divider-ltr.png | Bin 0 -> 126 bytes .../images/jquery.arrowSteps.divider-rtl.png | Bin 0 -> 127 bytes .../jquery/images/jquery.arrowSteps.head-ltr.png | Bin 0 -> 303 bytes .../jquery/images/jquery.arrowSteps.head-rtl.png | Bin 0 -> 311 bytes .../jquery/images/jquery.arrowSteps.tail-ltr.png | Bin 0 -> 222 bytes .../jquery/images/jquery.arrowSteps.tail-rtl.png | Bin 0 -> 219 bytes resources/src/jquery/images/marker.png | Bin 0 -> 472 bytes resources/src/jquery/images/mask.png | Bin 0 -> 1795 bytes resources/src/jquery/images/sort_both.gif | Bin 0 -> 1184 bytes resources/src/jquery/images/sort_down.gif | Bin 0 -> 1174 bytes resources/src/jquery/images/sort_none.gif | Bin 0 -> 462 bytes resources/src/jquery/images/sort_up.gif | Bin 0 -> 1174 bytes resources/src/jquery/images/spinner-large.gif | Bin 0 -> 1788 bytes resources/src/jquery/images/spinner.gif | Bin 0 -> 1819 bytes resources/src/jquery/images/wheel.png | Bin 0 -> 11505 bytes resources/src/jquery/jquery.accessKeyLabel.js | 200 + resources/src/jquery/jquery.arrowSteps.css | 45 + resources/src/jquery/jquery.arrowSteps.js | 98 + resources/src/jquery/jquery.autoEllipsis.js | 168 + resources/src/jquery/jquery.badge.css | 36 + resources/src/jquery/jquery.badge.js | 88 + resources/src/jquery/jquery.byteLength.js | 40 + resources/src/jquery/jquery.byteLimit.js | 235 + resources/src/jquery/jquery.checkboxShiftClick.js | 43 + resources/src/jquery/jquery.client.js | 301 + resources/src/jquery/jquery.color.js | 55 + resources/src/jquery/jquery.colorUtil.js | 262 + resources/src/jquery/jquery.confirmable.css | 28 + resources/src/jquery/jquery.confirmable.js | 170 + .../src/jquery/jquery.confirmable.mediawiki.js | 14 + resources/src/jquery/jquery.expandableField.js | 140 + resources/src/jquery/jquery.farbtastic.css | 54 + resources/src/jquery/jquery.farbtastic.js | 286 + resources/src/jquery/jquery.footHovzer.css | 6 + resources/src/jquery/jquery.footHovzer.js | 66 + resources/src/jquery/jquery.getAttrs.js | 42 + resources/src/jquery/jquery.hidpi.js | 129 + resources/src/jquery/jquery.highlightText.js | 73 + resources/src/jquery/jquery.localize.js | 170 + resources/src/jquery/jquery.makeCollapsible.css | 27 + resources/src/jquery/jquery.makeCollapsible.js | 404 + resources/src/jquery/jquery.mw-jump.js | 15 + resources/src/jquery/jquery.mwExtension.js | 122 + resources/src/jquery/jquery.placeholder.js | 229 + .../src/jquery/jquery.qunit.completenessTest.js | 305 + resources/src/jquery/jquery.spinner.css | 40 + resources/src/jquery/jquery.spinner.js | 112 + resources/src/jquery/jquery.suggestions.css | 76 + resources/src/jquery/jquery.suggestions.js | 684 ++ resources/src/jquery/jquery.tabIndex.js | 57 + resources/src/jquery/jquery.tablesorter.css | 17 + resources/src/jquery/jquery.tablesorter.js | 1161 ++ resources/src/jquery/jquery.textSelection.js | 572 + resources/src/json-skip.js | 4 + .../mediawiki.action/images/green-checkmark.png | Bin 0 -> 681 bytes .../mediawiki.action/images/nextredirect-ltr.png | Bin 0 -> 121 bytes .../mediawiki.action/images/nextredirect-rtl.png | Bin 0 -> 121 bytes .../src/mediawiki.action/images/redirect-ltr.png | Bin 0 -> 128 bytes .../src/mediawiki.action/images/redirect-rtl.png | Bin 0 -> 132 bytes .../mediawiki.action.edit.collapsibleFooter.css | 17 + .../mediawiki.action.edit.collapsibleFooter.js | 54 + .../src/mediawiki.action/mediawiki.action.edit.css | 18 + .../mediawiki.action.edit.editWarning.js | 59 + .../src/mediawiki.action/mediawiki.action.edit.js | 217 + .../mediawiki.action.edit.preview.js | 165 + .../mediawiki.action.edit.styles.css | 44 + .../images/ar/button_bold.png | Bin 0 -> 533 bytes .../images/ar/button_headline.png | Bin 0 -> 484 bytes .../images/ar/button_italic.png | Bin 0 -> 532 bytes .../images/ar/button_link.png | Bin 0 -> 557 bytes .../images/ar/button_nowiki.png | Bin 0 -> 874 bytes .../images/be-tarask/button_bold.png | Bin 0 -> 550 bytes .../images/be-tarask/button_italic.png | Bin 0 -> 539 bytes .../images/be-tarask/button_link.png | Bin 0 -> 419 bytes .../images/de/button_bold.png | Bin 0 -> 255 bytes .../images/de/button_italic.png | Bin 0 -> 260 bytes .../images/en/button_bold.png | Bin 0 -> 250 bytes .../images/en/button_extlink.png | Bin 0 -> 435 bytes .../images/en/button_headline.png | Bin 0 -> 440 bytes .../images/en/button_hr.png | Bin 0 -> 200 bytes .../images/en/button_image.png | Bin 0 -> 483 bytes .../images/en/button_italic.png | Bin 0 -> 250 bytes .../images/en/button_link.png | Bin 0 -> 280 bytes .../images/en/button_media.png | Bin 0 -> 728 bytes .../images/en/button_nowiki.png | Bin 0 -> 322 bytes .../images/en/button_sig.png | Bin 0 -> 920 bytes .../images/fa/button_bold.png | Bin 0 -> 459 bytes .../images/fa/button_headline.png | Bin 0 -> 392 bytes .../images/fa/button_italic.png | Bin 0 -> 512 bytes .../images/fa/button_link.png | Bin 0 -> 485 bytes .../images/fa/button_nowiki.png | Bin 0 -> 874 bytes .../images/ksh/LICENSE | 7 + .../images/ksh/button_italic.png | Bin 0 -> 368 bytes .../images/ru/LICENSE | 17 + .../images/ru/button_bold.png | Bin 0 -> 254 bytes .../images/ru/button_italic.png | Bin 0 -> 423 bytes .../images/ru/button_link.png | Bin 0 -> 278 bytes .../mediawiki.action.edit.toolbar.less | 42 + .../mediawiki.action/mediawiki.action.history.css | 4 + .../mediawiki.action.history.diff.css | 96 + .../mediawiki.action/mediawiki.action.history.js | 111 + .../mediawiki.action.view.dblClickEdit.js | 12 + .../mediawiki.action.view.metadata.css | 6 + .../mediawiki.action.view.metadata.js | 45 + .../mediawiki.action.view.postEdit.css | 76 + .../mediawiki.action.view.postEdit.js | 86 + .../mediawiki.action.view.redirect.js | 65 + .../mediawiki.action.view.redirectPage.css | 53 + .../mediawiki.action.view.rightClickEdit.js | 26 + .../src/mediawiki.api/mediawiki.api.category.js | 146 + resources/src/mediawiki.api/mediawiki.api.edit.js | 87 + resources/src/mediawiki.api/mediawiki.api.js | 397 + resources/src/mediawiki.api/mediawiki.api.login.js | 54 + resources/src/mediawiki.api/mediawiki.api.parse.js | 45 + resources/src/mediawiki.api/mediawiki.api.watch.js | 79 + resources/src/mediawiki.hidpi-skip.js | 4 + resources/src/mediawiki.language/languages/bs.js | 19 + resources/src/mediawiki.language/languages/dsb.js | 19 + resources/src/mediawiki.language/languages/fi.js | 47 + resources/src/mediawiki.language/languages/ga.js | 38 + resources/src/mediawiki.language/languages/he.js | 29 + resources/src/mediawiki.language/languages/hsb.js | 19 + resources/src/mediawiki.language/languages/hu.js | 23 + resources/src/mediawiki.language/languages/hy.js | 29 + resources/src/mediawiki.language/languages/la.js | 50 + resources/src/mediawiki.language/languages/os.js | 69 + resources/src/mediawiki.language/languages/ru.js | 57 + resources/src/mediawiki.language/languages/sl.js | 19 + resources/src/mediawiki.language/languages/uk.js | 37 + resources/src/mediawiki.language/mediawiki.cldr.js | 32 + .../mediawiki.language.fallback.js | 35 + .../mediawiki.language/mediawiki.language.init.js | 81 + .../src/mediawiki.language/mediawiki.language.js | 171 + .../mediawiki.language.months.js | 56 + .../mediawiki.language.numbers.js | 258 + resources/src/mediawiki.legacy/ajax.js | 194 + resources/src/mediawiki.legacy/commonPrint.css | 435 + .../src/mediawiki.legacy/images/ajax-loader.gif | Bin 0 -> 1788 bytes resources/src/mediawiki.legacy/images/checker.png | Bin 0 -> 81 bytes .../src/mediawiki.legacy/images/feed-icon.png | Bin 0 -> 542 bytes .../src/mediawiki.legacy/images/feed-icon.svg | 1 + .../images/help-question-hover.gif | Bin 0 -> 1246 bytes .../src/mediawiki.legacy/images/help-question.gif | Bin 0 -> 126 bytes resources/src/mediawiki.legacy/images/question.png | Bin 0 -> 316 bytes resources/src/mediawiki.legacy/images/question.svg | 1 + resources/src/mediawiki.legacy/images/spinner.gif | Bin 0 -> 1819 bytes resources/src/mediawiki.legacy/oldshared.css | 489 + resources/src/mediawiki.legacy/protect.js | 240 + resources/src/mediawiki.legacy/shared.css | 1167 ++ resources/src/mediawiki.legacy/wikibits.js | 204 + .../mediawiki.less/mediawiki.mixins.animation.less | 12 + resources/src/mediawiki.less/mediawiki.mixins.less | 61 + .../mediawiki.less/mediawiki.mixins.rotation.less | 33 + .../src/mediawiki.less/mediawiki.ui/mixins.less | 122 + .../src/mediawiki.less/mediawiki.ui/variables.less | 62 + .../src/mediawiki.libs/CLDRPluralRuleParser.js | 475 + .../src/mediawiki.libs/mediawiki.libs.jpegmeta.js | 737 ++ .../src/mediawiki.page/mediawiki.page.gallery.js | 212 + .../mediawiki.page.image.pagination.js | 101 + .../mediawiki.page/mediawiki.page.patrol.ajax.js | 65 + .../src/mediawiki.page/mediawiki.page.ready.js | 64 + .../src/mediawiki.page/mediawiki.page.startup.js | 33 + .../mediawiki.page/mediawiki.page.watch.ajax.js | 178 + resources/src/mediawiki.skinning/content.css | 227 + .../mediawiki.skinning/content.externallinks.css | 102 + .../src/mediawiki.skinning/content.parsoid.less | 131 + resources/src/mediawiki.skinning/elements.css | 273 + .../src/mediawiki.skinning/images/audio-ltr.png | Bin 0 -> 401 bytes .../src/mediawiki.skinning/images/audio-ltr.svg | 8 + .../src/mediawiki.skinning/images/audio-rtl.png | Bin 0 -> 417 bytes .../src/mediawiki.skinning/images/audio-rtl.svg | 8 + .../src/mediawiki.skinning/images/chat-ltr.png | Bin 0 -> 304 bytes .../src/mediawiki.skinning/images/chat-ltr.svg | 6 + .../src/mediawiki.skinning/images/chat-rtl.png | Bin 0 -> 297 bytes .../src/mediawiki.skinning/images/chat-rtl.svg | 6 + .../src/mediawiki.skinning/images/document-ltr.png | Bin 0 -> 275 bytes .../src/mediawiki.skinning/images/document-ltr.svg | 5 + .../src/mediawiki.skinning/images/document-rtl.png | Bin 0 -> 264 bytes .../src/mediawiki.skinning/images/document-rtl.svg | 5 + .../images/external link icons.svg | 697 ++ .../src/mediawiki.skinning/images/external-ltr.png | Bin 0 -> 403 bytes .../src/mediawiki.skinning/images/external-ltr.svg | 8 + .../src/mediawiki.skinning/images/external-rtl.png | Bin 0 -> 411 bytes .../src/mediawiki.skinning/images/external-rtl.svg | 8 + .../src/mediawiki.skinning/images/ftp-ltr.png | Bin 0 -> 356 bytes .../src/mediawiki.skinning/images/ftp-ltr.svg | 9 + .../src/mediawiki.skinning/images/ftp-rtl.png | Bin 0 -> 334 bytes .../src/mediawiki.skinning/images/ftp-rtl.svg | 9 + .../mediawiki.skinning/images/magnify-clip-ltr.png | Bin 0 -> 204 bytes .../mediawiki.skinning/images/magnify-clip-rtl.png | Bin 0 -> 149 bytes resources/src/mediawiki.skinning/images/mail.png | Bin 0 -> 334 bytes resources/src/mediawiki.skinning/images/mail.svg | 7 + resources/src/mediawiki.skinning/images/video.png | Bin 0 -> 358 bytes resources/src/mediawiki.skinning/images/video.svg | 14 + resources/src/mediawiki.skinning/interface.css | 68 + .../images/glyph-people-large.png | Bin 0 -> 1663 bytes .../mediawiki.special/images/icon-contributors.png | Bin 0 -> 1169 bytes .../src/mediawiki.special/images/icon-edits.png | Bin 0 -> 780 bytes .../src/mediawiki.special/images/icon-lock.png | Bin 0 -> 172 bytes .../src/mediawiki.special/images/icon-pages.png | Bin 0 -> 528 bytes .../mediawiki.special/mediawiki.special.block.css | 11 + .../mediawiki.special/mediawiki.special.block.js | 45 + .../mediawiki.special.changeemail.css | 19 + .../mediawiki.special.changeemail.js | 52 + .../mediawiki.special.changeslist.css | 7 + .../mediawiki.special.changeslist.enhanced.css | 61 + .../mediawiki.special.changeslist.legend.css | 29 + .../mediawiki.special.changeslist.legend.js | 25 + .../src/mediawiki.special/mediawiki.special.css | 120 + .../mediawiki.special/mediawiki.special.import.js | 35 + .../mediawiki.special.javaScriptTest.js | 36 + .../src/mediawiki.special/mediawiki.special.js | 9 + .../mediawiki.special.movePage.js | 6 + .../mediawiki.special.pageLanguage.js | 9 + .../mediawiki.special.pagesWithProp.css | 4 + .../mediawiki.special.preferences.css | 21 + .../mediawiki.special.preferences.js | 305 + .../mediawiki.special.recentchanges.js | 39 + .../mediawiki.special/mediawiki.special.search.css | 173 + .../mediawiki.special/mediawiki.special.search.js | 58 + .../mediawiki.special.undelete.js | 11 + .../mediawiki.special.unwatchedPages.css | 9 + .../mediawiki.special.unwatchedPages.js | 52 + .../mediawiki.special/mediawiki.special.upload.js | 565 + .../mediawiki.special.userlogin.common.css | 66 + .../mediawiki.special.userlogin.common.js | 72 + .../mediawiki.special.userlogin.login.css | 22 + .../mediawiki.special.userlogin.signup.css | 66 + .../mediawiki.special.userlogin.signup.js | 140 + .../mediawiki.special.version.css | 14 + resources/src/mediawiki.ui/components/anchors.less | 77 + resources/src/mediawiki.ui/components/buttons.less | 276 + .../src/mediawiki.ui/components/checkbox.less | 100 + resources/src/mediawiki.ui/components/forms.less | 166 + .../src/mediawiki.ui/components/images/checked.png | Bin 0 -> 327 bytes .../src/mediawiki.ui/components/images/checked.svg | 1 + resources/src/mediawiki.ui/components/inputs.less | 126 + .../src/mediawiki.ui/components/utilities.less | 47 + resources/src/mediawiki.ui/default.less | 5 + resources/src/mediawiki.ui/styleguide.md | 11 + .../src/mediawiki/images/arrow-collapsed-ltr.png | Bin 0 -> 133 bytes .../src/mediawiki/images/arrow-collapsed-ltr.svg | 1 + .../src/mediawiki/images/arrow-collapsed-rtl.png | Bin 0 -> 136 bytes .../src/mediawiki/images/arrow-collapsed-rtl.svg | 1 + resources/src/mediawiki/images/arrow-expanded.png | Bin 0 -> 134 bytes resources/src/mediawiki/images/arrow-expanded.svg | 1 + .../src/mediawiki/images/arrow-sort-ascending.png | Bin 0 -> 244 bytes .../src/mediawiki/images/arrow-sort-ascending.svg | 1 + .../src/mediawiki/images/arrow-sort-descending.png | Bin 0 -> 245 bytes .../src/mediawiki/images/arrow-sort-descending.svg | 1 + .../pager-arrow-disabled-fastforward-ltr.png | Bin 0 -> 323 bytes .../pager-arrow-disabled-fastforward-rtl.png | Bin 0 -> 318 bytes .../images/pager-arrow-disabled-forward-ltr.png | Bin 0 -> 307 bytes .../images/pager-arrow-disabled-forward-rtl.png | Bin 0 -> 301 bytes .../images/pager-arrow-fastforward-ltr.png | Bin 0 -> 342 bytes .../images/pager-arrow-fastforward-rtl.png | Bin 0 -> 352 bytes .../mediawiki/images/pager-arrow-forward-ltr.png | Bin 0 -> 337 bytes .../mediawiki/images/pager-arrow-forward-rtl.png | Bin 0 -> 330 bytes resources/src/mediawiki/mediawiki.Title.js | 939 ++ resources/src/mediawiki/mediawiki.Uri.js | 403 + resources/src/mediawiki/mediawiki.content.json.css | 53 + resources/src/mediawiki/mediawiki.cookie.js | 126 + resources/src/mediawiki/mediawiki.debug.init.js | 3 + resources/src/mediawiki/mediawiki.debug.js | 391 + resources/src/mediawiki/mediawiki.debug.less | 189 + .../src/mediawiki/mediawiki.debug.profile.css | 45 + resources/src/mediawiki/mediawiki.debug.profile.js | 556 + resources/src/mediawiki/mediawiki.feedback.css | 9 + resources/src/mediawiki/mediawiki.feedback.js | 320 + .../src/mediawiki/mediawiki.feedback.spinner.gif | Bin 0 -> 1108 bytes resources/src/mediawiki/mediawiki.hidpi.js | 5 + resources/src/mediawiki/mediawiki.hlist.css | 78 + resources/src/mediawiki/mediawiki.hlist.js | 31 + resources/src/mediawiki/mediawiki.htmlform.js | 408 + resources/src/mediawiki/mediawiki.icon.less | 19 + resources/src/mediawiki/mediawiki.inspect.js | 284 + resources/src/mediawiki/mediawiki.jqueryMsg.js | 1251 +++ resources/src/mediawiki/mediawiki.jqueryMsg.peg | 85 + resources/src/mediawiki/mediawiki.js | 2399 ++++ resources/src/mediawiki/mediawiki.log.js | 84 + resources/src/mediawiki/mediawiki.notification.css | 27 + .../mediawiki.notification.hideForPrint.css | 3 + resources/src/mediawiki/mediawiki.notification.js | 523 + resources/src/mediawiki/mediawiki.notify.js | 27 + .../src/mediawiki/mediawiki.pager.tablePager.less | 84 + .../src/mediawiki/mediawiki.searchSuggest.css | 24 + resources/src/mediawiki/mediawiki.searchSuggest.js | 199 + resources/src/mediawiki/mediawiki.toc.js | 60 + resources/src/mediawiki/mediawiki.user.js | 258 + resources/src/mediawiki/mediawiki.util.js | 531 + resources/src/polyfill-object-create.js | 62 + resources/src/startup.js | 62 + resources/startup.js | 50 - 1123 files changed, 106439 insertions(+), 54862 deletions(-) create mode 100644 resources/assets/file-type-icons/COPYING create mode 100644 resources/assets/file-type-icons/fileicon-c.png create mode 100644 resources/assets/file-type-icons/fileicon-cpp.png create mode 100644 resources/assets/file-type-icons/fileicon-deb.png create mode 100644 resources/assets/file-type-icons/fileicon-djvu.png create mode 100644 resources/assets/file-type-icons/fileicon-dvi.png create mode 100644 resources/assets/file-type-icons/fileicon-exe.png create mode 100644 resources/assets/file-type-icons/fileicon-h.png create mode 100644 resources/assets/file-type-icons/fileicon-html.png create mode 100644 resources/assets/file-type-icons/fileicon-iso.png create mode 100644 resources/assets/file-type-icons/fileicon-java.png create mode 100644 resources/assets/file-type-icons/fileicon-mid.png create mode 100644 resources/assets/file-type-icons/fileicon-mov.png create mode 100644 resources/assets/file-type-icons/fileicon-o.png create mode 100644 resources/assets/file-type-icons/fileicon-ogg.png create mode 100644 resources/assets/file-type-icons/fileicon-pdf.png create mode 100644 resources/assets/file-type-icons/fileicon-ps.png create mode 100644 resources/assets/file-type-icons/fileicon-psd.png create mode 100644 resources/assets/file-type-icons/fileicon-rm.png create mode 100644 resources/assets/file-type-icons/fileicon-rpm.png create mode 100644 resources/assets/file-type-icons/fileicon-svg.png create mode 100644 resources/assets/file-type-icons/fileicon-tar.png create mode 100644 resources/assets/file-type-icons/fileicon-tex.png create mode 100644 resources/assets/file-type-icons/fileicon-ttf.png create mode 100644 resources/assets/file-type-icons/fileicon-txt.png create mode 100644 resources/assets/file-type-icons/fileicon-xcf.png create mode 100644 resources/assets/file-type-icons/fileicon.png create mode 100644 resources/assets/licenses/cc-0.png create mode 100644 resources/assets/licenses/cc-by-nc-sa.png create mode 100644 resources/assets/licenses/cc-by-sa.png create mode 100644 resources/assets/licenses/cc-by.png create mode 100644 resources/assets/licenses/gnu-fdl.png create mode 100644 resources/assets/licenses/public-domain.png create mode 100644 resources/assets/mediawiki.png create mode 100644 resources/assets/poweredby_mediawiki_88x31.png create mode 100644 resources/assets/wiki.png delete mode 100644 resources/jquery.chosen/LICENSE delete mode 100644 resources/jquery.chosen/chosen-sprite.png delete mode 100644 resources/jquery.chosen/chosen-sprite@2x.png delete mode 100644 resources/jquery.chosen/chosen.css delete mode 100644 resources/jquery.chosen/chosen.jquery.js delete mode 100644 resources/jquery.effects/jquery.effects.blind.js delete mode 100644 resources/jquery.effects/jquery.effects.bounce.js delete mode 100644 resources/jquery.effects/jquery.effects.clip.js delete mode 100644 resources/jquery.effects/jquery.effects.core.js delete mode 100644 resources/jquery.effects/jquery.effects.drop.js delete mode 100644 resources/jquery.effects/jquery.effects.explode.js delete mode 100644 resources/jquery.effects/jquery.effects.fade.js delete mode 100644 resources/jquery.effects/jquery.effects.fold.js delete mode 100644 resources/jquery.effects/jquery.effects.highlight.js delete mode 100644 resources/jquery.effects/jquery.effects.pulsate.js delete mode 100644 resources/jquery.effects/jquery.effects.scale.js delete mode 100644 resources/jquery.effects/jquery.effects.shake.js delete mode 100644 resources/jquery.effects/jquery.effects.slide.js delete mode 100644 resources/jquery.effects/jquery.effects.transfer.js delete mode 100644 resources/jquery.tipsy/images/tipsy.png delete mode 100644 resources/jquery.tipsy/jquery.tipsy.css delete mode 100644 resources/jquery.tipsy/jquery.tipsy.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-af.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-ar.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-az.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-bg.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-bs.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-ca.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-cs.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-da.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-de.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-el.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-en-GB.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-eo.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-es.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-et.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-eu.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-fa.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-fi.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-fo.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-fr.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-gl.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-he.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-hi.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-hr.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-hu.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-hy.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-id.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-is.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-it.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-ja.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-ka.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-kk.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-km.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-ko.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-lb.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-lt.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-lv.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-mk.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-ml.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-ms.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-nl.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-no.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-pl.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-pt-BR.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-pt.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-rm.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-ro.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-ru.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-sk.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-sl.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-sq.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-sr-SR.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-sr.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-sv.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-ta.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-th.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-tr.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-uk.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-vi.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-zh-CN.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-zh-HK.js delete mode 100644 resources/jquery.ui/i18n/jquery.ui.datepicker-zh-TW.js delete mode 100644 resources/jquery.ui/jquery.ui.accordion.js delete mode 100644 resources/jquery.ui/jquery.ui.autocomplete.js delete mode 100644 resources/jquery.ui/jquery.ui.button.js delete mode 100644 resources/jquery.ui/jquery.ui.core.js delete mode 100644 resources/jquery.ui/jquery.ui.datepicker.js delete mode 100644 resources/jquery.ui/jquery.ui.dialog.js delete mode 100644 resources/jquery.ui/jquery.ui.draggable.js delete mode 100644 resources/jquery.ui/jquery.ui.droppable.js delete mode 100644 resources/jquery.ui/jquery.ui.mouse.js delete mode 100644 resources/jquery.ui/jquery.ui.position.js delete mode 100644 resources/jquery.ui/jquery.ui.progressbar.js delete mode 100644 resources/jquery.ui/jquery.ui.resizable.js delete mode 100644 resources/jquery.ui/jquery.ui.selectable.js delete mode 100644 resources/jquery.ui/jquery.ui.slider.js delete mode 100644 resources/jquery.ui/jquery.ui.sortable.js delete mode 100644 resources/jquery.ui/jquery.ui.tabs.js delete mode 100644 resources/jquery.ui/jquery.ui.widget.js delete mode 100644 resources/jquery.ui/themes/default/images/ui-bg_flat_0_aaaaaa_40x100.png delete mode 100644 resources/jquery.ui/themes/default/images/ui-bg_flat_75_ffffff_40x100.png delete mode 100644 resources/jquery.ui/themes/default/images/ui-bg_glass_55_fbf9ee_1x400.png delete mode 100644 resources/jquery.ui/themes/default/images/ui-bg_glass_65_ffffff_1x400.png delete mode 100644 resources/jquery.ui/themes/default/images/ui-bg_glass_75_dadada_1x400.png delete mode 100644 resources/jquery.ui/themes/default/images/ui-bg_glass_75_e6e6e6_1x400.png delete mode 100644 resources/jquery.ui/themes/default/images/ui-bg_glass_95_fef1ec_1x400.png delete mode 100644 resources/jquery.ui/themes/default/images/ui-bg_highlight-soft_75_cccccc_1x100.png delete mode 100644 resources/jquery.ui/themes/default/images/ui-icons_222222_256x240.png delete mode 100644 resources/jquery.ui/themes/default/images/ui-icons_2e83ff_256x240.png delete mode 100644 resources/jquery.ui/themes/default/images/ui-icons_454545_256x240.png delete mode 100644 resources/jquery.ui/themes/default/images/ui-icons_888888_256x240.png delete mode 100644 resources/jquery.ui/themes/default/images/ui-icons_cd0a0a_256x240.png delete mode 100644 resources/jquery.ui/themes/default/jquery.ui.accordion.css delete mode 100644 resources/jquery.ui/themes/default/jquery.ui.autocomplete.css delete mode 100644 resources/jquery.ui/themes/default/jquery.ui.button.css delete mode 100644 resources/jquery.ui/themes/default/jquery.ui.core.css delete mode 100644 resources/jquery.ui/themes/default/jquery.ui.datepicker.css delete mode 100644 resources/jquery.ui/themes/default/jquery.ui.dialog.css delete mode 100644 resources/jquery.ui/themes/default/jquery.ui.progressbar.css delete mode 100644 resources/jquery.ui/themes/default/jquery.ui.resizable.css delete mode 100644 resources/jquery.ui/themes/default/jquery.ui.selectable.css delete mode 100644 resources/jquery.ui/themes/default/jquery.ui.slider.css delete mode 100644 resources/jquery.ui/themes/default/jquery.ui.tabs.css delete mode 100644 resources/jquery.ui/themes/default/jquery.ui.theme.css delete mode 100644 resources/jquery.ui/themes/vector/images/close.png delete mode 100644 resources/jquery.ui/themes/vector/images/titlebar-fade.png delete mode 100644 resources/jquery.ui/themes/vector/images/ui-anim_basic_16x16.gif delete mode 100644 resources/jquery.ui/themes/vector/images/ui-bg_flat_15_cd0a0a_40x100.png delete mode 100644 resources/jquery.ui/themes/vector/images/ui-bg_flat_70_000000_40x100.png delete mode 100644 resources/jquery.ui/themes/vector/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png delete mode 100644 resources/jquery.ui/themes/vector/images/ui-bg_highlight-hard_80_d7ebf9_1x100.png delete mode 100644 resources/jquery.ui/themes/vector/images/ui-bg_highlight-soft_100_e4f1fb_1x100.png delete mode 100644 resources/jquery.ui/themes/vector/images/ui-bg_highlight-soft_100_ffffff_1x100.png delete mode 100644 resources/jquery.ui/themes/vector/images/ui-bg_highlight-soft_25_ffef8f_1x100.png delete mode 100644 resources/jquery.ui/themes/vector/images/ui-bg_inset-hard_100_f0f0f0_1x100.png delete mode 100644 resources/jquery.ui/themes/vector/images/ui-icons_2694e8_256x240.png delete mode 100644 resources/jquery.ui/themes/vector/images/ui-icons_2e83ff_256x240.png delete mode 100644 resources/jquery.ui/themes/vector/images/ui-icons_3d80b3_256x240.png delete mode 100644 resources/jquery.ui/themes/vector/images/ui-icons_666666_256x240.png delete mode 100644 resources/jquery.ui/themes/vector/images/ui-icons_72a7cf_256x240.png delete mode 100644 resources/jquery.ui/themes/vector/images/ui-icons_ffffff_256x240.png delete mode 100644 resources/jquery.ui/themes/vector/jquery.ui.accordion.css delete mode 100644 resources/jquery.ui/themes/vector/jquery.ui.autocomplete.css delete mode 100644 resources/jquery.ui/themes/vector/jquery.ui.button.css delete mode 100644 resources/jquery.ui/themes/vector/jquery.ui.core.css delete mode 100644 resources/jquery.ui/themes/vector/jquery.ui.datepicker.css delete mode 100644 resources/jquery.ui/themes/vector/jquery.ui.dialog.css delete mode 100644 resources/jquery.ui/themes/vector/jquery.ui.progressbar.css delete mode 100644 resources/jquery.ui/themes/vector/jquery.ui.resizable.css delete mode 100644 resources/jquery.ui/themes/vector/jquery.ui.selectable.css delete mode 100644 resources/jquery.ui/themes/vector/jquery.ui.slider.css delete mode 100644 resources/jquery.ui/themes/vector/jquery.ui.tabs.css delete mode 100644 resources/jquery.ui/themes/vector/jquery.ui.theme.css delete mode 100644 resources/jquery/images/jquery.arrowSteps.divider-ltr.png delete mode 100644 resources/jquery/images/jquery.arrowSteps.divider-rtl.png delete mode 100644 resources/jquery/images/jquery.arrowSteps.head-ltr.png delete mode 100644 resources/jquery/images/jquery.arrowSteps.head-rtl.png delete mode 100644 resources/jquery/images/jquery.arrowSteps.tail-ltr.png delete mode 100644 resources/jquery/images/jquery.arrowSteps.tail-rtl.png delete mode 100644 resources/jquery/images/marker.png delete mode 100644 resources/jquery/images/mask.png delete mode 100644 resources/jquery/images/sort_both.gif delete mode 100644 resources/jquery/images/sort_down.gif delete mode 100644 resources/jquery/images/sort_none.gif delete mode 100644 resources/jquery/images/sort_up.gif delete mode 100644 resources/jquery/images/spinner-large.gif delete mode 100644 resources/jquery/images/spinner.gif delete mode 100644 resources/jquery/images/wheel.png delete mode 100644 resources/jquery/jquery.appear.js delete mode 100644 resources/jquery/jquery.arrowSteps.css delete mode 100644 resources/jquery/jquery.arrowSteps.js delete mode 100644 resources/jquery/jquery.async.js delete mode 100644 resources/jquery/jquery.autoEllipsis.js delete mode 100644 resources/jquery/jquery.badge.css delete mode 100644 resources/jquery/jquery.badge.js delete mode 100644 resources/jquery/jquery.byteLength.js delete mode 100644 resources/jquery/jquery.byteLimit.js delete mode 100644 resources/jquery/jquery.checkboxShiftClick.js delete mode 100644 resources/jquery/jquery.client.js delete mode 100644 resources/jquery/jquery.color.js delete mode 100644 resources/jquery/jquery.colorUtil.js delete mode 100644 resources/jquery/jquery.cookie.js delete mode 100644 resources/jquery/jquery.cycle.all.js delete mode 100644 resources/jquery/jquery.delayedBind.js delete mode 100644 resources/jquery/jquery.expandableField.js delete mode 100644 resources/jquery/jquery.farbtastic.css delete mode 100644 resources/jquery/jquery.farbtastic.js delete mode 100644 resources/jquery/jquery.footHovzer.css delete mode 100644 resources/jquery/jquery.footHovzer.js delete mode 100644 resources/jquery/jquery.form.js delete mode 100644 resources/jquery/jquery.getAttrs.js delete mode 100644 resources/jquery/jquery.hidpi.js delete mode 100644 resources/jquery/jquery.highlightText.js delete mode 100644 resources/jquery/jquery.hoverIntent.js delete mode 100644 resources/jquery/jquery.jStorage.js delete mode 100644 resources/jquery/jquery.js delete mode 100644 resources/jquery/jquery.json.js delete mode 100644 resources/jquery/jquery.localize.js delete mode 100644 resources/jquery/jquery.makeCollapsible.css delete mode 100644 resources/jquery/jquery.makeCollapsible.js delete mode 100644 resources/jquery/jquery.mockjax.js delete mode 100644 resources/jquery/jquery.mw-jump.js delete mode 100644 resources/jquery/jquery.mwExtension.js delete mode 100644 resources/jquery/jquery.placeholder.js delete mode 100644 resources/jquery/jquery.qunit.completenessTest.js delete mode 100644 resources/jquery/jquery.qunit.css delete mode 100644 resources/jquery/jquery.qunit.js delete mode 100644 resources/jquery/jquery.spinner.css delete mode 100644 resources/jquery/jquery.spinner.js delete mode 100644 resources/jquery/jquery.suggestions.css delete mode 100644 resources/jquery/jquery.suggestions.js delete mode 100644 resources/jquery/jquery.tabIndex.js delete mode 100644 resources/jquery/jquery.tablesorter.css delete mode 100644 resources/jquery/jquery.tablesorter.js delete mode 100644 resources/jquery/jquery.textSelection.js delete mode 100644 resources/jquery/jquery.validate.js delete mode 100644 resources/jquery/jquery.xmldom.js create mode 100644 resources/lib/es5-shim/es5-shim.js create mode 100644 resources/lib/jquery.chosen/LICENSE create mode 100644 resources/lib/jquery.chosen/chosen-sprite.png create mode 100644 resources/lib/jquery.chosen/chosen-sprite@2x.png create mode 100644 resources/lib/jquery.chosen/chosen.css create mode 100644 resources/lib/jquery.chosen/chosen.jquery.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-af.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-ar-DZ.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-ar.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-az.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-bg.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-bs.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-ca.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-cs.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-cy-GB.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-da.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-de.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-el.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-en-AU.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-en-GB.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-en-NZ.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-eo.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-es.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-et.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-eu.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-fa.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-fi.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-fo.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-fr-CH.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-fr.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-gl.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-he.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-hi.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-hr.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-hu.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-hy.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-id.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-is.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-it.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-ja.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-ka.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-kk.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-km.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-ko.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-lb.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-lt.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-lv.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-mk.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-ml.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-ms.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-nl-BE.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-nl.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-no.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-pl.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-pt-BR.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-pt.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-rm.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-ro.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-ru.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-sk.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-sl.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-sq.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-sr-SR.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-sr.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-sv.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-ta.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-th.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-tj.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-tr.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-uk.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-vi.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-zh-CN.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-zh-HK.js create mode 100644 resources/lib/jquery.ui/i18n/jquery.ui.datepicker-zh-TW.js create mode 100644 resources/lib/jquery.ui/jquery.ui.accordion.js create mode 100644 resources/lib/jquery.ui/jquery.ui.autocomplete.js create mode 100644 resources/lib/jquery.ui/jquery.ui.button.js create mode 100644 resources/lib/jquery.ui/jquery.ui.core.js create mode 100644 resources/lib/jquery.ui/jquery.ui.datepicker.js create mode 100644 resources/lib/jquery.ui/jquery.ui.dialog.js create mode 100644 resources/lib/jquery.ui/jquery.ui.draggable.js create mode 100644 resources/lib/jquery.ui/jquery.ui.droppable.js create mode 100644 resources/lib/jquery.ui/jquery.ui.effect-blind.js create mode 100644 resources/lib/jquery.ui/jquery.ui.effect-bounce.js create mode 100644 resources/lib/jquery.ui/jquery.ui.effect-clip.js create mode 100644 resources/lib/jquery.ui/jquery.ui.effect-drop.js create mode 100644 resources/lib/jquery.ui/jquery.ui.effect-explode.js create mode 100644 resources/lib/jquery.ui/jquery.ui.effect-fade.js create mode 100644 resources/lib/jquery.ui/jquery.ui.effect-fold.js create mode 100644 resources/lib/jquery.ui/jquery.ui.effect-highlight.js create mode 100644 resources/lib/jquery.ui/jquery.ui.effect-pulsate.js create mode 100644 resources/lib/jquery.ui/jquery.ui.effect-scale.js create mode 100644 resources/lib/jquery.ui/jquery.ui.effect-shake.js create mode 100644 resources/lib/jquery.ui/jquery.ui.effect-slide.js create mode 100644 resources/lib/jquery.ui/jquery.ui.effect-transfer.js create mode 100644 resources/lib/jquery.ui/jquery.ui.effect.js create mode 100644 resources/lib/jquery.ui/jquery.ui.menu.js create mode 100644 resources/lib/jquery.ui/jquery.ui.mouse.js create mode 100644 resources/lib/jquery.ui/jquery.ui.position.js create mode 100644 resources/lib/jquery.ui/jquery.ui.progressbar.js create mode 100644 resources/lib/jquery.ui/jquery.ui.resizable.js create mode 100644 resources/lib/jquery.ui/jquery.ui.selectable.js create mode 100644 resources/lib/jquery.ui/jquery.ui.slider.js create mode 100644 resources/lib/jquery.ui/jquery.ui.sortable.js create mode 100644 resources/lib/jquery.ui/jquery.ui.spinner.js create mode 100644 resources/lib/jquery.ui/jquery.ui.tabs.js create mode 100644 resources/lib/jquery.ui/jquery.ui.tooltip.js create mode 100644 resources/lib/jquery.ui/jquery.ui.widget.js create mode 100644 resources/lib/jquery.ui/themes/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png create mode 100644 resources/lib/jquery.ui/themes/smoothness/images/ui-bg_flat_75_ffffff_40x100.png create mode 100644 resources/lib/jquery.ui/themes/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png create mode 100644 resources/lib/jquery.ui/themes/smoothness/images/ui-bg_glass_65_ffffff_1x400.png create mode 100644 resources/lib/jquery.ui/themes/smoothness/images/ui-bg_glass_75_dadada_1x400.png create mode 100644 resources/lib/jquery.ui/themes/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png create mode 100644 resources/lib/jquery.ui/themes/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png create mode 100644 resources/lib/jquery.ui/themes/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png create mode 100644 resources/lib/jquery.ui/themes/smoothness/images/ui-icons_222222_256x240.png create mode 100644 resources/lib/jquery.ui/themes/smoothness/images/ui-icons_2e83ff_256x240.png create mode 100644 resources/lib/jquery.ui/themes/smoothness/images/ui-icons_454545_256x240.png create mode 100644 resources/lib/jquery.ui/themes/smoothness/images/ui-icons_888888_256x240.png create mode 100644 resources/lib/jquery.ui/themes/smoothness/images/ui-icons_cd0a0a_256x240.png create mode 100644 resources/lib/jquery.ui/themes/smoothness/jquery.ui.accordion.css create mode 100644 resources/lib/jquery.ui/themes/smoothness/jquery.ui.autocomplete.css create mode 100644 resources/lib/jquery.ui/themes/smoothness/jquery.ui.button.css create mode 100644 resources/lib/jquery.ui/themes/smoothness/jquery.ui.core.css create mode 100644 resources/lib/jquery.ui/themes/smoothness/jquery.ui.datepicker.css create mode 100644 resources/lib/jquery.ui/themes/smoothness/jquery.ui.dialog.css create mode 100644 resources/lib/jquery.ui/themes/smoothness/jquery.ui.menu.css create mode 100644 resources/lib/jquery.ui/themes/smoothness/jquery.ui.progressbar.css create mode 100644 resources/lib/jquery.ui/themes/smoothness/jquery.ui.resizable.css create mode 100644 resources/lib/jquery.ui/themes/smoothness/jquery.ui.selectable.css create mode 100644 resources/lib/jquery.ui/themes/smoothness/jquery.ui.slider.css create mode 100644 resources/lib/jquery.ui/themes/smoothness/jquery.ui.spinner.css create mode 100644 resources/lib/jquery.ui/themes/smoothness/jquery.ui.tabs.css create mode 100644 resources/lib/jquery.ui/themes/smoothness/jquery.ui.theme.css create mode 100644 resources/lib/jquery.ui/themes/smoothness/jquery.ui.tooltip.css create mode 100644 resources/lib/jquery/jquery.appear.js create mode 100644 resources/lib/jquery/jquery.async.js create mode 100644 resources/lib/jquery/jquery.ba-throttle-debounce.js create mode 100644 resources/lib/jquery/jquery.cookie.js create mode 100644 resources/lib/jquery/jquery.form.js create mode 100644 resources/lib/jquery/jquery.fullscreen.js create mode 100644 resources/lib/jquery/jquery.hoverIntent.js create mode 100644 resources/lib/jquery/jquery.jStorage.js create mode 100644 resources/lib/jquery/jquery.js create mode 100644 resources/lib/jquery/jquery.json.js create mode 100644 resources/lib/jquery/jquery.migrate.js create mode 100644 resources/lib/jquery/jquery.mockjax.js create mode 100644 resources/lib/jquery/jquery.qunit.css create mode 100644 resources/lib/jquery/jquery.qunit.js create mode 100644 resources/lib/jquery/jquery.validate.js create mode 100644 resources/lib/jquery/jquery.xmldom.js create mode 100644 resources/lib/json2/json2.js create mode 100644 resources/lib/moment/LICENSE create mode 100644 resources/lib/moment/locale/af.js create mode 100644 resources/lib/moment/locale/ar-ma.js create mode 100644 resources/lib/moment/locale/ar-sa.js create mode 100644 resources/lib/moment/locale/ar.js create mode 100644 resources/lib/moment/locale/az.js create mode 100644 resources/lib/moment/locale/be.js create mode 100644 resources/lib/moment/locale/bg.js create mode 100644 resources/lib/moment/locale/bn.js create mode 100644 resources/lib/moment/locale/bo.js create mode 100644 resources/lib/moment/locale/br.js create mode 100644 resources/lib/moment/locale/bs.js create mode 100644 resources/lib/moment/locale/ca.js create mode 100644 resources/lib/moment/locale/cs.js create mode 100644 resources/lib/moment/locale/cv.js create mode 100644 resources/lib/moment/locale/cy.js create mode 100644 resources/lib/moment/locale/da.js create mode 100644 resources/lib/moment/locale/de-at.js create mode 100644 resources/lib/moment/locale/de.js create mode 100644 resources/lib/moment/locale/el.js create mode 100644 resources/lib/moment/locale/en-au.js create mode 100644 resources/lib/moment/locale/en-ca.js create mode 100644 resources/lib/moment/locale/en-gb.js create mode 100644 resources/lib/moment/locale/eo.js create mode 100644 resources/lib/moment/locale/es.js create mode 100644 resources/lib/moment/locale/et.js create mode 100644 resources/lib/moment/locale/eu.js create mode 100644 resources/lib/moment/locale/fa.js create mode 100644 resources/lib/moment/locale/fi.js create mode 100644 resources/lib/moment/locale/fo.js create mode 100644 resources/lib/moment/locale/fr-ca.js create mode 100644 resources/lib/moment/locale/fr.js create mode 100644 resources/lib/moment/locale/gl.js create mode 100644 resources/lib/moment/locale/he.js create mode 100644 resources/lib/moment/locale/hi.js create mode 100644 resources/lib/moment/locale/hr.js create mode 100644 resources/lib/moment/locale/hu.js create mode 100644 resources/lib/moment/locale/hy-am.js create mode 100644 resources/lib/moment/locale/id.js create mode 100644 resources/lib/moment/locale/is.js create mode 100644 resources/lib/moment/locale/it.js create mode 100644 resources/lib/moment/locale/ja.js create mode 100644 resources/lib/moment/locale/ka.js create mode 100644 resources/lib/moment/locale/km.js create mode 100644 resources/lib/moment/locale/ko.js create mode 100644 resources/lib/moment/locale/lb.js create mode 100644 resources/lib/moment/locale/lt.js create mode 100644 resources/lib/moment/locale/lv.js create mode 100644 resources/lib/moment/locale/mk.js create mode 100644 resources/lib/moment/locale/ml.js create mode 100644 resources/lib/moment/locale/mr.js create mode 100644 resources/lib/moment/locale/ms-my.js create mode 100644 resources/lib/moment/locale/my.js create mode 100644 resources/lib/moment/locale/nb.js create mode 100644 resources/lib/moment/locale/ne.js create mode 100644 resources/lib/moment/locale/nl.js create mode 100644 resources/lib/moment/locale/nn.js create mode 100644 resources/lib/moment/locale/pl.js create mode 100644 resources/lib/moment/locale/pt-br.js create mode 100644 resources/lib/moment/locale/pt.js create mode 100644 resources/lib/moment/locale/ro.js create mode 100644 resources/lib/moment/locale/ru.js create mode 100644 resources/lib/moment/locale/sk.js create mode 100644 resources/lib/moment/locale/sl.js create mode 100644 resources/lib/moment/locale/sq.js create mode 100644 resources/lib/moment/locale/sr-cyrl.js create mode 100644 resources/lib/moment/locale/sr.js create mode 100644 resources/lib/moment/locale/sv.js create mode 100644 resources/lib/moment/locale/ta.js create mode 100644 resources/lib/moment/locale/th.js create mode 100644 resources/lib/moment/locale/tl-ph.js create mode 100644 resources/lib/moment/locale/tr.js create mode 100644 resources/lib/moment/locale/tzm-latn.js create mode 100644 resources/lib/moment/locale/tzm.js create mode 100644 resources/lib/moment/locale/uk.js create mode 100644 resources/lib/moment/locale/uz.js create mode 100644 resources/lib/moment/locale/vi.js create mode 100644 resources/lib/moment/locale/zh-cn.js create mode 100644 resources/lib/moment/locale/zh-tw.js create mode 100644 resources/lib/moment/moment.js create mode 100644 resources/lib/oojs-ui/i18n/ace.json create mode 100644 resources/lib/oojs-ui/i18n/af.json create mode 100644 resources/lib/oojs-ui/i18n/am.json create mode 100644 resources/lib/oojs-ui/i18n/ar.json create mode 100644 resources/lib/oojs-ui/i18n/arc.json create mode 100644 resources/lib/oojs-ui/i18n/arq.json create mode 100644 resources/lib/oojs-ui/i18n/ast.json create mode 100644 resources/lib/oojs-ui/i18n/az.json create mode 100644 resources/lib/oojs-ui/i18n/ba.json create mode 100644 resources/lib/oojs-ui/i18n/bcl.json create mode 100644 resources/lib/oojs-ui/i18n/be-tarask.json create mode 100644 resources/lib/oojs-ui/i18n/be.json create mode 100644 resources/lib/oojs-ui/i18n/bg.json create mode 100644 resources/lib/oojs-ui/i18n/bn.json create mode 100644 resources/lib/oojs-ui/i18n/br.json create mode 100644 resources/lib/oojs-ui/i18n/bs.json create mode 100644 resources/lib/oojs-ui/i18n/ca.json create mode 100644 resources/lib/oojs-ui/i18n/ce.json create mode 100644 resources/lib/oojs-ui/i18n/ckb.json create mode 100644 resources/lib/oojs-ui/i18n/co.json create mode 100644 resources/lib/oojs-ui/i18n/cs.json create mode 100644 resources/lib/oojs-ui/i18n/cu.json create mode 100644 resources/lib/oojs-ui/i18n/cy.json create mode 100644 resources/lib/oojs-ui/i18n/da.json create mode 100644 resources/lib/oojs-ui/i18n/de.json create mode 100644 resources/lib/oojs-ui/i18n/diq.json create mode 100644 resources/lib/oojs-ui/i18n/dsb.json create mode 100644 resources/lib/oojs-ui/i18n/egl.json create mode 100644 resources/lib/oojs-ui/i18n/el.json create mode 100644 resources/lib/oojs-ui/i18n/eml.json create mode 100644 resources/lib/oojs-ui/i18n/en.json create mode 100644 resources/lib/oojs-ui/i18n/eo.json create mode 100644 resources/lib/oojs-ui/i18n/es.json create mode 100644 resources/lib/oojs-ui/i18n/et.json create mode 100644 resources/lib/oojs-ui/i18n/eu.json create mode 100644 resources/lib/oojs-ui/i18n/fa.json create mode 100644 resources/lib/oojs-ui/i18n/fi.json create mode 100644 resources/lib/oojs-ui/i18n/fo.json create mode 100644 resources/lib/oojs-ui/i18n/fr.json create mode 100644 resources/lib/oojs-ui/i18n/frr.json create mode 100644 resources/lib/oojs-ui/i18n/fur.json create mode 100644 resources/lib/oojs-ui/i18n/gd.json create mode 100644 resources/lib/oojs-ui/i18n/gl.json create mode 100644 resources/lib/oojs-ui/i18n/gu.json create mode 100644 resources/lib/oojs-ui/i18n/he.json create mode 100644 resources/lib/oojs-ui/i18n/hi.json create mode 100644 resources/lib/oojs-ui/i18n/hr.json create mode 100644 resources/lib/oojs-ui/i18n/hsb.json create mode 100644 resources/lib/oojs-ui/i18n/hu.json create mode 100644 resources/lib/oojs-ui/i18n/hy.json create mode 100644 resources/lib/oojs-ui/i18n/ia.json create mode 100644 resources/lib/oojs-ui/i18n/id.json create mode 100644 resources/lib/oojs-ui/i18n/ie.json create mode 100644 resources/lib/oojs-ui/i18n/ilo.json create mode 100644 resources/lib/oojs-ui/i18n/is.json create mode 100644 resources/lib/oojs-ui/i18n/it.json create mode 100644 resources/lib/oojs-ui/i18n/ja.json create mode 100644 resources/lib/oojs-ui/i18n/jv.json create mode 100644 resources/lib/oojs-ui/i18n/ka.json create mode 100644 resources/lib/oojs-ui/i18n/kk-cyrl.json create mode 100644 resources/lib/oojs-ui/i18n/km.json create mode 100644 resources/lib/oojs-ui/i18n/kn.json create mode 100644 resources/lib/oojs-ui/i18n/ko.json create mode 100644 resources/lib/oojs-ui/i18n/krc.json create mode 100644 resources/lib/oojs-ui/i18n/kw.json create mode 100644 resources/lib/oojs-ui/i18n/ky.json create mode 100644 resources/lib/oojs-ui/i18n/lb.json create mode 100644 resources/lib/oojs-ui/i18n/lmo.json create mode 100644 resources/lib/oojs-ui/i18n/lt.json create mode 100644 resources/lib/oojs-ui/i18n/lv.json create mode 100644 resources/lib/oojs-ui/i18n/lzh.json create mode 100644 resources/lib/oojs-ui/i18n/mg.json create mode 100644 resources/lib/oojs-ui/i18n/min.json create mode 100644 resources/lib/oojs-ui/i18n/mk.json create mode 100644 resources/lib/oojs-ui/i18n/ml.json create mode 100644 resources/lib/oojs-ui/i18n/mr.json create mode 100644 resources/lib/oojs-ui/i18n/ms.json create mode 100644 resources/lib/oojs-ui/i18n/nap.json create mode 100644 resources/lib/oojs-ui/i18n/nb.json create mode 100644 resources/lib/oojs-ui/i18n/nds-nl.json create mode 100644 resources/lib/oojs-ui/i18n/nds.json create mode 100644 resources/lib/oojs-ui/i18n/ne.json create mode 100644 resources/lib/oojs-ui/i18n/nl.json create mode 100644 resources/lib/oojs-ui/i18n/nn.json create mode 100644 resources/lib/oojs-ui/i18n/oc.json create mode 100644 resources/lib/oojs-ui/i18n/om.json create mode 100644 resources/lib/oojs-ui/i18n/or.json create mode 100644 resources/lib/oojs-ui/i18n/pa.json create mode 100644 resources/lib/oojs-ui/i18n/pfl.json create mode 100644 resources/lib/oojs-ui/i18n/pl.json create mode 100644 resources/lib/oojs-ui/i18n/pms.json create mode 100644 resources/lib/oojs-ui/i18n/ps.json create mode 100644 resources/lib/oojs-ui/i18n/pt-br.json create mode 100644 resources/lib/oojs-ui/i18n/pt.json create mode 100644 resources/lib/oojs-ui/i18n/qqq.json create mode 100644 resources/lib/oojs-ui/i18n/qu.json create mode 100644 resources/lib/oojs-ui/i18n/ro.json create mode 100644 resources/lib/oojs-ui/i18n/roa-tara.json create mode 100644 resources/lib/oojs-ui/i18n/ru.json create mode 100644 resources/lib/oojs-ui/i18n/sah.json create mode 100644 resources/lib/oojs-ui/i18n/scn.json create mode 100644 resources/lib/oojs-ui/i18n/sco.json create mode 100644 resources/lib/oojs-ui/i18n/sh.json create mode 100644 resources/lib/oojs-ui/i18n/si.json create mode 100644 resources/lib/oojs-ui/i18n/sk.json create mode 100644 resources/lib/oojs-ui/i18n/sl.json create mode 100644 resources/lib/oojs-ui/i18n/sq.json create mode 100644 resources/lib/oojs-ui/i18n/sr-ec.json create mode 100644 resources/lib/oojs-ui/i18n/sr-el.json create mode 100644 resources/lib/oojs-ui/i18n/sv.json create mode 100644 resources/lib/oojs-ui/i18n/sw.json create mode 100644 resources/lib/oojs-ui/i18n/ta.json create mode 100644 resources/lib/oojs-ui/i18n/te.json create mode 100644 resources/lib/oojs-ui/i18n/tg-cyrl.json create mode 100644 resources/lib/oojs-ui/i18n/th.json create mode 100644 resources/lib/oojs-ui/i18n/tl.json create mode 100644 resources/lib/oojs-ui/i18n/tr.json create mode 100644 resources/lib/oojs-ui/i18n/tt-cyrl.json create mode 100644 resources/lib/oojs-ui/i18n/ug-arab.json create mode 100644 resources/lib/oojs-ui/i18n/uk.json create mode 100644 resources/lib/oojs-ui/i18n/uz.json create mode 100644 resources/lib/oojs-ui/i18n/vec.json create mode 100644 resources/lib/oojs-ui/i18n/vi.json create mode 100644 resources/lib/oojs-ui/i18n/vo.json create mode 100644 resources/lib/oojs-ui/i18n/wuu.json create mode 100644 resources/lib/oojs-ui/i18n/yi.json create mode 100644 resources/lib/oojs-ui/i18n/yo.json create mode 100644 resources/lib/oojs-ui/i18n/yue.json create mode 100644 resources/lib/oojs-ui/i18n/zh-hans.json create mode 100644 resources/lib/oojs-ui/i18n/zh-hant.json create mode 100644 resources/lib/oojs-ui/images/anchor.png create mode 100644 resources/lib/oojs-ui/images/anchor.svg create mode 100644 resources/lib/oojs-ui/images/icons/accept.png create mode 100644 resources/lib/oojs-ui/images/icons/accept.svg create mode 100644 resources/lib/oojs-ui/images/icons/add-item.png create mode 100644 resources/lib/oojs-ui/images/icons/add-item.svg create mode 100644 resources/lib/oojs-ui/images/icons/advanced.png create mode 100644 resources/lib/oojs-ui/images/icons/advanced.svg create mode 100644 resources/lib/oojs-ui/images/icons/alert.png create mode 100644 resources/lib/oojs-ui/images/icons/alert.svg create mode 100644 resources/lib/oojs-ui/images/icons/arched-arrow-ltr.png create mode 100644 resources/lib/oojs-ui/images/icons/arched-arrow-ltr.svg create mode 100644 resources/lib/oojs-ui/images/icons/arched-arrow-rtl.png create mode 100644 resources/lib/oojs-ui/images/icons/arched-arrow-rtl.svg create mode 100644 resources/lib/oojs-ui/images/icons/check.png create mode 100644 resources/lib/oojs-ui/images/icons/check.svg create mode 100644 resources/lib/oojs-ui/images/icons/clear.png create mode 100644 resources/lib/oojs-ui/images/icons/clear.svg create mode 100644 resources/lib/oojs-ui/images/icons/close.png create mode 100644 resources/lib/oojs-ui/images/icons/close.svg create mode 100644 resources/lib/oojs-ui/images/icons/code.png create mode 100644 resources/lib/oojs-ui/images/icons/code.svg create mode 100644 resources/lib/oojs-ui/images/icons/collapse.png create mode 100644 resources/lib/oojs-ui/images/icons/collapse.svg create mode 100644 resources/lib/oojs-ui/images/icons/comment.png create mode 100644 resources/lib/oojs-ui/images/icons/comment.svg create mode 100644 resources/lib/oojs-ui/images/icons/expand.png create mode 100644 resources/lib/oojs-ui/images/icons/expand.svg create mode 100644 resources/lib/oojs-ui/images/icons/help.png create mode 100644 resources/lib/oojs-ui/images/icons/help.svg create mode 100644 resources/lib/oojs-ui/images/icons/history.png create mode 100644 resources/lib/oojs-ui/images/icons/history.svg create mode 100644 resources/lib/oojs-ui/images/icons/info.png create mode 100644 resources/lib/oojs-ui/images/icons/info.svg create mode 100644 resources/lib/oojs-ui/images/icons/link.png create mode 100644 resources/lib/oojs-ui/images/icons/link.svg create mode 100644 resources/lib/oojs-ui/images/icons/menu.png create mode 100644 resources/lib/oojs-ui/images/icons/menu.svg create mode 100644 resources/lib/oojs-ui/images/icons/move-ltr.png create mode 100644 resources/lib/oojs-ui/images/icons/move-ltr.svg create mode 100644 resources/lib/oojs-ui/images/icons/move-rtl.png create mode 100644 resources/lib/oojs-ui/images/icons/move-rtl.svg create mode 100644 resources/lib/oojs-ui/images/icons/picture.png create mode 100644 resources/lib/oojs-ui/images/icons/picture.svg create mode 100644 resources/lib/oojs-ui/images/icons/remove-item.png create mode 100644 resources/lib/oojs-ui/images/icons/remove-item.svg create mode 100644 resources/lib/oojs-ui/images/icons/remove.png create mode 100644 resources/lib/oojs-ui/images/icons/remove.svg create mode 100644 resources/lib/oojs-ui/images/icons/search.png create mode 100644 resources/lib/oojs-ui/images/icons/search.svg create mode 100644 resources/lib/oojs-ui/images/icons/settings.png create mode 100644 resources/lib/oojs-ui/images/icons/settings.svg create mode 100644 resources/lib/oojs-ui/images/icons/tag.png create mode 100644 resources/lib/oojs-ui/images/icons/tag.svg create mode 100644 resources/lib/oojs-ui/images/icons/window.png create mode 100644 resources/lib/oojs-ui/images/icons/window.svg create mode 100644 resources/lib/oojs-ui/images/indicators/alert.png create mode 100644 resources/lib/oojs-ui/images/indicators/alert.svg create mode 100644 resources/lib/oojs-ui/images/indicators/arrow-down.png create mode 100644 resources/lib/oojs-ui/images/indicators/arrow-down.svg create mode 100644 resources/lib/oojs-ui/images/indicators/arrow-ltr.png create mode 100644 resources/lib/oojs-ui/images/indicators/arrow-ltr.svg create mode 100644 resources/lib/oojs-ui/images/indicators/arrow-rtl.png create mode 100644 resources/lib/oojs-ui/images/indicators/arrow-rtl.svg create mode 100644 resources/lib/oojs-ui/images/indicators/arrow-up.png create mode 100644 resources/lib/oojs-ui/images/indicators/arrow-up.svg create mode 100644 resources/lib/oojs-ui/images/indicators/required.png create mode 100644 resources/lib/oojs-ui/images/indicators/required.svg create mode 100644 resources/lib/oojs-ui/images/textures/pending.gif create mode 100644 resources/lib/oojs-ui/images/textures/transparency.png create mode 100644 resources/lib/oojs-ui/images/textures/transparency.svg create mode 100644 resources/lib/oojs-ui/images/toolbar-shadow.png create mode 100644 resources/lib/oojs-ui/oojs-ui-apex.css create mode 100644 resources/lib/oojs-ui/oojs-ui-apex.rtl.css create mode 100644 resources/lib/oojs-ui/oojs-ui-minerva.css create mode 100644 resources/lib/oojs-ui/oojs-ui-minerva.rtl.css create mode 100644 resources/lib/oojs-ui/oojs-ui.css create mode 100644 resources/lib/oojs-ui/oojs-ui.js create mode 100644 resources/lib/oojs-ui/oojs-ui.rtl.css create mode 100644 resources/lib/oojs-ui/oojs-ui.svg.css create mode 100644 resources/lib/oojs-ui/oojs-ui.svg.rtl.css create mode 100644 resources/lib/oojs-ui/themes/minerva/images/icons/check.png create mode 100644 resources/lib/oojs-ui/themes/minerva/images/icons/check.svg create mode 100644 resources/lib/oojs/oojs.jquery.js create mode 100644 resources/lib/sinonjs/sinon-1.10.3.js create mode 100644 resources/lib/sinonjs/sinon-ie-1.10.3.js delete mode 100644 resources/mediawiki.action/images/green-checkmark.png delete mode 100644 resources/mediawiki.action/mediawiki.action.edit.collapsibleFooter.css delete mode 100644 resources/mediawiki.action/mediawiki.action.edit.collapsibleFooter.js delete mode 100644 resources/mediawiki.action/mediawiki.action.edit.editWarning.js delete mode 100644 resources/mediawiki.action/mediawiki.action.edit.js delete mode 100644 resources/mediawiki.action/mediawiki.action.edit.preview.js delete mode 100644 resources/mediawiki.action/mediawiki.action.edit.styles.css delete mode 100644 resources/mediawiki.action/mediawiki.action.history.diff.css delete mode 100644 resources/mediawiki.action/mediawiki.action.history.js delete mode 100644 resources/mediawiki.action/mediawiki.action.view.dblClickEdit.js delete mode 100644 resources/mediawiki.action/mediawiki.action.view.metadata.js delete mode 100644 resources/mediawiki.action/mediawiki.action.view.postEdit.css delete mode 100644 resources/mediawiki.action/mediawiki.action.view.postEdit.js delete mode 100644 resources/mediawiki.action/mediawiki.action.view.rightClickEdit.js delete mode 100644 resources/mediawiki.api/mediawiki.api.category.js delete mode 100644 resources/mediawiki.api/mediawiki.api.edit.js delete mode 100644 resources/mediawiki.api/mediawiki.api.js delete mode 100644 resources/mediawiki.api/mediawiki.api.login.js delete mode 100644 resources/mediawiki.api/mediawiki.api.parse.js delete mode 100644 resources/mediawiki.api/mediawiki.api.watch.js delete mode 100644 resources/mediawiki.language/languages/bs.js delete mode 100644 resources/mediawiki.language/languages/dsb.js delete mode 100644 resources/mediawiki.language/languages/fi.js delete mode 100644 resources/mediawiki.language/languages/ga.js delete mode 100644 resources/mediawiki.language/languages/he.js delete mode 100644 resources/mediawiki.language/languages/hsb.js delete mode 100644 resources/mediawiki.language/languages/hu.js delete mode 100644 resources/mediawiki.language/languages/hy.js delete mode 100644 resources/mediawiki.language/languages/la.js delete mode 100644 resources/mediawiki.language/languages/os.js delete mode 100644 resources/mediawiki.language/languages/ru.js delete mode 100644 resources/mediawiki.language/languages/sl.js delete mode 100644 resources/mediawiki.language/languages/uk.js delete mode 100644 resources/mediawiki.language/mediawiki.cldr.js delete mode 100644 resources/mediawiki.language/mediawiki.language.init.js delete mode 100644 resources/mediawiki.language/mediawiki.language.js delete mode 100644 resources/mediawiki.language/mediawiki.language.months.js delete mode 100644 resources/mediawiki.language/mediawiki.language.numbers.js delete mode 100644 resources/mediawiki.less/mediawiki.mixins.less delete mode 100644 resources/mediawiki.libs/CLDRPluralRuleParser.js delete mode 100644 resources/mediawiki.libs/mediawiki.libs.jpegmeta.js delete mode 100644 resources/mediawiki.page/mediawiki.page.gallery.js delete mode 100644 resources/mediawiki.page/mediawiki.page.image.pagination.js delete mode 100644 resources/mediawiki.page/mediawiki.page.patrol.ajax.js delete mode 100644 resources/mediawiki.page/mediawiki.page.ready.js delete mode 100644 resources/mediawiki.page/mediawiki.page.startup.js delete mode 100644 resources/mediawiki.page/mediawiki.page.watch.ajax.js delete mode 100644 resources/mediawiki.special/images/glyph-people-large.png delete mode 100644 resources/mediawiki.special/images/icon-contributors.png delete mode 100644 resources/mediawiki.special/images/icon-edits.png delete mode 100644 resources/mediawiki.special/images/icon-lock.png delete mode 100644 resources/mediawiki.special/images/icon-pages.png delete mode 100644 resources/mediawiki.special/mediawiki.special.block.js delete mode 100644 resources/mediawiki.special/mediawiki.special.changeemail.css delete mode 100644 resources/mediawiki.special/mediawiki.special.changeemail.js delete mode 100644 resources/mediawiki.special/mediawiki.special.changeslist.css delete mode 100644 resources/mediawiki.special/mediawiki.special.changeslist.enhanced.css delete mode 100644 resources/mediawiki.special/mediawiki.special.createAccount.css delete mode 100644 resources/mediawiki.special/mediawiki.special.createAccount.js delete mode 100644 resources/mediawiki.special/mediawiki.special.css delete mode 100644 resources/mediawiki.special/mediawiki.special.javaScriptTest.js delete mode 100644 resources/mediawiki.special/mediawiki.special.js delete mode 100644 resources/mediawiki.special/mediawiki.special.movePage.js delete mode 100644 resources/mediawiki.special/mediawiki.special.pagesWithProp.css delete mode 100644 resources/mediawiki.special/mediawiki.special.preferences.css delete mode 100644 resources/mediawiki.special/mediawiki.special.preferences.js delete mode 100644 resources/mediawiki.special/mediawiki.special.recentchanges.js delete mode 100644 resources/mediawiki.special/mediawiki.special.search.css delete mode 100644 resources/mediawiki.special/mediawiki.special.search.js delete mode 100644 resources/mediawiki.special/mediawiki.special.undelete.js delete mode 100644 resources/mediawiki.special/mediawiki.special.upload.js delete mode 100644 resources/mediawiki.special/mediawiki.special.userLogin.css delete mode 100644 resources/mediawiki.special/mediawiki.special.vforms.css delete mode 100644 resources/mediawiki.ui/mediawiki.ui.default.css delete mode 100644 resources/mediawiki.ui/mediawiki.ui.vector.css delete mode 100644 resources/mediawiki.ui/sourcefiles/Makefile delete mode 100644 resources/mediawiki.ui/sourcefiles/config.rb delete mode 100644 resources/mediawiki.ui/sourcefiles/scss/components/_default.scss delete mode 100644 resources/mediawiki.ui/sourcefiles/scss/components/_utilities.scss delete mode 100644 resources/mediawiki.ui/sourcefiles/scss/components/_vector.scss delete mode 100644 resources/mediawiki.ui/sourcefiles/scss/components/default/_buttons.scss delete mode 100644 resources/mediawiki.ui/sourcefiles/scss/components/default/_forms.scss delete mode 100644 resources/mediawiki.ui/sourcefiles/scss/components/vector/_buttons.scss delete mode 100644 resources/mediawiki.ui/sourcefiles/scss/components/vector/_containers.scss delete mode 100644 resources/mediawiki.ui/sourcefiles/scss/components/vector/_forms.scss delete mode 100644 resources/mediawiki.ui/sourcefiles/scss/mediawiki.ui.default.scss delete mode 100644 resources/mediawiki.ui/sourcefiles/scss/mediawiki.ui.vector.scss delete mode 100644 resources/mediawiki.ui/sourcefiles/scss/mixins/_all.scss delete mode 100644 resources/mediawiki.ui/sourcefiles/scss/mixins/_effects.scss delete mode 100644 resources/mediawiki.ui/sourcefiles/scss/mixins/_forms.scss delete mode 100644 resources/mediawiki.ui/sourcefiles/scss/mixins/_type.scss delete mode 100644 resources/mediawiki.ui/sourcefiles/scss/mixins/_utilities.scss delete mode 100644 resources/mediawiki.ui/sourcefiles/scss/settings/_all.scss delete mode 100644 resources/mediawiki.ui/sourcefiles/scss/settings/_colors.scss delete mode 100644 resources/mediawiki.ui/sourcefiles/scss/settings/_typography.scss delete mode 100644 resources/mediawiki/images/arrow-collapsed-ltr.png delete mode 100644 resources/mediawiki/images/arrow-collapsed-rtl.png delete mode 100644 resources/mediawiki/images/arrow-expanded.png delete mode 100644 resources/mediawiki/mediawiki.Title.js delete mode 100644 resources/mediawiki/mediawiki.Uri.js delete mode 100644 resources/mediawiki/mediawiki.debug.css delete mode 100644 resources/mediawiki/mediawiki.debug.init.js delete mode 100644 resources/mediawiki/mediawiki.debug.js delete mode 100644 resources/mediawiki/mediawiki.feedback.css delete mode 100644 resources/mediawiki/mediawiki.feedback.js delete mode 100644 resources/mediawiki/mediawiki.feedback.spinner.gif delete mode 100644 resources/mediawiki/mediawiki.hidpi.js delete mode 100644 resources/mediawiki/mediawiki.htmlform.js delete mode 100644 resources/mediawiki/mediawiki.icon.css delete mode 100644 resources/mediawiki/mediawiki.inspect.js delete mode 100644 resources/mediawiki/mediawiki.jqueryMsg.js delete mode 100644 resources/mediawiki/mediawiki.jqueryMsg.peg delete mode 100644 resources/mediawiki/mediawiki.js delete mode 100644 resources/mediawiki/mediawiki.log.js delete mode 100644 resources/mediawiki/mediawiki.notification.css delete mode 100644 resources/mediawiki/mediawiki.notification.js delete mode 100644 resources/mediawiki/mediawiki.notify.js delete mode 100644 resources/mediawiki/mediawiki.searchSuggest.css delete mode 100644 resources/mediawiki/mediawiki.searchSuggest.js delete mode 100644 resources/mediawiki/mediawiki.user.js delete mode 100644 resources/mediawiki/mediawiki.util.js create mode 100644 resources/src/es5-skip.js create mode 100644 resources/src/jquery.json-deprecate.js create mode 100644 resources/src/jquery.tipsy/images/tipsy.png create mode 100644 resources/src/jquery.tipsy/jquery.tipsy.css create mode 100644 resources/src/jquery.tipsy/jquery.tipsy.js create mode 100644 resources/src/jquery/images/jquery.arrowSteps.divider-ltr.png create mode 100644 resources/src/jquery/images/jquery.arrowSteps.divider-rtl.png create mode 100644 resources/src/jquery/images/jquery.arrowSteps.head-ltr.png create mode 100644 resources/src/jquery/images/jquery.arrowSteps.head-rtl.png create mode 100644 resources/src/jquery/images/jquery.arrowSteps.tail-ltr.png create mode 100644 resources/src/jquery/images/jquery.arrowSteps.tail-rtl.png create mode 100644 resources/src/jquery/images/marker.png create mode 100644 resources/src/jquery/images/mask.png create mode 100644 resources/src/jquery/images/sort_both.gif create mode 100644 resources/src/jquery/images/sort_down.gif create mode 100644 resources/src/jquery/images/sort_none.gif create mode 100644 resources/src/jquery/images/sort_up.gif create mode 100644 resources/src/jquery/images/spinner-large.gif create mode 100644 resources/src/jquery/images/spinner.gif create mode 100644 resources/src/jquery/images/wheel.png create mode 100644 resources/src/jquery/jquery.accessKeyLabel.js create mode 100644 resources/src/jquery/jquery.arrowSteps.css create mode 100644 resources/src/jquery/jquery.arrowSteps.js create mode 100644 resources/src/jquery/jquery.autoEllipsis.js create mode 100644 resources/src/jquery/jquery.badge.css create mode 100644 resources/src/jquery/jquery.badge.js create mode 100644 resources/src/jquery/jquery.byteLength.js create mode 100644 resources/src/jquery/jquery.byteLimit.js create mode 100644 resources/src/jquery/jquery.checkboxShiftClick.js create mode 100644 resources/src/jquery/jquery.client.js create mode 100644 resources/src/jquery/jquery.color.js create mode 100644 resources/src/jquery/jquery.colorUtil.js create mode 100644 resources/src/jquery/jquery.confirmable.css create mode 100644 resources/src/jquery/jquery.confirmable.js create mode 100644 resources/src/jquery/jquery.confirmable.mediawiki.js create mode 100644 resources/src/jquery/jquery.expandableField.js create mode 100644 resources/src/jquery/jquery.farbtastic.css create mode 100644 resources/src/jquery/jquery.farbtastic.js create mode 100644 resources/src/jquery/jquery.footHovzer.css create mode 100644 resources/src/jquery/jquery.footHovzer.js create mode 100644 resources/src/jquery/jquery.getAttrs.js create mode 100644 resources/src/jquery/jquery.hidpi.js create mode 100644 resources/src/jquery/jquery.highlightText.js create mode 100644 resources/src/jquery/jquery.localize.js create mode 100644 resources/src/jquery/jquery.makeCollapsible.css create mode 100644 resources/src/jquery/jquery.makeCollapsible.js create mode 100644 resources/src/jquery/jquery.mw-jump.js create mode 100644 resources/src/jquery/jquery.mwExtension.js create mode 100644 resources/src/jquery/jquery.placeholder.js create mode 100644 resources/src/jquery/jquery.qunit.completenessTest.js create mode 100644 resources/src/jquery/jquery.spinner.css create mode 100644 resources/src/jquery/jquery.spinner.js create mode 100644 resources/src/jquery/jquery.suggestions.css create mode 100644 resources/src/jquery/jquery.suggestions.js create mode 100644 resources/src/jquery/jquery.tabIndex.js create mode 100644 resources/src/jquery/jquery.tablesorter.css create mode 100644 resources/src/jquery/jquery.tablesorter.js create mode 100644 resources/src/jquery/jquery.textSelection.js create mode 100644 resources/src/json-skip.js create mode 100644 resources/src/mediawiki.action/images/green-checkmark.png create mode 100644 resources/src/mediawiki.action/images/nextredirect-ltr.png create mode 100644 resources/src/mediawiki.action/images/nextredirect-rtl.png create mode 100644 resources/src/mediawiki.action/images/redirect-ltr.png create mode 100644 resources/src/mediawiki.action/images/redirect-rtl.png create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.collapsibleFooter.css create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.collapsibleFooter.js create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.css create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.editWarning.js create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.js create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.preview.js create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.styles.css create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.toolbar/images/ar/button_bold.png create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.toolbar/images/ar/button_headline.png create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.toolbar/images/ar/button_italic.png create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.toolbar/images/ar/button_link.png create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.toolbar/images/ar/button_nowiki.png create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.toolbar/images/be-tarask/button_bold.png create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.toolbar/images/be-tarask/button_italic.png create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.toolbar/images/be-tarask/button_link.png create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.toolbar/images/de/button_bold.png create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.toolbar/images/de/button_italic.png create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.toolbar/images/en/button_bold.png create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.toolbar/images/en/button_extlink.png create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.toolbar/images/en/button_headline.png create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.toolbar/images/en/button_hr.png create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.toolbar/images/en/button_image.png create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.toolbar/images/en/button_italic.png create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.toolbar/images/en/button_link.png create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.toolbar/images/en/button_media.png create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.toolbar/images/en/button_nowiki.png create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.toolbar/images/en/button_sig.png create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.toolbar/images/fa/button_bold.png create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.toolbar/images/fa/button_headline.png create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.toolbar/images/fa/button_italic.png create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.toolbar/images/fa/button_link.png create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.toolbar/images/fa/button_nowiki.png create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.toolbar/images/ksh/LICENSE create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.toolbar/images/ksh/button_italic.png create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.toolbar/images/ru/LICENSE create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.toolbar/images/ru/button_bold.png create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.toolbar/images/ru/button_italic.png create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.toolbar/images/ru/button_link.png create mode 100644 resources/src/mediawiki.action/mediawiki.action.edit.toolbar/mediawiki.action.edit.toolbar.less create mode 100644 resources/src/mediawiki.action/mediawiki.action.history.css create mode 100644 resources/src/mediawiki.action/mediawiki.action.history.diff.css create mode 100644 resources/src/mediawiki.action/mediawiki.action.history.js create mode 100644 resources/src/mediawiki.action/mediawiki.action.view.dblClickEdit.js create mode 100644 resources/src/mediawiki.action/mediawiki.action.view.metadata.css create mode 100644 resources/src/mediawiki.action/mediawiki.action.view.metadata.js create mode 100644 resources/src/mediawiki.action/mediawiki.action.view.postEdit.css create mode 100644 resources/src/mediawiki.action/mediawiki.action.view.postEdit.js create mode 100644 resources/src/mediawiki.action/mediawiki.action.view.redirect.js create mode 100644 resources/src/mediawiki.action/mediawiki.action.view.redirectPage.css create mode 100644 resources/src/mediawiki.action/mediawiki.action.view.rightClickEdit.js create mode 100644 resources/src/mediawiki.api/mediawiki.api.category.js create mode 100644 resources/src/mediawiki.api/mediawiki.api.edit.js create mode 100644 resources/src/mediawiki.api/mediawiki.api.js create mode 100644 resources/src/mediawiki.api/mediawiki.api.login.js create mode 100644 resources/src/mediawiki.api/mediawiki.api.parse.js create mode 100644 resources/src/mediawiki.api/mediawiki.api.watch.js create mode 100644 resources/src/mediawiki.hidpi-skip.js create mode 100644 resources/src/mediawiki.language/languages/bs.js create mode 100644 resources/src/mediawiki.language/languages/dsb.js create mode 100644 resources/src/mediawiki.language/languages/fi.js create mode 100644 resources/src/mediawiki.language/languages/ga.js create mode 100644 resources/src/mediawiki.language/languages/he.js create mode 100644 resources/src/mediawiki.language/languages/hsb.js create mode 100644 resources/src/mediawiki.language/languages/hu.js create mode 100644 resources/src/mediawiki.language/languages/hy.js create mode 100644 resources/src/mediawiki.language/languages/la.js create mode 100644 resources/src/mediawiki.language/languages/os.js create mode 100644 resources/src/mediawiki.language/languages/ru.js create mode 100644 resources/src/mediawiki.language/languages/sl.js create mode 100644 resources/src/mediawiki.language/languages/uk.js create mode 100644 resources/src/mediawiki.language/mediawiki.cldr.js create mode 100644 resources/src/mediawiki.language/mediawiki.language.fallback.js create mode 100644 resources/src/mediawiki.language/mediawiki.language.init.js create mode 100644 resources/src/mediawiki.language/mediawiki.language.js create mode 100644 resources/src/mediawiki.language/mediawiki.language.months.js create mode 100644 resources/src/mediawiki.language/mediawiki.language.numbers.js create mode 100644 resources/src/mediawiki.legacy/ajax.js create mode 100644 resources/src/mediawiki.legacy/commonPrint.css create mode 100644 resources/src/mediawiki.legacy/images/ajax-loader.gif create mode 100644 resources/src/mediawiki.legacy/images/checker.png create mode 100644 resources/src/mediawiki.legacy/images/feed-icon.png create mode 100644 resources/src/mediawiki.legacy/images/feed-icon.svg create mode 100644 resources/src/mediawiki.legacy/images/help-question-hover.gif create mode 100644 resources/src/mediawiki.legacy/images/help-question.gif create mode 100644 resources/src/mediawiki.legacy/images/question.png create mode 100644 resources/src/mediawiki.legacy/images/question.svg create mode 100644 resources/src/mediawiki.legacy/images/spinner.gif create mode 100644 resources/src/mediawiki.legacy/oldshared.css create mode 100644 resources/src/mediawiki.legacy/protect.js create mode 100644 resources/src/mediawiki.legacy/shared.css create mode 100644 resources/src/mediawiki.legacy/wikibits.js create mode 100644 resources/src/mediawiki.less/mediawiki.mixins.animation.less create mode 100644 resources/src/mediawiki.less/mediawiki.mixins.less create mode 100644 resources/src/mediawiki.less/mediawiki.mixins.rotation.less create mode 100644 resources/src/mediawiki.less/mediawiki.ui/mixins.less create mode 100644 resources/src/mediawiki.less/mediawiki.ui/variables.less create mode 100644 resources/src/mediawiki.libs/CLDRPluralRuleParser.js create mode 100644 resources/src/mediawiki.libs/mediawiki.libs.jpegmeta.js create mode 100644 resources/src/mediawiki.page/mediawiki.page.gallery.js create mode 100644 resources/src/mediawiki.page/mediawiki.page.image.pagination.js create mode 100644 resources/src/mediawiki.page/mediawiki.page.patrol.ajax.js create mode 100644 resources/src/mediawiki.page/mediawiki.page.ready.js create mode 100644 resources/src/mediawiki.page/mediawiki.page.startup.js create mode 100644 resources/src/mediawiki.page/mediawiki.page.watch.ajax.js create mode 100644 resources/src/mediawiki.skinning/content.css create mode 100644 resources/src/mediawiki.skinning/content.externallinks.css create mode 100644 resources/src/mediawiki.skinning/content.parsoid.less create mode 100644 resources/src/mediawiki.skinning/elements.css create mode 100644 resources/src/mediawiki.skinning/images/audio-ltr.png create mode 100644 resources/src/mediawiki.skinning/images/audio-ltr.svg create mode 100644 resources/src/mediawiki.skinning/images/audio-rtl.png create mode 100644 resources/src/mediawiki.skinning/images/audio-rtl.svg create mode 100644 resources/src/mediawiki.skinning/images/chat-ltr.png create mode 100644 resources/src/mediawiki.skinning/images/chat-ltr.svg create mode 100644 resources/src/mediawiki.skinning/images/chat-rtl.png create mode 100644 resources/src/mediawiki.skinning/images/chat-rtl.svg create mode 100644 resources/src/mediawiki.skinning/images/document-ltr.png create mode 100644 resources/src/mediawiki.skinning/images/document-ltr.svg create mode 100644 resources/src/mediawiki.skinning/images/document-rtl.png create mode 100644 resources/src/mediawiki.skinning/images/document-rtl.svg create mode 100644 resources/src/mediawiki.skinning/images/external link icons.svg create mode 100644 resources/src/mediawiki.skinning/images/external-ltr.png create mode 100644 resources/src/mediawiki.skinning/images/external-ltr.svg create mode 100644 resources/src/mediawiki.skinning/images/external-rtl.png create mode 100644 resources/src/mediawiki.skinning/images/external-rtl.svg create mode 100644 resources/src/mediawiki.skinning/images/ftp-ltr.png create mode 100644 resources/src/mediawiki.skinning/images/ftp-ltr.svg create mode 100644 resources/src/mediawiki.skinning/images/ftp-rtl.png create mode 100644 resources/src/mediawiki.skinning/images/ftp-rtl.svg create mode 100644 resources/src/mediawiki.skinning/images/magnify-clip-ltr.png create mode 100644 resources/src/mediawiki.skinning/images/magnify-clip-rtl.png create mode 100644 resources/src/mediawiki.skinning/images/mail.png create mode 100644 resources/src/mediawiki.skinning/images/mail.svg create mode 100644 resources/src/mediawiki.skinning/images/video.png create mode 100644 resources/src/mediawiki.skinning/images/video.svg create mode 100644 resources/src/mediawiki.skinning/interface.css create mode 100644 resources/src/mediawiki.special/images/glyph-people-large.png create mode 100644 resources/src/mediawiki.special/images/icon-contributors.png create mode 100644 resources/src/mediawiki.special/images/icon-edits.png create mode 100644 resources/src/mediawiki.special/images/icon-lock.png create mode 100644 resources/src/mediawiki.special/images/icon-pages.png create mode 100644 resources/src/mediawiki.special/mediawiki.special.block.css create mode 100644 resources/src/mediawiki.special/mediawiki.special.block.js create mode 100644 resources/src/mediawiki.special/mediawiki.special.changeemail.css create mode 100644 resources/src/mediawiki.special/mediawiki.special.changeemail.js create mode 100644 resources/src/mediawiki.special/mediawiki.special.changeslist.css create mode 100644 resources/src/mediawiki.special/mediawiki.special.changeslist.enhanced.css create mode 100644 resources/src/mediawiki.special/mediawiki.special.changeslist.legend.css create mode 100644 resources/src/mediawiki.special/mediawiki.special.changeslist.legend.js create mode 100644 resources/src/mediawiki.special/mediawiki.special.css create mode 100644 resources/src/mediawiki.special/mediawiki.special.import.js create mode 100644 resources/src/mediawiki.special/mediawiki.special.javaScriptTest.js create mode 100644 resources/src/mediawiki.special/mediawiki.special.js create mode 100644 resources/src/mediawiki.special/mediawiki.special.movePage.js create mode 100644 resources/src/mediawiki.special/mediawiki.special.pageLanguage.js create mode 100644 resources/src/mediawiki.special/mediawiki.special.pagesWithProp.css create mode 100644 resources/src/mediawiki.special/mediawiki.special.preferences.css create mode 100644 resources/src/mediawiki.special/mediawiki.special.preferences.js create mode 100644 resources/src/mediawiki.special/mediawiki.special.recentchanges.js create mode 100644 resources/src/mediawiki.special/mediawiki.special.search.css create mode 100644 resources/src/mediawiki.special/mediawiki.special.search.js create mode 100644 resources/src/mediawiki.special/mediawiki.special.undelete.js create mode 100644 resources/src/mediawiki.special/mediawiki.special.unwatchedPages.css create mode 100644 resources/src/mediawiki.special/mediawiki.special.unwatchedPages.js create mode 100644 resources/src/mediawiki.special/mediawiki.special.upload.js create mode 100644 resources/src/mediawiki.special/mediawiki.special.userlogin.common.css create mode 100644 resources/src/mediawiki.special/mediawiki.special.userlogin.common.js create mode 100644 resources/src/mediawiki.special/mediawiki.special.userlogin.login.css create mode 100644 resources/src/mediawiki.special/mediawiki.special.userlogin.signup.css create mode 100644 resources/src/mediawiki.special/mediawiki.special.userlogin.signup.js create mode 100644 resources/src/mediawiki.special/mediawiki.special.version.css create mode 100644 resources/src/mediawiki.ui/components/anchors.less create mode 100644 resources/src/mediawiki.ui/components/buttons.less create mode 100644 resources/src/mediawiki.ui/components/checkbox.less create mode 100644 resources/src/mediawiki.ui/components/forms.less create mode 100644 resources/src/mediawiki.ui/components/images/checked.png create mode 100644 resources/src/mediawiki.ui/components/images/checked.svg create mode 100644 resources/src/mediawiki.ui/components/inputs.less create mode 100644 resources/src/mediawiki.ui/components/utilities.less create mode 100644 resources/src/mediawiki.ui/default.less create mode 100644 resources/src/mediawiki.ui/styleguide.md create mode 100644 resources/src/mediawiki/images/arrow-collapsed-ltr.png create mode 100644 resources/src/mediawiki/images/arrow-collapsed-ltr.svg create mode 100644 resources/src/mediawiki/images/arrow-collapsed-rtl.png create mode 100644 resources/src/mediawiki/images/arrow-collapsed-rtl.svg create mode 100644 resources/src/mediawiki/images/arrow-expanded.png create mode 100644 resources/src/mediawiki/images/arrow-expanded.svg create mode 100644 resources/src/mediawiki/images/arrow-sort-ascending.png create mode 100644 resources/src/mediawiki/images/arrow-sort-ascending.svg create mode 100644 resources/src/mediawiki/images/arrow-sort-descending.png create mode 100644 resources/src/mediawiki/images/arrow-sort-descending.svg create mode 100644 resources/src/mediawiki/images/pager-arrow-disabled-fastforward-ltr.png create mode 100644 resources/src/mediawiki/images/pager-arrow-disabled-fastforward-rtl.png create mode 100644 resources/src/mediawiki/images/pager-arrow-disabled-forward-ltr.png create mode 100644 resources/src/mediawiki/images/pager-arrow-disabled-forward-rtl.png create mode 100644 resources/src/mediawiki/images/pager-arrow-fastforward-ltr.png create mode 100644 resources/src/mediawiki/images/pager-arrow-fastforward-rtl.png create mode 100644 resources/src/mediawiki/images/pager-arrow-forward-ltr.png create mode 100644 resources/src/mediawiki/images/pager-arrow-forward-rtl.png create mode 100644 resources/src/mediawiki/mediawiki.Title.js create mode 100644 resources/src/mediawiki/mediawiki.Uri.js create mode 100644 resources/src/mediawiki/mediawiki.content.json.css create mode 100644 resources/src/mediawiki/mediawiki.cookie.js create mode 100644 resources/src/mediawiki/mediawiki.debug.init.js create mode 100644 resources/src/mediawiki/mediawiki.debug.js create mode 100644 resources/src/mediawiki/mediawiki.debug.less create mode 100644 resources/src/mediawiki/mediawiki.debug.profile.css create mode 100644 resources/src/mediawiki/mediawiki.debug.profile.js create mode 100644 resources/src/mediawiki/mediawiki.feedback.css create mode 100644 resources/src/mediawiki/mediawiki.feedback.js create mode 100644 resources/src/mediawiki/mediawiki.feedback.spinner.gif create mode 100644 resources/src/mediawiki/mediawiki.hidpi.js create mode 100644 resources/src/mediawiki/mediawiki.hlist.css create mode 100644 resources/src/mediawiki/mediawiki.hlist.js create mode 100644 resources/src/mediawiki/mediawiki.htmlform.js create mode 100644 resources/src/mediawiki/mediawiki.icon.less create mode 100644 resources/src/mediawiki/mediawiki.inspect.js create mode 100644 resources/src/mediawiki/mediawiki.jqueryMsg.js create mode 100644 resources/src/mediawiki/mediawiki.jqueryMsg.peg create mode 100644 resources/src/mediawiki/mediawiki.js create mode 100644 resources/src/mediawiki/mediawiki.log.js create mode 100644 resources/src/mediawiki/mediawiki.notification.css create mode 100644 resources/src/mediawiki/mediawiki.notification.hideForPrint.css create mode 100644 resources/src/mediawiki/mediawiki.notification.js create mode 100644 resources/src/mediawiki/mediawiki.notify.js create mode 100644 resources/src/mediawiki/mediawiki.pager.tablePager.less create mode 100644 resources/src/mediawiki/mediawiki.searchSuggest.css create mode 100644 resources/src/mediawiki/mediawiki.searchSuggest.js create mode 100644 resources/src/mediawiki/mediawiki.toc.js create mode 100644 resources/src/mediawiki/mediawiki.user.js create mode 100644 resources/src/mediawiki/mediawiki.util.js create mode 100644 resources/src/polyfill-object-create.js create mode 100644 resources/src/startup.js delete mode 100644 resources/startup.js (limited to 'resources') diff --git a/resources/Resources.php b/resources/Resources.php index 3b06e1be..70f64dd3 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -50,256 +50,262 @@ return array( // Scripts for the dynamic language specific data, like grammar forms. 'mediawiki.language.data' => array( 'class' => 'ResourceLoaderLanguageDataModule' ), + /* MediaWiki base skinning modules */ + /** - * Skins - * Be careful not to add 'scripts' to these modules, - * since they are loaded with OutputPage::addModuleStyles so that the skin styles - * apply without javascript. - * If a skin needs custom js in the interface, register a separate module - * and add it to the load queue with OutputPage::addModules. + * Common skin styles, grouped into three graded levels. + * + * Level 1 "elements": + * The base level that only contains the most basic of common skin styles. + * Only styles for single elements are included, no styling for complex structures like the + * TOC is present. This level is for skins that want to implement the entire style of even + * content area structures like the TOC themselves. + * + * Level 2 "content": + * The most commonly used level for skins implemented from scratch. This level includes all + * the single element styles from "elements" as well as styles for complex structures such + * as the TOC that are output in the content area by MediaWiki rather than the skin. + * Essentially this is the common level that lets skins leave the style of the content area + * as it is normally styled, while leaving the rest of the skin up to the skin + * implementation. + * + * Level 3 "interface": + * The highest level, this stylesheet contains extra common styles for classes like + * .firstHeading, #contentSub, et cetera which are not outputted by MediaWiki but are common + * to skins like MonoBook, Vector, etc... Essentially this level is for styles that are + * common to MonoBook clones. And since practically every skin that currently exists within + * core is a MonoBook clone, all our core skins currently use this level. * - * See Vector for an example. + * These modules are typically loaded by addModuleStyles(), which has absolutely no concept of + * dependency management. As a result they contain duplicate stylesheet references instead of + * setting 'dependencies' to the lower level the module is based on. For this reason avoid + * including more than one of them into your skin as this will result in duplicate CSS. */ - 'skins.cologneblue' => array( - 'styles' => array( - 'cologneblue/screen.css' => array( 'media' => 'screen' ), - 'cologneblue/print.css' => array( 'media' => 'print' ), - ), - 'remoteBasePath' => $GLOBALS['wgStylePath'], - 'localBasePath' => $GLOBALS['wgStyleDirectory'], - ), - 'skins.modern' => array( + 'mediawiki.skinning.elements' => array( 'styles' => array( - 'modern/main.css' => array( 'media' => 'screen' ), - 'modern/print.css' => array( 'media' => 'print' ), + 'resources/src/mediawiki.skinning/elements.css' => array( 'media' => 'screen' ), ), - 'remoteBasePath' => $GLOBALS['wgStylePath'], - 'localBasePath' => $GLOBALS['wgStyleDirectory'], ), - 'skins.monobook' => array( + 'mediawiki.skinning.content' => array( 'styles' => array( - 'common/commonElements.css' => array( 'media' => 'screen' ), - 'common/commonContent.css' => array( 'media' => 'screen' ), - 'common/commonInterface.css' => array( 'media' => 'screen' ), - 'monobook/main.css' => array( 'media' => 'screen' ), + 'resources/src/mediawiki.skinning/elements.css' => array( 'media' => 'screen' ), + 'resources/src/mediawiki.skinning/content.css' => array( 'media' => 'screen' ), ), - 'remoteBasePath' => $GLOBALS['wgStylePath'], - 'localBasePath' => $GLOBALS['wgStyleDirectory'], ), - 'skins.archlinux' => array( - 'styles' => array( - 'common/commonElements.css' => array( 'media' => 'screen' ), - 'common/commonContent.css' => array( 'media' => 'screen' ), - 'common/commonInterface.css' => array( 'media' => 'screen' ), - 'archlinux/main.css' => array( 'media' => 'screen' ), - 'archlinux/archnavbar.css' => array( 'media' => 'screen' ), - 'archlinux/arch.css' => array( 'media' => 'screen' ), - 'archlinux/print.css' => array( 'media' => 'print' ), - ), - 'remoteBasePath' => $GLOBALS['wgStylePath'], - 'localBasePath' => $GLOBALS['wgStyleDirectory'], - ), - 'skins.vector' => array( + 'mediawiki.skinning.interface' => array( // Used in the web installer. Test it after modifying this definition! 'styles' => array( - 'common/commonElements.css' => array( 'media' => 'screen' ), - 'common/commonContent.css' => array( 'media' => 'screen' ), - 'common/commonInterface.css' => array( 'media' => 'screen' ), - 'vector/styles.less', + 'resources/src/mediawiki.skinning/elements.css' => array( 'media' => 'screen' ), + 'resources/src/mediawiki.skinning/content.css' => array( 'media' => 'screen' ), + 'resources/src/mediawiki.skinning/interface.css' => array( 'media' => 'screen' ), ), - 'remoteBasePath' => $GLOBALS['wgStylePath'], - 'localBasePath' => $GLOBALS['wgStyleDirectory'], ), - 'skins.vector.beta' => array( - // Keep in sync with skins.vector - 'styles' => array( - 'common/commonElements.css' => array( 'media' => 'screen' ), - 'common/commonContent.css' => array( 'media' => 'screen' ), - 'common/commonInterface.css' => array( 'media' => 'screen' ), - 'vector/styles-beta.less', + + 'mediawiki.skinning.content.parsoid' => array( + // Style Parsoid HTML+RDFa output consistent with wikitext from PHP parser + // with the interface.css styles; skinStyles should be used if your + // skin over-rides common content styling. + 'skinStyles' => array( + 'default' => 'resources/src/mediawiki.skinning/content.parsoid.less', ), - 'remoteBasePath' => $GLOBALS['wgStylePath'], - 'localBasePath' => $GLOBALS['wgStyleDirectory'], + 'targets' => array( 'desktop', 'mobile' ), ), - 'skins.vector.js' => array( - 'scripts' => array( - 'vector/collapsibleTabs.js', - 'vector/vector.js', + + 'mediawiki.skinning.content.externallinks' => array( + 'styles' => array( + 'resources/src/mediawiki.skinning/content.externallinks.css' => array( 'media' => 'screen' ), ), - 'position' => 'top', - 'dependencies' => 'jquery.delayedBind', - 'remoteBasePath' => $GLOBALS['wgStylePath'], - 'localBasePath' => $GLOBALS['wgStyleDirectory'], - ), - 'skins.vector.collapsibleNav' => array( - 'scripts' => array( - 'vector/collapsibleNav.js', - ), - 'messages' => array( - 'vector-collapsiblenav-more', - ), - 'dependencies' => array( - 'jquery.client', - 'jquery.cookie', - 'jquery.tabIndex', - ), - 'remoteBasePath' => $GLOBALS['wgStylePath'], - 'localBasePath' => $GLOBALS['wgStyleDirectory'], - 'position' => 'bottom', ), /* jQuery */ 'jquery' => array( - 'scripts' => 'resources/jquery/jquery.js', - 'debugRaw' => false, + 'scripts' => ( $GLOBALS['wgIncludejQueryMigrate'] ? + array( + 'resources/lib/jquery/jquery.js', + 'resources/lib/jquery/jquery.migrate.js' + ) : + array( + 'resources/lib/jquery/jquery.js' + ) ), + 'raw' => true, 'targets' => array( 'desktop', 'mobile' ), ), /* jQuery Plugins */ + 'jquery.accessKeyLabel' => array( + 'scripts' => 'resources/src/jquery/jquery.accessKeyLabel.js', + 'dependencies' => array( + 'jquery.client', + 'jquery.mwExtension', + ), + 'messages' => array( 'brackets', 'word-separator' ), + 'targets' => array( 'mobile', 'desktop' ), + ), 'jquery.appear' => array( - 'scripts' => 'resources/jquery/jquery.appear.js', + 'scripts' => 'resources/lib/jquery/jquery.appear.js', ), 'jquery.arrowSteps' => array( - 'scripts' => 'resources/jquery/jquery.arrowSteps.js', - 'styles' => 'resources/jquery/jquery.arrowSteps.css', + 'scripts' => 'resources/src/jquery/jquery.arrowSteps.js', + 'styles' => 'resources/src/jquery/jquery.arrowSteps.css', ), 'jquery.async' => array( - 'scripts' => 'resources/jquery/jquery.async.js', + 'scripts' => 'resources/lib/jquery/jquery.async.js', ), 'jquery.autoEllipsis' => array( - 'scripts' => 'resources/jquery/jquery.autoEllipsis.js', + 'scripts' => 'resources/src/jquery/jquery.autoEllipsis.js', 'dependencies' => 'jquery.highlightText', + 'targets' => array( 'desktop', 'mobile' ), ), 'jquery.badge' => array( - 'scripts' => 'resources/jquery/jquery.badge.js', - 'styles' => 'resources/jquery/jquery.badge.css', + 'scripts' => 'resources/src/jquery/jquery.badge.js', + 'styles' => 'resources/src/jquery/jquery.badge.css', 'dependencies' => 'mediawiki.language', ), 'jquery.byteLength' => array( - 'scripts' => 'resources/jquery/jquery.byteLength.js', + 'scripts' => 'resources/src/jquery/jquery.byteLength.js', 'targets' => array( 'desktop', 'mobile' ), ), 'jquery.byteLimit' => array( - 'scripts' => 'resources/jquery/jquery.byteLimit.js', + 'scripts' => 'resources/src/jquery/jquery.byteLimit.js', 'dependencies' => 'jquery.byteLength', + 'targets' => array( 'desktop', 'mobile' ), ), 'jquery.checkboxShiftClick' => array( - 'scripts' => 'resources/jquery/jquery.checkboxShiftClick.js', + 'scripts' => 'resources/src/jquery/jquery.checkboxShiftClick.js', 'targets' => array( 'desktop', 'mobile' ), ), 'jquery.chosen' => array( - 'scripts' => 'resources/jquery.chosen/chosen.jquery.js', - 'styles' => 'resources/jquery.chosen/chosen.css', + 'scripts' => 'resources/lib/jquery.chosen/chosen.jquery.js', + 'styles' => 'resources/lib/jquery.chosen/chosen.css', ), 'jquery.client' => array( - 'scripts' => 'resources/jquery/jquery.client.js', + 'scripts' => 'resources/src/jquery/jquery.client.js', 'targets' => array( 'desktop', 'mobile' ), ), 'jquery.color' => array( - 'scripts' => 'resources/jquery/jquery.color.js', + 'scripts' => 'resources/src/jquery/jquery.color.js', 'dependencies' => 'jquery.colorUtil', ), 'jquery.colorUtil' => array( - 'scripts' => 'resources/jquery/jquery.colorUtil.js', + 'scripts' => 'resources/src/jquery/jquery.colorUtil.js', + ), + 'jquery.confirmable' => array( + 'scripts' => array( + 'resources/src/jquery/jquery.confirmable.js', + 'resources/src/jquery/jquery.confirmable.mediawiki.js', + ), + 'messages' => array( + 'confirmable-confirm', + 'confirmable-yes', + 'confirmable-no', + 'word-separator', + ), + 'styles' => 'resources/src/jquery/jquery.confirmable.css', + 'dependencies' => 'mediawiki.jqueryMsg', ), + // Use mediawiki.cookie in new code, rather than jquery.cookie. 'jquery.cookie' => array( - 'scripts' => 'resources/jquery/jquery.cookie.js', + 'scripts' => 'resources/lib/jquery/jquery.cookie.js', 'targets' => array( 'desktop', 'mobile' ), ), - 'jquery.delayedBind' => array( - 'scripts' => 'resources/jquery/jquery.delayedBind.js', - ), 'jquery.expandableField' => array( - 'scripts' => 'resources/jquery/jquery.expandableField.js', - 'dependencies' => 'jquery.delayedBind', + 'scripts' => 'resources/src/jquery/jquery.expandableField.js', ), 'jquery.farbtastic' => array( - 'scripts' => 'resources/jquery/jquery.farbtastic.js', - 'styles' => 'resources/jquery/jquery.farbtastic.css', + 'scripts' => 'resources/src/jquery/jquery.farbtastic.js', + 'styles' => 'resources/src/jquery/jquery.farbtastic.css', 'dependencies' => 'jquery.colorUtil', ), 'jquery.footHovzer' => array( - 'scripts' => 'resources/jquery/jquery.footHovzer.js', - 'styles' => 'resources/jquery/jquery.footHovzer.css', + 'scripts' => 'resources/src/jquery/jquery.footHovzer.js', + 'styles' => 'resources/src/jquery/jquery.footHovzer.css', ), 'jquery.form' => array( - 'scripts' => 'resources/jquery/jquery.form.js', + 'scripts' => 'resources/lib/jquery/jquery.form.js', + ), + 'jquery.fullscreen' => array( + 'scripts' => 'resources/lib/jquery/jquery.fullscreen.js', ), 'jquery.getAttrs' => array( - 'scripts' => 'resources/jquery/jquery.getAttrs.js', + 'scripts' => 'resources/src/jquery/jquery.getAttrs.js', 'targets' => array( 'desktop', 'mobile' ), ), 'jquery.hidpi' => array( - 'scripts' => 'resources/jquery/jquery.hidpi.js', + 'scripts' => 'resources/src/jquery/jquery.hidpi.js', 'targets' => array( 'desktop', 'mobile' ), ), 'jquery.highlightText' => array( - 'scripts' => 'resources/jquery/jquery.highlightText.js', + 'scripts' => 'resources/src/jquery/jquery.highlightText.js', 'dependencies' => 'jquery.mwExtension', + 'targets' => array( 'desktop', 'mobile' ), ), 'jquery.hoverIntent' => array( - 'scripts' => 'resources/jquery/jquery.hoverIntent.js', + 'scripts' => 'resources/lib/jquery/jquery.hoverIntent.js', ), 'jquery.json' => array( - 'scripts' => 'resources/jquery/jquery.json.js', + // @deprecated since 1.24: Use the 'json' module and global JSON object instead. + 'scripts' => array( + 'resources/lib/jquery/jquery.json.js', + 'resources/src/jquery.json-deprecate.js', + ), 'targets' => array( 'mobile', 'desktop' ), ), 'jquery.localize' => array( - 'scripts' => 'resources/jquery/jquery.localize.js', + 'scripts' => 'resources/src/jquery/jquery.localize.js', ), 'jquery.makeCollapsible' => array( - 'scripts' => 'resources/jquery/jquery.makeCollapsible.js', - 'styles' => 'resources/jquery/jquery.makeCollapsible.css', + 'scripts' => 'resources/src/jquery/jquery.makeCollapsible.js', + 'styles' => 'resources/src/jquery/jquery.makeCollapsible.css', 'messages' => array( 'collapsible-expand', 'collapsible-collapse' ), 'targets' => array( 'desktop', 'mobile' ), ), 'jquery.mockjax' => array( - 'scripts' => 'resources/jquery/jquery.mockjax.js', + 'scripts' => 'resources/lib/jquery/jquery.mockjax.js', ), 'jquery.mw-jump' => array( - 'scripts' => 'resources/jquery/jquery.mw-jump.js', + 'scripts' => 'resources/src/jquery/jquery.mw-jump.js', 'targets' => array( 'desktop', 'mobile' ), ), 'jquery.mwExtension' => array( - 'scripts' => 'resources/jquery/jquery.mwExtension.js', + 'scripts' => 'resources/src/jquery/jquery.mwExtension.js', 'targets' => array( 'desktop', 'mobile' ), ), 'jquery.placeholder' => array( - 'scripts' => 'resources/jquery/jquery.placeholder.js', + 'scripts' => 'resources/src/jquery/jquery.placeholder.js', 'targets' => array( 'desktop', 'mobile' ), ), 'jquery.qunit' => array( - 'scripts' => 'resources/jquery/jquery.qunit.js', - 'styles' => 'resources/jquery/jquery.qunit.css', + 'scripts' => 'resources/lib/jquery/jquery.qunit.js', + 'styles' => 'resources/lib/jquery/jquery.qunit.css', 'position' => 'top', 'targets' => array( 'desktop', 'mobile' ), ), 'jquery.qunit.completenessTest' => array( - 'scripts' => 'resources/jquery/jquery.qunit.completenessTest.js', + 'scripts' => 'resources/src/jquery/jquery.qunit.completenessTest.js', 'dependencies' => 'jquery.qunit', 'targets' => array( 'desktop', 'mobile' ), ), 'jquery.spinner' => array( - 'scripts' => 'resources/jquery/jquery.spinner.js', - 'styles' => 'resources/jquery/jquery.spinner.css', + 'scripts' => 'resources/src/jquery/jquery.spinner.js', + 'styles' => 'resources/src/jquery/jquery.spinner.css', ), 'jquery.jStorage' => array( - 'scripts' => 'resources/jquery/jquery.jStorage.js', - 'dependencies' => 'jquery.json', + 'scripts' => 'resources/lib/jquery/jquery.jStorage.js', + 'dependencies' => 'json', ), 'jquery.suggestions' => array( - 'scripts' => 'resources/jquery/jquery.suggestions.js', - 'styles' => 'resources/jquery/jquery.suggestions.css', - 'dependencies' => 'jquery.autoEllipsis', + 'scripts' => 'resources/src/jquery/jquery.suggestions.js', + 'styles' => 'resources/src/jquery/jquery.suggestions.css', + 'dependencies' => 'jquery.highlightText', ), 'jquery.tabIndex' => array( - 'scripts' => 'resources/jquery/jquery.tabIndex.js', + 'scripts' => 'resources/src/jquery/jquery.tabIndex.js', ), 'jquery.tablesorter' => array( - 'scripts' => 'resources/jquery/jquery.tablesorter.js', - 'styles' => 'resources/jquery/jquery.tablesorter.css', + 'scripts' => 'resources/src/jquery/jquery.tablesorter.js', + 'styles' => 'resources/src/jquery/jquery.tablesorter.css', 'messages' => array( 'sort-descending', 'sort-ascending' ), 'dependencies' => array( 'jquery.mwExtension', @@ -307,376 +313,537 @@ return array( ), ), 'jquery.textSelection' => array( - 'scripts' => 'resources/jquery/jquery.textSelection.js', + 'scripts' => 'resources/src/jquery/jquery.textSelection.js', 'dependencies' => 'jquery.client', ), + 'jquery.throttle-debounce' => array( + 'scripts' => 'resources/lib/jquery/jquery.ba-throttle-debounce.js', + ), 'jquery.validate' => array( - 'scripts' => 'resources/jquery/jquery.validate.js', + 'scripts' => 'resources/lib/jquery/jquery.validate.js', ), 'jquery.xmldom' => array( - 'scripts' => 'resources/jquery/jquery.xmldom.js', + 'scripts' => 'resources/lib/jquery/jquery.xmldom.js', ), /* jQuery Tipsy */ 'jquery.tipsy' => array( - 'scripts' => 'resources/jquery.tipsy/jquery.tipsy.js', - 'styles' => 'resources/jquery.tipsy/jquery.tipsy.css', + 'scripts' => 'resources/src/jquery.tipsy/jquery.tipsy.js', + 'styles' => 'resources/src/jquery.tipsy/jquery.tipsy.css', ), /* jQuery UI */ - // Core 'jquery.ui.core' => array( - 'scripts' => 'resources/jquery.ui/jquery.ui.core.js', + 'scripts' => 'resources/lib/jquery.ui/jquery.ui.core.js', 'skinStyles' => array( 'default' => array( - 'resources/jquery.ui/themes/default/jquery.ui.core.css', - 'resources/jquery.ui/themes/default/jquery.ui.theme.css', - ), - 'vector' => array( - 'resources/jquery.ui/themes/vector/jquery.ui.core.css', - 'resources/jquery.ui/themes/vector/jquery.ui.theme.css', + 'resources/lib/jquery.ui/themes/smoothness/jquery.ui.core.css', + 'resources/lib/jquery.ui/themes/smoothness/jquery.ui.theme.css', ), ), - 'dependencies' => 'jquery', 'group' => 'jquery.ui', ), - 'jquery.ui.widget' => array( - 'scripts' => 'resources/jquery.ui/jquery.ui.widget.js', + 'jquery.ui.accordion' => array( + 'scripts' => 'resources/lib/jquery.ui/jquery.ui.accordion.js', + 'dependencies' => array( + 'jquery.ui.core', + 'jquery.ui.widget', + ), + 'skinStyles' => array( + 'default' => 'resources/lib/jquery.ui/themes/smoothness/jquery.ui.accordion.css', + ), 'group' => 'jquery.ui', ), - 'jquery.ui.mouse' => array( - 'scripts' => 'resources/jquery.ui/jquery.ui.mouse.js', - 'dependencies' => 'jquery.ui.widget', + 'jquery.ui.autocomplete' => array( + 'scripts' => 'resources/lib/jquery.ui/jquery.ui.autocomplete.js', + 'dependencies' => array( + 'jquery.ui.core', + 'jquery.ui.widget', + 'jquery.ui.position', + 'jquery.ui.menu', + ), + 'skinStyles' => array( + 'default' => 'resources/lib/jquery.ui/themes/smoothness/jquery.ui.autocomplete.css', + ), 'group' => 'jquery.ui', ), - 'jquery.ui.position' => array( - 'scripts' => 'resources/jquery.ui/jquery.ui.position.js', + 'jquery.ui.button' => array( + 'scripts' => 'resources/lib/jquery.ui/jquery.ui.button.js', + 'dependencies' => array( + 'jquery.ui.core', + 'jquery.ui.widget', + ), + 'skinStyles' => array( + 'default' => 'resources/lib/jquery.ui/themes/smoothness/jquery.ui.button.css', + ), + 'group' => 'jquery.ui', + ), + 'jquery.ui.datepicker' => array( + 'scripts' => 'resources/lib/jquery.ui/jquery.ui.datepicker.js', + 'dependencies' => 'jquery.ui.core', + 'skinStyles' => array( + 'default' => 'resources/lib/jquery.ui/themes/smoothness/jquery.ui.datepicker.css', + ), + 'languageScripts' => array( + 'af' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-af.js', + 'ar' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-ar.js', + 'ar-dz' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-ar-DZ.js', + 'az' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-az.js', + 'bg' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-bg.js', + 'bs' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-bs.js', + 'ca' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-ca.js', + 'cs' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-cs.js', + 'da' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-da.js', + 'de' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-de.js', + 'el' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-el.js', + 'en-au' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-en-AU.js', + 'en-gb' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-en-GB.js', + 'en-nz' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-en-NZ.js', + 'eo' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-eo.js', + 'es' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-es.js', + 'et' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-et.js', + 'eu' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-eu.js', + 'fa' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-fa.js', + 'fi' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-fi.js', + 'fo' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-fo.js', + 'fr' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-fr.js', + 'fr-ch' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-fr-CH.js', + 'gl' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-gl.js', + 'he' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-he.js', + 'hi' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-hi.js', + 'hr' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-hr.js', + 'hu' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-hu.js', + 'hy' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-hy.js', + 'id' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-id.js', + 'is' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-is.js', + 'it' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-it.js', + 'ja' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-ja.js', + 'ka' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-ka.js', + 'kk' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-kk.js', + 'km' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-km.js', + 'ko' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-ko.js', + 'lb' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-lb.js', + 'lt' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-lt.js', + 'lv' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-lv.js', + 'mk' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-mk.js', + 'ml' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-ml.js', + 'ms' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-ms.js', + 'nl' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-nl.js', + 'nl-be' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-nl-BE.js', + 'no' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-no.js', + 'pl' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-pl.js', + 'pt' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-pt.js', + 'pt-br' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-pt-BR.js', + 'rm' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-rm.js', + 'ro' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-ro.js', + 'ru' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-ru.js', + 'sk' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-sk.js', + 'sl' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-sl.js', + 'sq' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-sq.js', + 'sr-sr' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-sr-SR.js', + 'sr' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-sr.js', + 'sv' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-sv.js', + 'ta' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-ta.js', + 'th' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-th.js', + 'tj' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-tj.js', + 'tr' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-tr.js', + 'uk' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-uk.js', + 'vi' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-vi.js', + 'zh-cn' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-zh-CN.js', + 'zh-hk' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-zh-HK.js', + 'zh-tw' => 'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-zh-TW.js', + ), + 'group' => 'jquery.ui', + ), + 'jquery.ui.dialog' => array( + 'scripts' => 'resources/lib/jquery.ui/jquery.ui.dialog.js', + 'dependencies' => array( + 'jquery.ui.core', + 'jquery.ui.widget', + 'jquery.ui.button', + 'jquery.ui.draggable', + 'jquery.ui.mouse', + 'jquery.ui.position', + 'jquery.ui.resizable', + ), + 'skinStyles' => array( + 'default' => 'resources/lib/jquery.ui/themes/smoothness/jquery.ui.dialog.css', + ), 'group' => 'jquery.ui', ), - // Interactions 'jquery.ui.draggable' => array( - 'scripts' => 'resources/jquery.ui/jquery.ui.draggable.js', - 'dependencies' => array( 'jquery.ui.core', 'jquery.ui.mouse', 'jquery.ui.widget' ), + 'scripts' => 'resources/lib/jquery.ui/jquery.ui.draggable.js', + 'dependencies' => array( + 'jquery.ui.core', + 'jquery.ui.mouse', + 'jquery.ui.widget', + ), 'group' => 'jquery.ui', ), 'jquery.ui.droppable' => array( - 'scripts' => 'resources/jquery.ui/jquery.ui.droppable.js', + 'scripts' => 'resources/lib/jquery.ui/jquery.ui.droppable.js', 'dependencies' => array( - 'jquery.ui.core', 'jquery.ui.mouse', 'jquery.ui.widget', 'jquery.ui.draggable', + 'jquery.ui.core', + 'jquery.ui.mouse', + 'jquery.ui.widget', + 'jquery.ui.draggable', ), 'group' => 'jquery.ui', ), - 'jquery.ui.resizable' => array( - 'scripts' => 'resources/jquery.ui/jquery.ui.resizable.js', + 'jquery.ui.menu' => array( + 'scripts' => 'resources/lib/jquery.ui/jquery.ui.menu.js', + 'dependencies' => array( + 'jquery.ui.core', + 'jquery.ui.widget', + 'jquery.ui.position', + ), 'skinStyles' => array( - 'default' => 'resources/jquery.ui/themes/default/jquery.ui.resizable.css', - 'vector' => 'resources/jquery.ui/themes/vector/jquery.ui.resizable.css', + 'default' => 'resources/lib/jquery.ui/themes/smoothness/jquery.ui.menu.css', ), - 'dependencies' => array( 'jquery.ui.core', 'jquery.ui.widget', 'jquery.ui.mouse' ), 'group' => 'jquery.ui', ), - 'jquery.ui.selectable' => array( - 'scripts' => 'resources/jquery.ui/jquery.ui.selectable.js', - 'skinStyles' => array( - 'default' => 'resources/jquery.ui/themes/default/jquery.ui.selectable.css', - 'vector' => 'resources/jquery.ui/themes/vector/jquery.ui.selectable.css', - ), - 'dependencies' => array( 'jquery.ui.core', 'jquery.ui.widget', 'jquery.ui.mouse' ), + 'jquery.ui.mouse' => array( + 'scripts' => 'resources/lib/jquery.ui/jquery.ui.mouse.js', + 'dependencies' => 'jquery.ui.widget', 'group' => 'jquery.ui', ), - 'jquery.ui.sortable' => array( - 'scripts' => 'resources/jquery.ui/jquery.ui.sortable.js', - 'dependencies' => array( 'jquery.ui.core', 'jquery.ui.widget', 'jquery.ui.mouse' ), + 'jquery.ui.position' => array( + 'scripts' => 'resources/lib/jquery.ui/jquery.ui.position.js', 'group' => 'jquery.ui', ), - // Widgets - 'jquery.ui.accordion' => array( - 'scripts' => 'resources/jquery.ui/jquery.ui.accordion.js', - 'dependencies' => array( 'jquery.ui.core', 'jquery.ui.widget' ), + 'jquery.ui.progressbar' => array( + 'scripts' => 'resources/lib/jquery.ui/jquery.ui.progressbar.js', + 'dependencies' => array( + 'jquery.ui.core', + 'jquery.ui.widget', + ), 'skinStyles' => array( - 'default' => 'resources/jquery.ui/themes/default/jquery.ui.accordion.css', - 'vector' => 'resources/jquery.ui/themes/vector/jquery.ui.accordion.css', + 'default' => 'resources/lib/jquery.ui/themes/smoothness/jquery.ui.progressbar.css', ), 'group' => 'jquery.ui', ), - 'jquery.ui.autocomplete' => array( - 'scripts' => 'resources/jquery.ui/jquery.ui.autocomplete.js', - 'dependencies' => array( 'jquery.ui.core', 'jquery.ui.widget', 'jquery.ui.position' ), + 'jquery.ui.resizable' => array( + 'scripts' => 'resources/lib/jquery.ui/jquery.ui.resizable.js', + 'dependencies' => array( + 'jquery.ui.core', + 'jquery.ui.widget', + 'jquery.ui.mouse', + ), 'skinStyles' => array( - 'default' => 'resources/jquery.ui/themes/default/jquery.ui.autocomplete.css', - 'vector' => 'resources/jquery.ui/themes/vector/jquery.ui.autocomplete.css', + 'default' => 'resources/lib/jquery.ui/themes/smoothness/jquery.ui.resizable.css', ), 'group' => 'jquery.ui', ), - 'jquery.ui.button' => array( - 'scripts' => 'resources/jquery.ui/jquery.ui.button.js', - 'dependencies' => array( 'jquery.ui.core', 'jquery.ui.widget' ), + 'jquery.ui.selectable' => array( + 'scripts' => 'resources/lib/jquery.ui/jquery.ui.selectable.js', + 'dependencies' => array( + 'jquery.ui.core', + 'jquery.ui.widget', + 'jquery.ui.mouse', + ), 'skinStyles' => array( - 'default' => 'resources/jquery.ui/themes/default/jquery.ui.button.css', - 'vector' => 'resources/jquery.ui/themes/vector/jquery.ui.button.css', + 'default' => 'resources/lib/jquery.ui/themes/smoothness/jquery.ui.selectable.css', ), 'group' => 'jquery.ui', ), - 'jquery.ui.datepicker' => array( - 'scripts' => 'resources/jquery.ui/jquery.ui.datepicker.js', - 'dependencies' => 'jquery.ui.core', + 'jquery.ui.slider' => array( + 'scripts' => 'resources/lib/jquery.ui/jquery.ui.slider.js', + 'dependencies' => array( + 'jquery.ui.core', + 'jquery.ui.widget', + 'jquery.ui.mouse', + ), 'skinStyles' => array( - 'default' => 'resources/jquery.ui/themes/default/jquery.ui.datepicker.css', - 'vector' => 'resources/jquery.ui/themes/vector/jquery.ui.datepicker.css', + 'default' => 'resources/lib/jquery.ui/themes/smoothness/jquery.ui.slider.css', ), - 'languageScripts' => array( - 'af' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-af.js', - 'ar' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-ar.js', - 'az' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-az.js', - 'bg' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-bg.js', - 'bs' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-bs.js', - 'ca' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-ca.js', - 'cs' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-cs.js', - 'da' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-da.js', - 'de' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-de.js', - 'el' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-el.js', - 'en-gb' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-en-GB.js', - 'eo' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-eo.js', - 'es' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-es.js', - 'et' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-et.js', - 'eu' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-eu.js', - 'fa' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-fa.js', - 'fi' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-fi.js', - 'fo' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-fo.js', - 'fr' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-fr.js', - 'gl' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-gl.js', - 'he' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-he.js', - 'hi' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-hi.js', - 'hr' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-hr.js', - 'hu' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-hu.js', - 'hy' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-hy.js', - 'id' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-id.js', - 'is' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-is.js', - 'it' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-it.js', - 'ja' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-ja.js', - 'ka' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-ka.js', - 'kk' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-kk.js', - 'km' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-km.js', - 'ko' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-ko.js', - 'lb' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-lb.js', - 'lt' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-lt.js', - 'lv' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-lv.js', - 'mk' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-mk.js', - 'ml' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-ml.js', - 'ms' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-ms.js', - 'nl' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-nl.js', - 'no' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-no.js', - 'pl' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-pl.js', - 'pt' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-pt.js', - 'pt-br' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-pt-BR.js', - 'rm' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-rm.js', - 'ro' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-ro.js', - 'ru' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-ru.js', - 'sk' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-sk.js', - 'sl' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-sl.js', - 'sq' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-sq.js', - 'sr-sr' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-sr-SR.js', - 'sr' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-sr.js', - 'sv' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-sv.js', - 'ta' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-ta.js', - 'th' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-th.js', - 'tr' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-tr.js', - 'uk' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-uk.js', - 'vi' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-vi.js', - 'zh-cn' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-zh-CN.js', - 'zh-hk' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-zh-HK.js', - 'zh-tw' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-zh-TW.js', + 'group' => 'jquery.ui', + ), + 'jquery.ui.sortable' => array( + 'scripts' => 'resources/lib/jquery.ui/jquery.ui.sortable.js', + 'dependencies' => array( + 'jquery.ui.core', + 'jquery.ui.mouse', + 'jquery.ui.widget', ), 'group' => 'jquery.ui', ), - 'jquery.ui.dialog' => array( - 'scripts' => 'resources/jquery.ui/jquery.ui.dialog.js', + 'jquery.ui.spinner' => array( + 'scripts' => 'resources/lib/jquery.ui/jquery.ui.spinner.js', 'dependencies' => array( 'jquery.ui.core', 'jquery.ui.widget', 'jquery.ui.button', - 'jquery.ui.draggable', - 'jquery.ui.mouse', - 'jquery.ui.position', - 'jquery.ui.resizable', ), 'skinStyles' => array( - 'default' => 'resources/jquery.ui/themes/default/jquery.ui.dialog.css', - 'vector' => 'resources/jquery.ui/themes/vector/jquery.ui.dialog.css', + 'default' => 'resources/lib/jquery.ui/themes/smoothness/jquery.ui.spinner.css', ), 'group' => 'jquery.ui', ), - 'jquery.ui.progressbar' => array( - 'scripts' => 'resources/jquery.ui/jquery.ui.progressbar.js', - 'dependencies' => array( 'jquery.ui.core', 'jquery.ui.widget' ), + 'jquery.ui.tabs' => array( + 'scripts' => 'resources/lib/jquery.ui/jquery.ui.tabs.js', + 'dependencies' => array( + 'jquery.ui.core', + 'jquery.ui.widget', + ), 'skinStyles' => array( - 'default' => 'resources/jquery.ui/themes/default/jquery.ui.progressbar.css', - 'vector' => 'resources/jquery.ui/themes/vector/jquery.ui.progressbar.css', + 'default' => 'resources/lib/jquery.ui/themes/smoothness/jquery.ui.tabs.css', ), 'group' => 'jquery.ui', ), - 'jquery.ui.slider' => array( - 'scripts' => 'resources/jquery.ui/jquery.ui.slider.js', - 'dependencies' => array( 'jquery.ui.core', 'jquery.ui.widget', 'jquery.ui.mouse' ), + 'jquery.ui.tooltip' => array( + 'scripts' => 'resources/lib/jquery.ui/jquery.ui.tooltip.js', + 'dependencies' => array( + 'jquery.ui.core', + 'jquery.ui.widget', + 'jquery.ui.position', + ), 'skinStyles' => array( - 'default' => 'resources/jquery.ui/themes/default/jquery.ui.slider.css', - 'vector' => 'resources/jquery.ui/themes/vector/jquery.ui.slider.css', + 'default' => 'resources/lib/jquery.ui/themes/smoothness/jquery.ui.tooltip.css', ), 'group' => 'jquery.ui', ), - 'jquery.ui.tabs' => array( - 'scripts' => 'resources/jquery.ui/jquery.ui.tabs.js', - 'dependencies' => array( 'jquery.ui.core', 'jquery.ui.widget' ), - 'skinStyles' => array( - 'default' => 'resources/jquery.ui/themes/default/jquery.ui.tabs.css', - 'vector' => 'resources/jquery.ui/themes/vector/jquery.ui.tabs.css', - ), + 'jquery.ui.widget' => array( + 'scripts' => 'resources/lib/jquery.ui/jquery.ui.widget.js', 'group' => 'jquery.ui', ), // Effects 'jquery.effects.core' => array( - 'scripts' => 'resources/jquery.effects/jquery.effects.core.js', - 'dependencies' => 'jquery', + 'scripts' => 'resources/lib/jquery.ui/jquery.ui.effect.js', 'group' => 'jquery.ui', ), 'jquery.effects.blind' => array( - 'scripts' => 'resources/jquery.effects/jquery.effects.blind.js', + 'scripts' => 'resources/lib/jquery.ui/jquery.ui.effect-blind.js', 'dependencies' => 'jquery.effects.core', 'group' => 'jquery.ui', ), 'jquery.effects.bounce' => array( - 'scripts' => 'resources/jquery.effects/jquery.effects.bounce.js', + 'scripts' => 'resources/lib/jquery.ui/jquery.ui.effect-bounce.js', 'dependencies' => 'jquery.effects.core', 'group' => 'jquery.ui', ), 'jquery.effects.clip' => array( - 'scripts' => 'resources/jquery.effects/jquery.effects.clip.js', + 'scripts' => 'resources/lib/jquery.ui/jquery.ui.effect-clip.js', 'dependencies' => 'jquery.effects.core', 'group' => 'jquery.ui', ), 'jquery.effects.drop' => array( - 'scripts' => 'resources/jquery.effects/jquery.effects.drop.js', + 'scripts' => 'resources/lib/jquery.ui/jquery.ui.effect-drop.js', 'dependencies' => 'jquery.effects.core', 'group' => 'jquery.ui', ), 'jquery.effects.explode' => array( - 'scripts' => 'resources/jquery.effects/jquery.effects.explode.js', + 'scripts' => 'resources/lib/jquery.ui/jquery.ui.effect-explode.js', 'dependencies' => 'jquery.effects.core', 'group' => 'jquery.ui', ), 'jquery.effects.fade' => array( - 'scripts' => 'resources/jquery.effects/jquery.effects.fade.js', + 'scripts' => 'resources/lib/jquery.ui/jquery.ui.effect-fade.js', 'dependencies' => 'jquery.effects.core', 'group' => 'jquery.ui', ), 'jquery.effects.fold' => array( - 'scripts' => 'resources/jquery.effects/jquery.effects.fold.js', + 'scripts' => 'resources/lib/jquery.ui/jquery.ui.effect-fold.js', 'dependencies' => 'jquery.effects.core', 'group' => 'jquery.ui', ), 'jquery.effects.highlight' => array( - 'scripts' => 'resources/jquery.effects/jquery.effects.highlight.js', + 'scripts' => 'resources/lib/jquery.ui/jquery.ui.effect-highlight.js', 'dependencies' => 'jquery.effects.core', 'group' => 'jquery.ui', ), 'jquery.effects.pulsate' => array( - 'scripts' => 'resources/jquery.effects/jquery.effects.pulsate.js', + 'scripts' => 'resources/lib/jquery.ui/jquery.ui.effect-pulsate.js', 'dependencies' => 'jquery.effects.core', 'group' => 'jquery.ui', ), 'jquery.effects.scale' => array( - 'scripts' => 'resources/jquery.effects/jquery.effects.scale.js', + 'scripts' => 'resources/lib/jquery.ui/jquery.ui.effect-scale.js', 'dependencies' => 'jquery.effects.core', 'group' => 'jquery.ui', ), 'jquery.effects.shake' => array( - 'scripts' => 'resources/jquery.effects/jquery.effects.shake.js', + 'scripts' => 'resources/lib/jquery.ui/jquery.ui.effect-shake.js', 'dependencies' => 'jquery.effects.core', 'group' => 'jquery.ui', ), 'jquery.effects.slide' => array( - 'scripts' => 'resources/jquery.effects/jquery.effects.slide.js', + 'scripts' => 'resources/lib/jquery.ui/jquery.ui.effect-slide.js', 'dependencies' => 'jquery.effects.core', 'group' => 'jquery.ui', ), 'jquery.effects.transfer' => array( - 'scripts' => 'resources/jquery.effects/jquery.effects.transfer.js', + 'scripts' => 'resources/lib/jquery.ui/jquery.ui.effect-transfer.js', 'dependencies' => 'jquery.effects.core', 'group' => 'jquery.ui', ), + /* json2 */ + + 'json' => array( + 'scripts' => 'resources/lib/json2/json2.js', + 'targets' => array( 'desktop', 'mobile' ), + 'skipFunction' => 'resources/src/json-skip.js', + ), + + /* Moment.js */ + + 'moment' => array( + 'scripts' => 'resources/lib/moment/moment.js', + 'languageScripts' => array( + 'af' => 'resources/lib/moment/locale/af.js', + 'ar' => 'resources/lib/moment/locale/ar.js', + 'ar-ma' => 'resources/lib/moment/locale/ar-ma.js', + 'ar-sa' => 'resources/lib/moment/locale/ar-sa.js', + 'az' => 'resources/lib/moment/locale/az.js', + 'be' => 'resources/lib/moment/locale/be.js', + 'bg' => 'resources/lib/moment/locale/bg.js', + 'bn' => 'resources/lib/moment/locale/bn.js', + 'bo' => 'resources/lib/moment/locale/bo.js', + 'br' => 'resources/lib/moment/locale/br.js', + 'bs' => 'resources/lib/moment/locale/bs.js', + 'ca' => 'resources/lib/moment/locale/ca.js', + 'cs' => 'resources/lib/moment/locale/cs.js', + 'cv' => 'resources/lib/moment/locale/cv.js', + 'cy' => 'resources/lib/moment/locale/cy.js', + 'da' => 'resources/lib/moment/locale/da.js', + 'de' => 'resources/lib/moment/locale/de.js', + 'de-at' => 'resources/lib/moment/locale/de-at.js', + 'el' => 'resources/lib/moment/locale/el.js', + 'en-au' => 'resources/lib/moment/locale/en-au.js', + 'en-ca' => 'resources/lib/moment/locale/en-ca.js', + 'en-gb' => 'resources/lib/moment/locale/en-gb.js', + 'eo' => 'resources/lib/moment/locale/eo.js', + 'es' => 'resources/lib/moment/locale/es.js', + 'et' => 'resources/lib/moment/locale/et.js', + 'eu' => 'resources/lib/moment/locale/eu.js', + 'fa' => 'resources/lib/moment/locale/fa.js', + 'fi' => 'resources/lib/moment/locale/fi.js', + 'fo' => 'resources/lib/moment/locale/fo.js', + 'fr-ca' => 'resources/lib/moment/locale/fr-ca.js', + 'fr' => 'resources/lib/moment/locale/fr.js', + 'gl' => 'resources/lib/moment/locale/gl.js', + 'he' => 'resources/lib/moment/locale/he.js', + 'hi' => 'resources/lib/moment/locale/hi.js', + 'hr' => 'resources/lib/moment/locale/hr.js', + 'hu' => 'resources/lib/moment/locale/hu.js', + 'hy-am' => 'resources/lib/moment/locale/hy-am.js', + 'id' => 'resources/lib/moment/locale/id.js', + 'is' => 'resources/lib/moment/locale/is.js', + 'it' => 'resources/lib/moment/locale/it.js', + 'ja' => 'resources/lib/moment/locale/ja.js', + 'ka' => 'resources/lib/moment/locale/ka.js', + 'ko' => 'resources/lib/moment/locale/ko.js', + 'lt' => 'resources/lib/moment/locale/lt.js', + 'lv' => 'resources/lib/moment/locale/lv.js', + 'mk' => 'resources/lib/moment/locale/mk.js', + 'ml' => 'resources/lib/moment/locale/ml.js', + 'mr' => 'resources/lib/moment/locale/mr.js', + 'ms-my' => 'resources/lib/moment/locale/ms-my.js', + 'my' => 'resources/lib/moment/locale/my.js', + 'nb' => 'resources/lib/moment/locale/nb.js', + 'ne' => 'resources/lib/moment/locale/ne.js', + 'nl' => 'resources/lib/moment/locale/nl.js', + 'nn' => 'resources/lib/moment/locale/nn.js', + 'pl' => 'resources/lib/moment/locale/pl.js', + 'pt-br' => 'resources/lib/moment/locale/pt-br.js', + 'pt' => 'resources/lib/moment/locale/pt.js', + 'ro' => 'resources/lib/moment/locale/ro.js', + 'ru' => 'resources/lib/moment/locale/ru.js', + 'sk' => 'resources/lib/moment/locale/sk.js', + 'sl' => 'resources/lib/moment/locale/sl.js', + 'sq' => 'resources/lib/moment/locale/sq.js', + 'sr' => 'resources/lib/moment/locale/sr.js', + 'sr-ec' => 'resources/lib/moment/locale/sr-cyrl.js', + 'sv' => 'resources/lib/moment/locale/sv.js', + 'ta' => 'resources/lib/moment/locale/ta.js', + 'th' => 'resources/lib/moment/locale/th.js', + 'tl-ph' => 'resources/lib/moment/locale/tl-ph.js', + 'tr' => 'resources/lib/moment/locale/tr.js', + 'tzm' => 'resources/lib/moment/locale/tzm.js', + 'tzm-latn' => 'resources/lib/moment/locale/tzm-latn.js', + 'uk' => 'resources/lib/moment/locale/uk.js', + 'uz' => 'resources/lib/moment/locale/uz.js', + 'vi' => 'resources/lib/moment/locale/vi.js', + 'zh-cn' => 'resources/lib/moment/locale/zh-cn.js', + 'zh-tw' => 'resources/lib/moment/locale/zh-tw.js', + ), + ), + /* MediaWiki */ 'mediawiki' => array( - 'scripts' => 'resources/mediawiki/mediawiki.js', - 'debugScripts' => 'resources/mediawiki/mediawiki.log.js', - 'debugRaw' => false, + 'scripts' => 'resources/src/mediawiki/mediawiki.js', + 'debugScripts' => 'resources/src/mediawiki/mediawiki.log.js', + 'raw' => true, 'targets' => array( 'desktop', 'mobile' ), ), 'mediawiki.api' => array( - 'scripts' => 'resources/mediawiki.api/mediawiki.api.js', + 'scripts' => 'resources/src/mediawiki.api/mediawiki.api.js', 'dependencies' => 'mediawiki.util', + 'targets' => array( 'desktop', 'mobile' ), ), 'mediawiki.api.category' => array( - 'scripts' => 'resources/mediawiki.api/mediawiki.api.category.js', + 'scripts' => 'resources/src/mediawiki.api/mediawiki.api.category.js', 'dependencies' => array( 'mediawiki.api', 'mediawiki.Title', ), ), 'mediawiki.api.edit' => array( - 'scripts' => 'resources/mediawiki.api/mediawiki.api.edit.js', + 'scripts' => 'resources/src/mediawiki.api/mediawiki.api.edit.js', 'dependencies' => array( 'mediawiki.api', 'mediawiki.Title', + 'user.tokens', ), ), 'mediawiki.api.login' => array( - 'scripts' => 'resources/mediawiki.api/mediawiki.api.login.js', + 'scripts' => 'resources/src/mediawiki.api/mediawiki.api.login.js', 'dependencies' => array( 'mediawiki.api', ), ), 'mediawiki.api.parse' => array( - 'scripts' => 'resources/mediawiki.api/mediawiki.api.parse.js', + 'scripts' => 'resources/src/mediawiki.api/mediawiki.api.parse.js', 'dependencies' => 'mediawiki.api', ), 'mediawiki.api.watch' => array( - 'scripts' => 'resources/mediawiki.api/mediawiki.api.watch.js', + 'scripts' => 'resources/src/mediawiki.api/mediawiki.api.watch.js', 'dependencies' => array( 'mediawiki.api', 'user.tokens', ), ), - 'mediawiki.icon' => array( - 'styles' => 'resources/mediawiki/mediawiki.icon.css', + 'mediawiki.content.json' => array( + 'styles' => 'resources/src/mediawiki/mediawiki.content.json.css', ), 'mediawiki.debug' => array( - 'scripts' => 'resources/mediawiki/mediawiki.debug.js', - 'styles' => 'resources/mediawiki/mediawiki.debug.css', - 'dependencies' => 'jquery.footHovzer', + 'scripts' => array( + 'resources/src/mediawiki/mediawiki.debug.js', + 'resources/src/mediawiki/mediawiki.debug.profile.js' + ), + 'styles' => array( + 'resources/src/mediawiki/mediawiki.debug.less', + 'resources/src/mediawiki/mediawiki.debug.profile.css' + ), + 'dependencies' => array( + 'jquery.footHovzer', + 'jquery.tipsy', + ), 'position' => 'bottom', ), 'mediawiki.debug.init' => array( - 'scripts' => 'resources/mediawiki/mediawiki.debug.init.js', + 'scripts' => 'resources/src/mediawiki/mediawiki.debug.init.js', 'dependencies' => 'mediawiki.debug', // Uses a custom mw.config variable that is set in debughtml, // must be loaded on the bottom 'position' => 'bottom', ), - 'mediawiki.inspect' => array( - 'scripts' => 'resources/mediawiki/mediawiki.inspect.js', - 'dependencies' => array( - 'jquery.byteLength', - 'jquery.json', - ), - 'targets' => array( 'desktop', 'mobile' ), - ), 'mediawiki.feedback' => array( - 'scripts' => 'resources/mediawiki/mediawiki.feedback.js', - 'styles' => 'resources/mediawiki/mediawiki.feedback.css', + 'scripts' => 'resources/src/mediawiki/mediawiki.feedback.js', + 'styles' => 'resources/src/mediawiki/mediawiki.feedback.css', 'dependencies' => array( 'mediawiki.api.edit', 'mediawiki.Title', @@ -700,36 +867,66 @@ return array( ), ), 'mediawiki.hidpi' => array( - 'scripts' => 'resources/mediawiki/mediawiki.hidpi.js', + 'scripts' => 'resources/src/mediawiki/mediawiki.hidpi.js', 'dependencies' => array( 'jquery.hidpi', ), + 'skipFunction' => 'resources/src/mediawiki.hidpi-skip.js', 'targets' => array( 'desktop', 'mobile' ), ), + 'mediawiki.hlist' => array( + 'styles' => 'resources/src/mediawiki/mediawiki.hlist.css', + 'scripts' => 'resources/src/mediawiki/mediawiki.hlist.js', + 'dependencies' => array( + 'jquery.client', + ), + ), 'mediawiki.htmlform' => array( - 'scripts' => 'resources/mediawiki/mediawiki.htmlform.js', + 'scripts' => 'resources/src/mediawiki/mediawiki.htmlform.js', + 'dependencies' => array( + 'jquery.mwExtension', + ), 'messages' => array( 'htmlform-chosen-placeholder' ), ), + 'mediawiki.icon' => array( + 'styles' => 'resources/src/mediawiki/mediawiki.icon.less', + ), + 'mediawiki.inspect' => array( + 'scripts' => 'resources/src/mediawiki/mediawiki.inspect.js', + 'dependencies' => array( + 'jquery.byteLength', + 'json', + ), + 'targets' => array( 'desktop', 'mobile' ), + ), 'mediawiki.notification' => array( - 'styles' => 'resources/mediawiki/mediawiki.notification.css', - 'scripts' => 'resources/mediawiki/mediawiki.notification.js', + 'styles' => array( + 'resources/src/mediawiki/mediawiki.notification.css', + 'resources/src/mediawiki/mediawiki.notification.hideForPrint.css' + => array( 'media' => 'print' ), + ), + 'scripts' => 'resources/src/mediawiki/mediawiki.notification.js', 'dependencies' => array( 'mediawiki.page.startup', ), + 'targets' => array( 'desktop', 'mobile' ), ), 'mediawiki.notify' => array( - 'scripts' => 'resources/mediawiki/mediawiki.notify.js', + 'scripts' => 'resources/src/mediawiki/mediawiki.notify.js', 'targets' => array( 'desktop', 'mobile' ), ), + 'mediawiki.pager.tablePager' => array( + 'styles' => 'resources/src/mediawiki/mediawiki.pager.tablePager.less', + 'position' => 'top', + ), 'mediawiki.searchSuggest' => array( - 'scripts' => 'resources/mediawiki/mediawiki.searchSuggest.js', - 'styles' => 'resources/mediawiki/mediawiki.searchSuggest.css', + 'scripts' => 'resources/src/mediawiki/mediawiki.searchSuggest.js', + 'styles' => 'resources/src/mediawiki/mediawiki.searchSuggest.css', 'messages' => array( 'searchsuggest-search', 'searchsuggest-containing', ), 'dependencies' => array( - 'jquery.autoEllipsis', 'jquery.client', 'jquery.placeholder', 'jquery.suggestions', @@ -737,62 +934,85 @@ return array( ), ), 'mediawiki.Title' => array( - 'scripts' => 'resources/mediawiki/mediawiki.Title.js', + 'scripts' => 'resources/src/mediawiki/mediawiki.Title.js', 'dependencies' => array( 'jquery.byteLength', 'mediawiki.util', ), + 'targets' => array( 'desktop', 'mobile' ), + ), + 'mediawiki.toc' => array( + 'scripts' => 'resources/src/mediawiki/mediawiki.toc.js', + 'dependencies' => array( + 'jquery.cookie', + ), + 'messages' => array( 'showtoc', 'hidetoc' ), + 'targets' => array( 'desktop', 'mobile' ), ), 'mediawiki.Uri' => array( - 'scripts' => 'resources/mediawiki/mediawiki.Uri.js', + 'scripts' => 'resources/src/mediawiki/mediawiki.Uri.js', + 'dependencies' => 'mediawiki.util', + 'targets' => array( 'desktop', 'mobile' ), ), 'mediawiki.user' => array( - 'scripts' => 'resources/mediawiki/mediawiki.user.js', + 'scripts' => 'resources/src/mediawiki/mediawiki.user.js', 'dependencies' => array( 'jquery.cookie', 'mediawiki.api', 'user.options', 'user.tokens', ), + 'targets' => array( 'desktop', 'mobile' ), ), 'mediawiki.util' => array( - 'scripts' => 'resources/mediawiki/mediawiki.util.js', + 'scripts' => 'resources/src/mediawiki/mediawiki.util.js', 'dependencies' => array( - 'jquery.client', - 'jquery.cookie', + 'jquery.accessKeyLabel', 'jquery.mwExtension', 'mediawiki.notify', ), - 'messages' => array( 'showtoc', 'hidetoc' ), 'position' => 'top', // For $wgPreloadJavaScriptMwUtil 'targets' => array( 'desktop', 'mobile' ), ), + 'mediawiki.cookie' => array( + 'scripts' => 'resources/src/mediawiki/mediawiki.cookie.js', + 'dependencies' => array( + 'jquery.cookie', + ), + ), /* MediaWiki Action */ 'mediawiki.action.edit' => array( - 'scripts' => 'resources/mediawiki.action/mediawiki.action.edit.js', + 'scripts' => 'resources/src/mediawiki.action/mediawiki.action.edit.js', + 'styles' => 'resources/src/mediawiki.action/mediawiki.action.edit.css', 'dependencies' => array( 'mediawiki.action.edit.styles', + 'mediawiki.action.edit.toolbar', 'jquery.textSelection', 'jquery.byteLimit', ), 'position' => 'top', ), 'mediawiki.action.edit.styles' => array( - 'styles' => 'resources/mediawiki.action/mediawiki.action.edit.styles.css', + 'styles' => 'resources/src/mediawiki.action/mediawiki.action.edit.styles.css', 'position' => 'top', ), + 'mediawiki.action.edit.toolbar' => array( + 'class' => 'ResourceLoaderEditToolbarModule', + 'styles' => 'resources/src/mediawiki.action/mediawiki.action.edit.toolbar/mediawiki.action.edit.toolbar.less', + ), 'mediawiki.action.edit.collapsibleFooter' => array( - 'scripts' => 'resources/mediawiki.action/mediawiki.action.edit.collapsibleFooter.js', - 'styles' => 'resources/mediawiki.action/mediawiki.action.edit.collapsibleFooter.css', + 'scripts' => 'resources/src/mediawiki.action/mediawiki.action.edit.collapsibleFooter.js', + 'styles' => 'resources/src/mediawiki.action/mediawiki.action.edit.collapsibleFooter.css', 'dependencies' => array( 'jquery.makeCollapsible', + 'jquery.cookie', 'mediawiki.icon', ), ), 'mediawiki.action.edit.preview' => array( - 'scripts' => 'resources/mediawiki.action/mediawiki.action.edit.preview.js', + 'scripts' => 'resources/src/mediawiki.action/mediawiki.action.edit.preview.js', 'dependencies' => array( 'jquery.form', 'jquery.spinner', @@ -800,83 +1020,106 @@ return array( ), ), 'mediawiki.action.history' => array( - 'scripts' => 'resources/mediawiki.action/mediawiki.action.history.js', + 'scripts' => 'resources/src/mediawiki.action/mediawiki.action.history.js', + 'styles' => 'resources/src/mediawiki.action/mediawiki.action.history.css', 'group' => 'mediawiki.action.history', ), 'mediawiki.action.history.diff' => array( - 'styles' => 'resources/mediawiki.action/mediawiki.action.history.diff.css', + 'styles' => 'resources/src/mediawiki.action/mediawiki.action.history.diff.css', 'group' => 'mediawiki.action.history', + 'targets' => array( 'desktop', 'mobile' ), ), 'mediawiki.action.view.dblClickEdit' => array( - 'scripts' => 'resources/mediawiki.action/mediawiki.action.view.dblClickEdit.js', + 'scripts' => 'resources/src/mediawiki.action/mediawiki.action.view.dblClickEdit.js', 'dependencies' => array( 'mediawiki.util', 'mediawiki.page.startup', ), ), 'mediawiki.action.view.metadata' => array( - 'scripts' => 'resources/mediawiki.action/mediawiki.action.view.metadata.js', + 'styles' => 'resources/src/mediawiki.action/mediawiki.action.view.metadata.css', + 'scripts' => 'resources/src/mediawiki.action/mediawiki.action.view.metadata.js', 'messages' => array( 'metadata-expand', 'metadata-collapse', ), ), 'mediawiki.action.view.postEdit' => array( - 'scripts' => 'resources/mediawiki.action/mediawiki.action.view.postEdit.js', - 'styles' => 'resources/mediawiki.action/mediawiki.action.view.postEdit.css', + 'scripts' => 'resources/src/mediawiki.action/mediawiki.action.view.postEdit.js', + 'styles' => 'resources/src/mediawiki.action/mediawiki.action.view.postEdit.css', 'dependencies' => array( - 'jquery.cookie', + 'mediawiki.cookie', 'mediawiki.jqueryMsg' ), 'messages' => array( - 'postedit-confirmation', + 'postedit-confirmation-created', + 'postedit-confirmation-restored', + 'postedit-confirmation-saved', + ), + ), + 'mediawiki.action.view.redirect' => array( + 'scripts' => 'resources/src/mediawiki.action/mediawiki.action.view.redirect.js', + 'dependencies' => array( + 'jquery.client', ), + 'position' => 'top', + ), + 'mediawiki.action.view.redirectPage' => array( + 'styles' => 'resources/src/mediawiki.action/mediawiki.action.view.redirectPage.css', + 'position' => 'top', ), 'mediawiki.action.view.rightClickEdit' => array( - 'scripts' => 'resources/mediawiki.action/mediawiki.action.view.rightClickEdit.js', + 'scripts' => 'resources/src/mediawiki.action/mediawiki.action.view.rightClickEdit.js', ), 'mediawiki.action.edit.editWarning' => array( - 'scripts' => 'resources/mediawiki.action/mediawiki.action.edit.editWarning.js', + 'scripts' => 'resources/src/mediawiki.action/mediawiki.action.edit.editWarning.js', + 'dependencies' => array( + 'jquery.textSelection', + 'mediawiki.jqueryMsg' + ), 'messages' => array( 'editwarning-warning', + 'prefs-editing' ), ), - // Alias for backwards compatibility - 'mediawiki.action.watch.ajax' => array( - 'dependencies' => 'mediawiki.page.watch.ajax' - ), /* MediaWiki Language */ 'mediawiki.language' => array( 'scripts' => array( - 'resources/mediawiki.language/mediawiki.language.js', - 'resources/mediawiki.language/mediawiki.language.numbers.js' + 'resources/src/mediawiki.language/mediawiki.language.js', + 'resources/src/mediawiki.language/mediawiki.language.numbers.js', + 'resources/src/mediawiki.language/mediawiki.language.fallback.js', ), 'languageScripts' => array( - 'bs' => 'resources/mediawiki.language/languages/bs.js', - 'dsb' => 'resources/mediawiki.language/languages/dsb.js', - 'fi' => 'resources/mediawiki.language/languages/fi.js', - 'ga' => 'resources/mediawiki.language/languages/ga.js', - 'he' => 'resources/mediawiki.language/languages/he.js', - 'hsb' => 'resources/mediawiki.language/languages/hsb.js', - 'hu' => 'resources/mediawiki.language/languages/hu.js', - 'hy' => 'resources/mediawiki.language/languages/hy.js', - 'la' => 'resources/mediawiki.language/languages/la.js', - 'os' => 'resources/mediawiki.language/languages/os.js', - 'ru' => 'resources/mediawiki.language/languages/ru.js', - 'sl' => 'resources/mediawiki.language/languages/sl.js', - 'uk' => 'resources/mediawiki.language/languages/uk.js', + 'bs' => 'resources/src/mediawiki.language/languages/bs.js', + 'dsb' => 'resources/src/mediawiki.language/languages/dsb.js', + 'fi' => 'resources/src/mediawiki.language/languages/fi.js', + 'ga' => 'resources/src/mediawiki.language/languages/ga.js', + 'he' => 'resources/src/mediawiki.language/languages/he.js', + 'hsb' => 'resources/src/mediawiki.language/languages/hsb.js', + 'hu' => 'resources/src/mediawiki.language/languages/hu.js', + 'hy' => 'resources/src/mediawiki.language/languages/hy.js', + 'la' => 'resources/src/mediawiki.language/languages/la.js', + 'os' => 'resources/src/mediawiki.language/languages/os.js', + 'ru' => 'resources/src/mediawiki.language/languages/ru.js', + 'sl' => 'resources/src/mediawiki.language/languages/sl.js', + 'uk' => 'resources/src/mediawiki.language/languages/uk.js', ), 'dependencies' => array( 'mediawiki.language.data', 'mediawiki.cldr', ), 'targets' => array( 'desktop', 'mobile' ), + 'messages' => array( + 'and', + 'comma-separator', + 'word-separator' + ), ), 'mediawiki.cldr' => array( - 'scripts' => 'resources/mediawiki.language/mediawiki.cldr.js', + 'scripts' => 'resources/src/mediawiki.language/mediawiki.cldr.js', 'dependencies' => array( 'mediawiki.libs.pluralruleparser', ), @@ -884,17 +1127,17 @@ return array( ), 'mediawiki.libs.pluralruleparser' => array( - 'scripts' => 'resources/mediawiki.libs/CLDRPluralRuleParser.js', + 'scripts' => 'resources/src/mediawiki.libs/CLDRPluralRuleParser.js', 'targets' => array( 'desktop', 'mobile' ), ), 'mediawiki.language.init' => array( - 'scripts' => 'resources/mediawiki.language/mediawiki.language.init.js', + 'scripts' => 'resources/src/mediawiki.language/mediawiki.language.init.js', 'targets' => array( 'desktop', 'mobile' ), ), 'mediawiki.jqueryMsg' => array( - 'scripts' => 'resources/mediawiki/mediawiki.jqueryMsg.js', + 'scripts' => 'resources/src/mediawiki/mediawiki.jqueryMsg.js', 'dependencies' => array( 'mediawiki.util', 'mediawiki.language', @@ -903,7 +1146,7 @@ return array( ), 'mediawiki.language.months' => array( - 'scripts' => 'resources/mediawiki.language/mediawiki.language.months.js', + 'scripts' => 'resources/src/mediawiki.language/mediawiki.language.months.js', 'dependencies' => 'mediawiki.language', 'messages' => array_merge( Language::$mMonthMsgs, @@ -912,39 +1155,40 @@ return array( ) ), + 'mediawiki.language.names' => array( 'class' => 'ResourceLoaderLanguageNamesModule' ), + /* MediaWiki Libs */ 'mediawiki.libs.jpegmeta' => array( - 'scripts' => 'resources/mediawiki.libs/mediawiki.libs.jpegmeta.js', + 'scripts' => 'resources/src/mediawiki.libs/mediawiki.libs.jpegmeta.js', ), /* MediaWiki Page */ 'mediawiki.page.gallery' => array( - 'scripts' => 'resources/mediawiki.page/mediawiki.page.gallery.js', + 'scripts' => 'resources/src/mediawiki.page/mediawiki.page.gallery.js', ), 'mediawiki.page.ready' => array( - 'scripts' => 'resources/mediawiki.page/mediawiki.page.ready.js', + 'scripts' => 'resources/src/mediawiki.page/mediawiki.page.ready.js', 'dependencies' => array( + 'jquery.accessKeyLabel', 'jquery.checkboxShiftClick', 'jquery.makeCollapsible', 'jquery.placeholder', 'jquery.mw-jump', - 'mediawiki.util', ), 'targets' => array( 'desktop', 'mobile' ), ), 'mediawiki.page.startup' => array( - 'scripts' => 'resources/mediawiki.page/mediawiki.page.startup.js', + 'scripts' => 'resources/src/mediawiki.page/mediawiki.page.startup.js', 'dependencies' => array( - 'jquery.client', 'mediawiki.util', ), 'position' => 'top', 'targets' => array( 'desktop', 'mobile' ), ), 'mediawiki.page.patrol.ajax' => array( - 'scripts' => 'resources/mediawiki.page/mediawiki.page.patrol.ajax.js', + 'scripts' => 'resources/src/mediawiki.page/mediawiki.page.patrol.ajax.js', 'dependencies' => array( 'mediawiki.page.startup', 'mediawiki.api', @@ -961,12 +1205,13 @@ return array( ), ), 'mediawiki.page.watch.ajax' => array( - 'scripts' => 'resources/mediawiki.page/mediawiki.page.watch.ajax.js', + 'scripts' => 'resources/src/mediawiki.page/mediawiki.page.watch.ajax.js', 'dependencies' => array( - 'mediawiki.page.startup', 'mediawiki.api.watch', - 'mediawiki.util', 'mediawiki.notify', + 'mediawiki.page.startup', + 'mediawiki.util', + 'jquery.accessKeyLabel', 'jquery.mwExtension', ), 'messages' => array( @@ -980,29 +1225,30 @@ return array( ), ), 'mediawiki.page.image.pagination' => array( - 'scripts' => 'resources/mediawiki.page/mediawiki.page.image.pagination.js', + 'scripts' => 'resources/src/mediawiki.page/mediawiki.page.image.pagination.js', 'dependencies' => array( 'mediawiki.Uri', 'mediawiki.util', 'jquery.spinner', - ) + ), ), /* MediaWiki Special pages */ 'mediawiki.special' => array( - 'scripts' => 'resources/mediawiki.special/mediawiki.special.js', - 'styles' => 'resources/mediawiki.special/mediawiki.special.css', + 'scripts' => 'resources/src/mediawiki.special/mediawiki.special.js', + 'styles' => 'resources/src/mediawiki.special/mediawiki.special.css', ), 'mediawiki.special.block' => array( - 'scripts' => 'resources/mediawiki.special/mediawiki.special.block.js', + 'scripts' => 'resources/src/mediawiki.special/mediawiki.special.block.js', + 'styles' => 'resources/src/mediawiki.special/mediawiki.special.block.css', 'dependencies' => array( 'mediawiki.util', ), ), 'mediawiki.special.changeemail' => array( - 'scripts' => 'resources/mediawiki.special/mediawiki.special.changeemail.js', - 'styles' => 'resources/mediawiki.special/mediawiki.special.changeemail.css', + 'scripts' => 'resources/src/mediawiki.special/mediawiki.special.changeemail.js', + 'styles' => 'resources/src/mediawiki.special/mediawiki.special.changeemail.css', 'dependencies' => array( 'mediawiki.util', ), @@ -1012,31 +1258,55 @@ return array( ), ), 'mediawiki.special.changeslist' => array( - 'styles' => 'resources/mediawiki.special/mediawiki.special.changeslist.css', + 'styles' => 'resources/src/mediawiki.special/mediawiki.special.changeslist.css', + ), + 'mediawiki.special.changeslist.legend' => array( + 'styles' => 'resources/src/mediawiki.special/mediawiki.special.changeslist.legend.css', + ), + 'mediawiki.special.changeslist.legend.js' => array( + 'scripts' => 'resources/src/mediawiki.special/mediawiki.special.changeslist.legend.js', + 'dependencies' => array( + 'jquery.makeCollapsible', + 'jquery.cookie', + ), ), 'mediawiki.special.changeslist.enhanced' => array( - 'styles' => 'resources/mediawiki.special/mediawiki.special.changeslist.enhanced.css', + 'styles' => 'resources/src/mediawiki.special/mediawiki.special.changeslist.enhanced.css', + ), + 'mediawiki.special.import' => array( + 'scripts' => 'resources/src/mediawiki.special/mediawiki.special.import.js', ), 'mediawiki.special.movePage' => array( - 'scripts' => 'resources/mediawiki.special/mediawiki.special.movePage.js', + 'scripts' => 'resources/src/mediawiki.special/mediawiki.special.movePage.js', 'dependencies' => 'jquery.byteLimit', ), + 'mediawiki.special.pageLanguage' => array( + 'scripts' => 'resources/src/mediawiki.special/mediawiki.special.pageLanguage.js', + ), 'mediawiki.special.pagesWithProp' => array( - 'styles' => 'resources/mediawiki.special/mediawiki.special.pagesWithProp.css', + 'styles' => 'resources/src/mediawiki.special/mediawiki.special.pagesWithProp.css', ), 'mediawiki.special.preferences' => array( - 'scripts' => 'resources/mediawiki.special/mediawiki.special.preferences.js', - 'styles' => 'resources/mediawiki.special/mediawiki.special.preferences.css', + 'scripts' => 'resources/src/mediawiki.special/mediawiki.special.preferences.js', + 'styles' => 'resources/src/mediawiki.special/mediawiki.special.preferences.css', 'position' => 'top', + 'messages' => array( + 'prefs-tabs-navigation-hint', + 'prefswarning-warning', + 'saveprefs', + ), + 'dependencies' => array( + 'mediawiki.language', + ), ), 'mediawiki.special.recentchanges' => array( - 'scripts' => 'resources/mediawiki.special/mediawiki.special.recentchanges.js', + 'scripts' => 'resources/src/mediawiki.special/mediawiki.special.recentchanges.js', 'dependencies' => array( 'mediawiki.special' ), 'position' => 'top', ), 'mediawiki.special.search' => array( - 'scripts' => 'resources/mediawiki.special/mediawiki.special.search.js', - 'styles' => 'resources/mediawiki.special/mediawiki.special.search.css', + 'scripts' => 'resources/src/mediawiki.special/mediawiki.special.search.js', + 'styles' => 'resources/src/mediawiki.special/mediawiki.special.search.css', 'messages' => array( 'powersearch-togglelabel', 'powersearch-toggleall', @@ -1044,11 +1314,10 @@ return array( ), ), 'mediawiki.special.undelete' => array( - 'scripts' => 'resources/mediawiki.special/mediawiki.special.undelete.js', + 'scripts' => 'resources/src/mediawiki.special/mediawiki.special.undelete.js', ), 'mediawiki.special.upload' => array( - // @todo merge in remainder of mediawiki.legacy.upload - 'scripts' => 'resources/mediawiki.special/mediawiki.special.upload.js', + 'scripts' => 'resources/src/mediawiki.special/mediawiki.special.upload.js', 'messages' => array( 'widthheight', 'size-bytes', @@ -1058,35 +1327,76 @@ return array( 'largefileserver', ), 'dependencies' => array( + 'jquery.spinner', + 'mediawiki.api', 'mediawiki.libs.jpegmeta', + 'mediawiki.Title', 'mediawiki.util', ), ), - 'mediawiki.special.userlogin' => array( + 'mediawiki.special.userlogin.common.styles' => array( + 'styles' => array( + 'resources/src/mediawiki.special/mediawiki.special.userlogin.common.css', + ), + 'position' => 'top', + ), + 'mediawiki.special.userlogin.signup.styles' => array( 'styles' => array( - 'resources/mediawiki.special/mediawiki.special.vforms.css', - 'resources/mediawiki.special/mediawiki.special.userLogin.css', + 'resources/src/mediawiki.special/mediawiki.special.userlogin.signup.css', ), 'position' => 'top', ), - 'mediawiki.special.createaccount' => array( + 'mediawiki.special.userlogin.login.styles' => array( 'styles' => array( - 'resources/mediawiki.special/mediawiki.special.vforms.css', - 'resources/mediawiki.special/mediawiki.special.createAccount.css', + 'resources/src/mediawiki.special/mediawiki.special.userlogin.login.css', ), + 'position' => 'top', ), - 'mediawiki.special.createaccount.js' => array( - 'scripts' => 'resources/mediawiki.special/mediawiki.special.createAccount.js', + 'mediawiki.special.userlogin.common.js' => array( + 'scripts' => array( + 'resources/src/mediawiki.special/mediawiki.special.userlogin.common.js', + ), 'messages' => array( 'createacct-captcha', + 'createacct-imgcaptcha-ph', + ), + ), + 'mediawiki.special.userlogin.signup.js' => array( + 'scripts' => 'resources/src/mediawiki.special/mediawiki.special.userlogin.signup.js', + 'messages' => array( + 'createacct-error', 'createacct-emailrequired', - 'createacct-imgcaptcha-ph' + 'noname', + 'userexists', + ), + 'dependencies' => array( + 'mediawiki.api', + 'mediawiki.jqueryMsg', + 'jquery.throttle-debounce', + ), + ), + 'mediawiki.special.unwatchedPages' => array( + 'scripts' => 'resources/src/mediawiki.special/mediawiki.special.unwatchedPages.js', + 'styles' => 'resources/src/mediawiki.special/mediawiki.special.unwatchedPages.css', + 'messages' => array( + 'addedwatchtext-short', + 'removedwatchtext-short', + 'unwatch', + 'unwatching', + 'watch', + 'watcherrortext', + 'watching', + ), + 'dependencies' => array( + 'mediawiki.api', + 'mediawiki.api.watch', + 'mediawiki.notify', + 'mediawiki.Title', + 'mediawiki.util', ), - 'dependencies' => 'mediawiki.jqueryMsg', - 'position' => 'top', ), 'mediawiki.special.javaScriptTest' => array( - 'scripts' => 'resources/mediawiki.special/mediawiki.special.javaScriptTest.js', + 'scripts' => 'resources/src/mediawiki.special/mediawiki.special.javaScriptTest.js', 'messages' => array_merge( Skin::getSkinNameMessages(), array( 'colon-separator', 'javascripttest-pagetext-skins', @@ -1095,92 +1405,162 @@ return array( 'position' => 'top', 'targets' => array( 'desktop', 'mobile' ), ), + 'mediawiki.special.version' => array( + 'styles' => 'resources/src/mediawiki.special/mediawiki.special.version.css', + ), - /* MediaWiki Tests */ + /* MediaWiki Installer */ - 'mediawiki.tests.qunit.testrunner' => array( - 'scripts' => 'tests/qunit/data/testrunner.js', - 'dependencies' => array( - 'jquery.getAttrs', - 'jquery.qunit', - 'jquery.qunit.completenessTest', - 'mediawiki.page.startup', - 'mediawiki.page.ready', - ), - 'position' => 'top', - 'targets' => array( 'desktop', 'mobile' ), + 'mediawiki.legacy.config' => array( + // Used in the web installer. Test it after modifying this definition! + // These files are not actually loaded via ResourceLoader, so dependencies etc. won't work. + 'scripts' => 'mw-config/config.js', + 'styles' => 'mw-config/config.css', ), /* MediaWiki Legacy */ 'mediawiki.legacy.ajax' => array( - 'scripts' => 'common/ajax.js', - 'remoteBasePath' => $GLOBALS['wgStylePath'], - 'localBasePath' => $GLOBALS['wgStyleDirectory'], + 'scripts' => 'resources/src/mediawiki.legacy/ajax.js', 'dependencies' => array( 'mediawiki.util', 'mediawiki.legacy.wikibits', ), - 'position' => 'top', // Temporary hack for legacy support + 'position' => 'top', ), 'mediawiki.legacy.commonPrint' => array( - 'styles' => array( 'common/commonPrint.css' => array( 'media' => 'print' ) ), - 'remoteBasePath' => $GLOBALS['wgStylePath'], - 'localBasePath' => $GLOBALS['wgStyleDirectory'], - ), - 'mediawiki.legacy.config' => array( - // Used in the web installer. Test it after modifying this definition! - 'scripts' => 'common/config.js', - 'styles' => array( 'common/config.css' ), - 'remoteBasePath' => $GLOBALS['wgStylePath'], - 'localBasePath' => $GLOBALS['wgStyleDirectory'], - 'dependencies' => 'mediawiki.legacy.wikibits', + 'styles' => array( + 'resources/src/mediawiki.legacy/commonPrint.css' => array( 'media' => 'print' ) + ), ), 'mediawiki.legacy.protect' => array( - 'scripts' => 'common/protect.js', - 'remoteBasePath' => $GLOBALS['wgStylePath'], - 'localBasePath' => $GLOBALS['wgStyleDirectory'], + 'scripts' => 'resources/src/mediawiki.legacy/protect.js', 'dependencies' => array( 'jquery.byteLimit', ), - 'position' => 'top', + 'messages' => array( 'protect-unchain-permissions' ) ), 'mediawiki.legacy.shared' => array( // Used in the web installer. Test it after modifying this definition! - 'styles' => array( 'common/shared.css' => array( 'media' => 'screen' ) ), - 'remoteBasePath' => $GLOBALS['wgStylePath'], - 'localBasePath' => $GLOBALS['wgStyleDirectory'], + 'styles' => array( + 'resources/src/mediawiki.legacy/shared.css' => array( 'media' => 'screen' ) + ), ), 'mediawiki.legacy.oldshared' => array( - 'styles' => array( 'common/oldshared.css' => array( 'media' => 'screen' ) ), - 'remoteBasePath' => $GLOBALS['wgStylePath'], - 'localBasePath' => $GLOBALS['wgStyleDirectory'], - ), - 'mediawiki.legacy.upload' => array( - 'scripts' => 'common/upload.js', - 'remoteBasePath' => $GLOBALS['wgStylePath'], - 'localBasePath' => $GLOBALS['wgStyleDirectory'], - 'dependencies' => array( - 'jquery.spinner', - 'mediawiki.api', - 'mediawiki.Title', - 'mediawiki.util', + 'styles' => array( + 'resources/src/mediawiki.legacy/oldshared.css' => array( 'media' => 'screen' ) ), ), 'mediawiki.legacy.wikibits' => array( - 'scripts' => 'common/wikibits.js', - 'remoteBasePath' => $GLOBALS['wgStylePath'], - 'localBasePath' => $GLOBALS['wgStyleDirectory'], + 'scripts' => 'resources/src/mediawiki.legacy/wikibits.js', 'dependencies' => array( 'mediawiki.util', ), 'position' => 'top', ), + + /* MediaWiki UI */ + 'mediawiki.ui' => array( 'skinStyles' => array( - 'default' => 'resources/mediawiki.ui/mediawiki.ui.default.css', - 'vector' => 'resources/mediawiki.ui/mediawiki.ui.vector.css', + 'default' => array( + 'resources/src/mediawiki.ui/default.less', + ), ), 'position' => 'top', + 'targets' => array( 'desktop', 'mobile' ), + ), + 'mediawiki.ui.checkbox' => array( + 'skinStyles' => array( + 'default' => array( + 'resources/src/mediawiki.ui/components/checkbox.less', + ), + ), + 'position' => 'top', + 'targets' => array( 'desktop', 'mobile' ), + ), + // Lightweight module for anchor styles + 'mediawiki.ui.anchor' => array( + 'skinStyles' => array( + 'default' => array( + 'resources/src/mediawiki.ui/components/anchors.less', + ), + ), + 'position' => 'top', + 'targets' => array( 'desktop', 'mobile' ), + ), + // Lightweight module for button styles + 'mediawiki.ui.button' => array( + 'skinStyles' => array( + 'default' => array( + 'resources/src/mediawiki.ui/components/buttons.less', + ), + ), + 'position' => 'top', + 'targets' => array( 'desktop', 'mobile' ), + ), + 'mediawiki.ui.input' => array( + 'skinStyles' => array( + 'default' => array( + 'resources/src/mediawiki.ui/components/inputs.less', + ), + ), + 'position' => 'top', + 'targets' => array( 'desktop', 'mobile' ), + ), + + /* es5-shim */ + 'es5-shim' => array( + 'scripts' => array( + 'resources/lib/es5-shim/es5-shim.js', + 'resources/src/polyfill-object-create.js', + ), + 'targets' => array( 'desktop', 'mobile' ), + 'skipFunction' => 'resources/src/es5-skip.js', + ), + + /* OOjs */ + 'oojs' => array( + 'scripts' => array( + 'resources/lib/oojs/oojs.jquery.js', + ), + 'targets' => array( 'desktop', 'mobile' ), + 'dependencies' => array( + 'es5-shim', + 'json', + ), + ), + + /* OOjs UI */ + // WARNING: OOjs-UI is NOT TESTED with older browsers and is likely to break + // if loaded in browsers that don't support ES5 + 'oojs-ui' => array( + 'scripts' => array( + 'resources/lib/oojs-ui/oojs-ui.js', + ), + 'styles' => array( + 'resources/lib/oojs-ui/oojs-ui.svg.css', + ), + 'skinStyles' => array( + 'default' => 'resources/lib/oojs-ui/oojs-ui-apex.css', + // FIXME As of July 2014, this is to be gone "in a couple of months". + 'minerva' => 'resources/lib/oojs-ui/oojs-ui-minerva.css', + ), + 'messages' => array( + 'ooui-outline-control-move-down', + 'ooui-outline-control-move-up', + 'ooui-outline-control-remove', + 'ooui-toolbar-more', + 'ooui-dialog-message-accept', + 'ooui-dialog-message-reject', + 'ooui-dialog-process-dismiss', + 'ooui-dialog-process-error', + 'ooui-dialog-process-retry', + ), + 'dependencies' => array( + 'es5-shim', + 'oojs', + ), + 'targets' => array( 'desktop', 'mobile' ), ), ); diff --git a/resources/assets/file-type-icons/COPYING b/resources/assets/file-type-icons/COPYING new file mode 100644 index 00000000..136530a9 --- /dev/null +++ b/resources/assets/file-type-icons/COPYING @@ -0,0 +1,43 @@ +The icons used here are derived from the crystalsvg icons in the the +pics/crystalsvg/ directory of kdelibs-3.4.0 they were modified on 2005-05-15 +by Ævar Arnfjörð Bjarmason for use in MediaWiki. + +What follows is the contents of the LICENSE.crystalsvg file found in the pics/ +subdirectory of kdelibs-3.4.0: + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +This copyright and license notice covers all CrystalSVG images. +Note the license notice contains an add-on. +******************************************************************************** +KDE Crystal theme icons. +Copyright (C) 2002 and following years KDE Artists +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation, +version 2.1 of the License. +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + **** NOTE THIS ADD-ON **** +The GNU Lesser General Public License or LGPL is written for software libraries +in the first place. We expressly want the LGPL to be valid for this artwork +library too. +KDE Crystal theme icons is a special kind of software library, it is an +artwork library, it's elements can be used in a Graphical User Interface, or +GUI. +Source code, for this library means: + - for vectors svg; + - for pixels, if applicable, the multi-layered formats xcf or psd, or +otherwise png. +The LGPL in some sections obliges you to make the files carry +notices. With images this is in some cases impossible or hardly useful. +With this library a notice is placed at a prominent place in the directory +containing the elements. You may follow this practice. +The exception in section 6 of the GNU Lesser General Public License covers +the use of elements of this art library in a GUI. +kde-artists [at] kde.org +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/resources/assets/file-type-icons/fileicon-c.png b/resources/assets/file-type-icons/fileicon-c.png new file mode 100644 index 00000000..0d603b70 Binary files /dev/null and b/resources/assets/file-type-icons/fileicon-c.png differ diff --git a/resources/assets/file-type-icons/fileicon-cpp.png b/resources/assets/file-type-icons/fileicon-cpp.png new file mode 100644 index 00000000..123688f0 Binary files /dev/null and b/resources/assets/file-type-icons/fileicon-cpp.png differ diff --git a/resources/assets/file-type-icons/fileicon-deb.png b/resources/assets/file-type-icons/fileicon-deb.png new file mode 100644 index 00000000..87ca3fab Binary files /dev/null and b/resources/assets/file-type-icons/fileicon-deb.png differ diff --git a/resources/assets/file-type-icons/fileicon-djvu.png b/resources/assets/file-type-icons/fileicon-djvu.png new file mode 100644 index 00000000..1da22761 Binary files /dev/null and b/resources/assets/file-type-icons/fileicon-djvu.png differ diff --git a/resources/assets/file-type-icons/fileicon-dvi.png b/resources/assets/file-type-icons/fileicon-dvi.png new file mode 100644 index 00000000..f37878d8 Binary files /dev/null and b/resources/assets/file-type-icons/fileicon-dvi.png differ diff --git a/resources/assets/file-type-icons/fileicon-exe.png b/resources/assets/file-type-icons/fileicon-exe.png new file mode 100644 index 00000000..dc020eb8 Binary files /dev/null and b/resources/assets/file-type-icons/fileicon-exe.png differ diff --git a/resources/assets/file-type-icons/fileicon-h.png b/resources/assets/file-type-icons/fileicon-h.png new file mode 100644 index 00000000..339bf025 Binary files /dev/null and b/resources/assets/file-type-icons/fileicon-h.png differ diff --git a/resources/assets/file-type-icons/fileicon-html.png b/resources/assets/file-type-icons/fileicon-html.png new file mode 100644 index 00000000..f28f8a26 Binary files /dev/null and b/resources/assets/file-type-icons/fileicon-html.png differ diff --git a/resources/assets/file-type-icons/fileicon-iso.png b/resources/assets/file-type-icons/fileicon-iso.png new file mode 100644 index 00000000..c73d2294 Binary files /dev/null and b/resources/assets/file-type-icons/fileicon-iso.png differ diff --git a/resources/assets/file-type-icons/fileicon-java.png b/resources/assets/file-type-icons/fileicon-java.png new file mode 100644 index 00000000..a1b4f225 Binary files /dev/null and b/resources/assets/file-type-icons/fileicon-java.png differ diff --git a/resources/assets/file-type-icons/fileicon-mid.png b/resources/assets/file-type-icons/fileicon-mid.png new file mode 100644 index 00000000..ce2bebb2 Binary files /dev/null and b/resources/assets/file-type-icons/fileicon-mid.png differ diff --git a/resources/assets/file-type-icons/fileicon-mov.png b/resources/assets/file-type-icons/fileicon-mov.png new file mode 100644 index 00000000..952de1f2 Binary files /dev/null and b/resources/assets/file-type-icons/fileicon-mov.png differ diff --git a/resources/assets/file-type-icons/fileicon-o.png b/resources/assets/file-type-icons/fileicon-o.png new file mode 100644 index 00000000..f3523d96 Binary files /dev/null and b/resources/assets/file-type-icons/fileicon-o.png differ diff --git a/resources/assets/file-type-icons/fileicon-ogg.png b/resources/assets/file-type-icons/fileicon-ogg.png new file mode 100644 index 00000000..ef4d8016 Binary files /dev/null and b/resources/assets/file-type-icons/fileicon-ogg.png differ diff --git a/resources/assets/file-type-icons/fileicon-pdf.png b/resources/assets/file-type-icons/fileicon-pdf.png new file mode 100644 index 00000000..8c8da92b Binary files /dev/null and b/resources/assets/file-type-icons/fileicon-pdf.png differ diff --git a/resources/assets/file-type-icons/fileicon-ps.png b/resources/assets/file-type-icons/fileicon-ps.png new file mode 100644 index 00000000..e8728331 Binary files /dev/null and b/resources/assets/file-type-icons/fileicon-ps.png differ diff --git a/resources/assets/file-type-icons/fileicon-psd.png b/resources/assets/file-type-icons/fileicon-psd.png new file mode 100644 index 00000000..598f190e Binary files /dev/null and b/resources/assets/file-type-icons/fileicon-psd.png differ diff --git a/resources/assets/file-type-icons/fileicon-rm.png b/resources/assets/file-type-icons/fileicon-rm.png new file mode 100644 index 00000000..81dbe0b7 Binary files /dev/null and b/resources/assets/file-type-icons/fileicon-rm.png differ diff --git a/resources/assets/file-type-icons/fileicon-rpm.png b/resources/assets/file-type-icons/fileicon-rpm.png new file mode 100644 index 00000000..1903aacc Binary files /dev/null and b/resources/assets/file-type-icons/fileicon-rpm.png differ diff --git a/resources/assets/file-type-icons/fileicon-svg.png b/resources/assets/file-type-icons/fileicon-svg.png new file mode 100644 index 00000000..b782113a Binary files /dev/null and b/resources/assets/file-type-icons/fileicon-svg.png differ diff --git a/resources/assets/file-type-icons/fileicon-tar.png b/resources/assets/file-type-icons/fileicon-tar.png new file mode 100644 index 00000000..e5fd1b74 Binary files /dev/null and b/resources/assets/file-type-icons/fileicon-tar.png differ diff --git a/resources/assets/file-type-icons/fileicon-tex.png b/resources/assets/file-type-icons/fileicon-tex.png new file mode 100644 index 00000000..a4372841 Binary files /dev/null and b/resources/assets/file-type-icons/fileicon-tex.png differ diff --git a/resources/assets/file-type-icons/fileicon-ttf.png b/resources/assets/file-type-icons/fileicon-ttf.png new file mode 100644 index 00000000..1ed4e740 Binary files /dev/null and b/resources/assets/file-type-icons/fileicon-ttf.png differ diff --git a/resources/assets/file-type-icons/fileicon-txt.png b/resources/assets/file-type-icons/fileicon-txt.png new file mode 100644 index 00000000..9e988e71 Binary files /dev/null and b/resources/assets/file-type-icons/fileicon-txt.png differ diff --git a/resources/assets/file-type-icons/fileicon-xcf.png b/resources/assets/file-type-icons/fileicon-xcf.png new file mode 100644 index 00000000..1037b506 Binary files /dev/null and b/resources/assets/file-type-icons/fileicon-xcf.png differ diff --git a/resources/assets/file-type-icons/fileicon.png b/resources/assets/file-type-icons/fileicon.png new file mode 100644 index 00000000..59696a38 Binary files /dev/null and b/resources/assets/file-type-icons/fileicon.png differ diff --git a/resources/assets/licenses/cc-0.png b/resources/assets/licenses/cc-0.png new file mode 100644 index 00000000..9d3fe5f8 Binary files /dev/null and b/resources/assets/licenses/cc-0.png differ diff --git a/resources/assets/licenses/cc-by-nc-sa.png b/resources/assets/licenses/cc-by-nc-sa.png new file mode 100644 index 00000000..0d24a713 Binary files /dev/null and b/resources/assets/licenses/cc-by-nc-sa.png differ diff --git a/resources/assets/licenses/cc-by-sa.png b/resources/assets/licenses/cc-by-sa.png new file mode 100644 index 00000000..518fb647 Binary files /dev/null and b/resources/assets/licenses/cc-by-sa.png differ diff --git a/resources/assets/licenses/cc-by.png b/resources/assets/licenses/cc-by.png new file mode 100644 index 00000000..9cca2f92 Binary files /dev/null and b/resources/assets/licenses/cc-by.png differ diff --git a/resources/assets/licenses/gnu-fdl.png b/resources/assets/licenses/gnu-fdl.png new file mode 100644 index 00000000..3feaf57f Binary files /dev/null and b/resources/assets/licenses/gnu-fdl.png differ diff --git a/resources/assets/licenses/public-domain.png b/resources/assets/licenses/public-domain.png new file mode 100644 index 00000000..ebf01072 Binary files /dev/null and b/resources/assets/licenses/public-domain.png differ diff --git a/resources/assets/mediawiki.png b/resources/assets/mediawiki.png new file mode 100644 index 00000000..8c421183 Binary files /dev/null and b/resources/assets/mediawiki.png differ diff --git a/resources/assets/poweredby_mediawiki_88x31.png b/resources/assets/poweredby_mediawiki_88x31.png new file mode 100644 index 00000000..30e1d2ea Binary files /dev/null and b/resources/assets/poweredby_mediawiki_88x31.png differ diff --git a/resources/assets/wiki.png b/resources/assets/wiki.png new file mode 100644 index 00000000..48595b00 Binary files /dev/null and b/resources/assets/wiki.png differ diff --git a/resources/jquery.chosen/LICENSE b/resources/jquery.chosen/LICENSE deleted file mode 100644 index 0675dc52..00000000 --- a/resources/jquery.chosen/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -# Chosen, a Select Box Enhancer for jQuery and Protoype -## by Patrick Filler for [Harvest](http://getharvest.com) - -Available for use under the [MIT License](http://en.wikipedia.org/wiki/MIT_License) - -Copyright (c) 2011-2013 by Harvest - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/resources/jquery.chosen/chosen-sprite.png b/resources/jquery.chosen/chosen-sprite.png deleted file mode 100644 index 3611ae4a..00000000 Binary files a/resources/jquery.chosen/chosen-sprite.png and /dev/null differ diff --git a/resources/jquery.chosen/chosen-sprite@2x.png b/resources/jquery.chosen/chosen-sprite@2x.png deleted file mode 100644 index bd61d963..00000000 Binary files a/resources/jquery.chosen/chosen-sprite@2x.png and /dev/null differ diff --git a/resources/jquery.chosen/chosen.css b/resources/jquery.chosen/chosen.css deleted file mode 100644 index 17793ed7..00000000 --- a/resources/jquery.chosen/chosen.css +++ /dev/null @@ -1,440 +0,0 @@ -/* @group Base */ -.chzn-container { - font-size: 13px; - position: relative; - display: inline-block; - vertical-align: middle; - zoom: 1; - *display: inline; -} -.chzn-container .chzn-drop { - background: #fff; - border: 1px solid #aaa; - border-top: 0; - position: absolute; - top: 100%; - left: -9999px; - -webkit-box-shadow: 0 4px 5px rgba(0,0,0,.15); - -moz-box-shadow : 0 4px 5px rgba(0,0,0,.15); - box-shadow : 0 4px 5px rgba(0,0,0,.15); - z-index: 1010; - width: 100%; - -moz-box-sizing : border-box; - -ms-box-sizing : border-box; - -webkit-box-sizing: border-box; - -khtml-box-sizing : border-box; - box-sizing : border-box; -} - -.chzn-container.chzn-with-drop .chzn-drop { - left: 0; -} - -/* @end */ - -/* @group Single Chosen */ -.chzn-container-single .chzn-single { - background-color: #ffffff; - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0 ); - background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(20%, #ffffff), color-stop(50%, #f6f6f6), color-stop(52%, #eeeeee), color-stop(100%, #f4f4f4)); - background-image: -webkit-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); - background-image: -moz-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); - background-image: -o-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); - background-image: linear-gradient(#ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); - -webkit-border-radius: 5px; - -moz-border-radius : 5px; - border-radius : 5px; - -moz-background-clip : padding; - -webkit-background-clip: padding-box; - background-clip : padding-box; - border: 1px solid #aaaaaa; - -webkit-box-shadow: 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1); - -moz-box-shadow : 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1); - box-shadow : 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1); - display: block; - overflow: hidden; - white-space: nowrap; - position: relative; - height: 23px; - line-height: 24px; - padding: 0 0 0 8px; - color: #444444; - text-decoration: none; -} -.chzn-container-single .chzn-default { - color: #999; -} -.chzn-container-single .chzn-single span { - margin-right: 26px; - display: block; - overflow: hidden; - white-space: nowrap; - -o-text-overflow: ellipsis; - -ms-text-overflow: ellipsis; - text-overflow: ellipsis; -} -.chzn-container-single .chzn-single abbr { - display: block; - position: absolute; - right: 26px; - top: 6px; - width: 12px; - height: 12px; - font-size: 1px; - background: url('chosen-sprite.png') -42px 1px no-repeat; -} -.chzn-container-single .chzn-single abbr:hover { - background-position: -42px -10px; -} -.chzn-container-single.chzn-disabled .chzn-single abbr:hover { - background-position: -42px -10px; -} -.chzn-container-single .chzn-single div { - position: absolute; - right: 0; - top: 0; - display: block; - height: 100%; - width: 18px; -} -.chzn-container-single .chzn-single div b { - background: url('chosen-sprite.png') no-repeat 0px 2px; - display: block; - width: 100%; - height: 100%; -} -.chzn-container-single .chzn-search { - padding: 3px 4px; - position: relative; - margin: 0; - white-space: nowrap; - z-index: 1010; -} -.chzn-container-single .chzn-search input { - background: #fff url('chosen-sprite.png') no-repeat 100% -20px; - background: url('chosen-sprite.png') no-repeat 100% -20px, -webkit-gradient(linear, 0 0, 0 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff)); - background: url('chosen-sprite.png') no-repeat 100% -20px, -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%); - background: url('chosen-sprite.png') no-repeat 100% -20px, -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%); - background: url('chosen-sprite.png') no-repeat 100% -20px, -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%); - background: url('chosen-sprite.png') no-repeat 100% -20px, linear-gradient(#eeeeee 1%, #ffffff 15%); - margin: 1px 0; - padding: 4px 20px 4px 5px; - outline: 0; - border: 1px solid #aaa; - font-family: sans-serif; - font-size: 1em; - width: 100%; - -moz-box-sizing : border-box; - -ms-box-sizing : border-box; - -webkit-box-sizing: border-box; - -khtml-box-sizing : border-box; - box-sizing : border-box; -} -.chzn-container-single .chzn-drop { - margin-top: -1px; - -webkit-border-radius: 0 0 4px 4px; - -moz-border-radius : 0 0 4px 4px; - border-radius : 0 0 4px 4px; - -moz-background-clip : padding; - -webkit-background-clip: padding-box; - background-clip : padding-box; -} -.chzn-container-single-nosearch .chzn-search { - position: absolute; - left: -9999px; -} -/* @end */ - -/* @group Multi Chosen */ -.chzn-container-multi .chzn-choices { - background-color: #fff; - background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff)); - background-image: -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%); - background-image: -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%); - background-image: -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%); - background-image: linear-gradient(#eeeeee 1%, #ffffff 15%); - border: 1px solid #aaa; - margin: 0; - padding: 0; - cursor: text; - overflow: hidden; - height: auto !important; - height: 1%; - position: relative; - width: 100%; - -moz-box-sizing : border-box; - -ms-box-sizing : border-box; - -webkit-box-sizing: border-box; - -khtml-box-sizing : border-box; - box-sizing : border-box; -} -.chzn-container-multi .chzn-choices li { - float: left; - list-style: none; -} -.chzn-container-multi .chzn-choices .search-field { - white-space: nowrap; - margin: 0; - padding: 0; -} -.chzn-container-multi .chzn-choices .search-field input { - color: #666; - background: transparent !important; - border: 0 !important; - font-family: sans-serif; - font-size: 100%; - height: 15px; - padding: 5px; - margin: 1px 0; - outline: 0; - -webkit-box-shadow: none; - -moz-box-shadow : none; - box-shadow : none; -} -.chzn-container-multi .chzn-choices .search-field .default { - color: #999; -} -.chzn-container-multi .chzn-choices .search-choice { - -webkit-border-radius: 3px; - -moz-border-radius : 3px; - border-radius : 3px; - -moz-background-clip : padding; - -webkit-background-clip: padding-box; - background-clip : padding-box; - background-color: #e4e4e4; - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f4f4', endColorstr='#eeeeee', GradientType=0 ); - background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee)); - background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); - background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); - background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); - background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); - -webkit-box-shadow: 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05); - -moz-box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05); - box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05); - color: #333; - border: 1px solid #aaaaaa; - line-height: 13px; - padding: 3px 20px 3px 5px; - margin: 3px 0 3px 5px; - position: relative; - cursor: default; -} -.chzn-container-multi .chzn-choices .search-choice.search-choice-disabled { - background-color: #e4e4e4; - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f4f4', endColorstr='#eeeeee', GradientType=0 ); - background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee)); - background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); - background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); - background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); - background-image: -ms-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); - background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); - color: #666; - border: 1px solid #cccccc; - padding-right: 5px; -} -.chzn-container-multi .chzn-choices .search-choice-focus { - background: #d4d4d4; -} -.chzn-container-multi .chzn-choices .search-choice .search-choice-close { - display: block; - position: absolute; - right: 3px; - top: 4px; - width: 12px; - height: 12px; - font-size: 1px; - background: url('chosen-sprite.png') -42px 1px no-repeat; -} -.chzn-container-multi .chzn-choices .search-choice .search-choice-close:hover { - background-position: -42px -10px; -} -.chzn-container-multi .chzn-choices .search-choice-focus .search-choice-close { - background-position: -42px -10px; -} -/* @end */ - -/* @group Results */ -.chzn-container .chzn-results { - margin: 0 4px 4px 0; - max-height: 240px; - padding: 0 0 0 4px; - position: relative; - overflow-x: hidden; - overflow-y: auto; - -webkit-overflow-scrolling: touch; -} -.chzn-container-multi .chzn-results { - margin: 0; - padding: 0; -} -.chzn-container .chzn-results li { - display: none; - line-height: 15px; - padding: 5px 6px; - margin: 0; - list-style: none; -} -.chzn-container .chzn-results .active-result { - cursor: pointer; - display: list-item; -} -.chzn-container .chzn-results .highlighted { - background-color: #3875d7; - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3875d7', endColorstr='#2a62bc', GradientType=0 ); - background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(20%, #3875d7), color-stop(90%, #2a62bc)); - background-image: -webkit-linear-gradient(top, #3875d7 20%, #2a62bc 90%); - background-image: -moz-linear-gradient(top, #3875d7 20%, #2a62bc 90%); - background-image: -o-linear-gradient(top, #3875d7 20%, #2a62bc 90%); - background-image: linear-gradient(#3875d7 20%, #2a62bc 90%); - color: #fff; -} -.chzn-container .chzn-results li em { - background: #feffde; - font-style: normal; -} -.chzn-container .chzn-results .highlighted em { - background: transparent; -} -.chzn-container .chzn-results .no-results { - background: #f4f4f4; - display: list-item; -} -.chzn-container .chzn-results .group-result { - cursor: default; - color: #999; - font-weight: bold; -} -.chzn-container .chzn-results .group-option { - padding-left: 15px; -} -.chzn-container-multi .chzn-drop .result-selected { - display: none; -} -.chzn-container .chzn-results-scroll { - background: white; - margin: 0 4px; - position: absolute; - text-align: center; - width: 321px; /* This should by dynamic with js */ - z-index: 1; -} -.chzn-container .chzn-results-scroll span { - display: inline-block; - height: 17px; - text-indent: -5000px; - width: 9px; -} -.chzn-container .chzn-results-scroll-down { - bottom: 0; -} -.chzn-container .chzn-results-scroll-down span { - background: url('chosen-sprite.png') no-repeat -4px -3px; -} -.chzn-container .chzn-results-scroll-up span { - background: url('chosen-sprite.png') no-repeat -22px -3px; -} -/* @end */ - -/* @group Active */ -.chzn-container-active .chzn-single { - -webkit-box-shadow: 0 0 5px rgba(0,0,0,.3); - -moz-box-shadow : 0 0 5px rgba(0,0,0,.3); - box-shadow : 0 0 5px rgba(0,0,0,.3); - border: 1px solid #5897fb; -} -.chzn-container-active.chzn-with-drop .chzn-single { - border: 1px solid #aaa; - -webkit-box-shadow: 0 1px 0 #fff inset; - -moz-box-shadow : 0 1px 0 #fff inset; - box-shadow : 0 1px 0 #fff inset; - background-color: #eee; - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0 ); - background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(20%, #eeeeee), color-stop(80%, #ffffff)); - background-image: -webkit-linear-gradient(top, #eeeeee 20%, #ffffff 80%); - background-image: -moz-linear-gradient(top, #eeeeee 20%, #ffffff 80%); - background-image: -o-linear-gradient(top, #eeeeee 20%, #ffffff 80%); - background-image: linear-gradient(#eeeeee 20%, #ffffff 80%); - -webkit-border-bottom-left-radius : 0; - -webkit-border-bottom-right-radius: 0; - -moz-border-radius-bottomleft : 0; - -moz-border-radius-bottomright: 0; - border-bottom-left-radius : 0; - border-bottom-right-radius: 0; -} -.chzn-container-active.chzn-with-drop .chzn-single div { - background: transparent; - border-left: none; -} -.chzn-container-active.chzn-with-drop .chzn-single div b { - background-position: -18px 2px; -} -.chzn-container-active .chzn-choices { - -webkit-box-shadow: 0 0 5px rgba(0,0,0,.3); - -moz-box-shadow : 0 0 5px rgba(0,0,0,.3); - box-shadow : 0 0 5px rgba(0,0,0,.3); - border: 1px solid #5897fb; -} -.chzn-container-active .chzn-choices .search-field input { - color: #111 !important; -} -/* @end */ - -/* @group Disabled Support */ -.chzn-disabled { - cursor: default; - opacity:0.5 !important; -} -.chzn-disabled .chzn-single { - cursor: default; -} -.chzn-disabled .chzn-choices .search-choice .search-choice-close { - cursor: default; -} - -/* @group Right to Left */ -.chzn-rtl { text-align: right; } -.chzn-rtl .chzn-single { padding: 0 8px 0 0; overflow: visible; } -.chzn-rtl .chzn-single span { margin-left: 26px; margin-right: 0; direction: rtl; } - -.chzn-rtl .chzn-single div { left: 3px; right: auto; } -.chzn-rtl .chzn-single abbr { - left: 26px; - right: auto; -} -.chzn-rtl .chzn-choices .search-field input { direction: rtl; } -.chzn-rtl .chzn-choices li { float: right; } -.chzn-rtl .chzn-choices .search-choice { padding: 3px 5px 3px 19px; margin: 3px 5px 3px 0; } -.chzn-rtl .chzn-choices .search-choice .search-choice-close { left: 4px; right: auto; } -.chzn-rtl .chzn-search { left: 9999px; } -.chzn-rtl.chzn-with-drop .chzn-search { left: 0px; } -.chzn-rtl .chzn-drop { left: 9999px; } -.chzn-rtl.chzn-container-single .chzn-results { margin: 0 0 4px 4px; padding: 0 4px 0 0; } -.chzn-rtl .chzn-results .group-option { padding-left: 0; padding-right: 15px; } -.chzn-rtl.chzn-container-active.chzn-with-drop .chzn-single div { border-right: none; } -.chzn-rtl .chzn-search input { - background: #fff url('chosen-sprite.png') no-repeat -30px -20px; - background: url('chosen-sprite.png') no-repeat -30px -20px, -webkit-gradient(linear, 0 0, 0 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff)); - background: url('chosen-sprite.png') no-repeat -30px -20px, -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%); - background: url('chosen-sprite.png') no-repeat -30px -20px, -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%); - background: url('chosen-sprite.png') no-repeat -30px -20px, -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%); - background: url('chosen-sprite.png') no-repeat -30px -20px, linear-gradient(#eeeeee 1%, #ffffff 15%); - padding: 4px 5px 4px 20px; - direction: rtl; -} -.chzn-container-single.chzn-rtl .chzn-single div b { - background-position: 6px 2px; -} -.chzn-container-single.chzn-rtl.chzn-with-drop .chzn-single div b { - background-position: -12px 2px; -} -/* @end */ - -/* @group Retina compatibility */ -@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-resolution: 144dpi) { - .chzn-rtl .chzn-search input, .chzn-container-single .chzn-single abbr, .chzn-container-single .chzn-single div b, .chzn-container-single .chzn-search input, .chzn-container-multi .chzn-choices .search-choice .search-choice-close, .chzn-container .chzn-results-scroll-down span, .chzn-container .chzn-results-scroll-up span { - background-image: url('chosen-sprite@2x.png') !important; - background-repeat: no-repeat !important; - background-size: 52px 37px !important; - } -} -/* @end */ diff --git a/resources/jquery.chosen/chosen.jquery.js b/resources/jquery.chosen/chosen.jquery.js deleted file mode 100644 index 745174f7..00000000 --- a/resources/jquery.chosen/chosen.jquery.js +++ /dev/null @@ -1,1103 +0,0 @@ -// Chosen, a Select Box Enhancer for jQuery and Protoype -// by Patrick Filler for Harvest, http://getharvest.com -// -// Version 0.9.14 -// Full source at https://github.com/harvesthq/chosen -// Copyright (c) 2011 Harvest http://getharvest.com - -// MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md -// This file is generated by `cake build`, do not edit it by hand. -(function() { - var SelectParser; - - SelectParser = (function() { - - function SelectParser() { - this.options_index = 0; - this.parsed = []; - } - - SelectParser.prototype.add_node = function(child) { - if (child.nodeName.toUpperCase() === "OPTGROUP") { - return this.add_group(child); - } else { - return this.add_option(child); - } - }; - - SelectParser.prototype.add_group = function(group) { - var group_position, option, _i, _len, _ref, _results; - group_position = this.parsed.length; - this.parsed.push({ - array_index: group_position, - group: true, - label: group.label, - children: 0, - disabled: group.disabled - }); - _ref = group.childNodes; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - option = _ref[_i]; - _results.push(this.add_option(option, group_position, group.disabled)); - } - return _results; - }; - - SelectParser.prototype.add_option = function(option, group_position, group_disabled) { - if (option.nodeName.toUpperCase() === "OPTION") { - if (option.text !== "") { - if (group_position != null) { - this.parsed[group_position].children += 1; - } - this.parsed.push({ - array_index: this.parsed.length, - options_index: this.options_index, - value: option.value, - text: option.text, - html: option.innerHTML, - selected: option.selected, - disabled: group_disabled === true ? group_disabled : option.disabled, - group_array_index: group_position, - classes: option.className, - style: option.style.cssText - }); - } else { - this.parsed.push({ - array_index: this.parsed.length, - options_index: this.options_index, - empty: true - }); - } - return this.options_index += 1; - } - }; - - return SelectParser; - - })(); - - SelectParser.select_to_array = function(select) { - var child, parser, _i, _len, _ref; - parser = new SelectParser(); - _ref = select.childNodes; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - child = _ref[_i]; - parser.add_node(child); - } - return parser.parsed; - }; - - this.SelectParser = SelectParser; - -}).call(this); - -/* -Chosen source: generate output using 'cake build' -Copyright (c) 2011 by Harvest -*/ - - -(function() { - var AbstractChosen, root; - - root = this; - - AbstractChosen = (function() { - - function AbstractChosen(form_field, options) { - this.form_field = form_field; - this.options = options != null ? options : {}; - if (!AbstractChosen.browser_is_supported()) { - return; - } - this.is_multiple = this.form_field.multiple; - this.set_default_text(); - this.set_default_values(); - this.setup(); - this.set_up_html(); - this.register_observers(); - this.finish_setup(); - } - - AbstractChosen.prototype.set_default_values = function() { - var _this = this; - this.click_test_action = function(evt) { - return _this.test_active_click(evt); - }; - this.activate_action = function(evt) { - return _this.activate_field(evt); - }; - this.active_field = false; - this.mouse_on_container = false; - this.results_showing = false; - this.result_highlighted = null; - this.result_single_selected = null; - this.allow_single_deselect = (this.options.allow_single_deselect != null) && (this.form_field.options[0] != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false; - this.disable_search_threshold = this.options.disable_search_threshold || 0; - this.disable_search = this.options.disable_search || false; - this.enable_split_word_search = this.options.enable_split_word_search != null ? this.options.enable_split_word_search : true; - this.search_contains = this.options.search_contains || false; - this.choices = 0; - this.single_backstroke_delete = this.options.single_backstroke_delete || false; - this.max_selected_options = this.options.max_selected_options || Infinity; - return this.inherit_select_classes = this.options.inherit_select_classes || false; - }; - - AbstractChosen.prototype.set_default_text = function() { - if (this.form_field.getAttribute("data-placeholder")) { - this.default_text = this.form_field.getAttribute("data-placeholder"); - } else if (this.is_multiple) { - this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || AbstractChosen.default_multiple_text; - } else { - this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || AbstractChosen.default_single_text; - } - return this.results_none_found = this.form_field.getAttribute("data-no_results_text") || this.options.no_results_text || AbstractChosen.default_no_result_text; - }; - - AbstractChosen.prototype.mouse_enter = function() { - return this.mouse_on_container = true; - }; - - AbstractChosen.prototype.mouse_leave = function() { - return this.mouse_on_container = false; - }; - - AbstractChosen.prototype.input_focus = function(evt) { - var _this = this; - if (this.is_multiple) { - if (!this.active_field) { - return setTimeout((function() { - return _this.container_mousedown(); - }), 50); - } - } else { - if (!this.active_field) { - return this.activate_field(); - } - } - }; - - AbstractChosen.prototype.input_blur = function(evt) { - var _this = this; - if (!this.mouse_on_container) { - this.active_field = false; - return setTimeout((function() { - return _this.blur_test(); - }), 100); - } - }; - - AbstractChosen.prototype.result_add_option = function(option) { - var classes, style; - if (!option.disabled) { - option.dom_id = this.container_id + "_o_" + option.array_index; - classes = option.selected && this.is_multiple ? [] : ["active-result"]; - if (option.selected) { - classes.push("result-selected"); - } - if (option.group_array_index != null) { - classes.push("group-option"); - } - if (option.classes !== "") { - classes.push(option.classes); - } - style = option.style.cssText !== "" ? " style=\"" + option.style + "\"" : ""; - return '
  • ' + option.html + '
  • '; - } else { - return ""; - } - }; - - AbstractChosen.prototype.results_update_field = function() { - this.set_default_text(); - if (!this.is_multiple) { - this.results_reset_cleanup(); - } - this.result_clear_highlight(); - this.result_single_selected = null; - return this.results_build(); - }; - - AbstractChosen.prototype.results_toggle = function() { - if (this.results_showing) { - return this.results_hide(); - } else { - return this.results_show(); - } - }; - - AbstractChosen.prototype.results_search = function(evt) { - if (this.results_showing) { - return this.winnow_results(); - } else { - return this.results_show(); - } - }; - - AbstractChosen.prototype.choices_click = function(evt) { - evt.preventDefault(); - if (!this.results_showing) { - return this.results_show(); - } - }; - - AbstractChosen.prototype.keyup_checker = function(evt) { - var stroke, _ref; - stroke = (_ref = evt.which) != null ? _ref : evt.keyCode; - this.search_field_scale(); - switch (stroke) { - case 8: - if (this.is_multiple && this.backstroke_length < 1 && this.choices > 0) { - return this.keydown_backstroke(); - } else if (!this.pending_backstroke) { - this.result_clear_highlight(); - return this.results_search(); - } - break; - case 13: - evt.preventDefault(); - if (this.results_showing) { - return this.result_select(evt); - } - break; - case 27: - if (this.results_showing) { - this.results_hide(); - } - return true; - case 9: - case 38: - case 40: - case 16: - case 91: - case 17: - break; - default: - return this.results_search(); - } - }; - - AbstractChosen.prototype.generate_field_id = function() { - var new_id; - new_id = this.generate_random_id(); - this.form_field.id = new_id; - return new_id; - }; - - AbstractChosen.prototype.generate_random_char = function() { - var chars, newchar, rand; - chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; - rand = Math.floor(Math.random() * chars.length); - return newchar = chars.substring(rand, rand + 1); - }; - - AbstractChosen.prototype.container_width = function() { - var width; - if (this.options.width != null) { - return this.options.width; - } - width = window.getComputedStyle != null ? parseFloat(window.getComputedStyle(this.form_field).getPropertyValue('width')) : (typeof jQuery !== "undefined" && jQuery !== null) && (this.form_field_jq != null) ? this.form_field_jq.outerWidth() : this.form_field.getWidth(); - return width + "px"; - }; - - AbstractChosen.browser_is_supported = function() { - var _ref; - if (window.navigator.appName === "Microsoft Internet Explorer") { - return (null !== (_ref = document.documentMode) && _ref >= 8); - } - return true; - }; - - AbstractChosen.default_multiple_text = "Select Some Options"; - - AbstractChosen.default_single_text = "Select an Option"; - - AbstractChosen.default_no_result_text = "No results match"; - - return AbstractChosen; - - })(); - - root.AbstractChosen = AbstractChosen; - -}).call(this); - -/* -Chosen source: generate output using 'cake build' -Copyright (c) 2011 by Harvest -*/ - - -(function() { - var $, Chosen, root, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - - root = this; - - $ = jQuery; - - $.fn.extend({ - chosen: function(options) { - if (!AbstractChosen.browser_is_supported()) { - return this; - } - return this.each(function(input_field) { - var $this; - $this = $(this); - if (!$this.hasClass("chzn-done")) { - return $this.data('chosen', new Chosen(this, options)); - } - }); - } - }); - - Chosen = (function(_super) { - - __extends(Chosen, _super); - - function Chosen() { - return Chosen.__super__.constructor.apply(this, arguments); - } - - Chosen.prototype.setup = function() { - this.form_field_jq = $(this.form_field); - this.current_selectedIndex = this.form_field.selectedIndex; - return this.is_rtl = this.form_field_jq.hasClass("chzn-rtl"); - }; - - Chosen.prototype.finish_setup = function() { - return this.form_field_jq.addClass("chzn-done"); - }; - - Chosen.prototype.set_up_html = function() { - var container_classes, container_props; - this.container_id = this.form_field.id.length ? this.form_field.id.replace(/[^\w]/g, '_') : this.generate_field_id(); - this.container_id += "_chzn"; - container_classes = ["chzn-container"]; - container_classes.push("chzn-container-" + (this.is_multiple ? "multi" : "single")); - if (this.inherit_select_classes && this.form_field.className) { - container_classes.push(this.form_field.className); - } - if (this.is_rtl) { - container_classes.push("chzn-rtl"); - } - container_props = { - 'id': this.container_id, - 'class': container_classes.join(' '), - 'style': "width: " + (this.container_width()) + ";", - 'title': this.form_field.title - }; - this.container = $("
    ", container_props); - if (this.is_multiple) { - this.container.html('
      '); - } else { - this.container.html('' + this.default_text + '
        '); - } - this.form_field_jq.hide().after(this.container); - this.dropdown = this.container.find('div.chzn-drop').first(); - this.search_field = this.container.find('input').first(); - this.search_results = this.container.find('ul.chzn-results').first(); - this.search_field_scale(); - this.search_no_results = this.container.find('li.no-results').first(); - if (this.is_multiple) { - this.search_choices = this.container.find('ul.chzn-choices').first(); - this.search_container = this.container.find('li.search-field').first(); - } else { - this.search_container = this.container.find('div.chzn-search').first(); - this.selected_item = this.container.find('.chzn-single').first(); - } - this.results_build(); - this.set_tab_index(); - this.set_label_behavior(); - return this.form_field_jq.trigger("liszt:ready", { - chosen: this - }); - }; - - Chosen.prototype.register_observers = function() { - var _this = this; - this.container.mousedown(function(evt) { - _this.container_mousedown(evt); - }); - this.container.mouseup(function(evt) { - _this.container_mouseup(evt); - }); - this.container.mouseenter(function(evt) { - _this.mouse_enter(evt); - }); - this.container.mouseleave(function(evt) { - _this.mouse_leave(evt); - }); - this.search_results.mouseup(function(evt) { - _this.search_results_mouseup(evt); - }); - this.search_results.mouseover(function(evt) { - _this.search_results_mouseover(evt); - }); - this.search_results.mouseout(function(evt) { - _this.search_results_mouseout(evt); - }); - this.search_results.bind('mousewheel DOMMouseScroll', function(evt) { - _this.search_results_mousewheel(evt); - }); - this.form_field_jq.bind("liszt:updated", function(evt) { - _this.results_update_field(evt); - }); - this.form_field_jq.bind("liszt:activate", function(evt) { - _this.activate_field(evt); - }); - this.form_field_jq.bind("liszt:open", function(evt) { - _this.container_mousedown(evt); - }); - this.search_field.blur(function(evt) { - _this.input_blur(evt); - }); - this.search_field.keyup(function(evt) { - _this.keyup_checker(evt); - }); - this.search_field.keydown(function(evt) { - _this.keydown_checker(evt); - }); - this.search_field.focus(function(evt) { - _this.input_focus(evt); - }); - if (this.is_multiple) { - return this.search_choices.click(function(evt) { - _this.choices_click(evt); - }); - } else { - return this.container.click(function(evt) { - evt.preventDefault(); - }); - } - }; - - Chosen.prototype.search_field_disabled = function() { - this.is_disabled = this.form_field_jq[0].disabled; - if (this.is_disabled) { - this.container.addClass('chzn-disabled'); - this.search_field[0].disabled = true; - if (!this.is_multiple) { - this.selected_item.unbind("focus", this.activate_action); - } - return this.close_field(); - } else { - this.container.removeClass('chzn-disabled'); - this.search_field[0].disabled = false; - if (!this.is_multiple) { - return this.selected_item.bind("focus", this.activate_action); - } - } - }; - - Chosen.prototype.container_mousedown = function(evt) { - if (!this.is_disabled) { - if (evt && evt.type === "mousedown" && !this.results_showing) { - evt.preventDefault(); - } - if (!((evt != null) && ($(evt.target)).hasClass("search-choice-close"))) { - if (!this.active_field) { - if (this.is_multiple) { - this.search_field.val(""); - } - $(document).click(this.click_test_action); - this.results_show(); - } else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chzn-single").length)) { - evt.preventDefault(); - this.results_toggle(); - } - return this.activate_field(); - } - } - }; - - Chosen.prototype.container_mouseup = function(evt) { - if (evt.target.nodeName === "ABBR" && !this.is_disabled) { - return this.results_reset(evt); - } - }; - - Chosen.prototype.search_results_mousewheel = function(evt) { - var delta, _ref, _ref1; - delta = -((_ref = evt.originalEvent) != null ? _ref.wheelDelta : void 0) || ((_ref1 = evt.originialEvent) != null ? _ref1.detail : void 0); - if (delta != null) { - evt.preventDefault(); - if (evt.type === 'DOMMouseScroll') { - delta = delta * 40; - } - return this.search_results.scrollTop(delta + this.search_results.scrollTop()); - } - }; - - Chosen.prototype.blur_test = function(evt) { - if (!this.active_field && this.container.hasClass("chzn-container-active")) { - return this.close_field(); - } - }; - - Chosen.prototype.close_field = function() { - $(document).unbind("click", this.click_test_action); - this.active_field = false; - this.results_hide(); - this.container.removeClass("chzn-container-active"); - this.winnow_results_clear(); - this.clear_backstroke(); - this.show_search_field_default(); - return this.search_field_scale(); - }; - - Chosen.prototype.activate_field = function() { - this.container.addClass("chzn-container-active"); - this.active_field = true; - this.search_field.val(this.search_field.val()); - return this.search_field.focus(); - }; - - Chosen.prototype.test_active_click = function(evt) { - if ($(evt.target).parents('#' + this.container_id).length) { - return this.active_field = true; - } else { - return this.close_field(); - } - }; - - Chosen.prototype.results_build = function() { - var content, data, _i, _len, _ref; - this.parsing = true; - this.results_data = root.SelectParser.select_to_array(this.form_field); - if (this.is_multiple && this.choices > 0) { - this.search_choices.find("li.search-choice").remove(); - this.choices = 0; - } else if (!this.is_multiple) { - this.selected_item.addClass("chzn-default").find("span").text(this.default_text); - if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) { - this.container.addClass("chzn-container-single-nosearch"); - } else { - this.container.removeClass("chzn-container-single-nosearch"); - } - } - content = ''; - _ref = this.results_data; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - data = _ref[_i]; - if (data.group) { - content += this.result_add_group(data); - } else if (!data.empty) { - content += this.result_add_option(data); - if (data.selected && this.is_multiple) { - this.choice_build(data); - } else if (data.selected && !this.is_multiple) { - this.selected_item.removeClass("chzn-default").find("span").text(data.text); - if (this.allow_single_deselect) { - this.single_deselect_control_build(); - } - } - } - } - this.search_field_disabled(); - this.show_search_field_default(); - this.search_field_scale(); - this.search_results.html(content); - return this.parsing = false; - }; - - Chosen.prototype.result_add_group = function(group) { - if (!group.disabled) { - group.dom_id = this.container_id + "_g_" + group.array_index; - return '
      • ' + $("
        ").text(group.label).html() + '
      • '; - } else { - return ""; - } - }; - - Chosen.prototype.result_do_highlight = function(el) { - var high_bottom, high_top, maxHeight, visible_bottom, visible_top; - if (el.length) { - this.result_clear_highlight(); - this.result_highlight = el; - this.result_highlight.addClass("highlighted"); - maxHeight = parseInt(this.search_results.css("maxHeight"), 10); - visible_top = this.search_results.scrollTop(); - visible_bottom = maxHeight + visible_top; - high_top = this.result_highlight.position().top + this.search_results.scrollTop(); - high_bottom = high_top + this.result_highlight.outerHeight(); - if (high_bottom >= visible_bottom) { - return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0); - } else if (high_top < visible_top) { - return this.search_results.scrollTop(high_top); - } - } - }; - - Chosen.prototype.result_clear_highlight = function() { - if (this.result_highlight) { - this.result_highlight.removeClass("highlighted"); - } - return this.result_highlight = null; - }; - - Chosen.prototype.results_show = function() { - if (this.result_single_selected != null) { - this.result_do_highlight(this.result_single_selected); - } else if (this.is_multiple && this.max_selected_options <= this.choices) { - this.form_field_jq.trigger("liszt:maxselected", { - chosen: this - }); - return false; - } - this.container.addClass("chzn-with-drop"); - this.form_field_jq.trigger("liszt:showing_dropdown", { - chosen: this - }); - this.results_showing = true; - this.search_field.focus(); - this.search_field.val(this.search_field.val()); - return this.winnow_results(); - }; - - Chosen.prototype.results_hide = function() { - this.result_clear_highlight(); - this.container.removeClass("chzn-with-drop"); - this.form_field_jq.trigger("liszt:hiding_dropdown", { - chosen: this - }); - return this.results_showing = false; - }; - - Chosen.prototype.set_tab_index = function(el) { - var ti; - if (this.form_field_jq.attr("tabindex")) { - ti = this.form_field_jq.attr("tabindex"); - this.form_field_jq.attr("tabindex", -1); - return this.search_field.attr("tabindex", ti); - } - }; - - Chosen.prototype.set_label_behavior = function() { - var _this = this; - this.form_field_label = this.form_field_jq.parents("label"); - if (!this.form_field_label.length && this.form_field.id.length) { - this.form_field_label = $("label[for=" + this.form_field.id + "]"); - } - if (this.form_field_label.length > 0) { - return this.form_field_label.click(function(evt) { - if (_this.is_multiple) { - return _this.container_mousedown(evt); - } else { - return _this.activate_field(); - } - }); - } - }; - - Chosen.prototype.show_search_field_default = function() { - if (this.is_multiple && this.choices < 1 && !this.active_field) { - this.search_field.val(this.default_text); - return this.search_field.addClass("default"); - } else { - this.search_field.val(""); - return this.search_field.removeClass("default"); - } - }; - - Chosen.prototype.search_results_mouseup = function(evt) { - var target; - target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first(); - if (target.length) { - this.result_highlight = target; - this.result_select(evt); - return this.search_field.focus(); - } - }; - - Chosen.prototype.search_results_mouseover = function(evt) { - var target; - target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first(); - if (target) { - return this.result_do_highlight(target); - } - }; - - Chosen.prototype.search_results_mouseout = function(evt) { - if ($(evt.target).hasClass("active-result" || $(evt.target).parents('.active-result').first())) { - return this.result_clear_highlight(); - } - }; - - Chosen.prototype.choice_build = function(item) { - var choice_id, html, link, - _this = this; - if (this.is_multiple && this.max_selected_options <= this.choices) { - this.form_field_jq.trigger("liszt:maxselected", { - chosen: this - }); - return false; - } - choice_id = this.container_id + "_c_" + item.array_index; - this.choices += 1; - if (item.disabled) { - html = '
      • ' + item.html + '
      • '; - } else { - html = '
      • ' + item.html + '
      • '; - } - this.search_container.before(html); - link = $('#' + choice_id).find("a").first(); - return link.click(function(evt) { - return _this.choice_destroy_link_click(evt); - }); - }; - - Chosen.prototype.choice_destroy_link_click = function(evt) { - evt.preventDefault(); - evt.stopPropagation(); - if (!this.is_disabled) { - return this.choice_destroy($(evt.target)); - } - }; - - Chosen.prototype.choice_destroy = function(link) { - if (this.result_deselect(link.attr("rel"))) { - this.choices -= 1; - this.show_search_field_default(); - if (this.is_multiple && this.choices > 0 && this.search_field.val().length < 1) { - this.results_hide(); - } - link.parents('li').first().remove(); - return this.search_field_scale(); - } - }; - - Chosen.prototype.results_reset = function() { - this.form_field.options[0].selected = true; - this.selected_item.find("span").text(this.default_text); - if (!this.is_multiple) { - this.selected_item.addClass("chzn-default"); - } - this.show_search_field_default(); - this.results_reset_cleanup(); - this.form_field_jq.trigger("change"); - if (this.active_field) { - return this.results_hide(); - } - }; - - Chosen.prototype.results_reset_cleanup = function() { - this.current_selectedIndex = this.form_field.selectedIndex; - return this.selected_item.find("abbr").remove(); - }; - - Chosen.prototype.result_select = function(evt) { - var high, high_id, item, position; - if (this.result_highlight) { - high = this.result_highlight; - high_id = high.attr("id"); - this.result_clear_highlight(); - if (this.is_multiple) { - this.result_deactivate(high); - } else { - this.search_results.find(".result-selected").removeClass("result-selected"); - this.result_single_selected = high; - this.selected_item.removeClass("chzn-default"); - } - high.addClass("result-selected"); - position = high_id.substr(high_id.lastIndexOf("_") + 1); - item = this.results_data[position]; - item.selected = true; - this.form_field.options[item.options_index].selected = true; - if (this.is_multiple) { - this.choice_build(item); - } else { - this.selected_item.find("span").first().text(item.text); - if (this.allow_single_deselect) { - this.single_deselect_control_build(); - } - } - if (!((evt.metaKey || evt.ctrlKey) && this.is_multiple)) { - this.results_hide(); - } - this.search_field.val(""); - if (this.is_multiple || this.form_field.selectedIndex !== this.current_selectedIndex) { - this.form_field_jq.trigger("change", { - 'selected': this.form_field.options[item.options_index].value - }); - } - this.current_selectedIndex = this.form_field.selectedIndex; - return this.search_field_scale(); - } - }; - - Chosen.prototype.result_activate = function(el) { - return el.addClass("active-result"); - }; - - Chosen.prototype.result_deactivate = function(el) { - return el.removeClass("active-result"); - }; - - Chosen.prototype.result_deselect = function(pos) { - var result, result_data; - result_data = this.results_data[pos]; - if (!this.form_field.options[result_data.options_index].disabled) { - result_data.selected = false; - this.form_field.options[result_data.options_index].selected = false; - result = $("#" + this.container_id + "_o_" + pos); - result.removeClass("result-selected").addClass("active-result").show(); - this.result_clear_highlight(); - this.winnow_results(); - this.form_field_jq.trigger("change", { - deselected: this.form_field.options[result_data.options_index].value - }); - this.search_field_scale(); - return true; - } else { - return false; - } - }; - - Chosen.prototype.single_deselect_control_build = function() { - if (this.allow_single_deselect && this.selected_item.find("abbr").length < 1) { - return this.selected_item.find("span").first().after(""); - } - }; - - Chosen.prototype.winnow_results = function() { - var found, option, part, parts, regex, regexAnchor, result, result_id, results, searchText, startpos, text, zregex, _i, _j, _len, _len1, _ref; - this.no_results_clear(); - results = 0; - searchText = this.search_field.val() === this.default_text ? "" : $('
        ').text($.trim(this.search_field.val())).html(); - regexAnchor = this.search_contains ? "" : "^"; - regex = new RegExp(regexAnchor + searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), 'i'); - zregex = new RegExp(searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), 'i'); - _ref = this.results_data; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - option = _ref[_i]; - if (!option.disabled && !option.empty) { - if (option.group) { - $('#' + option.dom_id).css('display', 'none'); - } else if (!(this.is_multiple && option.selected)) { - found = false; - result_id = option.dom_id; - result = $("#" + result_id); - if (regex.test(option.html)) { - found = true; - results += 1; - } else if (this.enable_split_word_search && (option.html.indexOf(" ") >= 0 || option.html.indexOf("[") === 0)) { - parts = option.html.replace(/\[|\]/g, "").split(" "); - if (parts.length) { - for (_j = 0, _len1 = parts.length; _j < _len1; _j++) { - part = parts[_j]; - if (regex.test(part)) { - found = true; - results += 1; - } - } - } - } - if (found) { - if (searchText.length) { - startpos = option.html.search(zregex); - text = option.html.substr(0, startpos + searchText.length) + '' + option.html.substr(startpos + searchText.length); - text = text.substr(0, startpos) + '' + text.substr(startpos); - } else { - text = option.html; - } - result.html(text); - this.result_activate(result); - if (option.group_array_index != null) { - $("#" + this.results_data[option.group_array_index].dom_id).css('display', 'list-item'); - } - } else { - if (this.result_highlight && result_id === this.result_highlight.attr('id')) { - this.result_clear_highlight(); - } - this.result_deactivate(result); - } - } - } - } - if (results < 1 && searchText.length) { - return this.no_results(searchText); - } else { - return this.winnow_results_set_highlight(); - } - }; - - Chosen.prototype.winnow_results_clear = function() { - var li, lis, _i, _len, _results; - this.search_field.val(""); - lis = this.search_results.find("li"); - _results = []; - for (_i = 0, _len = lis.length; _i < _len; _i++) { - li = lis[_i]; - li = $(li); - if (li.hasClass("group-result")) { - _results.push(li.css('display', 'auto')); - } else if (!this.is_multiple || !li.hasClass("result-selected")) { - _results.push(this.result_activate(li)); - } else { - _results.push(void 0); - } - } - return _results; - }; - - Chosen.prototype.winnow_results_set_highlight = function() { - var do_high, selected_results; - if (!this.result_highlight) { - selected_results = !this.is_multiple ? this.search_results.find(".result-selected.active-result") : []; - do_high = selected_results.length ? selected_results.first() : this.search_results.find(".active-result").first(); - if (do_high != null) { - return this.result_do_highlight(do_high); - } - } - }; - - Chosen.prototype.no_results = function(terms) { - var no_results_html; - no_results_html = $('
      • ' + this.results_none_found + ' ""
      • '); - no_results_html.find("span").first().html(terms); - return this.search_results.append(no_results_html); - }; - - Chosen.prototype.no_results_clear = function() { - return this.search_results.find(".no-results").remove(); - }; - - Chosen.prototype.keydown_arrow = function() { - var first_active, next_sib; - if (!this.result_highlight) { - first_active = this.search_results.find("li.active-result").first(); - if (first_active) { - this.result_do_highlight($(first_active)); - } - } else if (this.results_showing) { - next_sib = this.result_highlight.nextAll("li.active-result").first(); - if (next_sib) { - this.result_do_highlight(next_sib); - } - } - if (!this.results_showing) { - return this.results_show(); - } - }; - - Chosen.prototype.keyup_arrow = function() { - var prev_sibs; - if (!this.results_showing && !this.is_multiple) { - return this.results_show(); - } else if (this.result_highlight) { - prev_sibs = this.result_highlight.prevAll("li.active-result"); - if (prev_sibs.length) { - return this.result_do_highlight(prev_sibs.first()); - } else { - if (this.choices > 0) { - this.results_hide(); - } - return this.result_clear_highlight(); - } - } - }; - - Chosen.prototype.keydown_backstroke = function() { - var next_available_destroy; - if (this.pending_backstroke) { - this.choice_destroy(this.pending_backstroke.find("a").first()); - return this.clear_backstroke(); - } else { - next_available_destroy = this.search_container.siblings("li.search-choice").last(); - if (next_available_destroy.length && !next_available_destroy.hasClass("search-choice-disabled")) { - this.pending_backstroke = next_available_destroy; - if (this.single_backstroke_delete) { - return this.keydown_backstroke(); - } else { - return this.pending_backstroke.addClass("search-choice-focus"); - } - } - } - }; - - Chosen.prototype.clear_backstroke = function() { - if (this.pending_backstroke) { - this.pending_backstroke.removeClass("search-choice-focus"); - } - return this.pending_backstroke = null; - }; - - Chosen.prototype.keydown_checker = function(evt) { - var stroke, _ref; - stroke = (_ref = evt.which) != null ? _ref : evt.keyCode; - this.search_field_scale(); - if (stroke !== 8 && this.pending_backstroke) { - this.clear_backstroke(); - } - switch (stroke) { - case 8: - this.backstroke_length = this.search_field.val().length; - break; - case 9: - if (this.results_showing && !this.is_multiple) { - this.result_select(evt); - } - this.mouse_on_container = false; - break; - case 13: - evt.preventDefault(); - break; - case 38: - evt.preventDefault(); - this.keyup_arrow(); - break; - case 40: - this.keydown_arrow(); - break; - } - }; - - Chosen.prototype.search_field_scale = function() { - var div, h, style, style_block, styles, w, _i, _len; - if (this.is_multiple) { - h = 0; - w = 0; - style_block = "position:absolute; left: -1000px; top: -1000px; display:none;"; - styles = ['font-size', 'font-style', 'font-weight', 'font-family', 'line-height', 'text-transform', 'letter-spacing']; - for (_i = 0, _len = styles.length; _i < _len; _i++) { - style = styles[_i]; - style_block += style + ":" + this.search_field.css(style) + ";"; - } - div = $('
        ', { - 'style': style_block - }); - div.text(this.search_field.val()); - $('body').append(div); - w = div.width() + 25; - div.remove(); - if (!this.f_width) { - this.f_width = this.container.outerWidth(); - } - if (w > this.f_width - 10) { - w = this.f_width - 10; - } - return this.search_field.css({ - 'width': w + 'px' - }); - } - }; - - Chosen.prototype.generate_random_id = function() { - var string; - string = "sel" + this.generate_random_char() + this.generate_random_char() + this.generate_random_char(); - while ($("#" + string).length > 0) { - string += this.generate_random_char(); - } - return string; - }; - - return Chosen; - - })(AbstractChosen); - - root.Chosen = Chosen; - -}).call(this); diff --git a/resources/jquery.effects/jquery.effects.blind.js b/resources/jquery.effects/jquery.effects.blind.js deleted file mode 100644 index ac25bbd8..00000000 --- a/resources/jquery.effects/jquery.effects.blind.js +++ /dev/null @@ -1,49 +0,0 @@ -/*! - * jQuery UI Effects Blind 1.8.24 - * - * Copyright 2012, 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( $, undefined ) { - -$.effects.blind = function(o) { - - return this.queue(function() { - - // Create element - var el = $(this), props = ['position','top','bottom','left','right']; - - // Set options - var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode - var direction = o.options.direction || 'vertical'; // Default direction - - // Adjust - $.effects.save(el, props); el.show(); // Save & Show - var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper - var ref = (direction == 'vertical') ? 'height' : 'width'; - var distance = (direction == 'vertical') ? wrapper.height() : wrapper.width(); - if(mode == 'show') wrapper.css(ref, 0); // Shift - - // Animation - var animation = {}; - animation[ref] = mode == 'show' ? distance : 0; - - // Animate - wrapper.animate(animation, o.duration, o.options.easing, function() { - if(mode == 'hide') el.hide(); // Hide - $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore - if(o.callback) o.callback.apply(el[0], arguments); // Callback - el.dequeue(); - }); - - }); - -}; - -})(jQuery); diff --git a/resources/jquery.effects/jquery.effects.bounce.js b/resources/jquery.effects/jquery.effects.bounce.js deleted file mode 100644 index 1169d770..00000000 --- a/resources/jquery.effects/jquery.effects.bounce.js +++ /dev/null @@ -1,78 +0,0 @@ -/*! - * jQuery UI Effects Bounce 1.8.24 - * - * Copyright 2012, 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( $, undefined ) { - -$.effects.bounce = function(o) { - - return this.queue(function() { - - // Create element - var el = $(this), props = ['position','top','bottom','left','right']; - - // Set options - var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode - var direction = o.options.direction || 'up'; // Default direction - var distance = o.options.distance || 20; // Default distance - var times = o.options.times || 5; // Default # of times - var speed = o.duration || 250; // Default speed per bounce - if (/show|hide/.test(mode)) props.push('opacity'); // Avoid touching opacity to prevent clearType and PNG issues in IE - - // Adjust - $.effects.save(el, props); el.show(); // Save & Show - $.effects.createWrapper(el); // Create Wrapper - 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(true) / 3 : el.outerWidth(true) / 3); - if (mode == 'show') el.css('opacity', 0).css(ref, motion == 'pos' ? -distance : distance); // Shift - if (mode == 'hide') distance = distance / (times * 2); - if (mode != 'hide') times--; - - // Animate - if (mode == 'show') { // Show Bounce - var animation = {opacity: 1}; - animation[ref] = (motion == 'pos' ? '+=' : '-=') + distance; - el.animate(animation, speed / 2, o.options.easing); - distance = distance / 2; - times--; - }; - for (var i = 0; i < times; i++) { // Bounces - var animation1 = {}, animation2 = {}; - animation1[ref] = (motion == 'pos' ? '-=' : '+=') + distance; - animation2[ref] = (motion == 'pos' ? '+=' : '-=') + distance; - el.animate(animation1, speed / 2, o.options.easing).animate(animation2, speed / 2, o.options.easing); - distance = (mode == 'hide') ? distance * 2 : distance / 2; - }; - if (mode == 'hide') { // Last Bounce - var animation = {opacity: 0}; - animation[ref] = (motion == 'pos' ? '-=' : '+=') + distance; - el.animate(animation, speed / 2, o.options.easing, function(){ - el.hide(); // Hide - $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore - if(o.callback) o.callback.apply(this, arguments); // Callback - }); - } else { - var animation1 = {}, animation2 = {}; - animation1[ref] = (motion == 'pos' ? '-=' : '+=') + distance; - animation2[ref] = (motion == 'pos' ? '+=' : '-=') + distance; - el.animate(animation1, speed / 2, o.options.easing).animate(animation2, speed / 2, o.options.easing, function(){ - $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore - if(o.callback) o.callback.apply(this, arguments); // Callback - }); - }; - el.queue('fx', function() { el.dequeue(); }); - el.dequeue(); - }); - -}; - -})(jQuery); diff --git a/resources/jquery.effects/jquery.effects.clip.js b/resources/jquery.effects/jquery.effects.clip.js deleted file mode 100644 index edd51a6a..00000000 --- a/resources/jquery.effects/jquery.effects.clip.js +++ /dev/null @@ -1,54 +0,0 @@ -/*! - * jQuery UI Effects Clip 1.8.24 - * - * Copyright 2012, 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( $, undefined ) { - -$.effects.clip = function(o) { - - return this.queue(function() { - - // Create element - var el = $(this), props = ['position','top','bottom','left','right','height','width']; - - // Set options - var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode - var direction = o.options.direction || 'vertical'; // Default direction - - // Adjust - $.effects.save(el, props); el.show(); // Save & Show - var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper - var animate = el[0].tagName == 'IMG' ? wrapper : el; - var ref = { - size: (direction == 'vertical') ? 'height' : 'width', - position: (direction == 'vertical') ? 'top' : 'left' - }; - var distance = (direction == 'vertical') ? animate.height() : animate.width(); - if(mode == 'show') { animate.css(ref.size, 0); animate.css(ref.position, distance / 2); } // Shift - - // Animation - var animation = {}; - animation[ref.size] = mode == 'show' ? distance : 0; - animation[ref.position] = mode == 'show' ? 0 : distance / 2; - - // Animate - animate.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() { - if(mode == 'hide') el.hide(); // Hide - $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore - if(o.callback) o.callback.apply(el[0], arguments); // Callback - el.dequeue(); - }}); - - }); - -}; - -})(jQuery); diff --git a/resources/jquery.effects/jquery.effects.core.js b/resources/jquery.effects/jquery.effects.core.js deleted file mode 100644 index 7fd946fd..00000000 --- a/resources/jquery.effects/jquery.effects.core.js +++ /dev/null @@ -1,612 +0,0 @@ -/*! - * jQuery UI Effects 1.8.24 - * - * Copyright 2012, 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($, undefined) { - -$.effects = {}; - - - -/******************************************************************************/ -/****************************** COLOR ANIMATIONS ******************************/ -/******************************************************************************/ - -// override the animation for color styles -$.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor', - 'borderRightColor', 'borderTopColor', 'borderColor', 'color', 'outlineColor'], -function(i, attr) { - $.fx.step[attr] = function(fx) { - if (!fx.colorInit) { - fx.start = getColor(fx.elem, attr); - fx.end = getRGB(fx.end); - fx.colorInit = true; - } - - fx.elem.style[attr] = 'rgb(' + - Math.max(Math.min(parseInt((fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0], 10), 255), 0) + ',' + - Math.max(Math.min(parseInt((fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1], 10), 255), 0) + ',' + - Math.max(Math.min(parseInt((fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2], 10), 255), 0) + ')'; - }; -}); - -// Color Conversion functions from highlightFade -// By Blair Mitchelmore -// http://jquery.offput.ca/highlightFade/ - -// Parse strings looking for color tuples [255,255,255] -function getRGB(color) { - var result; - - // Check if we're already dealing with an array of colors - if ( color && color.constructor == Array && color.length == 3 ) - return color; - - // Look for rgb(num,num,num) - if (result = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color)) - return [parseInt(result[1],10), parseInt(result[2],10), parseInt(result[3],10)]; - - // Look for rgb(num%,num%,num%) - if (result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color)) - return [parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55]; - - // Look for #a0b1c2 - if (result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color)) - return [parseInt(result[1],16), parseInt(result[2],16), parseInt(result[3],16)]; - - // Look for #fff - if (result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color)) - return [parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)]; - - // Look for rgba(0, 0, 0, 0) == transparent in Safari 3 - if (result = /rgba\(0, 0, 0, 0\)/.exec(color)) - return colors['transparent']; - - // Otherwise, we're most likely dealing with a named color - return colors[$.trim(color).toLowerCase()]; -} - -function getColor(elem, attr) { - var color; - - do { - // jQuery <1.4.3 uses curCSS, in 1.4.3 - 1.7.2 curCSS = css, 1.8+ only has css - color = ($.curCSS || $.css)(elem, attr); - - // Keep going until we find an element that has color, or we hit the body - if ( color != '' && color != 'transparent' || $.nodeName(elem, "body") ) - break; - - attr = "backgroundColor"; - } while ( elem = elem.parentNode ); - - return getRGB(color); -}; - -// Some named colors to work with -// From Interface by Stefan Petre -// http://interface.eyecon.ro/ - -var colors = { - aqua:[0,255,255], - azure:[240,255,255], - beige:[245,245,220], - black:[0,0,0], - blue:[0,0,255], - brown:[165,42,42], - cyan:[0,255,255], - darkblue:[0,0,139], - darkcyan:[0,139,139], - darkgrey:[169,169,169], - darkgreen:[0,100,0], - darkkhaki:[189,183,107], - darkmagenta:[139,0,139], - darkolivegreen:[85,107,47], - darkorange:[255,140,0], - darkorchid:[153,50,204], - darkred:[139,0,0], - darksalmon:[233,150,122], - darkviolet:[148,0,211], - fuchsia:[255,0,255], - gold:[255,215,0], - green:[0,128,0], - indigo:[75,0,130], - khaki:[240,230,140], - lightblue:[173,216,230], - lightcyan:[224,255,255], - lightgreen:[144,238,144], - lightgrey:[211,211,211], - lightpink:[255,182,193], - lightyellow:[255,255,224], - lime:[0,255,0], - magenta:[255,0,255], - maroon:[128,0,0], - navy:[0,0,128], - olive:[128,128,0], - orange:[255,165,0], - pink:[255,192,203], - purple:[128,0,128], - violet:[128,0,128], - red:[255,0,0], - silver:[192,192,192], - white:[255,255,255], - yellow:[255,255,0], - transparent: [255,255,255] -}; - - - -/******************************************************************************/ -/****************************** CLASS ANIMATIONS ******************************/ -/******************************************************************************/ - -var classAnimationActions = ['add', 'remove', 'toggle'], - shorthandStyles = { - border: 1, - borderBottom: 1, - borderColor: 1, - borderLeft: 1, - borderRight: 1, - borderTop: 1, - borderWidth: 1, - margin: 1, - padding: 1 - }; - -function getElementStyles() { - var style = document.defaultView - ? document.defaultView.getComputedStyle(this, null) - : this.currentStyle, - newStyle = {}, - key, - camelCase; - - // webkit enumerates style porperties - if (style && style.length && style[0] && style[style[0]]) { - var len = style.length; - while (len--) { - key = style[len]; - if (typeof style[key] == 'string') { - camelCase = key.replace(/\-(\w)/g, function(all, letter){ - return letter.toUpperCase(); - }); - newStyle[camelCase] = style[key]; - } - } - } else { - for (key in style) { - if (typeof style[key] === 'string') { - newStyle[key] = style[key]; - } - } - } - - return newStyle; -} - -function filterStyles(styles) { - var name, value; - for (name in styles) { - value = styles[name]; - if ( - // ignore null and undefined values - value == null || - // ignore functions (when does this occur?) - $.isFunction(value) || - // shorthand styles that need to be expanded - name in shorthandStyles || - // ignore scrollbars (break in IE) - (/scrollbar/).test(name) || - - // only colors or values that can be converted to numbers - (!(/color/i).test(name) && isNaN(parseFloat(value))) - ) { - delete styles[name]; - } - } - - return styles; -} - -function styleDifference(oldStyle, newStyle) { - var diff = { _: 0 }, // http://dev.jquery.com/ticket/5459 - name; - - for (name in newStyle) { - if (oldStyle[name] != newStyle[name]) { - diff[name] = newStyle[name]; - } - } - - return diff; -} - -$.effects.animateClass = function(value, duration, easing, callback) { - if ($.isFunction(easing)) { - callback = easing; - easing = null; - } - - return this.queue(function() { - var that = $(this), - originalStyleAttr = that.attr('style') || ' ', - originalStyle = filterStyles(getElementStyles.call(this)), - newStyle, - className = that.attr('class') || ""; - - $.each(classAnimationActions, function(i, action) { - if (value[action]) { - that[action + 'Class'](value[action]); - } - }); - newStyle = filterStyles(getElementStyles.call(this)); - that.attr('class', className); - - that.animate(styleDifference(originalStyle, newStyle), { - queue: false, - duration: duration, - easing: easing, - complete: function() { - $.each(classAnimationActions, function(i, action) { - if (value[action]) { that[action + 'Class'](value[action]); } - }); - // work around bug in IE by clearing the cssText before setting it - if (typeof that.attr('style') == 'object') { - that.attr('style').cssText = ''; - that.attr('style').cssText = originalStyleAttr; - } else { - that.attr('style', originalStyleAttr); - } - if (callback) { callback.apply(this, arguments); } - $.dequeue( this ); - } - }); - }); -}; - -$.fn.extend({ - _addClass: $.fn.addClass, - addClass: function(classNames, speed, easing, callback) { - return speed ? $.effects.animateClass.apply(this, [{ add: classNames },speed,easing,callback]) : this._addClass(classNames); - }, - - _removeClass: $.fn.removeClass, - removeClass: function(classNames,speed,easing,callback) { - return speed ? $.effects.animateClass.apply(this, [{ remove: classNames },speed,easing,callback]) : this._removeClass(classNames); - }, - - _toggleClass: $.fn.toggleClass, - toggleClass: function(classNames, force, speed, easing, callback) { - if ( typeof force == "boolean" || force === undefined ) { - if ( !speed ) { - // without speed parameter; - return this._toggleClass(classNames, force); - } else { - return $.effects.animateClass.apply(this, [(force?{add:classNames}:{remove:classNames}),speed,easing,callback]); - } - } else { - // without switch parameter; - return $.effects.animateClass.apply(this, [{ toggle: classNames },force,speed,easing]); - } - }, - - switchClass: function(remove,add,speed,easing,callback) { - return $.effects.animateClass.apply(this, [{ add: add, remove: remove },speed,easing,callback]); - } -}); - - - -/******************************************************************************/ -/*********************************** EFFECTS **********************************/ -/******************************************************************************/ - -$.extend($.effects, { - version: "1.8.24", - - // Saves a set of properties in a data storage - save: function(element, set) { - for(var i=0; i < set.length; i++) { - if(set[i] !== null) element.data("ec.storage."+set[i], element[0].style[set[i]]); - } - }, - - // Restores a set of previously saved properties from a data storage - restore: function(element, set) { - for(var i=0; i < set.length; i++) { - if(set[i] !== null) element.css(set[i], element.data("ec.storage."+set[i])); - } - }, - - setMode: function(el, mode) { - if (mode == 'toggle') mode = el.is(':hidden') ? 'show' : 'hide'; // Set for toggle - return mode; - }, - - getBaseline: function(origin, original) { // Translates a [top,left] array into a baseline value - // this should be a little more flexible in the future to handle a string & hash - var y, x; - switch (origin[0]) { - case 'top': y = 0; break; - case 'middle': y = 0.5; break; - case 'bottom': y = 1; break; - default: y = origin[0] / original.height; - }; - switch (origin[1]) { - case 'left': x = 0; break; - case 'center': x = 0.5; break; - case 'right': x = 1; break; - default: x = origin[1] / original.width; - }; - return {x: x, y: y}; - }, - - // Wraps the element around a wrapper that copies position properties - createWrapper: function(element) { - - // if the element is already wrapped, return it - if (element.parent().is('.ui-effects-wrapper')) { - return element.parent(); - } - - // wrap the element - var props = { - width: element.outerWidth(true), - height: element.outerHeight(true), - 'float': element.css('float') - }, - wrapper = $('
        ') - .addClass('ui-effects-wrapper') - .css({ - fontSize: '100%', - background: 'transparent', - border: 'none', - margin: 0, - padding: 0 - }), - active = document.activeElement; - - // support: Firefox - // Firefox incorrectly exposes anonymous content - // https://bugzilla.mozilla.org/show_bug.cgi?id=561664 - try { - active.id; - } catch( e ) { - active = document.body; - } - - element.wrap( wrapper ); - - // Fixes #7595 - Elements lose focus when wrapped. - if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { - $( active ).focus(); - } - - wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually loose the reference to the wrapped element - - // transfer positioning properties to the wrapper - if (element.css('position') == 'static') { - wrapper.css({ position: 'relative' }); - element.css({ position: 'relative' }); - } else { - $.extend(props, { - position: element.css('position'), - zIndex: element.css('z-index') - }); - $.each(['top', 'left', 'bottom', 'right'], function(i, pos) { - props[pos] = element.css(pos); - if (isNaN(parseInt(props[pos], 10))) { - props[pos] = 'auto'; - } - }); - element.css({position: 'relative', top: 0, left: 0, right: 'auto', bottom: 'auto' }); - } - - return wrapper.css(props).show(); - }, - - removeWrapper: function(element) { - var parent, - active = document.activeElement; - - if (element.parent().is('.ui-effects-wrapper')) { - parent = element.parent().replaceWith(element); - // Fixes #7595 - Elements lose focus when wrapped. - if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { - $( active ).focus(); - } - return parent; - } - - return element; - }, - - setTransition: function(element, list, factor, value) { - value = value || {}; - $.each(list, function(i, x){ - var unit = element.cssUnit(x); - if (unit[0] > 0) value[x] = unit[0] * factor + unit[1]; - }); - return value; - } -}); - - -function _normalizeArguments(effect, options, speed, callback) { - // shift params for method overloading - if (typeof effect == 'object') { - callback = options; - speed = null; - options = effect; - effect = options.effect; - } - if ($.isFunction(options)) { - callback = options; - speed = null; - 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 : 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 take actual parameters instead of a hash - args2 = { - options: args[1], - duration: args[2], - callback: args[3] - }, - mode = args2.options.mode, - effectMethod = $.effects[effect]; - - 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 ( standardSpeed( speed ) ) { - return this._show.apply(this, arguments); - } else { - var args = _normalizeArguments.apply(this, arguments); - args[1].mode = 'show'; - return this.effect.apply(this, args); - } - }, - - _hide: $.fn.hide, - hide: function(speed) { - if ( standardSpeed( speed ) ) { - return this._hide.apply(this, arguments); - } else { - var args = _normalizeArguments.apply(this, arguments); - args[1].mode = 'hide'; - return this.effect.apply(this, args); - } - }, - - // jQuery core overloads toggle and creates _toggle - __toggle: $.fn.toggle, - toggle: function(speed) { - if ( standardSpeed( speed ) || typeof speed === "boolean" || $.isFunction( speed ) ) { - return this.__toggle.apply(this, arguments); - } else { - var args = _normalizeArguments.apply(this, arguments); - args[1].mode = 'toggle'; - return this.effect.apply(this, args); - } - }, - - // helper functions - cssUnit: function(key) { - var style = this.css(key), val = []; - $.each( ['em','px','%','pt'], function(i, unit){ - if(style.indexOf(unit) > 0) - val = [parseFloat(style), unit]; - }); - return val; - } -}); - - - -/******************************************************************************/ -/*********************************** EASING ***********************************/ -/******************************************************************************/ - -// based on easing equations from Robert Penner (http://www.robertpenner.com/easing) - -var baseEasings = {}; - -$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) { - baseEasings[ name ] = function( p ) { - return Math.pow( p, i + 2 ); - }; -}); - -$.extend( baseEasings, { - Sine: function ( p ) { - return 1 - Math.cos( p * Math.PI / 2 ); - }, - Circ: function ( p ) { - return 1 - Math.sqrt( 1 - p * p ); - }, - Elastic: function( p ) { - return p === 0 || p === 1 ? p : - -Math.pow( 2, 8 * (p - 1) ) * Math.sin( ( (p - 1) * 80 - 7.5 ) * Math.PI / 15 ); - }, - Back: function( p ) { - return p * p * ( 3 * p - 2 ); - }, - Bounce: function ( p ) { - var pow2, - bounce = 4; - - while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {} - return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 ); - } -}); - -$.each( baseEasings, function( name, easeIn ) { - $.easing[ "easeIn" + name ] = easeIn; - $.easing[ "easeOut" + name ] = function( p ) { - return 1 - easeIn( 1 - p ); - }; - $.easing[ "easeInOut" + name ] = function( p ) { - return p < .5 ? - easeIn( p * 2 ) / 2 : - easeIn( p * -2 + 2 ) / -2 + 1; - }; -}); - -})(jQuery); diff --git a/resources/jquery.effects/jquery.effects.drop.js b/resources/jquery.effects/jquery.effects.drop.js deleted file mode 100644 index 97e5abd4..00000000 --- a/resources/jquery.effects/jquery.effects.drop.js +++ /dev/null @@ -1,50 +0,0 @@ -/*! - * jQuery UI Effects Drop 1.8.24 - * - * Copyright 2012, 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( $, undefined ) { - -$.effects.drop = function(o) { - - return this.queue(function() { - - // Create element - var el = $(this), props = ['position','top','bottom','left','right','opacity']; - - // Set options - var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode - var direction = o.options.direction || 'left'; // Default Direction - - // Adjust - $.effects.save(el, props); el.show(); // Save & Show - $.effects.createWrapper(el); // Create Wrapper - 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( true ) / 2 : el.outerWidth( true ) / 2); - if (mode == 'show') el.css('opacity', 0).css(ref, motion == 'pos' ? -distance : distance); // Shift - - // Animation - var animation = {opacity: mode == 'show' ? 1 : 0}; - animation[ref] = (mode == 'show' ? (motion == 'pos' ? '+=' : '-=') : (motion == 'pos' ? '-=' : '+=')) + distance; - - // Animate - el.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() { - if(mode == 'hide') el.hide(); // Hide - $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore - if(o.callback) o.callback.apply(this, arguments); // Callback - el.dequeue(); - }}); - - }); - -}; - -})(jQuery); diff --git a/resources/jquery.effects/jquery.effects.explode.js b/resources/jquery.effects/jquery.effects.explode.js deleted file mode 100644 index f63e47a2..00000000 --- a/resources/jquery.effects/jquery.effects.explode.js +++ /dev/null @@ -1,79 +0,0 @@ -/*! - * jQuery UI Effects Explode 1.8.24 - * - * Copyright 2012, 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( $, undefined ) { - -$.effects.explode = function(o) { - - return this.queue(function() { - - var rows = o.options.pieces ? Math.round(Math.sqrt(o.options.pieces)) : 3; - var cells = o.options.pieces ? Math.round(Math.sqrt(o.options.pieces)) : 3; - - o.options.mode = o.options.mode == 'toggle' ? ($(this).is(':visible') ? 'hide' : 'show') : o.options.mode; - var el = $(this).show().css('visibility', 'hidden'); - var offset = el.offset(); - - //Substract the margins - not fixing the problem yet. - offset.top -= parseInt(el.css("marginTop"),10) || 0; - offset.left -= parseInt(el.css("marginLeft"),10) || 0; - - var width = el.outerWidth(true); - var height = el.outerHeight(true); - - for(var i=0;i
        ') - .css({ - position: 'absolute', - visibility: 'visible', - left: -j*(width/cells), - top: -i*(height/rows) - }) - .parent() - .addClass('ui-effects-explode') - .css({ - position: 'absolute', - overflow: 'hidden', - width: width/cells, - height: height/rows, - left: offset.left + j*(width/cells) + (o.options.mode == 'show' ? (j-Math.floor(cells/2))*(width/cells) : 0), - top: offset.top + i*(height/rows) + (o.options.mode == 'show' ? (i-Math.floor(rows/2))*(height/rows) : 0), - opacity: o.options.mode == 'show' ? 0 : 1 - }).animate({ - left: offset.left + j*(width/cells) + (o.options.mode == 'show' ? 0 : (j-Math.floor(cells/2))*(width/cells)), - top: offset.top + i*(height/rows) + (o.options.mode == 'show' ? 0 : (i-Math.floor(rows/2))*(height/rows)), - opacity: o.options.mode == 'show' ? 1 : 0 - }, o.duration || 500); - } - } - - // Set a timeout, to call the callback approx. when the other animations have finished - setTimeout(function() { - - o.options.mode == 'show' ? el.css({ visibility: 'visible' }) : el.css({ visibility: 'visible' }).hide(); - if(o.callback) o.callback.apply(el[0]); // Callback - el.dequeue(); - - $('div.ui-effects-explode').remove(); - - }, o.duration || 500); - - - }); - -}; - -})(jQuery); diff --git a/resources/jquery.effects/jquery.effects.fade.js b/resources/jquery.effects/jquery.effects.fade.js deleted file mode 100644 index 7aa37b1a..00000000 --- a/resources/jquery.effects/jquery.effects.fade.js +++ /dev/null @@ -1,32 +0,0 @@ -/*! - * jQuery UI Effects Fade 1.8.24 - * - * Copyright 2012, 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( $, undefined ) { - -$.effects.fade = function(o) { - return this.queue(function() { - var elem = $(this), - mode = $.effects.setMode(elem, o.options.mode || 'hide'); - - elem.animate({ opacity: mode }, { - queue: false, - duration: o.duration, - easing: o.options.easing, - complete: function() { - (o.callback && o.callback.apply(this, arguments)); - elem.dequeue(); - } - }); - }); -}; - -})(jQuery); diff --git a/resources/jquery.effects/jquery.effects.fold.js b/resources/jquery.effects/jquery.effects.fold.js deleted file mode 100644 index 06cc5533..00000000 --- a/resources/jquery.effects/jquery.effects.fold.js +++ /dev/null @@ -1,56 +0,0 @@ -/*! - * jQuery UI Effects Fold 1.8.24 - * - * Copyright 2012, 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( $, undefined ) { - -$.effects.fold = function(o) { - - return this.queue(function() { - - // Create element - var el = $(this), props = ['position','top','bottom','left','right']; - - // Set options - var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode - var size = o.options.size || 15; // Default fold size - var horizFirst = !(!o.options.horizFirst); // Ensure a boolean value - var duration = o.duration ? o.duration / 2 : $.fx.speeds._default / 2; - - // Adjust - $.effects.save(el, props); el.show(); // Save & Show - var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper - var widthFirst = ((mode == 'show') != horizFirst); - var ref = widthFirst ? ['width', 'height'] : ['height', 'width']; - var distance = widthFirst ? [wrapper.width(), wrapper.height()] : [wrapper.height(), wrapper.width()]; - var percent = /([0-9]+)%/.exec(size); - if(percent) size = parseInt(percent[1],10) / 100 * distance[mode == 'hide' ? 0 : 1]; - if(mode == 'show') wrapper.css(horizFirst ? {height: 0, width: size} : {height: size, width: 0}); // Shift - - // Animation - var animation1 = {}, animation2 = {}; - animation1[ref[0]] = mode == 'show' ? distance[0] : size; - animation2[ref[1]] = mode == 'show' ? distance[1] : 0; - - // Animate - wrapper.animate(animation1, duration, o.options.easing) - .animate(animation2, duration, o.options.easing, function() { - if(mode == 'hide') el.hide(); // Hide - $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore - if(o.callback) o.callback.apply(el[0], arguments); // Callback - el.dequeue(); - }); - - }); - -}; - -})(jQuery); diff --git a/resources/jquery.effects/jquery.effects.highlight.js b/resources/jquery.effects/jquery.effects.highlight.js deleted file mode 100644 index ad9e7bd4..00000000 --- a/resources/jquery.effects/jquery.effects.highlight.js +++ /dev/null @@ -1,50 +0,0 @@ -/*! - * jQuery UI Effects Highlight 1.8.24 - * - * Copyright 2012, 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( $, undefined ) { - -$.effects.highlight = function(o) { - return this.queue(function() { - var elem = $(this), - props = ['backgroundImage', 'backgroundColor', 'opacity'], - mode = $.effects.setMode(elem, o.options.mode || 'show'), - animation = { - backgroundColor: elem.css('backgroundColor') - }; - - if (mode == 'hide') { - animation.opacity = 0; - } - - $.effects.save(elem, props); - elem - .show() - .css({ - backgroundImage: 'none', - backgroundColor: o.options.color || '#ffff99' - }) - .animate(animation, { - queue: false, - duration: o.duration, - easing: o.options.easing, - complete: function() { - (mode == 'hide' && elem.hide()); - $.effects.restore(elem, props); - (mode == 'show' && !$.support.opacity && this.style.removeAttribute('filter')); - (o.callback && o.callback.apply(this, arguments)); - elem.dequeue(); - } - }); - }); -}; - -})(jQuery); diff --git a/resources/jquery.effects/jquery.effects.pulsate.js b/resources/jquery.effects/jquery.effects.pulsate.js deleted file mode 100644 index d730beed..00000000 --- a/resources/jquery.effects/jquery.effects.pulsate.js +++ /dev/null @@ -1,51 +0,0 @@ -/*! - * jQuery UI Effects Pulsate 1.8.24 - * - * Copyright 2012, 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( $, undefined ) { - -$.effects.pulsate = function(o) { - return this.queue(function() { - var elem = $(this), - mode = $.effects.setMode(elem, o.options.mode || 'show'), - times = ((o.options.times || 5) * 2) - 1, - duration = o.duration ? o.duration / 2 : $.fx.speeds._default / 2, - isVisible = elem.is(':visible'), - animateTo = 0; - - if (!isVisible) { - elem.css('opacity', 0).show(); - animateTo = 1; - } - - if ((mode == 'hide' && isVisible) || (mode == 'show' && !isVisible)) { - times--; - } - - for (var i = 0; i < times; i++) { - elem.animate({ opacity: animateTo }, duration, o.options.easing); - animateTo = (animateTo + 1) % 2; - } - - elem.animate({ opacity: animateTo }, duration, o.options.easing, function() { - if (animateTo == 0) { - elem.hide(); - } - (o.callback && o.callback.apply(this, arguments)); - }); - - elem - .queue('fx', function() { elem.dequeue(); }) - .dequeue(); - }); -}; - -})(jQuery); diff --git a/resources/jquery.effects/jquery.effects.scale.js b/resources/jquery.effects/jquery.effects.scale.js deleted file mode 100644 index 52d18710..00000000 --- a/resources/jquery.effects/jquery.effects.scale.js +++ /dev/null @@ -1,178 +0,0 @@ -/*! - * jQuery UI Effects Scale 1.8.24 - * - * Copyright 2012, 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( $, undefined ) { - -$.effects.puff = function(o) { - return this.queue(function() { - var elem = $(this), - mode = $.effects.setMode(elem, o.options.mode || 'hide'), - percent = parseInt(o.options.percent, 10) || 150, - factor = percent / 100, - original = { height: elem.height(), width: elem.width() }; - - $.extend(o.options, { - fade: true, - mode: mode, - percent: mode == 'hide' ? percent : 100, - from: mode == 'hide' - ? original - : { - height: original.height * factor, - width: original.width * factor - } - }); - - elem.effect('scale', o.options, o.duration, o.callback); - elem.dequeue(); - }); -}; - -$.effects.scale = function(o) { - - return this.queue(function() { - - // Create element - var el = $(this); - - // Set options - var options = $.extend(true, {}, o.options); - var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode - var percent = parseInt(o.options.percent,10) || (parseInt(o.options.percent,10) == 0 ? 0 : (mode == 'hide' ? 0 : 100)); // Set default scaling percent - var direction = o.options.direction || 'both'; // Set default axis - var origin = o.options.origin; // The origin of the scaling - if (mode != 'effect') { // Set default origin and restore for show/hide - options.origin = origin || ['middle','center']; - options.restore = true; - } - var original = {height: el.height(), width: el.width()}; // Save original - el.from = o.options.from || (mode == 'show' ? {height: 0, width: 0} : original); // Default from state - - // Adjust - var factor = { // Set scaling factor - y: direction != 'horizontal' ? (percent / 100) : 1, - x: direction != 'vertical' ? (percent / 100) : 1 - }; - el.to = {height: original.height * factor.y, width: original.width * factor.x}; // Set to state - - if (o.options.fade) { // Fade option to support puff - if (mode == 'show') {el.from.opacity = 0; el.to.opacity = 1;}; - if (mode == 'hide') {el.from.opacity = 1; el.to.opacity = 0;}; - }; - - // Animation - options.from = el.from; options.to = el.to; options.mode = mode; - - // Animate - el.effect('size', options, o.duration, o.callback); - el.dequeue(); - }); - -}; - -$.effects.size = function(o) { - - return this.queue(function() { - - // Create element - 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']; - var hProps = ['borderLeftWidth', 'borderRightWidth', 'paddingLeft', 'paddingRight']; - - // Set options - var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode - var restore = o.options.restore || false; // Default restore - var scale = o.options.scale || 'both'; // Default scale mode - var origin = o.options.origin; // The origin of the sizing - var original = {height: el.height(), width: el.width()}; // Save original - el.from = o.options.from || original; // Default from state - el.to = o.options.to || original; // Default to state - // Adjust - if (origin) { // Calculate baseline shifts - var baseline = $.effects.getBaseline(origin, original); - el.from.top = (original.height - el.from.height) * baseline.y; - el.from.left = (original.width - el.from.width) * baseline.x; - el.to.top = (original.height - el.to.height) * baseline.y; - el.to.left = (original.width - el.to.width) * baseline.x; - }; - var factor = { // Set scaling factor - from: {y: el.from.height / original.height, x: el.from.width / original.width}, - to: {y: el.to.height / original.height, x: el.to.width / original.width} - }; - if (scale == 'box' || scale == 'both') { // Scale the css box - if (factor.from.y != factor.to.y) { // Vertical props scaling - props = props.concat(vProps); - el.from = $.effects.setTransition(el, vProps, factor.from.y, el.from); - el.to = $.effects.setTransition(el, vProps, factor.to.y, el.to); - }; - if (factor.from.x != factor.to.x) { // Horizontal props scaling - props = props.concat(hProps); - el.from = $.effects.setTransition(el, hProps, factor.from.x, el.from); - el.to = $.effects.setTransition(el, hProps, factor.to.x, el.to); - }; - }; - if (scale == 'content' || scale == 'both') { // Scale the content - if (factor.from.y != factor.to.y) { // Vertical props scaling - props = props.concat(cProps); - el.from = $.effects.setTransition(el, cProps, factor.from.y, el.from); - el.to = $.effects.setTransition(el, cProps, factor.to.y, el.to); - }; - }; - $.effects.save(el, restore ? props : props1); el.show(); // Save & Show - $.effects.createWrapper(el); // Create Wrapper - el.css('overflow','hidden').css(el.from); // Shift - - // Animate - if (scale == 'content' || scale == 'both') { // Scale the children - vProps = vProps.concat(['marginTop','marginBottom']).concat(cProps); // Add margins/font-size - hProps = hProps.concat(['marginLeft','marginRight']); // Add margins - props2 = props.concat(vProps).concat(hProps); // Concat - el.find("*[width]").each(function(){ - var child = $(this); - if (restore) $.effects.save(child, props2); - var c_original = {height: child.height(), width: child.width()}; // Save original - child.from = {height: c_original.height * factor.from.y, width: c_original.width * factor.from.x}; - child.to = {height: c_original.height * factor.to.y, width: c_original.width * factor.to.x}; - if (factor.from.y != factor.to.y) { // Vertical props scaling - child.from = $.effects.setTransition(child, vProps, factor.from.y, child.from); - child.to = $.effects.setTransition(child, vProps, factor.to.y, child.to); - }; - if (factor.from.x != factor.to.x) { // Horizontal props scaling - child.from = $.effects.setTransition(child, hProps, factor.from.x, child.from); - child.to = $.effects.setTransition(child, hProps, factor.to.x, child.to); - }; - child.css(child.from); // Shift children - child.animate(child.to, o.duration, o.options.easing, function(){ - if (restore) $.effects.restore(child, props2); // Restore children - }); // Animate children - }); - }; - - // Animate - el.animate(el.to, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() { - if (el.to.opacity === 0) { - el.css('opacity', el.from.opacity); - } - if(mode == 'hide') el.hide(); // Hide - $.effects.restore(el, restore ? props : props1); $.effects.removeWrapper(el); // Restore - if(o.callback) o.callback.apply(this, arguments); // Callback - el.dequeue(); - }}); - - }); - -}; - -})(jQuery); diff --git a/resources/jquery.effects/jquery.effects.shake.js b/resources/jquery.effects/jquery.effects.shake.js deleted file mode 100644 index 44b8ea44..00000000 --- a/resources/jquery.effects/jquery.effects.shake.js +++ /dev/null @@ -1,57 +0,0 @@ -/*! - * jQuery UI Effects Shake 1.8.24 - * - * Copyright 2012, 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( $, undefined ) { - -$.effects.shake = function(o) { - - return this.queue(function() { - - // Create element - var el = $(this), props = ['position','top','bottom','left','right']; - - // Set options - var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode - var direction = o.options.direction || 'left'; // Default direction - var distance = o.options.distance || 20; // Default distance - var times = o.options.times || 3; // Default # of times - var speed = o.duration || o.options.duration || 140; // Default speed per shake - - // Adjust - $.effects.save(el, props); el.show(); // Save & Show - $.effects.createWrapper(el); // Create Wrapper - var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left'; - var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg'; - - // Animation - var animation = {}, animation1 = {}, animation2 = {}; - animation[ref] = (motion == 'pos' ? '-=' : '+=') + distance; - animation1[ref] = (motion == 'pos' ? '+=' : '-=') + distance * 2; - animation2[ref] = (motion == 'pos' ? '-=' : '+=') + distance * 2; - - // Animate - el.animate(animation, speed, o.options.easing); - for (var i = 1; i < times; i++) { // Shakes - el.animate(animation1, speed, o.options.easing).animate(animation2, speed, o.options.easing); - }; - el.animate(animation1, speed, o.options.easing). - animate(animation, speed / 2, o.options.easing, function(){ // Last shake - $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore - if(o.callback) o.callback.apply(this, arguments); // Callback - }); - el.queue('fx', function() { el.dequeue(); }); - el.dequeue(); - }); - -}; - -})(jQuery); diff --git a/resources/jquery.effects/jquery.effects.slide.js b/resources/jquery.effects/jquery.effects.slide.js deleted file mode 100644 index 502e6c9d..00000000 --- a/resources/jquery.effects/jquery.effects.slide.js +++ /dev/null @@ -1,50 +0,0 @@ -/*! - * jQuery UI Effects Slide 1.8.24 - * - * Copyright 2012, 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( $, undefined ) { - -$.effects.slide = function(o) { - - return this.queue(function() { - - // Create element - var el = $(this), props = ['position','top','bottom','left','right']; - - // Set options - var mode = $.effects.setMode(el, o.options.mode || 'show'); // Set Mode - var direction = o.options.direction || 'left'; // Default Direction - - // Adjust - $.effects.save(el, props); el.show(); // Save & Show - $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper - 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( true ) : el.outerWidth( true )); - if (mode == 'show') el.css(ref, motion == 'pos' ? (isNaN(distance) ? "-" + distance : -distance) : distance); // Shift - - // Animation - var animation = {}; - animation[ref] = (mode == 'show' ? (motion == 'pos' ? '+=' : '-=') : (motion == 'pos' ? '-=' : '+=')) + distance; - - // Animate - el.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() { - if(mode == 'hide') el.hide(); // Hide - $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore - if(o.callback) o.callback.apply(this, arguments); // Callback - el.dequeue(); - }}); - - }); - -}; - -})(jQuery); diff --git a/resources/jquery.effects/jquery.effects.transfer.js b/resources/jquery.effects/jquery.effects.transfer.js deleted file mode 100644 index 4ee4ae88..00000000 --- a/resources/jquery.effects/jquery.effects.transfer.js +++ /dev/null @@ -1,45 +0,0 @@ -/*! - * jQuery UI Effects Transfer 1.8.24 - * - * Copyright 2012, 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( $, undefined ) { - -$.effects.transfer = function(o) { - return this.queue(function() { - var elem = $(this), - target = $(o.options.to), - endPosition = target.offset(), - animation = { - top: endPosition.top, - left: endPosition.left, - height: target.innerHeight(), - width: target.innerWidth() - }, - startPosition = elem.offset(), - transfer = $('
        ') - .appendTo(document.body) - .addClass(o.options.className) - .css({ - top: startPosition.top, - left: startPosition.left, - height: elem.innerHeight(), - width: elem.innerWidth(), - position: 'absolute' - }) - .animate(animation, o.duration, o.options.easing, function() { - transfer.remove(); - (o.callback && o.callback.apply(elem[0], arguments)); - elem.dequeue(); - }); - }); -}; - -})(jQuery); diff --git a/resources/jquery.tipsy/images/tipsy.png b/resources/jquery.tipsy/images/tipsy.png deleted file mode 100644 index ef17cc32..00000000 Binary files a/resources/jquery.tipsy/images/tipsy.png and /dev/null differ diff --git a/resources/jquery.tipsy/jquery.tipsy.css b/resources/jquery.tipsy/jquery.tipsy.css deleted file mode 100644 index 3680fbe2..00000000 --- a/resources/jquery.tipsy/jquery.tipsy.css +++ /dev/null @@ -1,75 +0,0 @@ -.tipsy { - padding: 5px; - position: absolute; - z-index: 100000; - cursor: default; -} -.tipsy-inner { - padding: 5px 8px 4px 8px; - /*background-color: #e8f2f8;*/ - background-color: #ffffff; - border: solid 1px #a7d7f9; - color: black; - max-width: 15em; - border-radius: 4px; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - /* - -moz-box-shadow: 0px 2px 8px #cccccc; - -webkit-box-shadow: 0px 2px 8px #cccccc; - box-shadow: 0px 2px 8px #cccccc; - -ms-filter: "progid:DXImageTransform.Microsoft.DropShadow(OffX=0, OffY=2, Strength=6, Direction=90, Color='#cccccc')"; - filter: progid:DXImageTransform.Microsoft.DropShadow(OffX=0, OffY=2, Strength=6, Direction=90, Color='#cccccc'); - */ -} -.tipsy-arrow { - position: absolute; - /* @embed */ - background: url('images/tipsy.png') no-repeat top left; - width: 11px; - height: 6px; -} -/* @noflip */ .tipsy-n .tipsy-arrow { - top: 0px; - left: 50%; - margin-left: -5px; -} -/* @noflip */ .tipsy-nw .tipsy-arrow { - top: 1px; - left: 10px; -} -/* @noflip */ .tipsy-ne .tipsy-arrow { - top: 1px; - right: 10px; -} -/* @noflip */ .tipsy-s .tipsy-arrow { - bottom: 0px; - left: 50%; - margin-left: -5px; - background-position: bottom left; -} -/* @noflip */ .tipsy-sw .tipsy-arrow { - bottom: 0px; - left: 10px; - background-position: bottom left; -} -/* @noflip */ .tipsy-se .tipsy-arrow { - bottom: 0px; - right: 10px; - background-position: bottom left; -} -/* @noflip */ .tipsy-e .tipsy-arrow { - top: 50%; - margin-top: -5px; - right: 1px; - width: 5px; - height: 11px; - background-position: top right; -} -/* @noflip */ .tipsy-w .tipsy-arrow { - top: 50%; - margin-top: -5px; - left: 0px; - width: 6px; - height: 11px; -} \ No newline at end of file diff --git a/resources/jquery.tipsy/jquery.tipsy.js b/resources/jquery.tipsy/jquery.tipsy.js deleted file mode 100644 index a9fcec8f..00000000 --- a/resources/jquery.tipsy/jquery.tipsy.js +++ /dev/null @@ -1,218 +0,0 @@ -// tipsy, facebook style tooltips for jquery -// version 1.0.0a* -// (c) 2008-2010 jason frame [jason@onehackoranother.com] -// released under the MIT license - -// * This installation of tipsy includes several local modifications to both Javascript and CSS. -// Please be careful when upgrading. - -(function($) { - - function maybeCall(thing, ctx) { - return (typeof thing == 'function') ? (thing.call(ctx)) : thing; - }; - - function fixTitle($ele) { - if ($ele.attr('title') || typeof($ele.attr('original-title')) != 'string') { - $ele.attr('original-title', $ele.attr('title') || '').removeAttr('title'); - } - } - - function Tipsy(element, options) { - this.$element = $(element); - this.options = options; - this.enabled = true; - fixTitle(this.$element); - } - - Tipsy.prototype = { - show: function() { - var title = this.getTitle(); - if (title && this.enabled) { - var $tip = this.tip(); - - $tip.find('.tipsy-inner')[this.options.html ? 'html' : 'text'](title); - $tip[0].className = 'tipsy'; // reset classname in case of dynamic gravity - $tip.remove().css({top: 0, left: 0, visibility: 'hidden', display: 'block'}).appendTo(document.body); - - var pos = $.extend({}, this.$element.offset(), { - width: this.$element[0].offsetWidth, - height: this.$element[0].offsetHeight - }); - - var actualWidth = $tip[0].offsetWidth, actualHeight = $tip[0].offsetHeight; - var gravity = (typeof this.options.gravity == 'function') - ? this.options.gravity.call(this.$element[0]) - : this.options.gravity; - - var tp; - switch (gravity.charAt(0)) { - case 'n': - tp = {top: pos.top + pos.height + this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2}; - break; - case 's': - tp = {top: pos.top - actualHeight - this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2}; - break; - case 'e': - tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth - this.options.offset}; - break; - case 'w': - tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width + this.options.offset}; - break; - } - - if (gravity.length == 2) { - if (gravity.charAt(1) == 'w') { - if (this.options.center) { - tp.left = pos.left + pos.width / 2 - 15; - } else { - tp.left = pos.left; - } - } else { - if (this.options.center) { - tp.left = pos.left + pos.width / 2 - actualWidth + 15; - } else { - tp.left = pos.left + pos.width; - } - } - } - - $tip.css(tp).addClass('tipsy-' + gravity); - if (this.options.className) { - $tip.addClass(maybeCall(this.options.className, this.$element[0])); - } - - if (this.options.fade) { - $tip.stop().css({opacity: 0, display: 'block', visibility: 'visible'}).animate({opacity: this.options.opacity}, 100); - } else { - $tip.css({visibility: 'visible', opacity: this.options.opacity}); - } - } - }, - - hide: function() { - if (this.options.fade) { - this.tip().stop().fadeOut(100, function() { $(this).remove(); }); - } else { - this.tip().remove(); - } - }, - - getTitle: function() { - var title, $e = this.$element, o = this.options; - fixTitle($e); - var title, o = this.options; - if (typeof o.title == 'string') { - title = $e.attr(o.title == 'title' ? 'original-title' : o.title); - } else if (typeof o.title == 'function') { - title = o.title.call($e[0]); - } - title = ('' + title).replace(/(^\s*|\s*$)/, ""); - return title || o.fallback; - }, - - tip: function() { - if (!this.$tip) { - this.$tip = $('
        ').html('
        '); - } - return this.$tip; - }, - - validate: function() { - if (!this.$element[0].parentNode) { - this.hide(); - this.$element = null; - this.options = null; - } - }, - - enable: function() { this.enabled = true; }, - disable: function() { this.enabled = false; }, - toggleEnabled: function() { this.enabled = !this.enabled; } - }; - - $.fn.tipsy = function(options) { - - if (options === true) { - return this.data('tipsy'); - } else if (typeof options == 'string') { - return this.data('tipsy')[options](); - } - - options = $.extend({}, $.fn.tipsy.defaults, options); - - function get(ele) { - var tipsy = $.data(ele, 'tipsy'); - if (!tipsy) { - tipsy = new Tipsy(ele, $.fn.tipsy.elementOptions(ele, options)); - $.data(ele, 'tipsy', tipsy); - } - return tipsy; - } - - function enter() { - var tipsy = get(this); - tipsy.hoverState = 'in'; - if (options.delayIn == 0) { - tipsy.show(); - } else { - setTimeout(function() { if (tipsy.hoverState == 'in') tipsy.show(); }, options.delayIn); - } - }; - - function leave() { - var tipsy = get(this); - tipsy.hoverState = 'out'; - if (options.delayOut == 0) { - tipsy.hide(); - } else { - setTimeout(function() { if (tipsy.hoverState == 'out') tipsy.hide(); }, options.delayOut); - } - }; - - if (!options.live) this.each(function() { get(this); }); - - if (options.trigger != 'manual') { - var binder = options.live ? 'live' : 'bind', - eventIn = options.trigger == 'hover' ? 'mouseenter' : 'focus', - eventOut = options.trigger == 'hover' ? 'mouseleave' : 'blur'; - this[binder](eventIn, enter)[binder](eventOut, leave); - } - - return this; - - }; - - $.fn.tipsy.defaults = { - className: null, - delayIn: 0, - delayOut: 0, - fade: true, - fallback: '', - gravity: 'n', - center: true, - html: false, - live: false, - offset: 0, - opacity: 1.0, - title: 'title', - trigger: 'hover' - }; - - // Overwrite this method to provide options on a per-element basis. - // For example, you could store the gravity in a 'tipsy-gravity' attribute: - // return $.extend({}, options, {gravity: $(ele).attr('tipsy-gravity') || 'n' }); - // (remember - do not modify 'options' in place!) - $.fn.tipsy.elementOptions = function(ele, options) { - return $.metadata ? $.extend({}, options, $(ele).metadata()) : options; - }; - - $.fn.tipsy.autoNS = function() { - return $(this).offset().top > ($(document).scrollTop() + $(window).height() / 2) ? 's' : 'n'; - }; - - $.fn.tipsy.autoWE = function() { - return $(this).offset().left > ($(document).scrollLeft() + $(window).width() / 2) ? 'e' : 'w'; - }; - -})(jQuery); diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-af.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-af.js deleted file mode 100644 index 0922ef7a..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-af.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Afrikaans initialisation for the jQuery UI date picker plugin. */ -/* Written by Renier Pretorius. */ -jQuery(function($){ - $.datepicker.regional['af'] = { - closeText: 'Selekteer', - prevText: 'Vorige', - nextText: 'Volgende', - currentText: 'Vandag', - monthNames: ['Januarie','Februarie','Maart','April','Mei','Junie', - 'Julie','Augustus','September','Oktober','November','Desember'], - monthNamesShort: ['Jan', 'Feb', 'Mrt', 'Apr', 'Mei', 'Jun', - 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Des'], - dayNames: ['Sondag', 'Maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrydag', 'Saterdag'], - dayNamesShort: ['Son', 'Maa', 'Din', 'Woe', 'Don', 'Vry', 'Sat'], - dayNamesMin: ['So','Ma','Di','Wo','Do','Vr','Sa'], - weekHeader: 'Wk', - dateFormat: 'dd/mm/yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['af']); -}); diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-ar.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-ar.js deleted file mode 100644 index 8a9218d8..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-ar.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Arabic Translation for jQuery UI date picker plugin. */ -/* 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'] = { - closeText: 'إغلاق', - prevText: '<السابق', - nextText: 'التالي>', - currentText: 'اليوم', - monthNames: ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'مايو', 'حزيران', - 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'], - monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'], - dayNames: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], - dayNamesShort: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], - dayNamesMin: ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], - weekHeader: 'أسبوع', - dateFormat: 'dd/mm/yy', - firstDay: 6, - isRTL: true, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['ar']); -}); \ No newline at end of file diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-az.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-az.js deleted file mode 100644 index 57802a40..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-az.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Azerbaijani (UTF-8) initialisation for the jQuery UI date picker plugin. */ -/* Written by Jamil Najafov (necefov33@gmail.com). */ -jQuery(function($) { - $.datepicker.regional['az'] = { - closeText: 'Bağla', - prevText: '<Geri', - nextText: 'İrəli>', - currentText: 'Bugün', - monthNames: ['Yanvar','Fevral','Mart','Aprel','May','İyun', - 'İyul','Avqust','Sentyabr','Oktyabr','Noyabr','Dekabr'], - monthNamesShort: ['Yan','Fev','Mar','Apr','May','İyun', - 'İyul','Avq','Sen','Okt','Noy','Dek'], - dayNames: ['Bazar','Bazar ertəsi','Çərşənbə axşamı','Çərşənbə','Cümə axşamı','Cümə','Şənbə'], - dayNamesShort: ['B','Be','Ça','Ç','Ca','C','Ş'], - dayNamesMin: ['B','B','Ç','С','Ç','C','Ş'], - weekHeader: 'Hf', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['az']); -}); \ No newline at end of file diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-bg.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-bg.js deleted file mode 100644 index c19d20fb..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-bg.js +++ /dev/null @@ -1,24 +0,0 @@ -/* Bulgarian initialisation for the jQuery UI date picker plugin. */ -/* Written by Stoyan Kyosev (http://svest.org). */ -jQuery(function($){ - $.datepicker.regional['bg'] = { - closeText: 'затвори', - prevText: '<назад', - nextText: 'напред>', - nextBigText: '>>', - currentText: 'днес', - monthNames: ['Януари','Февруари','Март','Април','Май','Юни', - 'Юли','Август','Септември','Октомври','Ноември','Декември'], - monthNamesShort: ['Яну','Фев','Мар','Апр','Май','Юни', - 'Юли','Авг','Сеп','Окт','Нов','Дек'], - dayNames: ['Неделя','Понеделник','Вторник','Сряда','Четвъртък','Петък','Събота'], - dayNamesShort: ['Нед','Пон','Вто','Сря','Чет','Пет','Съб'], - dayNamesMin: ['Не','По','Вт','Ср','Че','Пе','Съ'], - weekHeader: 'Wk', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['bg']); -}); diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-bs.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-bs.js deleted file mode 100644 index d4dc8b0e..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-bs.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Bosnian i18n for the jQuery UI date picker plugin. */ -/* Written by Kenan Konjo. */ -jQuery(function($){ - $.datepicker.regional['bs'] = { - closeText: 'Zatvori', - prevText: '<', - nextText: '>', - currentText: 'Danas', - monthNames: ['Januar','Februar','Mart','April','Maj','Juni', - 'Juli','August','Septembar','Oktobar','Novembar','Decembar'], - monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', - 'Jul','Aug','Sep','Okt','Nov','Dec'], - dayNames: ['Nedelja','Ponedeljak','Utorak','Srijeda','Četvrtak','Petak','Subota'], - dayNamesShort: ['Ned','Pon','Uto','Sri','Čet','Pet','Sub'], - dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'], - weekHeader: 'Wk', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['bs']); -}); \ No newline at end of file diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-ca.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-ca.js deleted file mode 100644 index b128e699..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-ca.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Inicialització en català per a l'extenció 'calendar' per jQuery. */ -/* Writers: (joan.leon@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['ca'] = { - closeText: 'Tancar', - prevText: '<Ant', - nextText: 'Seg>', - currentText: 'Avui', - monthNames: ['Gener','Febrer','Març','Abril','Maig','Juny', - 'Juliol','Agost','Setembre','Octubre','Novembre','Desembre'], - monthNamesShort: ['Gen','Feb','Mar','Abr','Mai','Jun', - 'Jul','Ago','Set','Oct','Nov','Des'], - dayNames: ['Diumenge','Dilluns','Dimarts','Dimecres','Dijous','Divendres','Dissabte'], - dayNamesShort: ['Dug','Dln','Dmt','Dmc','Djs','Dvn','Dsb'], - dayNamesMin: ['Dg','Dl','Dt','Dc','Dj','Dv','Ds'], - weekHeader: 'Sm', - dateFormat: 'dd/mm/yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['ca']); -}); \ No newline at end of file diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-cs.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-cs.js deleted file mode 100644 index 9805bcdb..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-cs.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Czech initialisation for the jQuery UI date picker plugin. */ -/* Written by Tomas Muller (tomas@tomas-muller.net). */ -jQuery(function($){ - $.datepicker.regional['cs'] = { - closeText: 'Zavřít', - prevText: '<Dříve', - nextText: 'Později>', - currentText: 'Nyní', - monthNames: ['leden','únor','březen','duben','květen','červen', - 'červenec','srpen','září','říjen','listopad','prosinec'], - monthNamesShort: ['led','úno','bře','dub','kvě','čer', - 'čvc','srp','zář','říj','lis','pro'], - dayNames: ['neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota'], - dayNamesShort: ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so'], - dayNamesMin: ['ne','po','út','st','čt','pá','so'], - weekHeader: 'Týd', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['cs']); -}); diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-da.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-da.js deleted file mode 100644 index 176044e1..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-da.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Danish initialisation for the jQuery UI date picker plugin. */ -/* Written by Jan Christensen ( deletestuff@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['da'] = { - closeText: 'Luk', - prevText: '<Forrige', - nextText: 'Næste>', - currentText: 'Idag', - monthNames: ['Januar','Februar','Marts','April','Maj','Juni', - 'Juli','August','September','Oktober','November','December'], - monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', - 'Jul','Aug','Sep','Okt','Nov','Dec'], - dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'], - dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'], - dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'], - weekHeader: 'Uge', - dateFormat: 'dd-mm-yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['da']); -}); diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-de.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-de.js deleted file mode 100644 index f3ef9e82..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-de.js +++ /dev/null @@ -1,23 +0,0 @@ -/* German initialisation for the jQuery UI date picker plugin. */ -/* Written by Milian Wolff (mail@milianw.de). */ -jQuery(function($){ - $.datepicker.regional['de'] = { - closeText: 'schließen', - prevText: '<zurück', - nextText: 'Vor>', - currentText: 'heute', - monthNames: ['Januar','Februar','März','April','Mai','Juni', - 'Juli','August','September','Oktober','November','Dezember'], - monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun', - 'Jul','Aug','Sep','Okt','Nov','Dez'], - dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'], - dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'], - dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'], - weekHeader: 'KW', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['de']); -}); diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-el.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-el.js deleted file mode 100644 index 6d775f99..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-el.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Greek (el) initialisation for the jQuery UI date picker plugin. */ -/* Written by Alex Cicovic (http://www.alexcicovic.com) */ -jQuery(function($){ - $.datepicker.regional['el'] = { - closeText: 'Κλείσιμο', - prevText: 'Προηγούμενος', - nextText: 'Επόμενος', - currentText: 'Τρέχων Μήνας', - monthNames: ['Ιανουάριος','Φεβρουάριος','Μάρτιος','Απρίλιος','Μάιος','Ιούνιος', - 'Ιούλιος','Αύγουστος','Σεπτέμβριος','Οκτώβριος','Νοέμβριος','Δεκέμβριος'], - monthNamesShort: ['Ιαν','Φεβ','Μαρ','Απρ','Μαι','Ιουν', - 'Ιουλ','Αυγ','Σεπ','Οκτ','Νοε','Δεκ'], - dayNames: ['Κυριακή','Δευτέρα','Τρίτη','Τετάρτη','Πέμπτη','Παρασκευή','Σάββατο'], - dayNamesShort: ['Κυρ','Δευ','Τρι','Τετ','Πεμ','Παρ','Σαβ'], - dayNamesMin: ['Κυ','Δε','Τρ','Τε','Πε','Πα','Σα'], - weekHeader: 'Εβδ', - dateFormat: 'dd/mm/yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['el']); -}); \ No newline at end of file diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-en-GB.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-en-GB.js deleted file mode 100644 index 16a096e7..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-en-GB.js +++ /dev/null @@ -1,23 +0,0 @@ -/* English/UK initialisation for the jQuery UI date picker plugin. */ -/* Written by Stuart. */ -jQuery(function($){ - $.datepicker.regional['en-GB'] = { - closeText: 'Done', - prevText: 'Prev', - nextText: 'Next', - currentText: 'Today', - monthNames: ['January','February','March','April','May','June', - 'July','August','September','October','November','December'], - monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', - 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], - dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], - dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], - dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], - weekHeader: 'Wk', - dateFormat: 'dd/mm/yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['en-GB']); -}); diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-eo.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-eo.js deleted file mode 100644 index 6cabc2c4..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-eo.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Esperanto initialisation for the jQuery UI date picker plugin. */ -/* Written by Olivier M. (olivierweb@ifrance.com). */ -jQuery(function($){ - $.datepicker.regional['eo'] = { - closeText: 'Fermi', - prevText: '<Anta', - nextText: 'Sekv>', - currentText: 'Nuna', - monthNames: ['Januaro','Februaro','Marto','Aprilo','Majo','Junio', - 'Julio','Aŭgusto','Septembro','Oktobro','Novembro','Decembro'], - monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', - 'Jul','Aŭg','Sep','Okt','Nov','Dec'], - dayNames: ['Dimanĉo','Lundo','Mardo','Merkredo','Ĵaŭdo','Vendredo','Sabato'], - dayNamesShort: ['Dim','Lun','Mar','Mer','Ĵaŭ','Ven','Sab'], - dayNamesMin: ['Di','Lu','Ma','Me','Ĵa','Ve','Sa'], - weekHeader: 'Sb', - dateFormat: 'dd/mm/yy', - firstDay: 0, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['eo']); -}); diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-es.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-es.js deleted file mode 100644 index a02133de..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-es.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Inicialización en español para la extensión 'UI date picker' para jQuery. */ -/* Traducido por Vester (xvester@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['es'] = { - closeText: 'Cerrar', - prevText: '<Ant', - nextText: 'Sig>', - currentText: 'Hoy', - monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio', - 'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'], - monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun', - 'Jul','Ago','Sep','Oct','Nov','Dic'], - dayNames: ['Domingo','Lunes','Martes','Miércoles','Jueves','Viernes','Sábado'], - dayNamesShort: ['Dom','Lun','Mar','Mié','Juv','Vie','Sáb'], - dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi','Sá'], - weekHeader: 'Sm', - dateFormat: 'dd/mm/yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['es']); -}); \ No newline at end of file diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-et.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-et.js deleted file mode 100644 index 32702b24..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-et.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Estonian initialisation for the jQuery UI date picker plugin. */ -/* Written by Mart Sõmermaa (mrts.pydev at gmail com). */ -jQuery(function($){ - $.datepicker.regional['et'] = { - closeText: 'Sulge', - prevText: 'Eelnev', - nextText: 'Järgnev', - currentText: 'Täna', - monthNames: ['Jaanuar','Veebruar','Märts','Aprill','Mai','Juuni', - 'Juuli','August','September','Oktoober','November','Detsember'], - monthNamesShort: ['Jaan', 'Veebr', 'Märts', 'Apr', 'Mai', 'Juuni', - 'Juuli', 'Aug', 'Sept', 'Okt', 'Nov', 'Dets'], - dayNames: ['Pühapäev', 'Esmaspäev', 'Teisipäev', 'Kolmapäev', 'Neljapäev', 'Reede', 'Laupäev'], - dayNamesShort: ['Pühap', 'Esmasp', 'Teisip', 'Kolmap', 'Neljap', 'Reede', 'Laup'], - dayNamesMin: ['P','E','T','K','N','R','L'], - weekHeader: 'näd', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['et']); -}); \ No newline at end of file diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-eu.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-eu.js deleted file mode 100644 index ff66e494..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-eu.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Euskarako oinarria 'UI date picker' jquery-ko extentsioarentzat */ -/* Karrikas-ek itzulia (karrikas@karrikas.com) */ -jQuery(function($){ - $.datepicker.regional['eu'] = { - closeText: 'Egina', - prevText: '<Aur', - nextText: 'Hur>', - currentText: 'Gaur', - monthNames: ['urtarrila','otsaila','martxoa','apirila','maiatza','ekaina', - 'uztaila','abuztua','iraila','urria','azaroa','abendua'], - monthNamesShort: ['urt.','ots.','mar.','api.','mai.','eka.', - 'uzt.','abu.','ira.','urr.','aza.','abe.'], - dayNames: ['igandea','astelehena','asteartea','asteazkena','osteguna','ostirala','larunbata'], - dayNamesShort: ['ig.','al.','ar.','az.','og.','ol.','lr.'], - dayNamesMin: ['ig','al','ar','az','og','ol','lr'], - weekHeader: 'As', - dateFormat: 'yy-mm-dd', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['eu']); -}); \ No newline at end of file diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-fa.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-fa.js deleted file mode 100644 index be8acd2a..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-fa.js +++ /dev/null @@ -1,59 +0,0 @@ -/* Persian (Farsi) Translation for the jQuery UI date picker plugin. */ -/* Javad Mowlanezhad -- jmowla@gmail.com */ -/* Jalali calendar should supported soon! (Its implemented but I have to test it) */ -jQuery(function($) { - $.datepicker.regional['fa'] = { - closeText: 'بستن', - prevText: '<قبلی', - nextText: 'بعدی>', - currentText: 'امروز', - monthNames: [ - 'فروردين', - 'ارديبهشت', - 'خرداد', - 'تير', - 'مرداد', - 'شهريور', - 'مهر', - 'آبان', - 'آذر', - 'دی', - 'بهمن', - 'اسفند' - ], - monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'], - dayNames: [ - 'يکشنبه', - 'دوشنبه', - 'سه‌شنبه', - 'چهارشنبه', - 'پنجشنبه', - 'جمعه', - 'شنبه' - ], - dayNamesShort: [ - 'ی', - 'د', - 'س', - 'چ', - 'پ', - 'ج', - 'ش' - ], - dayNamesMin: [ - 'ی', - 'د', - 'س', - 'چ', - 'پ', - 'ج', - 'ش' - ], - weekHeader: 'هف', - dateFormat: 'yy/mm/dd', - firstDay: 6, - isRTL: true, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['fa']); -}); \ No newline at end of file diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-fi.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-fi.js deleted file mode 100644 index 4c5adda3..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-fi.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Finnish initialisation for the jQuery UI date picker plugin. */ -/* Written by Harri Kilpiö (harrikilpio@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['fi'] = { - closeText: 'Sulje', - prevText: '«Edellinen', - nextText: 'Seuraava»', - currentText: 'Tänään', - monthNames: ['Tammikuu','Helmikuu','Maaliskuu','Huhtikuu','Toukokuu','Kesäkuu', - 'Heinäkuu','Elokuu','Syyskuu','Lokakuu','Marraskuu','Joulukuu'], - monthNamesShort: ['Tammi','Helmi','Maalis','Huhti','Touko','Kesä', - 'Heinä','Elo','Syys','Loka','Marras','Joulu'], - dayNamesShort: ['Su','Ma','Ti','Ke','To','Pe','La'], - dayNames: ['Sunnuntai','Maanantai','Tiistai','Keskiviikko','Torstai','Perjantai','Lauantai'], - dayNamesMin: ['Su','Ma','Ti','Ke','To','Pe','La'], - weekHeader: 'Vk', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['fi']); -}); diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-fo.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-fo.js deleted file mode 100644 index 8a6cb99c..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-fo.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Faroese initialisation for the jQuery UI date picker plugin */ -/* Written by Sverri Mohr Olsen, sverrimo@gmail.com */ -jQuery(function($){ - $.datepicker.regional['fo'] = { - closeText: 'Lat aftur', - prevText: '<Fyrra', - nextText: 'Næsta>', - currentText: 'Í dag', - monthNames: ['Januar','Februar','Mars','Apríl','Mei','Juni', - 'Juli','August','September','Oktober','November','Desember'], - monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun', - 'Jul','Aug','Sep','Okt','Nov','Des'], - dayNames: ['Sunnudagur','Mánadagur','Týsdagur','Mikudagur','Hósdagur','Fríggjadagur','Leyardagur'], - dayNamesShort: ['Sun','Mán','Týs','Mik','Hós','Frí','Ley'], - dayNamesMin: ['Su','Má','Tý','Mi','Hó','Fr','Le'], - weekHeader: 'Vk', - dateFormat: 'dd-mm-yy', - firstDay: 0, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['fo']); -}); diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-fr.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-fr.js deleted file mode 100644 index 7e793639..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-fr.js +++ /dev/null @@ -1,25 +0,0 @@ -/* French initialisation for the jQuery UI date picker plugin. */ -/* Written by Keith Wood (kbwood{at}iinet.com.au), - Stéphane Nahmani (sholby@sholby.net), - Stéphane Raimbault */ -jQuery(function($){ - $.datepicker.regional['fr'] = { - closeText: 'Fermer', - 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: ['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: ['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']); -}); diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-gl.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-gl.js deleted file mode 100644 index 278403e8..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-gl.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Galician localization for 'UI date picker' jQuery extension. */ -/* Translated by Jorge Barreiro . */ -jQuery(function($){ - $.datepicker.regional['gl'] = { - closeText: 'Pechar', - prevText: '<Ant', - nextText: 'Seg>', - 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ércores','Xoves','Venres','Sábado'], - dayNamesShort: ['Dom','Lun','Mar','Mér','Xov','Ven','Sáb'], - dayNamesMin: ['Do','Lu','Ma','Mé','Xo','Ve','Sá'], - 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/resources/jquery.ui/i18n/jquery.ui.datepicker-he.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-he.js deleted file mode 100644 index 135cdec1..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-he.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Hebrew initialisation for the UI Datepicker extension. */ -/* Written by Amir Hardon (ahardon at gmail dot com). */ -jQuery(function($){ - $.datepicker.regional['he'] = { - closeText: 'סגור', - prevText: '<הקודם', - nextText: 'הבא>', - currentText: 'היום', - monthNames: ['ינואר','פברואר','מרץ','אפריל','מאי','יוני', - 'יולי','אוגוסט','ספטמבר','אוקטובר','נובמבר','דצמבר'], - monthNamesShort: ['ינו','פבר','מרץ','אפר','מאי','יוני', - 'יולי','אוג','ספט','אוק','נוב','דצמ'], - dayNames: ['ראשון','שני','שלישי','רביעי','חמישי','שישי','שבת'], - dayNamesShort: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'], - dayNamesMin: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'], - weekHeader: 'Wk', - dateFormat: 'dd/mm/yy', - firstDay: 0, - isRTL: true, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['he']); -}); diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-hi.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-hi.js deleted file mode 100644 index 6c563b99..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-hi.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Hindi initialisation for the jQuery UI date picker plugin. */ -/* Written by Michael Dawart. */ -jQuery(function($){ - $.datepicker.regional['hi'] = { - closeText: 'बंद', - prevText: 'पिछला', - nextText: 'अगला', - currentText: 'आज', - monthNames: ['जनवरी ','फरवरी','मार्च','अप्रेल','मई','जून', - 'जूलाई','अगस्त ','सितम्बर','अक्टूबर','नवम्बर','दिसम्बर'], - monthNamesShort: ['जन', 'फर', 'मार्च', 'अप्रेल', 'मई', 'जून', - 'जूलाई', 'अग', 'सित', 'अक्ट', 'नव', 'दि'], - dayNames: ['रविवार', 'सोमवार', 'मंगलवार', 'बुधवार', 'गुरुवार', 'शुक्रवार', 'शनिवार'], - dayNamesShort: ['रवि', 'सोम', 'मंगल', 'बुध', 'गुरु', 'शुक्र', 'शनि'], - dayNamesMin: ['रवि', 'सोम', 'मंगल', 'बुध', 'गुरु', 'शुक्र', 'शनि'], - weekHeader: 'हफ्ता', - dateFormat: 'dd/mm/yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['hi']); -}); diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-hr.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-hr.js deleted file mode 100644 index 1eb3dd92..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-hr.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Croatian i18n for the jQuery UI date picker plugin. */ -/* Written by Vjekoslav Nesek. */ -jQuery(function($){ - $.datepicker.regional['hr'] = { - closeText: 'Zatvori', - prevText: '<', - nextText: '>', - currentText: 'Danas', - monthNames: ['Siječanj','Veljača','Ožujak','Travanj','Svibanj','Lipanj', - 'Srpanj','Kolovoz','Rujan','Listopad','Studeni','Prosinac'], - monthNamesShort: ['Sij','Velj','Ožu','Tra','Svi','Lip', - 'Srp','Kol','Ruj','Lis','Stu','Pro'], - dayNames: ['Nedjelja','Ponedjeljak','Utorak','Srijeda','Četvrtak','Petak','Subota'], - dayNamesShort: ['Ned','Pon','Uto','Sri','Čet','Pet','Sub'], - dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'], - weekHeader: 'Tje', - dateFormat: 'dd.mm.yy.', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['hr']); -}); \ No newline at end of file diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-hu.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-hu.js deleted file mode 100644 index b28c268c..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-hu.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Hungarian initialisation for the jQuery UI date picker plugin. */ -/* Written by Istvan Karaszi (jquery@spam.raszi.hu). */ -jQuery(function($){ - $.datepicker.regional['hu'] = { - closeText: 'bezár', - prevText: 'vissza', - nextText: 'előre', - currentText: 'ma', - monthNames: ['Január', 'Február', 'Március', 'Április', 'Május', 'Június', - 'Július', 'Augusztus', 'Szeptember', 'Október', 'November', 'December'], - monthNamesShort: ['Jan', 'Feb', 'Már', 'Ápr', 'Máj', 'Jún', - 'Júl', 'Aug', 'Szep', 'Okt', 'Nov', 'Dec'], - dayNames: ['Vasárnap', 'Hétfő', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat'], - dayNamesShort: ['Vas', 'Hét', 'Ked', 'Sze', 'Csü', 'Pén', 'Szo'], - dayNamesMin: ['V', 'H', 'K', 'Sze', 'Cs', 'P', 'Szo'], - weekHeader: 'Hét', - dateFormat: 'yy.mm.dd.', - firstDay: 1, - isRTL: false, - showMonthAfterYear: true, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['hu']); -}); diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-hy.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-hy.js deleted file mode 100644 index c6cc1946..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-hy.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Armenian(UTF-8) initialisation for the jQuery UI date picker plugin. */ -/* Written by Levon Zakaryan (levon.zakaryan@gmail.com)*/ -jQuery(function($){ - $.datepicker.regional['hy'] = { - closeText: 'Փակել', - prevText: '<Նախ.', - nextText: 'Հաջ.>', - currentText: 'Այսօր', - monthNames: ['Հունվար','Փետրվար','Մարտ','Ապրիլ','Մայիս','Հունիս', - 'Հուլիս','Օգոստոս','Սեպտեմբեր','Հոկտեմբեր','Նոյեմբեր','Դեկտեմբեր'], - monthNamesShort: ['Հունվ','Փետր','Մարտ','Ապր','Մայիս','Հունիս', - 'Հուլ','Օգս','Սեպ','Հոկ','Նոյ','Դեկ'], - dayNames: ['կիրակի','եկուշաբթի','երեքշաբթի','չորեքշաբթի','հինգշաբթի','ուրբաթ','շաբաթ'], - dayNamesShort: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'], - dayNamesMin: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'], - weekHeader: 'ՇԲՏ', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['hy']); -}); \ No newline at end of file diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-id.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-id.js deleted file mode 100644 index c626fbb7..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-id.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Indonesian initialisation for the jQuery UI date picker plugin. */ -/* Written by Deden Fathurahman (dedenf@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['id'] = { - closeText: 'Tutup', - prevText: '<mundur', - nextText: 'maju>', - currentText: 'hari ini', - monthNames: ['Januari','Februari','Maret','April','Mei','Juni', - 'Juli','Agustus','September','Oktober','Nopember','Desember'], - monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun', - 'Jul','Agus','Sep','Okt','Nop','Des'], - dayNames: ['Minggu','Senin','Selasa','Rabu','Kamis','Jumat','Sabtu'], - dayNamesShort: ['Min','Sen','Sel','Rab','kam','Jum','Sab'], - dayNamesMin: ['Mg','Sn','Sl','Rb','Km','jm','Sb'], - weekHeader: 'Mg', - dateFormat: 'dd/mm/yy', - firstDay: 0, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['id']); -}); \ No newline at end of file diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-is.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-is.js deleted file mode 100644 index c53235a4..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-is.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Icelandic initialisation for the jQuery UI date picker plugin. */ -/* Written by Haukur H. Thorsson (haukur@eskill.is). */ -jQuery(function($){ - $.datepicker.regional['is'] = { - closeText: 'Loka', - prevText: '< Fyrri', - nextText: 'Næsti >', - currentText: 'Í dag', - monthNames: ['Janúar','Febrúar','Mars','Apríl','Maí','Júní', - 'Júlí','Ágúst','September','Október','Nóvember','Desember'], - monthNamesShort: ['Jan','Feb','Mar','Apr','Maí','Jún', - 'Júl','Ágú','Sep','Okt','Nóv','Des'], - dayNames: ['Sunnudagur','Mánudagur','Þriðjudagur','Miðvikudagur','Fimmtudagur','Föstudagur','Laugardagur'], - dayNamesShort: ['Sun','Mán','Þri','Mið','Fim','Fös','Lau'], - dayNamesMin: ['Su','Má','Þr','Mi','Fi','Fö','La'], - weekHeader: 'Vika', - dateFormat: 'dd/mm/yy', - firstDay: 0, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['is']); -}); \ No newline at end of file diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-it.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-it.js deleted file mode 100644 index 59da2df6..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-it.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Italian initialisation for the jQuery UI date picker plugin. */ -/* Written by Antonello Pasella (antonello.pasella@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['it'] = { - closeText: 'Chiudi', - prevText: '<Prec', - nextText: 'Succ>', - currentText: 'Oggi', - monthNames: ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno', - 'Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'], - monthNamesShort: ['Gen','Feb','Mar','Apr','Mag','Giu', - 'Lug','Ago','Set','Ott','Nov','Dic'], - dayNames: ['Domenica','Lunedì','Martedì','Mercoledì','Giovedì','Venerdì','Sabato'], - dayNamesShort: ['Dom','Lun','Mar','Mer','Gio','Ven','Sab'], - dayNamesMin: ['Do','Lu','Ma','Me','Gi','Ve','Sa'], - weekHeader: 'Sm', - dateFormat: 'dd/mm/yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['it']); -}); diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-ja.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-ja.js deleted file mode 100644 index 7eb4268d..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-ja.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Japanese initialisation for the jQuery UI date picker plugin. */ -/* Written by Kentaro SATO (kentaro@ranvis.com). */ -jQuery(function($){ - $.datepicker.regional['ja'] = { - closeText: '閉じる', - prevText: '<前', - nextText: '次>', - currentText: '今日', - monthNames: ['1月','2月','3月','4月','5月','6月', - '7月','8月','9月','10月','11月','12月'], - monthNamesShort: ['1月','2月','3月','4月','5月','6月', - '7月','8月','9月','10月','11月','12月'], - dayNames: ['日曜日','月曜日','火曜日','水曜日','木曜日','金曜日','土曜日'], - dayNamesShort: ['日','月','火','水','木','金','土'], - dayNamesMin: ['日','月','火','水','木','金','土'], - weekHeader: '週', - dateFormat: 'yy/mm/dd', - firstDay: 0, - isRTL: false, - showMonthAfterYear: true, - yearSuffix: '年'}; - $.datepicker.setDefaults($.datepicker.regional['ja']); -}); \ No newline at end of file diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-ka.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-ka.js deleted file mode 100644 index c10658d7..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-ka.js +++ /dev/null @@ -1,21 +0,0 @@ -/* Georgian (UTF-8) initialisation for the jQuery UI date picker plugin. */ -/* Written by Lado Lomidze (lado.lomidze@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['ka'] = { - closeText: 'დახურვა', - prevText: '< წინა', - nextText: 'შემდეგი >', - currentText: 'დღეს', - monthNames: ['იანვარი','თებერვალი','მარტი','აპრილი','მაისი','ივნისი', 'ივლისი','აგვისტო','სექტემბერი','ოქტომბერი','ნოემბერი','დეკემბერი'], - monthNamesShort: ['იან','თებ','მარ','აპრ','მაი','ივნ', 'ივლ','აგვ','სექ','ოქტ','ნოე','დეკ'], - dayNames: ['კვირა','ორშაბათი','სამშაბათი','ოთხშაბათი','ხუთშაბათი','პარასკევი','შაბათი'], - dayNamesShort: ['კვ','ორშ','სამ','ოთხ','ხუთ','პარ','შაბ'], - dayNamesMin: ['კვ','ორშ','სამ','ოთხ','ხუთ','პარ','შაბ'], - weekHeader: 'კვირა', - dateFormat: 'dd-mm-yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['ka']); -}); diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-kk.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-kk.js deleted file mode 100644 index 79e3f248..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-kk.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Kazakh (UTF-8) initialisation for the jQuery UI date picker plugin. */ -/* Written by Dmitriy Karasyov (dmitriy.karasyov@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['kk'] = { - closeText: 'Жабу', - prevText: '<Алдыңғы', - nextText: 'Келесі>', - currentText: 'Бүгін', - monthNames: ['Қаңтар','Ақпан','Наурыз','Сәуір','Мамыр','Маусым', - 'Шілде','Тамыз','Қыркүйек','Қазан','Қараша','Желтоқсан'], - monthNamesShort: ['Қаң','Ақп','Нау','Сәу','Мам','Мау', - 'Шіл','Там','Қыр','Қаз','Қар','Жел'], - dayNames: ['Жексенбі','Дүйсенбі','Сейсенбі','Сәрсенбі','Бейсенбі','Жұма','Сенбі'], - dayNamesShort: ['жкс','дсн','ссн','срс','бсн','жма','снб'], - dayNamesMin: ['Жк','Дс','Сс','Ср','Бс','Жм','Сн'], - weekHeader: 'Не', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['kk']); -}); diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-km.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-km.js deleted file mode 100644 index f9c4e3a0..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-km.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Khmer initialisation for the jQuery calendar extension. */ -/* Written by Chandara Om (chandara.teacher@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['km'] = { - closeText: 'ធ្វើ​រួច', - prevText: 'មុន', - nextText: 'បន្ទាប់', - currentText: 'ថ្ងៃ​នេះ', - monthNames: ['មករា','កុម្ភៈ','មីនា','មេសា','ឧសភា','មិថុនា', - 'កក្កដា','សីហា','កញ្ញា','តុលា','វិច្ឆិកា','ធ្នូ'], - monthNamesShort: ['មករា','កុម្ភៈ','មីនា','មេសា','ឧសភា','មិថុនា', - 'កក្កដា','សីហា','កញ្ញា','តុលា','វិច្ឆិកា','ធ្នូ'], - dayNames: ['អាទិត្យ', 'ចន្ទ', 'អង្គារ', 'ពុធ', 'ព្រហស្បតិ៍', 'សុក្រ', 'សៅរ៍'], - dayNamesShort: ['អា', 'ច', 'អ', 'ពុ', 'ព្រហ', 'សុ', 'សៅ'], - dayNamesMin: ['អា', 'ច', 'អ', 'ពុ', 'ព្រហ', 'សុ', 'សៅ'], - weekHeader: 'សប្ដាហ៍', - dateFormat: 'dd-mm-yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['km']); -}); diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-ko.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-ko.js deleted file mode 100644 index 04112424..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-ko.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Korean initialisation for the jQuery calendar extension. */ -/* Written by DaeKwon Kang (ncrash.dk@gmail.com), Edited by Genie. */ -jQuery(function($){ - $.datepicker.regional['ko'] = { - closeText: '닫기', - prevText: '이전달', - nextText: '다음달', - currentText: '오늘', - monthNames: ['1월','2월','3월','4월','5월','6월', - '7월','8월','9월','10월','11월','12월'], - monthNamesShort: ['1월','2월','3월','4월','5월','6월', - '7월','8월','9월','10월','11월','12월'], - dayNames: ['일요일','월요일','화요일','수요일','목요일','금요일','토요일'], - dayNamesShort: ['일','월','화','수','목','금','토'], - dayNamesMin: ['일','월','화','수','목','금','토'], - weekHeader: 'Wk', - dateFormat: 'yy-mm-dd', - firstDay: 0, - isRTL: false, - showMonthAfterYear: true, - yearSuffix: '년'}; - $.datepicker.setDefaults($.datepicker.regional['ko']); -}); \ No newline at end of file diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-lb.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-lb.js deleted file mode 100644 index 87c79d59..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-lb.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Luxembourgish initialisation for the jQuery UI date picker plugin. */ -/* Written by Michel Weimerskirch */ -jQuery(function($){ - $.datepicker.regional['lb'] = { - closeText: 'Fäerdeg', - prevText: 'Zréck', - nextText: 'Weider', - currentText: 'Haut', - monthNames: ['Januar','Februar','Mäerz','Abrëll','Mee','Juni', - 'Juli','August','September','Oktober','November','Dezember'], - monthNamesShort: ['Jan', 'Feb', 'Mäe', 'Abr', 'Mee', 'Jun', - 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'], - dayNames: ['Sonndeg', 'Méindeg', 'Dënschdeg', 'Mëttwoch', 'Donneschdeg', 'Freideg', 'Samschdeg'], - dayNamesShort: ['Son', 'Méi', 'Dën', 'Mët', 'Don', 'Fre', 'Sam'], - dayNamesMin: ['So','Mé','Dë','Më','Do','Fr','Sa'], - weekHeader: 'W', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['lb']); -}); diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-lt.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-lt.js deleted file mode 100644 index 67d5119c..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-lt.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Lithuanian (UTF-8) initialisation for the jQuery UI date picker plugin. */ -/* @author Arturas Paleicikas */ -jQuery(function($){ - $.datepicker.regional['lt'] = { - closeText: 'Uždaryti', - prevText: '<Atgal', - nextText: 'Pirmyn>', - currentText: 'Šiandien', - monthNames: ['Sausis','Vasaris','Kovas','Balandis','Gegužė','Birželis', - 'Liepa','Rugpjūtis','Rugsėjis','Spalis','Lapkritis','Gruodis'], - monthNamesShort: ['Sau','Vas','Kov','Bal','Geg','Bir', - 'Lie','Rugp','Rugs','Spa','Lap','Gru'], - dayNames: ['sekmadienis','pirmadienis','antradienis','trečiadienis','ketvirtadienis','penktadienis','šeštadienis'], - dayNamesShort: ['sek','pir','ant','tre','ket','pen','šeš'], - dayNamesMin: ['Se','Pr','An','Tr','Ke','Pe','Še'], - weekHeader: 'Wk', - dateFormat: 'yy-mm-dd', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['lt']); -}); \ No newline at end of file diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-lv.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-lv.js deleted file mode 100644 index 003934e7..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-lv.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Latvian (UTF-8) initialisation for the jQuery UI date picker plugin. */ -/* @author Arturas Paleicikas */ -jQuery(function($){ - $.datepicker.regional['lv'] = { - closeText: 'Aizvērt', - prevText: 'Iepr', - nextText: 'Nāka', - currentText: 'Šodien', - monthNames: ['Janvāris','Februāris','Marts','Aprīlis','Maijs','Jūnijs', - 'Jūlijs','Augusts','Septembris','Oktobris','Novembris','Decembris'], - monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','Jūn', - 'Jūl','Aug','Sep','Okt','Nov','Dec'], - dayNames: ['svētdiena','pirmdiena','otrdiena','trešdiena','ceturtdiena','piektdiena','sestdiena'], - dayNamesShort: ['svt','prm','otr','tre','ctr','pkt','sst'], - dayNamesMin: ['Sv','Pr','Ot','Tr','Ct','Pk','Ss'], - weekHeader: 'Nav', - dateFormat: 'dd-mm-yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['lv']); -}); \ No newline at end of file diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-mk.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-mk.js deleted file mode 100644 index 02853255..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-mk.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Macedonian i18n for the jQuery UI date picker plugin. */ -/* Written by Stojce Slavkovski. */ -jQuery(function($){ - $.datepicker.regional['mk'] = { - closeText: 'Затвори', - prevText: '<', - nextText: '>', - currentText: 'Денес', - monthNames: ['Јануари','Февруари','Март','Април','Мај','Јуни', - 'Јули','Август','Септември','Октомври','Ноември','Декември'], - monthNamesShort: ['Јан','Фев','Мар','Апр','Мај','Јун', - 'Јул','Авг','Сеп','Окт','Ное','Дек'], - dayNames: ['Недела','Понеделник','Вторник','Среда','Четврток','Петок','Сабота'], - dayNamesShort: ['Нед','Пон','Вто','Сре','Чет','Пет','Саб'], - dayNamesMin: ['Не','По','Вт','Ср','Че','Пе','Са'], - weekHeader: 'Сед', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['mk']); -}); diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-ml.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-ml.js deleted file mode 100644 index 1e3432c0..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-ml.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Malayalam (UTF-8) initialisation for the jQuery UI date picker plugin. */ -/* Written by Saji Nediyanchath (saji89@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['ml'] = { - closeText: 'ശരി', - prevText: 'മുന്നത്തെ', - nextText: 'അടുത്തത് ', - currentText: 'ഇന്ന്', - monthNames: ['ജനുവരി','ഫെബ്രുവരി','മാര്‍ച്ച്','ഏപ്രില്‍','മേയ്','ജൂണ്‍', - 'ജൂലൈ','ആഗസ്റ്റ്','സെപ്റ്റംബര്‍','ഒക്ടോബര്‍','നവംബര്‍','ഡിസംബര്‍'], - monthNamesShort: ['ജനു', 'ഫെബ്', 'മാര്‍', 'ഏപ്രി', 'മേയ്', 'ജൂണ്‍', - 'ജൂലാ', 'ആഗ', 'സെപ്', 'ഒക്ടോ', 'നവം', 'ഡിസ'], - dayNames: ['ഞായര്‍', 'തിങ്കള്‍', 'ചൊവ്വ', 'ബുധന്‍', 'വ്യാഴം', 'വെള്ളി', 'ശനി'], - dayNamesShort: ['ഞായ', 'തിങ്ക', 'ചൊവ്വ', 'ബുധ', 'വ്യാഴം', 'വെള്ളി', 'ശനി'], - dayNamesMin: ['ഞാ','തി','ചൊ','ബു','വ്യാ','വെ','ശ'], - weekHeader: 'ആ', - dateFormat: 'dd/mm/yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['ml']); -}); diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-ms.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-ms.js deleted file mode 100644 index e953ac04..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-ms.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Malaysian initialisation for the jQuery UI date picker plugin. */ -/* Written by Mohd Nawawi Mohamad Jamili (nawawi@ronggeng.net). */ -jQuery(function($){ - $.datepicker.regional['ms'] = { - closeText: 'Tutup', - prevText: '<Sebelum', - nextText: 'Selepas>', - currentText: 'hari ini', - monthNames: ['Januari','Februari','Mac','April','Mei','Jun', - 'Julai','Ogos','September','Oktober','November','Disember'], - monthNamesShort: ['Jan','Feb','Mac','Apr','Mei','Jun', - 'Jul','Ogo','Sep','Okt','Nov','Dis'], - dayNames: ['Ahad','Isnin','Selasa','Rabu','Khamis','Jumaat','Sabtu'], - dayNamesShort: ['Aha','Isn','Sel','Rab','kha','Jum','Sab'], - dayNamesMin: ['Ah','Is','Se','Ra','Kh','Ju','Sa'], - weekHeader: 'Mg', - dateFormat: 'dd/mm/yy', - firstDay: 0, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['ms']); -}); \ No newline at end of file diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-nl.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-nl.js deleted file mode 100644 index 781fe619..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-nl.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Dutch (UTF-8) initialisation for the jQuery UI date picker plugin. */ -/* Written by Mathias Bynens */ -jQuery(function($){ - $.datepicker.regional.nl = { - closeText: 'Sluiten', - prevText: '←', - nextText: '→', - currentText: 'Vandaag', - monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni', - 'juli', 'augustus', 'september', 'oktober', 'november', 'december'], - monthNamesShort: ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun', - 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'], - dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'], - dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'], - dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'], - weekHeader: 'Wk', - dateFormat: 'dd-mm-yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional.nl); -}); \ No newline at end of file diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-no.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-no.js deleted file mode 100644 index 2507043a..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-no.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Norwegian initialisation for the jQuery UI date picker plugin. */ -/* Written by Naimdjon Takhirov (naimdjon@gmail.com). */ - -jQuery(function($){ - $.datepicker.regional['no'] = { - closeText: 'Lukk', - prevText: '«Forrige', - nextText: 'Neste»', - currentText: 'I dag', - monthNames: ['januar','februar','mars','april','mai','juni','juli','august','september','oktober','november','desember'], - monthNamesShort: ['jan','feb','mar','apr','mai','jun','jul','aug','sep','okt','nov','des'], - dayNamesShort: ['søn','man','tir','ons','tor','fre','lør'], - dayNames: ['søndag','mandag','tirsdag','onsdag','torsdag','fredag','lørdag'], - dayNamesMin: ['sø','ma','ti','on','to','fr','lø'], - weekHeader: 'Uke', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: '' - }; - $.datepicker.setDefaults($.datepicker.regional['no']); -}); diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-pl.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-pl.js deleted file mode 100644 index 61fa29cc..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-pl.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Polish initialisation for the jQuery UI date picker plugin. */ -/* Written by Jacek Wysocki (jacek.wysocki@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['pl'] = { - closeText: 'Zamknij', - prevText: '<Poprzedni', - nextText: 'Następny>', - currentText: 'Dziś', - monthNames: ['Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec', - 'Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'], - monthNamesShort: ['Sty','Lu','Mar','Kw','Maj','Cze', - 'Lip','Sie','Wrz','Pa','Lis','Gru'], - dayNames: ['Niedziela','Poniedziałek','Wtorek','Środa','Czwartek','Piątek','Sobota'], - dayNamesShort: ['Nie','Pn','Wt','Śr','Czw','Pt','So'], - dayNamesMin: ['N','Pn','Wt','Śr','Cz','Pt','So'], - weekHeader: 'Tydz', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['pl']); -}); diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-pt-BR.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-pt-BR.js deleted file mode 100644 index 3cc8c796..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-pt-BR.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Brazilian initialisation for the jQuery UI date picker plugin. */ -/* Written by Leonildo Costa Silva (leocsilva@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['pt-BR'] = { - closeText: 'Fechar', - prevText: '<Anterior', - nextText: 'Próximo>', - currentText: 'Hoje', - monthNames: ['Janeiro','Fevereiro','Març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ça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'], - dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'], - dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'], - weekHeader: 'Sm', - dateFormat: 'dd/mm/yy', - firstDay: 0, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['pt-BR']); -}); \ No newline at end of file diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-pt.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-pt.js deleted file mode 100644 index f09f5aeb..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-pt.js +++ /dev/null @@ -1,22 +0,0 @@ -/* Portuguese initialisation for the jQuery UI date picker plugin. */ -jQuery(function($){ - $.datepicker.regional['pt'] = { - closeText: 'Fechar', - prevText: '<Anterior', - nextText: 'Seguinte', - currentText: 'Hoje', - monthNames: ['Janeiro','Fevereiro','Març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ça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'], - dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'], - dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sá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/resources/jquery.ui/i18n/jquery.ui.datepicker-rm.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-rm.js deleted file mode 100644 index cf03cd4c..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-rm.js +++ /dev/null @@ -1,21 +0,0 @@ -/* 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: '<Suandant', - nextText: 'Precedent>', - 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/resources/jquery.ui/i18n/jquery.ui.datepicker-ro.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-ro.js deleted file mode 100644 index 6b140aff..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-ro.js +++ /dev/null @@ -1,26 +0,0 @@ -/* Romanian initialisation for the jQuery UI date picker plugin. - * - * Written by Edmond L. (ll_edmond@walla.com) - * and Ionut G. Stan (ionut.g.stan@gmail.com) - */ -jQuery(function($){ - $.datepicker.regional['ro'] = { - closeText: 'Închide', - prevText: '« Luna precedentă', - nextText: 'Luna următoare »', - currentText: 'Azi', - monthNames: ['Ianuarie','Februarie','Martie','Aprilie','Mai','Iunie', - 'Iulie','August','Septembrie','Octombrie','Noiembrie','Decembrie'], - monthNamesShort: ['Ian', 'Feb', 'Mar', 'Apr', 'Mai', 'Iun', - 'Iul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], - dayNames: ['Duminică', 'Luni', 'Marţi', 'Miercuri', 'Joi', 'Vineri', 'Sâmbătă'], - dayNamesShort: ['Dum', 'Lun', 'Mar', 'Mie', 'Joi', 'Vin', 'Sâm'], - dayNamesMin: ['Du','Lu','Ma','Mi','Jo','Vi','Sâ'], - weekHeader: 'Săpt', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['ro']); -}); diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-ru.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-ru.js deleted file mode 100644 index 50a46135..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-ru.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Russian (UTF-8) initialisation for the jQuery UI date picker plugin. */ -/* Written by Andrew Stromnov (stromnov@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['ru'] = { - closeText: 'Закрыть', - prevText: '<Пред', - nextText: 'След>', - currentText: 'Сегодня', - monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь', - 'Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'], - monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн', - 'Июл','Авг','Сен','Окт','Ноя','Дек'], - dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'], - dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'], - dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'], - weekHeader: 'Нед', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['ru']); -}); \ No newline at end of file diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-sk.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-sk.js deleted file mode 100644 index 078d1b0f..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-sk.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Slovak initialisation for the jQuery UI date picker plugin. */ -/* Written by Vojtech Rinik (vojto@hmm.sk). */ -jQuery(function($){ - $.datepicker.regional['sk'] = { - closeText: 'Zavrieť', - prevText: '<Predchádzajúci', - nextText: 'Nasledujúci>', - currentText: 'Dnes', - monthNames: ['Január','Február','Marec','Apríl','Máj','Jún', - 'Júl','August','September','Október','November','December'], - monthNamesShort: ['Jan','Feb','Mar','Apr','Máj','Jún', - 'Júl','Aug','Sep','Okt','Nov','Dec'], - dayNames: ['Nedeľa','Pondelok','Utorok','Streda','Štvrtok','Piatok','Sobota'], - dayNamesShort: ['Ned','Pon','Uto','Str','Štv','Pia','Sob'], - dayNamesMin: ['Ne','Po','Ut','St','Št','Pia','So'], - weekHeader: 'Ty', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['sk']); -}); diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-sl.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-sl.js deleted file mode 100644 index 51655019..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-sl.js +++ /dev/null @@ -1,24 +0,0 @@ -/* Slovenian initialisation for the jQuery UI date picker plugin. */ -/* Written by Jaka Jancar (jaka@kubje.org). */ -/* c = č, s = š z = ž C = Č S = Š Z = Ž */ -jQuery(function($){ - $.datepicker.regional['sl'] = { - closeText: 'Zapri', - prevText: '<Prejšnji', - nextText: 'Naslednji>', - currentText: 'Trenutni', - monthNames: ['Januar','Februar','Marec','April','Maj','Junij', - 'Julij','Avgust','September','Oktober','November','December'], - monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', - 'Jul','Avg','Sep','Okt','Nov','Dec'], - dayNames: ['Nedelja','Ponedeljek','Torek','Sreda','Četrtek','Petek','Sobota'], - dayNamesShort: ['Ned','Pon','Tor','Sre','Čet','Pet','Sob'], - dayNamesMin: ['Ne','Po','To','Sr','Če','Pe','So'], - weekHeader: 'Teden', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['sl']); -}); diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-sq.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-sq.js deleted file mode 100644 index 21974c56..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-sq.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Albanian initialisation for the jQuery UI date picker plugin. */ -/* Written by Flakron Bytyqi (flakron@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['sq'] = { - closeText: 'mbylle', - prevText: '<mbrapa', - nextText: 'Përpara>', - currentText: 'sot', - monthNames: ['Janar','Shkurt','Mars','Prill','Maj','Qershor', - 'Korrik','Gusht','Shtator','Tetor','Nëntor','Dhjetor'], - monthNamesShort: ['Jan','Shk','Mar','Pri','Maj','Qer', - 'Kor','Gus','Sht','Tet','Nën','Dhj'], - dayNames: ['E Diel','E Hënë','E Martë','E Mërkurë','E Enjte','E Premte','E Shtune'], - dayNamesShort: ['Di','Hë','Ma','Më','En','Pr','Sh'], - dayNamesMin: ['Di','Hë','Ma','Më','En','Pr','Sh'], - weekHeader: 'Ja', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['sq']); -}); diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-sr-SR.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-sr-SR.js deleted file mode 100644 index e7a8683e..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-sr-SR.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Serbian i18n for the jQuery UI date picker plugin. */ -/* Written by Dejan Dimić. */ -jQuery(function($){ - $.datepicker.regional['sr-SR'] = { - closeText: 'Zatvori', - prevText: '<', - nextText: '>', - currentText: 'Danas', - monthNames: ['Januar','Februar','Mart','April','Maj','Jun', - 'Jul','Avgust','Septembar','Oktobar','Novembar','Decembar'], - monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', - 'Jul','Avg','Sep','Okt','Nov','Dec'], - dayNames: ['Nedelja','Ponedeljak','Utorak','Sreda','Četvrtak','Petak','Subota'], - dayNamesShort: ['Ned','Pon','Uto','Sre','Čet','Pet','Sub'], - dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'], - weekHeader: 'Sed', - dateFormat: 'dd/mm/yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['sr-SR']); -}); diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-sr.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-sr.js deleted file mode 100644 index 0bd240e6..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-sr.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Serbian i18n for the jQuery UI date picker plugin. */ -/* Written by Dejan Dimić. */ -jQuery(function($){ - $.datepicker.regional['sr'] = { - closeText: 'Затвори', - prevText: '<', - nextText: '>', - currentText: 'Данас', - monthNames: ['Јануар','Фебруар','Март','Април','Мај','Јун', - 'Јул','Август','Септембар','Октобар','Новембар','Децембар'], - monthNamesShort: ['Јан','Феб','Мар','Апр','Мај','Јун', - 'Јул','Авг','Сеп','Окт','Нов','Дец'], - dayNames: ['Недеља','Понедељак','Уторак','Среда','Четвртак','Петак','Субота'], - dayNamesShort: ['Нед','Пон','Уто','Сре','Чет','Пет','Суб'], - dayNamesMin: ['Не','По','Ут','Ср','Че','Пе','Су'], - weekHeader: 'Сед', - dateFormat: 'dd/mm/yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['sr']); -}); diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-sv.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-sv.js deleted file mode 100644 index e5f549fb..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-sv.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Swedish initialisation for the jQuery UI date picker plugin. */ -/* Written by Anders Ekdahl ( anders@nomadiz.se). */ -jQuery(function($){ - $.datepicker.regional['sv'] = { - closeText: 'Stäng', - prevText: '«Förra', - nextText: 'Nästa»', - currentText: 'Idag', - monthNames: ['Januari','Februari','Mars','April','Maj','Juni', - 'Juli','Augusti','September','Oktober','November','December'], - monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', - 'Jul','Aug','Sep','Okt','Nov','Dec'], - dayNamesShort: ['Sön','Mån','Tis','Ons','Tor','Fre','Lör'], - dayNames: ['Söndag','Måndag','Tisdag','Onsdag','Torsdag','Fredag','Lördag'], - dayNamesMin: ['Sö','Må','Ti','On','To','Fr','Lö'], - weekHeader: 'Ve', - dateFormat: 'yy-mm-dd', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['sv']); -}); diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-ta.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-ta.js deleted file mode 100644 index 40431ed8..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-ta.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Tamil (UTF-8) initialisation for the jQuery UI date picker plugin. */ -/* Written by S A Sureshkumar (saskumar@live.com). */ -jQuery(function($){ - $.datepicker.regional['ta'] = { - closeText: 'மூடு', - prevText: 'முன்னையது', - nextText: 'அடுத்தது', - currentText: 'இன்று', - monthNames: ['தை','மாசி','பங்குனி','சித்திரை','வைகாசி','ஆனி', - 'ஆடி','ஆவணி','புரட்டாசி','ஐப்பசி','கார்த்திகை','மார்கழி'], - monthNamesShort: ['தை','மாசி','பங்','சித்','வைகா','ஆனி', - 'ஆடி','ஆவ','புர','ஐப்','கார்','மார்'], - dayNames: ['ஞாயிற்றுக்கிழமை','திங்கட்கிழமை','செவ்வாய்க்கிழமை','புதன்கிழமை','வியாழக்கிழமை','வெள்ளிக்கிழமை','சனிக்கிழமை'], - dayNamesShort: ['ஞாயிறு','திங்கள்','செவ்வாய்','புதன்','வியாழன்','வெள்ளி','சனி'], - dayNamesMin: ['ஞா','தி','செ','பு','வி','வெ','ச'], - weekHeader: 'Не', - dateFormat: 'dd/mm/yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['ta']); -}); diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-th.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-th.js deleted file mode 100644 index 2e5300cf..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-th.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Thai initialisation for the jQuery UI date picker plugin. */ -/* Written by pipo (pipo@sixhead.com). */ -jQuery(function($){ - $.datepicker.regional['th'] = { - closeText: 'ปิด', - prevText: '« ย้อน', - nextText: 'ถัดไป »', - currentText: 'วันนี้', - monthNames: ['มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน', - 'กรกฎาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม'], - monthNamesShort: ['ม.ค.','ก.พ.','มี.ค.','เม.ย.','พ.ค.','มิ.ย.', - 'ก.ค.','ส.ค.','ก.ย.','ต.ค.','พ.ย.','ธ.ค.'], - dayNames: ['อาทิตย์','จันทร์','อังคาร','พุธ','พฤหัสบดี','ศุกร์','เสาร์'], - dayNamesShort: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'], - dayNamesMin: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'], - weekHeader: 'Wk', - dateFormat: 'dd/mm/yy', - firstDay: 0, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['th']); -}); \ No newline at end of file diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-tr.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-tr.js deleted file mode 100644 index dedfc7ff..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-tr.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Turkish initialisation for the jQuery UI date picker plugin. */ -/* Written by Izzet Emre Erkan (kara@karalamalar.net). */ -jQuery(function($){ - $.datepicker.regional['tr'] = { - closeText: 'kapat', - prevText: '<geri', - nextText: 'ileri>', - currentText: 'bugün', - monthNames: ['Ocak','Şubat','Mart','Nisan','Mayıs','Haziran', - 'Temmuz','Ağustos','Eylül','Ekim','Kasım','Aralık'], - monthNamesShort: ['Oca','Şub','Mar','Nis','May','Haz', - 'Tem','Ağu','Eyl','Eki','Kas','Ara'], - dayNames: ['Pazar','Pazartesi','Salı','Çarşamba','Perşembe','Cuma','Cumartesi'], - dayNamesShort: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'], - dayNamesMin: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'], - weekHeader: 'Hf', - dateFormat: 'dd.mm.yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['tr']); -}); \ No newline at end of file diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-uk.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-uk.js deleted file mode 100644 index 2718f5d1..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-uk.js +++ /dev/null @@ -1,24 +0,0 @@ -/* Ukrainian (UTF-8) initialisation for the jQuery UI date picker plugin. */ -/* Written by Maxim Drogobitskiy (maxdao@gmail.com). */ -/* Corrected by Igor Milla (igor.fsp.milla@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['uk'] = { - closeText: 'Закрити', - prevText: '<', - nextText: '>', - currentText: 'Сьогодні', - monthNames: ['Січень','Лютий','Березень','Квітень','Травень','Червень', - 'Липень','Серпень','Вересень','Жовтень','Листопад','Грудень'], - monthNamesShort: ['Січ','Лют','Бер','Кві','Тра','Чер', - 'Лип','Сер','Вер','Жов','Лис','Гру'], - dayNames: ['неділя','понеділок','вівторок','середа','четвер','п’ятниця','субота'], - dayNamesShort: ['нед','пнд','вів','срд','чтв','птн','сбт'], - dayNamesMin: ['Нд','Пн','Вт','Ср','Чт','Пт','Сб'], - weekHeader: 'Тиж', - dateFormat: 'dd/mm/yy', - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['uk']); -}); \ No newline at end of file diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-vi.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-vi.js deleted file mode 100644 index 1d8f7bbd..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-vi.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Vietnamese initialisation for the jQuery UI date picker plugin. */ -/* Translated by Le Thanh Huy (lthanhhuy@cit.ctu.edu.vn). */ -jQuery(function($){ - $.datepicker.regional['vi'] = { - closeText: 'Đóng', - prevText: '<Trước', - nextText: 'Tiếp>', - currentText: 'Hôm nay', - monthNames: ['Tháng Một', 'Tháng Hai', 'Tháng Ba', 'Tháng Tư', 'Tháng Năm', 'Tháng Sáu', - 'Tháng Bảy', 'Tháng Tám', 'Tháng Chín', 'Tháng Mười', 'Tháng Mười Một', 'Tháng Mười Hai'], - monthNamesShort: ['Tháng 1', 'Tháng 2', 'Tháng 3', 'Tháng 4', 'Tháng 5', 'Tháng 6', - 'Tháng 7', 'Tháng 8', 'Tháng 9', 'Tháng 10', 'Tháng 11', 'Tháng 12'], - dayNames: ['Chủ Nhật', 'Thứ Hai', 'Thứ Ba', 'Thứ Tư', 'Thứ Năm', 'Thứ Sáu', 'Thứ Bảy'], - dayNamesShort: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'], - dayNamesMin: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'], - weekHeader: 'Tu', - dateFormat: 'dd/mm/yy', - firstDay: 0, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: ''}; - $.datepicker.setDefaults($.datepicker.regional['vi']); -}); diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-zh-CN.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-zh-CN.js deleted file mode 100644 index 83f2825c..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-zh-CN.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Chinese initialisation for the jQuery UI date picker plugin. */ -/* Written by Cloudream (cloudream@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['zh-CN'] = { - closeText: '关闭', - prevText: '<上月', - nextText: '下月>', - currentText: '今天', - monthNames: ['一月','二月','三月','四月','五月','六月', - '七月','八月','九月','十月','十一月','十二月'], - monthNamesShort: ['一月','二月','三月','四月','五月','六月', - '七月','八月','九月','十月','十一月','十二月'], - dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'], - dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'], - dayNamesMin: ['日','一','二','三','四','五','六'], - weekHeader: '周', - dateFormat: 'yy-mm-dd', - firstDay: 1, - isRTL: false, - showMonthAfterYear: true, - yearSuffix: '年'}; - $.datepicker.setDefaults($.datepicker.regional['zh-CN']); -}); diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-zh-HK.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-zh-HK.js deleted file mode 100644 index 11189d3a..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-zh-HK.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Chinese initialisation for the jQuery UI date picker plugin. */ -/* Written by SCCY (samuelcychan@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['zh-HK'] = { - closeText: '關閉', - prevText: '<上月', - nextText: '下月>', - currentText: '今天', - monthNames: ['一月','二月','三月','四月','五月','六月', - '七月','八月','九月','十月','十一月','十二月'], - monthNamesShort: ['一月','二月','三月','四月','五月','六月', - '七月','八月','九月','十月','十一月','十二月'], - dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'], - dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'], - dayNamesMin: ['日','一','二','三','四','五','六'], - weekHeader: '周', - dateFormat: 'dd-mm-yy', - firstDay: 0, - isRTL: false, - showMonthAfterYear: true, - yearSuffix: '年'}; - $.datepicker.setDefaults($.datepicker.regional['zh-HK']); -}); diff --git a/resources/jquery.ui/i18n/jquery.ui.datepicker-zh-TW.js b/resources/jquery.ui/i18n/jquery.ui.datepicker-zh-TW.js deleted file mode 100644 index 089498b4..00000000 --- a/resources/jquery.ui/i18n/jquery.ui.datepicker-zh-TW.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Chinese initialisation for the jQuery UI date picker plugin. */ -/* Written by Ressol (ressol@gmail.com). */ -jQuery(function($){ - $.datepicker.regional['zh-TW'] = { - closeText: '關閉', - prevText: '<上月', - nextText: '下月>', - currentText: '今天', - monthNames: ['一月','二月','三月','四月','五月','六月', - '七月','八月','九月','十月','十一月','十二月'], - monthNamesShort: ['一月','二月','三月','四月','五月','六月', - '七月','八月','九月','十月','十一月','十二月'], - dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'], - dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'], - dayNamesMin: ['日','一','二','三','四','五','六'], - weekHeader: '周', - dateFormat: 'yy/mm/dd', - firstDay: 1, - isRTL: false, - showMonthAfterYear: true, - yearSuffix: '年'}; - $.datepicker.setDefaults($.datepicker.regional['zh-TW']); -}); diff --git a/resources/jquery.ui/jquery.ui.accordion.js b/resources/jquery.ui/jquery.ui.accordion.js deleted file mode 100644 index dc1ba60a..00000000 --- a/resources/jquery.ui/jquery.ui.accordion.js +++ /dev/null @@ -1,611 +0,0 @@ -/*! - * jQuery UI Accordion 1.8.24 - * - * Copyright 2012, 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 - * - * Depends: - * jquery.ui.core.js - * jquery.ui.widget.js - */ -(function( $, undefined ) { - -$.widget( "ui.accordion", { - options: { - active: 0, - animated: "slide", - autoHeight: true, - clearStyle: false, - collapsible: false, - event: "click", - fillSpace: false, - header: "> li > :first-child,> :not(li):even", - 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 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 ).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" ); - }); - - self.headers.next() - .addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" ); - - if ( options.navigation ) { - var current = self.element.find( "a" ).filter( options.navigationFilter ).eq( 0 ); - if ( current.length ) { - var header = current.closest( ".ui-accordion-header" ); - if ( header.length ) { - // anchor within header - self.active = header; - } else { - // anchor within content - self.active = current.closest( ".ui-accordion-content" ).prev(); - } - } - } - - 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" ); - - 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" ); - - self.headers - .not( self.active || "" ) - .attr({ - "aria-expanded": "false", - "aria-selected": "false", - tabIndex: -1 - }) - .next() - .hide(); - - // make sure at least one header is in the tab order - if ( !self.active.length ) { - self.headers.eq( 0 ).attr( "tabIndex", 0 ); - } else { - self.active - .attr({ - "aria-expanded": "true", - "aria-selected": "true", - tabIndex: 0 - }); - } - - // only need links in tab order for Safari - if ( !$.browser.safari ) { - self.headers.find( "a" ).attr( "tabIndex", -1 ); - } - - 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 options = this.options; - if ( options.icons ) { - $( "" ) - .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" ); - }, - - destroy: function() { - var options = this.options; - - this.element - .removeClass( "ui-accordion ui-widget ui-helper-reset" ) - .removeAttr( "role" ); - - this.headers - .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( "aria-selected" ) - .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 ui-accordion-disabled ui-state-disabled" ); - if ( options.autoHeight || options.fillHeight ) { - contents.css( "height", "" ); - } - - return $.Widget.prototype.destroy.call( this ); - }, - - _setOption: function( key, value ) { - $.Widget.prototype._setOption.apply( this, arguments ); - - if ( key == "active" ) { - this.activate( value ); - } - if ( key == "icons" ) { - this._destroyIcons(); - 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()) - [ value ? "addClass" : "removeClass" ]( - "ui-accordion-disabled ui-state-disabled" ); - } - }, - - _keydown: function( event ) { - if ( this.options.disabled || event.altKey || event.ctrlKey ) { - return; - } - - var keyCode = $.ui.keyCode, - length = this.headers.length, - currentIndex = this.headers.index( event.target ), - toFocus = false; - - switch ( event.keyCode ) { - case keyCode.RIGHT: - case keyCode.DOWN: - toFocus = this.headers[ ( currentIndex + 1 ) % length ]; - break; - case keyCode.LEFT: - case keyCode.UP: - toFocus = this.headers[ ( currentIndex - 1 + length ) % length ]; - break; - case keyCode.SPACE: - case keyCode.ENTER: - this._clickHandler( { target: event.target }, event.target ); - event.preventDefault(); - } - - if ( toFocus ) { - $( event.target ).attr( "tabIndex", -1 ); - $( toFocus ).attr( "tabIndex", 0 ); - toFocus.focus(); - return false; - } - - return true; - }, - - resize: function() { - var options = this.options, - maxHeight; - - if ( options.fillSpace ) { - 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.headers.next() - .each(function() { - $( this ).height( Math.max( 0, maxHeight - - $( this ).innerHeight() + $( this ).height() ) ); - }) - .css( "overflow", "auto" ); - } else if ( options.autoHeight ) { - maxHeight = 0; - this.headers.next() - .each(function() { - maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() ); - }) - .height( maxHeight ); - } - - return this; - }, - - 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 ); - - return this; - }, - - _findActive: function( selector ) { - return selector - ? typeof selector === "number" - ? this.headers.filter( ":eq(" + selector + ")" ) - : this.headers.not( this.headers.not( selector ) ) - : selector === false - ? $( [] ) - : this.headers.filter( ":eq(0)" ); - }, - - // 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 ( !options.collapsible ) { - return; - } - 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: options, - newHeader: $( [] ), - oldHeader: options.active, - newContent: $( [] ), - oldContent: toHide - }, - toShow = ( this.active = $( [] ) ); - this._toggle( toShow, toHide, data ); - return; - } - - // get the click target - 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? - 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 || ( !options.collapsible && clickedIsActive ) ) { - return; - } - - // find elements to show and hide - var active = this.active, - toShow = clicked.next(), - toHide = this.active.next(), - data = { - options: options, - newHeader: clickedIsActive && options.collapsible ? $([]) : clicked, - oldHeader: this.active, - newContent: clickedIsActive && options.collapsible ? $([]) : toShow, - oldContent: toHide - }, - down = this.headers.index( this.active[0] ) > this.headers.index( clicked[0] ); - - // when the call to ._toggle() comes after the class changes - // it causes a very odd bug in IE 8 (see #6720) - this.active = clickedIsActive ? $([]) : clicked; - this._toggle( toShow, toHide, data, clickedIsActive, down ); - - // switch classes - 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" ); - } - - return; - }, - - _toggle: function( toShow, toHide, data, clickedIsActive, down ) { - var self = this, - options = self.options; - - self.toShow = toShow; - self.toHide = toHide; - self.data = data; - - var complete = function() { - if ( !self ) { - return; - } - return self._completed.apply( self, arguments ); - }; - - // trigger changestart event - self._trigger( "changestart", null, self.data ); - - // count elements to animate - self.running = toHide.size() === 0 ? toShow.size() : toHide.size(); - - if ( options.animated ) { - var animOptions = {}; - - if ( options.collapsible && clickedIsActive ) { - animOptions = { - toShow: $( [] ), - toHide: toHide, - complete: complete, - down: down, - autoHeight: options.autoHeight || options.fillSpace - }; - } else { - animOptions = { - toShow: toShow, - toHide: toHide, - complete: complete, - down: down, - autoHeight: options.autoHeight || options.fillSpace - }; - } - - if ( !options.proxied ) { - options.proxied = options.animated; - } - - if ( !options.proxiedDuration ) { - options.proxiedDuration = options.duration; - } - - options.animated = $.isFunction( options.proxied ) ? - options.proxied( animOptions ) : - options.proxied; - - options.duration = $.isFunction( options.proxiedDuration ) ? - options.proxiedDuration( animOptions ) : - options.proxiedDuration; - - var animations = $.ui.accordion.animations, - duration = options.duration, - easing = options.animated; - - if ( easing && !animations[ easing ] && !$.easing[ easing ] ) { - easing = "slide"; - } - if ( !animations[ easing ] ) { - animations[ easing ] = function( options ) { - this.slide( options, { - easing: easing, - duration: duration || 700 - }); - }; - } - - animations[ easing ]( animOptions ); - } else { - if ( options.collapsible && clickedIsActive ) { - toShow.toggle(); - } else { - toHide.hide(); - toShow.show(); - } - - complete( true ); - } - - // TODO assert that the blur and focus triggers are really necessary, remove otherwise - toHide.prev() - .attr({ - "aria-expanded": "false", - "aria-selected": "false", - tabIndex: -1 - }) - .blur(); - toShow.prev() - .attr({ - "aria-expanded": "true", - "aria-selected": "true", - tabIndex: 0 - }) - .focus(); - }, - - _completed: function( cancel ) { - this.running = cancel ? 0 : --this.running; - if ( this.running ) { - return; - } - - if ( this.options.clearStyle ) { - 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" ); - // Work around for rendering bug in IE (#5421) - if ( this.toHide.length ) { - this.toHide.parent()[0].className = this.toHide.parent()[0].className; - } - - this._trigger( "change", null, this.data ); - } -}); - -$.extend( $.ui.accordion, { - version: "1.8.24", - animations: { - slide: function( options, additions ) { - options = $.extend({ - easing: "swing", - duration: 300 - }, options, additions ); - if ( !options.toHide.size() ) { - options.toShow.animate({ - height: "show", - paddingTop: "show", - paddingBottom: "show" - }, options ); - return; - } - if ( !options.toShow.size() ) { - options.toHide.animate({ - height: "hide", - paddingTop: "hide", - paddingBottom: "hide" - }, options ); - return; - } - var overflow = options.toShow.css( "overflow" ), - percentDone = 0, - showProps = {}, - hideProps = {}, - fxAttrs = [ "height", "paddingTop", "paddingBottom" ], - originalWidth; - // fix width before calculating height of hidden element - var s = options.toShow; - originalWidth = s[0].style.width; - s.width( s.parent().width() - - parseFloat( s.css( "paddingLeft" ) ) - - parseFloat( s.css( "paddingRight" ) ) - - ( parseFloat( s.css( "borderLeftWidth" ) ) || 0 ) - - ( parseFloat( s.css( "borderRightWidth" ) ) || 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 ) { - // 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" ) { - percentDone = ( settings.end - settings.start === 0 ) ? 0 : - ( settings.now - settings.start ) / ( settings.end - settings.start ); - } - - 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({ - width: originalWidth, - overflow: overflow - }); - options.complete(); - } - }); - }, - bounceslide: function( options ) { - this.slide( options, { - easing: options.down ? "easeOutBounce" : "swing", - duration: options.down ? 1000 : 200 - }); - } - } -}); - -})( jQuery ); diff --git a/resources/jquery.ui/jquery.ui.autocomplete.js b/resources/jquery.ui/jquery.ui.autocomplete.js deleted file mode 100644 index 8d69be28..00000000 --- a/resources/jquery.ui/jquery.ui.autocomplete.js +++ /dev/null @@ -1,631 +0,0 @@ -/*! - * jQuery UI Autocomplete 1.8.24 - * - * Copyright 2012, 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 - * - * Depends: - * jquery.ui.core.js - * jquery.ui.widget.js - * jquery.ui.position.js - */ -(function( $, undefined ) { - -// used to prevent race conditions with remote data sources -var requestIndex = 0; - -$.widget( "ui.autocomplete", { - options: { - appendTo: "body", - autoFocus: false, - delay: 300, - minLength: 1, - position: { - my: "left top", - at: "left bottom", - collision: "none" - }, - source: null - }, - - pending: 0, - - _create: function() { - var self = this, - doc = this.element[ 0 ].ownerDocument, - suppressKeyPress; - this.isMultiLine = this.element.is( "textarea" ); - - this.element - .addClass( "ui-autocomplete-input" ) - .attr( "autocomplete", "off" ) - // TODO verify these actually work as intended - .attr({ - role: "textbox", - "aria-autocomplete": "list", - "aria-haspopup": "true" - }) - .bind( "keydown.autocomplete", function( event ) { - if ( self.options.disabled || self.element.propAttr( "readOnly" ) ) { - return; - } - - suppressKeyPress = false; - var keyCode = $.ui.keyCode; - switch( event.keyCode ) { - case keyCode.PAGE_UP: - self._move( "previousPage", event ); - break; - case keyCode.PAGE_DOWN: - self._move( "nextPage", event ); - break; - case keyCode.UP: - self._keyEvent( "previous", event ); - break; - case keyCode.DOWN: - self._keyEvent( "next", event ); - break; - case keyCode.ENTER: - 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 - case keyCode.TAB: - if ( !self.menu.active ) { - return; - } - self.menu.select( event ); - break; - case keyCode.ESCAPE: - self.element.val( self.term ); - self.close( event ); - break; - default: - // keypress is triggered before the input value is changed - clearTimeout( self.searching ); - self.searching = setTimeout(function() { - // 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 - self.closing = setTimeout(function() { - self.close( event ); - self._change( event ); - }, 150 ); - }); - this._initSource(); - this.menu = $( "
          " ) - .addClass( "ui-autocomplete" ) - .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 && - !$.ui.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({ - focus: function( event, ui ) { - var item = ui.item.data( "item.autocomplete" ); - 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 ); - } - } - }, - selected: function( event, ui ) { - var item = ui.item.data( "item.autocomplete" ), - previous = self.previous; - - // only trigger when focus was lost (click on menu) - 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 ) { - // 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 ) { - this.menu.element.bgiframe(); - } - // turning off autocomplete prevents the browser from remembering the - // value when navigating through history, so we re-enable autocomplete - // if the page is unloaded before the widget is destroyed. #7790 - self.beforeunloadHandler = function() { - self.element.removeAttr( "autocomplete" ); - }; - $( window ).bind( "beforeunload", self.beforeunloadHandler ); - }, - - destroy: function() { - this.element - .removeClass( "ui-autocomplete-input" ) - .removeAttr( "autocomplete" ) - .removeAttr( "role" ) - .removeAttr( "aria-autocomplete" ) - .removeAttr( "aria-haspopup" ); - this.menu.element.remove(); - $( window ).unbind( "beforeunload", this.beforeunloadHandler ); - $.Widget.prototype.destroy.call( this ); - }, - - _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 self = this, - array, - url; - if ( $.isArray(this.options.source) ) { - array = this.options.source; - this.source = function( request, response ) { - response( $.ui.autocomplete.filter(array, request.term) ); - }; - } else if ( typeof this.options.source === "string" ) { - url = this.options.source; - this.source = function( request, response ) { - if ( self.xhr ) { - self.xhr.abort(); - } - self.xhr = $.ajax({ - url: url, - data: request, - dataType: "json", - success: function( data, status ) { - response( data ); - }, - error: function() { - response( [] ); - } - }); - }; - } else { - this.source = this.options.source; - } - }, - - 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", event ) === false ) { - return; - } - - return this._search( value ); - }, - - _search: function( value ) { - this.pending++; - this.element.addClass( "ui-autocomplete-loading" ); - - this.source( { term: value }, this._response() ); - }, - - _response: function() { - var that = this, - index = ++requestIndex; - - return function( content ) { - if ( index === requestIndex ) { - that.__response( content ); - } - - that.pending--; - if ( !that.pending ) { - that.element.removeClass( "ui-autocomplete-loading" ); - } - }; - }, - - __response: function( content ) { - if ( !this.options.disabled && content && content.length ) { - content = this._normalize( content ); - this._suggest( content ); - this._trigger( "open" ); - } else { - this.close(); - } - }, - - close: function( event ) { - clearTimeout( this.closing ); - if ( this.menu.element.is(":visible") ) { - this.menu.element.hide(); - this.menu.deactivate(); - this._trigger( "close", event ); - } - }, - - _change: function( event ) { - if ( this.previous !== this.element.val() ) { - this._trigger( "change", event, { item: this.selectedItem } ); - } - }, - - _normalize: function( items ) { - // assume all items have the right format when the first item is complete - if ( items.length && items[0].label && items[0].value ) { - return items; - } - return $.map( items, function(item) { - if ( typeof item === "string" ) { - return { - label: item, - value: item - }; - } - return $.extend({ - label: item.label || item.value, - value: item.value || item.label - }, item ); - }); - }, - - _suggest: function( items ) { - var ul = this.menu.element - .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(); - - // size and position menu - ul.show(); - this._resizeMenu(); - ul.position( $.extend({ - of: this.element - }, this.options.position )); - - if ( this.options.autoFocus ) { - this.menu.next( new $.Event("mouseover") ); - } - }, - - _resizeMenu: function() { - var ul = this.menu.element; - ul.outerWidth( Math.max( - // Firefox wraps long text (possibly a rounding bug) - // so we add 1px to avoid the wrapping (#7513) - ul.width( "" ).outerWidth() + 1, - this.element.outerWidth() - ) ); - }, - - _renderMenu: function( ul, items ) { - var self = this; - $.each( items, function( index, item ) { - self._renderItem( ul, item ); - }); - }, - - _renderItem: function( ul, item) { - return $( "
        • " ) - .data( "item.autocomplete", item ) - .append( $( "" ).text( item.label ) ) - .appendTo( ul ); - }, - - _move: function( direction, event ) { - if ( !this.menu.element.is(":visible") ) { - this.search( null, event ); - return; - } - if ( this.menu.first() && /^previous/.test(direction) || - this.menu.last() && /^next/.test(direction) ) { - this.element.val( this.term ); - this.menu.deactivate(); - return; - } - this.menu[ direction ]( event ); - }, - - widget: function() { - return this.menu.element; - }, - _keyEvent: function( keyEvent, event ) { - if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) { - this._move( keyEvent, event ); - - // prevents moving cursor to beginning/end of the text field in some browsers - event.preventDefault(); - } - } -}); - -$.extend( $.ui.autocomplete, { - escapeRegex: function( value ) { - return value.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); - }, - filter: function(array, term) { - var matcher = new RegExp( $.ui.autocomplete.escapeRegex(term), "i" ); - return $.grep( array, function(value) { - return matcher.test( value.label || value.value || value ); - }); - } -}); - -}( jQuery )); - -/* - * jQuery UI Menu (not officially released) - * - * This widget isn't yet finished and the API is subject to change. We plan to finish - * it for the next release. You're welcome to give it a try anyway and give us feedback, - * as long as you're okay with migrating your code later on. We can help with that, too. - * - * 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/Menu - * - * Depends: - * jquery.ui.core.js - * jquery.ui.widget.js - */ -(function($) { - -$.widget("ui.menu", { - _create: function() { - var self = this; - this.element - .addClass("ui-menu ui-widget ui-widget-content ui-corner-all") - .attr({ - role: "listbox", - "aria-activedescendant": "ui-active-menuitem" - }) - .click(function( event ) { - if ( !$( event.target ).closest( ".ui-menu-item a" ).length ) { - return; - } - // temporary - event.preventDefault(); - self.select( event ); - }); - this.refresh(); - }, - - refresh: function() { - var self = this; - - // don't refresh list items that are already adapted - var items = this.element.children("li:not(.ui-menu-item):has(a)") - .addClass("ui-menu-item") - .attr("role", "menuitem"); - - items.children("a") - .addClass("ui-corner-all") - .attr("tabindex", -1) - // mouseenter doesn't work with event delegation - .mouseenter(function( event ) { - self.activate( event, $(this).parent() ); - }) - .mouseleave(function() { - self.deactivate(); - }); - }, - - activate: function( event, item ) { - this.deactivate(); - if (this.hasScroll()) { - var offset = item.offset().top - this.element.offset().top, - scroll = this.element.scrollTop(), - elementHeight = this.element.height(); - if (offset < 0) { - this.element.scrollTop( scroll + offset); - } else if (offset >= elementHeight) { - this.element.scrollTop( scroll + offset - elementHeight + item.height()); - } - } - this.active = item.eq(0) - .children("a") - .addClass("ui-state-hover") - .attr("id", "ui-active-menuitem") - .end(); - this._trigger("focus", event, { item: item }); - }, - - deactivate: function() { - if (!this.active) { return; } - - this.active.children("a") - .removeClass("ui-state-hover") - .removeAttr("id"); - this._trigger("blur"); - this.active = null; - }, - - next: function(event) { - this.move("next", ".ui-menu-item:first", event); - }, - - previous: function(event) { - this.move("prev", ".ui-menu-item:last", event); - }, - - first: function() { - return this.active && !this.active.prevAll(".ui-menu-item").length; - }, - - last: function() { - return this.active && !this.active.nextAll(".ui-menu-item").length; - }, - - move: function(direction, edge, event) { - if (!this.active) { - this.activate(event, this.element.children(edge)); - return; - } - var next = this.active[direction + "All"](".ui-menu-item").eq(0); - if (next.length) { - this.activate(event, next); - } else { - this.activate(event, this.element.children(edge)); - } - }, - - // TODO merge with previousPage - nextPage: function(event) { - if (this.hasScroll()) { - // TODO merge with no-scroll-else - if (!this.active || this.last()) { - this.activate(event, this.element.children(".ui-menu-item:first")); - return; - } - var base = this.active.offset().top, - height = this.element.height(), - result = this.element.children(".ui-menu-item").filter(function() { - var close = $(this).offset().top - base - height + $(this).height(); - // TODO improve approximation - return close < 10 && close > -10; - }); - - // TODO try to catch this earlier when scrollTop indicates the last page anyway - if (!result.length) { - result = this.element.children(".ui-menu-item:last"); - } - this.activate(event, result); - } else { - this.activate(event, this.element.children(".ui-menu-item") - .filter(!this.active || this.last() ? ":first" : ":last")); - } - }, - - // TODO merge with nextPage - previousPage: function(event) { - if (this.hasScroll()) { - // TODO merge with no-scroll-else - if (!this.active || this.first()) { - this.activate(event, this.element.children(".ui-menu-item:last")); - return; - } - - var base = this.active.offset().top, - height = this.element.height(), - result = this.element.children(".ui-menu-item").filter(function() { - var close = $(this).offset().top - base + height - $(this).height(); - // TODO improve approximation - return close < 10 && close > -10; - }); - - // TODO try to catch this earlier when scrollTop indicates the last page anyway - if (!result.length) { - result = this.element.children(".ui-menu-item:first"); - } - this.activate(event, result); - } else { - this.activate(event, this.element.children(".ui-menu-item") - .filter(!this.active || this.first() ? ":last" : ":first")); - } - }, - - hasScroll: function() { - return this.element.height() < this.element[ $.fn.prop ? "prop" : "attr" ]("scrollHeight"); - }, - - select: function( event ) { - this._trigger("selected", event, { item: this.active }); - } -}); - -}(jQuery)); diff --git a/resources/jquery.ui/jquery.ui.button.js b/resources/jquery.ui/jquery.ui.button.js deleted file mode 100644 index 8326262c..00000000 --- a/resources/jquery.ui/jquery.ui.button.js +++ /dev/null @@ -1,414 +0,0 @@ -/*! - * jQuery UI Button 1.8.24 - * - * Copyright 2012, 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 - * - * Depends: - * jquery.ui.core.js - * jquery.ui.widget.js - */ -(function( $, undefined ) { - -var lastActive, startXPos, startYPos, clickDragged, - baseClasses = "ui-button ui-widget ui-state-default ui-corner-all", - 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() { - var buttons = $( this ).find( ":ui-button" ); - setTimeout(function() { - buttons.button( "refresh" ); - }, 1 ); - }, - radioGroup = function( radio ) { - var name = radio.name, - form = radio.form, - radios = $( [] ); - if ( name ) { - if ( form ) { - radios = $( form ).find( "[name='" + name + "']" ); - } else { - radios = $( "[name='" + name + "']", radio.ownerDocument ) - .filter(function() { - return !this.form; - }); - } - } - return radios; - }; - -$.widget( "ui.button", { - options: { - disabled: null, - text: true, - label: null, - icons: { - primary: null, - secondary: null - } - }, - _create: function() { - this.element.closest( "form" ) - .unbind( "reset.button" ) - .bind( "reset.button", formResetHandler ); - - if ( typeof this.options.disabled !== "boolean" ) { - this.options.disabled = !!this.element.propAttr( "disabled" ); - } else { - this.element.propAttr( "disabled", this.options.disabled ); - } - - this._determineButtonType(); - this.hasTitle = !!this.buttonElement.attr( "title" ); - - var self = this, - options = this.options, - toggleButton = this.type === "checkbox" || this.type === "radio", - hoverClass = "ui-state-hover" + ( !toggleButton ? " ui-state-active" : "" ), - focusClass = "ui-state-focus"; - - if ( options.label === null ) { - options.label = this.buttonElement.html(); - } - - this.buttonElement - .addClass( baseClasses ) - .attr( "role", "button" ) - .bind( "mouseenter.button", function() { - if ( options.disabled ) { - return; - } - $( this ).addClass( "ui-state-hover" ); - if ( this === lastActive ) { - $( this ).addClass( "ui-state-active" ); - } - }) - .bind( "mouseleave.button", function() { - if ( options.disabled ) { - return; - } - $( this ).removeClass( hoverClass ); - }) - .bind( "click.button", function( event ) { - if ( options.disabled ) { - event.preventDefault(); - event.stopImmediatePropagation(); - } - }); - - this.element - .bind( "focus.button", function() { - // no need to check disabled, focus won't be triggered anyway - self.buttonElement.addClass( focusClass ); - }) - .bind( "blur.button", function() { - self.buttonElement.removeClass( focusClass ); - }); - - if ( toggleButton ) { - this.element.bind( "change.button", function() { - if ( clickDragged ) { - return; - } - self.refresh(); - }); - // if mouse moves between mousedown and mouseup (drag) set clickDragged flag - // prevents issue where button state changes but checkbox/radio checked state - // does not in Firefox (see ticket #6970) - this.buttonElement - .bind( "mousedown.button", function( event ) { - if ( options.disabled ) { - return; - } - clickDragged = false; - startXPos = event.pageX; - startYPos = event.pageY; - }) - .bind( "mouseup.button", function( event ) { - if ( options.disabled ) { - return; - } - if ( startXPos !== event.pageX || startYPos !== event.pageY ) { - clickDragged = true; - } - }); - } - - if ( this.type === "checkbox" ) { - this.buttonElement.bind( "click.button", function() { - if ( options.disabled || clickDragged ) { - return false; - } - $( this ).toggleClass( "ui-state-active" ); - self.buttonElement.attr( "aria-pressed", self.element[0].checked ); - }); - } else if ( this.type === "radio" ) { - this.buttonElement.bind( "click.button", function() { - if ( options.disabled || clickDragged ) { - return false; - } - $( this ).addClass( "ui-state-active" ); - self.buttonElement.attr( "aria-pressed", "true" ); - - var radio = self.element[ 0 ]; - radioGroup( radio ) - .not( radio ) - .map(function() { - return $( this ).button( "widget" )[ 0 ]; - }) - .removeClass( "ui-state-active" ) - .attr( "aria-pressed", "false" ); - }); - } else { - this.buttonElement - .bind( "mousedown.button", function() { - if ( options.disabled ) { - return false; - } - $( this ).addClass( "ui-state-active" ); - lastActive = this; - $( document ).one( "mouseup", function() { - lastActive = null; - }); - }) - .bind( "mouseup.button", function() { - if ( options.disabled ) { - return false; - } - $( this ).removeClass( "ui-state-active" ); - }) - .bind( "keydown.button", function(event) { - if ( options.disabled ) { - return false; - } - if ( event.keyCode == $.ui.keyCode.SPACE || event.keyCode == $.ui.keyCode.ENTER ) { - $( this ).addClass( "ui-state-active" ); - } - }) - .bind( "keyup.button", function() { - $( this ).removeClass( "ui-state-active" ); - }); - - if ( this.buttonElement.is("a") ) { - this.buttonElement.keyup(function(event) { - if ( event.keyCode === $.ui.keyCode.SPACE ) { - // TODO pass through original event correctly (just as 2nd argument doesn't work) - $( this ).click(); - } - }); - } - } - - // TODO: pull out $.Widget's handling for the disabled option into - // $.Widget.prototype._setOptionDisabled so it's easy to proxy and can - // be overridden by individual plugins - this._setOption( "disabled", options.disabled ); - this._resetButton(); - }, - - _determineButtonType: function() { - - if ( this.element.is(":checkbox") ) { - this.type = "checkbox"; - } else if ( this.element.is(":radio") ) { - this.type = "radio"; - } else if ( this.element.is("input") ) { - this.type = "input"; - } else { - this.type = "button"; - } - - if ( this.type === "checkbox" || this.type === "radio" ) { - // we don't search against the document in case the element - // is disconnected from the DOM - var ancestor = this.element.parents().filter(":last"), - labelSelector = "label[for='" + this.element.attr("id") + "']"; - this.buttonElement = ancestor.find( labelSelector ); - if ( !this.buttonElement.length ) { - ancestor = ancestor.length ? ancestor.siblings() : this.element.siblings(); - this.buttonElement = ancestor.filter( labelSelector ); - if ( !this.buttonElement.length ) { - this.buttonElement = ancestor.find( labelSelector ); - } - } - this.element.addClass( "ui-helper-hidden-accessible" ); - - var checked = this.element.is( ":checked" ); - if ( checked ) { - this.buttonElement.addClass( "ui-state-active" ); - } - this.buttonElement.attr( "aria-pressed", checked ); - } else { - this.buttonElement = this.element; - } - }, - - widget: function() { - return this.buttonElement; - }, - - destroy: function() { - this.element - .removeClass( "ui-helper-hidden-accessible" ); - this.buttonElement - .removeClass( baseClasses + " " + stateClasses + " " + typeClasses ) - .removeAttr( "role" ) - .removeAttr( "aria-pressed" ) - .html( this.buttonElement.find(".ui-button-text").html() ); - - if ( !this.hasTitle ) { - this.buttonElement.removeAttr( "title" ); - } - - $.Widget.prototype.destroy.call( this ); - }, - - _setOption: function( key, value ) { - $.Widget.prototype._setOption.apply( this, arguments ); - if ( key === "disabled" ) { - if ( value ) { - this.element.propAttr( "disabled", true ); - } else { - this.element.propAttr( "disabled", false ); - } - return; - } - this._resetButton(); - }, - - refresh: function() { - var isDisabled = this.element.is( ":disabled" ); - if ( isDisabled !== this.options.disabled ) { - this._setOption( "disabled", isDisabled ); - } - if ( this.type === "radio" ) { - radioGroup( this.element[0] ).each(function() { - if ( $( this ).is( ":checked" ) ) { - $( this ).button( "widget" ) - .addClass( "ui-state-active" ) - .attr( "aria-pressed", "true" ); - } else { - $( this ).button( "widget" ) - .removeClass( "ui-state-active" ) - .attr( "aria-pressed", "false" ); - } - }); - } else if ( this.type === "checkbox" ) { - if ( this.element.is( ":checked" ) ) { - this.buttonElement - .addClass( "ui-state-active" ) - .attr( "aria-pressed", "true" ); - } else { - this.buttonElement - .removeClass( "ui-state-active" ) - .attr( "aria-pressed", "false" ); - } - } - }, - - _resetButton: function() { - if ( this.type === "input" ) { - if ( this.options.label ) { - this.element.val( this.options.label ); - } - return; - } - var buttonElement = this.buttonElement.removeClass( typeClasses ), - buttonText = $( "", this.element[0].ownerDocument ) - .addClass( "ui-button-text" ) - .html( this.options.label ) - .appendTo( buttonElement.empty() ) - .text(), - icons = this.options.icons, - multipleIcons = icons.primary && icons.secondary, - buttonClasses = []; - - if ( icons.primary || icons.secondary ) { - if ( this.options.text ) { - buttonClasses.push( "ui-button-text-icon" + ( multipleIcons ? "s" : ( icons.primary ? "-primary" : "-secondary" ) ) ); - } - - if ( icons.primary ) { - buttonElement.prepend( "" ); - } - - if ( icons.secondary ) { - buttonElement.append( "" ); - } - - if ( !this.options.text ) { - buttonClasses.push( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" ); - - if ( !this.hasTitle ) { - buttonElement.attr( "title", buttonText ); - } - } - } else { - buttonClasses.push( "ui-button-text-only" ); - } - buttonElement.addClass( buttonClasses.join( " " ) ); - } -}); - -$.widget( "ui.buttonset", { - options: { - items: ":button, :submit, :reset, :checkbox, :radio, a, :data(button)" - }, - - _create: function() { - this.element.addClass( "ui-buttonset" ); - }, - - _init: function() { - this.refresh(); - }, - - _setOption: function( key, value ) { - if ( key === "disabled" ) { - this.buttons.button( "option", key, value ); - } - - $.Widget.prototype._setOption.apply( this, arguments ); - }, - - refresh: function() { - var rtl = this.element.css( "direction" ) === "rtl"; - - this.buttons = this.element.find( this.options.items ) - .filter( ":ui-button" ) - .button( "refresh" ) - .end() - .not( ":ui-button" ) - .button() - .end() - .map(function() { - return $( this ).button( "widget" )[ 0 ]; - }) - .removeClass( "ui-corner-all ui-corner-left ui-corner-right" ) - .filter( ":first" ) - .addClass( rtl ? "ui-corner-right" : "ui-corner-left" ) - .end() - .filter( ":last" ) - .addClass( rtl ? "ui-corner-left" : "ui-corner-right" ) - .end() - .end(); - }, - - destroy: function() { - this.element.removeClass( "ui-buttonset" ); - this.buttons - .map(function() { - return $( this ).button( "widget" )[ 0 ]; - }) - .removeClass( "ui-corner-left ui-corner-right" ) - .end() - .button( "destroy" ); - - $.Widget.prototype.destroy.call( this ); - } -}); - -}( jQuery ) ); diff --git a/resources/jquery.ui/jquery.ui.core.js b/resources/jquery.ui/jquery.ui.core.js deleted file mode 100644 index b36c1ac4..00000000 --- a/resources/jquery.ui/jquery.ui.core.js +++ /dev/null @@ -1,334 +0,0 @@ -/*! - * jQuery UI 1.8.24 - * - * Copyright 2012, 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 - */ -(function( $, undefined ) { - -// 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; -} - -$.extend( $.ui, { - version: "1.8.24", - - 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, - END: 35, - ENTER: 13, - ESCAPE: 27, - HOME: 36, - INSERT: 45, - LEFT: 37, - MENU: 93, // COMMAND_RIGHT - NUMPAD_ADD: 107, - NUMPAD_DECIMAL: 110, - NUMPAD_DIVIDE: 111, - NUMPAD_ENTER: 108, - NUMPAD_MULTIPLY: 106, - NUMPAD_SUBTRACT: 109, - PAGE_DOWN: 34, - PAGE_UP: 33, - PERIOD: 190, - RIGHT: 39, - SHIFT: 16, - SPACE: 32, - TAB: 9, - UP: 38, - WINDOWS: 91 // COMMAND - } -}); - -// plugins -$.fn.extend({ - propAttr: $.fn.prop || $.fn.attr, - - _focus: $.fn.focus, - focus: function( delay, fn ) { - return typeof delay === "number" ? - this.each(function() { - var elem = this; - setTimeout(function() { - $( 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'))) { - 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); - } else { - scrollParent = this.parents().filter(function() { - return (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1)); - }).eq(0); - } - - return (/fixed/).test(this.css('position')) || !scrollParent.length ? $(document) : scrollParent; - }, - - 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 ) { - // 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" ) { - // 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 - //
          - value = parseInt( elem.css( "zIndex" ), 10 ); - if ( !isNaN( value ) && value !== 0 ) { - return value; - } - } - elem = elem.parent(); - } - } - - return 0; - }, - - disableSelection: function() { - return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) + - ".ui-disableSelection", function( event ) { - event.preventDefault(); - }); - }, - - enableSelection: function() { - return this.unbind( ".ui-disableSelection" ); - } -}); - -// support: jQuery <1.8 -if ( !$( "" ).outerWidth( 1 ).jquery ) { - $.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; - } - - $.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 focusable( element, isTabIndexNotNaN ) { - var nodeName = element.nodeName.toLowerCase(); - 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 - ? element.href || isTabIndexNotNaN - : isTabIndexNotNaN) - // the element and all of its ancestors must be visible - && visible( element ); -} - -function visible( element ) { - return !$( element ).parents().andSelf().filter(function() { - return $.curCSS( this, "visibility" ) === "hidden" || - $.expr.filters.hidden( this ); - }).length; -} - -$.extend( $.expr[ ":" ], { - data: $.expr.createPseudo ? - $.expr.createPseudo(function( dataName ) { - return function( elem ) { - return !!$.data( elem, dataName ); - }; - }) : - // support: jQuery <1.8 - function( elem, i, match ) { - return !!$.data( elem, match[ 3 ] ); - }, - - focusable: function( element ) { - return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) ); - }, - - tabbable: function( element ) { - var tabIndex = $.attr( element, "tabindex" ), - isTabIndexNaN = isNaN( tabIndex ); - return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN ); - } -}); - -// support -$(function() { - var body = document.body, - div = body.appendChild( div = document.createElement( "div" ) ); - - // access offsetHeight before setting the style to prevent a layout bug - // in IE 9 which causes the elemnt to continue to take up space even - // after it is removed from the DOM (#8026) - div.offsetHeight; - - $.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"; -}); - -// jQuery <1.4.3 uses curCSS, in 1.4.3 - 1.7.2 curCSS = css, 1.8+ only has css -if ( !$.curCSS ) { - $.curCSS = $.css; -} - - - - - -// 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 ); - } - } - } - }, - - // will be deprecated when we switch to jQuery 1.4 - use jQuery.contains() - contains: function( a, b ) { - return document.compareDocumentPosition ? - a.compareDocumentPosition( b ) & 16 : - a !== b && a.contains( b ); - }, - - // 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 ); diff --git a/resources/jquery.ui/jquery.ui.datepicker.js b/resources/jquery.ui/jquery.ui.datepicker.js deleted file mode 100644 index 1fcea12a..00000000 --- a/resources/jquery.ui/jquery.ui.datepicker.js +++ /dev/null @@ -1,1854 +0,0 @@ -/*! - * jQuery UI Datepicker 1.8.24 - * - * Copyright 2012, 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( $, undefined ) { - -$.extend($.ui, { datepicker: { version: "1.8.24" } }); - -var PROP_NAME = 'datepicker'; -var dpuuid = new Date().getTime(); -var instActive; - -/* Date picker manager. - Use the singleton instance of this class, $.datepicker, to interact with the date picker. - Settings for (groups of) date pickers are maintained in an instance object, - allowing multiple different settings on the same page. */ - -function Datepicker() { - this.debug = false; // Change this to true to start debugging - this._curInst = null; // The current instance in use - this._keyEvent = false; // If the last event was a key event - this._disabledInputs = []; // List of date picker inputs that have been disabled - this._datepickerShowing = false; // True if the popup picker is showing , false if not - this._inDialog = false; // True if showing within a "dialog", false if not - this._mainDivId = 'ui-datepicker-div'; // The ID of the main datepicker division - this._inlineClass = 'ui-datepicker-inline'; // The name of the inline marker class - this._appendClass = 'ui-datepicker-append'; // The name of the append marker class - this._triggerClass = 'ui-datepicker-trigger'; // The name of the trigger marker class - this._dialogClass = 'ui-datepicker-dialog'; // The name of the dialog marker class - this._disableClass = 'ui-datepicker-disabled'; // The name of the disabled covering marker class - this._unselectableClass = 'ui-datepicker-unselectable'; // The name of the unselectable cell marker class - this._currentClass = 'ui-datepicker-current-day'; // The name of the current day marker class - this._dayOverClass = 'ui-datepicker-days-cell-over'; // The name of the day hover marker class - this.regional = []; // Available regional settings, indexed by language code - this.regional[''] = { // Default regional settings - closeText: 'Done', // Display text for close link - prevText: 'Prev', // Display text for previous month link - nextText: 'Next', // Display text for next month link - currentText: 'Today', // Display text for current month link - monthNames: ['January','February','March','April','May','June', - 'July','August','September','October','November','December'], // Names of months for drop-down and formatting - monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], // For formatting - dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], // For formatting - dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], // For formatting - dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], // Column headings for days starting at Sunday - weekHeader: 'Wk', // Column header for week of the year - dateFormat: 'mm/dd/yy', // See format options on parseDate - firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ... - isRTL: false, // True if right-to-left language, false if left-to-right - showMonthAfterYear: false, // True if the year select precedes month, false for month then year - yearSuffix: '' // Additional text to append to the year in the month headers - }; - 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: '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 - appendText: '', // Display text following the input box, e.g. showing the format - buttonText: '...', // Text for trigger button - buttonImage: '', // URL for trigger button image - buttonImageOnly: false, // True if the image appears alone, false if it appears on a button - hideIfNoPrevNext: false, // True to hide next/previous month links - // if not applicable, false to just disable them - navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links - gotoCurrent: false, // True if today link goes back to current selection instead - changeMonth: false, // True if month can be selected directly, false if only prev/next - changeYear: false, // True if year can be selected directly, false if only prev/next - yearRange: 'c-10:c+10', // Range of years to display in drop-down, - // either relative to today's year (-nn:+nn), relative to currently displayed year - // (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n) - showOtherMonths: false, // True to show dates in other months, false to leave blank - selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable - showWeek: false, // True to show week of the year, false to not show it - calculateWeek: this.iso8601Week, // How to calculate the week of the year, - // takes a Date and returns the number of the week for it - shortYearCutoff: '+10', // Short year values < this are in the current century, - // > this are in the previous century, - // 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: '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 - beforeShow: null, // Function that takes an input field and - // returns a set of custom settings for the date picker - onSelect: null, // Define a callback function when a date is selected - onChangeMonthYear: null, // Define a callback function when the month or year is changed - onClose: null, // Define a callback function when the datepicker is closed - numberOfMonths: 1, // Number of months to show at a time - showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0) - stepMonths: 1, // Number of months to step back/forward - stepBigMonths: 12, // Number of months to step back/forward for the big links - altField: '', // Selector for an alternate field to store selected dates into - altFormat: '', // The date format to use for the alternate field - constrainInput: true, // The input is constrained by the current date format - showButtonPanel: false, // True to show button panel, false to not show it - autoSize: false, // True to size the input for the date format, false to leave as is - disabled: false // The initial disabled state - }; - $.extend(this._defaults, this.regional['']); - this.dpDiv = bindHover($('
          ')); -} - -$.extend(Datepicker.prototype, { - /* Class name added to elements to indicate already configured with a date picker. */ - markerClassName: 'hasDatepicker', - - //Keep track of the maximum number of rows displayed (see #7043) - maxRows: 4, - - /* Debug logging (if enabled). */ - log: function () { - if (this.debug) - console.log.apply('', arguments); - }, - - // TODO rename to "widget" when switching to widget factory - _widgetDatepicker: function() { - return this.dpDiv; - }, - - /* Override the default settings for all instances of the date picker. - @param settings object - the new settings to use as defaults (anonymous object) - @return the manager object */ - setDefaults: function(settings) { - extendRemove(this._defaults, settings || {}); - return this; - }, - - /* Attach the date picker to a jQuery selection. - @param target element - the target input field or division or span - @param settings object - the new settings to use for this date picker instance (anonymous) */ - _attachDatepicker: function(target, settings) { - // check for settings on the control itself - in namespace 'date:' - var inlineSettings = null; - for (var attrName in this._defaults) { - var attrValue = target.getAttribute('date:' + attrName); - if (attrValue) { - inlineSettings = inlineSettings || {}; - try { - inlineSettings[attrName] = eval(attrValue); - } catch (err) { - inlineSettings[attrName] = attrValue; - } - } - } - var nodeName = target.nodeName.toLowerCase(); - var inline = (nodeName == 'div' || nodeName == 'span'); - 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') { - this._connectDatepicker(target, inst); - } else if (inline) { - this._inlineDatepicker(target, inst); - } - }, - - /* 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 - return {id: id, input: target, // associated target - selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection - drawMonth: 0, drawYear: 0, // month being drawn - inline: inline, // is datepicker inline or not - dpDiv: (!inline ? this.dpDiv : // presentation div - bindHover($('
          ')))}; - }, - - /* Attach the date picker to an input field. */ - _connectDatepicker: function(target, inst) { - var input = $(target); - inst.append = $([]); - inst.trigger = $([]); - if (input.hasClass(this.markerClassName)) - return; - this._attachments(input, inst); - input.addClass(this.markerClassName).keydown(this._doKeyDown). - keypress(this._doKeyPress).keyup(this._doKeyUp). - bind("setData.datepicker", function(event, key, value) { - inst.settings[key] = value; - }).bind("getData.datepicker", function(event, key) { - return this._get(inst, key); - }); - this._autoSize(inst); - $.data(target, PROP_NAME, inst); - //If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665) - if( inst.settings.disabled ) { - this._disableDatepicker( target ); - } - }, - - /* Make attachments based on settings. */ - _attachments: function(input, inst) { - var appendText = this._get(inst, 'appendText'); - var isRTL = this._get(inst, 'isRTL'); - if (inst.append) - inst.append.remove(); - if (appendText) { - inst.append = $('' + appendText + ''); - input[isRTL ? 'before' : 'after'](inst.append); - } - input.unbind('focus', this._showDatepicker); - if (inst.trigger) - inst.trigger.remove(); - var showOn = this._get(inst, 'showOn'); - if (showOn == 'focus' || showOn == 'both') // pop-up date picker when in the marked field - input.focus(this._showDatepicker); - if (showOn == 'button' || showOn == 'both') { // pop-up date picker when button clicked - var buttonText = this._get(inst, 'buttonText'); - var buttonImage = this._get(inst, 'buttonImage'); - inst.trigger = $(this._get(inst, 'buttonImageOnly') ? - $('').addClass(this._triggerClass). - attr({ src: buttonImage, alt: buttonText, title: buttonText }) : - $('').addClass(this._triggerClass). - html(buttonImage == '' ? buttonText : $('').attr( - { src:buttonImage, alt:buttonText, title:buttonText }))); - input[isRTL ? 'before' : 'after'](inst.trigger); - inst.trigger.click(function() { - if ($.datepicker._datepickerShowing && $.datepicker._lastInput == input[0]) - $.datepicker._hideDatepicker(); - else if ($.datepicker._datepickerShowing && $.datepicker._lastInput != input[0]) { - $.datepicker._hideDatepicker(); - $.datepicker._showDatepicker(input[0]); - } else - $.datepicker._showDatepicker(input[0]); - return false; - }); - } - }, - - /* Apply the maximum length for the date format. */ - _autoSize: function(inst) { - if (this._get(inst, 'autoSize') && !inst.inline) { - var date = new Date(2009, 12 - 1, 20); // Ensure double digits - var dateFormat = this._get(inst, 'dateFormat'); - if (dateFormat.match(/[DM]/)) { - var findMax = function(names) { - var max = 0; - var maxI = 0; - for (var i = 0; i < names.length; i++) { - if (names[i].length > max) { - max = names[i].length; - maxI = i; - } - } - return maxI; - }; - date.setMonth(findMax(this._get(inst, (dateFormat.match(/MM/) ? - 'monthNames' : 'monthNamesShort')))); - date.setDate(findMax(this._get(inst, (dateFormat.match(/DD/) ? - 'dayNames' : 'dayNamesShort'))) + 20 - date.getDay()); - } - inst.input.attr('size', this._formatDate(inst, date).length); - } - }, - - /* Attach an inline date picker to a div. */ - _inlineDatepicker: function(target, inst) { - var divSpan = $(target); - if (divSpan.hasClass(this.markerClassName)) - return; - divSpan.addClass(this.markerClassName).append(inst.dpDiv). - bind("setData.datepicker", function(event, key, value){ - inst.settings[key] = value; - }).bind("getData.datepicker", function(event, key){ - return this._get(inst, key); - }); - $.data(target, PROP_NAME, inst); - this._setDate(inst, this._getDefaultDate(inst), true); - this._updateDatepicker(inst); - this._updateAlternate(inst); - //If disabled option is true, disable the datepicker before showing it (see ticket #5665) - if( inst.settings.disabled ) { - this._disableDatepicker( target ); - } - // Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements - // http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height - inst.dpDiv.css( "display", "block" ); - }, - - /* Pop-up the date picker in a "dialog" box. - @param input element - ignored - @param date string or Date - the initial date to display - @param onSelect function - the function to call when a date is selected - @param settings object - update the dialog date picker instance's settings (anonymous object) - @param pos int[2] - coordinates for the dialog's position within the screen or - event - with x/y coordinates or - leave empty for default (screen centre) - @return the manager object */ - _dialogDatepicker: function(input, date, onSelect, settings, pos) { - var inst = this._dialogInst; // internal instance - if (!inst) { - this.uuid += 1; - var id = 'dp' + this.uuid; - this._dialogInput = $(''); - this._dialogInput.keydown(this._doKeyDown); - $('body').append(this._dialogInput); - inst = this._dialogInst = this._newInst(this._dialogInput, false); - inst.settings = {}; - $.data(this._dialogInput[0], PROP_NAME, inst); - } - extendRemove(inst.settings, settings || {}); - date = (date && date.constructor == Date ? this._formatDate(inst, date) : date); - this._dialogInput.val(date); - - this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null); - if (!this._pos) { - var browserWidth = document.documentElement.clientWidth; - var browserHeight = document.documentElement.clientHeight; - var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft; - var scrollY = document.documentElement.scrollTop || document.body.scrollTop; - this._pos = // should use actual width/height below - [(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY]; - } - - // move input on screen for focus, but hidden behind dialog - this._dialogInput.css('left', (this._pos[0] + 20) + 'px').css('top', this._pos[1] + 'px'); - inst.settings.onSelect = onSelect; - this._inDialog = true; - this.dpDiv.addClass(this._dialogClass); - this._showDatepicker(this._dialogInput[0]); - if ($.blockUI) - $.blockUI(this.dpDiv); - $.data(this._dialogInput[0], PROP_NAME, inst); - return this; - }, - - /* Detach a datepicker from its control. - @param target element - the target input field or division or span */ - _destroyDatepicker: function(target) { - var $target = $(target); - var inst = $.data(target, PROP_NAME); - if (!$target.hasClass(this.markerClassName)) { - return; - } - var nodeName = target.nodeName.toLowerCase(); - $.removeData(target, PROP_NAME); - if (nodeName == 'input') { - inst.append.remove(); - inst.trigger.remove(); - $target.removeClass(this.markerClassName). - unbind('focus', this._showDatepicker). - unbind('keydown', this._doKeyDown). - unbind('keypress', this._doKeyPress). - unbind('keyup', this._doKeyUp); - } else if (nodeName == 'div' || nodeName == 'span') - $target.removeClass(this.markerClassName).empty(); - }, - - /* Enable the date picker to a jQuery selection. - @param target element - the target input field or division or span */ - _enableDatepicker: function(target) { - var $target = $(target); - var inst = $.data(target, PROP_NAME); - if (!$target.hasClass(this.markerClassName)) { - return; - } - var nodeName = target.nodeName.toLowerCase(); - if (nodeName == 'input') { - target.disabled = false; - inst.trigger.filter('button'). - each(function() { this.disabled = false; }).end(). - filter('img').css({opacity: '1.0', cursor: ''}); - } - else if (nodeName == 'div' || nodeName == 'span') { - var inline = $target.children('.' + this._inlineClass); - inline.children().removeClass('ui-state-disabled'); - inline.find("select.ui-datepicker-month, select.ui-datepicker-year"). - removeAttr("disabled"); - } - this._disabledInputs = $.map(this._disabledInputs, - function(value) { return (value == target ? null : value); }); // delete entry - }, - - /* Disable the date picker to a jQuery selection. - @param target element - the target input field or division or span */ - _disableDatepicker: function(target) { - var $target = $(target); - var inst = $.data(target, PROP_NAME); - if (!$target.hasClass(this.markerClassName)) { - return; - } - var nodeName = target.nodeName.toLowerCase(); - if (nodeName == 'input') { - target.disabled = true; - inst.trigger.filter('button'). - each(function() { this.disabled = true; }).end(). - filter('img').css({opacity: '0.5', cursor: 'default'}); - } - else if (nodeName == 'div' || nodeName == 'span') { - var inline = $target.children('.' + this._inlineClass); - inline.children().addClass('ui-state-disabled'); - inline.find("select.ui-datepicker-month, select.ui-datepicker-year"). - attr("disabled", "disabled"); - } - this._disabledInputs = $.map(this._disabledInputs, - function(value) { return (value == target ? null : value); }); // delete entry - this._disabledInputs[this._disabledInputs.length] = target; - }, - - /* Is the first field in a jQuery collection disabled as a datepicker? - @param target element - the target input field or division or span - @return boolean - true if disabled, false if enabled */ - _isDisabledDatepicker: function(target) { - if (!target) { - return false; - } - for (var i = 0; i < this._disabledInputs.length; i++) { - if (this._disabledInputs[i] == target) - return true; - } - return false; - }, - - /* Retrieve the instance data for the target control. - @param target element - the target input field or division or span - @return object - the associated instance data - @throws error if a jQuery problem getting data */ - _getInst: function(target) { - try { - return $.data(target, PROP_NAME); - } - catch (err) { - throw 'Missing instance data for this datepicker'; - } - }, - - /* Update or retrieve the settings for a date picker attached to an input field or division. - @param target element - the target input field or division or span - @param name object - the new settings to update or - string - the name of the setting to change or retrieve, - when retrieving also 'all' for all instance settings or - 'defaults' for all global defaults - @param value any - the new value for the setting - (omit if above is an object or to retrieve a value) */ - _optionDatepicker: function(target, name, value) { - var inst = this._getInst(target); - if (arguments.length == 2 && typeof name == 'string') { - return (name == 'defaults' ? $.extend({}, $.datepicker._defaults) : - (inst ? (name == 'all' ? $.extend({}, inst.settings) : - this._get(inst, name)) : null)); - } - var settings = name || {}; - if (typeof name == 'string') { - settings = {}; - settings[name] = value; - } - if (inst) { - if (this._curInst == inst) { - this._hideDatepicker(); - } - var date = this._getDateDatepicker(target, true); - var minDate = this._getMinMaxDate(inst, 'min'); - var maxDate = this._getMinMaxDate(inst, 'max'); - extendRemove(inst.settings, settings); - // reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided - if (minDate !== null && settings['dateFormat'] !== undefined && settings['minDate'] === undefined) - inst.settings.minDate = this._formatDate(inst, minDate); - if (maxDate !== null && settings['dateFormat'] !== undefined && settings['maxDate'] === undefined) - inst.settings.maxDate = this._formatDate(inst, maxDate); - this._attachments($(target), inst); - this._autoSize(inst); - this._setDate(inst, date); - this._updateAlternate(inst); - this._updateDatepicker(inst); - } - }, - - // change method deprecated - _changeDatepicker: function(target, name, value) { - this._optionDatepicker(target, name, value); - }, - - /* Redraw the date picker attached to an input field or division. - @param target element - the target input field or division or span */ - _refreshDatepicker: function(target) { - var inst = this._getInst(target); - if (inst) { - this._updateDatepicker(inst); - } - }, - - /* Set the dates for a jQuery selection. - @param target element - the target input field or division or span - @param date Date - the new date */ - _setDateDatepicker: function(target, date) { - var inst = this._getInst(target); - if (inst) { - this._setDate(inst, date); - this._updateDatepicker(inst); - this._updateAlternate(inst); - } - }, - - /* Get the date(s) for the first entry in a jQuery selection. - @param target element - the target input field or division or span - @param noDefault boolean - true if no default date is to be used - @return Date - the current date */ - _getDateDatepicker: function(target, noDefault) { - var inst = this._getInst(target); - if (inst && !inst.inline) - this._setDateFromField(inst, noDefault); - return (inst ? this._getDate(inst) : null); - }, - - /* Handle keystrokes. */ - _doKeyDown: function(event) { - var inst = $.datepicker._getInst(event.target); - var handled = true; - var isRTL = inst.dpDiv.is('.ui-datepicker-rtl'); - inst._keyEvent = true; - if ($.datepicker._datepickerShowing) - switch (event.keyCode) { - case 9: $.datepicker._hideDatepicker(); - handled = false; - break; // hide on tab out - 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]); - var onSelect = $.datepicker._get(inst, 'onSelect'); - if (onSelect) { - var dateStr = $.datepicker._formatDate(inst); - - // trigger custom callback - onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); - } - else - $.datepicker._hideDatepicker(); - return false; // don't submit the form - break; // select the value on enter - case 27: $.datepicker._hideDatepicker(); - break; // hide on escape - case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ? - -$.datepicker._get(inst, 'stepBigMonths') : - -$.datepicker._get(inst, 'stepMonths')), 'M'); - break; // previous month/year on page up/+ ctrl - case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ? - +$.datepicker._get(inst, 'stepBigMonths') : - +$.datepicker._get(inst, 'stepMonths')), 'M'); - break; // next month/year on page down/+ ctrl - case 35: if (event.ctrlKey || event.metaKey) $.datepicker._clearDate(event.target); - handled = event.ctrlKey || event.metaKey; - break; // clear on ctrl or command +end - case 36: if (event.ctrlKey || event.metaKey) $.datepicker._gotoToday(event.target); - handled = event.ctrlKey || event.metaKey; - break; // current on ctrl or command +home - case 37: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), 'D'); - handled = event.ctrlKey || event.metaKey; - // -1 day on ctrl or command +left - if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ? - -$.datepicker._get(inst, 'stepBigMonths') : - -$.datepicker._get(inst, 'stepMonths')), 'M'); - // next month/year on alt +left on Mac - break; - case 38: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, -7, 'D'); - handled = event.ctrlKey || event.metaKey; - break; // -1 week on ctrl or command +up - case 39: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), 'D'); - handled = event.ctrlKey || event.metaKey; - // +1 day on ctrl or command +right - if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ? - +$.datepicker._get(inst, 'stepBigMonths') : - +$.datepicker._get(inst, 'stepMonths')), 'M'); - // next month/year on alt +right - break; - case 40: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, +7, 'D'); - handled = event.ctrlKey || event.metaKey; - break; // +1 week on ctrl or command +down - default: handled = false; - } - else if (event.keyCode == 36 && event.ctrlKey) // display the date picker on ctrl+home - $.datepicker._showDatepicker(this); - else { - handled = false; - } - if (handled) { - event.preventDefault(); - event.stopPropagation(); - } - }, - - /* Filter entered characters - based on date format. */ - _doKeyPress: function(event) { - var inst = $.datepicker._getInst(event.target); - 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 || event.metaKey || (chr < ' ' || !chars || chars.indexOf(chr) > -1); - } - }, - - /* Synchronise manual entry and field/alternate field. */ - _doKeyUp: function(event) { - var inst = $.datepicker._getInst(event.target); - if (inst.input.val() != inst.lastVal) { - try { - var date = $.datepicker.parseDate($.datepicker._get(inst, 'dateFormat'), - (inst.input ? inst.input.val() : null), - $.datepicker._getFormatConfig(inst)); - if (date) { // only if valid - $.datepicker._setDateFromField(inst); - $.datepicker._updateAlternate(inst); - $.datepicker._updateDatepicker(inst); - } - } - catch (err) { - $.datepicker.log(err); - } - } - return true; - }, - - /* Pop-up the date picker for a given input field. - If false returned from beforeShow event handler do not show. - @param input element - the input field attached to the date picker or - event - if triggered by focus */ - _showDatepicker: function(input) { - input = input.target || input; - if (input.nodeName.toLowerCase() != 'input') // find from button/image trigger - input = $('input', input.parentNode)[0]; - if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput == input) // already here - return; - var inst = $.datepicker._getInst(input); - if ($.datepicker._curInst && $.datepicker._curInst != inst) { - $.datepicker._curInst.dpDiv.stop(true, true); - if ( inst && $.datepicker._datepickerShowing ) { - $.datepicker._hideDatepicker( $.datepicker._curInst.input[0] ); - } - } - var beforeShow = $.datepicker._get(inst, 'beforeShow'); - var beforeShowSettings = beforeShow ? beforeShow.apply(input, [input, inst]) : {}; - if(beforeShowSettings === false){ - //false - return; - } - extendRemove(inst.settings, beforeShowSettings); - inst.lastVal = null; - $.datepicker._lastInput = input; - $.datepicker._setDateFromField(inst); - if ($.datepicker._inDialog) // hide cursor - input.value = ''; - if (!$.datepicker._pos) { // position below input - $.datepicker._pos = $.datepicker._findPos(input); - $.datepicker._pos[1] += input.offsetHeight; // add the height - } - var isFixed = false; - $(input).parents().each(function() { - isFixed |= $(this).css('position') == 'fixed'; - return !isFixed; - }); - if (isFixed && $.browser.opera) { // correction for Opera when fixed and scrolled - $.datepicker._pos[0] -= document.documentElement.scrollLeft; - $.datepicker._pos[1] -= document.documentElement.scrollTop; - } - 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); - // fix width for dynamic number of date pickers - // and adjust position before showing - offset = $.datepicker._checkOffset(inst, offset, isFixed); - inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ? - 'static' : (isFixed ? 'fixed' : 'absolute')), display: 'none', - left: offset.left + 'px', top: offset.top + 'px'}); - if (!inst.inline) { - var showAnim = $.datepicker._get(inst, 'showAnim'); - var duration = $.datepicker._get(inst, 'duration'); - var postProcess = function() { - 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); - $.datepicker._datepickerShowing = true; - if ($.effects && $.effects[showAnim]) - inst.dpDiv.show(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess); - else - inst.dpDiv[showAnim || 'show']((showAnim ? duration : null), postProcess); - if (!showAnim || !duration) - postProcess(); - if (inst.input.is(':visible') && !inst.input.is(':disabled')) - inst.input.focus(); - $.datepicker._curInst = inst; - } - }, - - /* Generate the date picker content. */ - _updateDatepicker: function(inst) { - var self = this; - self.maxRows = 4; //Reset the max number of rows being displayed (see #7043) - var borders = $.datepicker._getBorders(inst.dpDiv); - instActive = inst; // for delegate hover events - inst.dpDiv.empty().append(this._generateHTML(inst)); - this._attachHandlers(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('.' + this._dayOverClass + ' a').mouseover(); - var numMonths = this._getNumberOfMonths(inst); - var cols = numMonths[1]; - var width = 17; - inst.dpDiv.removeClass('ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4').width(''); - if (cols > 1) - inst.dpDiv.addClass('ui-datepicker-multi-' + cols).css('width', (width * cols) + 'em'); - inst.dpDiv[(numMonths[0] != 1 || numMonths[1] != 1 ? 'add' : 'remove') + - 'Class']('ui-datepicker-multi'); - inst.dpDiv[(this._get(inst, 'isRTL') ? 'add' : 'remove') + - 'Class']('ui-datepicker-rtl'); - if (inst == $.datepicker._curInst && $.datepicker._datepickerShowing && inst.input && - // #6694 - don't focus the input if it's already focused - // this breaks the change event in IE - inst.input.is(':visible') && !inst.input.is(':disabled') && inst.input[0] != document.activeElement) - 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.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. - @param elem (jQuery object) the element of interest - @return (number[2]) the left and top borders */ - _getBorders: function(elem) { - var convert = function(value) { - return {thin: 1, medium: 2, thick: 3}[value] || value; - }; - return [parseFloat(convert(elem.css('border-left-width'))), - parseFloat(convert(elem.css('border-top-width')))]; - }, - - /* Check positioning to remain on screen. */ - _checkOffset: function(inst, offset, isFixed) { - var dpWidth = inst.dpDiv.outerWidth(); - var dpHeight = inst.dpDiv.outerHeight(); - var inputWidth = inst.input ? inst.input.outerWidth() : 0; - var inputHeight = inst.input ? inst.input.outerHeight() : 0; - var viewWidth = document.documentElement.clientWidth + (isFixed ? 0 : $(document).scrollLeft()); - var viewHeight = document.documentElement.clientHeight + (isFixed ? 0 : $(document).scrollTop()); - - offset.left -= (this._get(inst, 'isRTL') ? (dpWidth - inputWidth) : 0); - offset.left -= (isFixed && offset.left == inst.input.offset().left) ? $(document).scrollLeft() : 0; - offset.top -= (isFixed && offset.top == (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0; - - // now check if datepicker is showing outside window viewport - move to a better place if so. - offset.left -= Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ? - Math.abs(offset.left + dpWidth - viewWidth) : 0); - offset.top -= Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ? - Math.abs(dpHeight + inputHeight) : 0); - - return offset; - }, - - /* Find an object's position on the screen. */ - _findPos: function(obj) { - var inst = this._getInst(obj); - var isRTL = this._get(inst, 'isRTL'); - while (obj && (obj.type == 'hidden' || obj.nodeType != 1 || $.expr.filters.hidden(obj))) { - obj = obj[isRTL ? 'previousSibling' : 'nextSibling']; - } - var position = $(obj).offset(); - return [position.left, position.top]; - }, - - /* Hide the date picker from view. - @param input element - the input field attached to the date picker */ - _hideDatepicker: function(input) { - var inst = this._curInst; - if (!inst || (input && inst != $.data(input, PROP_NAME))) - return; - if (this._datepickerShowing) { - var showAnim = this._get(inst, 'showAnim'); - var duration = this._get(inst, 'duration'); - var postProcess = function() { - $.datepicker._tidyDialog(inst); - }; - if ($.effects && $.effects[showAnim]) - inst.dpDiv.hide(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess); - else - inst.dpDiv[(showAnim == 'slideDown' ? 'slideUp' : - (showAnim == 'fadeIn' ? 'fadeOut' : 'hide'))]((showAnim ? duration : null), postProcess); - if (!showAnim) - postProcess(); - this._datepickerShowing = false; - var onClose = this._get(inst, 'onClose'); - if (onClose) - onClose.apply((inst.input ? inst.input[0] : null), - [(inst.input ? inst.input.val() : ''), inst]); - this._lastInput = null; - if (this._inDialog) { - this._dialogInput.css({ position: 'absolute', left: '0', top: '-100px' }); - if ($.blockUI) { - $.unblockUI(); - $('body').append(this.dpDiv); - } - } - this._inDialog = false; - } - }, - - /* Tidy up after a dialog display. */ - _tidyDialog: function(inst) { - inst.dpDiv.removeClass(this._dialogClass).unbind('.ui-datepicker-calendar'); - }, - - /* Close date picker if clicked elsewhere. */ - _checkExternalClick: function(event) { - if (!$.datepicker._curInst) - return; - - var $target = $(event.target), - inst = $.datepicker._getInst($target[0]); - - if ( ( ( $target[0].id != $.datepicker._mainDivId && - $target.parents('#' + $.datepicker._mainDivId).length == 0 && - !$target.hasClass($.datepicker.markerClassName) && - !$target.closest("." + $.datepicker._triggerClass).length && - $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) || - ( $target.hasClass($.datepicker.markerClassName) && $.datepicker._curInst != inst ) ) - $.datepicker._hideDatepicker(); - }, - - /* Adjust one of the date sub-fields. */ - _adjustDate: function(id, offset, period) { - var target = $(id); - var inst = this._getInst(target[0]); - if (this._isDisabledDatepicker(target[0])) { - return; - } - this._adjustInstDate(inst, offset + - (period == 'M' ? this._get(inst, 'showCurrentAtPos') : 0), // undo positioning - period); - this._updateDatepicker(inst); - }, - - /* Action for current link. */ - _gotoToday: function(id) { - var target = $(id); - var inst = this._getInst(target[0]); - if (this._get(inst, 'gotoCurrent') && inst.currentDay) { - inst.selectedDay = inst.currentDay; - inst.drawMonth = inst.selectedMonth = inst.currentMonth; - inst.drawYear = inst.selectedYear = inst.currentYear; - } - else { - var date = new Date(); - inst.selectedDay = date.getDate(); - inst.drawMonth = inst.selectedMonth = date.getMonth(); - inst.drawYear = inst.selectedYear = date.getFullYear(); - } - this._notifyChange(inst); - this._adjustDate(target); - }, - - /* Action for selecting a new month/year. */ - _selectMonthYear: function(id, select, period) { - var target = $(id); - var inst = this._getInst(target[0]); - inst['selected' + (period == 'M' ? 'Month' : 'Year')] = - inst['draw' + (period == 'M' ? 'Month' : 'Year')] = - parseInt(select.options[select.selectedIndex].value,10); - this._notifyChange(inst); - this._adjustDate(target); - }, - - /* Action for selecting a day. */ - _selectDay: function(id, month, year, td) { - var target = $(id); - if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) { - return; - } - var inst = this._getInst(target[0]); - inst.selectedDay = inst.currentDay = $('a', td).html(); - inst.selectedMonth = inst.currentMonth = month; - inst.selectedYear = inst.currentYear = year; - this._selectDate(id, this._formatDate(inst, - inst.currentDay, inst.currentMonth, inst.currentYear)); - }, - - /* Erase the input field and hide the date picker. */ - _clearDate: function(id) { - var target = $(id); - var inst = this._getInst(target[0]); - this._selectDate(target, ''); - }, - - /* Update the input field with the selected date. */ - _selectDate: function(id, dateStr) { - var target = $(id); - var inst = this._getInst(target[0]); - dateStr = (dateStr != null ? dateStr : this._formatDate(inst)); - if (inst.input) - inst.input.val(dateStr); - this._updateAlternate(inst); - var onSelect = this._get(inst, 'onSelect'); - if (onSelect) - onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); // trigger custom callback - else if (inst.input) - inst.input.trigger('change'); // fire the change event - if (inst.inline) - this._updateDatepicker(inst); - else { - this._hideDatepicker(); - this._lastInput = inst.input[0]; - if (typeof(inst.input[0]) != 'object') - inst.input.focus(); // restore focus - this._lastInput = null; - } - }, - - /* Update any alternate field to synchronise with the main field. */ - _updateAlternate: function(inst) { - var altField = this._get(inst, 'altField'); - if (altField) { // update alternate field too - var altFormat = this._get(inst, 'altFormat') || this._get(inst, 'dateFormat'); - var date = this._getDate(inst); - var dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst)); - $(altField).each(function() { $(this).val(dateStr); }); - } - }, - - /* Set as beforeShowDay function to prevent selection of weekends. - @param date Date - the date to customise - @return [boolean, string] - is this date selectable?, what is its CSS class? */ - noWeekends: function(date) { - var day = date.getDay(); - return [(day > 0 && day < 6), '']; - }, - - /* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition. - @param date Date - the date to get the week for - @return number - the number of the week within the year that contains this date */ - iso8601Week: function(date) { - var checkDate = new Date(date.getTime()); - // Find Thursday of this week starting on Monday - checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7)); - var time = checkDate.getTime(); - checkDate.setMonth(0); // Compare with Jan 1 - checkDate.setDate(1); - return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1; - }, - - /* Parse a string value into a date object. - See formatDate below for the possible formats. - - @param format string - the expected format of the date - @param value string - the date in the above format - @param settings Object - attributes include: - shortYearCutoff number - the cutoff year for determining the century (optional) - dayNamesShort string[7] - abbreviated names of the days from Sunday (optional) - dayNames string[7] - names of the days from Sunday (optional) - monthNamesShort string[12] - abbreviated names of the months (optional) - monthNames string[12] - names of the months (optional) - @return Date - the extracted date value or null if value is blank */ - parseDate: function (format, value, settings) { - if (format == null || value == null) - throw 'Invalid arguments'; - value = (typeof value == 'object' ? value.toString() : value + ''); - if (value == '') - return null; - var shortYearCutoff = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff; - shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff : - new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10)); - var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort; - var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames; - var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort; - var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames; - var year = -1; - var month = -1; - var day = -1; - var doy = -1; - var literal = false; - // Check whether a format character is doubled - var lookAhead = function(match) { - var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match); - if (matches) - iFormat++; - return matches; - }; - // Extract a number from the string value - var getNumber = function(match) { - var isDoubled = lookAhead(match); - var size = (match == '@' ? 14 : (match == '!' ? 20 : - (match == 'y' && isDoubled ? 4 : (match == 'o' ? 3 : 2)))); - var digits = new RegExp('^\\d{1,' + size + '}'); - var num = value.substring(iValue).match(digits); - if (!num) - throw 'Missing number at position ' + iValue; - iValue += num[0].length; - return parseInt(num[0], 10); - }; - // Extract a name from the string value and convert to an index - var getName = function(match, shortNames, longNames) { - var names = $.map(lookAhead(match) ? longNames : shortNames, function (v, k) { - return [ [k, v] ]; - }).sort(function (a, b) { - return -(a[1].length - b[1].length); - }); - var index = -1; - $.each(names, function (i, pair) { - var name = pair[1]; - if (value.substr(iValue, name.length).toLowerCase() == name.toLowerCase()) { - index = pair[0]; - iValue += name.length; - return false; - } - }); - if (index != -1) - return index + 1; - else - throw 'Unknown name at position ' + iValue; - }; - // Confirm that a literal character matches the string value - var checkLiteral = function() { - if (value.charAt(iValue) != format.charAt(iFormat)) - throw 'Unexpected literal at position ' + iValue; - iValue++; - }; - var iValue = 0; - for (var iFormat = 0; iFormat < format.length; iFormat++) { - if (literal) - if (format.charAt(iFormat) == "'" && !lookAhead("'")) - literal = false; - else - checkLiteral(); - else - switch (format.charAt(iFormat)) { - case 'd': - day = getNumber('d'); - break; - case 'D': - getName('D', dayNamesShort, dayNames); - break; - case 'o': - doy = getNumber('o'); - break; - case 'm': - month = getNumber('m'); - break; - case 'M': - month = getName('M', monthNamesShort, monthNames); - break; - case 'y': - year = getNumber('y'); - break; - case '@': - var date = new Date(getNumber('@')); - year = date.getFullYear(); - month = date.getMonth() + 1; - day = date.getDate(); - break; - case '!': - var date = new Date((getNumber('!') - this._ticksTo1970) / 10000); - year = date.getFullYear(); - month = date.getMonth() + 1; - day = date.getDate(); - break; - case "'": - if (lookAhead("'")) - checkLiteral(); - else - literal = true; - break; - default: - checkLiteral(); - } - } - if (iValue < value.length){ - throw "Extra/unparsed characters found in date: " + value.substring(iValue); - } - if (year == -1) - year = new Date().getFullYear(); - else if (year < 100) - year += new Date().getFullYear() - new Date().getFullYear() % 100 + - (year <= shortYearCutoff ? 0 : -100); - if (doy > -1) { - month = 1; - day = doy; - do { - var dim = this._getDaysInMonth(year, month - 1); - if (day <= dim) - break; - month++; - day -= dim; - } while (true); - } - var date = this._daylightSavingAdjust(new Date(year, month - 1, day)); - if (date.getFullYear() != year || date.getMonth() + 1 != month || date.getDate() != day) - throw 'Invalid date'; // E.g. 31/02/00 - return date; - }, - - /* Standard date formats. */ - ATOM: 'yy-mm-dd', // RFC 3339 (ISO 8601) - COOKIE: 'D, dd M yy', - ISO_8601: 'yy-mm-dd', - RFC_822: 'D, d M y', - RFC_850: 'DD, dd-M-y', - RFC_1036: 'D, d M y', - RFC_1123: 'D, d M yy', - RFC_2822: 'D, d M yy', - RSS: 'D, d M y', // RFC 822 - TICKS: '!', - TIMESTAMP: '@', - W3C: 'yy-mm-dd', // ISO 8601 - - _ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) + - Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000), - - /* Format a date object into a string value. - The format can be combinations of the following: - d - day of month (no leading zero) - dd - day of month (two digit) - o - day of year (no leading zeros) - oo - day of year (three digit) - D - day name short - DD - day name long - m - month of year (no leading zero) - mm - month of year (two digit) - M - month name short - MM - month name long - y - year (two digit) - yy - year (four digit) - @ - Unix timestamp (ms since 01/01/1970) - ! - Windows ticks (100ns since 01/01/0001) - '...' - literal text - '' - single quote - - @param format string - the desired format of the date - @param date Date - the date value to format - @param settings Object - attributes include: - dayNamesShort string[7] - abbreviated names of the days from Sunday (optional) - dayNames string[7] - names of the days from Sunday (optional) - monthNamesShort string[12] - abbreviated names of the months (optional) - monthNames string[12] - names of the months (optional) - @return string - the date in the above format */ - formatDate: function (format, date, settings) { - if (!date) - return ''; - var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort; - var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames; - var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort; - var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames; - // Check whether a format character is doubled - var lookAhead = function(match) { - var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match); - if (matches) - iFormat++; - return matches; - }; - // Format a number, with leading zero if necessary - var formatNumber = function(match, value, len) { - var num = '' + value; - if (lookAhead(match)) - while (num.length < len) - num = '0' + num; - return num; - }; - // Format a name, short or long as requested - var formatName = function(match, value, shortNames, longNames) { - return (lookAhead(match) ? longNames[value] : shortNames[value]); - }; - var output = ''; - var literal = false; - if (date) - for (var iFormat = 0; iFormat < format.length; iFormat++) { - if (literal) - if (format.charAt(iFormat) == "'" && !lookAhead("'")) - literal = false; - else - output += format.charAt(iFormat); - else - switch (format.charAt(iFormat)) { - case 'd': - output += formatNumber('d', date.getDate(), 2); - break; - case 'D': - output += formatName('D', date.getDay(), dayNamesShort, dayNames); - break; - case 'o': - output += formatNumber('o', - Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3); - break; - case 'm': - output += formatNumber('m', date.getMonth() + 1, 2); - break; - case 'M': - output += formatName('M', date.getMonth(), monthNamesShort, monthNames); - break; - case 'y': - output += (lookAhead('y') ? date.getFullYear() : - (date.getYear() % 100 < 10 ? '0' : '') + date.getYear() % 100); - break; - case '@': - output += date.getTime(); - break; - case '!': - output += date.getTime() * 10000 + this._ticksTo1970; - break; - case "'": - if (lookAhead("'")) - output += "'"; - else - literal = true; - break; - default: - output += format.charAt(iFormat); - } - } - return output; - }, - - /* Extract all possible characters from the date format. */ - _possibleChars: function (format) { - var chars = ''; - var literal = false; - // Check whether a format character is doubled - var lookAhead = function(match) { - var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match); - if (matches) - iFormat++; - return matches; - }; - for (var iFormat = 0; iFormat < format.length; iFormat++) - if (literal) - if (format.charAt(iFormat) == "'" && !lookAhead("'")) - literal = false; - else - chars += format.charAt(iFormat); - else - switch (format.charAt(iFormat)) { - case 'd': case 'm': case 'y': case '@': - chars += '0123456789'; - break; - case 'D': case 'M': - return null; // Accept anything - case "'": - if (lookAhead("'")) - chars += "'"; - else - literal = true; - break; - default: - chars += format.charAt(iFormat); - } - return chars; - }, - - /* Get a setting value, defaulting if necessary. */ - _get: function(inst, name) { - return inst.settings[name] !== undefined ? - inst.settings[name] : this._defaults[name]; - }, - - /* Parse existing date and initialise date picker. */ - _setDateFromField: function(inst, noDefault) { - if (inst.input.val() == inst.lastVal) { - return; - } - var dateFormat = this._get(inst, 'dateFormat'); - var dates = inst.lastVal = inst.input ? inst.input.val() : null; - var date, defaultDate; - date = defaultDate = this._getDefaultDate(inst); - var settings = this._getFormatConfig(inst); - try { - date = this.parseDate(dateFormat, dates, settings) || defaultDate; - } catch (event) { - this.log(event); - dates = (noDefault ? '' : dates); - } - inst.selectedDay = date.getDate(); - inst.drawMonth = inst.selectedMonth = date.getMonth(); - inst.drawYear = inst.selectedYear = date.getFullYear(); - inst.currentDay = (dates ? date.getDate() : 0); - inst.currentMonth = (dates ? date.getMonth() : 0); - inst.currentYear = (dates ? date.getFullYear() : 0); - this._adjustInstDate(inst); - }, - - /* Retrieve the default date shown on opening. */ - _getDefaultDate: function(inst) { - return this._restrictMinMax(inst, - this._determineDate(inst, this._get(inst, 'defaultDate'), new Date())); - }, - - /* A date may be specified as an exact value or a relative one. */ - _determineDate: function(inst, date, defaultDate) { - var offsetNumeric = function(offset) { - var date = new Date(); - date.setDate(date.getDate() + offset); - return date; - }; - var offsetString = function(offset) { - try { - return $.datepicker.parseDate($.datepicker._get(inst, 'dateFormat'), - offset, $.datepicker._getFormatConfig(inst)); - } - catch (e) { - // Ignore - } - var date = (offset.toLowerCase().match(/^c/) ? - $.datepicker._getDate(inst) : null) || new Date(); - var year = date.getFullYear(); - var month = date.getMonth(); - var day = date.getDate(); - var pattern = /([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g; - var matches = pattern.exec(offset); - while (matches) { - switch (matches[2] || 'd') { - case 'd' : case 'D' : - day += parseInt(matches[1],10); break; - case 'w' : case 'W' : - day += parseInt(matches[1],10) * 7; break; - case 'm' : case 'M' : - month += parseInt(matches[1],10); - day = Math.min(day, $.datepicker._getDaysInMonth(year, month)); - break; - case 'y': case 'Y' : - year += parseInt(matches[1],10); - day = Math.min(day, $.datepicker._getDaysInMonth(year, month)); - break; - } - matches = pattern.exec(offset); - } - return new Date(year, month, day); - }; - 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(newDate); - }, - - /* Handle switch to/from daylight saving. - Hours may be non-zero on daylight saving cut-over: - > 12 when midnight changeover, but then cannot generate - midnight datetime, so jump to 1AM, otherwise reset. - @param date (Date) the date to check - @return (Date) the corrected date */ - _daylightSavingAdjust: function(date) { - if (!date) return null; - date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0); - return date; - }, - - /* Set the date(s) directly. */ - _setDate: function(inst, date, noChange) { - var clear = !date; - var origMonth = inst.selectedMonth; - var origYear = inst.selectedYear; - 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); - if (inst.input) { - inst.input.val(clear ? '' : this._formatDate(inst)); - } - }, - - /* Retrieve the date(s) directly. */ - _getDate: function(inst) { - var startDate = (!inst.currentYear || (inst.input && inst.input.val() == '') ? null : - this._daylightSavingAdjust(new Date( - inst.currentYear, inst.currentMonth, inst.currentDay))); - return startDate; - }, - - /* Attach the onxxx handlers. These are declared statically so - * they work with static code transformers like Caja. - */ - _attachHandlers: function(inst) { - var stepMonths = this._get(inst, 'stepMonths'); - var id = '#' + inst.id.replace( /\\\\/g, "\\" ); - inst.dpDiv.find('[data-handler]').map(function () { - var handler = { - prev: function () { - window['DP_jQuery_' + dpuuid].datepicker._adjustDate(id, -stepMonths, 'M'); - }, - next: function () { - window['DP_jQuery_' + dpuuid].datepicker._adjustDate(id, +stepMonths, 'M'); - }, - hide: function () { - window['DP_jQuery_' + dpuuid].datepicker._hideDatepicker(); - }, - today: function () { - window['DP_jQuery_' + dpuuid].datepicker._gotoToday(id); - }, - selectDay: function () { - window['DP_jQuery_' + dpuuid].datepicker._selectDay(id, +this.getAttribute('data-month'), +this.getAttribute('data-year'), this); - return false; - }, - selectMonth: function () { - window['DP_jQuery_' + dpuuid].datepicker._selectMonthYear(id, this, 'M'); - return false; - }, - selectYear: function () { - window['DP_jQuery_' + dpuuid].datepicker._selectMonthYear(id, this, 'Y'); - return false; - } - }; - $(this).bind(this.getAttribute('data-event'), handler[this.getAttribute('data-handler')]); - }); - }, - - /* Generate the HTML for the current state of the date picker. */ - _generateHTML: function(inst) { - var today = new Date(); - today = this._daylightSavingAdjust( - new Date(today.getFullYear(), today.getMonth(), today.getDate())); // clear time - var isRTL = this._get(inst, 'isRTL'); - var showButtonPanel = this._get(inst, 'showButtonPanel'); - var hideIfNoPrevNext = this._get(inst, 'hideIfNoPrevNext'); - var navigationAsDateFormat = this._get(inst, 'navigationAsDateFormat'); - var numMonths = this._getNumberOfMonths(inst); - var showCurrentAtPos = this._get(inst, 'showCurrentAtPos'); - var stepMonths = this._get(inst, 'stepMonths'); - var isMultiMonth = (numMonths[0] != 1 || numMonths[1] != 1); - var currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) : - new Date(inst.currentYear, inst.currentMonth, inst.currentDay))); - var minDate = this._getMinMaxDate(inst, 'min'); - var maxDate = this._getMinMaxDate(inst, 'max'); - var drawMonth = inst.drawMonth - showCurrentAtPos; - var drawYear = inst.drawYear; - if (drawMonth < 0) { - drawMonth += 12; - drawYear--; - } - if (maxDate) { - var maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(), - maxDate.getMonth() - (numMonths[0] * numMonths[1]) + 1, maxDate.getDate())); - maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw); - while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) { - drawMonth--; - if (drawMonth < 0) { - drawMonth = 11; - drawYear--; - } - } - } - inst.drawMonth = drawMonth; - inst.drawYear = drawYear; - var prevText = this._get(inst, 'prevText'); - prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText, - this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)), - this._getFormatConfig(inst))); - var prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ? - '
          ' + prevText + '' : - (hideIfNoPrevNext ? '' : '' + prevText + '')); - var nextText = this._get(inst, 'nextText'); - nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText, - this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)), - this._getFormatConfig(inst))); - var next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ? - '' + nextText + '' : - (hideIfNoPrevNext ? '' : '' + nextText + '')); - var currentText = this._get(inst, 'currentText'); - var gotoDate = (this._get(inst, 'gotoCurrent') && inst.currentDay ? currentDate : today); - currentText = (!navigationAsDateFormat ? currentText : - this.formatDate(currentText, gotoDate, this._getFormatConfig(inst))); - var controls = (!inst.inline ? '' : ''); - var buttonPanel = (showButtonPanel) ? '
          ' + (isRTL ? controls : '') + - (this._isInRange(inst, gotoDate) ? '' : '') + (isRTL ? '' : controls) + '
          ' : ''; - var firstDay = parseInt(this._get(inst, 'firstDay'),10); - firstDay = (isNaN(firstDay) ? 0 : firstDay); - var showWeek = this._get(inst, 'showWeek'); - var dayNames = this._get(inst, 'dayNames'); - var dayNamesShort = this._get(inst, 'dayNamesShort'); - var dayNamesMin = this._get(inst, 'dayNamesMin'); - var monthNames = this._get(inst, 'monthNames'); - var monthNamesShort = this._get(inst, 'monthNamesShort'); - var beforeShowDay = this._get(inst, 'beforeShowDay'); - var showOtherMonths = this._get(inst, 'showOtherMonths'); - var selectOtherMonths = this._get(inst, 'selectOtherMonths'); - var calculateWeek = this._get(inst, 'calculateWeek') || this.iso8601Week; - var defaultDate = this._getDefaultDate(inst); - var html = ''; - for (var row = 0; row < numMonths[0]; row++) { - var group = ''; - this.maxRows = 4; - for (var col = 0; col < numMonths[1]; col++) { - var selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay)); - var cornerClass = ' ui-corner-all'; - var calender = ''; - if (isMultiMonth) { - calender += '
          '; - } - calender += '
          ' + - (/all|left/.test(cornerClass) && row == 0 ? (isRTL ? next : prev) : '') + - (/all|right/.test(cornerClass) && row == 0 ? (isRTL ? prev : next) : '') + - this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate, - row > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers - '
          ' + - ''; - var thead = (showWeek ? '' : ''); - for (var dow = 0; dow < 7; dow++) { // days of the week - var day = (dow + firstDay) % 7; - thead += '= 5 ? ' class="ui-datepicker-week-end"' : '') + '>' + - '' + dayNamesMin[day] + ''; - } - calender += thead + ''; - var daysInMonth = this._getDaysInMonth(drawYear, drawMonth); - if (drawYear == inst.selectedYear && drawMonth == inst.selectedMonth) - inst.selectedDay = Math.min(inst.selectedDay, daysInMonth); - var leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7; - var curRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate - var numRows = (isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows); //If multiple months, use the higher number of rows (see #7043) - this.maxRows = numRows; - var printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays)); - for (var dRow = 0; dRow < numRows; dRow++) { // create date picker rows - calender += ''; - var tbody = (!showWeek ? '' : ''); - for (var dow = 0; dow < 7; dow++) { // create date picker days - var daySettings = (beforeShowDay ? - beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, '']); - var otherMonth = (printDate.getMonth() != drawMonth); - var unselectable = (otherMonth && !selectOtherMonths) || !daySettings[0] || - (minDate && printDate < minDate) || (maxDate && printDate > maxDate); - tbody += ''; // display selectable date - printDate.setDate(printDate.getDate() + 1); - printDate = this._daylightSavingAdjust(printDate); - } - calender += tbody + ''; - } - drawMonth++; - if (drawMonth > 11) { - drawMonth = 0; - drawYear++; - } - calender += '
          ' + this._get(inst, 'weekHeader') + '
          ' + - this._get(inst, 'calculateWeek')(printDate) + '' + // actions - (otherMonth && !showOtherMonths ? ' ' : // display for other months - (unselectable ? '' + printDate.getDate() + '' : '' + printDate.getDate() + '')) + '
          ' + (isMultiMonth ? '
          ' + - ((numMonths[0] > 0 && col == numMonths[1]-1) ? '
          ' : '') : ''); - group += calender; - } - html += group; - } - html += buttonPanel + ($.browser.msie && parseInt($.browser.version,10) < 7 && !inst.inline ? - '' : ''); - inst._keyEvent = false; - return html; - }, - - /* Generate the month and year header. */ - _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate, - secondary, monthNames, monthNamesShort) { - var changeMonth = this._get(inst, 'changeMonth'); - var changeYear = this._get(inst, 'changeYear'); - var showMonthAfterYear = this._get(inst, 'showMonthAfterYear'); - var html = '
          '; - var monthHtml = ''; - // month selection - if (secondary || !changeMonth) - monthHtml += '' + monthNames[drawMonth] + ''; - else { - var inMinYear = (minDate && minDate.getFullYear() == drawYear); - var inMaxYear = (maxDate && maxDate.getFullYear() == drawYear); - monthHtml += ''; - } - if (!showMonthAfterYear) - html += monthHtml + (secondary || !(changeMonth && changeYear) ? ' ' : ''); - // year selection - if ( !inst.yearshtml ) { - inst.yearshtml = ''; - if (secondary || !changeYear) - html += '' + drawYear + ''; - else { - // determine range of years to display - var years = this._get(inst, 'yearRange').split(':'); - var thisYear = new Date().getFullYear(); - var determineYear = function(value) { - var year = (value.match(/c[+-].*/) ? drawYear + parseInt(value.substring(1), 10) : - (value.match(/[+-].*/) ? thisYear + parseInt(value, 10) : - parseInt(value, 10))); - return (isNaN(year) ? thisYear : year); - }; - var year = determineYear(years[0]); - var endYear = Math.max(year, determineYear(years[1] || '')); - year = (minDate ? Math.max(year, minDate.getFullYear()) : year); - endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear); - inst.yearshtml += ''; - - html += inst.yearshtml; - inst.yearshtml = null; - } - } - html += this._get(inst, 'yearSuffix'); - if (showMonthAfterYear) - html += (secondary || !(changeMonth && changeYear) ? ' ' : '') + monthHtml; - html += '
          '; // Close datepicker_header - return html; - }, - - /* Adjust one of the date sub-fields. */ - _adjustInstDate: function(inst, offset, period) { - var year = inst.drawYear + (period == 'Y' ? offset : 0); - var month = inst.drawMonth + (period == 'M' ? offset : 0); - var day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) + - (period == 'D' ? offset : 0); - var date = this._restrictMinMax(inst, - this._daylightSavingAdjust(new Date(year, month, day))); - inst.selectedDay = date.getDate(); - inst.drawMonth = inst.selectedMonth = date.getMonth(); - inst.drawYear = inst.selectedYear = date.getFullYear(); - if (period == 'M' || period == 'Y') - this._notifyChange(inst); - }, - - /* Ensure a date is within any min/max bounds. */ - _restrictMinMax: function(inst, date) { - var minDate = this._getMinMaxDate(inst, 'min'); - var maxDate = this._getMinMaxDate(inst, 'max'); - var newDate = (minDate && date < minDate ? minDate : date); - newDate = (maxDate && newDate > maxDate ? maxDate : newDate); - return newDate; - }, - - /* Notify change of month/year. */ - _notifyChange: function(inst) { - var onChange = this._get(inst, 'onChangeMonthYear'); - if (onChange) - onChange.apply((inst.input ? inst.input[0] : null), - [inst.selectedYear, inst.selectedMonth + 1, inst]); - }, - - /* Determine the number of months to show. */ - _getNumberOfMonths: function(inst) { - var numMonths = this._get(inst, 'numberOfMonths'); - return (numMonths == null ? [1, 1] : (typeof numMonths == 'number' ? [1, numMonths] : numMonths)); - }, - - /* Determine the current maximum date - ensure no time components are set. */ - _getMinMaxDate: function(inst, minMax) { - return this._determineDate(inst, this._get(inst, minMax + 'Date'), null); - }, - - /* Find the number of days in a given month. */ - _getDaysInMonth: function(year, month) { - return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate(); - }, - - /* Find the day of the week of the first of a month. */ - _getFirstDayOfMonth: function(year, month) { - return new Date(year, month, 1).getDay(); - }, - - /* Determines if we should allow a "next/prev" month display change. */ - _canAdjustMonth: function(inst, offset, curYear, curMonth) { - var numMonths = this._getNumberOfMonths(inst); - var date = this._daylightSavingAdjust(new Date(curYear, - curMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1)); - if (offset < 0) - date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth())); - return this._isInRange(inst, date); - }, - - /* Is the given date in the accepted range? */ - _isInRange: function(inst, date) { - var minDate = this._getMinMaxDate(inst, 'min'); - var maxDate = this._getMinMaxDate(inst, 'max'); - return ((!minDate || date.getTime() >= minDate.getTime()) && - (!maxDate || date.getTime() <= maxDate.getTime())); - }, - - /* Provide the configuration settings for formatting/parsing. */ - _getFormatConfig: function(inst) { - var shortYearCutoff = this._get(inst, 'shortYearCutoff'); - shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff : - new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10)); - return {shortYearCutoff: shortYearCutoff, - dayNamesShort: this._get(inst, 'dayNamesShort'), dayNames: this._get(inst, 'dayNames'), - monthNamesShort: this._get(inst, 'monthNamesShort'), monthNames: this._get(inst, 'monthNames')}; - }, - - /* Format the given date for display. */ - _formatDate: function(inst, day, month, year) { - if (!day) { - inst.currentDay = inst.selectedDay; - inst.currentMonth = inst.selectedMonth; - inst.currentYear = inst.selectedYear; - } - var date = (day ? (typeof day == 'object' ? day : - this._daylightSavingAdjust(new Date(year, month, day))) : - this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay))); - return this.formatDate(this._get(inst, 'dateFormat'), date, this._getFormatConfig(inst)); - } -}); - -/* - * Bind hover events for datepicker elements. - * Done via delegate so the binding only occurs once in the lifetime of the parent div. - * Global instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker. - */ -function bindHover(dpDiv) { - var selector = 'button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a'; - return dpDiv.bind('mouseout', function(event) { - var elem = $( event.target ).closest( selector ); - if ( !elem.length ) { - return; - } - elem.removeClass( "ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover" ); - }) - .bind('mouseover', function(event) { - var elem = $( event.target ).closest( selector ); - if ($.datepicker._isDisabledDatepicker( instActive.inline ? dpDiv.parent()[0] : instActive.input[0]) || - !elem.length ) { - return; - } - elem.parents('.ui-datepicker-calendar').find('a').removeClass('ui-state-hover'); - elem.addClass('ui-state-hover'); - if (elem.hasClass('ui-datepicker-prev')) elem.addClass('ui-datepicker-prev-hover'); - if (elem.hasClass('ui-datepicker-next')) elem.addClass('ui-datepicker-next-hover'); - }); -} - -/* jQuery extend now ignores nulls! */ -function extendRemove(target, props) { - $.extend(target, props); - for (var name in props) - if (props[name] == null || props[name] == undefined) - target[name] = props[name]; - return target; -}; - -/* Determine whether an object is an array. */ -function isArray(a) { - return (a && (($.browser.safari && typeof a == 'object' && a.length) || - (a.constructor && a.constructor.toString().match(/\Array\(\)/)))); -}; - -/* Invoke the datepicker functionality. - @param options string - a command, optionally followed by additional parameters or - Object - settings for attaching new datepicker functionality - @return jQuery object */ -$.fn.datepicker = function(options){ - - /* Verify an empty collection wasn't passed - Fixes #6976 */ - if ( !this.length ) { - return this; - } - - /* Initialise the date picker. */ - if (!$.datepicker.initialized) { - $(document).mousedown($.datepicker._checkExternalClick). - find('body').append($.datepicker.dpDiv); - $.datepicker.initialized = true; - } - - var otherArgs = Array.prototype.slice.call(arguments, 1); - if (typeof options == 'string' && (options == 'isDisabled' || options == 'getDate' || options == 'widget')) - return $.datepicker['_' + options + 'Datepicker']. - apply($.datepicker, [this[0]].concat(otherArgs)); - if (options == 'option' && arguments.length == 2 && typeof arguments[1] == 'string') - return $.datepicker['_' + options + 'Datepicker']. - apply($.datepicker, [this[0]].concat(otherArgs)); - return this.each(function() { - typeof options == 'string' ? - $.datepicker['_' + options + 'Datepicker']. - apply($.datepicker, [this].concat(otherArgs)) : - $.datepicker._attachDatepicker(this, options); - }); -}; - -$.datepicker = new Datepicker(); // singleton instance -$.datepicker.initialized = false; -$.datepicker.uuid = new Date().getTime(); -$.datepicker.version = "1.8.24"; - -// Workaround for #4055 -// Add another global to avoid noConflict issues with inline event handlers -window['DP_jQuery_' + dpuuid] = $; - -})(jQuery); diff --git a/resources/jquery.ui/jquery.ui.dialog.js b/resources/jquery.ui/jquery.ui.dialog.js deleted file mode 100644 index 06b85f23..00000000 --- a/resources/jquery.ui/jquery.ui.dialog.js +++ /dev/null @@ -1,866 +0,0 @@ -/*! - * jQuery UI Dialog 1.8.24 - * - * Copyright 2012, 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 - * - * Depends: - * jquery.ui.core.js - * jquery.ui.widget.js - * jquery.ui.button.js - * jquery.ui.draggable.js - * jquery.ui.mouse.js - * jquery.ui.position.js - * jquery.ui.resizable.js - */ -(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: '', - draggable: true, - hide: null, - height: 'auto', - maxHeight: false, - maxWidth: false, - minHeight: 150, - minWidth: 150, - modal: false, - position: { - my: 'center', - at: 'center', - 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: '', - width: 300, - zIndex: 1000 - }, - - _create: function() { - 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 || ' ', - titleId = $.ui.dialog.getTitleId(self.element), - - uiDialog = (self.uiDialog = $('
          ')) - .appendTo(document.body) - .hide() - .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.isDefaultPrevented() && event.keyCode && - event.keyCode === $.ui.keyCode.ESCAPE) { - - self.close(event); - event.preventDefault(); - } - }) - .attr({ - role: 'dialog', - 'aria-labelledby': titleId - }) - .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 = $('
          ')) - .addClass( - 'ui-dialog-titlebar ' + - 'ui-widget-header ' + - 'ui-corner-all ' + - 'ui-helper-clearfix' - ) - .prependTo(uiDialog), - - uiDialogTitlebarClose = $('') - .addClass( - 'ui-dialog-titlebar-close ' + - 'ui-corner-all' - ) - .attr('role', 'button') - .hover( - function() { - uiDialogTitlebarClose.addClass('ui-state-hover'); - }, - function() { - uiDialogTitlebarClose.removeClass('ui-state-hover'); - } - ) - .focus(function() { - uiDialogTitlebarClose.addClass('ui-state-focus'); - }) - .blur(function() { - uiDialogTitlebarClose.removeClass('ui-state-focus'); - }) - .click(function(event) { - self.close(event); - return false; - }) - .appendTo(uiDialogTitlebar), - - uiDialogTitlebarCloseText = (self.uiDialogTitlebarCloseText = $('')) - .addClass( - 'ui-icon ' + - 'ui-icon-closethick' - ) - .text(options.closeText) - .appendTo(uiDialogTitlebarClose), - - uiDialogTitle = $('') - .addClass('ui-dialog-title') - .attr('id', titleId) - .html(title) - .prependTo(uiDialogTitlebar); - - //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; - } - - uiDialogTitlebar.find("*").add(uiDialogTitlebar).disableSelection(); - - if (options.draggable && $.fn.draggable) { - self._makeDraggable(); - } - if (options.resizable && $.fn.resizable) { - self._makeResizable(); - } - - self._createButtons(options.buttons); - self._isOpen = false; - - if ($.fn.bgiframe) { - uiDialog.bgiframe(); - } - }, - - _init: function() { - if ( this.options.autoOpen ) { - this.open(); - } - }, - - destroy: function() { - var self = this; - - 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'); - self.uiDialog.remove(); - - if (self.originalTitle) { - self.element.attr('title', self.originalTitle); - } - - return self; - }, - - widget: function() { - return this.uiDialog; - }, - - close: function(event) { - var self = this, - maxZ, thisZ; - - if (false === self._trigger('beforeClose', event)) { - return; - } - - if (self.overlay) { - self.overlay.destroy(); - } - self.uiDialog.unbind('keypress.ui-dialog'); - - self._isOpen = false; - - if (self.options.hide) { - self.uiDialog.hide(self.options.hide, function() { - self._trigger('close', event); - }); - } else { - self.uiDialog.hide(); - 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) { - maxZ = 0; - $('.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; - } - - return self; - }, - - isOpen: function() { - return this._isOpen; - }, - - // the force parameter allows us to move modal dialogs to their correct - // position on open - 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.zIndex > $.ui.dialog.maxZ) { - $.ui.dialog.maxZ = options.zIndex; - } - if (self.overlay) { - $.ui.dialog.maxZ += 1; - self.overlay.$el.css('z-index', $.ui.dialog.overlay.maxZ = $.ui.dialog.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.scrollTop(), scrollLeft: self.element.scrollLeft() }; - $.ui.dialog.maxZ += 1; - self.uiDialog.css('z-index', $.ui.dialog.maxZ); - self.element.attr(saveScroll); - self._trigger('focus', event); - - return self; - }, - - open: function() { - if (this._isOpen) { return; } - - var self = this, - options = self.options, - uiDialog = self.uiDialog; - - self.overlay = options.modal ? new $.ui.dialog.overlay(self) : null; - self._size(); - self._position(options.position); - uiDialog.show(options.show); - self.moveToTop(true); - - // prevent tabbing out of modal dialogs - if ( options.modal ) { - uiDialog.bind( "keydown.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); - return false; - } else if (event.target === first[0] && event.shiftKey) { - last.focus(1); - return false; - } - }); - } - - // 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 - $(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) { - var self = this, - hasButtons = false, - uiDialogButtonPane = $('
          ') - .addClass( - 'ui-dialog-buttonpane ' + - 'ui-widget-content ' + - 'ui-helper-clearfix' - ), - uiButtonSet = $( "
          " ) - .addClass( "ui-dialog-buttonset" ) - .appendTo( uiDialogButtonPane ); - - // if we already have a button pane, remove it - self.uiDialog.find('.ui-dialog-buttonpane').remove(); - - if (typeof buttons === 'object' && buttons !== null) { - $.each(buttons, function() { - return !(hasButtons = true); - }); - } - if (hasButtons) { - $.each(buttons, function(name, props) { - props = $.isFunction( props ) ? - { click: props, text: name } : - props; - var button = $('') - .click(function() { - props.click.apply(self.element[0], arguments); - }) - .appendTo(uiButtonSet); - // can't use .attr( props, true ) with jQuery 1.3.2. - $.each( props, function( key, value ) { - if ( key === "click" ) { - return; - } - if ( key in button ) { - button[ key ]( value ); - } else { - button.attr( key, value ); - } - }); - if ($.fn.button) { - button.button(); - } - }); - uiDialogButtonPane.appendTo(self.uiDialog); - } - }, - - _makeDraggable: function() { - var self = this, - options = self.options, - doc = $(document), - heightBeforeDrag; - - function filteredUi(ui) { - return { - position: ui.position, - offset: ui.offset - }; - } - - 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)); - }, - 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)); - $.ui.dialog.overlay.resize(); - } - }); - }, - - _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' ? - handles : - 'n,e,s,w,se,sw,ne,nw' - ); - - function filteredUi(ui) { - return { - originalPosition: ui.originalPosition, - originalSize: ui.originalSize, - position: ui.position, - size: ui.size - }; - } - - self.uiDialog.resizable({ - 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)); - }, - 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)); - $.ui.dialog.overlay.resize(); - } - }) - .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') { - return options.minHeight; - } else { - return Math.min(options.minHeight, options.height); - } - }, - - _position: function(position) { - var myAt = [], - offset = [0, 0], - isVisible; - - 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(' '); - - 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; - } - }); - - position = { - my: myAt.join(" "), - at: myAt.join(" "), - offset: offset.join(" ") - }; - } - - 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) { - this.uiDialog.show(); - } - this.uiDialog - // workaround for jQuery bug #5781 http://dev.jquery.com/ticket/5781 - .css({ top: 0, left: 0 }) - .position($.extend({ of: window }, position)); - if (!isVisible) { - this.uiDialog.hide(); - } - }, - - _setOptions: function( options ) { - var self = this, - resizableOptions = {}, - resize = false; - - $.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) { - //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; - case "buttons": - self._createButtons(value); - break; - case "closeText": - // ensure that we always pass a string - self.uiDialogTitlebarCloseText.text("" + value); - break; - case "dialogClass": - uiDialog - .removeClass(self.options.dialogClass) - .addClass(uiDialogClasses + value); - break; - case "disabled": - if (value) { - uiDialog.addClass('ui-dialog-disabled'); - } else { - uiDialog.removeClass('ui-dialog-disabled'); - } - break; - case "draggable": - var isDraggable = uiDialog.is( ":data(draggable)" ); - if ( isDraggable && !value ) { - uiDialog.draggable( "destroy" ); - } - - if ( !isDraggable && value ) { - self._makeDraggable(); - } - break; - case "position": - self._position(value); - break; - case "resizable": - // currently resizable, becoming non-resizable - 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); - } - - // currently non-resizable, becoming resizable - 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 || ' ')); - break; - } - - $.Widget.prototype._setOption.apply(self, arguments); - }, - - _size: function() { - /* If the user has resized the dialog, the .ui-dialog and .ui-dialog-content - * divs will both have width and height set, so we need to reset them - */ - var options = this.options, - nonContentHeight, - minContentHeight, - isVisible = this.uiDialog.is( ":visible" ); - - // reset content sizing - 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', - 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 ) ); - } - - if (this.uiDialog.is(':data(resizable)')) { - this.uiDialog.resizable('option', 'minHeight', this._minHeight()); - } - } -}); - -$.extend($.ui.dialog, { - version: "1.8.24", - - uuid: 0, - maxZ: 0, - - getTitleId: function($el) { - var id = $el.attr('id'); - if (!id) { - this.uuid += 1; - id = this.uuid; - } - return 'ui-dialog-title-' + id; - }, - - overlay: function(dialog) { - this.$el = $.ui.dialog.overlay.create(dialog); - } -}); - -$.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) { - // 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) { - // stop events if the z-index of the target is < the z-index of the overlay - // 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); - - // allow closing by pressing the escape key - $(document).bind('keydown.dialog-overlay', function(event) { - if (dialog.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode && - event.keyCode === $.ui.keyCode.ESCAPE) { - - dialog.close(event); - event.preventDefault(); - } - }); - - // handle window resize - $(window).bind('resize.dialog-overlay', $.ui.dialog.overlay.resize); - } - - var $el = (this.oldInstances.pop() || $('
          ').addClass('ui-widget-overlay')) - .appendTo(document.body) - .css({ - width: this.width(), - height: this.height() - }); - - if ($.fn.bgiframe) { - $el.bgiframe(); - } - - this.instances.push($el); - return $el; - }, - - 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'); - } - - $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')); - }); - this.maxZ = maxZ; - }, - - height: function() { - var scrollHeight, - offsetHeight; - // handle IE 6 - if ($.browser.msie && $.browser.version < 7) { - scrollHeight = Math.max( - document.documentElement.scrollHeight, - document.body.scrollHeight - ); - offsetHeight = Math.max( - document.documentElement.offsetHeight, - document.body.offsetHeight - ); - - if (scrollHeight < offsetHeight) { - return $(window).height() + 'px'; - } else { - return scrollHeight + 'px'; - } - // handle "good" browsers - } else { - return $(document).height() + 'px'; - } - }, - - width: function() { - var scrollWidth, - offsetWidth; - // handle IE - if ( $.browser.msie ) { - scrollWidth = Math.max( - document.documentElement.scrollWidth, - document.body.scrollWidth - ); - offsetWidth = Math.max( - document.documentElement.offsetWidth, - document.body.offsetWidth - ); - - if (scrollWidth < offsetWidth) { - return $(window).width() + 'px'; - } else { - return scrollWidth + 'px'; - } - // handle "good" browsers - } else { - return $(document).width() + 'px'; - } - }, - - resize: function() { - /* If the dialog is draggable and the user drags it past the - * right edge of the window, the document becomes wider so we - * need to stretch the overlay. If the user then drags the - * dialog back to the left, the document will become narrower, - * so we need to shrink the overlay to the appropriate size. - * 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); - }); - - $overlays.css({ - width: 0, - height: 0 - }).css({ - width: $.ui.dialog.overlay.width(), - height: $.ui.dialog.overlay.height() - }); - } -}); - -$.extend($.ui.dialog.overlay.prototype, { - destroy: function() { - $.ui.dialog.overlay.destroy(this.$el); - } -}); - -}(jQuery)); diff --git a/resources/jquery.ui/jquery.ui.draggable.js b/resources/jquery.ui/jquery.ui.draggable.js deleted file mode 100644 index 149035c2..00000000 --- a/resources/jquery.ui/jquery.ui.draggable.js +++ /dev/null @@ -1,832 +0,0 @@ -/*! - * jQuery UI Draggable 1.8.24 - * - * Copyright 2012, 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 - * - * Depends: - * jquery.ui.core.js - * jquery.ui.mouse.js - * jquery.ui.widget.js - */ -(function( $, undefined ) { - -$.widget("ui.draggable", $.ui.mouse, { - widgetEventPrefix: "drag", - options: { - addClasses: true, - appendTo: "parent", - axis: false, - connectToSortable: false, - containment: false, - cursor: "auto", - cursorAt: false, - grid: false, - handle: false, - helper: "original", - iframeFix: false, - opacity: false, - refreshPositions: false, - revert: false, - revertDuration: 500, - scope: "default", - scroll: true, - scrollSensitivity: 20, - scrollSpeed: 20, - snap: false, - snapMode: "both", - snapTolerance: 20, - stack: false, - zIndex: false - }, - _create: function() { - - if (this.options.helper == 'original' && !(/^(?:r|a|f)/).test(this.element.css("position"))) - this.element[0].style.position = 'relative'; - - (this.options.addClasses && this.element.addClass("ui-draggable")); - (this.options.disabled && this.element.addClass("ui-draggable-disabled")); - - this._mouseInit(); - - }, - - destroy: function() { - if(!this.element.data('draggable')) return; - this.element - .removeData("draggable") - .unbind(".draggable") - .removeClass("ui-draggable" - + " ui-draggable-dragging" - + " ui-draggable-disabled"); - this._mouseDestroy(); - - return this; - }, - - _mouseCapture: function(event) { - - var o = this.options; - - // among others, prevent a drag on a resizable-handle - if (this.helper || o.disabled || $(event.target).is('.ui-resizable-handle')) - return false; - - //Quit if we're not on a valid handle - this.handle = this._getHandle(event); - if (!this.handle) - return false; - - if ( o.iframeFix ) { - $(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() { - $('
          ') - .css({ - width: this.offsetWidth+"px", height: this.offsetHeight+"px", - position: "absolute", opacity: "0.001", zIndex: 1000 - }) - .css($(this).offset()) - .appendTo("body"); - }); - } - - return true; - - }, - - _mouseStart: function(event) { - - var o = this.options; - - //Create and append the visible helper - this.helper = this._createHelper(event); - - this.helper.addClass("ui-draggable-dragging"); - - //Cache the helper size - this._cacheHelperProportions(); - - //If ddmanager is used for droppables, set the global draggable - if($.ui.ddmanager) - $.ui.ddmanager.current = this; - - /* - * - Position generation - - * This block generates everything position related - it's the core of draggables. - */ - - //Cache the margins of the original element - this._cacheMargins(); - - //Store the helper's css position - this.cssPosition = this.helper.css("position"); - this.scrollParent = this.helper.scrollParent(); - - //The element's absolute position on the page minus margins - this.offset = this.positionAbs = this.element.offset(); - this.offset = { - top: this.offset.top - this.margins.top, - left: this.offset.left - this.margins.left - }; - - $.extend(this.offset, { - click: { //Where the click happened, relative to the element - left: event.pageX - this.offset.left, - top: event.pageY - this.offset.top - }, - parent: this._getParentOffset(), - relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper - }); - - //Generate the original position - this.originalPosition = this.position = this._generatePosition(event); - this.originalPageX = event.pageX; - this.originalPageY = event.pageY; - - //Adjust the mouse offset relative to the helper if 'cursorAt' is supplied - (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt)); - - //Set a containment if given in the options - if(o.containment) - this._setContainment(); - - //Trigger event + callbacks - if(this._trigger("start", event) === false) { - this._clear(); - return false; - } - - //Recache the helper size - this._cacheHelperProportions(); - - //Prepare the droppable offsets - if ($.ui.ddmanager && !o.dropBehaviour) - $.ui.ddmanager.prepareOffsets(this, event); - - - this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position - - //If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003) - if ( $.ui.ddmanager ) $.ui.ddmanager.dragStart(this, event); - - return true; - }, - - _mouseDrag: function(event, noPropagation) { - - //Compute the helpers position - this.position = this._generatePosition(event); - this.positionAbs = this._convertPositionTo("absolute"); - - //Call plugins and callbacks and use the resulting position if something is returned - if (!noPropagation) { - var ui = this._uiHash(); - if(this._trigger('drag', event, ui) === false) { - this._mouseUp({}); - return false; - } - this.position = ui.position; - } - - if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px'; - if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px'; - if($.ui.ddmanager) $.ui.ddmanager.drag(this, event); - - return false; - }, - - _mouseStop: function(event) { - - //If we are using droppables, inform the manager about the drop - var dropped = false; - if ($.ui.ddmanager && !this.options.dropBehaviour) - dropped = $.ui.ddmanager.drop(this, event); - - //if a drop comes from outside (a sortable) - if(this.dropped) { - dropped = this.dropped; - this.dropped = false; - } - - //if the original element is no longer in the DOM don't bother to continue (see #8269) - var element = this.element[0], elementInDom = false; - while ( element && (element = element.parentNode) ) { - if (element == document ) { - elementInDom = true; - } - } - if ( !elementInDom && this.options.helper === "original" ) - return false; - - if((this.options.revert == "invalid" && !dropped) || (this.options.revert == "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) { - var self = this; - $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() { - if(self._trigger("stop", event) !== false) { - self._clear(); - } - }); - } else { - if(this._trigger("stop", event) !== false) { - this._clear(); - } - } - - return false; - }, - - _mouseUp: function(event) { - //Remove frame helpers - $("div.ui-draggable-iframeFix").each(function() { - this.parentNode.removeChild(this); - }); - - //If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003) - if( $.ui.ddmanager ) $.ui.ddmanager.dragStop(this, event); - - return $.ui.mouse.prototype._mouseUp.call(this, event); - }, - - cancel: function() { - - if(this.helper.is(".ui-draggable-dragging")) { - this._mouseUp({}); - } else { - this._clear(); - } - - return this; - - }, - - _getHandle: function(event) { - - var handle = !this.options.handle || !$(this.options.handle, this.element).length ? true : false; - $(this.options.handle, this.element) - .find("*") - .andSelf() - .each(function() { - if(this == event.target) handle = true; - }); - - return handle; - - }, - - _createHelper: function(event) { - - var o = this.options; - var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper == 'clone' ? this.element.clone().removeAttr('id') : this.element); - - if(!helper.parents('body').length) - helper.appendTo((o.appendTo == 'parent' ? this.element[0].parentNode : o.appendTo)); - - if(helper[0] != this.element[0] && !(/(fixed|absolute)/).test(helper.css("position"))) - helper.css("position", "absolute"); - - return helper; - - }, - - _adjustOffsetFromHelper: function(obj) { - if (typeof obj == 'string') { - obj = obj.split(' '); - } - if ($.isArray(obj)) { - obj = {left: +obj[0], top: +obj[1] || 0}; - } - if ('left' in obj) { - this.offset.click.left = obj.left + this.margins.left; - } - if ('right' in obj) { - this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; - } - if ('top' in obj) { - this.offset.click.top = obj.top + this.margins.top; - } - if ('bottom' in obj) { - this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; - } - }, - - _getParentOffset: function() { - - //Get the offsetParent and cache its position - this.offsetParent = this.helper.offsetParent(); - var po = this.offsetParent.offset(); - - // This is a special case where we need to modify a offset calculated on start, since the following happened: - // 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])) { - po.left += this.scrollParent.scrollLeft(); - po.top += this.scrollParent.scrollTop(); - } - - if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information - || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.browser.msie)) //Ugly IE fix - po = { top: 0, left: 0 }; - - return { - top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0), - left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0) - }; - - }, - - _getRelativeOffset: function() { - - if(this.cssPosition == "relative") { - var p = this.element.position(); - return { - top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(), - left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft() - }; - } else { - return { top: 0, left: 0 }; - } - - }, - - _cacheMargins: function() { - this.margins = { - left: (parseInt(this.element.css("marginLeft"),10) || 0), - top: (parseInt(this.element.css("marginTop"),10) || 0), - right: (parseInt(this.element.css("marginRight"),10) || 0), - bottom: (parseInt(this.element.css("marginBottom"),10) || 0) - }; - }, - - _cacheHelperProportions: function() { - this.helperProportions = { - width: this.helper.outerWidth(), - height: this.helper.outerHeight() - }; - }, - - _setContainment: function() { - - var o = this.options; - if(o.containment == 'parent') o.containment = this.helper[0].parentNode; - if(o.containment == 'document' || o.containment == 'window') this.containment = [ - 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) { - var c = $(o.containment); - var ce = c[0]; if(!ce) return; - var co = c.offset(); - var over = ($(ce).css("overflow") != 'hidden'); - - this.containment = [ - (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0), - (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0), - (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 - this.margins.right, - (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 - this.margins.bottom - ]; - this.relative_container = c; - - } else if(o.containment.constructor == Array) { - this.containment = o.containment; - } - - }, - - _convertPositionTo: function(d, pos) { - - 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); - - return { - top: ( - pos.top // The absolute mouse position - + this.offset.relative.top * mod // Only for relative positioned nodes: Relative offset from element to offset parent - + this.offset.parent.top * mod // The offsetParent's offset without borders (offset + border) - - ($.browser.safari && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod) - ), - left: ( - pos.left // The absolute mouse position - + this.offset.relative.left * mod // Only for relative positioned nodes: Relative offset from element to offset parent - + this.offset.parent.left * mod // The offsetParent's offset without borders (offset + border) - - ($.browser.safari && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod) - ) - }; - - }, - - _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 pageX = event.pageX; - var pageY = event.pageY; - - /* - * - Position constraining - - * Constrain the position to a mix of grid, containment. - */ - - if(this.originalPosition) { //If we are not dragging yet, we won't check for options - var containment; - if(this.containment) { - if (this.relative_container){ - var co = this.relative_container.offset(); - containment = [ this.containment[0] + co.left, - this.containment[1] + co.top, - this.containment[2] + co.left, - this.containment[3] + co.top ]; - } - else { - containment = this.containment; - } - - if(event.pageX - this.offset.click.left < containment[0]) pageX = containment[0] + this.offset.click.left; - if(event.pageY - this.offset.click.top < containment[1]) pageY = containment[1] + this.offset.click.top; - if(event.pageX - this.offset.click.left > containment[2]) pageX = containment[2] + this.offset.click.left; - if(event.pageY - this.offset.click.top > containment[3]) pageY = containment[3] + this.offset.click.top; - } - - if(o.grid) { - //Check for grid elements set to 0 to prevent divide by 0 error causing invalid argument errors in IE (see ticket #6950) - var top = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY; - pageY = containment ? (!(top - this.offset.click.top < containment[1] || top - this.offset.click.top > containment[3]) ? top : (!(top - this.offset.click.top < containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top; - - var left = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX; - pageX = containment ? (!(left - this.offset.click.left < containment[0] || left - this.offset.click.left > containment[2]) ? left : (!(left - this.offset.click.left < containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left; - } - - } - - return { - top: ( - pageY // The absolute mouse position - - this.offset.click.top // Click offset (relative to the element) - - this.offset.relative.top // Only for relative positioned nodes: Relative offset from element to offset parent - - this.offset.parent.top // The offsetParent's offset without borders (offset + border) - + ($.browser.safari && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) )) - ), - left: ( - pageX // The absolute mouse position - - this.offset.click.left // Click offset (relative to the element) - - this.offset.relative.left // Only for relative positioned nodes: Relative offset from element to offset parent - - this.offset.parent.left // The offsetParent's offset without borders (offset + border) - + ($.browser.safari && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() )) - ) - }; - - }, - - _clear: function() { - this.helper.removeClass("ui-draggable-dragging"); - if(this.helper[0] != this.element[0] && !this.cancelHelperRemoval) this.helper.remove(); - //if($.ui.ddmanager) $.ui.ddmanager.current = null; - this.helper = null; - this.cancelHelperRemoval = false; - }, - - // From now on bulk stuff - mainly helpers - - _trigger: function(type, event, ui) { - ui = ui || this._uiHash(); - $.ui.plugin.call(this, type, [event, ui]); - if(type == "drag") this.positionAbs = this._convertPositionTo("absolute"); //The absolute position has to be recalculated after plugins - return $.Widget.prototype._trigger.call(this, type, event, ui); - }, - - plugins: {}, - - _uiHash: function(event) { - return { - helper: this.helper, - position: this.position, - originalPosition: this.originalPosition, - offset: this.positionAbs - }; - } - -}); - -$.extend($.ui.draggable, { - version: "1.8.24" -}); - -$.ui.plugin.add("draggable", "connectToSortable", { - start: function(event, ui) { - - var inst = $(this).data("draggable"), o = inst.options, - uiSortable = $.extend({}, ui, { item: inst.element }); - inst.sortables = []; - $(o.connectToSortable).each(function() { - var sortable = $.data(this, 'sortable'); - if (sortable && !sortable.options.disabled) { - inst.sortables.push({ - instance: sortable, - shouldRevert: sortable.options.revert - }); - sortable.refreshPositions(); // Call the sortable's refreshPositions at drag start to refresh the containerCache since the sortable container cache is used in drag and needs to be up to date (this will ensure it's initialised as well as being kept in step with any changes that might have happened on the page). - sortable._trigger("activate", event, uiSortable); - } - }); - - }, - stop: function(event, ui) { - - //If we are still over the sortable, we fake the stop event of the sortable, but also remove helper - var inst = $(this).data("draggable"), - uiSortable = $.extend({}, ui, { item: inst.element }); - - $.each(inst.sortables, function() { - if(this.instance.isOver) { - - this.instance.isOver = 0; - - inst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance - this.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work) - - //The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: 'valid/invalid' - if(this.shouldRevert) this.instance.options.revert = true; - - //Trigger the stop of the sortable - this.instance._mouseStop(event); - - this.instance.options.helper = this.instance.options._helper; - - //If the helper has been the original item, restore properties in the sortable - if(inst.options.helper == 'original') - this.instance.currentItem.css({ top: 'auto', left: 'auto' }); - - } else { - this.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance - this.instance._trigger("deactivate", event, uiSortable); - } - - }); - - }, - drag: function(event, ui) { - - var inst = $(this).data("draggable"), self = this; - - var checkPos = function(o) { - var dyClick = this.offset.click.top, dxClick = this.offset.click.left; - var helperTop = this.positionAbs.top, helperLeft = this.positionAbs.left; - var itemHeight = o.height, itemWidth = o.width; - var itemTop = o.top, itemLeft = o.left; - - return $.ui.isOver(helperTop + dyClick, helperLeft + dxClick, itemTop, itemLeft, itemHeight, itemWidth); - }; - - $.each(inst.sortables, function(i) { - - //Copy over some variables to allow calling the sortable's native _intersectsWith - this.instance.positionAbs = inst.positionAbs; - this.instance.helperProportions = inst.helperProportions; - this.instance.offset.click = inst.offset.click; - - if(this.instance._intersectsWith(this.instance.containerCache)) { - - //If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once - if(!this.instance.isOver) { - - this.instance.isOver = 1; - //Now we fake the start of dragging for the sortable instance, - //by cloning the list group item, appending it to the sortable and using it as inst.currentItem - //We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one) - this.instance.currentItem = $(self).clone().removeAttr('id').appendTo(this.instance.element).data("sortable-item", true); - this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it - this.instance.options.helper = function() { return ui.helper[0]; }; - - event.target = this.instance.currentItem[0]; - this.instance._mouseCapture(event, true); - this.instance._mouseStart(event, true, true); - - //Because the browser event is way off the new appended portlet, we modify a couple of variables to reflect the changes - this.instance.offset.click.top = inst.offset.click.top; - this.instance.offset.click.left = inst.offset.click.left; - this.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left; - this.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top; - - inst._trigger("toSortable", event); - inst.dropped = this.instance.element; //draggable revert needs that - //hack so receive/update callbacks work (mostly) - inst.currentItem = inst.element; - this.instance.fromOutside = inst; - - } - - //Provided we did all the previous steps, we can fire the drag event of the sortable on every draggable drag, when it intersects with the sortable - if(this.instance.currentItem) this.instance._mouseDrag(event); - - } else { - - //If it doesn't intersect with the sortable, and it intersected before, - //we fake the drag stop of the sortable, but make sure it doesn't remove the helper by using cancelHelperRemoval - if(this.instance.isOver) { - - this.instance.isOver = 0; - this.instance.cancelHelperRemoval = true; - - //Prevent reverting on this forced stop - this.instance.options.revert = false; - - // The out event needs to be triggered independently - this.instance._trigger('out', event, this.instance._uiHash(this.instance)); - - this.instance._mouseStop(event, true); - this.instance.options.helper = this.instance.options._helper; - - //Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size - this.instance.currentItem.remove(); - if(this.instance.placeholder) this.instance.placeholder.remove(); - - inst._trigger("fromSortable", event); - inst.dropped = false; //draggable revert needs that - } - - }; - - }); - - } -}); - -$.ui.plugin.add("draggable", "cursor", { - start: function(event, ui) { - var t = $('body'), o = $(this).data('draggable').options; - if (t.css("cursor")) o._cursor = t.css("cursor"); - t.css("cursor", o.cursor); - }, - stop: function(event, ui) { - var o = $(this).data('draggable').options; - if (o._cursor) $('body').css("cursor", o._cursor); - } -}); - -$.ui.plugin.add("draggable", "opacity", { - start: function(event, ui) { - var t = $(ui.helper), o = $(this).data('draggable').options; - if(t.css("opacity")) o._opacity = t.css("opacity"); - t.css('opacity', o.opacity); - }, - stop: function(event, ui) { - var o = $(this).data('draggable').options; - if(o._opacity) $(ui.helper).css('opacity', o._opacity); - } -}); - -$.ui.plugin.add("draggable", "scroll", { - start: function(event, ui) { - var i = $(this).data("draggable"); - if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') i.overflowOffset = i.scrollParent.offset(); - }, - drag: function(event, ui) { - - var i = $(this).data("draggable"), o = i.options, scrolled = false; - - if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') { - - if(!o.axis || o.axis != 'x') { - if((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) - i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed; - else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity) - i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed; - } - - if(!o.axis || o.axis != 'y') { - if((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) - i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed; - else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity) - i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed; - } - - } else { - - if(!o.axis || o.axis != 'x') { - if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) - scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed); - else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) - scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed); - } - - if(!o.axis || o.axis != 'y') { - if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) - scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed); - else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) - scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed); - } - - } - - if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) - $.ui.ddmanager.prepareOffsets(i, event); - - } -}); - -$.ui.plugin.add("draggable", "snap", { - start: function(event, ui) { - - var i = $(this).data("draggable"), o = i.options; - i.snapElements = []; - - $(o.snap.constructor != String ? ( o.snap.items || ':data(draggable)' ) : o.snap).each(function() { - var $t = $(this); var $o = $t.offset(); - if(this != i.element[0]) i.snapElements.push({ - item: this, - width: $t.outerWidth(), height: $t.outerHeight(), - top: $o.top, left: $o.left - }); - }); - - }, - drag: function(event, ui) { - - var inst = $(this).data("draggable"), o = inst.options; - var d = o.snapTolerance; - - var x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width, - y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height; - - for (var i = inst.snapElements.length - 1; i >= 0; i--){ - - var l = inst.snapElements[i].left, r = l + inst.snapElements[i].width, - t = inst.snapElements[i].top, b = t + inst.snapElements[i].height; - - //Yes, I know, this is insane ;) - if(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || (l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d < y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) { - if(inst.snapElements[i].snapping) (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item }))); - inst.snapElements[i].snapping = false; - continue; - } - - if(o.snapMode != 'inner') { - var ts = Math.abs(t - y2) <= d; - var bs = Math.abs(b - y1) <= d; - var ls = Math.abs(l - x2) <= d; - var rs = Math.abs(r - x1) <= d; - if(ts) ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top - inst.margins.top; - if(bs) ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top - inst.margins.top; - if(ls) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left - inst.margins.left; - if(rs) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left - inst.margins.left; - } - - var first = (ts || bs || ls || rs); - - if(o.snapMode != 'outer') { - var ts = Math.abs(t - y1) <= d; - var bs = Math.abs(b - y2) <= d; - var ls = Math.abs(l - x1) <= d; - var rs = Math.abs(r - x2) <= d; - if(ts) ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top - inst.margins.top; - if(bs) ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top; - if(ls) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left - inst.margins.left; - if(rs) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left - inst.margins.left; - } - - if(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first)) - (inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item }))); - inst.snapElements[i].snapping = (ts || bs || ls || rs || first); - - }; - - } -}); - -$.ui.plugin.add("draggable", "stack", { - start: function(event, ui) { - - var o = $(this).data("draggable").options; - - var group = $.makeArray($(o.stack)).sort(function(a,b) { - return (parseInt($(a).css("zIndex"),10) || 0) - (parseInt($(b).css("zIndex"),10) || 0); - }); - if (!group.length) { return; } - - var min = parseInt(group[0].style.zIndex) || 0; - $(group).each(function(i) { - this.style.zIndex = min + i; - }); - - this[0].style.zIndex = min + group.length; - - } -}); - -$.ui.plugin.add("draggable", "zIndex", { - start: function(event, ui) { - var t = $(ui.helper), o = $(this).data("draggable").options; - if(t.css("zIndex")) o._zIndex = t.css("zIndex"); - t.css('zIndex', o.zIndex); - }, - stop: function(event, ui) { - var o = $(this).data("draggable").options; - if(o._zIndex) $(ui.helper).css('zIndex', o._zIndex); - } -}); - -})(jQuery); diff --git a/resources/jquery.ui/jquery.ui.droppable.js b/resources/jquery.ui/jquery.ui.droppable.js deleted file mode 100644 index f17c2223..00000000 --- a/resources/jquery.ui/jquery.ui.droppable.js +++ /dev/null @@ -1,301 +0,0 @@ -/*! - * jQuery UI Droppable 1.8.24 - * - * Copyright 2012, 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 - * - * Depends: - * jquery.ui.core.js - * jquery.ui.widget.js - * jquery.ui.mouse.js - * jquery.ui.draggable.js - */ -(function( $, undefined ) { - -$.widget("ui.droppable", { - widgetEventPrefix: "drop", - options: { - accept: '*', - activeClass: false, - addClasses: true, - greedy: false, - hoverClass: false, - scope: 'default', - tolerance: 'intersect' - }, - _create: function() { - - var o = this.options, accept = o.accept; - this.isover = 0; this.isout = 1; - - this.accept = $.isFunction(accept) ? accept : function(d) { - return d.is(accept); - }; - - //Store the droppable's proportions - this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight }; - - // Add the reference and positions to the manager - $.ui.ddmanager.droppables[o.scope] = $.ui.ddmanager.droppables[o.scope] || []; - $.ui.ddmanager.droppables[o.scope].push(this); - - (o.addClasses && this.element.addClass("ui-droppable")); - - }, - - destroy: function() { - var drop = $.ui.ddmanager.droppables[this.options.scope]; - for ( var i = 0; i < drop.length; i++ ) - if ( drop[i] == this ) - drop.splice(i, 1); - - this.element - .removeClass("ui-droppable ui-droppable-disabled") - .removeData("droppable") - .unbind(".droppable"); - - return this; - }, - - _setOption: function(key, value) { - - if(key == 'accept') { - this.accept = $.isFunction(value) ? value : function(d) { - return d.is(value); - }; - } - $.Widget.prototype._setOption.apply(this, arguments); - }, - - _activate: function(event) { - var draggable = $.ui.ddmanager.current; - if(this.options.activeClass) this.element.addClass(this.options.activeClass); - (draggable && this._trigger('activate', event, this.ui(draggable))); - }, - - _deactivate: function(event) { - var draggable = $.ui.ddmanager.current; - if(this.options.activeClass) this.element.removeClass(this.options.activeClass); - (draggable && this._trigger('deactivate', event, this.ui(draggable))); - }, - - _over: function(event) { - - var draggable = $.ui.ddmanager.current; - if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element - - if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { - if(this.options.hoverClass) this.element.addClass(this.options.hoverClass); - this._trigger('over', event, this.ui(draggable)); - } - - }, - - _out: function(event) { - - var draggable = $.ui.ddmanager.current; - if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element - - if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { - if(this.options.hoverClass) this.element.removeClass(this.options.hoverClass); - this._trigger('out', event, this.ui(draggable)); - } - - }, - - _drop: function(event,custom) { - - var draggable = custom || $.ui.ddmanager.current; - if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return false; // Bail if draggable and droppable are same element - - var childrenIntersection = false; - this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function() { - var inst = $.data(this, 'droppable'); - if( - inst.options.greedy - && !inst.options.disabled - && inst.options.scope == draggable.options.scope - && inst.accept.call(inst.element[0], (draggable.currentItem || draggable.element)) - && $.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance) - ) { childrenIntersection = true; return false; } - }); - if(childrenIntersection) return false; - - if(this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { - if(this.options.activeClass) this.element.removeClass(this.options.activeClass); - if(this.options.hoverClass) this.element.removeClass(this.options.hoverClass); - this._trigger('drop', event, this.ui(draggable)); - return this.element; - } - - return false; - - }, - - ui: function(c) { - return { - draggable: (c.currentItem || c.element), - helper: c.helper, - position: c.position, - offset: c.positionAbs - }; - } - -}); - -$.extend($.ui.droppable, { - version: "1.8.24" -}); - -$.ui.intersect = function(draggable, droppable, toleranceMode) { - - if (!droppable.offset) return false; - - var x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width, - y1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height; - var l = droppable.offset.left, r = l + droppable.proportions.width, - t = droppable.offset.top, b = t + droppable.proportions.height; - - switch (toleranceMode) { - case 'fit': - return (l <= x1 && x2 <= r - && t <= y1 && y2 <= b); - break; - case 'intersect': - return (l < x1 + (draggable.helperProportions.width / 2) // Right Half - && x2 - (draggable.helperProportions.width / 2) < r // Left Half - && t < y1 + (draggable.helperProportions.height / 2) // Bottom Half - && y2 - (draggable.helperProportions.height / 2) < b ); // Top Half - break; - case 'pointer': - var draggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left), - draggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top), - isOver = $.ui.isOver(draggableTop, draggableLeft, t, l, droppable.proportions.height, droppable.proportions.width); - return isOver; - break; - case 'touch': - return ( - (y1 >= t && y1 <= b) || // Top edge touching - (y2 >= t && y2 <= b) || // Bottom edge touching - (y1 < t && y2 > b) // Surrounded vertically - ) && ( - (x1 >= l && x1 <= r) || // Left edge touching - (x2 >= l && x2 <= r) || // Right edge touching - (x1 < l && x2 > r) // Surrounded horizontally - ); - break; - default: - return false; - break; - } - -}; - -/* - This manager tracks offsets of draggables and droppables -*/ -$.ui.ddmanager = { - current: null, - droppables: { 'default': [] }, - prepareOffsets: function(t, event) { - - var m = $.ui.ddmanager.droppables[t.options.scope] || []; - var type = event ? event.type : null; // workaround for #2317 - var list = (t.currentItem || t.element).find(":data(droppable)").andSelf(); - - droppablesLoop: for (var i = 0; i < m.length; i++) { - - if(m[i].options.disabled || (t && !m[i].accept.call(m[i].element[0],(t.currentItem || t.element)))) continue; //No disabled and non-accepted - for (var j=0; j < list.length; j++) { if(list[j] == m[i].element[0]) { m[i].proportions.height = 0; continue droppablesLoop; } }; //Filter out elements in the current dragged item - m[i].visible = m[i].element.css("display") != "none"; if(!m[i].visible) continue; //If the element is not visible, continue - - if(type == "mousedown") m[i]._activate.call(m[i], event); //Activate the droppable if used directly from draggables - - m[i].offset = m[i].element.offset(); - m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight }; - - } - - }, - drop: function(draggable, event) { - - var dropped = false; - $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() { - - if(!this.options) return; - if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance)) - dropped = this._drop.call(this, event) || dropped; - - if (!this.options.disabled && this.visible && this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { - this.isout = 1; this.isover = 0; - this._deactivate.call(this, event); - } - - }); - return dropped; - - }, - dragStart: function( draggable, event ) { - //Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003) - draggable.element.parents( ":not(body,html)" ).bind( "scroll.droppable", function() { - if( !draggable.options.refreshPositions ) $.ui.ddmanager.prepareOffsets( draggable, event ); - }); - }, - drag: function(draggable, event) { - - //If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse. - if(draggable.options.refreshPositions) $.ui.ddmanager.prepareOffsets(draggable, event); - - //Run through all droppables and check their positions based on specific tolerance options - $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() { - - if(this.options.disabled || this.greedyChild || !this.visible) return; - var intersects = $.ui.intersect(draggable, this, this.options.tolerance); - - var c = !intersects && this.isover == 1 ? 'isout' : (intersects && this.isover == 0 ? 'isover' : null); - if(!c) return; - - var parentInstance; - if (this.options.greedy) { - // find droppable parents with same scope - var scope = this.options.scope; - var parent = this.element.parents(':data(droppable)').filter(function () { - return $.data(this, 'droppable').options.scope === scope; - }); - - if (parent.length) { - parentInstance = $.data(parent[0], 'droppable'); - parentInstance.greedyChild = (c == 'isover' ? 1 : 0); - } - } - - // we just moved into a greedy child - if (parentInstance && c == 'isover') { - parentInstance['isover'] = 0; - parentInstance['isout'] = 1; - parentInstance._out.call(parentInstance, event); - } - - this[c] = 1; this[c == 'isout' ? 'isover' : 'isout'] = 0; - this[c == "isover" ? "_over" : "_out"].call(this, event); - - // we just moved out of a greedy child - if (parentInstance && c == 'isout') { - parentInstance['isout'] = 0; - parentInstance['isover'] = 1; - parentInstance._over.call(parentInstance, event); - } - }); - - }, - dragStop: function( draggable, event ) { - draggable.element.parents( ":not(body,html)" ).unbind( "scroll.droppable" ); - //Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003) - if( !draggable.options.refreshPositions ) $.ui.ddmanager.prepareOffsets( draggable, event ); - } -}; - -})(jQuery); diff --git a/resources/jquery.ui/jquery.ui.mouse.js b/resources/jquery.ui/jquery.ui.mouse.js deleted file mode 100644 index 52a1786c..00000000 --- a/resources/jquery.ui/jquery.ui.mouse.js +++ /dev/null @@ -1,167 +0,0 @@ -/*! - * jQuery UI Mouse 1.8.24 - * - * Copyright 2012, 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( $, undefined ) { - -var mouseHandled = false; -$( document ).mouseup( function( e ) { - mouseHandled = false; -}); - -$.widget("ui.mouse", { - options: { - cancel: ':input,option', - distance: 1, - delay: 0 - }, - _mouseInit: function() { - var self = this; - - this.element - .bind('mousedown.'+this.widgetName, function(event) { - return self._mouseDown(event); - }) - .bind('click.'+this.widgetName, function(event) { - if (true === $.data(event.target, self.widgetName + '.preventClickEvent')) { - $.removeData(event.target, self.widgetName + '.preventClickEvent'); - event.stopImmediatePropagation(); - return false; - } - }); - - this.started = false; - }, - - // TODO: make sure destroying one instance of mouse doesn't mess with - // other instances of mouse - _mouseDestroy: function() { - this.element.unbind('.'+this.widgetName); - if ( this._mouseMoveDelegate ) { - $(document) - .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate) - .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate); - } - }, - - _mouseDown: function(event) { - // don't let more than one widget handle mouseStart - if( mouseHandled ) { return }; - - // we may have missed mouseup (out of window) - (this._mouseStarted && this._mouseUp(event)); - - this._mouseDownEvent = event; - - var self = this, - btnIsLeft = (event.which == 1), - // event.target.nodeName works around a bug in IE 8 with - // disabled inputs (#7620) - elIsCancel = (typeof this.options.cancel == "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false); - if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) { - return true; - } - - this.mouseDelayMet = !this.options.delay; - if (!this.mouseDelayMet) { - this._mouseDelayTimer = setTimeout(function() { - self.mouseDelayMet = true; - }, this.options.delay); - } - - if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { - this._mouseStarted = (this._mouseStart(event) !== false); - if (!this._mouseStarted) { - event.preventDefault(); - return true; - } - } - - // Click event may never have fired (Gecko & Opera) - if (true === $.data(event.target, this.widgetName + '.preventClickEvent')) { - $.removeData(event.target, this.widgetName + '.preventClickEvent'); - } - - // these delegates are required to keep context - this._mouseMoveDelegate = function(event) { - return self._mouseMove(event); - }; - this._mouseUpDelegate = function(event) { - return self._mouseUp(event); - }; - $(document) - .bind('mousemove.'+this.widgetName, this._mouseMoveDelegate) - .bind('mouseup.'+this.widgetName, this._mouseUpDelegate); - - event.preventDefault(); - - mouseHandled = true; - return true; - }, - - _mouseMove: function(event) { - // IE mouseup check - mouseup happened when mouse was out of window - if ($.browser.msie && !(document.documentMode >= 9) && !event.button) { - return this._mouseUp(event); - } - - if (this._mouseStarted) { - this._mouseDrag(event); - return event.preventDefault(); - } - - if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { - this._mouseStarted = - (this._mouseStart(this._mouseDownEvent, event) !== false); - (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event)); - } - - return !this._mouseStarted; - }, - - _mouseUp: function(event) { - $(document) - .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate) - .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate); - - if (this._mouseStarted) { - this._mouseStarted = false; - - if (event.target == this._mouseDownEvent.target) { - $.data(event.target, this.widgetName + '.preventClickEvent', true); - } - - this._mouseStop(event); - } - - return false; - }, - - _mouseDistanceMet: function(event) { - return (Math.max( - Math.abs(this._mouseDownEvent.pageX - event.pageX), - Math.abs(this._mouseDownEvent.pageY - event.pageY) - ) >= this.options.distance - ); - }, - - _mouseDelayMet: function(event) { - return this.mouseDelayMet; - }, - - // These are placeholder methods, to be overriden by extending plugin - _mouseStart: function(event) {}, - _mouseDrag: function(event) {}, - _mouseStop: function(event) {}, - _mouseCapture: function(event) { return true; } -}); - -})(jQuery); diff --git a/resources/jquery.ui/jquery.ui.position.js b/resources/jquery.ui/jquery.ui.position.js deleted file mode 100644 index 8b20179b..00000000 --- a/resources/jquery.ui/jquery.ui.position.js +++ /dev/null @@ -1,308 +0,0 @@ -/*! - * jQuery UI Position 1.8.24 - * - * Copyright 2012, 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( $, undefined ) { - -$.ui = $.ui || {}; - -var horizontalPositions = /left|center|right/, - verticalPositions = /top|center|bottom/, - center = "center", - support = {}, - _position = $.fn.position, - _offset = $.fn.offset; - -$.fn.position = function( options ) { - if ( !options || !options.of ) { - return _position.apply( this, arguments ); - } - - // make a copy, we don't want to modify arguments - 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 ( targetElem.nodeType === 9 ) { - targetWidth = target.width(); - targetHeight = target.height(); - basePosition = { top: 0, left: 0 }; - // TODO: use $.isWindow() in 1.9 - } else if ( targetElem.setTimeout ) { - targetWidth = target.width(); - targetHeight = target.height(); - basePosition = { top: target.scrollTop(), left: target.scrollLeft() }; - } else if ( targetElem.preventDefault ) { - // force left top to allow flipping - options.at = "left top"; - targetWidth = targetHeight = 0; - basePosition = { top: options.of.pageY, left: options.of.pageX }; - } else { - targetWidth = target.outerWidth(); - targetHeight = target.outerHeight(); - basePosition = target.offset(); - } - - // force my and at to have valid horizontal and veritcal positions - // if a value is missing or invalid, it will be converted to center - $.each( [ "my", "at" ], function() { - var pos = ( options[this] || "" ).split( " " ); - if ( pos.length === 1) { - pos = horizontalPositions.test( pos[0] ) ? - pos.concat( [center] ) : - verticalPositions.test( pos[0] ) ? - [ center ].concat( pos ) : - [ center, center ]; - } - pos[ 0 ] = horizontalPositions.test( pos[0] ) ? pos[ 0 ] : center; - pos[ 1 ] = verticalPositions.test( pos[1] ) ? pos[ 1 ] : center; - options[ this ] = pos; - }); - - // normalize collision option - if ( collision.length === 1 ) { - collision[ 1 ] = collision[ 0 ]; - } - - // normalize offset option - offset[ 0 ] = parseInt( offset[0], 10 ) || 0; - if ( offset.length === 1 ) { - offset[ 1 ] = offset[ 0 ]; - } - offset[ 1 ] = parseInt( offset[1], 10 ) || 0; - - if ( options.at[0] === "right" ) { - basePosition.left += targetWidth; - } else if ( options.at[0] === center ) { - basePosition.left += targetWidth / 2; - } - - if ( options.at[1] === "bottom" ) { - basePosition.top += targetHeight; - } else if ( options.at[1] === center ) { - basePosition.top += targetHeight / 2; - } - - basePosition.left += offset[ 0 ]; - basePosition.top += offset[ 1 ]; - - return this.each(function() { - var elem = $( this ), - elemWidth = elem.outerWidth(), - elemHeight = elem.outerHeight(), - 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] === center ) { - position.left -= elemWidth / 2; - } - - if ( options.my[1] === "bottom" ) { - position.top -= elemHeight; - } else if ( options.my[1] === center ) { - position.top -= elemHeight / 2; - } - - // prevent fractions if jQuery version doesn't support them (see #5280) - if ( !support.fractions ) { - 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] ] ) { - $.ui.position[ collision[i] ][ dir ]( position, { - targetWidth: targetWidth, - targetHeight: targetHeight, - elemWidth: elemWidth, - elemHeight: elemHeight, - collisionPosition: collisionPosition, - collisionWidth: collisionWidth, - collisionHeight: collisionHeight, - offset: offset, - my: options.my, - at: options.at - }); - } - }); - - if ( $.fn.bgiframe ) { - elem.bgiframe(); - } - elem.offset( $.extend( position, { using: options.using } ) ); - }); -}; - -$.ui.position = { - fit: { - left: function( position, data ) { - var win = $( window ), - 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 = 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 ) { - return; - } - var win = $( window ), - 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 += data.collisionPosition.left < 0 ? - myOffset + atOffset + offset : - over > 0 ? - myOffset + atOffset + offset : - 0; - }, - top: function( position, data ) { - if ( data.at[1] === center ) { - return; - } - var win = $( window ), - over = data.collisionPosition.top + data.collisionHeight - win.height() - win.scrollTop(), - myOffset = data.my[ 1 ] === "top" ? - -data.elemHeight : - data.my[ 1 ] === "bottom" ? - data.elemHeight : - 0, - atOffset = data.at[ 1 ] === "top" ? - data.targetHeight : - -data.targetHeight, - offset = -2 * data.offset[ 1 ]; - position.top += data.collisionPosition.top < 0 ? - myOffset + atOffset + offset : - over > 0 ? - myOffset + atOffset + offset : - 0; - } - } -}; - -// offset setter from jQuery 1.4 -if ( !$.offset.setOffset ) { - $.offset.setOffset = function( elem, options ) { - // set position first, in-case top/left are set even on static elem - if ( /static/.test( $.curCSS( elem, "position" ) ) ) { - elem.style.position = "relative"; - } - var curElem = $( elem ), - curOffset = curElem.offset(), - curTop = parseInt( $.curCSS( elem, "top", true ), 10 ) || 0, - curLeft = parseInt( $.curCSS( elem, "left", true ), 10) || 0, - props = { - top: (options.top - curOffset.top) + curTop, - left: (options.left - curOffset.left) + curLeft - }; - - if ( 'using' in options ) { - options.using.call( elem, props ); - } else { - curElem.css( props ); - } - }; - - $.fn.offset = function( options ) { - var elem = this[ 0 ]; - if ( !elem || !elem.ownerDocument ) { return null; } - if ( options ) { - if ( $.isFunction( options ) ) { - return this.each(function( i ) { - $( this ).offset( options.call( this, i, $( this ).offset() ) ); - }); - } - return this.each(function() { - $.offset.setOffset( this, options ); - }); - } - return _offset.call( this ); - }; -} - -// jQuery <1.4.3 uses curCSS, in 1.4.3 - 1.7.2 curCSS = css, 1.8+ only has css -if ( !$.curCSS ) { - $.curCSS = $.css; -} - -// fraction support test (older versions of jQuery don't support fractions) -(function () { - var body = document.getElementsByTagName( "body" )[ 0 ], - div = document.createElement( "div" ), - testElement, testElementParent, testElementStyle, offset, offsetTotal; - - //Create a "fake body" for testing based on method used in jQuery.support - testElement = document.createElement( body ? "div" : "body" ); - testElementStyle = { - visibility: "hidden", - width: 0, - height: 0, - border: 0, - margin: 0, - background: "none" - }; - if ( body ) { - $.extend( testElementStyle, { - position: "absolute", - left: "-1000px", - top: "-1000px" - }); - } - for ( var i in testElementStyle ) { - testElement.style[ i ] = testElementStyle[ i ]; - } - testElement.appendChild( div ); - testElementParent = body || document.documentElement; - testElementParent.insertBefore( testElement, testElementParent.firstChild ); - - div.style.cssText = "position: absolute; left: 10.7432222px; top: 10.432325px; height: 30px; width: 201px;"; - - offset = $( div ).offset( function( _, offset ) { - return offset; - }).offset(); - - testElement.innerHTML = ""; - testElementParent.removeChild( testElement ); - - offsetTotal = offset.top + offset.left + ( body ? 2000 : 0 ); - support.fractions = offsetTotal > 21 && offsetTotal < 22; -})(); - -}( jQuery )); diff --git a/resources/jquery.ui/jquery.ui.progressbar.js b/resources/jquery.ui/jquery.ui.progressbar.js deleted file mode 100644 index 7cea1baa..00000000 --- a/resources/jquery.ui/jquery.ui.progressbar.js +++ /dev/null @@ -1,109 +0,0 @@ -/*! - * jQuery UI Progressbar 1.8.24 - * - * Copyright 2012, 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 - * - * Depends: - * jquery.ui.core.js - * jquery.ui.widget.js - */ -(function( $, undefined ) { - -$.widget( "ui.progressbar", { - options: { - 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.min, - "aria-valuemax": this.options.max, - "aria-valuenow": this._value() - }); - - this.valueDiv = $( "
          " ) - .appendTo( this.element ); - - this.oldValue = this._value(); - this._refreshValue(); - }, - - destroy: function() { - this.element - .removeClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" ) - .removeAttr( "role" ) - .removeAttr( "aria-valuemin" ) - .removeAttr( "aria-valuemax" ) - .removeAttr( "aria-valuenow" ); - - this.valueDiv.remove(); - - $.Widget.prototype.destroy.apply( this, arguments ); - }, - - value: function( newValue ) { - if ( newValue === undefined ) { - return this._value(); - } - - this._setOption( "value", newValue ); - return this; - }, - - _setOption: function( key, value ) { - if ( key === "value" ) { - this.options.value = value; - this._refreshValue(); - if ( this._value() === this.options.max ) { - this._trigger( "complete" ); - } - } - - $.Widget.prototype._setOption.apply( this, arguments ); - }, - - _value: function() { - var val = this.options.value; - // normalize invalid value - if ( typeof val !== "number" ) { - val = 0; - } - return Math.min( this.options.max, Math.max( this.min, val ) ); - }, - - _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 - .toggle( value > this.min ) - .toggleClass( "ui-corner-right", value === this.options.max ) - .width( percentage.toFixed(0) + "%" ); - this.element.attr( "aria-valuenow", value ); - } -}); - -$.extend( $.ui.progressbar, { - version: "1.8.24" -}); - -})( jQuery ); diff --git a/resources/jquery.ui/jquery.ui.resizable.js b/resources/jquery.ui/jquery.ui.resizable.js deleted file mode 100644 index 6cc6f41f..00000000 --- a/resources/jquery.ui/jquery.ui.resizable.js +++ /dev/null @@ -1,807 +0,0 @@ -/*! - * jQuery UI Resizable 1.8.24 - * - * Copyright 2012, 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 - * - * Depends: - * jquery.ui.core.js - * jquery.ui.mouse.js - * jquery.ui.widget.js - */ -(function( $, undefined ) { - -$.widget("ui.resizable", $.ui.mouse, { - widgetEventPrefix: "resize", - options: { - alsoResize: false, - animate: false, - animateDuration: "slow", - animateEasing: "swing", - aspectRatio: false, - autoHide: false, - containment: false, - ghost: false, - grid: false, - handles: "e,s,se", - helper: false, - maxHeight: null, - maxWidth: null, - minHeight: 10, - minWidth: 10, - zIndex: 1000 - }, - _create: function() { - - var self = this, o = this.options; - this.element.addClass("ui-resizable"); - - $.extend(this, { - _aspectRatio: !!(o.aspectRatio), - aspectRatio: o.aspectRatio, - originalElement: this.element, - _proportionallyResizeElements: [], - _helper: o.helper || o.ghost || o.animate ? o.helper || 'ui-resizable-helper' : null - }); - - //Wrap the element if it cannot hold child nodes - if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) { - - //Create a wrapper element and set the wrapper to the new current internal element - this.element.wrap( - $('
          ').css({ - position: this.element.css('position'), - width: this.element.outerWidth(), - height: this.element.outerHeight(), - top: this.element.css('top'), - left: this.element.css('left') - }) - ); - - //Overwrite the original this.element - this.element = this.element.parent().data( - "resizable", this.element.data('resizable') - ); - - this.elementIsWrapper = true; - - //Move margins to the wrapper - this.element.css({ marginLeft: this.originalElement.css("marginLeft"), marginTop: this.originalElement.css("marginTop"), marginRight: this.originalElement.css("marginRight"), marginBottom: this.originalElement.css("marginBottom") }); - this.originalElement.css({ marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0}); - - //Prevent Safari textarea resize - this.originalResizeStyle = this.originalElement.css('resize'); - this.originalElement.css('resize', 'none'); - - //Push the actual element to our proportionallyResize internal array - this._proportionallyResizeElements.push(this.originalElement.css({ position: 'static', zoom: 1, display: 'block' })); - - // avoid IE jump (hard set the margin) - this.originalElement.css({ margin: this.originalElement.css('margin') }); - - // fix handlers offset - this._proportionallyResize(); - - } - - this.handles = o.handles || (!$('.ui-resizable-handle', this.element).length ? "e,s,se" : { n: '.ui-resizable-n', e: '.ui-resizable-e', s: '.ui-resizable-s', w: '.ui-resizable-w', se: '.ui-resizable-se', sw: '.ui-resizable-sw', ne: '.ui-resizable-ne', nw: '.ui-resizable-nw' }); - if(this.handles.constructor == String) { - - if(this.handles == 'all') this.handles = 'n,e,s,w,se,sw,ne,nw'; - var n = this.handles.split(","); this.handles = {}; - - for(var i = 0; i < n.length; i++) { - - var handle = $.trim(n[i]), hname = 'ui-resizable-'+handle; - var axis = $('
          '); - - // Apply zIndex to all handles - see #7960 - axis.css({ zIndex: o.zIndex }); - - //TODO : What's going on here? - if ('se' == handle) { - axis.addClass('ui-icon ui-icon-gripsmall-diagonal-se'); - }; - - //Insert into internal handles object and append to element - this.handles[handle] = '.ui-resizable-'+handle; - this.element.append(axis); - } - - } - - this._renderAxis = function(target) { - - target = target || this.element; - - for(var i in this.handles) { - - if(this.handles[i].constructor == String) - this.handles[i] = $(this.handles[i], this.element).show(); - - //Apply pad to wrapper element, needed to fix axis position (textarea, inputs, scrolls) - if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) { - - var axis = $(this.handles[i], this.element), padWrapper = 0; - - //Checking the correct pad and border - padWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth(); - - //The padding type i have to apply... - var padPos = [ 'padding', - /ne|nw|n/.test(i) ? 'Top' : - /se|sw|s/.test(i) ? 'Bottom' : - /^e$/.test(i) ? 'Right' : 'Left' ].join(""); - - target.css(padPos, padWrapper); - - this._proportionallyResize(); - - } - - //TODO: What's that good for? There's not anything to be executed left - if(!$(this.handles[i]).length) - continue; - - } - }; - - //TODO: make renderAxis a prototype function - this._renderAxis(this.element); - - this._handles = $('.ui-resizable-handle', this.element) - .disableSelection(); - - //Matching axis name - this._handles.mouseover(function() { - if (!self.resizing) { - if (this.className) - var axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i); - //Axis, default = se - self.axis = axis && axis[1] ? axis[1] : 'se'; - } - }); - - //If we want to auto hide the elements - if (o.autoHide) { - this._handles.hide(); - $(this.element) - .addClass("ui-resizable-autohide") - .hover(function() { - if (o.disabled) return; - $(this).removeClass("ui-resizable-autohide"); - self._handles.show(); - }, - function(){ - if (o.disabled) return; - if (!self.resizing) { - $(this).addClass("ui-resizable-autohide"); - self._handles.hide(); - } - }); - } - - //Initialize the mouse interaction - this._mouseInit(); - - }, - - destroy: function() { - - this._mouseDestroy(); - - var _destroy = function(exp) { - $(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing") - .removeData("resizable").unbind(".resizable").find('.ui-resizable-handle').remove(); - }; - - //TODO: Unwrap at same DOM position - if (this.elementIsWrapper) { - _destroy(this.element); - var wrapper = this.element; - wrapper.after( - this.originalElement.css({ - position: wrapper.css('position'), - width: wrapper.outerWidth(), - height: wrapper.outerHeight(), - top: wrapper.css('top'), - left: wrapper.css('left') - }) - ).remove(); - } - - this.originalElement.css('resize', this.originalResizeStyle); - _destroy(this.originalElement); - - return this; - }, - - _mouseCapture: function(event) { - var handle = false; - for (var i in this.handles) { - if ($(this.handles[i])[0] == event.target) { - handle = true; - } - } - - return !this.options.disabled && handle; - }, - - _mouseStart: function(event) { - - var o = this.options, iniPos = this.element.position(), el = this.element; - - this.resizing = true; - this.documentScroll = { top: $(document).scrollTop(), left: $(document).scrollLeft() }; - - // bugfix for http://dev.jquery.com/ticket/1749 - if (el.is('.ui-draggable') || (/absolute/).test(el.css('position'))) { - el.css({ position: 'absolute', top: iniPos.top, left: iniPos.left }); - } - - this._renderProxy(); - - var curleft = num(this.helper.css('left')), curtop = num(this.helper.css('top')); - - if (o.containment) { - curleft += $(o.containment).scrollLeft() || 0; - curtop += $(o.containment).scrollTop() || 0; - } - - //Store needed variables - this.offset = this.helper.offset(); - this.position = { left: curleft, top: curtop }; - this.size = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() }; - this.originalSize = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() }; - this.originalPosition = { left: curleft, top: curtop }; - this.sizeDiff = { width: el.outerWidth() - el.width(), height: el.outerHeight() - el.height() }; - this.originalMousePosition = { left: event.pageX, top: event.pageY }; - - //Aspect Ratio - this.aspectRatio = (typeof o.aspectRatio == 'number') ? o.aspectRatio : ((this.originalSize.width / this.originalSize.height) || 1); - - var cursor = $('.ui-resizable-' + this.axis).css('cursor'); - $('body').css('cursor', cursor == 'auto' ? this.axis + '-resize' : cursor); - - el.addClass("ui-resizable-resizing"); - this._propagate("start", event); - return true; - }, - - _mouseDrag: function(event) { - - //Increase performance, avoid regex - var el = this.helper, o = this.options, props = {}, - self = this, smp = this.originalMousePosition, a = this.axis; - - var dx = (event.pageX-smp.left)||0, dy = (event.pageY-smp.top)||0; - var trigger = this._change[a]; - if (!trigger) return false; - - // Calculate the attrs that will be change - var data = trigger.apply(this, [event, dx, dy]), ie6 = $.browser.msie && $.browser.version < 7, csdif = this.sizeDiff; - - // Put this in the mouseDrag handler since the user can start pressing shift while resizing - this._updateVirtualBoundaries(event.shiftKey); - if (this._aspectRatio || event.shiftKey) - data = this._updateRatio(data, event); - - data = this._respectSize(data, event); - - // plugins callbacks need to be called first - this._propagate("resize", event); - - el.css({ - top: this.position.top + "px", left: this.position.left + "px", - width: this.size.width + "px", height: this.size.height + "px" - }); - - if (!this._helper && this._proportionallyResizeElements.length) - this._proportionallyResize(); - - this._updateCache(data); - - // calling the user callback at the end - this._trigger('resize', event, this.ui()); - - return false; - }, - - _mouseStop: function(event) { - - this.resizing = false; - var o = this.options, self = this; - - if(this._helper) { - var pr = this._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName), - soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height, - soffsetw = ista ? 0 : self.sizeDiff.width; - - var s = { width: (self.helper.width() - soffsetw), height: (self.helper.height() - soffseth) }, - left = (parseInt(self.element.css('left'), 10) + (self.position.left - self.originalPosition.left)) || null, - top = (parseInt(self.element.css('top'), 10) + (self.position.top - self.originalPosition.top)) || null; - - if (!o.animate) - this.element.css($.extend(s, { top: top, left: left })); - - self.helper.height(self.size.height); - self.helper.width(self.size.width); - - if (this._helper && !o.animate) this._proportionallyResize(); - } - - $('body').css('cursor', 'auto'); - - this.element.removeClass("ui-resizable-resizing"); - - this._propagate("stop", event); - - if (this._helper) this.helper.remove(); - return false; - - }, - - _updateVirtualBoundaries: function(forceAspectRatio) { - var o = this.options, pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b; - - b = { - minWidth: isNumber(o.minWidth) ? o.minWidth : 0, - maxWidth: isNumber(o.maxWidth) ? o.maxWidth : Infinity, - minHeight: isNumber(o.minHeight) ? o.minHeight : 0, - maxHeight: isNumber(o.maxHeight) ? o.maxHeight : Infinity - }; - - if(this._aspectRatio || forceAspectRatio) { - // We want to create an enclosing box whose aspect ration is the requested one - // First, compute the "projected" size for each dimension based on the aspect ratio and other dimension - pMinWidth = b.minHeight * this.aspectRatio; - pMinHeight = b.minWidth / this.aspectRatio; - pMaxWidth = b.maxHeight * this.aspectRatio; - pMaxHeight = b.maxWidth / this.aspectRatio; - - if(pMinWidth > b.minWidth) b.minWidth = pMinWidth; - if(pMinHeight > b.minHeight) b.minHeight = pMinHeight; - if(pMaxWidth < b.maxWidth) b.maxWidth = pMaxWidth; - if(pMaxHeight < b.maxHeight) b.maxHeight = pMaxHeight; - } - this._vBoundaries = b; - }, - - _updateCache: function(data) { - var o = this.options; - this.offset = this.helper.offset(); - if (isNumber(data.left)) this.position.left = data.left; - if (isNumber(data.top)) this.position.top = data.top; - if (isNumber(data.height)) this.size.height = data.height; - if (isNumber(data.width)) this.size.width = data.width; - }, - - _updateRatio: function(data, event) { - - var o = this.options, cpos = this.position, csize = this.size, a = this.axis; - - if (isNumber(data.height)) data.width = (data.height * this.aspectRatio); - else if (isNumber(data.width)) data.height = (data.width / this.aspectRatio); - - if (a == 'sw') { - data.left = cpos.left + (csize.width - data.width); - data.top = null; - } - if (a == 'nw') { - data.top = cpos.top + (csize.height - data.height); - data.left = cpos.left + (csize.width - data.width); - } - - return data; - }, - - _respectSize: function(data, event) { - - var el = this.helper, o = this._vBoundaries, pRatio = this._aspectRatio || event.shiftKey, a = this.axis, - ismaxw = isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width), ismaxh = isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height), - isminw = isNumber(data.width) && o.minWidth && (o.minWidth > data.width), isminh = isNumber(data.height) && o.minHeight && (o.minHeight > data.height); - - if (isminw) data.width = o.minWidth; - if (isminh) data.height = o.minHeight; - if (ismaxw) data.width = o.maxWidth; - if (ismaxh) data.height = o.maxHeight; - - var dw = this.originalPosition.left + this.originalSize.width, dh = this.position.top + this.size.height; - var cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a); - - if (isminw && cw) data.left = dw - o.minWidth; - if (ismaxw && cw) data.left = dw - o.maxWidth; - if (isminh && ch) data.top = dh - o.minHeight; - if (ismaxh && ch) data.top = dh - o.maxHeight; - - // fixing jump error on top/left - bug #2330 - var isNotwh = !data.width && !data.height; - if (isNotwh && !data.left && data.top) data.top = null; - else if (isNotwh && !data.top && data.left) data.left = null; - - return data; - }, - - _proportionallyResize: function() { - - var o = this.options; - if (!this._proportionallyResizeElements.length) return; - var element = this.helper || this.element; - - for (var i=0; i < this._proportionallyResizeElements.length; i++) { - - var prel = this._proportionallyResizeElements[i]; - - if (!this.borderDif) { - var b = [prel.css('borderTopWidth'), prel.css('borderRightWidth'), prel.css('borderBottomWidth'), prel.css('borderLeftWidth')], - p = [prel.css('paddingTop'), prel.css('paddingRight'), prel.css('paddingBottom'), prel.css('paddingLeft')]; - - this.borderDif = $.map(b, function(v, i) { - var border = parseInt(v,10)||0, padding = parseInt(p[i],10)||0; - return border + padding; - }); - } - - if ($.browser.msie && !(!($(element).is(':hidden') || $(element).parents(':hidden').length))) - continue; - - prel.css({ - height: (element.height() - this.borderDif[0] - this.borderDif[2]) || 0, - width: (element.width() - this.borderDif[1] - this.borderDif[3]) || 0 - }); - - }; - - }, - - _renderProxy: function() { - - var el = this.element, o = this.options; - this.elementOffset = el.offset(); - - if(this._helper) { - - this.helper = this.helper || $('
          '); - - // fix ie6 offset TODO: This seems broken - var ie6 = $.browser.msie && $.browser.version < 7, ie6offset = (ie6 ? 1 : 0), - pxyoffset = ( ie6 ? 2 : -1 ); - - this.helper.addClass(this._helper).css({ - width: this.element.outerWidth() + pxyoffset, - height: this.element.outerHeight() + pxyoffset, - position: 'absolute', - left: this.elementOffset.left - ie6offset +'px', - top: this.elementOffset.top - ie6offset +'px', - zIndex: ++o.zIndex //TODO: Don't modify option - }); - - this.helper - .appendTo("body") - .disableSelection(); - - } else { - this.helper = this.element; - } - - }, - - _change: { - e: function(event, dx, dy) { - return { width: this.originalSize.width + dx }; - }, - w: function(event, dx, dy) { - var o = this.options, cs = this.originalSize, sp = this.originalPosition; - return { left: sp.left + dx, width: cs.width - dx }; - }, - n: function(event, dx, dy) { - var o = this.options, cs = this.originalSize, sp = this.originalPosition; - return { top: sp.top + dy, height: cs.height - dy }; - }, - s: function(event, dx, dy) { - return { height: this.originalSize.height + dy }; - }, - se: function(event, dx, dy) { - return $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [event, dx, dy])); - }, - sw: function(event, dx, dy) { - return $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [event, dx, dy])); - }, - ne: function(event, dx, dy) { - return $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [event, dx, dy])); - }, - nw: function(event, dx, dy) { - return $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [event, dx, dy])); - } - }, - - _propagate: function(n, event) { - $.ui.plugin.call(this, n, [event, this.ui()]); - (n != "resize" && this._trigger(n, event, this.ui())); - }, - - plugins: {}, - - ui: function() { - return { - originalElement: this.originalElement, - element: this.element, - helper: this.helper, - position: this.position, - size: this.size, - originalSize: this.originalSize, - originalPosition: this.originalPosition - }; - } - -}); - -$.extend($.ui.resizable, { - version: "1.8.24" -}); - -/* - * Resizable Extensions - */ - -$.ui.plugin.add("resizable", "alsoResize", { - - start: function (event, ui) { - var self = $(this).data("resizable"), o = self.options; - - var _store = function (exp) { - $(exp).each(function() { - 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) - }); - }); - }; - - 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) { _store(exp); }); } - }else{ - _store(o.alsoResize); - } - }, - - resize: function (event, ui) { - var self = $(this).data("resizable"), o = self.options, os = self.originalSize, op = self.originalPosition; - - var delta = { - height: (self.size.height - os.height) || 0, width: (self.size.width - os.width) || 0, - top: (self.position.top - op.top) || 0, left: (self.position.left - op.left) || 0 - }, - - _alsoResize = function (exp, c) { - $(exp).each(function() { - 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, function (i, prop) { - var sum = (start[prop]||0) + (delta[prop]||0); - if (sum && sum >= 0) - style[prop] = sum || null; - }); - - el.css(style); - }); - }; - - if (typeof(o.alsoResize) == 'object' && !o.alsoResize.nodeType) { - $.each(o.alsoResize, function (exp, c) { _alsoResize(exp, c); }); - }else{ - _alsoResize(o.alsoResize); - } - }, - - stop: function (event, ui) { - $(this).removeData("resizable-alsoresize"); - } -}); - -$.ui.plugin.add("resizable", "animate", { - - stop: function(event, ui) { - var self = $(this).data("resizable"), o = self.options; - - var pr = self._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName), - soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height, - soffsetw = ista ? 0 : self.sizeDiff.width; - - var style = { width: (self.size.width - soffsetw), height: (self.size.height - soffseth) }, - left = (parseInt(self.element.css('left'), 10) + (self.position.left - self.originalPosition.left)) || null, - top = (parseInt(self.element.css('top'), 10) + (self.position.top - self.originalPosition.top)) || null; - - self.element.animate( - $.extend(style, top && left ? { top: top, left: left } : {}), { - duration: o.animateDuration, - easing: o.animateEasing, - step: function() { - - var data = { - width: parseInt(self.element.css('width'), 10), - height: parseInt(self.element.css('height'), 10), - top: parseInt(self.element.css('top'), 10), - left: parseInt(self.element.css('left'), 10) - }; - - if (pr && pr.length) $(pr[0]).css({ width: data.width, height: data.height }); - - // propagating resize, and updating values for each animation step - self._updateCache(data); - self._propagate("resize", event); - - } - } - ); - } - -}); - -$.ui.plugin.add("resizable", "containment", { - - start: function(event, ui) { - var self = $(this).data("resizable"), o = self.options, el = self.element; - var oc = o.containment, ce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc; - if (!ce) return; - - self.containerElement = $(ce); - - if (/document/.test(oc) || oc == document) { - self.containerOffset = { left: 0, top: 0 }; - self.containerPosition = { left: 0, top: 0 }; - - self.parentData = { - element: $(document), left: 0, top: 0, - width: $(document).width(), height: $(document).height() || document.body.parentNode.scrollHeight - }; - } - - // i'm a node, so compute top, left, right, bottom - else { - var element = $(ce), p = []; - $([ "Top", "Right", "Left", "Bottom" ]).each(function(i, name) { p[i] = num(element.css("padding" + name)); }); - - self.containerOffset = element.offset(); - self.containerPosition = element.position(); - self.containerSize = { height: (element.innerHeight() - p[3]), width: (element.innerWidth() - p[1]) }; - - var co = self.containerOffset, ch = self.containerSize.height, cw = self.containerSize.width, - width = ($.ui.hasScroll(ce, "left") ? ce.scrollWidth : cw ), height = ($.ui.hasScroll(ce) ? ce.scrollHeight : ch); - - self.parentData = { - element: ce, left: co.left, top: co.top, width: width, height: height - }; - } - }, - - resize: function(event, ui) { - var self = $(this).data("resizable"), o = self.options, - ps = self.containerSize, co = self.containerOffset, cs = self.size, cp = self.position, - pRatio = self._aspectRatio || event.shiftKey, cop = { top:0, left:0 }, ce = self.containerElement; - - if (ce[0] != document && (/static/).test(ce.css('position'))) cop = co; - - if (cp.left < (self._helper ? co.left : 0)) { - self.size.width = self.size.width + (self._helper ? (self.position.left - co.left) : (self.position.left - cop.left)); - if (pRatio) self.size.height = self.size.width / self.aspectRatio; - self.position.left = o.helper ? co.left : 0; - } - - if (cp.top < (self._helper ? co.top : 0)) { - self.size.height = self.size.height + (self._helper ? (self.position.top - co.top) : self.position.top); - if (pRatio) self.size.width = self.size.height * self.aspectRatio; - self.position.top = self._helper ? co.top : 0; - } - - self.offset.left = self.parentData.left+self.position.left; - self.offset.top = self.parentData.top+self.position.top; - - var woset = Math.abs( (self._helper ? self.offset.left - cop.left : (self.offset.left - cop.left)) + self.sizeDiff.width ), - hoset = Math.abs( (self._helper ? self.offset.top - cop.top : (self.offset.top - co.top)) + self.sizeDiff.height ); - - var isParent = self.containerElement.get(0) == self.element.parent().get(0), - isOffsetRelative = /relative|absolute/.test(self.containerElement.css('position')); - - if(isParent && isOffsetRelative) woset -= self.parentData.left; - - if (woset + self.size.width >= self.parentData.width) { - self.size.width = self.parentData.width - woset; - if (pRatio) self.size.height = self.size.width / self.aspectRatio; - } - - if (hoset + self.size.height >= self.parentData.height) { - self.size.height = self.parentData.height - hoset; - if (pRatio) self.size.width = self.size.height * self.aspectRatio; - } - }, - - stop: function(event, ui){ - var self = $(this).data("resizable"), o = self.options, cp = self.position, - co = self.containerOffset, cop = self.containerPosition, ce = self.containerElement; - - var helper = $(self.helper), ho = helper.offset(), w = helper.outerWidth() - self.sizeDiff.width, h = helper.outerHeight() - self.sizeDiff.height; - - if (self._helper && !o.animate && (/relative/).test(ce.css('position'))) - $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h }); - - if (self._helper && !o.animate && (/static/).test(ce.css('position'))) - $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h }); - - } -}); - -$.ui.plugin.add("resizable", "ghost", { - - start: function(event, ui) { - - var self = $(this).data("resizable"), o = self.options, cs = self.size; - - self.ghost = self.originalElement.clone(); - self.ghost - .css({ opacity: .25, display: 'block', position: 'relative', height: cs.height, width: cs.width, margin: 0, left: 0, top: 0 }) - .addClass('ui-resizable-ghost') - .addClass(typeof o.ghost == 'string' ? o.ghost : ''); - - self.ghost.appendTo(self.helper); - - }, - - resize: function(event, ui){ - var self = $(this).data("resizable"), o = self.options; - if (self.ghost) self.ghost.css({ position: 'relative', height: self.size.height, width: self.size.width }); - }, - - stop: function(event, ui){ - var self = $(this).data("resizable"), o = self.options; - if (self.ghost && self.helper) self.helper.get(0).removeChild(self.ghost.get(0)); - } - -}); - -$.ui.plugin.add("resizable", "grid", { - - resize: function(event, ui) { - var self = $(this).data("resizable"), o = self.options, cs = self.size, os = self.originalSize, op = self.originalPosition, a = self.axis, ratio = o._aspectRatio || event.shiftKey; - o.grid = typeof o.grid == "number" ? [o.grid, o.grid] : o.grid; - var ox = Math.round((cs.width - os.width) / (o.grid[0]||1)) * (o.grid[0]||1), oy = Math.round((cs.height - os.height) / (o.grid[1]||1)) * (o.grid[1]||1); - - if (/^(se|s|e)$/.test(a)) { - self.size.width = os.width + ox; - self.size.height = os.height + oy; - } - else if (/^(ne)$/.test(a)) { - self.size.width = os.width + ox; - self.size.height = os.height + oy; - self.position.top = op.top - oy; - } - else if (/^(sw)$/.test(a)) { - self.size.width = os.width + ox; - self.size.height = os.height + oy; - self.position.left = op.left - ox; - } - else { - self.size.width = os.width + ox; - self.size.height = os.height + oy; - self.position.top = op.top - oy; - self.position.left = op.left - ox; - } - } - -}); - -var num = function(v) { - return parseInt(v, 10) || 0; -}; - -var isNumber = function(value) { - return !isNaN(parseInt(value, 10)); -}; - -})(jQuery); diff --git a/resources/jquery.ui/jquery.ui.selectable.js b/resources/jquery.ui/jquery.ui.selectable.js deleted file mode 100644 index 44c6e8c5..00000000 --- a/resources/jquery.ui/jquery.ui.selectable.js +++ /dev/null @@ -1,267 +0,0 @@ -/*! - * jQuery UI Selectable 1.8.24 - * - * Copyright 2012, 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 - * - * Depends: - * jquery.ui.core.js - * jquery.ui.mouse.js - * jquery.ui.widget.js - */ -(function( $, undefined ) { - -$.widget("ui.selectable", $.ui.mouse, { - options: { - appendTo: 'body', - autoRefresh: true, - distance: 0, - filter: '*', - tolerance: 'touch' - }, - _create: function() { - var self = this; - - this.element.addClass("ui-selectable"); - - this.dragged = false; - - // cache selectee children based on filter - var selectees; - this.refresh = function() { - selectees = $(self.options.filter, self.element[0]); - selectees.addClass("ui-selectee"); - selectees.each(function() { - var $this = $(this); - var pos = $this.offset(); - $.data(this, "selectable-item", { - element: this, - $element: $this, - left: pos.left, - top: pos.top, - right: pos.left + $this.outerWidth(), - bottom: pos.top + $this.outerHeight(), - startselected: false, - selected: $this.hasClass('ui-selected'), - selecting: $this.hasClass('ui-selecting'), - unselecting: $this.hasClass('ui-unselecting') - }); - }); - }; - this.refresh(); - - this.selectees = selectees.addClass("ui-selectee"); - - this._mouseInit(); - - this.helper = $("
          "); - }, - - destroy: function() { - this.selectees - .removeClass("ui-selectee") - .removeData("selectable-item"); - this.element - .removeClass("ui-selectable ui-selectable-disabled") - .removeData("selectable") - .unbind(".selectable"); - this._mouseDestroy(); - - return this; - }, - - _mouseStart: function(event) { - var self = this; - - this.opos = [event.pageX, event.pageY]; - - if (this.options.disabled) - return; - - var options = this.options; - - this.selectees = $(options.filter, this.element[0]); - - this._trigger("start", event); - - $(options.appendTo).append(this.helper); - // position helper (lasso) - this.helper.css({ - "left": event.clientX, - "top": event.clientY, - "width": 0, - "height": 0 - }); - - if (options.autoRefresh) { - this.refresh(); - } - - this.selectees.filter('.ui-selected').each(function() { - var selectee = $.data(this, "selectable-item"); - selectee.startselected = true; - if (!event.metaKey && !event.ctrlKey) { - selectee.$element.removeClass('ui-selected'); - selectee.selected = false; - selectee.$element.addClass('ui-unselecting'); - selectee.unselecting = true; - // selectable UNSELECTING callback - self._trigger("unselecting", event, { - unselecting: selectee.element - }); - } - }); - - $(event.target).parents().andSelf().each(function() { - var selectee = $.data(this, "selectable-item"); - if (selectee) { - var doSelect = (!event.metaKey && !event.ctrlKey) || !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; - } - }); - - }, - - _mouseDrag: function(event) { - var self = this; - this.dragged = true; - - if (this.options.disabled) - return; - - var options = this.options; - - var x1 = this.opos[0], y1 = this.opos[1], x2 = event.pageX, y2 = event.pageY; - if (x1 > x2) { var tmp = x2; x2 = x1; x1 = tmp; } - if (y1 > y2) { var tmp = y2; y2 = y1; y1 = tmp; } - this.helper.css({left: x1, top: y1, width: x2-x1, height: y2-y1}); - - this.selectees.each(function() { - var selectee = $.data(this, "selectable-item"); - //prevent helper from being selected if appendTo: selectable - if (!selectee || selectee.element == self.element[0]) - return; - var hit = false; - if (options.tolerance == 'touch') { - hit = ( !(selectee.left > x2 || selectee.right < x1 || selectee.top > y2 || selectee.bottom < y1) ); - } else if (options.tolerance == 'fit') { - hit = (selectee.left > x1 && selectee.right < x2 && selectee.top > y1 && selectee.bottom < y2); - } - - if (hit) { - // SELECT - if (selectee.selected) { - selectee.$element.removeClass('ui-selected'); - selectee.selected = false; - } - if (selectee.unselecting) { - selectee.$element.removeClass('ui-unselecting'); - selectee.unselecting = false; - } - if (!selectee.selecting) { - selectee.$element.addClass('ui-selecting'); - selectee.selecting = true; - // selectable SELECTING callback - self._trigger("selecting", event, { - selecting: selectee.element - }); - } - } else { - // UNSELECT - if (selectee.selecting) { - if ((event.metaKey || event.ctrlKey) && selectee.startselected) { - selectee.$element.removeClass('ui-selecting'); - selectee.selecting = false; - selectee.$element.addClass('ui-selected'); - selectee.selected = true; - } else { - selectee.$element.removeClass('ui-selecting'); - selectee.selecting = false; - if (selectee.startselected) { - selectee.$element.addClass('ui-unselecting'); - selectee.unselecting = true; - } - // selectable UNSELECTING callback - self._trigger("unselecting", event, { - unselecting: selectee.element - }); - } - } - if (selectee.selected) { - if (!event.metaKey && !event.ctrlKey && !selectee.startselected) { - selectee.$element.removeClass('ui-selected'); - selectee.selected = false; - - selectee.$element.addClass('ui-unselecting'); - selectee.unselecting = true; - // selectable UNSELECTING callback - self._trigger("unselecting", event, { - unselecting: selectee.element - }); - } - } - } - }); - - return false; - }, - - _mouseStop: function(event) { - var self = this; - - this.dragged = false; - - var options = this.options; - - $('.ui-unselecting', this.element[0]).each(function() { - var selectee = $.data(this, "selectable-item"); - selectee.$element.removeClass('ui-unselecting'); - selectee.unselecting = false; - selectee.startselected = false; - self._trigger("unselected", event, { - unselected: selectee.element - }); - }); - $('.ui-selecting', this.element[0]).each(function() { - var selectee = $.data(this, "selectable-item"); - selectee.$element.removeClass('ui-selecting').addClass('ui-selected'); - selectee.selecting = false; - selectee.selected = true; - selectee.startselected = true; - self._trigger("selected", event, { - selected: selectee.element - }); - }); - this._trigger("stop", event); - - this.helper.remove(); - - return false; - } - -}); - -$.extend($.ui.selectable, { - version: "1.8.24" -}); - -})(jQuery); diff --git a/resources/jquery.ui/jquery.ui.slider.js b/resources/jquery.ui/jquery.ui.slider.js deleted file mode 100644 index c554e783..00000000 --- a/resources/jquery.ui/jquery.ui.slider.js +++ /dev/null @@ -1,662 +0,0 @@ -/*! - * jQuery UI Slider 1.8.24 - * - * Copyright 2012, 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 - * - * Depends: - * jquery.ui.core.js - * jquery.ui.mouse.js - * jquery.ui.widget.js - */ -(function( $, undefined ) { - -// number of pages in a slider -// (how many times can you page up/down to go through the whole range) -var numPages = 5; - -$.widget( "ui.slider", $.ui.mouse, { - - widgetEventPrefix: "slide", - - options: { - animate: false, - distance: 0, - max: 100, - min: 0, - orientation: "horizontal", - range: false, - step: 1, - value: 0, - values: null - }, - - _create: function() { - var self = this, - o = this.options, - existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ), - handle = "", - handleCount = ( o.values && o.values.length ) || 1, - handles = []; - - this._keySliding = false; - this._mouseSliding = false; - this._animateOff = true; - this._handleIndex = null; - this._detectOrientation(); - this._mouseInit(); - - this.element - .addClass( "ui-slider" + - " ui-slider-" + this.orientation + - " ui-widget" + - " ui-widget-content" + - " ui-corner-all" + - ( o.disabled ? " ui-slider-disabled ui-disabled" : "" ) ); - - this.range = $([]); - - if ( o.range ) { - if ( o.range === true ) { - if ( !o.values ) { - o.values = [ this._valueMin(), this._valueMin() ]; - } - if ( o.values.length && o.values.length !== 2 ) { - o.values = [ o.values[0], o.values[0] ]; - } - } - - this.range = $( "
          " ) - .appendTo( this.element ) - .addClass( "ui-slider-range" + - // note: this isn't the most fittingly semantic framework class for this element, - // but worked best visually with a variety of themes - " ui-widget-header" + - ( ( o.range === "min" || o.range === "max" ) ? " ui-slider-range-" + o.range : "" ) ); - } - - for ( var i = existingHandles.length; i < handleCount; i += 1 ) { - handles.push( handle ); - } - - this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( self.element ) ); - - this.handle = this.handles.eq( 0 ); - - this.handles.add( this.range ).filter( "a" ) - .click(function( event ) { - event.preventDefault(); - }) - .hover(function() { - if ( !o.disabled ) { - $( this ).addClass( "ui-state-hover" ); - } - }, function() { - $( this ).removeClass( "ui-state-hover" ); - }) - .focus(function() { - if ( !o.disabled ) { - $( ".ui-slider .ui-state-focus" ).removeClass( "ui-state-focus" ); - $( this ).addClass( "ui-state-focus" ); - } else { - $( this ).blur(); - } - }) - .blur(function() { - $( this ).removeClass( "ui-state-focus" ); - }); - - this.handles.each(function( i ) { - $( this ).data( "index.ui-slider-handle", i ); - }); - - this.handles - .keydown(function( event ) { - var index = $( this ).data( "index.ui-slider-handle" ), - allowed, - curVal, - newVal, - step; - - if ( self.options.disabled ) { - return; - } - - switch ( event.keyCode ) { - case $.ui.keyCode.HOME: - case $.ui.keyCode.END: - case $.ui.keyCode.PAGE_UP: - case $.ui.keyCode.PAGE_DOWN: - case $.ui.keyCode.UP: - case $.ui.keyCode.RIGHT: - case $.ui.keyCode.DOWN: - case $.ui.keyCode.LEFT: - event.preventDefault(); - if ( !self._keySliding ) { - self._keySliding = true; - $( this ).addClass( "ui-state-active" ); - allowed = self._start( event, index ); - if ( allowed === false ) { - return; - } - } - break; - } - - step = self.options.step; - if ( self.options.values && self.options.values.length ) { - curVal = newVal = self.values( index ); - } else { - curVal = newVal = self.value(); - } - - switch ( event.keyCode ) { - case $.ui.keyCode.HOME: - newVal = self._valueMin(); - break; - case $.ui.keyCode.END: - newVal = self._valueMax(); - break; - case $.ui.keyCode.PAGE_UP: - newVal = self._trimAlignValue( curVal + ( (self._valueMax() - self._valueMin()) / numPages ) ); - break; - case $.ui.keyCode.PAGE_DOWN: - newVal = self._trimAlignValue( curVal - ( (self._valueMax() - self._valueMin()) / numPages ) ); - break; - case $.ui.keyCode.UP: - case $.ui.keyCode.RIGHT: - if ( curVal === self._valueMax() ) { - return; - } - newVal = self._trimAlignValue( curVal + step ); - break; - case $.ui.keyCode.DOWN: - case $.ui.keyCode.LEFT: - if ( curVal === self._valueMin() ) { - return; - } - newVal = self._trimAlignValue( curVal - step ); - break; - } - - self._slide( event, index, newVal ); - }) - .keyup(function( event ) { - var index = $( this ).data( "index.ui-slider-handle" ); - - if ( self._keySliding ) { - self._keySliding = false; - self._stop( event, index ); - self._change( event, index ); - $( this ).removeClass( "ui-state-active" ); - } - - }); - - this._refreshValue(); - - this._animateOff = false; - }, - - destroy: function() { - this.handles.remove(); - this.range.remove(); - - this.element - .removeClass( "ui-slider" + - " ui-slider-horizontal" + - " ui-slider-vertical" + - " ui-slider-disabled" + - " ui-widget" + - " ui-widget-content" + - " ui-corner-all" ) - .removeData( "slider" ) - .unbind( ".slider" ); - - this._mouseDestroy(); - - return this; - }, - - _mouseCapture: function( event ) { - var o = this.options, - position, - normValue, - distance, - closestHandle, - self, - index, - allowed, - offset, - mouseOverHandle; - - if ( o.disabled ) { - return false; - } - - this.elementSize = { - width: this.element.outerWidth(), - height: this.element.outerHeight() - }; - this.elementOffset = this.element.offset(); - - position = { x: event.pageX, y: event.pageY }; - normValue = this._normValueFromMouse( position ); - distance = this._valueMax() - this._valueMin() + 1; - self = this; - this.handles.each(function( i ) { - var thisDistance = Math.abs( normValue - self.values(i) ); - if ( distance > thisDistance ) { - distance = thisDistance; - closestHandle = $( this ); - index = i; - } - }); - - // workaround for bug #3736 (if both handles of a range are at 0, - // the first is always used as the one with least distance, - // and moving it is obviously prevented by preventing negative ranges) - if( o.range === true && this.values(1) === o.min ) { - index += 1; - closestHandle = $( this.handles[index] ); - } - - allowed = this._start( event, index ); - if ( allowed === false ) { - return false; - } - this._mouseSliding = true; - - self._handleIndex = index; - - closestHandle - .addClass( "ui-state-active" ) - .focus(); - - offset = closestHandle.offset(); - mouseOverHandle = !$( event.target ).parents().andSelf().is( ".ui-slider-handle" ); - this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : { - left: event.pageX - offset.left - ( closestHandle.width() / 2 ), - top: event.pageY - offset.top - - ( closestHandle.height() / 2 ) - - ( parseInt( closestHandle.css("borderTopWidth"), 10 ) || 0 ) - - ( parseInt( closestHandle.css("borderBottomWidth"), 10 ) || 0) + - ( parseInt( closestHandle.css("marginTop"), 10 ) || 0) - }; - - if ( !this.handles.hasClass( "ui-state-hover" ) ) { - this._slide( event, index, normValue ); - } - this._animateOff = true; - return true; - }, - - _mouseStart: function( event ) { - return true; - }, - - _mouseDrag: function( event ) { - var position = { x: event.pageX, y: event.pageY }, - normValue = this._normValueFromMouse( position ); - - this._slide( event, this._handleIndex, normValue ); - - return false; - }, - - _mouseStop: function( event ) { - this.handles.removeClass( "ui-state-active" ); - this._mouseSliding = false; - - this._stop( event, this._handleIndex ); - this._change( event, this._handleIndex ); - - this._handleIndex = null; - this._clickOffset = null; - this._animateOff = false; - - return false; - }, - - _detectOrientation: function() { - this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal"; - }, - - _normValueFromMouse: function( position ) { - var pixelTotal, - pixelMouse, - percentMouse, - valueTotal, - valueMouse; - - if ( this.orientation === "horizontal" ) { - pixelTotal = this.elementSize.width; - pixelMouse = position.x - this.elementOffset.left - ( this._clickOffset ? this._clickOffset.left : 0 ); - } else { - pixelTotal = this.elementSize.height; - pixelMouse = position.y - this.elementOffset.top - ( this._clickOffset ? this._clickOffset.top : 0 ); - } - - percentMouse = ( pixelMouse / pixelTotal ); - if ( percentMouse > 1 ) { - percentMouse = 1; - } - if ( percentMouse < 0 ) { - percentMouse = 0; - } - if ( this.orientation === "vertical" ) { - percentMouse = 1 - percentMouse; - } - - valueTotal = this._valueMax() - this._valueMin(); - valueMouse = this._valueMin() + percentMouse * valueTotal; - - return this._trimAlignValue( valueMouse ); - }, - - _start: function( event, index ) { - var uiHash = { - handle: this.handles[ index ], - value: this.value() - }; - if ( this.options.values && this.options.values.length ) { - uiHash.value = this.values( index ); - uiHash.values = this.values(); - } - return this._trigger( "start", event, uiHash ); - }, - - _slide: function( event, index, newVal ) { - var otherVal, - newValues, - allowed; - - if ( this.options.values && this.options.values.length ) { - otherVal = this.values( index ? 0 : 1 ); - - if ( ( this.options.values.length === 2 && this.options.range === true ) && - ( ( index === 0 && newVal > otherVal) || ( index === 1 && newVal < otherVal ) ) - ) { - newVal = otherVal; - } - - if ( newVal !== this.values( index ) ) { - newValues = this.values(); - newValues[ index ] = newVal; - // A slide can be canceled by returning false from the slide callback - allowed = this._trigger( "slide", event, { - handle: this.handles[ index ], - value: newVal, - values: newValues - } ); - otherVal = this.values( index ? 0 : 1 ); - if ( allowed !== false ) { - this.values( index, newVal, true ); - } - } - } else { - if ( newVal !== this.value() ) { - // A slide can be canceled by returning false from the slide callback - allowed = this._trigger( "slide", event, { - handle: this.handles[ index ], - value: newVal - } ); - if ( allowed !== false ) { - this.value( newVal ); - } - } - } - }, - - _stop: function( event, index ) { - var uiHash = { - handle: this.handles[ index ], - value: this.value() - }; - if ( this.options.values && this.options.values.length ) { - uiHash.value = this.values( index ); - uiHash.values = this.values(); - } - - this._trigger( "stop", event, uiHash ); - }, - - _change: function( event, index ) { - if ( !this._keySliding && !this._mouseSliding ) { - var uiHash = { - handle: this.handles[ index ], - value: this.value() - }; - if ( this.options.values && this.options.values.length ) { - uiHash.value = this.values( index ); - uiHash.values = this.values(); - } - - this._trigger( "change", event, uiHash ); - } - }, - - value: function( newValue ) { - if ( arguments.length ) { - this.options.value = this._trimAlignValue( newValue ); - this._refreshValue(); - this._change( null, 0 ); - return; - } - - return this._value(); - }, - - values: function( index, newValue ) { - var vals, - newValues, - i; - - if ( arguments.length > 1 ) { - this.options.values[ index ] = this._trimAlignValue( newValue ); - this._refreshValue(); - this._change( null, index ); - return; - } - - if ( arguments.length ) { - if ( $.isArray( arguments[ 0 ] ) ) { - vals = this.options.values; - newValues = arguments[ 0 ]; - for ( i = 0; i < vals.length; i += 1 ) { - vals[ i ] = this._trimAlignValue( newValues[ i ] ); - this._change( null, i ); - } - this._refreshValue(); - } else { - if ( this.options.values && this.options.values.length ) { - return this._values( index ); - } else { - return this.value(); - } - } - } else { - return this._values(); - } - }, - - _setOption: function( key, value ) { - var i, - valsLength = 0; - - if ( $.isArray( this.options.values ) ) { - valsLength = this.options.values.length; - } - - $.Widget.prototype._setOption.apply( this, arguments ); - - switch ( key ) { - case "disabled": - if ( value ) { - this.handles.filter( ".ui-state-focus" ).blur(); - this.handles.removeClass( "ui-state-hover" ); - this.handles.propAttr( "disabled", true ); - this.element.addClass( "ui-disabled" ); - } else { - this.handles.propAttr( "disabled", false ); - this.element.removeClass( "ui-disabled" ); - } - break; - case "orientation": - this._detectOrientation(); - this.element - .removeClass( "ui-slider-horizontal ui-slider-vertical" ) - .addClass( "ui-slider-" + this.orientation ); - this._refreshValue(); - break; - case "value": - this._animateOff = true; - this._refreshValue(); - this._change( null, 0 ); - this._animateOff = false; - break; - case "values": - this._animateOff = true; - this._refreshValue(); - for ( i = 0; i < valsLength; i += 1 ) { - this._change( null, i ); - } - this._animateOff = false; - break; - } - }, - - //internal value getter - // _value() returns value trimmed by min and max, aligned by step - _value: function() { - var val = this.options.value; - val = this._trimAlignValue( val ); - - return val; - }, - - //internal values getter - // _values() returns array of values trimmed by min and max, aligned by step - // _values( index ) returns single value trimmed by min and max, aligned by step - _values: function( index ) { - var val, - vals, - i; - - if ( arguments.length ) { - val = this.options.values[ index ]; - val = this._trimAlignValue( val ); - - return val; - } else { - // .slice() creates a copy of the array - // this copy gets trimmed by min and max and then returned - vals = this.options.values.slice(); - for ( i = 0; i < vals.length; i+= 1) { - vals[ i ] = this._trimAlignValue( vals[ i ] ); - } - - return vals; - } - }, - - // returns the step-aligned value that val is closest to, between (inclusive) min and max - _trimAlignValue: function( val ) { - if ( val <= this._valueMin() ) { - return this._valueMin(); - } - if ( val >= this._valueMax() ) { - return this._valueMax(); - } - var step = ( this.options.step > 0 ) ? this.options.step : 1, - valModStep = (val - this._valueMin()) % step, - alignValue = val - valModStep; - - if ( Math.abs(valModStep) * 2 >= step ) { - alignValue += ( valModStep > 0 ) ? step : ( -step ); - } - - // Since JavaScript has problems with large floats, round - // the final value to 5 digits after the decimal point (see #4124) - return parseFloat( alignValue.toFixed(5) ); - }, - - _valueMin: function() { - return this.options.min; - }, - - _valueMax: function() { - return this.options.max; - }, - - _refreshValue: function() { - var oRange = this.options.range, - o = this.options, - self = this, - animate = ( !this._animateOff ) ? o.animate : false, - valPercent, - _set = {}, - lastValPercent, - value, - valueMin, - valueMax; - - if ( this.options.values && this.options.values.length ) { - this.handles.each(function( i, j ) { - valPercent = ( self.values(i) - self._valueMin() ) / ( self._valueMax() - self._valueMin() ) * 100; - _set[ self.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%"; - $( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate ); - if ( self.options.range === true ) { - if ( self.orientation === "horizontal" ) { - if ( i === 0 ) { - self.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { left: valPercent + "%" }, o.animate ); - } - if ( i === 1 ) { - self.range[ animate ? "animate" : "css" ]( { width: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } ); - } - } else { - if ( i === 0 ) { - self.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { bottom: ( valPercent ) + "%" }, o.animate ); - } - if ( i === 1 ) { - self.range[ animate ? "animate" : "css" ]( { height: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } ); - } - } - } - lastValPercent = valPercent; - }); - } else { - value = this.value(); - valueMin = this._valueMin(); - valueMax = this._valueMax(); - valPercent = ( valueMax !== valueMin ) ? - ( value - valueMin ) / ( valueMax - valueMin ) * 100 : - 0; - _set[ self.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%"; - this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate ); - - if ( oRange === "min" && this.orientation === "horizontal" ) { - this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { width: valPercent + "%" }, o.animate ); - } - if ( oRange === "max" && this.orientation === "horizontal" ) { - this.range[ animate ? "animate" : "css" ]( { width: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } ); - } - if ( oRange === "min" && this.orientation === "vertical" ) { - this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { height: valPercent + "%" }, o.animate ); - } - if ( oRange === "max" && this.orientation === "vertical" ) { - this.range[ animate ? "animate" : "css" ]( { height: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } ); - } - } - } - -}); - -$.extend( $.ui.slider, { - version: "1.8.24" -}); - -}(jQuery)); diff --git a/resources/jquery.ui/jquery.ui.sortable.js b/resources/jquery.ui/jquery.ui.sortable.js deleted file mode 100644 index 9e0cac68..00000000 --- a/resources/jquery.ui/jquery.ui.sortable.js +++ /dev/null @@ -1,1094 +0,0 @@ -/*! - * jQuery UI Sortable 1.8.24 - * - * Copyright 2012, 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 - * - * Depends: - * jquery.ui.core.js - * jquery.ui.mouse.js - * jquery.ui.widget.js - */ -(function( $, undefined ) { - -$.widget("ui.sortable", $.ui.mouse, { - widgetEventPrefix: "sort", - ready: false, - options: { - appendTo: "parent", - axis: false, - connectWith: false, - containment: false, - cursor: 'auto', - cursorAt: false, - dropOnEmpty: true, - forcePlaceholderSize: false, - forceHelperSize: false, - grid: false, - handle: false, - helper: "original", - items: '> *', - opacity: false, - placeholder: false, - revert: false, - scroll: true, - scrollSensitivity: 20, - scrollSpeed: 20, - scope: "default", - tolerance: "intersect", - zIndex: 1000 - }, - _create: function() { - - var o = this.options; - this.containerCache = {}; - this.element.addClass("ui-sortable"); - - //Get the items - this.refresh(); - - //Let's determine if the items are being displayed horizontally - this.floating = this.items.length ? o.axis === 'x' || (/left|right/).test(this.items[0].item.css('float')) || (/inline|table-cell/).test(this.items[0].item.css('display')) : false; - - //Let's determine the parent's offset - this.offset = this.element.offset(); - - //Initialize mouse events for interaction - this._mouseInit(); - - //We're ready to go - this.ready = true - - }, - - destroy: function() { - $.Widget.prototype.destroy.call( this ); - this.element - .removeClass("ui-sortable ui-sortable-disabled"); - this._mouseDestroy(); - - for ( var i = this.items.length - 1; i >= 0; i-- ) - this.items[i].item.removeData(this.widgetName + "-item"); - - return this; - }, - - _setOption: function(key, value){ - if ( key === "disabled" ) { - this.options[ key ] = value; - - this.widget() - [ value ? "addClass" : "removeClass"]( "ui-sortable-disabled" ); - } else { - // Don't call widget base _setOption for disable as it adds ui-state-disabled class - $.Widget.prototype._setOption.apply(this, arguments); - } - }, - - _mouseCapture: function(event, overrideHandle) { - var that = this; - - if (this.reverting) { - return false; - } - - if(this.options.disabled || this.options.type == 'static') return false; - - //We have to refresh the items data once first - this._refreshItems(event); - - //Find out if the clicked node (or one of its parents) is a actual item in this.items - var currentItem = null, self = this, nodes = $(event.target).parents().each(function() { - if($.data(this, that.widgetName + '-item') == self) { - currentItem = $(this); - return false; - } - }); - if($.data(event.target, that.widgetName + '-item') == self) currentItem = $(event.target); - - if(!currentItem) return false; - if(this.options.handle && !overrideHandle) { - var validHandle = false; - - $(this.options.handle, currentItem).find("*").andSelf().each(function() { if(this == event.target) validHandle = true; }); - if(!validHandle) return false; - } - - this.currentItem = currentItem; - this._removeCurrentsFromItems(); - return true; - - }, - - _mouseStart: function(event, overrideHandle, noActivation) { - - var o = this.options, self = this; - this.currentContainer = this; - - //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture - this.refreshPositions(); - - //Create and append the visible helper - this.helper = this._createHelper(event); - - //Cache the helper size - this._cacheHelperProportions(); - - /* - * - Position generation - - * This block generates everything position related - it's the core of draggables. - */ - - //Cache the margins of the original element - this._cacheMargins(); - - //Get the next scrolling parent - this.scrollParent = this.helper.scrollParent(); - - //The element's absolute position on the page minus margins - this.offset = this.currentItem.offset(); - this.offset = { - top: this.offset.top - this.margins.top, - left: this.offset.left - this.margins.left - }; - - $.extend(this.offset, { - click: { //Where the click happened, relative to the element - left: event.pageX - this.offset.left, - top: event.pageY - this.offset.top - }, - parent: this._getParentOffset(), - relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper - }); - - // Only after we got the offset, we can change the helper's position to absolute - // TODO: Still need to figure out a way to make relative sorting possible - this.helper.css("position", "absolute"); - this.cssPosition = this.helper.css("position"); - - //Generate the original position - this.originalPosition = this._generatePosition(event); - this.originalPageX = event.pageX; - this.originalPageY = event.pageY; - - //Adjust the mouse offset relative to the helper if 'cursorAt' is supplied - (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt)); - - //Cache the former DOM position - this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] }; - - //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 - if(this.helper[0] != this.currentItem[0]) { - this.currentItem.hide(); - } - - //Create the placeholder - this._createPlaceholder(); - - //Set a containment if given in the options - if(o.containment) - this._setContainment(); - - if(o.cursor) { // cursor option - if ($('body').css("cursor")) this._storedCursor = $('body').css("cursor"); - $('body').css("cursor", o.cursor); - } - - if(o.opacity) { // opacity option - if (this.helper.css("opacity")) this._storedOpacity = this.helper.css("opacity"); - this.helper.css("opacity", o.opacity); - } - - if(o.zIndex) { // zIndex option - if (this.helper.css("zIndex")) this._storedZIndex = this.helper.css("zIndex"); - this.helper.css("zIndex", o.zIndex); - } - - //Prepare scrolling - if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML') - this.overflowOffset = this.scrollParent.offset(); - - //Call callbacks - this._trigger("start", event, this._uiHash()); - - //Recache the helper size - if(!this._preserveHelperProportions) - this._cacheHelperProportions(); - - - //Post 'activate' events to possible containers - if(!noActivation) { - for (var i = this.containers.length - 1; i >= 0; i--) { this.containers[i]._trigger("activate", event, self._uiHash(this)); } - } - - //Prepare possible droppables - if($.ui.ddmanager) - $.ui.ddmanager.current = this; - - if ($.ui.ddmanager && !o.dropBehaviour) - $.ui.ddmanager.prepareOffsets(this, event); - - this.dragging = true; - - this.helper.addClass("ui-sortable-helper"); - this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position - return true; - - }, - - _mouseDrag: function(event) { - - //Compute the helpers position - this.position = this._generatePosition(event); - this.positionAbs = this._convertPositionTo("absolute"); - - if (!this.lastPositionAbs) { - this.lastPositionAbs = this.positionAbs; - } - - //Do scrolling - if(this.options.scroll) { - var o = this.options, scrolled = false; - if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML') { - - if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) - this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed; - else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity) - this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed; - - if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) - this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed; - else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity) - this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed; - - } else { - - if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) - scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed); - else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) - scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed); - - if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) - scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed); - else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) - scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed); - - } - - if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) - $.ui.ddmanager.prepareOffsets(this, event); - } - - //Regenerate the absolute position used for position checks - this.positionAbs = this._convertPositionTo("absolute"); - - //Set the helper position - if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px'; - if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px'; - - //Rearrange - for (var i = this.items.length - 1; i >= 0; i--) { - - //Cache variables and intersection, continue if no intersection - var item = this.items[i], itemElement = item.item[0], intersection = this._intersectsWithPointer(item); - if (!intersection) continue; - - // Only put the placeholder inside the current Container, skip all - // items form other containers. This works because when moving - // an item from one container to another the - // currentContainer is switched before the placeholder is moved. - // - // Without this moving items in "sub-sortables" can cause the placeholder to jitter - // beetween the outer and inner container. - if (item.instance !== this.currentContainer) continue; - - 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) - //&& itemElement.parentNode == this.placeholder[0].parentNode // only rearrange items within the same container - ) { - - this.direction = intersection == 1 ? "down" : "up"; - - if (this.options.tolerance == "pointer" || this._intersectsWithSides(item)) { - this._rearrange(event, item); - } else { - break; - } - - this._trigger("change", event, this._uiHash()); - break; - } - } - - //Post events to containers - this._contactContainers(event); - - //Interconnect with droppables - if($.ui.ddmanager) $.ui.ddmanager.drag(this, event); - - //Call callbacks - this._trigger('sort', event, this._uiHash()); - - this.lastPositionAbs = this.positionAbs; - return false; - - }, - - _mouseStop: function(event, noPropagation) { - - if(!event) return; - - //If we are using droppables, inform the manager about the drop - if ($.ui.ddmanager && !this.options.dropBehaviour) - $.ui.ddmanager.drop(this, event); - - if(this.options.revert) { - var self = this; - var cur = self.placeholder.offset(); - - self.reverting = true; - - $(this.helper).animate({ - left: cur.left - this.offset.parent.left - self.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft), - top: cur.top - this.offset.parent.top - self.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop) - }, parseInt(this.options.revert, 10) || 500, function() { - self._clear(event); - }); - } else { - this._clear(event, noPropagation); - } - - return false; - - }, - - cancel: function() { - - var self = this; - - if(this.dragging) { - - this._mouseUp({ target: null }); - - if(this.options.helper == "original") - this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); - else - this.currentItem.show(); - - //Post deactivating events to containers - for (var i = this.containers.length - 1; i >= 0; i--){ - this.containers[i]._trigger("deactivate", null, self._uiHash(this)); - if(this.containers[i].containerCache.over) { - this.containers[i]._trigger("out", null, self._uiHash(this)); - this.containers[i].containerCache.over = 0; - } - } - - } - - if (this.placeholder) { - //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node! - if(this.placeholder[0].parentNode) this.placeholder[0].parentNode.removeChild(this.placeholder[0]); - if(this.options.helper != "original" && this.helper && this.helper[0].parentNode) this.helper.remove(); - - $.extend(this, { - helper: null, - dragging: false, - reverting: false, - _noFinalSort: null - }); - - if(this.domPosition.prev) { - $(this.domPosition.prev).after(this.currentItem); - } else { - $(this.domPosition.parent).prepend(this.currentItem); - } - } - - return this; - - }, - - serialize: function(o) { - - var items = this._getItemsAsjQuery(o && o.connected); - var str = []; o = o || {}; - - $(items).each(function() { - var res = ($(o.item || this).attr(o.attribute || 'id') || '').match(o.expression || (/(.+)[-=_](.+)/)); - 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('&'); - - }, - - toArray: function(o) { - - var items = this._getItemsAsjQuery(o && o.connected); - var ret = []; o = o || {}; - - items.each(function() { ret.push($(o.item || this).attr(o.attribute || 'id') || ''); }); - return ret; - - }, - - /* Be careful with the following core functions */ - _intersectsWith: function(item) { - - var x1 = this.positionAbs.left, - x2 = x1 + this.helperProportions.width, - y1 = this.positionAbs.top, - y2 = y1 + this.helperProportions.height; - - var l = item.left, - r = l + item.width, - t = item.top, - b = t + item.height; - - var dyClick = this.offset.click.top, - dxClick = this.offset.click.left; - - var isOverElement = (y1 + dyClick) > t && (y1 + dyClick) < b && (x1 + dxClick) > l && (x1 + dxClick) < r; - - if( this.options.tolerance == "pointer" - || this.options.forcePointerForContainers - || (this.options.tolerance != "pointer" && this.helperProportions[this.floating ? 'width' : 'height'] > item[this.floating ? 'width' : 'height']) - ) { - return isOverElement; - } else { - - return (l < x1 + (this.helperProportions.width / 2) // Right Half - && x2 - (this.helperProportions.width / 2) < r // Left Half - && t < y1 + (this.helperProportions.height / 2) // Bottom Half - && y2 - (this.helperProportions.height / 2) < b ); // Top Half - - } - }, - - _intersectsWithPointer: function(item) { - - var isOverElementHeight = (this.options.axis === 'x') || $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height), - isOverElementWidth = (this.options.axis === 'y') || $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width), - isOverElement = isOverElementHeight && isOverElementWidth, - verticalDirection = this._getDragVerticalDirection(), - horizontalDirection = this._getDragHorizontalDirection(); - - if (!isOverElement) - return false; - - return this.floating ? - ( ((horizontalDirection && horizontalDirection == "right") || verticalDirection == "down") ? 2 : 1 ) - : ( verticalDirection && (verticalDirection == "down" ? 2 : 1) ); - - }, - - _intersectsWithSides: function(item) { - - var isOverBottomHalf = $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height), - isOverRightHalf = $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width), - verticalDirection = this._getDragVerticalDirection(), - horizontalDirection = this._getDragHorizontalDirection(); - - if (this.floating && horizontalDirection) { - return ((horizontalDirection == "right" && isOverRightHalf) || (horizontalDirection == "left" && !isOverRightHalf)); - } else { - return verticalDirection && ((verticalDirection == "down" && isOverBottomHalf) || (verticalDirection == "up" && !isOverBottomHalf)); - } - - }, - - _getDragVerticalDirection: function() { - var delta = this.positionAbs.top - this.lastPositionAbs.top; - return delta != 0 && (delta > 0 ? "down" : "up"); - }, - - _getDragHorizontalDirection: function() { - var delta = this.positionAbs.left - this.lastPositionAbs.left; - return delta != 0 && (delta > 0 ? "right" : "left"); - }, - - refresh: function(event) { - this._refreshItems(event); - this.refreshPositions(); - return this; - }, - - _connectWith: function() { - var options = this.options; - return options.connectWith.constructor == String - ? [options.connectWith] - : options.connectWith; - }, - - _getItemsAsjQuery: function(connected) { - - var self = this; - var items = []; - var queries = []; - var connectWith = this._connectWith(); - - if(connectWith && connected) { - for (var i = connectWith.length - 1; i >= 0; i--){ - var cur = $(connectWith[i]); - for (var j = cur.length - 1; j >= 0; j--){ - var inst = $.data(cur[j], this.widgetName); - if(inst && inst != this && !inst.options.disabled) { - 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]); - } - }; - }; - } - - 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]); - - for (var i = queries.length - 1; i >= 0; i--){ - queries[i][0].each(function() { - items.push(this); - }); - }; - - return $(items); - - }, - - _removeCurrentsFromItems: function() { - - var list = this.currentItem.find(":data(" + this.widgetName + "-item)"); - - for (var i=0; i < this.items.length; i++) { - - for (var j=0; j < list.length; j++) { - if(list[j] == this.items[i].item[0]) - this.items.splice(i,1); - }; - - }; - - }, - - _refreshItems: function(event) { - - this.items = []; - this.containers = [this]; - var items = this.items; - var self = this; - var queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]]; - var connectWith = this._connectWith(); - - if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down - for (var i = connectWith.length - 1; i >= 0; i--){ - var cur = $(connectWith[i]); - for (var j = cur.length - 1; j >= 0; j--){ - var inst = $.data(cur[j], this.widgetName); - if(inst && inst != this && !inst.options.disabled) { - queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]); - this.containers.push(inst); - } - }; - }; - } - - for (var i = queries.length - 1; i >= 0; i--) { - var targetData = queries[i][1]; - var _queries = queries[i][0]; - - for (var j=0, queriesLength = _queries.length; j < queriesLength; j++) { - var item = $(_queries[j]); - - item.data(this.widgetName + '-item', targetData); // Data for target checking (mouse manager) - - items.push({ - item: item, - instance: targetData, - width: 0, height: 0, - left: 0, top: 0 - }); - }; - }; - - }, - - refreshPositions: function(fast) { - - //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change - if(this.offsetParent && this.helper) { - this.offset.parent = this._getParentOffset(); - } - - for (var i = this.items.length - 1; i >= 0; i--){ - var item = this.items[i]; - - //We ignore calculating positions of all connected containers when we're not over them - if(item.instance != this.currentContainer && this.currentContainer && item.item[0] != this.currentItem[0]) - continue; - - var t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item; - - if (!fast) { - item.width = t.outerWidth(); - item.height = t.outerHeight(); - } - - var p = t.offset(); - item.left = p.left; - item.top = p.top; - }; - - if(this.options.custom && this.options.custom.refreshContainers) { - this.options.custom.refreshContainers.call(this); - } else { - for (var i = this.containers.length - 1; i >= 0; i--){ - var p = this.containers[i].element.offset(); - this.containers[i].containerCache.left = p.left; - this.containers[i].containerCache.top = p.top; - this.containers[i].containerCache.width = this.containers[i].element.outerWidth(); - this.containers[i].containerCache.height = this.containers[i].element.outerHeight(); - }; - } - - return this; - }, - - _createPlaceholder: function(that) { - - var self = that || this, o = self.options; - - if(!o.placeholder || o.placeholder.constructor == String) { - var className = o.placeholder; - o.placeholder = { - element: function() { - - var el = $(document.createElement(self.currentItem[0].nodeName)) - .addClass(className || self.currentItem[0].className+" ui-sortable-placeholder") - .removeClass("ui-sortable-helper")[0]; - - if(!className) - el.style.visibility = "hidden"; - - return el; - }, - update: function(container, p) { - - // 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that - // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified - if(className && !o.forcePlaceholderSize) return; - - //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 - if(!p.height()) { p.height(self.currentItem.innerHeight() - parseInt(self.currentItem.css('paddingTop')||0, 10) - parseInt(self.currentItem.css('paddingBottom')||0, 10)); }; - if(!p.width()) { p.width(self.currentItem.innerWidth() - parseInt(self.currentItem.css('paddingLeft')||0, 10) - parseInt(self.currentItem.css('paddingRight')||0, 10)); }; - } - }; - } - - //Create the placeholder - self.placeholder = $(o.placeholder.element.call(self.element, self.currentItem)); - - //Append it after the actual current item - self.currentItem.after(self.placeholder); - - //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317) - o.placeholder.update(self, self.placeholder); - - }, - - _contactContainers: function(event) { - - // get innermost container that intersects with item - var innermostContainer = null, innermostIndex = null; - - - 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])) - 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])) - continue; - - innermostContainer = this.containers[i]; - innermostIndex = i; - - } else { - // container doesn't intersect. trigger "out" event if necessary - if(this.containers[i].containerCache.over) { - this.containers[i]._trigger("out", event, this._uiHash(this)); - this.containers[i].containerCache.over = 0; - } - } - - } - - // if no intersecting containers found, return - if(!innermostContainer) return; - - // move the item into the container if it's not there already - if(this.containers.length === 1) { - this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); - this.containers[innermostIndex].containerCache.over = 1; - } else if(this.currentContainer != this.containers[innermostIndex]) { - - //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; - var cur = this.containers[innermostIndex].floating ? this.items[j].item.offset().left : this.items[j].item.offset().top; - if(Math.abs(cur - base) < dist) { - dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j]; - this.direction = (cur - base > 0) ? 'down' : 'up'; - } - } - - if(!itemWithLeastDistance && !this.options.dropOnEmpty) //Check if dropOnEmpty is enabled - return; - - this.currentContainer = this.containers[innermostIndex]; - itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true); - this._trigger("change", event, this._uiHash()); - this.containers[innermostIndex]._trigger("change", event, this._uiHash(this)); - - //Update the placeholder - this.options.placeholder.update(this.currentContainer, this.placeholder); - - this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); - this.containers[innermostIndex].containerCache.over = 1; - } - - - }, - - _createHelper: function(event) { - - var o = this.options; - var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper == 'clone' ? this.currentItem.clone() : this.currentItem); - - if(!helper.parents('body').length) //Add the helper to the DOM if that didn't happen already - $(o.appendTo != 'parent' ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]); - - if(helper[0] == this.currentItem[0]) - 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") }; - - if(helper[0].style.width == '' || o.forceHelperSize) helper.width(this.currentItem.width()); - if(helper[0].style.height == '' || o.forceHelperSize) helper.height(this.currentItem.height()); - - return helper; - - }, - - _adjustOffsetFromHelper: function(obj) { - if (typeof obj == 'string') { - obj = obj.split(' '); - } - if ($.isArray(obj)) { - obj = {left: +obj[0], top: +obj[1] || 0}; - } - if ('left' in obj) { - this.offset.click.left = obj.left + this.margins.left; - } - if ('right' in obj) { - this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; - } - if ('top' in obj) { - this.offset.click.top = obj.top + this.margins.top; - } - if ('bottom' in obj) { - this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; - } - }, - - _getParentOffset: function() { - - - //Get the offsetParent and cache its position - this.offsetParent = this.helper.offsetParent(); - var po = this.offsetParent.offset(); - - // This is a special case where we need to modify a offset calculated on start, since the following happened: - // 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])) { - po.left += this.scrollParent.scrollLeft(); - po.top += this.scrollParent.scrollTop(); - } - - if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information - || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.browser.msie)) //Ugly IE fix - po = { top: 0, left: 0 }; - - return { - top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0), - left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0) - }; - - }, - - _getRelativeOffset: function() { - - if(this.cssPosition == "relative") { - var p = this.currentItem.position(); - return { - top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(), - left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft() - }; - } else { - return { top: 0, left: 0 }; - } - - }, - - _cacheMargins: function() { - this.margins = { - left: (parseInt(this.currentItem.css("marginLeft"),10) || 0), - top: (parseInt(this.currentItem.css("marginTop"),10) || 0) - }; - }, - - _cacheHelperProportions: function() { - this.helperProportions = { - width: this.helper.outerWidth(), - height: this.helper.outerHeight() - }; - }, - - _setContainment: function() { - - 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 - ]; - - if(!(/^(document|window|parent)$/).test(o.containment)) { - var ce = $(o.containment)[0]; - var co = $(o.containment).offset(); - var over = ($(ce).css("overflow") != 'hidden'); - - this.containment = [ - co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left, - co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top, - 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, - 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 - ]; - } - - }, - - _convertPositionTo: function(d, pos) { - - 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); - - return { - top: ( - pos.top // The absolute mouse position - + this.offset.relative.top * mod // Only for relative positioned nodes: Relative offset from element to offset parent - + this.offset.parent.top * mod // The offsetParent's offset without borders (offset + border) - - ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod) - ), - left: ( - pos.left // The absolute mouse position - + this.offset.relative.left * mod // Only for relative positioned nodes: Relative offset from element to offset parent - + this.offset.parent.left * mod // The offsetParent's offset without borders (offset + border) - - ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod) - ) - }; - - }, - - _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); - - // This is another very weird special case that only happens for relative elements: - // 1. If the css position is relative - // 2. and the scroll parent is the document or similar to the offset parent - // we have to refresh the relative offset during the scroll so there are no jumps - if(this.cssPosition == 'relative' && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0])) { - this.offset.relative = this._getRelativeOffset(); - } - - var pageX = event.pageX; - var pageY = event.pageY; - - /* - * - Position constraining - - * Constrain the position to a mix of grid, containment. - */ - - if(this.originalPosition) { //If we are not dragging yet, we won't check for options - - if(this.containment) { - if(event.pageX - this.offset.click.left < this.containment[0]) pageX = this.containment[0] + this.offset.click.left; - if(event.pageY - this.offset.click.top < this.containment[1]) pageY = this.containment[1] + this.offset.click.top; - if(event.pageX - this.offset.click.left > this.containment[2]) pageX = this.containment[2] + this.offset.click.left; - if(event.pageY - this.offset.click.top > this.containment[3]) pageY = this.containment[3] + this.offset.click.top; - } - - if(o.grid) { - var top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1]; - 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; - - var left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0]; - 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; - } - - } - - return { - top: ( - pageY // The absolute mouse position - - this.offset.click.top // Click offset (relative to the element) - - this.offset.relative.top // Only for relative positioned nodes: Relative offset from element to offset parent - - this.offset.parent.top // The offsetParent's offset without borders (offset + border) - + ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) )) - ), - left: ( - pageX // The absolute mouse position - - this.offset.click.left // Click offset (relative to the element) - - this.offset.relative.left // Only for relative positioned nodes: Relative offset from element to offset parent - - this.offset.parent.left // The offsetParent's offset without borders (offset + border) - + ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() )) - ) - }; - - }, - - _rearrange: function(event, i, a, hardRefresh) { - - 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)); - - //Various things done here to improve the performance: - // 1. we create a setTimeout, that calls refreshPositions - // 2. on the instance, we have a counter variable, that get's higher after every append - // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same - // 4. this lets only the last addition to the timeout stack through - this.counter = this.counter ? ++this.counter : 1; - var self = this, counter = this.counter; - - window.setTimeout(function() { - if(counter == self.counter) self.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove - },0); - - }, - - _clear: function(event, noPropagation) { - - this.reverting = false; - // We delay all events that have to be triggered to after the point where the placeholder has been removed and - // everything else normalized again - var delayedTriggers = [], self = this; - - // We first have to update the dom position of the actual currentItem - // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088) - if(!this._noFinalSort && this.currentItem.parent().length) this.placeholder.before(this.currentItem); - this._noFinalSort = null; - - if(this.helper[0] == this.currentItem[0]) { - for(var i in this._storedCSS) { - if(this._storedCSS[i] == 'auto' || this._storedCSS[i] == 'static') this._storedCSS[i] = ''; - } - this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); - } else { - this.currentItem.show(); - } - - 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 - - // Check if the items Container has Changed and trigger appropriate - // events. - if (this !== this.currentContainer) { - if(!noPropagation) { - delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); }); - delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.currentContainer)); - delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.currentContainer)); - } - } - - //Post events to containers - for (var i = this.containers.length - 1; i >= 0; i--){ - if(!noPropagation) delayedTriggers.push((function(c) { return function(event) { c._trigger("deactivate", event, this._uiHash(this)); }; }).call(this, this.containers[i])); - if(this.containers[i].containerCache.over) { - delayedTriggers.push((function(c) { return function(event) { c._trigger("out", event, this._uiHash(this)); }; }).call(this, this.containers[i])); - this.containers[i].containerCache.over = 0; - } - } - - //Do what was originally in plugins - if(this._storedCursor) $('body').css("cursor", this._storedCursor); //Reset cursor - if(this._storedOpacity) this.helper.css("opacity", this._storedOpacity); //Reset opacity - if(this._storedZIndex) this.helper.css("zIndex", this._storedZIndex == 'auto' ? '' : this._storedZIndex); //Reset z-index - - this.dragging = false; - if(this.cancelHelperRemoval) { - if(!noPropagation) { - this._trigger("beforeStop", event, this._uiHash()); - for (var i=0; i < delayedTriggers.length; i++) { delayedTriggers[i].call(this, event); }; //Trigger all delayed events - this._trigger("stop", event, this._uiHash()); - } - - this.fromOutside = false; - return false; - } - - if(!noPropagation) this._trigger("beforeStop", event, this._uiHash()); - - //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node! - this.placeholder[0].parentNode.removeChild(this.placeholder[0]); - - if(this.helper[0] != this.currentItem[0]) this.helper.remove(); this.helper = null; - - if(!noPropagation) { - for (var i=0; i < delayedTriggers.length; i++) { delayedTriggers[i].call(this, event); }; //Trigger all delayed events - this._trigger("stop", event, this._uiHash()); - } - - this.fromOutside = false; - return true; - - }, - - _trigger: function() { - if ($.Widget.prototype._trigger.apply(this, arguments) === false) { - this.cancel(); - } - }, - - _uiHash: function(inst) { - var self = inst || this; - return { - helper: self.helper, - placeholder: self.placeholder || $([]), - position: self.position, - originalPosition: self.originalPosition, - offset: self.positionAbs, - item: self.currentItem, - sender: inst ? inst.element : null - }; - } - -}); - -$.extend($.ui.sortable, { - version: "1.8.24" -}); - -})(jQuery); diff --git a/resources/jquery.ui/jquery.ui.tabs.js b/resources/jquery.ui/jquery.ui.tabs.js deleted file mode 100644 index 0c47f0e1..00000000 --- a/resources/jquery.ui/jquery.ui.tabs.js +++ /dev/null @@ -1,757 +0,0 @@ -/*! - * jQuery UI Tabs 1.8.24 - * - * Copyright 2012, 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 - * - * Depends: - * jquery.ui.core.js - * jquery.ui.widget.js - */ -(function( $, undefined ) { - -var tabId = 0, - listId = 0; - -function getNextTabId() { - return ++tabId; -} - -function getNextListId() { - return ++listId; -} - -$.widget( "ui.tabs", { - options: { - add: null, - ajaxOptions: null, - cache: false, - cookie: null, // e.g. { expires: 7, path: '/', domain: 'jquery.com', secure: true } - collapsible: false, - disable: null, - disabled: [], - enable: null, - event: "click", - fx: null, // e.g. { height: 'toggle', opacity: 'toggle', duration: 200 } - idPrefix: "ui-tabs-", - load: null, - panelTemplate: "
          ", - remove: null, - select: null, - show: null, - spinner: "Loading…", - tabTemplate: "
        • #{label}
        • " - }, - - _create: function() { - this._tabify( true ); - }, - - _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._tabify(); - } - }, - - _tabId: function( a ) { - return a.title && a.title.replace( /\s/g, "_" ).replace( /[^\w\u00c0-\uFFFF-]/g, "" ) || - this.options.idPrefix + getNextTabId(); - }, - - _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-" + getNextListId() ); - return $.cookie.apply( null, [ cookie ].concat( $.makeArray( arguments ) ) ); - }, - - _ui: function( tab, panel ) { - return { - tab: tab, - panel: panel, - 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)" ) - .each(function() { - var el = $( this ); - el.html( el.data( "label.tabs" ) ).removeData( "label.tabs" ); - }); - }, - - _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 = $( [] ); - - 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 ) ) { - href = a.hash; - a.href = href; - } - - // inline tab - if ( fragmentId.test( href ) ) { - self.panels = self.panels.add( self.element.find( self._sanitizeSelector( href ) ) ); - // remote tab - // 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( /#.*$/, "" ) ); - - 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 ); - // invalid tab href - } else { - o.disabled.push( i ); - } - }); - - // initialization from scratch - 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" ); - - // Selected tab - // use "selected" option or try to retrieve: - // 1. from fragment identifier in url - // 2. from cookie - // 3. from selected class attribute on
        • - if ( o.selected === undefined ) { - if ( location.hash ) { - this.anchors.each(function( i, a ) { - if ( a.hash == location.hash ) { - o.selected = i; - return false; - } - }); - } - 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" ) ); - } - 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; - - // 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 ); - } - - // highlight selected tab - 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.element.find( self._sanitizeSelector( self.anchors[ o.selected ].hash ) )[ 0 ] ) ); - }); - - this.load( o.selected ); - } - - // clean up to avoid memory leaks in certain versions of IE 6 - // 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" ) ); - } - - // update collapsible - // TODO: use .toggleClass() - this.element[ o.collapsible ? "addClass" : "removeClass" ]( "ui-tabs-collapsible" ); - - // set or update cookie after init and add/remove respectively - 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 && - // TODO: use .toggleClass() - !$( li ).hasClass( "ui-tabs-selected" ) ? "addClass" : "removeClass" ]( "ui-state-disabled" ); - } - - // reset cache if switching from cached to not cached - 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" ); - - 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 ); - }; - this.lis.bind( "mouseover.tabs" , function() { - addState( "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( "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 { - 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" ); - } - } - - // 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 ] ) ); - }); - } - : 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" ); - }); - } - : 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 = $(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.panels.filter( ":animated" ).length || - self._trigger( "select", null, self._ui( this, $show[ 0 ] ) ) === false ) { - this.blur(); - return false; - } - - o.selected = self.anchors.index( this ); - - self.abort(); - - // if tab may be closed - if ( o.collapsible ) { - if ( $li.hasClass( "ui-tabs-selected" ) ) { - o.selected = -1; - - if ( o.cookie ) { - self._cookie( o.selected, o.cookie ); - } - - 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 ); - } - - self.element.queue( "tabs", function() { - showTab( el, $show ); - }); - - // TODO make passing in node possible, see also http://dev.jqueryui.com/ticket/3171 - self.load( self.anchors.index( this ) ); - - this.blur(); - return false; - } - } - - 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 ); - }); - } - self.element.queue( "tabs", function() { - showTab( el, $show ); - }); - - 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 ) { - this.blur(); - } - }); - - // disable click in any case - this.anchors.bind( "click.tabs", function(){ - return false; - }); - }, - - _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.anchors.each(function() { - 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" ); - }); - }); - - 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 ); - } - - return this; - }, - - 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 ] ); - - $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 = self.element.find( "#" + 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 ); - } else { - $li.insertBefore( this.lis[ index ] ); - $panel.insertBefore( this.panels[ index ] ); - } - - o.disabled = $.map( o.disabled, function( n, i ) { - return n >= index ? ++n : n; - }); - - this._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 ] ) ); - }); - - this.load( 0 ); - } - - this._trigger( "add", null, this._ui( this.anchors[ index ], this.panels[ index ] ) ); - return this; - }, - - 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 ) ); - } - - o.disabled = $.map( - $.grep( o.disabled, function(n, i) { - return n != index; - }), - function( n, i ) { - return n >= index ? --n : n; - }); - - this._tabify(); - - this._trigger( "remove", null, this._ui( $li.find( "a" )[ 0 ], $panel[ 0 ] ) ); - return this; - }, - - enable: function( index ) { - index = this._getIndex( index ); - var o = this.options; - 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._trigger( "enable", null, this._ui( this.anchors[ index ], this.panels[ index ] ) ); - return this; - }, - - disable: function( index ) { - index = this._getIndex( index ); - var self = this, o = this.options; - // cannot disable already selected tab - if ( index != o.selected ) { - this.lis.eq( index ).addClass( "ui-state-disabled" ); - - o.disabled.push( index ); - o.disabled.sort(); - - this._trigger( "disable", null, this._ui( this.anchors[ index ], this.panels[ index ] ) ); - } - - return this; - }, - - 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" ); - return this; - }, - - 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" ); - return; - } - - // load remote from here on - this.lis.eq( index ).addClass( "ui-state-processing" ); - - if ( o.spinner ) { - var span = $( "span", a ); - span.data( "label.tabs", span.html() ).html( o.spinner ); - } - - this.xhr = $.ajax( $.extend( {}, o.ajaxOptions, { - url: url, - 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 ); - } - - self._trigger( "load", null, self._ui( self.anchors[ index ], self.panels[ index ] ) ); - try { - o.ajaxOptions.success( r, s ); - } - catch ( e ) {} - }, - error: function( xhr, s, e ) { - // take care of tab labels - self._cleanup(); - - 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 ); - } - catch ( e ) {} - } - } ) ); - - // last, so that load event is fired before show... - self.element.dequeue( "tabs" ); - - return this; - }, - - abort: function() { - // stop possibly running animations - 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 ) ); - - // terminate pending requests from other tabs - if ( this.xhr ) { - this.xhr.abort(); - delete this.xhr; - } - - // take care of tab labels - this._cleanup(); - return this; - }, - - 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: "1.8.24" -}); - -/* - * 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 ) { - 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; - } -}); - -})( jQuery ); diff --git a/resources/jquery.ui/jquery.ui.widget.js b/resources/jquery.ui/jquery.ui.widget.js deleted file mode 100644 index 66ef0133..00000000 --- a/resources/jquery.ui/jquery.ui.widget.js +++ /dev/null @@ -1,272 +0,0 @@ -/*! - * jQuery UI Widget 1.8.24 - * - * Copyright 2012, 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( $, undefined ) { - -// jQuery 1.4+ -if ( $.cleanData ) { - var _cleanData = $.cleanData; - $.cleanData = function( elems ) { - for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { - try { - $( elem ).triggerHandler( "remove" ); - // http://bugs.jquery.com/ticket/8235 - } catch( e ) {} - } - _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() { - try { - $( this ).triggerHandler( "remove" ); - // http://bugs.jquery.com/ticket/8235 - } catch( e ) {} - }); - } - } - return _remove.call( $(this), selector, keepData ); - }); - }; -} - -$.widget = function( name, base, prototype ) { - var namespace = name.split( "." )[ 0 ], - fullName; - name = name.split( "." )[ 1 ]; - fullName = namespace + "-" + name; - - if ( !prototype ) { - prototype = base; - base = $.Widget; - } - - // create selector for plugin - $.expr[ ":" ][ fullName ] = function( elem ) { - return !!$.data( elem, name ); - }; - - $[ namespace ] = $[ namespace ] || {}; - $[ namespace ][ name ] = function( options, element ) { - // allow instantiation without initializing for simple inheritance - if ( arguments.length ) { - this._createWidget( options, element ); - } - }; - - var basePrototype = new base(); - // we need to make the options hash a property directly on the new instance - // otherwise we'll modify the options hash on the prototype that we're - // inheriting from -// $.each( basePrototype, function( key, val ) { -// if ( $.isPlainObject(val) ) { -// basePrototype[ key ] = $.extend( {}, val ); -// } -// }); - basePrototype.options = $.extend( true, {}, basePrototype.options ); - $[ namespace ][ name ].prototype = $.extend( true, basePrototype, { - namespace: namespace, - widgetName: name, - widgetEventPrefix: $[ namespace ][ name ].prototype.widgetEventPrefix || name, - widgetBaseClass: fullName - }, prototype ); - - $.widget.bridge( name, $[ namespace ][ name ] ); -}; - -$.widget.bridge = function( name, object ) { - $.fn[ name ] = function( options ) { - var isMethodCall = typeof options === "string", - args = Array.prototype.slice.call( arguments, 1 ), - returnValue = this; - - // allow multiple hashes to be passed on init - options = !isMethodCall && args.length ? - $.extend.apply( null, [ true, options ].concat(args) ) : - options; - - // prevent calls to internal methods - 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; - // TODO: add this back in 1.9 and use $.error() (see #5972) -// if ( !instance ) { -// throw "cannot call methods on " + name + " prior to initialization; " + -// "attempted to call method '" + options + "'"; -// } -// if ( !$.isFunction( instance[options] ) ) { -// throw "no such method '" + options + "' for " + name + " widget instance"; -// } -// var methodValue = instance[ options ].apply( instance, args ); - if ( methodValue !== instance && methodValue !== undefined ) { - returnValue = methodValue; - return false; - } - }); - } else { - this.each(function() { - var instance = $.data( this, name ); - if ( instance ) { - instance.option( options || {} )._init(); - } else { - $.data( this, name, new object( options, this ) ); - } - }); - } - - return returnValue; - }; -}; - -$.Widget = function( options, element ) { - // allow instantiation without initializing for simple inheritance - if ( arguments.length ) { - this._createWidget( options, element ); - } -}; - -$.Widget.prototype = { - widgetName: "widget", - widgetEventPrefix: "", - options: { - disabled: false - }, - _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 - $.data( element, this.widgetName, this ); - this.element = $( element ); - this.options = $.extend( true, {}, - this.options, - this._getCreateOptions(), - options ); - - var self = this; - this.element.bind( "remove." + this.widgetName, function() { - self.destroy(); - }); - - this._create(); - this._trigger( "create" ); - this._init(); - }, - _getCreateOptions: function() { - return $.metadata && $.metadata.get( this.element[0] )[ this.widgetName ]; - }, - _create: function() {}, - _init: function() {}, - - destroy: function() { - this.element - .unbind( "." + this.widgetName ) - .removeData( this.widgetName ); - this.widget() - .unbind( "." + this.widgetName ) - .removeAttr( "aria-disabled" ) - .removeClass( - this.widgetBaseClass + "-disabled " + - "ui-state-disabled" ); - }, - - widget: function() { - return this.element; - }, - - option: function( key, value ) { - var options = key; - - if ( arguments.length === 0 ) { - // don't return a reference to the internal hash - return $.extend( {}, this.options ); - } - - if (typeof key === "string" ) { - if ( value === undefined ) { - return this.options[ key ]; - } - options = {}; - options[ key ] = value; - } - - this._setOptions( options ); - - return this; - }, - _setOptions: function( options ) { - var self = this; - $.each( options, function( key, value ) { - self._setOption( key, value ); - }); - - return this; - }, - _setOption: function( key, value ) { - this.options[ key ] = value; - - if ( key === "disabled" ) { - this.widget() - [ value ? "addClass" : "removeClass"]( - this.widgetBaseClass + "-disabled" + " " + - "ui-state-disabled" ) - .attr( "aria-disabled", value ); - } - - return this; - }, - - enable: function() { - return this._setOption( "disabled", false ); - }, - disable: function() { - return this._setOption( "disabled", true ); - }, - - _trigger: function( type, event, data ) { - var prop, orig, - callback = this.options[ type ]; - - data = data || {}; - event = $.Event( event ); - event.type = ( type === this.widgetEventPrefix ? - type : - this.widgetEventPrefix + type ).toLowerCase(); - // the original event may come from any element - // so we need to reset the target on the new event - event.target = this.element[ 0 ]; - - // copy original event properties over to the new event - orig = event.originalEvent; - if ( orig ) { - for ( prop in orig ) { - if ( !( prop in event ) ) { - event[ prop ] = orig[ prop ]; - } - } - } - - this.element.trigger( event, data ); - - return !( $.isFunction(callback) && - callback.call( this.element[0], event, data ) === false || - event.isDefaultPrevented() ); - } -}; - -})( jQuery ); diff --git a/resources/jquery.ui/themes/default/images/ui-bg_flat_0_aaaaaa_40x100.png b/resources/jquery.ui/themes/default/images/ui-bg_flat_0_aaaaaa_40x100.png deleted file mode 100644 index e425e6e4..00000000 Binary files a/resources/jquery.ui/themes/default/images/ui-bg_flat_0_aaaaaa_40x100.png and /dev/null differ diff --git a/resources/jquery.ui/themes/default/images/ui-bg_flat_75_ffffff_40x100.png b/resources/jquery.ui/themes/default/images/ui-bg_flat_75_ffffff_40x100.png deleted file mode 100644 index 72d47573..00000000 Binary files a/resources/jquery.ui/themes/default/images/ui-bg_flat_75_ffffff_40x100.png and /dev/null differ diff --git a/resources/jquery.ui/themes/default/images/ui-bg_glass_55_fbf9ee_1x400.png b/resources/jquery.ui/themes/default/images/ui-bg_glass_55_fbf9ee_1x400.png deleted file mode 100644 index 3b2914a2..00000000 Binary files a/resources/jquery.ui/themes/default/images/ui-bg_glass_55_fbf9ee_1x400.png and /dev/null differ diff --git a/resources/jquery.ui/themes/default/images/ui-bg_glass_65_ffffff_1x400.png b/resources/jquery.ui/themes/default/images/ui-bg_glass_65_ffffff_1x400.png deleted file mode 100644 index 8569c1bc..00000000 Binary files a/resources/jquery.ui/themes/default/images/ui-bg_glass_65_ffffff_1x400.png and /dev/null differ diff --git a/resources/jquery.ui/themes/default/images/ui-bg_glass_75_dadada_1x400.png b/resources/jquery.ui/themes/default/images/ui-bg_glass_75_dadada_1x400.png deleted file mode 100644 index d6cc3c58..00000000 Binary files a/resources/jquery.ui/themes/default/images/ui-bg_glass_75_dadada_1x400.png and /dev/null differ diff --git a/resources/jquery.ui/themes/default/images/ui-bg_glass_75_e6e6e6_1x400.png b/resources/jquery.ui/themes/default/images/ui-bg_glass_75_e6e6e6_1x400.png deleted file mode 100644 index 86c2baa6..00000000 Binary files a/resources/jquery.ui/themes/default/images/ui-bg_glass_75_e6e6e6_1x400.png and /dev/null differ diff --git a/resources/jquery.ui/themes/default/images/ui-bg_glass_95_fef1ec_1x400.png b/resources/jquery.ui/themes/default/images/ui-bg_glass_95_fef1ec_1x400.png deleted file mode 100644 index 4443fdc1..00000000 Binary files a/resources/jquery.ui/themes/default/images/ui-bg_glass_95_fef1ec_1x400.png and /dev/null differ diff --git a/resources/jquery.ui/themes/default/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/resources/jquery.ui/themes/default/images/ui-bg_highlight-soft_75_cccccc_1x100.png deleted file mode 100644 index 3cd467e1..00000000 Binary files a/resources/jquery.ui/themes/default/images/ui-bg_highlight-soft_75_cccccc_1x100.png and /dev/null differ diff --git a/resources/jquery.ui/themes/default/images/ui-icons_222222_256x240.png b/resources/jquery.ui/themes/default/images/ui-icons_222222_256x240.png deleted file mode 100644 index 9a9606f7..00000000 Binary files a/resources/jquery.ui/themes/default/images/ui-icons_222222_256x240.png and /dev/null differ diff --git a/resources/jquery.ui/themes/default/images/ui-icons_2e83ff_256x240.png b/resources/jquery.ui/themes/default/images/ui-icons_2e83ff_256x240.png deleted file mode 100644 index 08d26179..00000000 Binary files a/resources/jquery.ui/themes/default/images/ui-icons_2e83ff_256x240.png and /dev/null differ diff --git a/resources/jquery.ui/themes/default/images/ui-icons_454545_256x240.png b/resources/jquery.ui/themes/default/images/ui-icons_454545_256x240.png deleted file mode 100644 index 80cb644a..00000000 Binary files a/resources/jquery.ui/themes/default/images/ui-icons_454545_256x240.png and /dev/null differ diff --git a/resources/jquery.ui/themes/default/images/ui-icons_888888_256x240.png b/resources/jquery.ui/themes/default/images/ui-icons_888888_256x240.png deleted file mode 100644 index 8373712d..00000000 Binary files a/resources/jquery.ui/themes/default/images/ui-icons_888888_256x240.png and /dev/null differ diff --git a/resources/jquery.ui/themes/default/images/ui-icons_cd0a0a_256x240.png b/resources/jquery.ui/themes/default/images/ui-icons_cd0a0a_256x240.png deleted file mode 100644 index 34fc8937..00000000 Binary files a/resources/jquery.ui/themes/default/images/ui-icons_cd0a0a_256x240.png and /dev/null differ diff --git a/resources/jquery.ui/themes/default/jquery.ui.accordion.css b/resources/jquery.ui/themes/default/jquery.ui.accordion.css deleted file mode 100644 index cd8f971c..00000000 --- a/resources/jquery.ui/themes/default/jquery.ui.accordion.css +++ /dev/null @@ -1,19 +0,0 @@ -/*! - * jQuery UI Accordion 1.8.24 - * - * Copyright 2012, 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; } -.ui-accordion-icons .ui-accordion-header a { 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; } diff --git a/resources/jquery.ui/themes/default/jquery.ui.autocomplete.css b/resources/jquery.ui/themes/default/jquery.ui.autocomplete.css deleted file mode 100644 index c7eaff22..00000000 --- a/resources/jquery.ui/themes/default/jquery.ui.autocomplete.css +++ /dev/null @@ -1,53 +0,0 @@ -/*! - * jQuery UI Autocomplete 1.8.24 - * - * Copyright 2012, 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; } - -/* workarounds */ -* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ - -/* - * jQuery UI Menu 1.8.24 - * - * 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/Menu#theming - */ -.ui-menu { - list-style:none; - padding: 2px; - margin: 0; - display:block; - float: left; -} -.ui-menu .ui-menu { - margin-top: -3px; -} -.ui-menu .ui-menu-item { - margin:0; - padding: 0; - zoom: 1; - float: left; - clear: left; - width: 100%; -} -.ui-menu .ui-menu-item a { - text-decoration:none; - display:block; - padding:.2em .4em; - line-height:1.5; - zoom:1; -} -.ui-menu .ui-menu-item a.ui-state-hover, -.ui-menu .ui-menu-item a.ui-state-active { - font-weight: normal; - margin: -1px; -} diff --git a/resources/jquery.ui/themes/default/jquery.ui.button.css b/resources/jquery.ui/themes/default/jquery.ui.button.css deleted file mode 100644 index cd2dbb6e..00000000 --- a/resources/jquery.ui/themes/default/jquery.ui.button.css +++ /dev/null @@ -1,110 +0,0 @@ -/*! - * jQuery UI Button 1.8.24 - * - * Copyright 2012, 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 */ -} -/* to make room for the icon, a width needs to be set here */ -.ui-button-icon-only { - width: 2.2em; -} - -/* button elements seem to need a little more width */ -button.ui-button-icon-only { - width: 2.4em; -} -.ui-button-icons-only { - width: 3.4em; -} -button.ui-button-icons-only { - width: 3.7em; -} - -/*button text element */ -.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-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-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-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*/ -.ui-buttonset { - margin-right: 7px; -} -.ui-buttonset .ui-button { - margin-left: 0; - margin-right: -.3em; -} - -/* workarounds */ -button.ui-button::-moz-focus-inner { - border: 0; - padding: 0; /* reset extra padding in Firefox */ -} diff --git a/resources/jquery.ui/themes/default/jquery.ui.core.css b/resources/jquery.ui/themes/default/jquery.ui.core.css deleted file mode 100644 index 8b953a2b..00000000 --- a/resources/jquery.ui/themes/default/jquery.ui.core.css +++ /dev/null @@ -1,38 +0,0 @@ -/*! - * jQuery UI CSS Framework 1.8.24 - * - * Copyright 2012, 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 !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:before, .ui-helper-clearfix:after { content: ""; display: table; } -.ui-helper-clearfix:after { clear: both; } -.ui-helper-clearfix { zoom: 1; } -.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } - - -/* Interaction Cues -----------------------------------*/ -.ui-state-disabled { cursor: default !important; } - - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } - - -/* Misc visuals -----------------------------------*/ - -/* Overlays */ -.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } diff --git a/resources/jquery.ui/themes/default/jquery.ui.datepicker.css b/resources/jquery.ui/themes/default/jquery.ui.datepicker.css deleted file mode 100644 index 37d3a98e..00000000 --- a/resources/jquery.ui/themes/default/jquery.ui.datepicker.css +++ /dev/null @@ -1,66 +0,0 @@ -/*! - * jQuery UI Datepicker 1.8.24 - * - * Copyright 2012, 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; } -.ui-datepicker .ui-datepicker-prev { left:2px; } -.ui-datepicker .ui-datepicker-next { right:2px; } -.ui-datepicker .ui-datepicker-prev-hover { left:1px; } -.ui-datepicker .ui-datepicker-next-hover { right:1px; } -.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } -.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } -.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } -.ui-datepicker select.ui-datepicker-month-year {width: 100%;} -.ui-datepicker select.ui-datepicker-month, -.ui-datepicker select.ui-datepicker-year { width: 49%;} -.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } -.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } -.ui-datepicker td { border: 0; padding: 1px; } -.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } -.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } -.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } -.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } - -/* with multiple calendars */ -.ui-datepicker.ui-datepicker-multi { width:auto; } -.ui-datepicker-multi .ui-datepicker-group { float:left; } -.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } -.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } -.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } -.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } -.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } -.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } -.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } -.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; } - -/* RTL support */ -.ui-datepicker-rtl { direction: rtl; } -.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } -.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } -.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } -.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } -.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } -.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } -.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } -.ui-datepicker-rtl .ui-datepicker-group { float:right; } -.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } -.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } - -/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ -.ui-datepicker-cover { - position: absolute; /*must have*/ - z-index: -1; /*must have*/ - filter: mask(); /*must have*/ - top: -4px; /*must have*/ - left: -4px; /*must have*/ - width: 200px; /*must have*/ - height: 200px; /*must have*/ -} \ No newline at end of file diff --git a/resources/jquery.ui/themes/default/jquery.ui.dialog.css b/resources/jquery.ui/themes/default/jquery.ui.dialog.css deleted file mode 100644 index 04515f48..00000000 --- a/resources/jquery.ui/themes/default/jquery.ui.dialog.css +++ /dev/null @@ -1,21 +0,0 @@ -/*! - * jQuery UI Dialog 1.8.24 - * - * Copyright 2012, 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: .4em 1em; position: relative; } -.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 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 { 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 .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/resources/jquery.ui/themes/default/jquery.ui.progressbar.css b/resources/jquery.ui/themes/default/jquery.ui.progressbar.css deleted file mode 100644 index 90bf3081..00000000 --- a/resources/jquery.ui/themes/default/jquery.ui.progressbar.css +++ /dev/null @@ -1,11 +0,0 @@ -/*! - * jQuery UI Progressbar 1.8.24 - * - * Copyright 2012, 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; overflow: hidden; } -.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } \ No newline at end of file diff --git a/resources/jquery.ui/themes/default/jquery.ui.resizable.css b/resources/jquery.ui/themes/default/jquery.ui.resizable.css deleted file mode 100644 index d17873e7..00000000 --- a/resources/jquery.ui/themes/default/jquery.ui.resizable.css +++ /dev/null @@ -1,20 +0,0 @@ -/*! - * jQuery UI Resizable 1.8.24 - * - * Copyright 2012, 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; display: block; } -.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } -.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } -.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } -.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } -.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } -.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } -.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } -.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } -.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;} \ No newline at end of file diff --git a/resources/jquery.ui/themes/default/jquery.ui.selectable.css b/resources/jquery.ui/themes/default/jquery.ui.selectable.css deleted file mode 100644 index 9850ee7e..00000000 --- a/resources/jquery.ui/themes/default/jquery.ui.selectable.css +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * jQuery UI Selectable 1.8.24 - * - * Copyright 2012, 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/resources/jquery.ui/themes/default/jquery.ui.slider.css b/resources/jquery.ui/themes/default/jquery.ui.slider.css deleted file mode 100644 index fbfe6658..00000000 --- a/resources/jquery.ui/themes/default/jquery.ui.slider.css +++ /dev/null @@ -1,24 +0,0 @@ -/*! - * jQuery UI Slider 1.8.24 - * - * Copyright 2012, 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; } - -.ui-slider-horizontal { height: .8em; } -.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } -.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } -.ui-slider-horizontal .ui-slider-range-min { left: 0; } -.ui-slider-horizontal .ui-slider-range-max { right: 0; } - -.ui-slider-vertical { width: .8em; height: 100px; } -.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } -.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } -.ui-slider-vertical .ui-slider-range-min { bottom: 0; } -.ui-slider-vertical .ui-slider-range-max { top: 0; } \ No newline at end of file diff --git a/resources/jquery.ui/themes/default/jquery.ui.tabs.css b/resources/jquery.ui/themes/default/jquery.ui.tabs.css deleted file mode 100644 index f0bee7a2..00000000 --- a/resources/jquery.ui/themes/default/jquery.ui.tabs.css +++ /dev/null @@ -1,18 +0,0 @@ -/*! - * jQuery UI Tabs 1.8.24 - * - * Copyright 2012, 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; } -.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } -.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } -.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } -.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ -.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } -.ui-tabs .ui-tabs-hide { display: none !important; } diff --git a/resources/jquery.ui/themes/default/jquery.ui.theme.css b/resources/jquery.ui/themes/default/jquery.ui.theme.css deleted file mode 100644 index b7d2f617..00000000 --- a/resources/jquery.ui/themes/default/jquery.ui.theme.css +++ /dev/null @@ -1,247 +0,0 @@ -/*! - * jQuery UI CSS Framework 1.8.24 - * - * Copyright 2012, 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 -----------------------------------*/ -.ui-widget { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1.1em/*{fsDefault}*/; } -.ui-widget .ui-widget { font-size: 1em; } -.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1em; } -.ui-widget-content { border: 1px solid #aaaaaa/*{borderColorContent}*/; background: #ffffff/*{bgColorContent}*/ url(images/ui-bg_flat_75_ffffff_40x100.png)/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/; color: #222222/*{fcContent}*/; } -.ui-widget-content a { color: #222222/*{fcContent}*/; } -.ui-widget-header { border: 1px solid #aaaaaa/*{borderColorHeader}*/; background: #cccccc/*{bgColorHeader}*/ url(images/ui-bg_highlight-soft_75_cccccc_1x100.png)/*{bgImgUrlHeader}*/ 50%/*{bgHeaderXPos}*/ 50%/*{bgHeaderYPos}*/ repeat-x/*{bgHeaderRepeat}*/; color: #222222/*{fcHeader}*/; font-weight: bold; } -.ui-widget-header a { color: #222222/*{fcHeader}*/; } - -/* Interaction states -----------------------------------*/ -.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3/*{borderColorDefault}*/; background: #e6e6e6/*{bgColorDefault}*/ url(images/ui-bg_glass_75_e6e6e6_1x400.png)/*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #555555/*{fcDefault}*/; } -.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555/*{fcDefault}*/; text-decoration: none; } -.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999/*{borderColorHover}*/; background: #dadada/*{bgColorHover}*/ url(images/ui-bg_glass_75_dadada_1x400.png)/*{bgImgUrlHover}*/ 50%/*{bgHoverXPos}*/ 50%/*{bgHoverYPos}*/ repeat-x/*{bgHoverRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcHover}*/; } -.ui-state-hover a, .ui-state-hover a:hover { color: #212121/*{fcHover}*/; text-decoration: none; } -.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa/*{borderColorActive}*/; background: #ffffff/*{bgColorActive}*/ url(images/ui-bg_glass_65_ffffff_1x400.png)/*{bgImgUrlActive}*/ 50%/*{bgActiveXPos}*/ 50%/*{bgActiveYPos}*/ repeat-x/*{bgActiveRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcActive}*/; } -.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121/*{fcActive}*/; text-decoration: none; } -.ui-widget :active { outline: none; } - -/* Interaction Cues -----------------------------------*/ -.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1/*{borderColorHighlight}*/; background: #fbf9ee/*{bgColorHighlight}*/ url(images/ui-bg_glass_55_fbf9ee_1x400.png)/*{bgImgUrlHighlight}*/ 50%/*{bgHighlightXPos}*/ 50%/*{bgHighlightYPos}*/ repeat-x/*{bgHighlightRepeat}*/; color: #363636/*{fcHighlight}*/; } -.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636/*{fcHighlight}*/; } -.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a/*{borderColorError}*/; background: #fef1ec/*{bgColorError}*/ url(images/ui-bg_glass_95_fef1ec_1x400.png)/*{bgImgUrlError}*/ 50%/*{bgErrorXPos}*/ 50%/*{bgErrorYPos}*/ repeat-x/*{bgErrorRepeat}*/; color: #cd0a0a/*{fcError}*/; } -.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a/*{fcError}*/; } -.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a/*{fcError}*/; } -.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } -.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } -.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; } -.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; } -.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsHeader}*/; } -.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png)/*{iconsDefault}*/; } -.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsHover}*/; } -.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsActive}*/; } -.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png)/*{iconsHighlight}*/; } -.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png)/*{iconsError}*/; } - -/* positioning */ -.ui-icon-carat-1-n { background-position: 0 0; } -.ui-icon-carat-1-ne { background-position: -16px 0; } -.ui-icon-carat-1-e { background-position: -32px 0; } -.ui-icon-carat-1-se { background-position: -48px 0; } -.ui-icon-carat-1-s { background-position: -64px 0; } -.ui-icon-carat-1-sw { background-position: -80px 0; } -.ui-icon-carat-1-w { background-position: -96px 0; } -.ui-icon-carat-1-nw { background-position: -112px 0; } -.ui-icon-carat-2-n-s { background-position: -128px 0; } -.ui-icon-carat-2-e-w { background-position: -144px 0; } -.ui-icon-triangle-1-n { background-position: 0 -16px; } -.ui-icon-triangle-1-ne { background-position: -16px -16px; } -.ui-icon-triangle-1-e { background-position: -32px -16px; } -.ui-icon-triangle-1-se { background-position: -48px -16px; } -.ui-icon-triangle-1-s { background-position: -64px -16px; } -.ui-icon-triangle-1-sw { background-position: -80px -16px; } -.ui-icon-triangle-1-w { background-position: -96px -16px; } -.ui-icon-triangle-1-nw { background-position: -112px -16px; } -.ui-icon-triangle-2-n-s { background-position: -128px -16px; } -.ui-icon-triangle-2-e-w { background-position: -144px -16px; } -.ui-icon-arrow-1-n { background-position: 0 -32px; } -.ui-icon-arrow-1-ne { background-position: -16px -32px; } -.ui-icon-arrow-1-e { background-position: -32px -32px; } -.ui-icon-arrow-1-se { background-position: -48px -32px; } -.ui-icon-arrow-1-s { background-position: -64px -32px; } -.ui-icon-arrow-1-sw { background-position: -80px -32px; } -.ui-icon-arrow-1-w { background-position: -96px -32px; } -.ui-icon-arrow-1-nw { background-position: -112px -32px; } -.ui-icon-arrow-2-n-s { background-position: -128px -32px; } -.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } -.ui-icon-arrow-2-e-w { background-position: -160px -32px; } -.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } -.ui-icon-arrowstop-1-n { background-position: -192px -32px; } -.ui-icon-arrowstop-1-e { background-position: -208px -32px; } -.ui-icon-arrowstop-1-s { background-position: -224px -32px; } -.ui-icon-arrowstop-1-w { background-position: -240px -32px; } -.ui-icon-arrowthick-1-n { background-position: 0 -48px; } -.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } -.ui-icon-arrowthick-1-e { background-position: -32px -48px; } -.ui-icon-arrowthick-1-se { background-position: -48px -48px; } -.ui-icon-arrowthick-1-s { background-position: -64px -48px; } -.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } -.ui-icon-arrowthick-1-w { background-position: -96px -48px; } -.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } -.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } -.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } -.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } -.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } -.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } -.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } -.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } -.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } -.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } -.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } -.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } -.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } -.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } -.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } -.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } -.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } -.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } -.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } -.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } -.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } -.ui-icon-arrow-4 { background-position: 0 -80px; } -.ui-icon-arrow-4-diag { background-position: -16px -80px; } -.ui-icon-extlink { background-position: -32px -80px; } -.ui-icon-newwin { background-position: -48px -80px; } -.ui-icon-refresh { background-position: -64px -80px; } -.ui-icon-shuffle { background-position: -80px -80px; } -.ui-icon-transfer-e-w { background-position: -96px -80px; } -.ui-icon-transferthick-e-w { background-position: -112px -80px; } -.ui-icon-folder-collapsed { background-position: 0 -96px; } -.ui-icon-folder-open { background-position: -16px -96px; } -.ui-icon-document { background-position: -32px -96px; } -.ui-icon-document-b { background-position: -48px -96px; } -.ui-icon-note { background-position: -64px -96px; } -.ui-icon-mail-closed { background-position: -80px -96px; } -.ui-icon-mail-open { background-position: -96px -96px; } -.ui-icon-suitcase { background-position: -112px -96px; } -.ui-icon-comment { background-position: -128px -96px; } -.ui-icon-person { background-position: -144px -96px; } -.ui-icon-print { background-position: -160px -96px; } -.ui-icon-trash { background-position: -176px -96px; } -.ui-icon-locked { background-position: -192px -96px; } -.ui-icon-unlocked { background-position: -208px -96px; } -.ui-icon-bookmark { background-position: -224px -96px; } -.ui-icon-tag { background-position: -240px -96px; } -.ui-icon-home { background-position: 0 -112px; } -.ui-icon-flag { background-position: -16px -112px; } -.ui-icon-calendar { background-position: -32px -112px; } -.ui-icon-cart { background-position: -48px -112px; } -.ui-icon-pencil { background-position: -64px -112px; } -.ui-icon-clock { background-position: -80px -112px; } -.ui-icon-disk { background-position: -96px -112px; } -.ui-icon-calculator { background-position: -112px -112px; } -.ui-icon-zoomin { background-position: -128px -112px; } -.ui-icon-zoomout { background-position: -144px -112px; } -.ui-icon-search { background-position: -160px -112px; } -.ui-icon-wrench { background-position: -176px -112px; } -.ui-icon-gear { background-position: -192px -112px; } -.ui-icon-heart { background-position: -208px -112px; } -.ui-icon-star { background-position: -224px -112px; } -.ui-icon-link { background-position: -240px -112px; } -.ui-icon-cancel { background-position: 0 -128px; } -.ui-icon-plus { background-position: -16px -128px; } -.ui-icon-plusthick { background-position: -32px -128px; } -.ui-icon-minus { background-position: -48px -128px; } -.ui-icon-minusthick { background-position: -64px -128px; } -.ui-icon-close { background-position: -80px -128px; } -.ui-icon-closethick { background-position: -96px -128px; } -.ui-icon-key { background-position: -112px -128px; } -.ui-icon-lightbulb { background-position: -128px -128px; } -.ui-icon-scissors { background-position: -144px -128px; } -.ui-icon-clipboard { background-position: -160px -128px; } -.ui-icon-copy { background-position: -176px -128px; } -.ui-icon-contact { background-position: -192px -128px; } -.ui-icon-image { background-position: -208px -128px; } -.ui-icon-video { background-position: -224px -128px; } -.ui-icon-script { background-position: -240px -128px; } -.ui-icon-alert { background-position: 0 -144px; } -.ui-icon-info { background-position: -16px -144px; } -.ui-icon-notice { background-position: -32px -144px; } -.ui-icon-help { background-position: -48px -144px; } -.ui-icon-check { background-position: -64px -144px; } -.ui-icon-bullet { background-position: -80px -144px; } -.ui-icon-radio-off { background-position: -96px -144px; } -.ui-icon-radio-on { background-position: -112px -144px; } -.ui-icon-pin-w { background-position: -128px -144px; } -.ui-icon-pin-s { background-position: -144px -144px; } -.ui-icon-play { background-position: 0 -160px; } -.ui-icon-pause { background-position: -16px -160px; } -.ui-icon-seek-next { background-position: -32px -160px; } -.ui-icon-seek-prev { background-position: -48px -160px; } -.ui-icon-seek-end { background-position: -64px -160px; } -.ui-icon-seek-start { background-position: -80px -160px; } -/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ -.ui-icon-seek-first { background-position: -80px -160px; } -.ui-icon-stop { background-position: -96px -160px; } -.ui-icon-eject { background-position: -112px -160px; } -.ui-icon-volume-off { background-position: -128px -160px; } -.ui-icon-volume-on { background-position: -144px -160px; } -.ui-icon-power { background-position: 0 -176px; } -.ui-icon-signal-diag { background-position: -16px -176px; } -.ui-icon-signal { background-position: -32px -176px; } -.ui-icon-battery-0 { background-position: -48px -176px; } -.ui-icon-battery-1 { background-position: -64px -176px; } -.ui-icon-battery-2 { background-position: -80px -176px; } -.ui-icon-battery-3 { background-position: -96px -176px; } -.ui-icon-circle-plus { background-position: 0 -192px; } -.ui-icon-circle-minus { background-position: -16px -192px; } -.ui-icon-circle-close { background-position: -32px -192px; } -.ui-icon-circle-triangle-e { background-position: -48px -192px; } -.ui-icon-circle-triangle-s { background-position: -64px -192px; } -.ui-icon-circle-triangle-w { background-position: -80px -192px; } -.ui-icon-circle-triangle-n { background-position: -96px -192px; } -.ui-icon-circle-arrow-e { background-position: -112px -192px; } -.ui-icon-circle-arrow-s { background-position: -128px -192px; } -.ui-icon-circle-arrow-w { background-position: -144px -192px; } -.ui-icon-circle-arrow-n { background-position: -160px -192px; } -.ui-icon-circle-zoomin { background-position: -176px -192px; } -.ui-icon-circle-zoomout { background-position: -192px -192px; } -.ui-icon-circle-check { background-position: -208px -192px; } -.ui-icon-circlesmall-plus { background-position: 0 -208px; } -.ui-icon-circlesmall-minus { background-position: -16px -208px; } -.ui-icon-circlesmall-close { background-position: -32px -208px; } -.ui-icon-squaresmall-plus { background-position: -48px -208px; } -.ui-icon-squaresmall-minus { background-position: -64px -208px; } -.ui-icon-squaresmall-close { background-position: -80px -208px; } -.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } -.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } -.ui-icon-grip-solid-vertical { background-position: -32px -224px; } -.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } -.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } -.ui-icon-grip-diagonal-se { background-position: -80px -224px; } - - -/* Misc visuals -----------------------------------*/ - -/* Corner radius */ -.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; -khtml-border-top-left-radius: 4px/*{cornerRadius}*/; border-top-left-radius: 4px/*{cornerRadius}*/; } -.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; -khtml-border-top-right-radius: 4px/*{cornerRadius}*/; border-top-right-radius: 4px/*{cornerRadius}*/; } -.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; -khtml-border-bottom-left-radius: 4px/*{cornerRadius}*/; border-bottom-left-radius: 4px/*{cornerRadius}*/; } -.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; -khtml-border-bottom-right-radius: 4px/*{cornerRadius}*/; border-bottom-right-radius: 4px/*{cornerRadius}*/; } - -/* Overlays */ -.ui-widget-overlay { background: #aaaaaa/*{bgColorOverlay}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlOverlay}*/ 50%/*{bgOverlayXPos}*/ 50%/*{bgOverlayYPos}*/ repeat-x/*{bgOverlayRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityOverlay}*/; } -.ui-widget-shadow { margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/; padding: 8px/*{thicknessShadow}*/; background: #aaaaaa/*{bgColorShadow}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlShadow}*/ 50%/*{bgShadowXPos}*/ 50%/*{bgShadowYPos}*/ repeat-x/*{bgShadowRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityShadow}*/; -moz-border-radius: 8px/*{cornerRadiusShadow}*/; -khtml-border-radius: 8px/*{cornerRadiusShadow}*/; -webkit-border-radius: 8px/*{cornerRadiusShadow}*/; border-radius: 8px/*{cornerRadiusShadow}*/; } \ No newline at end of file diff --git a/resources/jquery.ui/themes/vector/images/close.png b/resources/jquery.ui/themes/vector/images/close.png deleted file mode 100644 index ef0dd9e3..00000000 Binary files a/resources/jquery.ui/themes/vector/images/close.png and /dev/null differ diff --git a/resources/jquery.ui/themes/vector/images/titlebar-fade.png b/resources/jquery.ui/themes/vector/images/titlebar-fade.png deleted file mode 100644 index 12a80c88..00000000 Binary files a/resources/jquery.ui/themes/vector/images/titlebar-fade.png and /dev/null differ diff --git a/resources/jquery.ui/themes/vector/images/ui-anim_basic_16x16.gif b/resources/jquery.ui/themes/vector/images/ui-anim_basic_16x16.gif deleted file mode 100644 index 085ccaec..00000000 Binary files a/resources/jquery.ui/themes/vector/images/ui-anim_basic_16x16.gif and /dev/null differ diff --git a/resources/jquery.ui/themes/vector/images/ui-bg_flat_15_cd0a0a_40x100.png b/resources/jquery.ui/themes/vector/images/ui-bg_flat_15_cd0a0a_40x100.png deleted file mode 100644 index 09de537f..00000000 Binary files a/resources/jquery.ui/themes/vector/images/ui-bg_flat_15_cd0a0a_40x100.png and /dev/null differ diff --git a/resources/jquery.ui/themes/vector/images/ui-bg_flat_70_000000_40x100.png b/resources/jquery.ui/themes/vector/images/ui-bg_flat_70_000000_40x100.png deleted file mode 100644 index c06dd561..00000000 Binary files a/resources/jquery.ui/themes/vector/images/ui-bg_flat_70_000000_40x100.png and /dev/null differ diff --git a/resources/jquery.ui/themes/vector/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png b/resources/jquery.ui/themes/vector/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png deleted file mode 100644 index 5308b466..00000000 Binary files a/resources/jquery.ui/themes/vector/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png and /dev/null differ diff --git a/resources/jquery.ui/themes/vector/images/ui-bg_highlight-hard_80_d7ebf9_1x100.png b/resources/jquery.ui/themes/vector/images/ui-bg_highlight-hard_80_d7ebf9_1x100.png deleted file mode 100644 index 0c8997f7..00000000 Binary files a/resources/jquery.ui/themes/vector/images/ui-bg_highlight-hard_80_d7ebf9_1x100.png and /dev/null differ diff --git a/resources/jquery.ui/themes/vector/images/ui-bg_highlight-soft_100_e4f1fb_1x100.png b/resources/jquery.ui/themes/vector/images/ui-bg_highlight-soft_100_e4f1fb_1x100.png deleted file mode 100644 index 31492556..00000000 Binary files a/resources/jquery.ui/themes/vector/images/ui-bg_highlight-soft_100_e4f1fb_1x100.png and /dev/null differ diff --git a/resources/jquery.ui/themes/vector/images/ui-bg_highlight-soft_100_ffffff_1x100.png b/resources/jquery.ui/themes/vector/images/ui-bg_highlight-soft_100_ffffff_1x100.png deleted file mode 100644 index 09b23761..00000000 Binary files a/resources/jquery.ui/themes/vector/images/ui-bg_highlight-soft_100_ffffff_1x100.png and /dev/null differ diff --git a/resources/jquery.ui/themes/vector/images/ui-bg_highlight-soft_25_ffef8f_1x100.png b/resources/jquery.ui/themes/vector/images/ui-bg_highlight-soft_25_ffef8f_1x100.png deleted file mode 100644 index 66627c18..00000000 Binary files a/resources/jquery.ui/themes/vector/images/ui-bg_highlight-soft_25_ffef8f_1x100.png and /dev/null differ diff --git a/resources/jquery.ui/themes/vector/images/ui-bg_inset-hard_100_f0f0f0_1x100.png b/resources/jquery.ui/themes/vector/images/ui-bg_inset-hard_100_f0f0f0_1x100.png deleted file mode 100644 index ccb6dc06..00000000 Binary files a/resources/jquery.ui/themes/vector/images/ui-bg_inset-hard_100_f0f0f0_1x100.png and /dev/null differ diff --git a/resources/jquery.ui/themes/vector/images/ui-icons_2694e8_256x240.png b/resources/jquery.ui/themes/vector/images/ui-icons_2694e8_256x240.png deleted file mode 100644 index 998ac3bc..00000000 Binary files a/resources/jquery.ui/themes/vector/images/ui-icons_2694e8_256x240.png and /dev/null differ diff --git a/resources/jquery.ui/themes/vector/images/ui-icons_2e83ff_256x240.png b/resources/jquery.ui/themes/vector/images/ui-icons_2e83ff_256x240.png deleted file mode 100644 index 34e38d11..00000000 Binary files a/resources/jquery.ui/themes/vector/images/ui-icons_2e83ff_256x240.png and /dev/null differ diff --git a/resources/jquery.ui/themes/vector/images/ui-icons_3d80b3_256x240.png b/resources/jquery.ui/themes/vector/images/ui-icons_3d80b3_256x240.png deleted file mode 100644 index ec129a8b..00000000 Binary files a/resources/jquery.ui/themes/vector/images/ui-icons_3d80b3_256x240.png and /dev/null differ diff --git a/resources/jquery.ui/themes/vector/images/ui-icons_666666_256x240.png b/resources/jquery.ui/themes/vector/images/ui-icons_666666_256x240.png deleted file mode 100644 index a32c57d8..00000000 Binary files a/resources/jquery.ui/themes/vector/images/ui-icons_666666_256x240.png and /dev/null differ diff --git a/resources/jquery.ui/themes/vector/images/ui-icons_72a7cf_256x240.png b/resources/jquery.ui/themes/vector/images/ui-icons_72a7cf_256x240.png deleted file mode 100644 index 88fad1a5..00000000 Binary files a/resources/jquery.ui/themes/vector/images/ui-icons_72a7cf_256x240.png and /dev/null differ diff --git a/resources/jquery.ui/themes/vector/images/ui-icons_ffffff_256x240.png b/resources/jquery.ui/themes/vector/images/ui-icons_ffffff_256x240.png deleted file mode 100644 index 29ba7d28..00000000 Binary files a/resources/jquery.ui/themes/vector/images/ui-icons_ffffff_256x240.png and /dev/null differ diff --git a/resources/jquery.ui/themes/vector/jquery.ui.accordion.css b/resources/jquery.ui/themes/vector/jquery.ui.accordion.css deleted file mode 100644 index 8d8a1a6e..00000000 --- a/resources/jquery.ui/themes/vector/jquery.ui.accordion.css +++ /dev/null @@ -1,12 +0,0 @@ -/* Accordion -----------------------------------*/ -.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-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 diff --git a/resources/jquery.ui/themes/vector/jquery.ui.autocomplete.css b/resources/jquery.ui/themes/vector/jquery.ui.autocomplete.css deleted file mode 100644 index c06fd18a..00000000 --- a/resources/jquery.ui/themes/vector/jquery.ui.autocomplete.css +++ /dev/null @@ -1,40 +0,0 @@ -/* Autocomplete -----------------------------------*/ -.ui-autocomplete { position: absolute; cursor: default; } -.ui-autocomplete-loading { /* @embed */ 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 */ - -/* Menu -----------------------------------*/ -.ui-menu { - list-style:none; - padding: 2px; - margin: 0; - display:block; - float: left; -} -.ui-menu .ui-menu { - margin-top: -3px; -} -.ui-menu .ui-menu-item { - margin:0; - padding: 0; - zoom: 1; - float: left; - clear: left; - width: 100%; -} -.ui-menu .ui-menu-item a { - text-decoration:none; - display:block; - padding:.2em .4em; - line-height:1.5; - zoom:1; -} -.ui-menu .ui-menu-item a.ui-state-hover, -.ui-menu .ui-menu-item a.ui-state-active { - font-weight: normal; - margin: -1px; -} diff --git a/resources/jquery.ui/themes/vector/jquery.ui.button.css b/resources/jquery.ui/themes/vector/jquery.ui.button.css deleted file mode 100644 index ea14723f..00000000 --- a/resources/jquery.ui/themes/vector/jquery.ui.button.css +++ /dev/null @@ -1,379 +0,0 @@ -/* Button -----------------------------------*/ - -.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 */ -} - -/*button text element */ -.ui-button .ui-button-text { - display: block; - line-height: 1.4; - text-shadow: 0 1px 1px #fff; -} -.ui-button-text-only .ui-button-text { - padding: 0.3em 1em 0.25em 1em; -} -.ui-button-icon-only .ui-button-text, -.ui-button-icons-only .ui-button-text { - padding: 0.3em; - text-indent: -9999999px; -} -.ui-button-text-icon-primary .ui-button-text, -.ui-button-text-icons .ui-button-text { - padding: 0.3em 1em 0.25em 2.1em; -} -.ui-button-text-icon-secondary .ui-button-text, -.ui-button-text-icons .ui-button-text { - padding: 0.3em 2.1em 0.25em 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: 0.3em 1em; -} - -/*button icon element(s) */ -.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-text-icon .ui-icon, -.ui-button-icons-only .ui-icon { - position: absolute; - top: 50%; - margin-top: -9px; -} -.ui-button-icon-only .ui-icon { - left: 50%; - margin-left: -8px; -} -.ui-button-text-icon-primary .ui-button-icon-primary, -.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: 0.5em; -} -.ui-button-text-icon-secondary .ui-button-icon-secondary, -.ui-button-text-icon .ui-button-icon-secondary, -.ui-button-text-icons .ui-button-icon-secondary, -.ui-button-icons-only .ui-button-icon-secondary { - right: 0.5em; -} - -/*button sets*/ -.ui-buttonset { - margin-right: 7px; -} -.ui-buttonset .ui-button { - margin-left: 0; - margin-right: -.4em; -} - -/* workarounds */ -button.ui-button::-moz-focus-inner { - border: 0; - padding: 0; /* reset extra padding in Firefox */ -} -/* Disables the annoying dashed border Firefox puts on active buttons */ -body button.ui-button::-moz-focus-inner { - border: 0; -} -/* Give large buttons some extra padding */ -body .ui-button-large { - padding: 5px; -} -/* Use white icons for colored buttons */ -.ui-button-green .ui-icon, -.ui-button-blue .ui-icon, -.ui-button-red .ui-icon, -.ui-button-orange .ui-icon { - /* @embed */ - background-image: url(images/ui-icons_ffffff_256x240.png) !important; -} - -/* Corner radius */ -/* This is normally handled in jquery.ui.theme.css, but in our case, the corner - styling of our buttons doesn't match our default widget corner styling */ -.ui-button.ui-corner-all, -.ui-button.ui-corner-top, -.ui-button.ui-corner-left, -.ui-button.ui-corner-tl { - -moz-border-radius-topleft: 4px; - -webkit-border-top-left-radius: 4px; - border-top-left-radius: 4px; -} -.ui-button.ui-corner-all, -.ui-button.ui-corner-top, - -.ui-button.ui-corner-right, -.ui-button.ui-corner-tr { - -moz-border-radius-topright: 4px; - -webkit-border-top-right-radius: 4px; - border-top-right-radius: 4px; -} -.ui-button.ui-corner-all, -.ui-button.ui-corner-bottom, -.ui-button.ui-corner-left, -.ui-button.ui-corner-bl { - -moz-border-radius-bottomleft: 4px; - -webkit-border-bottom-left-radius: 4px; - border-bottom-left-radius: 4px; -} -.ui-button.ui-corner-all, -.ui-button.ui-corner-bottom, -.ui-button.ui-corner-right, -.ui-button.ui-corner-br { - -moz-border-radius-bottomright: 4px; - -webkit-border-bottom-right-radius: 4px; - border-bottom-right-radius: 4px; -} - -body .ui-button { - color: #2779aa; - margin: 0.5em 0 0.5em 0.4em; - border: 1px solid #aaa !important; - background: #f0f0f0 !important; - background: -moz-linear-gradient(top, #fff 0%, #ddd 90%) !important; /* FF3.6+ */ - background: -webkit-linear-gradient(top, #fff 0%, #ddd 90%) !important; /* Chrome10+, Safari5.1+ */ - background: -o-linear-gradient(top, #fff 0%, #ddd 90%) !important; /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #fff 0%, #ddd 90%) !important; /* IE10+ */ - background: linear-gradient(to bottom, #fff 0%, #ddd 90%) !important; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#dddddd', GradientType=0); /* IE6-8 */ - cursor: pointer; - font-size: 1em; - line-height: 1.4em; - width: auto; - overflow: visible; - -webkit-box-shadow: 0 1px 3px rgba(0,0,0,.2); - -moz-box-shadow: 0 1px 3px rgba(0,0,0,.2); - box-shadow: 0 1px 3px rgba(0,0,0,.2); -} - -body .ui-button-icon-only { - width: 2.2em; -} - -body .ui-button-icons-only { - width: 3.4em; -} - -body .ui-button:hover { - color: #2779aa; - border-color: #bbb !important; - background: #fff !important; - background: -moz-linear-gradient(top, #fff 0%, #eee 90%) !important; /* FF3.6+ */ - background: -webkit-linear-gradient(top, #fff 0%, #eee 90%) !important; /* Chrome10+, Safari5.1+ */ - background: -o-linear-gradient(top, #fff 0%, #eee 90%) !important; /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #fff 0%, #eee 90%) !important; /* IE10+ */ - background: linear-gradient(to bottom, #fff 0%, #eee 90%) !important; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0); /* IE6-8 */ - -webkit-box-shadow: 0 1px 3px rgba(0,0,0,.1); - -moz-box-shadow: 0 1px 3px rgba(0,0,0,.1); - box-shadow: 0 1px 3px rgba(0,0,0,.1); -} -body .ui-button:active, -body .ui-button:focus { - border-color: #8ad !important; - -webkit-box-shadow: 0 0 1px 1px rgba(167,215,249,.5); - -moz-box-shadow: 0 0 1px 1px rgba(167,215,249,.5); - box-shadow: 0 0 1px 1px rgba(167,215,249,.5); -} -body .ui-button:active { - background: #e0e0e0 !important; - background: -moz-linear-gradient(top, #f0f0f0 0%, #d0d0d0 90%) !important; /* FF3.6+ */ - background: -webkit-linear-gradient(top, #f0f0f0 0%, #d0d0d0 90%) !important; /* Chrome10+, Safari5.1+ */ - background: -o-linear-gradient(top, #f0f0f0 0%, #d0d0d0 90%) !important; /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #f0f0f0 0%, #d0d0d0 90%) !important; /* IE10+ */ - background: linear-gradient(to bottom, #f0f0f0 0%, #d0d0d0 90%) !important; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f0f0f0', endColorstr='#d0d0d0', GradientType=0); /* IE6-8 */ -} - -/* Green buttons */ -body .ui-button-green, -body .ui-button-green .ui-button-text { - color: white; - text-shadow: 0 -1px 1px #072; -} -body .ui-button.ui-button-green { - border-color: #294 !important; - background: #295 !important; - background: -moz-linear-gradient(top, #3c8 0%, #295 90%) !important; /* FF3.6+ */ - background: -webkit-linear-gradient(top, #3c8 0%, #295 90%) !important; /* Chrome10+, Safari5.1+ */ - background: -o-linear-gradient(top, #3c8 0%, #295 90%) !important; /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #3c8 0%, #295 90%) !important; /* IE10+ */ - background: linear-gradient(to bottom, #3c8 0%, #295 90%) !important; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33cc88', endColorstr='#229955', GradientType=0); /* IE6-8 */ - -webkit-box-shadow: 0 1px 3px rgba(0,0,0,.3); - -moz-box-shadow: 0 1px 3px rgba(0,0,0,.3); - box-shadow: 0 1px 3px rgba(0,0,0,.3); -} -body .ui-button.ui-button-green:hover { - background: #33a055 !important; - background: -moz-linear-gradient(top, #44d388 0%, #33a055 90%) !important; /* FF3.6+ */ - background: -webkit-linear-gradient(top, #44d388 0%, #33a055 90%) !important; /* Chrome10+, Safari5.1+ */ - background: -o-linear-gradient(top, #44d388 0%, #33a055 90%) !important; /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #44d388 0%, #33a055 90%) !important; /* IE10+ */ - background: linear-gradient(to bottom, #44d388 0%, #33a055 90%) !important; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#44d388', endColorstr='#33a055', GradientType=0); /* IE6-8 */ - -webkit-box-shadow: 0 1px 3px rgba(0,0,0,.25); - -moz-box-shadow: 0 1px 3px rgba(0,0,0,.25); - box-shadow: 0 1px 3px rgba(0,0,0,.25); -} -body .ui-button.ui-button-green:active, -body .ui-button.ui-button-green:focus { - border-color: #172 !important; - -webkit-box-shadow: 0 0 2px 2px rgba(167,215,249,.75); - -moz-box-shadow: 0 0 2px 2px rgba(167,215,249,.75); - box-shadow: 0 0 2px 2px rgba(167,215,249,.75); -} -body .ui-button.ui-button-green:active { - background: #338855 !important; - background: -moz-linear-gradient(top, #30c080 0%, #338855 90%) !important; /* FF3.6+ */ - background: -webkit-linear-gradient(top, #30c080 0%, #338855 90%) !important; /* Chrome10+, Safari5.1+ */ - background: -o-linear-gradient(top, #30c080 0%, #338855 90%) !important; /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #30c080 0%, #338855 90%) !important; /* IE10+ */ - background: linear-gradient(to bottom, #30c080 0%, #338855 90%) !important; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#30c080', endColorstr='#338855', GradientType=0); /* IE6-8 */ -} - -/* Blue buttons */ -body .ui-button-blue, -body .ui-button-blue .ui-button-text { - color: white; - text-shadow: 0 -1px 1px #037; -} -body .ui-button.ui-button-blue { - border-color: #468 !important; - background: #36b !important; - background: -moz-linear-gradient(top, #48e 0%, #36b 90%) !important; /* FF3.6+ */ - background: -webkit-linear-gradient(top, #48e 0%, #36b 90%) !important; /* Chrome10+, Safari5.1+ */ - background: -o-linear-gradient(top, #48e 0%, #36b 90%) !important; /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #48e 0%, #36b 90%) !important; /* IE10+ */ - background: linear-gradient(to bottom, #48e 0%, #36b 90%) !important; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#4488ee', endColorstr='#3366bb', GradientType=0); /* IE6-8 */ - -webkit-box-shadow: 0 1px 3px rgba(0,0,0,.35); - -moz-box-shadow: 0 1px 3px rgba(0,0,0,.35); - box-shadow: 0 1px 3px rgba(0,0,0,.35); -} -body .ui-button.ui-button-blue:hover { - background: #36c !important; - background: -moz-linear-gradient(top, #59e 0%, #36c 90%) !important; /* FF3.6+ */ - background: -webkit-linear-gradient(top, #59e 0%, #36c 90%) !important; /* Chrome10+, Safari5.1+ */ - background: -o-linear-gradient(top, #59e 0%, #36c 90%) !important; /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #59e 0%, #36c 90%) !important; /* IE10+ */ - background: linear-gradient(to bottom, #59e 0%, #36c 90%) !important; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5599ee', endColorstr='#3366cc', GradientType=0); /* IE6-8 */ -} -body .ui-button.ui-button-blue:active, -body .ui-button.ui-button-blue:focus { - border-color: #357 !important; - -webkit-box-shadow: 0 0 2px 2px rgba(167,215,249,.75); - -moz-box-shadow: 0 0 2px 2px rgba(167,215,249,.75); - box-shadow: 0 0 2px 2px rgba(167,215,249,.75); -} -body .ui-button.ui-button-blue:active { - background: #3060a0 !important; - background: -moz-linear-gradient(top, #4080e0 0%, #3060a0 90%) !important; /* FF3.6+ */ - background: -webkit-linear-gradient(top, #4080e0 0%, #3060a0 90%) !important; /* Chrome10+, Safari5.1+ */ - background: -o-linear-gradient(top, #4080e0 0%, #3060a0 90%) !important; /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #4080e0 0%, #3060a0 90%) !important; /* IE10+ */ - background: linear-gradient(to bottom, #4080e0 0%, #3060a0 90%) !important; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#4080e0', endColorstr='#3060a0', GradientType=0); /* IE6-8 */ -} - -/* Red buttons */ -body .ui-button-red, -body .ui-button-red .ui-button-text { - color: white; - text-shadow: 0 -1px 1px #700; -} -body .ui-button.ui-button-red { - border-color: #944 !important; - background: #a22 !important; - background: -moz-linear-gradient(top, #d44 0%, #a22 90%) !important; /* FF3.6+ */ - background: -webkit-linear-gradient(top, #d44 0%, #a22 90%) !important; /* Chrome10+, Safari5.1+ */ - background: -o-linear-gradient(top, #d44 0%, #a22 90%) !important; /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #d44 0%, #a22 90%) !important; /* IE10+ */ - background: linear-gradient(to bottom, #d44 0%, #a22 90%) !important; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#dd4444', endColorstr='#aa2222', GradientType=0); /* IE6-8 */ - -webkit-box-shadow: 0 1px 3px rgba(0,0,0,.35); - -moz-box-shadow: 0 1px 3px rgba(0,0,0,.35); - box-shadow: 0 1px 3px rgba(0,0,0,.35); -} -body .ui-button.ui-button-red:hover { - border-color: #a44 !important; - background: #b03333 !important; - background: -moz-linear-gradient(top, #ee4646 0%, #b03333 90%) !important; /* FF3.6+ */ - background: -webkit-linear-gradient(top, #ee4646 0%, #b03333 90%) !important; /* Chrome10+, Safari5.1+ */ - background: -o-linear-gradient(top, #ee4646 0%, #b03333 90%) !important; /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #ee4646 0%, #b03333 90%) !important; /* IE10+ */ - background: linear-gradient(to bottom, #ee4646 0%, #b03333 90%) !important; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee4646', endColorstr='#b03333', GradientType=0); /* IE6-8 */ - -webkit-box-shadow: 0 1px 3px rgba(0,0,0,.3); - -moz-box-shadow: 0 1px 3px rgba(0,0,0,.3); - box-shadow: 0 1px 3px rgba(0,0,0,.3); -} -body .ui-button.ui-button-red:active, -body .ui-button.ui-button-red:focus { - border-color: #747 !important; - -webkit-box-shadow: 0 0 2px 2px rgba(167,215,249,.7); - -moz-box-shadow: 0 0 2px 2px rgba(167,215,249,.7); - box-shadow: 0 0 2px 2px rgba(167,215,249,.7); -} -body .ui-button.ui-button-red:active { - background: #952020 !important; - background: -moz-linear-gradient(top, #d04545 0%, #952020 90%) !important; /* FF3.6+ */ - background: -webkit-linear-gradient(top, #d04545 0%, #952020 90%) !important; /* Chrome10+, Safari5.1+ */ - background: -o-linear-gradient(top, #d04545 0%, #952020 90%) !important; /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #d04545 0%, #952020 90%) !important; /* IE10+ */ - background: linear-gradient(to bottom, #d04545 0%, #952020 90%) !important; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#d04545', endColorstr='#952020', GradientType=0); /* IE6-8 */ -} - -/* Disabled buttons */ -body .ui-button-green.disabled, -body .ui-button-green.disabled:hover, -body .ui-button-green.disabled:active, -body .ui-button-green.disabled:focus, -body .ui-button-blue.disabled, -body .ui-button-blue.disabled:hover, -body .ui-button-blue.disabled:active, -body .ui-button-blue.disabled:focus, -body .ui-button-red.disabled, -body .ui-button-red.disabled:hover, -body .ui-button-red.disabled:active, -body .ui-button-red.disabled:focus, -body .ui-button.disabled, -body .ui-button.disabled:hover { - color: #aaa; - border-color: #ccc !important; - background: #eee !important; - background: -moz-linear-gradient(top, #f6f6f6 0%, #eee 90%) !important; /* FF3.6+ */ - background: -webkit-linear-gradient(top, #f6f6f6 0%, #eee 90%) !important; /* Chrome10+, Safari5.1+ */ - background: -o-linear-gradient(top, #f6f6f6 0%, #eee 90%) !important; /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #f6f6f6 0%, #eee 90%) !important; /* IE10+ */ - background: linear-gradient(to bottom, #f6f6f6 0%, #eee 90%) !important; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f6f6f6', endColorstr='#eeeeee', GradientType=0); /* IE6-8 */ - -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0); - -moz-box-shadow: 0 1px 3px rgba(0,0,0,0); - box-shadow: 0 1px 3px rgba(0,0,0,0); -} -body .ui-button-green.disabled .ui-button-text, -body .ui-button-blue.disabled .ui-button-text, -body .ui-button-red.disabled .ui-button-text { - color: #aaa; - text-shadow: 0 1px 1px #fff; -} diff --git a/resources/jquery.ui/themes/vector/jquery.ui.core.css b/resources/jquery.ui/themes/vector/jquery.ui.core.css deleted file mode 100644 index b3e81930..00000000 --- a/resources/jquery.ui/themes/vector/jquery.ui.core.css +++ /dev/null @@ -1,37 +0,0 @@ -/* -* 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. -*/ - -/* Layout helpers -----------------------------------*/ -.ui-helper-hidden { display: none; } -.ui-helper-hidden-accessible { position: absolute; left: -99999999px; } -.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; } -/* required comment for clearfix to work in Opera \*/ -* html .ui-helper-clearfix { height:1%; } -.ui-helper-clearfix { display:block; } -/* end clearfix */ -.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } - - -/* Interaction Cues -----------------------------------*/ -.ui-state-disabled { cursor: default !important; } - - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } - - -/* Misc visuals -----------------------------------*/ - -/* Overlays */ -.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } diff --git a/resources/jquery.ui/themes/vector/jquery.ui.datepicker.css b/resources/jquery.ui/themes/vector/jquery.ui.datepicker.css deleted file mode 100644 index 871bf690..00000000 --- a/resources/jquery.ui/themes/vector/jquery.ui.datepicker.css +++ /dev/null @@ -1,61 +0,0 @@ -/* Datepicker -----------------------------------*/ -.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; } -.ui-datepicker .ui-datepicker-prev { left:2px; } -.ui-datepicker .ui-datepicker-next { right:2px; } -.ui-datepicker .ui-datepicker-prev-hover { left:1px; } -.ui-datepicker .ui-datepicker-next-hover { right:1px; } -.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } -.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } -.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; padding:1px 0; } -.ui-datepicker select.ui-datepicker-month-year {width: 100%;} -.ui-datepicker select.ui-datepicker-month, -.ui-datepicker select.ui-datepicker-year { width: 49%;} -.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } -.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } -.ui-datepicker td { border: 0; padding: 1px; } -.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } -.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .2em 0 0 0; padding: 0 .2em; border-top: 1px solid #DDDDDD; border-left: 0; border-right: 0; border-bottom: 0; } -.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } -.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } - -/* with multiple calendars */ -.ui-datepicker.ui-datepicker-multi { width:auto; } -.ui-datepicker-multi .ui-datepicker-group { float:left; } -.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } -.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } -.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } -.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } -.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } -.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } -.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } -.ui-datepicker-row-break { clear:both; width:100%; } - -/* RTL support */ -/* @noflip */ .ui-datepicker-rtl { direction: rtl; } -/* @noflip */ .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } -/* @noflip */ .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } -/* @noflip */ .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } -/* @noflip */ .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } -/* @noflip */ .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } -/* @noflip */ .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } -/* @noflip */ .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } -/* @noflip */ .ui-datepicker-rtl .ui-datepicker-group { float:right; } -/* @noflip */ .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } -/* @noflip */ .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } - -/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ -.ui-datepicker-cover { - display: none; /*sorry for IE5*/ - display/**/: block; /*sorry for IE5*/ - position: absolute; /*must have*/ - z-index: -1; /*must have*/ - filter: mask(); /*must have*/ - top: -4px; /*must have*/ - left: -4px; /*must have*/ - width: 200px; /*must have*/ - height: 200px; /*must have*/ -} \ No newline at end of file diff --git a/resources/jquery.ui/themes/vector/jquery.ui.dialog.css b/resources/jquery.ui/themes/vector/jquery.ui.dialog.css deleted file mode 100644 index cd85f14e..00000000 --- a/resources/jquery.ui/themes/vector/jquery.ui.dialog.css +++ /dev/null @@ -1,37 +0,0 @@ -/* Dialog -----------------------------------*/ -.ui-dialog { position: absolute; padding: 0; width: 300px; } -.ui-dialog .ui-dialog-titlebar { padding: .75em; position: relative; } -.ui-dialog .ui-dialog-title { float: left; margin: 0; } -.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .75em; 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-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 .ui-dialog-buttonset { float: right; } -.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } -.ui-draggable .ui-dialog-titlebar { cursor: move; } -/* Customizations */ -body .ui-dialog .ui-dialog-titlebar-close:hover { - text-decoration: none; -} -body .ui-dialog .ui-dialog-content .status-invalid input { - border: 2px solid red; - padding: 2px 1px; -} -body .ui-dialog .ui-dialog-titlebar { - padding: 0.9em 1.4em 0.6em !important; -} -body .ui-dialog .ui-widget-header { - /* @embed */ - background: #f0f0f0 url(images/titlebar-fade.png) repeat-x scroll 50% 100% !important; -} -/* FIXME: Should just update the icon sprite if we're keeping this X */ -body .ui-dialog .ui-icon-closethick { - /* @embed */ - background: url(images/close.png) no-repeat 50% 50% !important; -} -body .ui-dialog .ui-dialog-buttonpane { - margin-top: 0 !important; - padding:0.3em 1.4em 0.5em 1.4em !important; -} diff --git a/resources/jquery.ui/themes/vector/jquery.ui.progressbar.css b/resources/jquery.ui/themes/vector/jquery.ui.progressbar.css deleted file mode 100644 index bc0939ec..00000000 --- a/resources/jquery.ui/themes/vector/jquery.ui.progressbar.css +++ /dev/null @@ -1,4 +0,0 @@ -/* Progressbar -----------------------------------*/ -.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/resources/jquery.ui/themes/vector/jquery.ui.resizable.css b/resources/jquery.ui/themes/vector/jquery.ui.resizable.css deleted file mode 100644 index f1bd7c5e..00000000 --- a/resources/jquery.ui/themes/vector/jquery.ui.resizable.css +++ /dev/null @@ -1,19 +0,0 @@ -/* Resizable -----------------------------------*/ -.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; } -.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } -.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } -/* @noflip */ -.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } -/* @noflip */ -.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } -/* @noflip */ -.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } -/* @noflip */ -.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } -/* @noflip */ -.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } -/* @noflip */ -.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;} \ No newline at end of file diff --git a/resources/jquery.ui/themes/vector/jquery.ui.selectable.css b/resources/jquery.ui/themes/vector/jquery.ui.selectable.css deleted file mode 100644 index c5d46ce2..00000000 --- a/resources/jquery.ui/themes/vector/jquery.ui.selectable.css +++ /dev/null @@ -1,3 +0,0 @@ -/* Selectable -----------------------------------*/ -.ui-selectable-helper { border:1px dotted black } diff --git a/resources/jquery.ui/themes/vector/jquery.ui.slider.css b/resources/jquery.ui/themes/vector/jquery.ui.slider.css deleted file mode 100644 index 07c6f4e5..00000000 --- a/resources/jquery.ui/themes/vector/jquery.ui.slider.css +++ /dev/null @@ -1,17 +0,0 @@ -/* Slider -----------------------------------*/ -.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; } - -.ui-slider-horizontal { height: .8em; } -.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } -.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } -.ui-slider-horizontal .ui-slider-range-min { left: 0; } -.ui-slider-horizontal .ui-slider-range-max { right: 0; } - -.ui-slider-vertical { width: .8em; height: 100px; } -.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } -.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } -.ui-slider-vertical .ui-slider-range-min { bottom: 0; } -.ui-slider-vertical .ui-slider-range-max { top: 0; } \ No newline at end of file diff --git a/resources/jquery.ui/themes/vector/jquery.ui.tabs.css b/resources/jquery.ui/themes/vector/jquery.ui.tabs.css deleted file mode 100644 index 99e16dbd..00000000 --- a/resources/jquery.ui/themes/vector/jquery.ui.tabs.css +++ /dev/null @@ -1,11 +0,0 @@ -/* Tabs -----------------------------------*/ -.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; } -.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } -.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } -.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } -.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ -.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } -.ui-tabs .ui-tabs-hide { display: none !important; } diff --git a/resources/jquery.ui/themes/vector/jquery.ui.theme.css b/resources/jquery.ui/themes/vector/jquery.ui.theme.css deleted file mode 100644 index e39371de..00000000 --- a/resources/jquery.ui/themes/vector/jquery.ui.theme.css +++ /dev/null @@ -1,248 +0,0 @@ - - -/* -* 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/?ffDefault=sans-serif&fwDefault=normal&fsDefault=1.0em&cornerRadius=3px&bgColorHeader=ffffff&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=100&borderColorHeader=aed0ea&fcHeader=222222&iconColorHeader=72a7cf&bgColorContent=f2f5f7&bgTextureContent=04_highlight_hard.png&bgImgOpacityContent=100&borderColorContent=cccccc&fcContent=362b36&iconColorContent=72a7cf&bgColorDefault=d7ebf9&bgTextureDefault=04_highlight_hard.png&bgImgOpacityDefault=80&borderColorDefault=aed0ea&fcDefault=2779aa&iconColorDefault=3d80b3&bgColorHover=e4f1fb&bgTextureHover=03_highlight_soft.png&bgImgOpacityHover=100&borderColorHover=74b2e2&fcHover=0070a3&iconColorHover=2694e8&bgColorActive=f0f0f0&bgTextureActive=06_inset_hard.png&bgImgOpacityActive=100&borderColorActive=cccccc&fcActive=000000&iconColorActive=666666&bgColorHighlight=ffef8f&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=25&borderColorHighlight=f9dd34&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=cd0a0a&bgTextureError=01_flat.png&bgImgOpacityError=15&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffffff&bgColorOverlay=000000&bgTextureOverlay=21_glow_ball.png&bgImgOpacityOverlay=100&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=70&opacityShadow=20&thicknessShadow=7px&offsetTopShadow=-7px&offsetLeftShadow=-7px&cornerRadiusShadow=8px -*/ - - -/* Component containers -----------------------------------*/ -.ui-widget { font-family: sans-serif; font-size: 0.8em; } -.ui-widget .ui-widget { font-size: 1em; } -.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: sans-serif; font-size: 1em; } -.ui-widget-content { border: 1px solid #cccccc; /* @embed */ background: #f2f5f7 url(images/ui-bg_highlight-hard_100_f2f5f7_1x100.png) 50% top repeat-x; color: #362b36; } -.ui-widget-content a { color: #362b36; } -.ui-widget-header { border-bottom: 1px solid #bbbbbb; line-height: 1em; /* @embed */ background: #ffffff url(images/ui-bg_highlight-soft_100_ffffff_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; } -.ui-widget-header a { color: #222222; } - -/* Interaction states -----------------------------------*/ -.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #aed0ea; /* @embed */ background: #d7ebf9 url(images/ui-bg_highlight-hard_80_d7ebf9_1x100.png) 50% 50% repeat-x; font-weight: normal; color: #2779aa; } -.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #2779aa; text-decoration: none; } -.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #74b2e2; /* @embed */ background: #e4f1fb url(images/ui-bg_highlight-soft_100_e4f1fb_1x100.png) 50% 50% repeat-x; font-weight: normal; color: #0070a3; } -.ui-state-hover a, .ui-state-hover a:hover { color: #0070a3; text-decoration: none; } -.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #cccccc; background: #f0f0f0 /* @embed */ url(images/ui-bg_inset-hard_100_f0f0f0_1x100.png) 50% 50% repeat-x; font-weight: normal; color: #000000; } -.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #000000; text-decoration: none; } -.ui-widget :active { outline: none; } - -/* Interaction Cues -----------------------------------*/ -.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #f9dd34; background: #ffef8f /* @embed */ url(images/ui-bg_highlight-soft_25_ffef8f_1x100.png) 50% top repeat-x; color: #363636; } -.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } -.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #cd0a0a /* @embed */ url(images/ui-bg_flat_15_cd0a0a_40x100.png) 50% 50% repeat-x; color: #ffffff; } -.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; } -.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; } -.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } -.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } -.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { width: 16px; height: 16px; } -.ui-icon, .ui-widget-content .ui-icon, .ui-widget-header .ui-icon { /* @embed */ background-image: url(images/ui-icons_72a7cf_256x240.png); } -.ui-state-default .ui-icon { /* @embed */ background-image: url(images/ui-icons_3d80b3_256x240.png); } -.ui-state-hover .ui-icon, .ui-state-focus .ui-icon { /* @embed */ background-image: url(images/ui-icons_2694e8_256x240.png); } -.ui-state-active .ui-icon { /* @embed */ background-image: url(images/ui-icons_666666_256x240.png); } -.ui-state-highlight .ui-icon { /* @embed */ background-image: url(images/ui-icons_2e83ff_256x240.png); } -.ui-state-error .ui-icon, .ui-state-error-text .ui-icon { /* @embed */ background-image: url(images/ui-icons_ffffff_256x240.png); } - -/* positioning */ -.ui-icon-carat-1-n { background-position: 0 0; } -.ui-icon-carat-1-ne { background-position: -16px 0; } -.ui-icon-carat-1-e { background-position: -32px 0; } -.ui-icon-carat-1-se { background-position: -48px 0; } -.ui-icon-carat-1-s { background-position: -64px 0; } -.ui-icon-carat-1-sw { background-position: -80px 0; } -.ui-icon-carat-1-w { background-position: -96px 0; } -.ui-icon-carat-1-nw { background-position: -112px 0; } -.ui-icon-carat-2-n-s { background-position: -128px 0; } -.ui-icon-carat-2-e-w { background-position: -144px 0; } -.ui-icon-triangle-1-n { background-position: 0 -16px; } -.ui-icon-triangle-1-ne { background-position: -16px -16px; } -.ui-icon-triangle-1-e { background-position: -32px -16px; } -.ui-icon-triangle-1-se { background-position: -48px -16px; } -.ui-icon-triangle-1-s { background-position: -64px -16px; } -.ui-icon-triangle-1-sw { background-position: -80px -16px; } -.ui-icon-triangle-1-w { background-position: -96px -16px; } -.ui-icon-triangle-1-nw { background-position: -112px -16px; } -.ui-icon-triangle-2-n-s { background-position: -128px -16px; } -.ui-icon-triangle-2-e-w { background-position: -144px -16px; } -.ui-icon-arrow-1-n { background-position: 0 -32px; } -.ui-icon-arrow-1-ne { background-position: -16px -32px; } -.ui-icon-arrow-1-e { background-position: -32px -32px; } -.ui-icon-arrow-1-se { background-position: -48px -32px; } -.ui-icon-arrow-1-s { background-position: -64px -32px; } -.ui-icon-arrow-1-sw { background-position: -80px -32px; } -.ui-icon-arrow-1-w { background-position: -96px -32px; } -.ui-icon-arrow-1-nw { background-position: -112px -32px; } -.ui-icon-arrow-2-n-s { background-position: -128px -32px; } -.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } -.ui-icon-arrow-2-e-w { background-position: -160px -32px; } -.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } -.ui-icon-arrowstop-1-n { background-position: -192px -32px; } -.ui-icon-arrowstop-1-e { background-position: -208px -32px; } -.ui-icon-arrowstop-1-s { background-position: -224px -32px; } -.ui-icon-arrowstop-1-w { background-position: -240px -32px; } -.ui-icon-arrowthick-1-n { background-position: 0 -48px; } -.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } -.ui-icon-arrowthick-1-e { background-position: -32px -48px; } -.ui-icon-arrowthick-1-se { background-position: -48px -48px; } -.ui-icon-arrowthick-1-s { background-position: -64px -48px; } -.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } -.ui-icon-arrowthick-1-w { background-position: -96px -48px; } -.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } -.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } -.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } -.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } -.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } -.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } -.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } -.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } -.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } -.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } -.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } -.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } -.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } -.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } -.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } -.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } -.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } -.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } -.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } -.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } -.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } -.ui-icon-arrow-4 { background-position: 0 -80px; } -.ui-icon-arrow-4-diag { background-position: -16px -80px; } -.ui-icon-extlink { background-position: -32px -80px; } -.ui-icon-newwin { background-position: -48px -80px; } -.ui-icon-refresh { background-position: -64px -80px; } -.ui-icon-shuffle { background-position: -80px -80px; } -.ui-icon-transfer-e-w { background-position: -96px -80px; } -.ui-icon-transferthick-e-w { background-position: -112px -80px; } -.ui-icon-folder-collapsed { background-position: 0 -96px; } -.ui-icon-folder-open { background-position: -16px -96px; } -.ui-icon-document { background-position: -32px -96px; } -.ui-icon-document-b { background-position: -48px -96px; } -.ui-icon-note { background-position: -64px -96px; } -.ui-icon-mail-closed { background-position: -80px -96px; } -.ui-icon-mail-open { background-position: -96px -96px; } -.ui-icon-suitcase { background-position: -112px -96px; } -.ui-icon-comment { background-position: -128px -96px; } -.ui-icon-person { background-position: -144px -96px; } -.ui-icon-print { background-position: -160px -96px; } -.ui-icon-trash { background-position: -176px -96px; } -.ui-icon-locked { background-position: -192px -96px; } -.ui-icon-unlocked { background-position: -208px -96px; } -.ui-icon-bookmark { background-position: -224px -96px; } -.ui-icon-tag { background-position: -240px -96px; } -.ui-icon-home { background-position: 0 -112px; } -.ui-icon-flag { background-position: -16px -112px; } -.ui-icon-calendar { background-position: -32px -112px; } -.ui-icon-cart { background-position: -48px -112px; } -.ui-icon-pencil { background-position: -64px -112px; } -.ui-icon-clock { background-position: -80px -112px; } -.ui-icon-disk { background-position: -96px -112px; } -.ui-icon-calculator { background-position: -112px -112px; } -.ui-icon-zoomin { background-position: -128px -112px; } -.ui-icon-zoomout { background-position: -144px -112px; } -.ui-icon-search { background-position: -160px -112px; } -.ui-icon-wrench { background-position: -176px -112px; } -.ui-icon-gear { background-position: -192px -112px; } -.ui-icon-heart { background-position: -208px -112px; } -.ui-icon-star { background-position: -224px -112px; } -.ui-icon-link { background-position: -240px -112px; } -.ui-icon-cancel { background-position: 0 -128px; } -.ui-icon-plus { background-position: -16px -128px; } -.ui-icon-plusthick { background-position: -32px -128px; } -.ui-icon-minus { background-position: -48px -128px; } -.ui-icon-minusthick { background-position: -64px -128px; } -.ui-icon-close { background-position: -80px -128px; } -.ui-icon-closethick { background-position: -96px -128px; } -.ui-icon-key { background-position: -112px -128px; } -.ui-icon-lightbulb { background-position: -128px -128px; } -.ui-icon-scissors { background-position: -144px -128px; } -.ui-icon-clipboard { background-position: -160px -128px; } -.ui-icon-copy { background-position: -176px -128px; } -.ui-icon-contact { background-position: -192px -128px; } -.ui-icon-image { background-position: -208px -128px; } -.ui-icon-video { background-position: -224px -128px; } -.ui-icon-script { background-position: -240px -128px; } -.ui-icon-alert { background-position: 0 -144px; } -.ui-icon-info { background-position: -16px -144px; } -.ui-icon-notice { background-position: -32px -144px; } -.ui-icon-help { background-position: -48px -144px; } -.ui-icon-check { background-position: -64px -144px; } -.ui-icon-bullet { background-position: -80px -144px; } -.ui-icon-radio-off { background-position: -96px -144px; } -.ui-icon-radio-on { background-position: -112px -144px; } -.ui-icon-pin-w { background-position: -128px -144px; } -.ui-icon-pin-s { background-position: -144px -144px; } -.ui-icon-play { background-position: 0 -160px; } -.ui-icon-pause { background-position: -16px -160px; } -.ui-icon-seek-next { background-position: -32px -160px; } -.ui-icon-seek-prev { background-position: -48px -160px; } -.ui-icon-seek-end { background-position: -64px -160px; } -.ui-icon-seek-start { background-position: -80px -160px; } -/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ -.ui-icon-seek-first { background-position: -80px -160px; } -.ui-icon-stop { background-position: -96px -160px; } -.ui-icon-eject { background-position: -112px -160px; } -.ui-icon-volume-off { background-position: -128px -160px; } -.ui-icon-volume-on { background-position: -144px -160px; } -.ui-icon-power { background-position: 0 -176px; } -.ui-icon-signal-diag { background-position: -16px -176px; } -.ui-icon-signal { background-position: -32px -176px; } -.ui-icon-battery-0 { background-position: -48px -176px; } -.ui-icon-battery-1 { background-position: -64px -176px; } -.ui-icon-battery-2 { background-position: -80px -176px; } -.ui-icon-battery-3 { background-position: -96px -176px; } -.ui-icon-circle-plus { background-position: 0 -192px; } -.ui-icon-circle-minus { background-position: -16px -192px; } -.ui-icon-circle-close { background-position: -32px -192px; } -.ui-icon-circle-triangle-e { background-position: -48px -192px; } -.ui-icon-circle-triangle-s { background-position: -64px -192px; } -.ui-icon-circle-triangle-w { background-position: -80px -192px; } -.ui-icon-circle-triangle-n { background-position: -96px -192px; } -.ui-icon-circle-arrow-e { background-position: -112px -192px; } -.ui-icon-circle-arrow-s { background-position: -128px -192px; } -.ui-icon-circle-arrow-w { background-position: -144px -192px; } -.ui-icon-circle-arrow-n { background-position: -160px -192px; } -.ui-icon-circle-zoomin { background-position: -176px -192px; } -.ui-icon-circle-zoomout { background-position: -192px -192px; } -.ui-icon-circle-check { background-position: -208px -192px; } -.ui-icon-circlesmall-plus { background-position: 0 -208px; } -.ui-icon-circlesmall-minus { background-position: -16px -208px; } -.ui-icon-circlesmall-close { background-position: -32px -208px; } -.ui-icon-squaresmall-plus { background-position: -48px -208px; } -.ui-icon-squaresmall-minus { background-position: -64px -208px; } -.ui-icon-squaresmall-close { background-position: -80px -208px; } -.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } -.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } -.ui-icon-grip-solid-vertical { background-position: -32px -224px; } -.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } -.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } -.ui-icon-grip-diagonal-se { background-position: -80px -224px; } - - -/* Misc visuals -----------------------------------*/ - -/* Corner radius */ -.ui-corner-tl { -moz-border-radius-topleft: 0; -webkit-border-top-left-radius: 0; } -.ui-corner-tr { -moz-border-radius-topright: 0; -webkit-border-top-right-radius: 0; } -.ui-corner-bl { -moz-border-radius-bottomleft: 0; -webkit-border-bottom-left-radius: 0; } -.ui-corner-br { -moz-border-radius-bottomright: 0; -webkit-border-bottom-right-radius: 0; } -.ui-corner-top { -moz-border-radius-topleft: 0; -webkit-border-top-left-radius: 0; -moz-border-radius-topright: 0; -webkit-border-top-right-radius: 0; } -.ui-corner-bottom { -moz-border-radius-bottomleft: 0; -webkit-border-bottom-left-radius: 0; -moz-border-radius-bottomright: 0; -webkit-border-bottom-right-radius: 0; } -.ui-corner-right { -moz-border-radius-topright: 0; -webkit-border-top-right-radius: 0; -moz-border-radius-bottomright: 0; -webkit-border-bottom-right-radius: 0; } -.ui-corner-left { -moz-border-radius-topleft: 0; -webkit-border-top-left-radius: 0; -moz-border-radius-bottomleft: 0; -webkit-border-bottom-left-radius: 0; } -.ui-corner-all { -moz-border-radius: 0; -webkit-border-radius: 0; } - -/* Overlays */ -.ui-widget-overlay { background: #000000; opacity: .75;filter:Alpha(Opacity=75); } -.ui-widget-shadow { margin: -7px 0 0 -7px; padding: 7px; /* @embed */ background: #000000 url(images/ui-bg_flat_70_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; } \ No newline at end of file diff --git a/resources/jquery/images/jquery.arrowSteps.divider-ltr.png b/resources/jquery/images/jquery.arrowSteps.divider-ltr.png deleted file mode 100644 index 84ed2a2d..00000000 Binary files a/resources/jquery/images/jquery.arrowSteps.divider-ltr.png and /dev/null differ diff --git a/resources/jquery/images/jquery.arrowSteps.divider-rtl.png b/resources/jquery/images/jquery.arrowSteps.divider-rtl.png deleted file mode 100644 index 7cfbfeba..00000000 Binary files a/resources/jquery/images/jquery.arrowSteps.divider-rtl.png and /dev/null differ diff --git a/resources/jquery/images/jquery.arrowSteps.head-ltr.png b/resources/jquery/images/jquery.arrowSteps.head-ltr.png deleted file mode 100644 index eb070280..00000000 Binary files a/resources/jquery/images/jquery.arrowSteps.head-ltr.png and /dev/null differ diff --git a/resources/jquery/images/jquery.arrowSteps.head-rtl.png b/resources/jquery/images/jquery.arrowSteps.head-rtl.png deleted file mode 100644 index 7ea2fdb5..00000000 Binary files a/resources/jquery/images/jquery.arrowSteps.head-rtl.png and /dev/null differ diff --git a/resources/jquery/images/jquery.arrowSteps.tail-ltr.png b/resources/jquery/images/jquery.arrowSteps.tail-ltr.png deleted file mode 100644 index 3ad990b6..00000000 Binary files a/resources/jquery/images/jquery.arrowSteps.tail-ltr.png and /dev/null differ diff --git a/resources/jquery/images/jquery.arrowSteps.tail-rtl.png b/resources/jquery/images/jquery.arrowSteps.tail-rtl.png deleted file mode 100644 index 1d3048ef..00000000 Binary files a/resources/jquery/images/jquery.arrowSteps.tail-rtl.png and /dev/null differ diff --git a/resources/jquery/images/marker.png b/resources/jquery/images/marker.png deleted file mode 100644 index 19efb6ce..00000000 Binary files a/resources/jquery/images/marker.png and /dev/null differ diff --git a/resources/jquery/images/mask.png b/resources/jquery/images/mask.png deleted file mode 100644 index fe08de0e..00000000 Binary files a/resources/jquery/images/mask.png and /dev/null differ diff --git a/resources/jquery/images/sort_both.gif b/resources/jquery/images/sort_both.gif deleted file mode 100644 index 50ad15a0..00000000 Binary files a/resources/jquery/images/sort_both.gif and /dev/null differ diff --git a/resources/jquery/images/sort_down.gif b/resources/jquery/images/sort_down.gif deleted file mode 100644 index ec4f41b0..00000000 Binary files a/resources/jquery/images/sort_down.gif and /dev/null differ diff --git a/resources/jquery/images/sort_none.gif b/resources/jquery/images/sort_none.gif deleted file mode 100644 index edd07e58..00000000 Binary files a/resources/jquery/images/sort_none.gif and /dev/null differ diff --git a/resources/jquery/images/sort_up.gif b/resources/jquery/images/sort_up.gif deleted file mode 100644 index 80189185..00000000 Binary files a/resources/jquery/images/sort_up.gif and /dev/null differ diff --git a/resources/jquery/images/spinner-large.gif b/resources/jquery/images/spinner-large.gif deleted file mode 100644 index 72203fdd..00000000 Binary files a/resources/jquery/images/spinner-large.gif and /dev/null differ diff --git a/resources/jquery/images/spinner.gif b/resources/jquery/images/spinner.gif deleted file mode 100644 index 6146be4e..00000000 Binary files a/resources/jquery/images/spinner.gif and /dev/null differ diff --git a/resources/jquery/images/wheel.png b/resources/jquery/images/wheel.png deleted file mode 100644 index 7e53103e..00000000 Binary files a/resources/jquery/images/wheel.png and /dev/null differ diff --git a/resources/jquery/jquery.appear.js b/resources/jquery/jquery.appear.js deleted file mode 100644 index 4f77886c..00000000 --- a/resources/jquery/jquery.appear.js +++ /dev/null @@ -1,138 +0,0 @@ -/* - * jQuery.appear - * http://code.google.com/p/jquery-appear/ - * - * Copyright (c) 2009 Michael Hixson - * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php) -*/ -(function($) { - - $.fn.appear = function(fn, options) { - - var settings = $.extend({ - - //arbitrary data to pass to fn - data: undefined, - - //call fn only on the first appear? - one: true - - }, options); - - return this.each(function() { - - var t = $(this); - - //whether the element is currently visible - t.appeared = false; - - if (!fn) { - - //trigger the custom event - t.trigger('appear', settings.data); - return; - } - - var w = $(window); - - //fires the appear event when appropriate - var check = function() { - - //is the element hidden? - if (!t.is(':visible')) { - - //it became hidden - t.appeared = false; - return; - } - - //is the element inside the visible window? - var a = w.scrollLeft(); - var b = w.scrollTop(); - var o = t.offset(); - var x = o.left; - var y = o.top; - - if (y + t.height() >= b && - y <= b + w.height() && - x + t.width() >= a && - x <= a + w.width()) { - - //trigger the custom event - if (!t.appeared) t.trigger('appear', settings.data); - - } else { - - //it scrolled out of view - t.appeared = false; - } - }; - - //create a modified fn with some additional logic - var modifiedFn = function() { - - //mark the element as visible - t.appeared = true; - - //is this supposed to happen only once? - if (settings.one) { - - //remove the check - w.unbind('scroll', check); - var i = $.inArray(check, $.fn.appear.checks); - if (i >= 0) $.fn.appear.checks.splice(i, 1); - } - - //trigger the original fn - fn.apply(this, arguments); - }; - - //bind the modified fn to the element - if (settings.one) t.one('appear', settings.data, modifiedFn); - else t.bind('appear', settings.data, modifiedFn); - - //check whenever the window scrolls - w.scroll(check); - - //check whenever the dom changes - $.fn.appear.checks.push(check); - - //check now - (check)(); - }); - }; - - //keep a queue of appearance checks - $.extend($.fn.appear, { - - checks: [], - timeout: null, - - //process the queue - checkAll: function() { - var length = $.fn.appear.checks.length; - if (length > 0) while (length--) ($.fn.appear.checks[length])(); - }, - - //check the queue asynchronously - run: function() { - if ($.fn.appear.timeout) clearTimeout($.fn.appear.timeout); - $.fn.appear.timeout = setTimeout($.fn.appear.checkAll, 20); - } - }); - - //run checks when these methods are called - $.each(['append', 'prepend', 'after', 'before', 'attr', - 'removeAttr', 'addClass', 'removeClass', 'toggleClass', - 'remove', 'css', 'show', 'hide'], function(i, n) { - var old = $.fn[n]; - if (old) { - $.fn[n] = function() { - var r = old.apply(this, arguments); - $.fn.appear.run(); - return r; - } - } - }); - -})(jQuery); \ No newline at end of file diff --git a/resources/jquery/jquery.arrowSteps.css b/resources/jquery/jquery.arrowSteps.css deleted file mode 100644 index f8f6e951..00000000 --- a/resources/jquery/jquery.arrowSteps.css +++ /dev/null @@ -1,45 +0,0 @@ -.arrowSteps { - list-style-type: none; - list-style-image: none; - border: 1px solid #666666; - position: relative; -} - -.arrowSteps li { - float: left; - padding: 0px; - margin: 0px; - border: 0 none; -} - -.arrowSteps li div { - padding: 0.5em; - text-align: center; - white-space: nowrap; - overflow: hidden; -} - -.arrowSteps li.arrow div { - /* @embed */ - background: url(images/jquery.arrowSteps.divider-ltr.png) no-repeat right center; -} - -/* applied to the element preceding the highlighted step */ -.arrowSteps li.arrow.tail div { - /* @embed */ - background: url(images/jquery.arrowSteps.tail-ltr.png) no-repeat right center; -} - -/* this applies to all highlighted, including the last */ -.arrowSteps li.head div { - /* @embed */ - background: url(images/jquery.arrowSteps.head-ltr.png) no-repeat left center; - font-weight: bold; -} - -/* this applies to all highlighted arrows except the last */ -.arrowSteps li.arrow.head div { - /* TODO: eliminate duplication of jquery.arrowSteps.head.png embedding */ - /* @embed */ - background: url(images/jquery.arrowSteps.head-ltr.png) no-repeat right center; -} diff --git a/resources/jquery/jquery.arrowSteps.js b/resources/jquery/jquery.arrowSteps.js deleted file mode 100644 index a1fd679d..00000000 --- a/resources/jquery/jquery.arrowSteps.js +++ /dev/null @@ -1,82 +0,0 @@ -/** - * jQuery arrowSteps plugin - * Copyright Neil Kandalgaonkar, 2010 - * - * This work is licensed under the terms of the GNU General Public License, - * version 2 or later. - * (see http://www.fsf.org/licensing/licenses/gpl.html). - * Derivative works and later versions of the code must be free software - * licensed under the same or a compatible license. - * - * - * DESCRIPTION - * - * Show users their progress through a series of steps, via a row of items that fit - * together like arrows. One item can be highlighted at a time. - * - * - * SYNOPSIS - * - *
            - *
          • Guard!
          • - *
          • Turn!
          • - *
          • Parry!
          • - *
          • Dodge!
          • - *
          • Spin!
          • - *
          • Ha!
          • - *
          • Thrust!
          • - *
          - * - * - * - */ -( function ( $ ) { - $.fn.arrowSteps = function () { - var $steps, width, arrowWidth, - paddingSide = $( 'body' ).hasClass( 'rtl' ) ? 'padding-left' : 'padding-right'; - - this.addClass( 'arrowSteps' ); - $steps = this.find( 'li' ); - - width = parseInt( 100 / $steps.length, 10 ); - $steps.css( 'width', width + '%' ); - - // Every step except the last one has an arrow pointing forward: - // at the right hand side in LTR languages, and at the left hand side in RTL. - // Also add in the padding for the calculated arrow width. - arrowWidth = parseInt( this.outerHeight(), 10 ); - $steps.filter( ':not(:last-child)' ).addClass( 'arrow' ) - .find( 'div' ).css( paddingSide, arrowWidth.toString() + 'px' ); - - this.data( 'arrowSteps', $steps ); - return this; - }; - - $.fn.arrowStepsHighlight = function ( selector ) { - var $previous, - $steps = this.data( 'arrowSteps' ); - $.each( $steps, function ( i, step ) { - var $step = $( step ); - if ( $step.is( selector ) ) { - if ($previous) { - $previous.addClass( 'tail' ); - } - $step.addClass( 'head' ); - } else { - $step.removeClass( 'head tail lasthead' ); - } - $previous = $step; - } ); - }; - -}( jQuery ) ); diff --git a/resources/jquery/jquery.async.js b/resources/jquery/jquery.async.js deleted file mode 100644 index 2161f6b9..00000000 --- a/resources/jquery/jquery.async.js +++ /dev/null @@ -1,69 +0,0 @@ -/* - * jQuery Asynchronous Plugin 1.0 - * - * Copyright (c) 2008 Vincent Robert (genezys.net) - * Dual licensed under the MIT (MIT-LICENSE.txt) - * and GPL (GPL-LICENSE.txt) licenses. - * - */ -(function($){ - -// opts.delay : (default 10) delay between async call in ms -// opts.bulk : (default 500) delay during which the loop can continue synchronously without yielding the CPU -// opts.test : (default true) function to test in the while test part -// opts.loop : (default empty) function to call in the while loop part -// opts.end : (default empty) function to call at the end of the while loop -$.whileAsync = function(opts) { - var delay = Math.abs(opts.delay) || 10, - bulk = isNaN(opts.bulk) ? 500 : Math.abs(opts.bulk), - test = opts.test || function(){ return true; }, - loop = opts.loop || function(){}, - end = opts.end || function(){}; - - (function(){ - - var t = false, - begin = new Date(); - - while( t = test() ) { - loop(); - if( bulk === 0 || (new Date() - begin) > bulk ) { - break; - } - } - if( t ) { - setTimeout(arguments.callee, delay); - } - else { - end(); - } - - })(); -}; - -// opts.delay : (default 10) delay between async call in ms -// opts.bulk : (default 500) delay during which the loop can continue synchronously without yielding the CPU -// opts.loop : (default empty) function to call in the each loop part, signature: function(index, value) this = value -// opts.end : (default empty) function to call at the end of the each loop -$.eachAsync = function(array, opts) { - var i = 0, - l = array.length, - loop = opts.loop || function(){}; - - $.whileAsync( - $.extend(opts, { - test: function() { return i < l; }, - loop: function() { - var val = array[i]; - return loop.call(val, i++, val); - } - }) - ); -}; - -$.fn.eachAsync = function(opts) { - $.eachAsync(this, opts); - return this; -} - -})(jQuery); \ No newline at end of file diff --git a/resources/jquery/jquery.autoEllipsis.js b/resources/jquery/jquery.autoEllipsis.js deleted file mode 100644 index 49a932a1..00000000 --- a/resources/jquery/jquery.autoEllipsis.js +++ /dev/null @@ -1,149 +0,0 @@ -/** - * Plugin that automatically truncates the plain text contents of an element - * and adds an ellipsis. - */ -( function ( $ ) { - -var - // Cache ellipsed substrings for every string-width-position combination - cache = {}, - - // Use a separate cache when match highlighting is enabled - matchTextCache = {}; - -$.fn.autoEllipsis = function ( options ) { - options = $.extend( { - position: 'center', - tooltip: false, - restoreText: false, - hasSpan: false, - matchText: null - }, options ); - - return this.each( function () { - var $trimmableText, - text, trimmableText, w, pw, - l, r, i, side, m, - // container element - used for measuring against - $container = $(this); - - if ( options.restoreText ) { - if ( !$container.data( 'autoEllipsis.originalText' ) ) { - $container.data( 'autoEllipsis.originalText', $container.text() ); - } else { - $container.text( $container.data( 'autoEllipsis.originalText' ) ); - } - } - - // trimmable text element - only the text within this element will be trimmed - if ( options.hasSpan ) { - $trimmableText = $container.children( options.selector ); - } else { - $trimmableText = $( '' ) - .css( 'whiteSpace', 'nowrap' ) - .text( $container.text() ); - $container - .empty() - .append( $trimmableText ); - } - - text = $container.text(); - trimmableText = $trimmableText.text(); - w = $container.width(); - pw = 0; - - // Try cache - if ( options.matchText ) { - if ( !( text in matchTextCache ) ) { - matchTextCache[text] = {}; - } - if ( !( options.matchText in matchTextCache[text] ) ) { - matchTextCache[text][options.matchText] = {}; - } - if ( !( w in matchTextCache[text][options.matchText] ) ) { - matchTextCache[text][options.matchText][w] = {}; - } - if ( options.position in matchTextCache[text][options.matchText][w] ) { - $container.html( matchTextCache[text][options.matchText][w][options.position] ); - if ( options.tooltip ) { - $container.attr( 'title', text ); - } - return; - } - } else { - if ( !( text in cache ) ) { - cache[text] = {}; - } - if ( !( w in cache[text] ) ) { - cache[text][w] = {}; - } - if ( options.position in cache[text][w] ) { - $container.html( cache[text][w][options.position] ); - if ( options.tooltip ) { - $container.attr( 'title', text ); - } - return; - } - } - - if ( $trimmableText.width() + pw > w ) { - switch ( options.position ) { - case 'right': - // Use binary search-like technique for efficiency - l = 0; - r = trimmableText.length; - do { - m = Math.ceil( ( l + r ) / 2 ); - $trimmableText.text( trimmableText.substr( 0, m ) + '...' ); - if ( $trimmableText.width() + pw > w ) { - // Text is too long - r = m - 1; - } else { - l = m; - } - } while ( l < r ); - $trimmableText.text( trimmableText.substr( 0, l ) + '...' ); - break; - case 'center': - // TODO: Use binary search like for 'right' - i = [Math.round( trimmableText.length / 2 ), Math.round( trimmableText.length / 2 )]; - // Begin with making the end shorter - side = 1; - while ( $trimmableText.outerWidth() + pw > w && i[0] > 0 ) { - $trimmableText.text( trimmableText.substr( 0, i[0] ) + '...' + trimmableText.substr( i[1] ) ); - // Alternate between trimming the end and begining - if ( side === 0 ) { - // Make the begining shorter - i[0]--; - side = 1; - } else { - // Make the end shorter - i[1]++; - side = 0; - } - } - break; - case 'left': - // TODO: Use binary search like for 'right' - r = 0; - while ( $trimmableText.outerWidth() + pw > w && r < trimmableText.length ) { - $trimmableText.text( '...' + trimmableText.substr( r ) ); - r++; - } - break; - } - } - if ( options.tooltip ) { - $container.attr( 'title', text ); - } - if ( options.matchText ) { - $container.highlightText( options.matchText ); - matchTextCache[text][options.matchText][w][options.position] = $container.html(); - } else { - cache[text][w][options.position] = $container.html(); - } - - } ); -}; - -}( jQuery ) ); \ No newline at end of file diff --git a/resources/jquery/jquery.badge.css b/resources/jquery/jquery.badge.css deleted file mode 100644 index f313663e..00000000 --- a/resources/jquery/jquery.badge.css +++ /dev/null @@ -1,37 +0,0 @@ -.mw-badge { - min-width: 7px; - border-radius: 2px; - padding: 1px 4px; - text-align: center; - font-size: 12px; - line-height: 12px; - background-color: #d2d2d2; - cursor: pointer; -} - -.mw-badge-content { - font-weight: bold; - color: white; - vertical-align: baseline; - text-shadow: 0 1px rgba(0, 0, 0, 0.4); -} - -.mw-badge-inline { - margin-left: 3px; - display: inline-block; - /* Hack for IE6 and IE7 (bug 47926) */ - zoom: 1; - *display: inline; - -} -.mw-badge-overlay { - position: absolute; - bottom: -1px; - right: -3px; - z-index: 50; -} - -.mw-badge-important { - background-color: #cc0000; -} - diff --git a/resources/jquery/jquery.badge.js b/resources/jquery/jquery.badge.js deleted file mode 100644 index 9404e818..00000000 --- a/resources/jquery/jquery.badge.js +++ /dev/null @@ -1,76 +0,0 @@ -/** - * jQuery Badge plugin - * - * @license MIT - */ - -/** - * @author Ryan Kaldari , 2012 - * @author Andrew Garrett , 2012 - * @author Marius Hoch , 2012 - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * This program is distributed WITHOUT ANY WARRANTY. - */ -( function ( $, mw ) { - /** - * Allows you to put a "badge" on an item on the page. The badge container - * will be appended to the selected element(s). - * See mediawiki.org/wiki/ResourceLoader/Default_modules#jQuery.badge - * - * @param {number|string} text The value to display in the badge. If the value is falsey (0, - * null, false, '', etc.), any existing badge will be removed. - * @param {boolean} inline True if the badge should be displayed inline, false - * if the badge should overlay the parent element (default is inline) - * @param {boolean} displayZero True if the number zero should be displayed, - * false if the number zero should result in the badge being hidden - * (default is zero will result in the badge being hidden) - */ - $.fn.badge = function ( text, inline, displayZero ) { - var $badge = this.find( '.mw-badge' ), - badgeStyleClass = 'mw-badge-' + ( inline ? 'inline' : 'overlay' ), - isImportant = true, displayBadge = true; - - // If we're displaying zero, ensure style to be non-important - if ( mw.language.convertNumber( text, true ) === 0 ) { - isImportant = false; - if ( !displayZero ) { - displayBadge = false; - } - // If text is falsey (besides 0), hide the badge - } else if ( !text ) { - displayBadge = false; - } - - if ( displayBadge ) { - // If a badge already exists, reuse it - if ( $badge.length ) { - $badge - .toggleClass( 'mw-badge-important', isImportant ) - .find( '.mw-badge-content' ) - .text( text ); - } else { - // Otherwise, create a new badge with the specified text and style - $badge = $( '
          ' ) - .addClass( badgeStyleClass ) - .toggleClass( 'mw-badge-important', isImportant ) - .append( - $( '' ).text( text ) - ) - .appendTo( this ); - } - } else { - $badge.remove(); - } - return this; - }; -}( jQuery, mediaWiki ) ); diff --git a/resources/jquery/jquery.byteLength.js b/resources/jquery/jquery.byteLength.js deleted file mode 100644 index 398937e6..00000000 --- a/resources/jquery/jquery.byteLength.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * jQuery.byteLength - * - * Calculate the byte length of a string (accounting for UTF-8). - * - * @author Jan Paul Posma, 2011 - * @author Timo Tijhof, 2012 - * @author David Chan, 2013 - */ -jQuery.byteLength = function ( str ) { - - // This basically figures out how many bytes a UTF-16 string (which is what js sees) - // will take in UTF-8 by replacing a 2 byte character with 2 *'s, etc, and counting that. - // Note, surrogate (\uD800-\uDFFF) characters are counted as 2 bytes, since there's two of them - // and the actual character takes 4 bytes in UTF-8 (2*2=4). Might not work perfectly in - // edge cases such as illegal sequences, but that should never happen. - - // https://en.wikipedia.org/wiki/UTF-8#Description - // The mapping from UTF-16 code units to UTF-8 bytes is as follows: - // > Range 0000-007F: codepoints that become 1 byte of UTF-8 - // > Range 0080-07FF: codepoints that become 2 bytes of UTF-8 - // > Range 0800-D7FF: codepoints that become 3 bytes of UTF-8 - // > Range D800-DFFF: Surrogates (each pair becomes 4 bytes of UTF-8) - // > Range E000-FFFF: codepoints that become 3 bytes of UTF-8 (continued) - - return str - .replace( /[\u0080-\u07FF\uD800-\uDFFF]/g, '**' ) - .replace( /[\u0800-\uD7FF\uE000-\uFFFF]/g, '***' ) - .length; - -}; diff --git a/resources/jquery/jquery.byteLimit.js b/resources/jquery/jquery.byteLimit.js deleted file mode 100644 index a8c0b065..00000000 --- a/resources/jquery/jquery.byteLimit.js +++ /dev/null @@ -1,233 +0,0 @@ -/** - * jQuery byteLimit plugin. - * - * @author Jan Paul Posma, 2011 - * @author Timo Tijhof, 2011-2012 - */ -( function ( $ ) { - - /** - * Utility function to trim down a string, based on byteLimit - * and given a safe start position. It supports insertion anywhere - * in the string, so "foo" to "fobaro" if limit is 4 will result in - * "fobo", not "foba". Basically emulating the native maxlength by - * reconstructing where the insertion occured. - * - * @param {string} safeVal Known value that was previously returned by this - * function, if none, pass empty string. - * @param {string} newVal New value that may have to be trimmed down. - * @param {number} byteLimit Number of bytes the value may be in size. - * @param {Function} fn [optional] See $.fn.byteLimit. - * @return {Object} Object with: - * - {string} newVal - * - {boolean} trimmed - */ - function trimValForByteLength( safeVal, newVal, byteLimit, fn ) { - var startMatches, endMatches, matchesLen, inpParts, - oldVal = safeVal; - - // Run the hook if one was provided, but only on the length - // assessment. The value itself is not to be affected by the hook. - if ( $.byteLength( fn ? fn( newVal ) : newVal ) <= byteLimit ) { - // Limit was not reached, just remember the new value - // and let the user continue. - return { - newVal: newVal, - trimmed: false - }; - } - - // Current input is longer than the active limit. - // Figure out what was added and limit the addition. - startMatches = 0; - endMatches = 0; - - // It is important that we keep the search within the range of - // the shortest string's length. - // Imagine a user adds text that matches the end of the old value - // (e.g. "foo" -> "foofoo"). startMatches would be 3, but without - // limiting both searches to the shortest length, endMatches would - // also be 3. - matchesLen = Math.min( newVal.length, oldVal.length ); - - // Count same characters from the left, first. - // (if "foo" -> "foofoo", assume addition was at the end). - while ( - startMatches < matchesLen && - oldVal.charAt( startMatches ) === newVal.charAt( startMatches ) - ) { - startMatches += 1; - } - - while ( - endMatches < ( matchesLen - startMatches ) && - oldVal.charAt( oldVal.length - 1 - endMatches ) === newVal.charAt( newVal.length - 1 - endMatches ) - ) { - endMatches += 1; - } - - inpParts = [ - // Same start - newVal.substring( 0, startMatches ), - // Inserted content - newVal.substring( startMatches, newVal.length - endMatches ), - // Same end - newVal.substring( newVal.length - endMatches ) - ]; - - // Chop off characters from the end of the "inserted content" string - // until the limit is statisfied. - if ( fn ) { - // stop, when there is nothing to slice - bug 41450 - while ( $.byteLength( fn( inpParts.join( '' ) ) ) > byteLimit && inpParts[1].length > 0 ) { - inpParts[1] = inpParts[1].slice( 0, -1 ); - } - } else { - while ( $.byteLength( inpParts.join( '' ) ) > byteLimit ) { - inpParts[1] = inpParts[1].slice( 0, -1 ); - } - } - - newVal = inpParts.join( '' ); - - return { - newVal: newVal, - trimmed: true - }; - } - - var eventKeys = [ - 'keyup.byteLimit', - 'keydown.byteLimit', - 'change.byteLimit', - 'mouseup.byteLimit', - 'cut.byteLimit', - 'paste.byteLimit', - 'focus.byteLimit', - 'blur.byteLimit' - ].join( ' ' ); - - /** - * Enforces a byte limit on an input field, so that UTF-8 entries are counted as well, - * when, for example, a database field has a byte limit rather than a character limit. - * Plugin rationale: Browser has native maxlength for number of characters, this plugin - * exists to limit number of bytes instead. - * - * Can be called with a custom limit (to use that limit instead of the maxlength attribute - * value), a filter function (in case the limit should apply to something other than the - * exact input value), or both. Order of parameters is important! - * - * @context {jQuery} Instance of jQuery for one or more input elements - * @param {Number} limit [optional] Limit to enforce, fallsback to maxLength-attribute, - * called with fetched value as argument. - * @param {Function} fn [optional] Function to call on the string before assessing the length. - * @return {jQuery} The context - */ - $.fn.byteLimit = function ( limit, fn ) { - // If the first argument is the function, - // set fn to the first argument's value and ignore the second argument. - if ( $.isFunction( limit ) ) { - fn = limit; - limit = undefined; - // Either way, verify it is a function so we don't have to call - // isFunction again after this. - } else if ( !fn || !$.isFunction( fn ) ) { - fn = undefined; - } - - // The following is specific to each element in the collection. - return this.each( function ( i, el ) { - var $el, elLimit, prevSafeVal; - - $el = $( el ); - - // If no limit was passed to byteLimit(), use the maxlength value. - // Can't re-use 'limit' variable because it's in the higher scope - // that would affect the next each() iteration as well. - // Note that we use attribute to read the value instead of property, - // because in Chrome the maxLength property by default returns the - // highest supported value (no indication that it is being enforced - // by choice). We don't want to bind all of this for some ridiculously - // high default number, unless it was explicitly set in the HTML. - // Also cast to a (primitive) number (most commonly because the maxlength - // attribute contains a string, but theoretically the limit parameter - // could be something else as well). - elLimit = Number( limit === undefined ? $el.attr( 'maxlength' ) : limit ); - - // If there is no (valid) limit passed or found in the property, - // skip this. The < 0 check is required for Firefox, which returns - // -1 (instead of undefined) for maxLength if it is not set. - if ( !elLimit || elLimit < 0 ) { - return; - } - - if ( fn ) { - // Save function for reference - $el.data( 'byteLimit.callback', fn ); - } - - // Remove old event handlers (if there are any) - $el.off( '.byteLimit' ); - - if ( fn ) { - // Disable the native maxLength (if there is any), because it interferes - // with the (differently calculated) byte limit. - // Aside from being differently calculated (average chars with byteLimit - // is lower), we also support a callback which can make it to allow longer - // values (e.g. count "Foo" from "User:Foo"). - // maxLength is a strange property. Removing or setting the property to - // undefined directly doesn't work. Instead, it can only be unset internally - // by the browser when removing the associated attribute (Firefox/Chrome). - // http://code.google.com/p/chromium/issues/detail?id=136004 - $el.removeAttr( 'maxlength' ); - - } else { - // If we don't have a callback the bytelimit can only be lower than the charlimit - // (that is, there are no characters less than 1 byte in size). So lets (re-)enforce - // the native limit for efficiency when possible (it will make the while-loop below - // faster by there being less left to interate over). - $el.attr( 'maxlength', elLimit ); - } - - - // Safe base value, used to determine the path between the previous state - // and the state that triggered the event handler below - and enforce the - // limit approppiately (e.g. don't chop from the end if text was inserted - // at the beginning of the string). - prevSafeVal = ''; - - // We need to listen to after the change has already happened because we've - // learned that trying to guess the new value and canceling the event - // accordingly doesn't work because the new value is not always as simple as: - // oldValue + String.fromCharCode( e.which ); because of cut, paste, select-drag - // replacements, and custom input methods and what not. - // Even though we only trim input after it was changed (never prevent it), we do - // listen on events that input text, because there are cases where the text has - // changed while text is being entered and keyup/change will not be fired yet - // (such as holding down a single key, fires keydown, and after each keydown, - // we can trim the previous one). - // See http://www.w3.org/TR/DOM-Level-3-Events/#events-keyboard-event-order for - // the order and characteristics of the key events. - $el.on( eventKeys, function () { - var res = trimValForByteLength( - prevSafeVal, - this.value, - elLimit, - fn - ); - - // Only set value property if it was trimmed, because whenever the - // value property is set, the browser needs to re-initiate the text context, - // which moves the cursor at the end the input, moving it away from wherever it was. - // This is a side-effect of limiting after the fact. - if ( res.trimmed === true ) { - this.value = res.newVal; - } - // Always adjust prevSafeVal to reflect the input value. Not doing this could cause - // trimValForByteLength to compare the new value to an empty string instead of the - // old value, resulting in trimming always from the end (bug 40850). - prevSafeVal = res.newVal; - } ); - } ); - }; -}( jQuery ) ); diff --git a/resources/jquery/jquery.checkboxShiftClick.js b/resources/jquery/jquery.checkboxShiftClick.js deleted file mode 100644 index b2065665..00000000 --- a/resources/jquery/jquery.checkboxShiftClick.js +++ /dev/null @@ -1,35 +0,0 @@ -/** - * jQuery checkboxShiftClick - * - * This will enable checkboxes to be checked or unchecked in a row by clicking one, - * holding shift and clicking another one. - * - * @author Timo Tijhof, 2011 - 2012 - * @license GPL v2 - */ -( function ( $ ) { - $.fn.checkboxShiftClick = function () { - var prevCheckbox = null, - $box = this; - // When our boxes are clicked.. - $box.click( function ( e ) { - // And one has been clicked before... - if ( prevCheckbox !== null && e.shiftKey ) { - // Check or uncheck this one and all in-between checkboxes, - // except for disabled ones - $box - .slice( - Math.min( $box.index( prevCheckbox ), $box.index( e.target ) ), - Math.max( $box.index( prevCheckbox ), $box.index( e.target ) ) + 1 - ) - .filter( function () { - return !this.disabled; - } ) - .prop( 'checked', !!e.target.checked ); - } - // Either way, update the prevCheckbox variable to the one clicked now - prevCheckbox = e.target; - } ); - return $box; - }; -}( jQuery ) ); diff --git a/resources/jquery/jquery.client.js b/resources/jquery/jquery.client.js deleted file mode 100644 index 5a95dc5b..00000000 --- a/resources/jquery/jquery.client.js +++ /dev/null @@ -1,263 +0,0 @@ -/** - * User-agent detection - */ -( function ( $ ) { - - /* Private Members */ - - /** - * @var {Object} profileCache Keyed by userAgent string, - * value is the parsed $.client.profile object for that user agent. - */ - var profileCache = {}; - - /* Public Methods */ - - $.client = { - - /** - * Get an object containing information about the client. - * - * @param {Object} nav An object with atleast a 'userAgent' and 'platform' key. - * Defaults to the global Navigator object. - * @returns {Object} The resulting client object will be in the following format: - * { - * 'name': 'firefox', - * 'layout': 'gecko', - * 'layoutVersion': 20101026, - * 'platform': 'linux' - * 'version': '3.5.1', - * 'versionBase': '3', - * 'versionNumber': 3.5, - * } - */ - profile: function ( nav ) { - /*jshint boss: true */ - - if ( nav === undefined ) { - nav = window.navigator; - } - // Use the cached version if possible - if ( profileCache[nav.userAgent] === undefined ) { - - var - versionNumber, - - /* Configuration */ - - // Name of browsers or layout engines we don't recognize - uk = 'unknown', - // Generic version digit - x = 'x', - // Strings found in user agent strings that need to be conformed - wildUserAgents = ['Opera', 'Navigator', 'Minefield', 'KHTML', 'Chrome', 'PLAYSTATION 3', 'Iceweasel'], - // Translations for conforming user agent strings - userAgentTranslations = [ - // Tons of browsers lie about being something they are not - [/(Firefox|MSIE|KHTML,?\slike\sGecko|Konqueror)/, ''], - // Chrome lives in the shadow of Safari still - ['Chrome Safari', 'Chrome'], - // KHTML is the layout engine not the browser - LIES! - ['KHTML', 'Konqueror'], - // Firefox nightly builds - ['Minefield', 'Firefox'], - // This helps keep different versions consistent - ['Navigator', 'Netscape'], - // This prevents version extraction issues, otherwise translation would happen later - ['PLAYSTATION 3', 'PS3'] - ], - // Strings which precede a version number in a user agent string - combined and used as - // match 1 in version detection - versionPrefixes = [ - 'camino', 'chrome', 'firefox', 'iceweasel', 'netscape', 'netscape6', 'opera', 'version', 'konqueror', - 'lynx', 'msie', 'safari', 'ps3', 'android' - ], - // Used as matches 2, 3 and 4 in version extraction - 3 is used as actual version number - versionSuffix = '(\\/|\\;?\\s|)([a-z0-9\\.\\+]*?)(\\;|dev|rel|\\)|\\s|$)', - // Names of known browsers - names = [ - 'camino', 'chrome', 'firefox', 'iceweasel', 'netscape', 'konqueror', 'lynx', 'msie', 'opera', - 'safari', 'ipod', 'iphone', 'blackberry', 'ps3', 'rekonq', 'android' - ], - // Tanslations for conforming browser names - nameTranslations = [], - // Names of known layout engines - layouts = ['gecko', 'konqueror', 'msie', 'trident', 'opera', 'webkit'], - // Translations for conforming layout names - layoutTranslations = [ ['konqueror', 'khtml'], ['msie', 'trident'], ['opera', 'presto'] ], - // Names of supported layout engines for version number - layoutVersions = ['applewebkit', 'gecko', 'trident'], - // Names of known operating systems - platforms = ['win', 'wow64', 'mac', 'linux', 'sunos', 'solaris', 'iphone'], - // Translations for conforming operating system names - platformTranslations = [ ['sunos', 'solaris'], ['wow64', 'win'] ], - - /* Methods */ - - /** - * Performs multiple replacements on a string - */ - translate = function ( source, translations ) { - var i; - for ( i = 0; i < translations.length; i++ ) { - source = source.replace( translations[i][0], translations[i][1] ); - } - return source; - }, - - /* Pre-processing */ - - ua = nav.userAgent, - match, - name = uk, - layout = uk, - layoutversion = uk, - platform = uk, - version = x; - - if ( match = new RegExp( '(' + wildUserAgents.join( '|' ) + ')' ).exec( ua ) ) { - // Takes a userAgent string and translates given text into something we can more easily work with - ua = translate( ua, userAgentTranslations ); - } - // Everything will be in lowercase from now on - ua = ua.toLowerCase(); - - /* Extraction */ - - if ( match = new RegExp( '(' + names.join( '|' ) + ')' ).exec( ua ) ) { - name = translate( match[1], nameTranslations ); - } - if ( match = new RegExp( '(' + layouts.join( '|' ) + ')' ).exec( ua ) ) { - layout = translate( match[1], layoutTranslations ); - } - if ( match = new RegExp( '(' + layoutVersions.join( '|' ) + ')\\\/(\\d+)').exec( ua ) ) { - layoutversion = parseInt( match[2], 10 ); - } - if ( match = new RegExp( '(' + platforms.join( '|' ) + ')' ).exec( nav.platform.toLowerCase() ) ) { - platform = translate( match[1], platformTranslations ); - } - if ( match = new RegExp( '(' + versionPrefixes.join( '|' ) + ')' + versionSuffix ).exec( ua ) ) { - version = match[3]; - } - - /* Edge Cases -- did I mention about how user agent string lie? */ - - // Decode Safari's crazy 400+ version numbers - if ( name === 'safari' && version > 400 ) { - version = '2.0'; - } - // Expose Opera 10's lies about being Opera 9.8 - if ( name === 'opera' && version >= 9.8 ) { - match = ua.match( /\bversion\/([0-9\.]*)/ ); - if ( match && match[1] ) { - version = match[1]; - } else { - version = '10'; - } - } - // And Opera 15's lies about being Chrome - if ( name === 'chrome' && ( match = ua.match( /\bopr\/([0-9\.]*)/ ) ) ) { - if ( match[1] ) { - name = 'opera'; - version = match[1]; - } - } - // And IE 11's lies about being not being IE - if ( layout === 'trident' && layoutversion >= 7 && ( match = ua.match( /\brv[ :\/]([0-9\.]*)/ ) ) ) { - if ( match[1] ) { - name = 'msie'; - version = match[1]; - } - } - - versionNumber = parseFloat( version, 10 ) || 0.0; - - /* Caching */ - - profileCache[nav.userAgent] = { - name: name, - layout: layout, - layoutVersion: layoutversion, - platform: platform, - version: version, - versionBase: ( version !== x ? Math.floor( versionNumber ).toString() : x ), - versionNumber: versionNumber - }; - } - return profileCache[nav.userAgent]; - }, - - /** - * Checks the current browser against a support map object. - * - * A browser map is in the following format: - * { - * // Multiple rules with configurable operators - * 'msie': [['>=', 7], ['!=', 9]], - * // Match no versions - * 'iphone': false, - * // Match any version - * 'android': null - * } - * - * It can optionally be split into ltr/rtl sections: - * { - * 'ltr': { - * 'android': null, - * 'iphone': false - * }, - * 'rtl': { - * 'android': false, - * // rules are not inherited from ltr - * 'iphone': false - * } - * } - * - * @param {Object} map Browser support map - * @param {Object} [profile] A client-profile object - * @param {boolean} [exactMatchOnly=false] Only return true if the browser is matched, otherwise - * returns true if the browser is not found. - * - * @returns {boolean} The current browser is in the support map - */ - test: function ( map, profile, exactMatchOnly ) { - /*jshint evil: true */ - - var conditions, dir, i, op, val; - profile = $.isPlainObject( profile ) ? profile : $.client.profile(); - if ( map.ltr && map.rtl ) { - dir = $( 'body' ).is( '.rtl' ) ? 'rtl' : 'ltr'; - map = map[dir]; - } - // Check over each browser condition to determine if we are running in a compatible client - if ( typeof map !== 'object' || map[profile.name] === undefined ) { - // Not found, return true if exactMatchOnly not set, false otherwise - return !exactMatchOnly; - } - conditions = map[profile.name]; - if ( conditions === false ) { - // Match no versions - return false; - } - if ( conditions === null ) { - // Match all versions - return true; - } - for ( i = 0; i < conditions.length; i++ ) { - op = conditions[i][0]; - val = conditions[i][1]; - if ( typeof val === 'string' ) { - if ( !( eval( 'profile.version' + op + '"' + val + '"' ) ) ) { - return false; - } - } else if ( typeof val === 'number' ) { - if ( !( eval( 'profile.versionNumber' + op + val ) ) ) { - return false; - } - } - } - - return true; - } - }; -}( jQuery ) ); diff --git a/resources/jquery/jquery.color.js b/resources/jquery/jquery.color.js deleted file mode 100644 index 8bc45c97..00000000 --- a/resources/jquery/jquery.color.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * jQuery Color Animations - * - * @author John Resig, 2007 - * @author Krinkle, 2011 - * Released under the MIT and GPL licenses. - * - * - 2011-01-05: Forked for MediaWiki. See also jQuery.colorUtil plugin - */ -( function ( $ ) { - - function getColor( elem, attr ) { - /*jshint boss:true */ - var color; - - do { - color = $.curCSS( elem, attr ); - - // Keep going until we find an element that has color, or we hit the body - if ( color !== '' && color !== 'transparent' || $.nodeName( elem, 'body' ) ) { - break; - } - - attr = 'backgroundColor'; - } while ( elem = elem.parentNode ); - - return $.colorUtil.getRGB( color ); - } - - // We override the animation for all of these color styles - $.each([ - 'backgroundColor', - 'borderBottomColor', - 'borderLeftColor', - 'borderRightColor', - 'borderTopColor', - 'color', - 'outlineColor' - ], function ( i, attr ) { - $.fx.step[attr] = function ( fx ) { - if ( fx.state === 0 ) { - fx.start = getColor( fx.elem, attr ); - fx.end = $.colorUtil.getRGB( fx.end ); - } - - fx.elem.style[attr] = 'rgb(' + [ - Math.max( Math.min( parseInt( (fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0], 10 ), 255 ), 0 ), - Math.max( Math.min( parseInt( (fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1], 10 ), 255 ), 0 ), - Math.max( Math.min( parseInt( (fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2], 10 ), 255 ), 0 ) - ].join( ',' ) + ')'; - }; - } ); - -}( jQuery ) ); diff --git a/resources/jquery/jquery.colorUtil.js b/resources/jquery/jquery.colorUtil.js deleted file mode 100644 index 9c6f9ecb..00000000 --- a/resources/jquery/jquery.colorUtil.js +++ /dev/null @@ -1,219 +0,0 @@ -/** - * jQuery Color Utilities - * Written by Krinkle in 2011 - * Released under the MIT and GPL licenses. - * Mostly based on other plugins and functions (linted and optimized a little). - * Sources cited inline. - */ -( function ( $ ) { - $.colorUtil = { - - // Color Conversion function from highlightFade - // By Blair Mitchelmore - // http://jquery.offput.ca/highlightFade/ - // Parse strings looking for color tuples [255,255,255] - getRGB : function ( color ) { - /*jshint boss:true */ - var result; - - // Check if we're already dealing with an array of colors - if ( color && $.isArray( color ) && color.length === 3 ) { - return color; - } - - // Look for rgb(num,num,num) - if (result = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color)) { - return [parseInt(result[1],10), parseInt(result[2],10), parseInt(result[3],10)]; - } - - // Look for rgb(num%,num%,num%) - if (result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color)) { - return [parseFloat(result[1],10)*2.55, parseFloat(result[2],10)*2.55, parseFloat(result[3])*2.55]; - } - - // Look for #a0b1c2 - if (result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color)) { - return [parseInt(result[1],16), parseInt(result[2],16), parseInt(result[3],16)]; - } - - // Look for #fff - if (result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color)) { - return [parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)]; - } - - // Look for rgba(0, 0, 0, 0) == transparent in Safari 3 - if (result = /rgba\(0, 0, 0, 0\)/.exec(color)) { - return $.colorUtil.colors.transparent; - } - - // Otherwise, we're most likely dealing with a named color - return $.colorUtil.colors[$.trim(color).toLowerCase()]; - }, - - // Some named colors to work with - // From Interface by Stefan Petre - // http://interface.eyecon.ro/ - colors: { - aqua: [0,255,255], - azure: [240,255,255], - beige: [245,245,220], - black: [0,0,0], - blue: [0,0,255], - brown: [165,42,42], - cyan: [0,255,255], - darkblue: [0,0,139], - darkcyan: [0,139,139], - darkgrey: [169,169,169], - darkgreen: [0,100,0], - darkkhaki: [189,183,107], - darkmagenta: [139,0,139], - darkolivegreen: [85,107,47], - darkorange: [255,140,0], - darkorchid: [153,50,204], - darkred: [139,0,0], - darksalmon: [233,150,122], - darkviolet: [148,0,211], - fuchsia: [255,0,255], - gold: [255,215,0], - green: [0,128,0], - indigo: [75,0,130], - khaki: [240,230,140], - lightblue: [173,216,230], - lightcyan: [224,255,255], - lightgreen: [144,238,144], - lightgrey: [211,211,211], - lightpink: [255,182,193], - lightyellow: [255,255,224], - lime: [0,255,0], - magenta: [255,0,255], - maroon: [128,0,0], - navy: [0,0,128], - olive: [128,128,0], - orange: [255,165,0], - pink: [255,192,203], - purple: [128,0,128], - violet: [128,0,128], - red: [255,0,0], - silver: [192,192,192], - white: [255,255,255], - yellow: [255,255,0], - transparent: [255,255,255] - }, - - /** - * http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript - * Converts an RGB color value to HSL. Conversion formula - * adapted from http://en.wikipedia.org/wiki/HSL_color_space. - * Assumes r, g, and b are contained in the set [0, 255] and - * returns h, s, and l in the set [0, 1]. - * - * @param Number R The red color value - * @param Number G The green color value - * @param Number B The blue color value - * @return Array The HSL representation - */ - rgbToHsl: function ( R, G, B ) { - var d, - r = R / 255, - g = G / 255, - b = B / 255, - max = Math.max( r, g, b ), min = Math.min( r, g, b ), - h, - s, - l = (max + min) / 2; - - if ( max === min ) { - // achromatic - h = s = 0; - } else { - d = max - min; - s = l > 0.5 ? d / (2 - max - min) : d / (max + min); - switch ( max ) { - case r: - h = (g - b) / d + (g < b ? 6 : 0); - break; - case g: - h = (b - r) / d + 2; - break; - case b: - h = (r - g) / d + 4; - break; - } - h /= 6; - } - - return [h, s, l]; - }, - - /** - * http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript - * Converts an HSL color value to RGB. Conversion formula - * adapted from http://en.wikipedia.org/wiki/HSL_color_space. - * Assumes h, s, and l are contained in the set [0, 1] and - * returns r, g, and b in the set [0, 255]. - * - * @param Number h The hue - * @param Number s The saturation - * @param Number l The lightness - * @return Array The RGB representation - */ - hslToRgb: function ( h, s, l ) { - var r, g, b, hue2rgb, q, p; - - if ( s === 0 ) { - r = g = b = l; // achromatic - } else { - hue2rgb = function ( p, q, t ) { - if ( t < 0 ) { - t += 1; - } - if ( t > 1 ) { - t -= 1; - } - if ( t < 1/6 ) { - return p + (q - p) * 6 * t; - } - if ( t < 1/2 ) { - return q; - } - if ( t < 2/3 ) { - return p + (q - p) * (2/3 - t) * 6; - } - return p; - }; - - q = l < 0.5 ? l * (1 + s) : l + s - l * s; - p = 2 * l - q; - r = hue2rgb( p, q, h + 1/3 ); - g = hue2rgb( p, q, h ); - b = hue2rgb( p, q, h - 1/3 ); - } - - return [r * 255, g * 255, b * 255]; - }, - - /** - * Get's a brighter or darker rgb() value string. - * - * @author Krinkle - * - * @example getCSSColorMod( 'red', +0.1 ) - * @example getCSSColorMod( 'rgb(200,50,50)', -0.2 ) - * - * @param Mixed currentColor current value in css - * @param Number mod wanted brightness modification between -1 and 1 - * @return String 'rgb(r,g,b)' - */ - getColorBrightness: function ( currentColor, mod ) { - var rgbArr = $.colorUtil.getRGB( currentColor ), - hslArr = $.colorUtil.rgbToHsl(rgbArr[0], rgbArr[1], rgbArr[2] ); - rgbArr = $.colorUtil.hslToRgb(hslArr[0], hslArr[1], hslArr[2]+mod); - - return 'rgb(' + - [parseInt( rgbArr[0], 10), parseInt( rgbArr[1], 10 ), parseInt( rgbArr[2], 10 )].join( ',' ) + - ')'; - } - - }; - -}( jQuery ) ); diff --git a/resources/jquery/jquery.cookie.js b/resources/jquery/jquery.cookie.js deleted file mode 100644 index 6d5974a2..00000000 --- a/resources/jquery/jquery.cookie.js +++ /dev/null @@ -1,47 +0,0 @@ -/*! - * jQuery Cookie Plugin - * https://github.com/carhartl/jquery-cookie - * - * Copyright 2011, Klaus Hartl - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://www.opensource.org/licenses/mit-license.php - * http://www.opensource.org/licenses/GPL-2.0 - */ -(function($) { - $.cookie = function(key, value, options) { - - // key and at least value given, set cookie... - if (arguments.length > 1 && (!/Object/.test(Object.prototype.toString.call(value)) || value === null || value === undefined)) { - options = $.extend({}, options); - - if (value === null || value === undefined) { - options.expires = -1; - } - - if (typeof options.expires === 'number') { - var days = options.expires, t = options.expires = new Date(); - t.setDate(t.getDate() + days); - } - - value = String(value); - - return (document.cookie = [ - encodeURIComponent(key), '=', options.raw ? value : encodeURIComponent(value), - options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE - options.path ? '; path=' + options.path : '', - options.domain ? '; domain=' + options.domain : '', - options.secure ? '; secure' : '' - ].join('')); - } - - // key and possibly options given, get cookie... - options = value || {}; - var decode = options.raw ? function(s) { return s; } : decodeURIComponent; - - var pairs = document.cookie.split('; '); - for (var i = 0, pair; pair = pairs[i] && pairs[i].split('='); i++) { - if (decode(pair[0]) === key) return decode(pair[1] || ''); // IE saves cookies with empty string as "c; ", e.g. without "=" as opposed to EOMB, thus pair[1] may be undefined - } - return null; - }; -})(jQuery); diff --git a/resources/jquery/jquery.cycle.all.js b/resources/jquery/jquery.cycle.all.js deleted file mode 100644 index d57fb720..00000000 --- a/resources/jquery/jquery.cycle.all.js +++ /dev/null @@ -1,1529 +0,0 @@ -/*! - * jQuery Cycle Plugin (with Transition Definitions) - * Examples and documentation at: http://jquery.malsup.com/cycle/ - * Copyright (c) 2007-2010 M. Alsup - * Version: 2.9999 (13-NOV-2011) - * Dual licensed under the MIT and GPL licenses. - * http://jquery.malsup.com/license.html - * Requires: jQuery v1.3.2 or later - */ -;(function($, undefined) { - -var ver = '2.9999'; - -// if $.support is not defined (pre jQuery 1.3) add what I need -if ($.support == undefined) { - $.support = { - opacity: !($.browser.msie) - }; -} - -function debug(s) { - $.fn.cycle.debug && log(s); -} -function log() { - window.console && console.log && console.log('[cycle] ' + Array.prototype.join.call(arguments,' ')); -} -$.expr[':'].paused = function(el) { - return el.cyclePause; -} - - -// the options arg can be... -// a number - indicates an immediate transition should occur to the given slide index -// a string - 'pause', 'resume', 'toggle', 'next', 'prev', 'stop', 'destroy' or the name of a transition effect (ie, 'fade', 'zoom', etc) -// an object - properties to control the slideshow -// -// the arg2 arg can be... -// the name of an fx (only used in conjunction with a numeric value for 'options') -// the value true (only used in first arg == 'resume') and indicates -// that the resume should occur immediately (not wait for next timeout) - -$.fn.cycle = function(options, arg2) { - var o = { s: this.selector, c: this.context }; - - // in 1.3+ we can fix mistakes with the ready state - if (this.length === 0 && options != 'stop') { - if (!$.isReady && o.s) { - log('DOM not ready, queuing slideshow'); - $(function() { - $(o.s,o.c).cycle(options,arg2); - }); - return this; - } - // is your DOM ready? http://docs.jquery.com/Tutorials:Introducing_$(document).ready() - log('terminating; zero elements found by selector' + ($.isReady ? '' : ' (DOM not ready)')); - return this; - } - - // iterate the matched nodeset - return this.each(function() { - var opts = handleArguments(this, options, arg2); - if (opts === false) - return; - - opts.updateActivePagerLink = opts.updateActivePagerLink || $.fn.cycle.updateActivePagerLink; - - // stop existing slideshow for this container (if there is one) - if (this.cycleTimeout) - clearTimeout(this.cycleTimeout); - this.cycleTimeout = this.cyclePause = 0; - - var $cont = $(this); - var $slides = opts.slideExpr ? $(opts.slideExpr, this) : $cont.children(); - var els = $slides.get(); - - var opts2 = buildOptions($cont, $slides, els, opts, o); - if (opts2 === false) - return; - - if (els.length < 2) { - log('terminating; too few slides: ' + els.length); - return; - } - - var startTime = opts2.continuous ? 10 : getTimeout(els[opts2.currSlide], els[opts2.nextSlide], opts2, !opts2.backwards); - - // if it's an auto slideshow, kick it off - if (startTime) { - startTime += (opts2.delay || 0); - if (startTime < 10) - startTime = 10; - debug('first timeout: ' + startTime); - this.cycleTimeout = setTimeout(function(){go(els,opts2,0,!opts.backwards)}, startTime); - } - }); -}; - -function triggerPause(cont, byHover, onPager) { - var opts = $(cont).data('cycle.opts'); - var paused = !!cont.cyclePause; - if (paused && opts.paused) - opts.paused(cont, opts, byHover, onPager); - else if (!paused && opts.resumed) - opts.resumed(cont, opts, byHover, onPager); -} - -// process the args that were passed to the plugin fn -function handleArguments(cont, options, arg2) { - if (cont.cycleStop == undefined) - cont.cycleStop = 0; - if (options === undefined || options === null) - options = {}; - if (options.constructor == String) { - switch(options) { - case 'destroy': - case 'stop': - var opts = $(cont).data('cycle.opts'); - if (!opts) - return false; - cont.cycleStop++; // callbacks look for change - if (cont.cycleTimeout) - clearTimeout(cont.cycleTimeout); - cont.cycleTimeout = 0; - opts.elements && $(opts.elements).stop(); - $(cont).removeData('cycle.opts'); - if (options == 'destroy') - destroy(opts); - return false; - case 'toggle': - cont.cyclePause = (cont.cyclePause === 1) ? 0 : 1; - checkInstantResume(cont.cyclePause, arg2, cont); - triggerPause(cont); - return false; - case 'pause': - cont.cyclePause = 1; - triggerPause(cont); - return false; - case 'resume': - cont.cyclePause = 0; - checkInstantResume(false, arg2, cont); - triggerPause(cont); - return false; - case 'prev': - case 'next': - var opts = $(cont).data('cycle.opts'); - if (!opts) { - log('options not found, "prev/next" ignored'); - return false; - } - $.fn.cycle[options](opts); - return false; - default: - options = { fx: options }; - }; - return options; - } - else if (options.constructor == Number) { - // go to the requested slide - var num = options; - options = $(cont).data('cycle.opts'); - if (!options) { - log('options not found, can not advance slide'); - return false; - } - if (num < 0 || num >= options.elements.length) { - log('invalid slide index: ' + num); - return false; - } - options.nextSlide = num; - if (cont.cycleTimeout) { - clearTimeout(cont.cycleTimeout); - cont.cycleTimeout = 0; - } - if (typeof arg2 == 'string') - options.oneTimeFx = arg2; - go(options.elements, options, 1, num >= options.currSlide); - return false; - } - return options; - - function checkInstantResume(isPaused, arg2, cont) { - if (!isPaused && arg2 === true) { // resume now! - var options = $(cont).data('cycle.opts'); - if (!options) { - log('options not found, can not resume'); - return false; - } - if (cont.cycleTimeout) { - clearTimeout(cont.cycleTimeout); - cont.cycleTimeout = 0; - } - go(options.elements, options, 1, !options.backwards); - } - } -}; - -function removeFilter(el, opts) { - if (!$.support.opacity && opts.cleartype && el.style.filter) { - try { el.style.removeAttribute('filter'); } - catch(smother) {} // handle old opera versions - } -}; - -// unbind event handlers -function destroy(opts) { - if (opts.next) - $(opts.next).unbind(opts.prevNextEvent); - if (opts.prev) - $(opts.prev).unbind(opts.prevNextEvent); - - if (opts.pager || opts.pagerAnchorBuilder) - $.each(opts.pagerAnchors || [], function() { - this.unbind().remove(); - }); - opts.pagerAnchors = null; - if (opts.destroy) // callback - opts.destroy(opts); -}; - -// one-time initialization -function buildOptions($cont, $slides, els, options, o) { - var startingSlideSpecified; - // support metadata plugin (v1.0 and v2.0) - var opts = $.extend({}, $.fn.cycle.defaults, options || {}, $.metadata ? $cont.metadata() : $.meta ? $cont.data() : {}); - var meta = $.isFunction($cont.data) ? $cont.data(opts.metaAttr) : null; - if (meta) - opts = $.extend(opts, meta); - if (opts.autostop) - opts.countdown = opts.autostopCount || els.length; - - var cont = $cont[0]; - $cont.data('cycle.opts', opts); - opts.$cont = $cont; - opts.stopCount = cont.cycleStop; - opts.elements = els; - opts.before = opts.before ? [opts.before] : []; - opts.after = opts.after ? [opts.after] : []; - - // push some after callbacks - if (!$.support.opacity && opts.cleartype) - opts.after.push(function() { removeFilter(this, opts); }); - if (opts.continuous) - opts.after.push(function() { go(els,opts,0,!opts.backwards); }); - - saveOriginalOpts(opts); - - // clearType corrections - if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg) - clearTypeFix($slides); - - // container requires non-static position so that slides can be position within - if ($cont.css('position') == 'static') - $cont.css('position', 'relative'); - if (opts.width) - $cont.width(opts.width); - if (opts.height && opts.height != 'auto') - $cont.height(opts.height); - - if (opts.startingSlide != undefined) { - opts.startingSlide = parseInt(opts.startingSlide,10); - if (opts.startingSlide >= els.length || opts.startSlide < 0) - opts.startingSlide = 0; // catch bogus input - else - startingSlideSpecified = true; - } - else if (opts.backwards) - opts.startingSlide = els.length - 1; - else - opts.startingSlide = 0; - - // if random, mix up the slide array - if (opts.random) { - opts.randomMap = []; - for (var i = 0; i < els.length; i++) - opts.randomMap.push(i); - opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;}); - if (startingSlideSpecified) { - // try to find the specified starting slide and if found set start slide index in the map accordingly - for ( var cnt = 0; cnt < els.length; cnt++ ) { - if ( opts.startingSlide == opts.randomMap[cnt] ) { - opts.randomIndex = cnt; - } - } - } - else { - opts.randomIndex = 1; - opts.startingSlide = opts.randomMap[1]; - } - } - else if (opts.startingSlide >= els.length) - opts.startingSlide = 0; // catch bogus input - opts.currSlide = opts.startingSlide || 0; - var first = opts.startingSlide; - - // set position and zIndex on all the slides - $slides.css({position: 'absolute', top:0, left:0}).hide().each(function(i) { - var z; - if (opts.backwards) - z = first ? i <= first ? els.length + (i-first) : first-i : els.length-i; - else - z = first ? i >= first ? els.length - (i-first) : first-i : els.length-i; - $(this).css('z-index', z) - }); - - // make sure first slide is visible - $(els[first]).css('opacity',1).show(); // opacity bit needed to handle restart use case - removeFilter(els[first], opts); - - // stretch slides - if (opts.fit) { - if (!opts.aspect) { - if (opts.width) - $slides.width(opts.width); - if (opts.height && opts.height != 'auto') - $slides.height(opts.height); - } else { - $slides.each(function(){ - var $slide = $(this); - var ratio = (opts.aspect === true) ? $slide.width()/$slide.height() : opts.aspect; - if( opts.width && $slide.width() != opts.width ) { - $slide.width( opts.width ); - $slide.height( opts.width / ratio ); - } - - if( opts.height && $slide.height() < opts.height ) { - $slide.height( opts.height ); - $slide.width( opts.height * ratio ); - } - }); - } - } - - if (opts.center && ((!opts.fit) || opts.aspect)) { - $slides.each(function(){ - var $slide = $(this); - $slide.css({ - "margin-left": opts.width ? - ((opts.width - $slide.width()) / 2) + "px" : - 0, - "margin-top": opts.height ? - ((opts.height - $slide.height()) / 2) + "px" : - 0 - }); - }); - } - - if (opts.center && !opts.fit && !opts.slideResize) { - $slides.each(function(){ - var $slide = $(this); - $slide.css({ - "margin-left": opts.width ? ((opts.width - $slide.width()) / 2) + "px" : 0, - "margin-top": opts.height ? ((opts.height - $slide.height()) / 2) + "px" : 0 - }); - }); - } - - // stretch container - var reshape = opts.containerResize && !$cont.innerHeight(); - if (reshape) { // do this only if container has no size http://tinyurl.com/da2oa9 - var maxw = 0, maxh = 0; - for(var j=0; j < els.length; j++) { - var $e = $(els[j]), e = $e[0], w = $e.outerWidth(), h = $e.outerHeight(); - if (!w) w = e.offsetWidth || e.width || $e.attr('width'); - if (!h) h = e.offsetHeight || e.height || $e.attr('height'); - maxw = w > maxw ? w : maxw; - maxh = h > maxh ? h : maxh; - } - if (maxw > 0 && maxh > 0) - $cont.css({width:maxw+'px',height:maxh+'px'}); - } - - var pauseFlag = false; // https://github.com/malsup/cycle/issues/44 - if (opts.pause) - $cont.hover( - function(){ - pauseFlag = true; - this.cyclePause++; - triggerPause(cont, true); - }, - function(){ - pauseFlag && this.cyclePause--; - triggerPause(cont, true); - } - ); - - if (supportMultiTransitions(opts) === false) - return false; - - // apparently a lot of people use image slideshows without height/width attributes on the images. - // Cycle 2.50+ requires the sizing info for every slide; this block tries to deal with that. - var requeue = false; - options.requeueAttempts = options.requeueAttempts || 0; - $slides.each(function() { - // try to get height/width of each slide - var $el = $(this); - this.cycleH = (opts.fit && opts.height) ? opts.height : ($el.height() || this.offsetHeight || this.height || $el.attr('height') || 0); - this.cycleW = (opts.fit && opts.width) ? opts.width : ($el.width() || this.offsetWidth || this.width || $el.attr('width') || 0); - - if ( $el.is('img') ) { - // sigh.. sniffing, hacking, shrugging... this crappy hack tries to account for what browsers do when - // an image is being downloaded and the markup did not include sizing info (height/width attributes); - // there seems to be some "default" sizes used in this situation - var loadingIE = ($.browser.msie && this.cycleW == 28 && this.cycleH == 30 && !this.complete); - var loadingFF = ($.browser.mozilla && this.cycleW == 34 && this.cycleH == 19 && !this.complete); - var loadingOp = ($.browser.opera && ((this.cycleW == 42 && this.cycleH == 19) || (this.cycleW == 37 && this.cycleH == 17)) && !this.complete); - var loadingOther = (this.cycleH == 0 && this.cycleW == 0 && !this.complete); - // don't requeue for images that are still loading but have a valid size - if (loadingIE || loadingFF || loadingOp || loadingOther) { - if (o.s && opts.requeueOnImageNotLoaded && ++options.requeueAttempts < 100) { // track retry count so we don't loop forever - log(options.requeueAttempts,' - img slide not loaded, requeuing slideshow: ', this.src, this.cycleW, this.cycleH); - setTimeout(function() {$(o.s,o.c).cycle(options)}, opts.requeueTimeout); - requeue = true; - return false; // break each loop - } - else { - log('could not determine size of image: '+this.src, this.cycleW, this.cycleH); - } - } - } - return true; - }); - - if (requeue) - return false; - - opts.cssBefore = opts.cssBefore || {}; - opts.cssAfter = opts.cssAfter || {}; - opts.cssFirst = opts.cssFirst || {}; - opts.animIn = opts.animIn || {}; - opts.animOut = opts.animOut || {}; - - $slides.not(':eq('+first+')').css(opts.cssBefore); - $($slides[first]).css(opts.cssFirst); - - if (opts.timeout) { - opts.timeout = parseInt(opts.timeout,10); - // ensure that timeout and speed settings are sane - if (opts.speed.constructor == String) - opts.speed = $.fx.speeds[opts.speed] || parseInt(opts.speed,10); - if (!opts.sync) - opts.speed = opts.speed / 2; - - var buffer = opts.fx == 'none' ? 0 : opts.fx == 'shuffle' ? 500 : 250; - while((opts.timeout - opts.speed) < buffer) // sanitize timeout - opts.timeout += opts.speed; - } - if (opts.easing) - opts.easeIn = opts.easeOut = opts.easing; - if (!opts.speedIn) - opts.speedIn = opts.speed; - if (!opts.speedOut) - opts.speedOut = opts.speed; - - opts.slideCount = els.length; - opts.currSlide = opts.lastSlide = first; - if (opts.random) { - if (++opts.randomIndex == els.length) - opts.randomIndex = 0; - opts.nextSlide = opts.randomMap[opts.randomIndex]; - } - else if (opts.backwards) - opts.nextSlide = opts.startingSlide == 0 ? (els.length-1) : opts.startingSlide-1; - else - opts.nextSlide = opts.startingSlide >= (els.length-1) ? 0 : opts.startingSlide+1; - - // run transition init fn - if (!opts.multiFx) { - var init = $.fn.cycle.transitions[opts.fx]; - if ($.isFunction(init)) - init($cont, $slides, opts); - else if (opts.fx != 'custom' && !opts.multiFx) { - log('unknown transition: ' + opts.fx,'; slideshow terminating'); - return false; - } - } - - // fire artificial events - var e0 = $slides[first]; - if (!opts.skipInitializationCallbacks) { - if (opts.before.length) - opts.before[0].apply(e0, [e0, e0, opts, true]); - if (opts.after.length) - opts.after[0].apply(e0, [e0, e0, opts, true]); - } - if (opts.next) - $(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,1)}); - if (opts.prev) - $(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,0)}); - if (opts.pager || opts.pagerAnchorBuilder) - buildPager(els,opts); - - exposeAddSlide(opts, els); - - return opts; -}; - -// save off original opts so we can restore after clearing state -function saveOriginalOpts(opts) { - opts.original = { before: [], after: [] }; - opts.original.cssBefore = $.extend({}, opts.cssBefore); - opts.original.cssAfter = $.extend({}, opts.cssAfter); - opts.original.animIn = $.extend({}, opts.animIn); - opts.original.animOut = $.extend({}, opts.animOut); - $.each(opts.before, function() { opts.original.before.push(this); }); - $.each(opts.after, function() { opts.original.after.push(this); }); -}; - -function supportMultiTransitions(opts) { - var i, tx, txs = $.fn.cycle.transitions; - // look for multiple effects - if (opts.fx.indexOf(',') > 0) { - opts.multiFx = true; - opts.fxs = opts.fx.replace(/\s*/g,'').split(','); - // discard any bogus effect names - for (i=0; i < opts.fxs.length; i++) { - var fx = opts.fxs[i]; - tx = txs[fx]; - if (!tx || !txs.hasOwnProperty(fx) || !$.isFunction(tx)) { - log('discarding unknown transition: ',fx); - opts.fxs.splice(i,1); - i--; - } - } - // if we have an empty list then we threw everything away! - if (!opts.fxs.length) { - log('No valid transitions named; slideshow terminating.'); - return false; - } - } - else if (opts.fx == 'all') { // auto-gen the list of transitions - opts.multiFx = true; - opts.fxs = []; - for (p in txs) { - tx = txs[p]; - if (txs.hasOwnProperty(p) && $.isFunction(tx)) - opts.fxs.push(p); - } - } - if (opts.multiFx && opts.randomizeEffects) { - // munge the fxs array to make effect selection random - var r1 = Math.floor(Math.random() * 20) + 30; - for (i = 0; i < r1; i++) { - var r2 = Math.floor(Math.random() * opts.fxs.length); - opts.fxs.push(opts.fxs.splice(r2,1)[0]); - } - debug('randomized fx sequence: ',opts.fxs); - } - return true; -}; - -// provide a mechanism for adding slides after the slideshow has started -function exposeAddSlide(opts, els) { - opts.addSlide = function(newSlide, prepend) { - var $s = $(newSlide), s = $s[0]; - if (!opts.autostopCount) - opts.countdown++; - els[prepend?'unshift':'push'](s); - if (opts.els) - opts.els[prepend?'unshift':'push'](s); // shuffle needs this - opts.slideCount = els.length; - - // add the slide to the random map and resort - if (opts.random) { - opts.randomMap.push(opts.slideCount-1); - opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;}); - } - - $s.css('position','absolute'); - $s[prepend?'prependTo':'appendTo'](opts.$cont); - - if (prepend) { - opts.currSlide++; - opts.nextSlide++; - } - - if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg) - clearTypeFix($s); - - if (opts.fit && opts.width) - $s.width(opts.width); - if (opts.fit && opts.height && opts.height != 'auto') - $s.height(opts.height); - s.cycleH = (opts.fit && opts.height) ? opts.height : $s.height(); - s.cycleW = (opts.fit && opts.width) ? opts.width : $s.width(); - - $s.css(opts.cssBefore); - - if (opts.pager || opts.pagerAnchorBuilder) - $.fn.cycle.createPagerAnchor(els.length-1, s, $(opts.pager), els, opts); - - if ($.isFunction(opts.onAddSlide)) - opts.onAddSlide($s); - else - $s.hide(); // default behavior - }; -} - -// reset internal state; we do this on every pass in order to support multiple effects -$.fn.cycle.resetState = function(opts, fx) { - fx = fx || opts.fx; - opts.before = []; opts.after = []; - opts.cssBefore = $.extend({}, opts.original.cssBefore); - opts.cssAfter = $.extend({}, opts.original.cssAfter); - opts.animIn = $.extend({}, opts.original.animIn); - opts.animOut = $.extend({}, opts.original.animOut); - opts.fxFn = null; - $.each(opts.original.before, function() { opts.before.push(this); }); - $.each(opts.original.after, function() { opts.after.push(this); }); - - // re-init - var init = $.fn.cycle.transitions[fx]; - if ($.isFunction(init)) - init(opts.$cont, $(opts.elements), opts); -}; - -// this is the main engine fn, it handles the timeouts, callbacks and slide index mgmt -function go(els, opts, manual, fwd) { - // opts.busy is true if we're in the middle of an animation - if (manual && opts.busy && opts.manualTrump) { - // let manual transitions requests trump active ones - debug('manualTrump in go(), stopping active transition'); - $(els).stop(true,true); - opts.busy = 0; - } - // don't begin another timeout-based transition if there is one active - if (opts.busy) { - debug('transition active, ignoring new tx request'); - return; - } - - var p = opts.$cont[0], curr = els[opts.currSlide], next = els[opts.nextSlide]; - - // stop cycling if we have an outstanding stop request - if (p.cycleStop != opts.stopCount || p.cycleTimeout === 0 && !manual) - return; - - // check to see if we should stop cycling based on autostop options - if (!manual && !p.cyclePause && !opts.bounce && - ((opts.autostop && (--opts.countdown <= 0)) || - (opts.nowrap && !opts.random && opts.nextSlide < opts.currSlide))) { - if (opts.end) - opts.end(opts); - return; - } - - // if slideshow is paused, only transition on a manual trigger - var changed = false; - if ((manual || !p.cyclePause) && (opts.nextSlide != opts.currSlide)) { - changed = true; - var fx = opts.fx; - // keep trying to get the slide size if we don't have it yet - curr.cycleH = curr.cycleH || $(curr).height(); - curr.cycleW = curr.cycleW || $(curr).width(); - next.cycleH = next.cycleH || $(next).height(); - next.cycleW = next.cycleW || $(next).width(); - - // support multiple transition types - if (opts.multiFx) { - if (fwd && (opts.lastFx == undefined || ++opts.lastFx >= opts.fxs.length)) - opts.lastFx = 0; - else if (!fwd && (opts.lastFx == undefined || --opts.lastFx < 0)) - opts.lastFx = opts.fxs.length - 1; - fx = opts.fxs[opts.lastFx]; - } - - // one-time fx overrides apply to: $('div').cycle(3,'zoom'); - if (opts.oneTimeFx) { - fx = opts.oneTimeFx; - opts.oneTimeFx = null; - } - - $.fn.cycle.resetState(opts, fx); - - // run the before callbacks - if (opts.before.length) - $.each(opts.before, function(i,o) { - if (p.cycleStop != opts.stopCount) return; - o.apply(next, [curr, next, opts, fwd]); - }); - - // stage the after callacks - var after = function() { - opts.busy = 0; - $.each(opts.after, function(i,o) { - if (p.cycleStop != opts.stopCount) return; - o.apply(next, [curr, next, opts, fwd]); - }); - if (!p.cycleStop) { - // queue next transition - queueNext(); - } - }; - - debug('tx firing('+fx+'); currSlide: ' + opts.currSlide + '; nextSlide: ' + opts.nextSlide); - - // get ready to perform the transition - opts.busy = 1; - if (opts.fxFn) // fx function provided? - opts.fxFn(curr, next, opts, after, fwd, manual && opts.fastOnEvent); - else if ($.isFunction($.fn.cycle[opts.fx])) // fx plugin ? - $.fn.cycle[opts.fx](curr, next, opts, after, fwd, manual && opts.fastOnEvent); - else - $.fn.cycle.custom(curr, next, opts, after, fwd, manual && opts.fastOnEvent); - } - else { - queueNext(); - } - - if (changed || opts.nextSlide == opts.currSlide) { - // calculate the next slide - opts.lastSlide = opts.currSlide; - if (opts.random) { - opts.currSlide = opts.nextSlide; - if (++opts.randomIndex == els.length) { - opts.randomIndex = 0; - opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;}); - } - opts.nextSlide = opts.randomMap[opts.randomIndex]; - if (opts.nextSlide == opts.currSlide) - opts.nextSlide = (opts.currSlide == opts.slideCount - 1) ? 0 : opts.currSlide + 1; - } - else if (opts.backwards) { - var roll = (opts.nextSlide - 1) < 0; - if (roll && opts.bounce) { - opts.backwards = !opts.backwards; - opts.nextSlide = 1; - opts.currSlide = 0; - } - else { - opts.nextSlide = roll ? (els.length-1) : opts.nextSlide-1; - opts.currSlide = roll ? 0 : opts.nextSlide+1; - } - } - else { // sequence - var roll = (opts.nextSlide + 1) == els.length; - if (roll && opts.bounce) { - opts.backwards = !opts.backwards; - opts.nextSlide = els.length-2; - opts.currSlide = els.length-1; - } - else { - opts.nextSlide = roll ? 0 : opts.nextSlide+1; - opts.currSlide = roll ? els.length-1 : opts.nextSlide-1; - } - } - } - if (changed && opts.pager) - opts.updateActivePagerLink(opts.pager, opts.currSlide, opts.activePagerClass); - - function queueNext() { - // stage the next transition - var ms = 0, timeout = opts.timeout; - if (opts.timeout && !opts.continuous) { - ms = getTimeout(els[opts.currSlide], els[opts.nextSlide], opts, fwd); - if (opts.fx == 'shuffle') - ms -= opts.speedOut; - } - else if (opts.continuous && p.cyclePause) // continuous shows work off an after callback, not this timer logic - ms = 10; - if (ms > 0) - p.cycleTimeout = setTimeout(function(){ go(els, opts, 0, !opts.backwards) }, ms); - } -}; - -// invoked after transition -$.fn.cycle.updateActivePagerLink = function(pager, currSlide, clsName) { - $(pager).each(function() { - $(this).children().removeClass(clsName).eq(currSlide).addClass(clsName); - }); -}; - -// calculate timeout value for current transition -function getTimeout(curr, next, opts, fwd) { - if (opts.timeoutFn) { - // call user provided calc fn - var t = opts.timeoutFn.call(curr,curr,next,opts,fwd); - while (opts.fx != 'none' && (t - opts.speed) < 250) // sanitize timeout - t += opts.speed; - debug('calculated timeout: ' + t + '; speed: ' + opts.speed); - if (t !== false) - return t; - } - return opts.timeout; -}; - -// expose next/prev function, caller must pass in state -$.fn.cycle.next = function(opts) { advance(opts,1); }; -$.fn.cycle.prev = function(opts) { advance(opts,0);}; - -// advance slide forward or back -function advance(opts, moveForward) { - var val = moveForward ? 1 : -1; - var els = opts.elements; - var p = opts.$cont[0], timeout = p.cycleTimeout; - if (timeout) { - clearTimeout(timeout); - p.cycleTimeout = 0; - } - if (opts.random && val < 0) { - // move back to the previously display slide - opts.randomIndex--; - if (--opts.randomIndex == -2) - opts.randomIndex = els.length-2; - else if (opts.randomIndex == -1) - opts.randomIndex = els.length-1; - opts.nextSlide = opts.randomMap[opts.randomIndex]; - } - else if (opts.random) { - opts.nextSlide = opts.randomMap[opts.randomIndex]; - } - else { - opts.nextSlide = opts.currSlide + val; - if (opts.nextSlide < 0) { - if (opts.nowrap) return false; - opts.nextSlide = els.length - 1; - } - else if (opts.nextSlide >= els.length) { - if (opts.nowrap) return false; - opts.nextSlide = 0; - } - } - - var cb = opts.onPrevNextEvent || opts.prevNextClick; // prevNextClick is deprecated - if ($.isFunction(cb)) - cb(val > 0, opts.nextSlide, els[opts.nextSlide]); - go(els, opts, 1, moveForward); - return false; -}; - -function buildPager(els, opts) { - var $p = $(opts.pager); - $.each(els, function(i,o) { - $.fn.cycle.createPagerAnchor(i,o,$p,els,opts); - }); - opts.updateActivePagerLink(opts.pager, opts.startingSlide, opts.activePagerClass); -}; - -$.fn.cycle.createPagerAnchor = function(i, el, $p, els, opts) { - var a; - if ($.isFunction(opts.pagerAnchorBuilder)) { - a = opts.pagerAnchorBuilder(i,el); - debug('pagerAnchorBuilder('+i+', el) returned: ' + a); - } - else - a = ''+(i+1)+''; - - if (!a) - return; - var $a = $(a); - // don't reparent if anchor is in the dom - if ($a.parents('body').length === 0) { - var arr = []; - if ($p.length > 1) { - $p.each(function() { - var $clone = $a.clone(true); - $(this).append($clone); - arr.push($clone[0]); - }); - $a = $(arr); - } - else { - $a.appendTo($p); - } - } - - opts.pagerAnchors = opts.pagerAnchors || []; - opts.pagerAnchors.push($a); - - var pagerFn = function(e) { - e.preventDefault(); - opts.nextSlide = i; - var p = opts.$cont[0], timeout = p.cycleTimeout; - if (timeout) { - clearTimeout(timeout); - p.cycleTimeout = 0; - } - var cb = opts.onPagerEvent || opts.pagerClick; // pagerClick is deprecated - if ($.isFunction(cb)) - cb(opts.nextSlide, els[opts.nextSlide]); - go(els,opts,1,opts.currSlide < i); // trigger the trans -// return false; // <== allow bubble - } - - if ( /mouseenter|mouseover/i.test(opts.pagerEvent) ) { - $a.hover(pagerFn, function(){/* no-op */} ); - } - else { - $a.bind(opts.pagerEvent, pagerFn); - } - - if ( ! /^click/.test(opts.pagerEvent) && !opts.allowPagerClickBubble) - $a.bind('click.cycle', function(){return false;}); // suppress click - - var cont = opts.$cont[0]; - var pauseFlag = false; // https://github.com/malsup/cycle/issues/44 - if (opts.pauseOnPagerHover) { - $a.hover( - function() { - pauseFlag = true; - cont.cyclePause++; - triggerPause(cont,true,true); - }, function() { - pauseFlag && cont.cyclePause--; - triggerPause(cont,true,true); - } - ); - } -}; - -// helper fn to calculate the number of slides between the current and the next -$.fn.cycle.hopsFromLast = function(opts, fwd) { - var hops, l = opts.lastSlide, c = opts.currSlide; - if (fwd) - hops = c > l ? c - l : opts.slideCount - l; - else - hops = c < l ? l - c : l + opts.slideCount - c; - return hops; -}; - -// fix clearType problems in ie6 by setting an explicit bg color -// (otherwise text slides look horrible during a fade transition) -function clearTypeFix($slides) { - debug('applying clearType background-color hack'); - function hex(s) { - s = parseInt(s,10).toString(16); - return s.length < 2 ? '0'+s : s; - }; - function getBg(e) { - for ( ; e && e.nodeName.toLowerCase() != 'html'; e = e.parentNode) { - var v = $.css(e,'background-color'); - if (v && v.indexOf('rgb') >= 0 ) { - var rgb = v.match(/\d+/g); - return '#'+ hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]); - } - if (v && v != 'transparent') - return v; - } - return '#ffffff'; - }; - $slides.each(function() { $(this).css('background-color', getBg(this)); }); -}; - -// reset common props before the next transition -$.fn.cycle.commonReset = function(curr,next,opts,w,h,rev) { - $(opts.elements).not(curr).hide(); - if (typeof opts.cssBefore.opacity == 'undefined') - opts.cssBefore.opacity = 1; - opts.cssBefore.display = 'block'; - if (opts.slideResize && w !== false && next.cycleW > 0) - opts.cssBefore.width = next.cycleW; - if (opts.slideResize && h !== false && next.cycleH > 0) - opts.cssBefore.height = next.cycleH; - opts.cssAfter = opts.cssAfter || {}; - opts.cssAfter.display = 'none'; - $(curr).css('zIndex',opts.slideCount + (rev === true ? 1 : 0)); - $(next).css('zIndex',opts.slideCount + (rev === true ? 0 : 1)); -}; - -// the actual fn for effecting a transition -$.fn.cycle.custom = function(curr, next, opts, cb, fwd, speedOverride) { - var $l = $(curr), $n = $(next); - var speedIn = opts.speedIn, speedOut = opts.speedOut, easeIn = opts.easeIn, easeOut = opts.easeOut; - $n.css(opts.cssBefore); - if (speedOverride) { - if (typeof speedOverride == 'number') - speedIn = speedOut = speedOverride; - else - speedIn = speedOut = 1; - easeIn = easeOut = null; - } - var fn = function() { - $n.animate(opts.animIn, speedIn, easeIn, function() { - cb(); - }); - }; - $l.animate(opts.animOut, speedOut, easeOut, function() { - $l.css(opts.cssAfter); - if (!opts.sync) - fn(); - }); - if (opts.sync) fn(); -}; - -// transition definitions - only fade is defined here, transition pack defines the rest -$.fn.cycle.transitions = { - fade: function($cont, $slides, opts) { - $slides.not(':eq('+opts.currSlide+')').css('opacity',0); - opts.before.push(function(curr,next,opts) { - $.fn.cycle.commonReset(curr,next,opts); - opts.cssBefore.opacity = 0; - }); - opts.animIn = { opacity: 1 }; - opts.animOut = { opacity: 0 }; - opts.cssBefore = { top: 0, left: 0 }; - } -}; - -$.fn.cycle.ver = function() { return ver; }; - -// override these globally if you like (they are all optional) -$.fn.cycle.defaults = { - activePagerClass: 'activeSlide', // class name used for the active pager link - after: null, // transition callback (scope set to element that was shown): function(currSlideElement, nextSlideElement, options, forwardFlag) - allowPagerClickBubble: false, // allows or prevents click event on pager anchors from bubbling - animIn: null, // properties that define how the slide animates in - animOut: null, // properties that define how the slide animates out - aspect: false, // preserve aspect ratio during fit resizing, cropping if necessary (must be used with fit option) - autostop: 0, // true to end slideshow after X transitions (where X == slide count) - autostopCount: 0, // number of transitions (optionally used with autostop to define X) - backwards: false, // true to start slideshow at last slide and move backwards through the stack - before: null, // transition callback (scope set to element to be shown): function(currSlideElement, nextSlideElement, options, forwardFlag) - center: null, // set to true to have cycle add top/left margin to each slide (use with width and height options) - cleartype: !$.support.opacity, // true if clearType corrections should be applied (for IE) - cleartypeNoBg: false, // set to true to disable extra cleartype fixing (leave false to force background color setting on slides) - containerResize: 1, // resize container to fit largest slide - continuous: 0, // true to start next transition immediately after current one completes - cssAfter: null, // properties that defined the state of the slide after transitioning out - cssBefore: null, // properties that define the initial state of the slide before transitioning in - delay: 0, // additional delay (in ms) for first transition (hint: can be negative) - easeIn: null, // easing for "in" transition - easeOut: null, // easing for "out" transition - easing: null, // easing method for both in and out transitions - end: null, // callback invoked when the slideshow terminates (use with autostop or nowrap options): function(options) - fastOnEvent: 0, // force fast transitions when triggered manually (via pager or prev/next); value == time in ms - fit: 0, // force slides to fit container - fx: 'fade', // name of transition effect (or comma separated names, ex: 'fade,scrollUp,shuffle') - fxFn: null, // function used to control the transition: function(currSlideElement, nextSlideElement, options, afterCalback, forwardFlag) - height: 'auto', // container height (if the 'fit' option is true, the slides will be set to this height as well) - manualTrump: true, // causes manual transition to stop an active transition instead of being ignored - metaAttr: 'cycle',// data- attribute that holds the option data for the slideshow - next: null, // element, jQuery object, or jQuery selector string for the element to use as event trigger for next slide - nowrap: 0, // true to prevent slideshow from wrapping - onPagerEvent: null, // callback fn for pager events: function(zeroBasedSlideIndex, slideElement) - onPrevNextEvent: null,// callback fn for prev/next events: function(isNext, zeroBasedSlideIndex, slideElement) - pager: null, // element, jQuery object, or jQuery selector string for the element to use as pager container - pagerAnchorBuilder: null, // callback fn for building anchor links: function(index, DOMelement) - pagerEvent: 'click.cycle', // name of event which drives the pager navigation - pause: 0, // true to enable "pause on hover" - pauseOnPagerHover: 0, // true to pause when hovering over pager link - prev: null, // element, jQuery object, or jQuery selector string for the element to use as event trigger for previous slide - prevNextEvent:'click.cycle',// event which drives the manual transition to the previous or next slide - random: 0, // true for random, false for sequence (not applicable to shuffle fx) - randomizeEffects: 1, // valid when multiple effects are used; true to make the effect sequence random - requeueOnImageNotLoaded: true, // requeue the slideshow if any image slides are not yet loaded - requeueTimeout: 250, // ms delay for requeue - rev: 0, // causes animations to transition in reverse (for effects that support it such as scrollHorz/scrollVert/shuffle) - shuffle: null, // coords for shuffle animation, ex: { top:15, left: 200 } - skipInitializationCallbacks: false, // set to true to disable the first before/after callback that occurs prior to any transition - slideExpr: null, // expression for selecting slides (if something other than all children is required) - slideResize: 1, // force slide width/height to fixed size before every transition - speed: 1000, // speed of the transition (any valid fx speed value) - speedIn: null, // speed of the 'in' transition - speedOut: null, // speed of the 'out' transition - startingSlide: undefined, // zero-based index of the first slide to be displayed - sync: 1, // true if in/out transitions should occur simultaneously - timeout: 4000, // milliseconds between slide transitions (0 to disable auto advance) - timeoutFn: null, // callback for determining per-slide timeout value: function(currSlideElement, nextSlideElement, options, forwardFlag) - updateActivePagerLink: null, // callback fn invoked to update the active pager link (adds/removes activePagerClass style) - width: null // container width (if the 'fit' option is true, the slides will be set to this width as well) -}; - -})(jQuery); - - -/*! - * jQuery Cycle Plugin Transition Definitions - * This script is a plugin for the jQuery Cycle Plugin - * Examples and documentation at: http://malsup.com/jquery/cycle/ - * Copyright (c) 2007-2010 M. Alsup - * Version: 2.73 - * Dual licensed under the MIT and GPL licenses: - * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - */ -(function($) { - -// -// These functions define slide initialization and properties for the named -// transitions. To save file size feel free to remove any of these that you -// don't need. -// -$.fn.cycle.transitions.none = function($cont, $slides, opts) { - opts.fxFn = function(curr,next,opts,after){ - $(next).show(); - $(curr).hide(); - after(); - }; -}; - -// not a cross-fade, fadeout only fades out the top slide -$.fn.cycle.transitions.fadeout = function($cont, $slides, opts) { - $slides.not(':eq('+opts.currSlide+')').css({ display: 'block', 'opacity': 1 }); - opts.before.push(function(curr,next,opts,w,h,rev) { - $(curr).css('zIndex',opts.slideCount + (!rev === true ? 1 : 0)); - $(next).css('zIndex',opts.slideCount + (!rev === true ? 0 : 1)); - }); - opts.animIn.opacity = 1; - opts.animOut.opacity = 0; - opts.cssBefore.opacity = 1; - opts.cssBefore.display = 'block'; - opts.cssAfter.zIndex = 0; -}; - -// scrollUp/Down/Left/Right -$.fn.cycle.transitions.scrollUp = function($cont, $slides, opts) { - $cont.css('overflow','hidden'); - opts.before.push($.fn.cycle.commonReset); - var h = $cont.height(); - opts.cssBefore.top = h; - opts.cssBefore.left = 0; - opts.cssFirst.top = 0; - opts.animIn.top = 0; - opts.animOut.top = -h; -}; -$.fn.cycle.transitions.scrollDown = function($cont, $slides, opts) { - $cont.css('overflow','hidden'); - opts.before.push($.fn.cycle.commonReset); - var h = $cont.height(); - opts.cssFirst.top = 0; - opts.cssBefore.top = -h; - opts.cssBefore.left = 0; - opts.animIn.top = 0; - opts.animOut.top = h; -}; -$.fn.cycle.transitions.scrollLeft = function($cont, $slides, opts) { - $cont.css('overflow','hidden'); - opts.before.push($.fn.cycle.commonReset); - var w = $cont.width(); - opts.cssFirst.left = 0; - opts.cssBefore.left = w; - opts.cssBefore.top = 0; - opts.animIn.left = 0; - opts.animOut.left = 0-w; -}; -$.fn.cycle.transitions.scrollRight = function($cont, $slides, opts) { - $cont.css('overflow','hidden'); - opts.before.push($.fn.cycle.commonReset); - var w = $cont.width(); - opts.cssFirst.left = 0; - opts.cssBefore.left = -w; - opts.cssBefore.top = 0; - opts.animIn.left = 0; - opts.animOut.left = w; -}; -$.fn.cycle.transitions.scrollHorz = function($cont, $slides, opts) { - $cont.css('overflow','hidden').width(); - opts.before.push(function(curr, next, opts, fwd) { - if (opts.rev) - fwd = !fwd; - $.fn.cycle.commonReset(curr,next,opts); - opts.cssBefore.left = fwd ? (next.cycleW-1) : (1-next.cycleW); - opts.animOut.left = fwd ? -curr.cycleW : curr.cycleW; - }); - opts.cssFirst.left = 0; - opts.cssBefore.top = 0; - opts.animIn.left = 0; - opts.animOut.top = 0; -}; -$.fn.cycle.transitions.scrollVert = function($cont, $slides, opts) { - $cont.css('overflow','hidden'); - opts.before.push(function(curr, next, opts, fwd) { - if (opts.rev) - fwd = !fwd; - $.fn.cycle.commonReset(curr,next,opts); - opts.cssBefore.top = fwd ? (1-next.cycleH) : (next.cycleH-1); - opts.animOut.top = fwd ? curr.cycleH : -curr.cycleH; - }); - opts.cssFirst.top = 0; - opts.cssBefore.left = 0; - opts.animIn.top = 0; - opts.animOut.left = 0; -}; - -// slideX/slideY -$.fn.cycle.transitions.slideX = function($cont, $slides, opts) { - opts.before.push(function(curr, next, opts) { - $(opts.elements).not(curr).hide(); - $.fn.cycle.commonReset(curr,next,opts,false,true); - opts.animIn.width = next.cycleW; - }); - opts.cssBefore.left = 0; - opts.cssBefore.top = 0; - opts.cssBefore.width = 0; - opts.animIn.width = 'show'; - opts.animOut.width = 0; -}; -$.fn.cycle.transitions.slideY = function($cont, $slides, opts) { - opts.before.push(function(curr, next, opts) { - $(opts.elements).not(curr).hide(); - $.fn.cycle.commonReset(curr,next,opts,true,false); - opts.animIn.height = next.cycleH; - }); - opts.cssBefore.left = 0; - opts.cssBefore.top = 0; - opts.cssBefore.height = 0; - opts.animIn.height = 'show'; - opts.animOut.height = 0; -}; - -// shuffle -$.fn.cycle.transitions.shuffle = function($cont, $slides, opts) { - var i, w = $cont.css('overflow', 'visible').width(); - $slides.css({left: 0, top: 0}); - opts.before.push(function(curr,next,opts) { - $.fn.cycle.commonReset(curr,next,opts,true,true,true); - }); - // only adjust speed once! - if (!opts.speedAdjusted) { - opts.speed = opts.speed / 2; // shuffle has 2 transitions - opts.speedAdjusted = true; - } - opts.random = 0; - opts.shuffle = opts.shuffle || {left:-w, top:15}; - opts.els = []; - for (i=0; i < $slides.length; i++) - opts.els.push($slides[i]); - - for (i=0; i < opts.currSlide; i++) - opts.els.push(opts.els.shift()); - - // custom transition fn (hat tip to Benjamin Sterling for this bit of sweetness!) - opts.fxFn = function(curr, next, opts, cb, fwd) { - if (opts.rev) - fwd = !fwd; - var $el = fwd ? $(curr) : $(next); - $(next).css(opts.cssBefore); - var count = opts.slideCount; - $el.animate(opts.shuffle, opts.speedIn, opts.easeIn, function() { - var hops = $.fn.cycle.hopsFromLast(opts, fwd); - for (var k=0; k < hops; k++) - fwd ? opts.els.push(opts.els.shift()) : opts.els.unshift(opts.els.pop()); - if (fwd) { - for (var i=0, len=opts.els.length; i < len; i++) - $(opts.els[i]).css('z-index', len-i+count); - } - else { - var z = $(curr).css('z-index'); - $el.css('z-index', parseInt(z,10)+1+count); - } - $el.animate({left:0, top:0}, opts.speedOut, opts.easeOut, function() { - $(fwd ? this : curr).hide(); - if (cb) cb(); - }); - }); - }; - $.extend(opts.cssBefore, { display: 'block', opacity: 1, top: 0, left: 0 }); -}; - -// turnUp/Down/Left/Right -$.fn.cycle.transitions.turnUp = function($cont, $slides, opts) { - opts.before.push(function(curr, next, opts) { - $.fn.cycle.commonReset(curr,next,opts,true,false); - opts.cssBefore.top = next.cycleH; - opts.animIn.height = next.cycleH; - opts.animOut.width = next.cycleW; - }); - opts.cssFirst.top = 0; - opts.cssBefore.left = 0; - opts.cssBefore.height = 0; - opts.animIn.top = 0; - opts.animOut.height = 0; -}; -$.fn.cycle.transitions.turnDown = function($cont, $slides, opts) { - opts.before.push(function(curr, next, opts) { - $.fn.cycle.commonReset(curr,next,opts,true,false); - opts.animIn.height = next.cycleH; - opts.animOut.top = curr.cycleH; - }); - opts.cssFirst.top = 0; - opts.cssBefore.left = 0; - opts.cssBefore.top = 0; - opts.cssBefore.height = 0; - opts.animOut.height = 0; -}; -$.fn.cycle.transitions.turnLeft = function($cont, $slides, opts) { - opts.before.push(function(curr, next, opts) { - $.fn.cycle.commonReset(curr,next,opts,false,true); - opts.cssBefore.left = next.cycleW; - opts.animIn.width = next.cycleW; - }); - opts.cssBefore.top = 0; - opts.cssBefore.width = 0; - opts.animIn.left = 0; - opts.animOut.width = 0; -}; -$.fn.cycle.transitions.turnRight = function($cont, $slides, opts) { - opts.before.push(function(curr, next, opts) { - $.fn.cycle.commonReset(curr,next,opts,false,true); - opts.animIn.width = next.cycleW; - opts.animOut.left = curr.cycleW; - }); - $.extend(opts.cssBefore, { top: 0, left: 0, width: 0 }); - opts.animIn.left = 0; - opts.animOut.width = 0; -}; - -// zoom -$.fn.cycle.transitions.zoom = function($cont, $slides, opts) { - opts.before.push(function(curr, next, opts) { - $.fn.cycle.commonReset(curr,next,opts,false,false,true); - opts.cssBefore.top = next.cycleH/2; - opts.cssBefore.left = next.cycleW/2; - $.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: next.cycleH }); - $.extend(opts.animOut, { width: 0, height: 0, top: curr.cycleH/2, left: curr.cycleW/2 }); - }); - opts.cssFirst.top = 0; - opts.cssFirst.left = 0; - opts.cssBefore.width = 0; - opts.cssBefore.height = 0; -}; - -// fadeZoom -$.fn.cycle.transitions.fadeZoom = function($cont, $slides, opts) { - opts.before.push(function(curr, next, opts) { - $.fn.cycle.commonReset(curr,next,opts,false,false); - opts.cssBefore.left = next.cycleW/2; - opts.cssBefore.top = next.cycleH/2; - $.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: next.cycleH }); - }); - opts.cssBefore.width = 0; - opts.cssBefore.height = 0; - opts.animOut.opacity = 0; -}; - -// blindX -$.fn.cycle.transitions.blindX = function($cont, $slides, opts) { - var w = $cont.css('overflow','hidden').width(); - opts.before.push(function(curr, next, opts) { - $.fn.cycle.commonReset(curr,next,opts); - opts.animIn.width = next.cycleW; - opts.animOut.left = curr.cycleW; - }); - opts.cssBefore.left = w; - opts.cssBefore.top = 0; - opts.animIn.left = 0; - opts.animOut.left = w; -}; -// blindY -$.fn.cycle.transitions.blindY = function($cont, $slides, opts) { - var h = $cont.css('overflow','hidden').height(); - opts.before.push(function(curr, next, opts) { - $.fn.cycle.commonReset(curr,next,opts); - opts.animIn.height = next.cycleH; - opts.animOut.top = curr.cycleH; - }); - opts.cssBefore.top = h; - opts.cssBefore.left = 0; - opts.animIn.top = 0; - opts.animOut.top = h; -}; -// blindZ -$.fn.cycle.transitions.blindZ = function($cont, $slides, opts) { - var h = $cont.css('overflow','hidden').height(); - var w = $cont.width(); - opts.before.push(function(curr, next, opts) { - $.fn.cycle.commonReset(curr,next,opts); - opts.animIn.height = next.cycleH; - opts.animOut.top = curr.cycleH; - }); - opts.cssBefore.top = h; - opts.cssBefore.left = w; - opts.animIn.top = 0; - opts.animIn.left = 0; - opts.animOut.top = h; - opts.animOut.left = w; -}; - -// growX - grow horizontally from centered 0 width -$.fn.cycle.transitions.growX = function($cont, $slides, opts) { - opts.before.push(function(curr, next, opts) { - $.fn.cycle.commonReset(curr,next,opts,false,true); - opts.cssBefore.left = this.cycleW/2; - opts.animIn.left = 0; - opts.animIn.width = this.cycleW; - opts.animOut.left = 0; - }); - opts.cssBefore.top = 0; - opts.cssBefore.width = 0; -}; -// growY - grow vertically from centered 0 height -$.fn.cycle.transitions.growY = function($cont, $slides, opts) { - opts.before.push(function(curr, next, opts) { - $.fn.cycle.commonReset(curr,next,opts,true,false); - opts.cssBefore.top = this.cycleH/2; - opts.animIn.top = 0; - opts.animIn.height = this.cycleH; - opts.animOut.top = 0; - }); - opts.cssBefore.height = 0; - opts.cssBefore.left = 0; -}; - -// curtainX - squeeze in both edges horizontally -$.fn.cycle.transitions.curtainX = function($cont, $slides, opts) { - opts.before.push(function(curr, next, opts) { - $.fn.cycle.commonReset(curr,next,opts,false,true,true); - opts.cssBefore.left = next.cycleW/2; - opts.animIn.left = 0; - opts.animIn.width = this.cycleW; - opts.animOut.left = curr.cycleW/2; - opts.animOut.width = 0; - }); - opts.cssBefore.top = 0; - opts.cssBefore.width = 0; -}; -// curtainY - squeeze in both edges vertically -$.fn.cycle.transitions.curtainY = function($cont, $slides, opts) { - opts.before.push(function(curr, next, opts) { - $.fn.cycle.commonReset(curr,next,opts,true,false,true); - opts.cssBefore.top = next.cycleH/2; - opts.animIn.top = 0; - opts.animIn.height = next.cycleH; - opts.animOut.top = curr.cycleH/2; - opts.animOut.height = 0; - }); - opts.cssBefore.height = 0; - opts.cssBefore.left = 0; -}; - -// cover - curr slide covered by next slide -$.fn.cycle.transitions.cover = function($cont, $slides, opts) { - var d = opts.direction || 'left'; - var w = $cont.css('overflow','hidden').width(); - var h = $cont.height(); - opts.before.push(function(curr, next, opts) { - $.fn.cycle.commonReset(curr,next,opts); - if (d == 'right') - opts.cssBefore.left = -w; - else if (d == 'up') - opts.cssBefore.top = h; - else if (d == 'down') - opts.cssBefore.top = -h; - else - opts.cssBefore.left = w; - }); - opts.animIn.left = 0; - opts.animIn.top = 0; - opts.cssBefore.top = 0; - opts.cssBefore.left = 0; -}; - -// uncover - curr slide moves off next slide -$.fn.cycle.transitions.uncover = function($cont, $slides, opts) { - var d = opts.direction || 'left'; - var w = $cont.css('overflow','hidden').width(); - var h = $cont.height(); - opts.before.push(function(curr, next, opts) { - $.fn.cycle.commonReset(curr,next,opts,true,true,true); - if (d == 'right') - opts.animOut.left = w; - else if (d == 'up') - opts.animOut.top = -h; - else if (d == 'down') - opts.animOut.top = h; - else - opts.animOut.left = -w; - }); - opts.animIn.left = 0; - opts.animIn.top = 0; - opts.cssBefore.top = 0; - opts.cssBefore.left = 0; -}; - -// toss - move top slide and fade away -$.fn.cycle.transitions.toss = function($cont, $slides, opts) { - var w = $cont.css('overflow','visible').width(); - var h = $cont.height(); - opts.before.push(function(curr, next, opts) { - $.fn.cycle.commonReset(curr,next,opts,true,true,true); - // provide default toss settings if animOut not provided - if (!opts.animOut.left && !opts.animOut.top) - $.extend(opts.animOut, { left: w*2, top: -h/2, opacity: 0 }); - else - opts.animOut.opacity = 0; - }); - opts.cssBefore.left = 0; - opts.cssBefore.top = 0; - opts.animIn.left = 0; -}; - -// wipe - clip animation -$.fn.cycle.transitions.wipe = function($cont, $slides, opts) { - var w = $cont.css('overflow','hidden').width(); - var h = $cont.height(); - opts.cssBefore = opts.cssBefore || {}; - var clip; - if (opts.clip) { - if (/l2r/.test(opts.clip)) - clip = 'rect(0px 0px '+h+'px 0px)'; - else if (/r2l/.test(opts.clip)) - clip = 'rect(0px '+w+'px '+h+'px '+w+'px)'; - else if (/t2b/.test(opts.clip)) - clip = 'rect(0px '+w+'px 0px 0px)'; - else if (/b2t/.test(opts.clip)) - clip = 'rect('+h+'px '+w+'px '+h+'px 0px)'; - else if (/zoom/.test(opts.clip)) { - var top = parseInt(h/2,10); - var left = parseInt(w/2,10); - clip = 'rect('+top+'px '+left+'px '+top+'px '+left+'px)'; - } - } - - opts.cssBefore.clip = opts.cssBefore.clip || clip || 'rect(0px 0px 0px 0px)'; - - var d = opts.cssBefore.clip.match(/(\d+)/g); - var t = parseInt(d[0],10), r = parseInt(d[1],10), b = parseInt(d[2],10), l = parseInt(d[3],10); - - opts.before.push(function(curr, next, opts) { - if (curr == next) return; - var $curr = $(curr), $next = $(next); - $.fn.cycle.commonReset(curr,next,opts,true,true,false); - opts.cssAfter.display = 'block'; - - var step = 1, count = parseInt((opts.speedIn / 13),10) - 1; - (function f() { - var tt = t ? t - parseInt(step * (t/count),10) : 0; - var ll = l ? l - parseInt(step * (l/count),10) : 0; - var bb = b < h ? b + parseInt(step * ((h-b)/count || 1),10) : h; - var rr = r < w ? r + parseInt(step * ((w-r)/count || 1),10) : w; - $next.css({ clip: 'rect('+tt+'px '+rr+'px '+bb+'px '+ll+'px)' }); - (step++ <= count) ? setTimeout(f, 13) : $curr.css('display', 'none'); - })(); - }); - $.extend(opts.cssBefore, { display: 'block', opacity: 1, top: 0, left: 0 }); - opts.animIn = { left: 0 }; - opts.animOut = { left: 0 }; -}; - -})(jQuery); diff --git a/resources/jquery/jquery.delayedBind.js b/resources/jquery/jquery.delayedBind.js deleted file mode 100644 index 40f3d44e..00000000 --- a/resources/jquery/jquery.delayedBind.js +++ /dev/null @@ -1,76 +0,0 @@ -( function ( $ ) { -/** - * Function that escapes spaces in event names. This is needed because - * "_delayedBind-foo bar-1000" refers to two events - */ -function encodeEvent( event ) { - return event.replace( /-/g, '--' ).replace( / /g, '-' ); -} - -$.fn.extend( { - /** - * Bind a callback to an event in a delayed fashion. - * In detail, this means that the callback will be called a certain - * time after the event fires, but the timer is reset every time - * the event fires. - * @param timeout Number of milliseconds to wait - * @param event Name of the event (string) - * @param data Data to pass to the event handler (optional) - * @param callback Function to call - */ - delayedBind: function ( timeout, event, data, callback ) { - if ( arguments.length === 3 ) { - // Shift optional parameter down - callback = data; - data = undefined; - } - var encEvent = encodeEvent( event ); - return this.each( function () { - var that = this; - // Bind the top half - // Do this only once for every (event, timeout) pair - if ( !( $(this).data( '_delayedBindBound-' + encEvent + '-' + timeout ) ) ) { - $(this).data( '_delayedBindBound-' + encEvent + '-' + timeout, true ); - $(this).bind( event, function () { - var timerID = $(this).data( '_delayedBindTimerID-' + encEvent + '-' + timeout ); - // Cancel the running timer - if ( timerID !== null ) { - clearTimeout( timerID ); - } - timerID = setTimeout( function () { - $(that).trigger( '_delayedBind-' + encEvent + '-' + timeout ); - }, timeout ); - $(this).data( '_delayedBindTimerID-' + encEvent + '-' + timeout, timerID ); - } ); - } - - // Bottom half - $(this).bind( '_delayedBind-' + encEvent + '-' + timeout, data, callback ); - } ); - }, - - /** - * Cancel the timers for delayed events on the selected elements. - */ - delayedBindCancel: function ( timeout, event ) { - var encEvent = encodeEvent( event ); - return this.each( function () { - var timerID = $(this).data( '_delayedBindTimerID-' + encEvent + '-' + timeout ); - if ( timerID !== null ) { - clearTimeout( timerID ); - } - } ); - }, - - /** - * Unbind an event bound with delayedBind() - */ - delayedBindUnbind: function ( timeout, event, callback ) { - var encEvent = encodeEvent( event ); - return this.each( function () { - $(this).unbind( '_delayedBind-' + encEvent + '-' + timeout, callback ); - } ); - } -} ); - -}( jQuery ) ); diff --git a/resources/jquery/jquery.expandableField.js b/resources/jquery/jquery.expandableField.js deleted file mode 100644 index 9e532e52..00000000 --- a/resources/jquery/jquery.expandableField.js +++ /dev/null @@ -1,137 +0,0 @@ -/** - * This plugin provides functionality to expand a text box on focus to double it's current width - * - * Usage: - * - * Set options: - * $('#textbox').expandableField( { option1: value1, option2: value2 } ); - * $('#textbox').expandableField( option, value ); - * Get option: - * value = $('#textbox').expandableField( option ); - * Initialize: - * $('#textbox').expandableField(); - * - * Options: - * - */ -( function ( $ ) { - - $.expandableField = { - /** - * Expand the field, make the callback - */ - expandField: function ( e, context ) { - context.config.beforeExpand.call( context.data.$field, context ); - context.data.$field - .animate( { 'width': context.data.expandedWidth }, 'fast', function () { - context.config.afterExpand.call( this, context ); - } ); - }, - /** - * Condense the field, make the callback - */ - condenseField: function ( e, context ) { - context.config.beforeCondense.call( context.data.$field, context ); - context.data.$field - .animate( { 'width': context.data.condensedWidth }, 'fast', function () { - context.config.afterCondense.call( this, context ); - } ); - }, - /** - * Sets the value of a property, and updates the widget accordingly - * @param property String Name of property - * @param value Mixed Value to set property with - */ - configure: function ( context, property, value ) { - // TODO: Validate creation using fallback values - context.config[property] = value; - } - - }; - - $.fn.expandableField = function () { - - // Multi-context fields - var returnValue, - args = arguments; - - $( this ).each( function () { - var key, context; - - /* Construction / Loading */ - - context = $( this ).data( 'expandableField-context' ); - - // TODO: Do we need to check both null and undefined? - if ( context === undefined || context === null ) { - context = { - config: { - // callback function for before collapse - beforeCondense: function () {}, - - // callback function for before expand - beforeExpand: function () {}, - - // callback function for after collapse - afterCondense: function () {}, - - // callback function for after expand - afterExpand: function () {}, - - // Whether the field should expand to the left or the right -- defaults to left - expandToLeft: true - } - }; - } - - /* API */ - // Handle various calling styles - if ( args.length > 0 ) { - if ( typeof args[0] === 'object' ) { - // Apply set of properties - for ( key in args[0] ) { - $.expandableField.configure( context, key, args[0][key] ); - } - } else if ( typeof args[0] === 'string' ) { - if ( args.length > 1 ) { - // Set property values - $.expandableField.configure( context, args[0], args[1] ); - - // TODO: Do we need to check both null and undefined? - } else if ( returnValue === null || returnValue === undefined ) { - // Get property values, but don't give access to internal data - returns only the first - returnValue = ( args[0] in context.config ? undefined : context.config[args[0]] ); - } - } - } - - /* Initialization */ - - if ( context.data === undefined ) { - context.data = { - // The width of the field in it's condensed state - condensedWidth: $( this ).width(), - - // The width of the field in it's expanded state - expandedWidth: $( this ).width() * 2, - - // Reference to the field - $field: $( this ) - }; - - $( this ) - .addClass( 'expandableField' ) - .focus( function ( e ) { - $.expandableField.expandField( e, context ); - } ) - .delayedBind( 250, 'blur', function ( e ) { - $.expandableField.condenseField( e, context ); - } ); - } - // Store the context for next time - $( this ).data( 'expandableField-context', context ); - } ); - return returnValue !== undefined ? returnValue : $(this); - }; - -}( jQuery ) ); diff --git a/resources/jquery/jquery.farbtastic.css b/resources/jquery/jquery.farbtastic.css deleted file mode 100644 index 1c6428f8..00000000 --- a/resources/jquery/jquery.farbtastic.css +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Farbtastic Color Picker 1.2 - * © 2008 Steven Wittens - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ -.farbtastic { - position: relative; -} -.farbtastic * { - position: absolute; - cursor: crosshair; -} -.farbtastic, .farbtastic .wheel { - width: 195px; - height: 195px; -} -.farbtastic .color, .farbtastic .overlay { - top: 47px; - left: 47px; - width: 101px; - height: 101px; -} -.farbtastic .wheel { - /* @embed */ - background: url(images/wheel.png) no-repeat; - width: 195px; - height: 195px; -} -.farbtastic .overlay { - /* @embed */ - background: url(images/mask.png) no-repeat; -} -.farbtastic .marker { - width: 17px; - height: 17px; - margin: -8px 0 0 -8px; - overflow: hidden; - /* @embed */ - background: url(images/marker.png) no-repeat; -} - diff --git a/resources/jquery/jquery.farbtastic.js b/resources/jquery/jquery.farbtastic.js deleted file mode 100644 index 18810857..00000000 --- a/resources/jquery/jquery.farbtastic.js +++ /dev/null @@ -1,286 +0,0 @@ -/** - * Farbtastic Color Picker 1.2 - * © 2008 Steven Wittens - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -//Adapted to uniform style with jQuery UI widgets and slightly change behavior -//TODO: -// - remove duplicated code by replacing it with jquery.colorUtils and modern jQuery -// - uniform code style - -jQuery.fn.farbtastic = function (callback) { - $.farbtastic(this, callback); - return this; -}; - -jQuery.farbtastic = function (container, callback) { - var container = $(container).get(0); - return container.farbtastic || (container.farbtastic = new jQuery._farbtastic(container, callback)); -} - -jQuery._farbtastic = function (container, callback) { - // Store farbtastic object - var fb = this; - - // Insert markup - $(container).html('
          '); - $(container).addClass('ui-widget'); - var e = $('.farbtastic', container); - fb.wheel = $('.wheel', container).get(0); - // Dimensions - fb.radius = 84; - fb.square = 100; - fb.width = 194; - - // Fix background PNGs in IE6 - if (navigator.appVersion.match(/MSIE [0-6]\./)) { - $('*', e).each(function () { - if (this.currentStyle.backgroundImage != 'none') { - var image = this.currentStyle.backgroundImage; - image = this.currentStyle.backgroundImage.substring(5, image.length - 2); - $(this).css({ - 'backgroundImage': 'none', - 'filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='" + image + "')" - }); - } - }); - } - - /** - * Link to the given element(s) or callback. - */ - fb.linkTo = function (callback) { - // Unbind previous nodes - if (typeof fb.callback == 'object') { - $(fb.callback).unbind('keyup', fb.updateValue); - } - - // Reset color - fb.color = null; - - // Bind callback or elements - if (typeof callback == 'function') { - fb.callback = callback; - } - else if (typeof callback == 'object' || typeof callback == 'string') { - fb.callback = $(callback); - fb.callback.bind('keyup', fb.updateValue); - if (fb.callback.get(0).value) { - fb.setColor(fb.callback.get(0).value); - } - } - return this; - } - fb.updateValue = function (event) { - if (this.value != fb.color) { - fb.setColor(this.value); - } - } - - /** - * Change color with HTML syntax #123456 - */ - fb.setColor = function (color) { - var rgb = $.colorUtil.getRGB( color ); - if (fb.color != color && rgb) { - rgb = rgb.slice( 0 ); //make a clone - //TODO: rewrite code so that this is not needed - rgb[0] /= 255; - rgb[1] /= 255; - rgb[2] /= 255; - fb.color = color; - fb.rgb = rgb; - fb.hsl = fb.RGBToHSL(fb.rgb); - fb.updateDisplay(); - } - return this; - } - - /** - * Change color with HSL triplet [0..1, 0..1, 0..1] - */ - fb.setHSL = function (hsl) { - fb.hsl = hsl; - fb.rgb = fb.HSLToRGB(hsl); - fb.color = fb.pack(fb.rgb); - fb.updateDisplay(); - return this; - } - - ///////////////////////////////////////////////////// - - /** - * Retrieve the coordinates of the given event relative to the center - * of the widget. - */ - fb.widgetCoords = function (event) { - var ref = $( fb.wheel ).offset(); - return { - x: event.pageX - ref.left - fb.width / 2, - y: event.pageY - ref.top - fb.width / 2 - }; - } - - /** - * Mousedown handler - */ - fb.mousedown = function (event) { - // Capture mouse - if (!document.dragging) { - $(document).bind('mousemove', fb.mousemove).bind('mouseup', fb.mouseup); - document.dragging = true; - } - - // Check which area is being dragged - var pos = fb.widgetCoords(event); - fb.circleDrag = Math.max(Math.abs(pos.x), Math.abs(pos.y)) * 2 > fb.square; - - // Process - fb.mousemove(event); - return false; - } - - /** - * Mousemove handler - */ - fb.mousemove = function (event) { - // Get coordinates relative to color picker center - var pos = fb.widgetCoords(event); - - // Set new HSL parameters - if (fb.circleDrag) { - var hue = Math.atan2(pos.x, -pos.y) / 6.28; - if (hue < 0) hue += 1; - fb.setHSL([hue, fb.hsl[1], fb.hsl[2]]); - } - else { - var sat = Math.max(0, Math.min(1, -(pos.x / fb.square) + .5)); - var lum = Math.max(0, Math.min(1, -(pos.y / fb.square) + .5)); - fb.setHSL([fb.hsl[0], sat, lum]); - } - return false; - } - - /** - * Mouseup handler - */ - fb.mouseup = function () { - // Uncapture mouse - $(document).unbind('mousemove', fb.mousemove); - $(document).unbind('mouseup', fb.mouseup); - document.dragging = false; - } - - /** - * Update the markers and styles - */ - fb.updateDisplay = function () { - // Markers - var angle = fb.hsl[0] * 6.28; - $('.h-marker', e).css({ - left: Math.round(Math.sin(angle) * fb.radius + fb.width / 2) + 'px', - top: Math.round(-Math.cos(angle) * fb.radius + fb.width / 2) + 'px' - }); - - $('.sl-marker', e).css({ - left: Math.round(fb.square * (.5 - fb.hsl[1]) + fb.width / 2) + 'px', - top: Math.round(fb.square * (.5 - fb.hsl[2]) + fb.width / 2) + 'px' - }); - - // Saturation/Luminance gradient - $('.color', e).css('backgroundColor', fb.pack(fb.HSLToRGB([fb.hsl[0], 1, 0.5]))); - - // Linked elements or callback - if (typeof fb.callback == 'object') { - // Set background/foreground color - $(fb.callback).css({ - backgroundColor: fb.color, - color: fb.hsl[2] > 0.5 ? '#000' : '#fff' - }); - - // Change linked value - $(fb.callback).each(function() { - if ( $( this ).val() != fb.color) { - $( this ).val( fb.color ).change(); - } - }); - } - else if (typeof fb.callback == 'function') { - fb.callback.call(fb, fb.color); - } - } - - /* Various color utility functions */ - fb.pack = function (rgb) { - var r = Math.round(rgb[0] * 255); - var g = Math.round(rgb[1] * 255); - var b = Math.round(rgb[2] * 255); - return '#' + (r < 16 ? '0' : '') + r.toString(16) + - (g < 16 ? '0' : '') + g.toString(16) + - (b < 16 ? '0' : '') + b.toString(16); - } - - fb.HSLToRGB = function (hsl) { - var m1, m2, r, g, b; - var h = hsl[0], s = hsl[1], l = hsl[2]; - m2 = (l <= 0.5) ? l * (s + 1) : l + s - l*s; - m1 = l * 2 - m2; - return [this.hueToRGB(m1, m2, h+0.33333), - this.hueToRGB(m1, m2, h), - this.hueToRGB(m1, m2, h-0.33333)]; - } - - fb.hueToRGB = function (m1, m2, h) { - h = (h < 0) ? h + 1 : ((h > 1) ? h - 1 : h); - if (h * 6 < 1) return m1 + (m2 - m1) * h * 6; - if (h * 2 < 1) return m2; - if (h * 3 < 2) return m1 + (m2 - m1) * (0.66666 - h) * 6; - return m1; - } - - fb.RGBToHSL = function (rgb) { - var min, max, delta, h, s, l; - var r = rgb[0], g = rgb[1], b = rgb[2]; - min = Math.min(r, Math.min(g, b)); - max = Math.max(r, Math.max(g, b)); - delta = max - min; - l = (min + max) / 2; - s = 0; - if (l > 0 && l < 1) { - s = delta / (l < 0.5 ? (2 * l) : (2 - 2 * l)); - } - h = 0; - if (delta > 0) { - if (max == r && max != g) h += (g - b) / delta; - if (max == g && max != b) h += (2 + (b - r) / delta); - if (max == b && max != r) h += (4 + (r - g) / delta); - h /= 6; - } - return [h, s, l]; - } - - // Install mousedown handler (the others are set on the document on-demand) - $('*', e).mousedown(fb.mousedown); - - // Init color - fb.setColor('#000000'); - - // Set linked elements/callback - if (callback) { - fb.linkTo(callback); - } -} diff --git a/resources/jquery/jquery.footHovzer.css b/resources/jquery/jquery.footHovzer.css deleted file mode 100644 index 77d9514c..00000000 --- a/resources/jquery/jquery.footHovzer.css +++ /dev/null @@ -1,6 +0,0 @@ -#jquery-foot-hovzer { - position: fixed; - bottom: 0; - width: 100%; - z-index: 1000; -} diff --git a/resources/jquery/jquery.footHovzer.js b/resources/jquery/jquery.footHovzer.js deleted file mode 100644 index 56fc32d4..00000000 --- a/resources/jquery/jquery.footHovzer.js +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Utility to stack stuff in an overlay fixed on the bottom of the page. - * - * Usage: - * - * var hovzer = $.getFootHovzer(); - * hovzer.$.append( $myCollection ); - * hovzer.update(); - * - * - * @author Timo Tijhof, 2012 - */ -( function ( $ ) { - var $hovzer, footHovzer, prevHeight, newHeight; - - function getHovzer() { - if ( $hovzer === undefined ) { - $hovzer = $( '
          ' ).appendTo( 'body' ); - } - return $hovzer; - } - - footHovzer = { - update: function () { - var $body; - - $body = $( 'body' ); - if ( prevHeight === undefined ) { - prevHeight = getHovzer().outerHeight( /*includeMargin=*/true ); - $body.css( 'paddingBottom', '+=' + prevHeight + 'px' ); - } else { - newHeight = getHovzer().outerHeight( true ); - $body.css( 'paddingBottom', ( parseFloat( $body.css( 'paddingBottom' ) ) - prevHeight ) + newHeight ); - - prevHeight = newHeight; - } - } - }; - - $.getFootHovzer = function () { - footHovzer.$ = getHovzer(); - return footHovzer; - }; - -}( jQuery ) ); diff --git a/resources/jquery/jquery.form.js b/resources/jquery/jquery.form.js deleted file mode 100644 index 13e9a55c..00000000 --- a/resources/jquery/jquery.form.js +++ /dev/null @@ -1,1089 +0,0 @@ -/*! - * jQuery Form Plugin - * version: 3.14 (30-JUL-2012) - * @requires jQuery v1.3.2 or later - * - * Examples and documentation at: http://malsup.com/jquery/form/ - * Project repository: https://github.com/malsup/form - * Dual licensed under the MIT and GPL licenses: - * http://malsup.github.com/mit-license.txt - * http://malsup.github.com/gpl-license-v2.txt - */ -/*global ActiveXObject alert */ -;(function($) { -"use strict"; - -/* - Usage Note: - ----------- - Do not use both ajaxSubmit and ajaxForm on the same form. These - functions are mutually exclusive. Use ajaxSubmit if you want - to bind your own submit handler to the form. For example, - - $(document).ready(function() { - $('#myForm').on('submit', function(e) { - e.preventDefault(); // <-- important - $(this).ajaxSubmit({ - target: '#output' - }); - }); - }); - - Use ajaxForm when you want the plugin to manage all the event binding - for you. For example, - - $(document).ready(function() { - $('#myForm').ajaxForm({ - target: '#output' - }); - }); - - You can also use ajaxForm with delegation (requires jQuery v1.7+), so the - form does not have to exist when you invoke ajaxForm: - - $('#myForm').ajaxForm({ - delegation: true, - target: '#output' - }); - - When using ajaxForm, the ajaxSubmit function will be invoked for you - at the appropriate time. -*/ - -/** - * Feature detection - */ -var feature = {}; -feature.fileapi = $("").get(0).files !== undefined; -feature.formdata = window.FormData !== undefined; - -/** - * ajaxSubmit() provides a mechanism for immediately submitting - * an HTML form using AJAX. - */ -$.fn.ajaxSubmit = function(options) { - /*jshint scripturl:true */ - - // fast fail if nothing selected (http://dev.jquery.com/ticket/2752) - if (!this.length) { - log('ajaxSubmit: skipping submit process - no element selected'); - return this; - } - - var method, action, url, $form = this; - - if (typeof options == 'function') { - options = { success: options }; - } - - method = this.attr('method'); - action = this.attr('action'); - url = (typeof action === 'string') ? $.trim(action) : ''; - url = url || window.location.href || ''; - if (url) { - // clean url (don't include hash vaue) - url = (url.match(/^([^#]+)/)||[])[1]; - } - - options = $.extend(true, { - url: url, - success: $.ajaxSettings.success, - type: method || 'GET', - iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank' - }, options); - - // hook for manipulating the form data before it is extracted; - // convenient for use with rich editors like tinyMCE or FCKEditor - var veto = {}; - this.trigger('form-pre-serialize', [this, options, veto]); - if (veto.veto) { - log('ajaxSubmit: submit vetoed via form-pre-serialize trigger'); - return this; - } - - // provide opportunity to alter form data before it is serialized - if (options.beforeSerialize && options.beforeSerialize(this, options) === false) { - log('ajaxSubmit: submit aborted via beforeSerialize callback'); - return this; - } - - var traditional = options.traditional; - if ( traditional === undefined ) { - traditional = $.ajaxSettings.traditional; - } - - var elements = []; - var qx, a = this.formToArray(options.semantic, elements); - if (options.data) { - options.extraData = options.data; - qx = $.param(options.data, traditional); - } - - // give pre-submit callback an opportunity to abort the submit - if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) { - log('ajaxSubmit: submit aborted via beforeSubmit callback'); - return this; - } - - // fire vetoable 'validate' event - this.trigger('form-submit-validate', [a, this, options, veto]); - if (veto.veto) { - log('ajaxSubmit: submit vetoed via form-submit-validate trigger'); - return this; - } - - var q = $.param(a, traditional); - if (qx) { - q = ( q ? (q + '&' + qx) : qx ); - } - if (options.type.toUpperCase() == 'GET') { - options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q; - options.data = null; // data is null for 'get' - } - else { - options.data = q; // data is the query string for 'post' - } - - var callbacks = []; - if (options.resetForm) { - callbacks.push(function() { $form.resetForm(); }); - } - if (options.clearForm) { - callbacks.push(function() { $form.clearForm(options.includeHidden); }); - } - - // perform a load on the target only if dataType is not provided - if (!options.dataType && options.target) { - var oldSuccess = options.success || function(){}; - callbacks.push(function(data) { - var fn = options.replaceTarget ? 'replaceWith' : 'html'; - $(options.target)[fn](data).each(oldSuccess, arguments); - }); - } - else if (options.success) { - callbacks.push(options.success); - } - - options.success = function(data, status, xhr) { // jQuery 1.4+ passes xhr as 3rd arg - var context = options.context || this ; // jQuery 1.4+ supports scope context - for (var i=0, max=callbacks.length; i < max; i++) { - callbacks[i].apply(context, [data, status, xhr || $form, $form]); - } - }; - - // are there files to upload? - var fileInputs = $('input:file:enabled[value]', this); // [value] (issue #113) - var hasFileInputs = fileInputs.length > 0; - var mp = 'multipart/form-data'; - var multipart = ($form.attr('enctype') == mp || $form.attr('encoding') == mp); - - var fileAPI = feature.fileapi && feature.formdata; - log("fileAPI :" + fileAPI); - var shouldUseFrame = (hasFileInputs || multipart) && !fileAPI; - - // options.iframe allows user to force iframe mode - // 06-NOV-09: now defaulting to iframe mode if file input is detected - if (options.iframe !== false && (options.iframe || shouldUseFrame)) { - // hack to fix Safari hang (thanks to Tim Molendijk for this) - // see: http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d - if (options.closeKeepAlive) { - $.get(options.closeKeepAlive, function() { - fileUploadIframe(a); - }); - } - else { - fileUploadIframe(a); - } - } - else if ((hasFileInputs || multipart) && fileAPI) { - fileUploadXhr(a); - } - else { - $.ajax(options); - } - - // clear element array - for (var k=0; k < elements.length; k++) - elements[k] = null; - - // fire 'notify' event - this.trigger('form-submit-notify', [this, options]); - return this; - - // XMLHttpRequest Level 2 file uploads (big hat tip to francois2metz) - function fileUploadXhr(a) { - var formdata = new FormData(); - - for (var i=0; i < a.length; i++) { - formdata.append(a[i].name, a[i].value); - } - - if (options.extraData) { - for (var p in options.extraData) - if (options.extraData.hasOwnProperty(p)) - formdata.append(p, options.extraData[p]); - } - - options.data = null; - - var s = $.extend(true, {}, $.ajaxSettings, options, { - contentType: false, - processData: false, - cache: false, - type: 'POST' - }); - - if (options.uploadProgress) { - // workaround because jqXHR does not expose upload property - s.xhr = function() { - var xhr = jQuery.ajaxSettings.xhr(); - if (xhr.upload) { - xhr.upload.onprogress = function(event) { - var percent = 0; - var position = event.loaded || event.position; /*event.position is deprecated*/ - var total = event.total; - if (event.lengthComputable) { - percent = Math.ceil(position / total * 100); - } - options.uploadProgress(event, position, total, percent); - }; - } - return xhr; - }; - } - - s.data = null; - var beforeSend = s.beforeSend; - s.beforeSend = function(xhr, o) { - o.data = formdata; - if(beforeSend) - beforeSend.call(this, xhr, o); - }; - $.ajax(s); - } - - // private function for handling file uploads (hat tip to YAHOO!) - function fileUploadIframe(a) { - var form = $form[0], el, i, s, g, id, $io, io, xhr, sub, n, timedOut, timeoutHandle; - var useProp = !!$.fn.prop; - - if ($(':input[name=submit],:input[id=submit]', form).length) { - // if there is an input with a name or id of 'submit' then we won't be - // able to invoke the submit fn on the form (at least not x-browser) - alert('Error: Form elements must not have name or id of "submit".'); - return; - } - - if (a) { - // ensure that every serialized input is still enabled - for (i=0; i < elements.length; i++) { - el = $(elements[i]); - if ( useProp ) - el.prop('disabled', false); - else - el.removeAttr('disabled'); - } - } - - s = $.extend(true, {}, $.ajaxSettings, options); - s.context = s.context || s; - id = 'jqFormIO' + (new Date().getTime()); - if (s.iframeTarget) { - $io = $(s.iframeTarget); - n = $io.attr('name'); - if (!n) - $io.attr('name', id); - else - id = n; - } - else { - $io = $('' : ''); + inst._keyEvent = false; + return html; + }, + + /* Generate the month and year header. */ + _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate, + secondary, monthNames, monthNamesShort) { + var changeMonth = this._get(inst, 'changeMonth'); + var changeYear = this._get(inst, 'changeYear'); + var showMonthAfterYear = this._get(inst, 'showMonthAfterYear'); + var html = '
          '; + var monthHtml = ''; + // month selection + if (secondary || !changeMonth) + monthHtml += '' + monthNames[drawMonth] + ''; + else { + var inMinYear = (minDate && minDate.getFullYear() == drawYear); + var inMaxYear = (maxDate && maxDate.getFullYear() == drawYear); + monthHtml += ''; + } + if (!showMonthAfterYear) + html += monthHtml + (secondary || !(changeMonth && changeYear) ? ' ' : ''); + // year selection + if ( !inst.yearshtml ) { + inst.yearshtml = ''; + if (secondary || !changeYear) + html += '' + drawYear + ''; + else { + // determine range of years to display + var years = this._get(inst, 'yearRange').split(':'); + var thisYear = new Date().getFullYear(); + var determineYear = function(value) { + var year = (value.match(/c[+-].*/) ? drawYear + parseInt(value.substring(1), 10) : + (value.match(/[+-].*/) ? thisYear + parseInt(value, 10) : + parseInt(value, 10))); + return (isNaN(year) ? thisYear : year); + }; + var year = determineYear(years[0]); + var endYear = Math.max(year, determineYear(years[1] || '')); + year = (minDate ? Math.max(year, minDate.getFullYear()) : year); + endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear); + inst.yearshtml += ''; + + html += inst.yearshtml; + inst.yearshtml = null; + } + } + html += this._get(inst, 'yearSuffix'); + if (showMonthAfterYear) + html += (secondary || !(changeMonth && changeYear) ? ' ' : '') + monthHtml; + html += '
          '; // Close datepicker_header + return html; + }, + + /* Adjust one of the date sub-fields. */ + _adjustInstDate: function(inst, offset, period) { + var year = inst.drawYear + (period == 'Y' ? offset : 0); + var month = inst.drawMonth + (period == 'M' ? offset : 0); + var day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) + + (period == 'D' ? offset : 0); + var date = this._restrictMinMax(inst, + this._daylightSavingAdjust(new Date(year, month, day))); + inst.selectedDay = date.getDate(); + inst.drawMonth = inst.selectedMonth = date.getMonth(); + inst.drawYear = inst.selectedYear = date.getFullYear(); + if (period == 'M' || period == 'Y') + this._notifyChange(inst); + }, + + /* Ensure a date is within any min/max bounds. */ + _restrictMinMax: function(inst, date) { + var minDate = this._getMinMaxDate(inst, 'min'); + var maxDate = this._getMinMaxDate(inst, 'max'); + var newDate = (minDate && date < minDate ? minDate : date); + newDate = (maxDate && newDate > maxDate ? maxDate : newDate); + return newDate; + }, + + /* Notify change of month/year. */ + _notifyChange: function(inst) { + var onChange = this._get(inst, 'onChangeMonthYear'); + if (onChange) + onChange.apply((inst.input ? inst.input[0] : null), + [inst.selectedYear, inst.selectedMonth + 1, inst]); + }, + + /* Determine the number of months to show. */ + _getNumberOfMonths: function(inst) { + var numMonths = this._get(inst, 'numberOfMonths'); + return (numMonths == null ? [1, 1] : (typeof numMonths == 'number' ? [1, numMonths] : numMonths)); + }, + + /* Determine the current maximum date - ensure no time components are set. */ + _getMinMaxDate: function(inst, minMax) { + return this._determineDate(inst, this._get(inst, minMax + 'Date'), null); + }, + + /* Find the number of days in a given month. */ + _getDaysInMonth: function(year, month) { + return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate(); + }, + + /* Find the day of the week of the first of a month. */ + _getFirstDayOfMonth: function(year, month) { + return new Date(year, month, 1).getDay(); + }, + + /* Determines if we should allow a "next/prev" month display change. */ + _canAdjustMonth: function(inst, offset, curYear, curMonth) { + var numMonths = this._getNumberOfMonths(inst); + var date = this._daylightSavingAdjust(new Date(curYear, + curMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1)); + if (offset < 0) + date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth())); + return this._isInRange(inst, date); + }, + + /* Is the given date in the accepted range? */ + _isInRange: function(inst, date) { + var minDate = this._getMinMaxDate(inst, 'min'); + var maxDate = this._getMinMaxDate(inst, 'max'); + return ((!minDate || date.getTime() >= minDate.getTime()) && + (!maxDate || date.getTime() <= maxDate.getTime())); + }, + + /* Provide the configuration settings for formatting/parsing. */ + _getFormatConfig: function(inst) { + var shortYearCutoff = this._get(inst, 'shortYearCutoff'); + shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff : + new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10)); + return {shortYearCutoff: shortYearCutoff, + dayNamesShort: this._get(inst, 'dayNamesShort'), dayNames: this._get(inst, 'dayNames'), + monthNamesShort: this._get(inst, 'monthNamesShort'), monthNames: this._get(inst, 'monthNames')}; + }, + + /* Format the given date for display. */ + _formatDate: function(inst, day, month, year) { + if (!day) { + inst.currentDay = inst.selectedDay; + inst.currentMonth = inst.selectedMonth; + inst.currentYear = inst.selectedYear; + } + var date = (day ? (typeof day == 'object' ? day : + this._daylightSavingAdjust(new Date(year, month, day))) : + this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay))); + return this.formatDate(this._get(inst, 'dateFormat'), date, this._getFormatConfig(inst)); + } +}); + +/* + * Bind hover events for datepicker elements. + * Done via delegate so the binding only occurs once in the lifetime of the parent div. + * Global instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker. + */ +function bindHover(dpDiv) { + var selector = 'button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a'; + return dpDiv.delegate(selector, 'mouseout', function() { + $(this).removeClass('ui-state-hover'); + if (this.className.indexOf('ui-datepicker-prev') != -1) $(this).removeClass('ui-datepicker-prev-hover'); + if (this.className.indexOf('ui-datepicker-next') != -1) $(this).removeClass('ui-datepicker-next-hover'); + }) + .delegate(selector, 'mouseover', function(){ + if (!$.datepicker._isDisabledDatepicker( instActive.inline ? dpDiv.parent()[0] : instActive.input[0])) { + $(this).parents('.ui-datepicker-calendar').find('a').removeClass('ui-state-hover'); + $(this).addClass('ui-state-hover'); + if (this.className.indexOf('ui-datepicker-prev') != -1) $(this).addClass('ui-datepicker-prev-hover'); + if (this.className.indexOf('ui-datepicker-next') != -1) $(this).addClass('ui-datepicker-next-hover'); + } + }); +} + +/* jQuery extend now ignores nulls! */ +function extendRemove(target, props) { + $.extend(target, props); + for (var name in props) + if (props[name] == null || props[name] == undefined) + target[name] = props[name]; + return target; +}; + +/* Invoke the datepicker functionality. + @param options string - a command, optionally followed by additional parameters or + Object - settings for attaching new datepicker functionality + @return jQuery object */ +$.fn.datepicker = function(options){ + + /* Verify an empty collection wasn't passed - Fixes #6976 */ + if ( !this.length ) { + return this; + } + + /* Initialise the date picker. */ + if (!$.datepicker.initialized) { + $(document).mousedown($.datepicker._checkExternalClick). + find(document.body).append($.datepicker.dpDiv); + $.datepicker.initialized = true; + } + + var otherArgs = Array.prototype.slice.call(arguments, 1); + if (typeof options == 'string' && (options == 'isDisabled' || options == 'getDate' || options == 'widget')) + return $.datepicker['_' + options + 'Datepicker']. + apply($.datepicker, [this[0]].concat(otherArgs)); + if (options == 'option' && arguments.length == 2 && typeof arguments[1] == 'string') + return $.datepicker['_' + options + 'Datepicker']. + apply($.datepicker, [this[0]].concat(otherArgs)); + return this.each(function() { + typeof options == 'string' ? + $.datepicker['_' + options + 'Datepicker']. + apply($.datepicker, [this].concat(otherArgs)) : + $.datepicker._attachDatepicker(this, options); + }); +}; + +$.datepicker = new Datepicker(); // singleton instance +$.datepicker.initialized = false; +$.datepicker.uuid = new Date().getTime(); +$.datepicker.version = "1.9.2"; + +// Workaround for #4055 +// Add another global to avoid noConflict issues with inline event handlers +window['DP_jQuery_' + dpuuid] = $; + +})(jQuery); diff --git a/resources/lib/jquery.ui/jquery.ui.dialog.js b/resources/lib/jquery.ui/jquery.ui.dialog.js new file mode 100644 index 00000000..75a9e8f9 --- /dev/null +++ b/resources/lib/jquery.ui/jquery.ui.dialog.js @@ -0,0 +1,858 @@ +/*! + * jQuery UI Dialog 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/dialog/ + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + * jquery.ui.button.js + * jquery.ui.draggable.js + * jquery.ui.mouse.js + * jquery.ui.position.js + * jquery.ui.resizable.js + */ +(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", { + version: "1.9.2", + options: { + autoOpen: true, + buttons: {}, + closeOnEscape: true, + closeText: "close", + dialogClass: "", + draggable: true, + hide: null, + height: "auto", + maxHeight: false, + maxWidth: false, + minHeight: 150, + minWidth: 150, + modal: false, + 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: "", + width: 300, + zIndex: 1000 + }, + + _create: function() { + this.originalTitle = this.element.attr( "title" ); + // #5742 - .attr() might return a DOMElement + if ( typeof this.originalTitle !== "string" ) { + this.originalTitle = ""; + } + this.oldPosition = { + parent: this.element.parent(), + index: this.element.parent().children().index( this.element ) + }; + this.options.title = this.options.title || this.originalTitle; + var that = this, + options = this.options, + + title = options.title || " ", + uiDialog, + uiDialogTitlebar, + uiDialogTitlebarClose, + uiDialogTitle, + uiDialogButtonPane; + + uiDialog = ( this.uiDialog = $( "
          " ) ) + .addClass( uiDialogClasses + options.dialogClass ) + .css({ + display: "none", + outline: 0, // TODO: move to stylesheet + zIndex: options.zIndex + }) + // setting tabIndex makes the div focusable + .attr( "tabIndex", -1) + .keydown(function( event ) { + if ( options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode && + event.keyCode === $.ui.keyCode.ESCAPE ) { + that.close( event ); + event.preventDefault(); + } + }) + .mousedown(function( event ) { + that.moveToTop( false, event ); + }) + .appendTo( "body" ); + + this.element + .show() + .removeAttr( "title" ) + .addClass( "ui-dialog-content ui-widget-content" ) + .appendTo( uiDialog ); + + uiDialogTitlebar = ( this.uiDialogTitlebar = $( "
          " ) ) + .addClass( "ui-dialog-titlebar ui-widget-header " + + "ui-corner-all ui-helper-clearfix" ) + .bind( "mousedown", function() { + // Dialog isn't getting focus when dragging (#8063) + uiDialog.focus(); + }) + .prependTo( uiDialog ); + + uiDialogTitlebarClose = $( "" ) + .addClass( "ui-dialog-titlebar-close ui-corner-all" ) + .attr( "role", "button" ) + .click(function( event ) { + event.preventDefault(); + that.close( event ); + }) + .appendTo( uiDialogTitlebar ); + + ( this.uiDialogTitlebarCloseText = $( "" ) ) + .addClass( "ui-icon ui-icon-closethick" ) + .text( options.closeText ) + .appendTo( uiDialogTitlebarClose ); + + uiDialogTitle = $( "" ) + .uniqueId() + .addClass( "ui-dialog-title" ) + .html( title ) + .prependTo( uiDialogTitlebar ); + + uiDialogButtonPane = ( this.uiDialogButtonPane = $( "
          " ) ) + .addClass( "ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" ); + + ( this.uiButtonSet = $( "
          " ) ) + .addClass( "ui-dialog-buttonset" ) + .appendTo( uiDialogButtonPane ); + + uiDialog.attr({ + role: "dialog", + "aria-labelledby": uiDialogTitle.attr( "id" ) + }); + + uiDialogTitlebar.find( "*" ).add( uiDialogTitlebar ).disableSelection(); + this._hoverable( uiDialogTitlebarClose ); + this._focusable( uiDialogTitlebarClose ); + + if ( options.draggable && $.fn.draggable ) { + this._makeDraggable(); + } + if ( options.resizable && $.fn.resizable ) { + this._makeResizable(); + } + + this._createButtons( options.buttons ); + this._isOpen = false; + + if ( $.fn.bgiframe ) { + uiDialog.bgiframe(); + } + + // prevent tabbing out of modal dialogs + this._on( uiDialog, { keydown: function( event ) { + if ( !options.modal || event.keyCode !== $.ui.keyCode.TAB ) { + return; + } + + var tabbables = $( ":tabbable", uiDialog ), + 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 ); + return false; + } + }}); + }, + + _init: function() { + if ( this.options.autoOpen ) { + this.open(); + } + }, + + _destroy: function() { + var next, + oldPosition = this.oldPosition; + + if ( this.overlay ) { + this.overlay.destroy(); + } + this.uiDialog.hide(); + this.element + .removeClass( "ui-dialog-content ui-widget-content" ) + .hide() + .appendTo( "body" ); + this.uiDialog.remove(); + + if ( this.originalTitle ) { + this.element.attr( "title", this.originalTitle ); + } + + next = oldPosition.parent.children().eq( oldPosition.index ); + // Don't try to place the dialog next to itself (#8613) + if ( next.length && next[ 0 ] !== this.element[ 0 ] ) { + next.before( this.element ); + } else { + oldPosition.parent.append( this.element ); + } + }, + + widget: function() { + return this.uiDialog; + }, + + close: function( event ) { + var that = this, + maxZ, thisZ; + + if ( !this._isOpen ) { + return; + } + + if ( false === this._trigger( "beforeClose", event ) ) { + return; + } + + this._isOpen = false; + + if ( this.overlay ) { + this.overlay.destroy(); + } + + if ( this.options.hide ) { + this._hide( this.uiDialog, this.options.hide, function() { + that._trigger( "close", event ); + }); + } else { + this.uiDialog.hide(); + this._trigger( "close", event ); + } + + $.ui.dialog.overlay.resize(); + + // adjust the maxZ to allow other modal dialogs to continue to work (see #4309) + if ( this.options.modal ) { + maxZ = 0; + $( ".ui-dialog" ).each(function() { + if ( this !== that.uiDialog[0] ) { + thisZ = $( this ).css( "z-index" ); + if ( !isNaN( thisZ ) ) { + maxZ = Math.max( maxZ, thisZ ); + } + } + }); + $.ui.dialog.maxZ = maxZ; + } + + return this; + }, + + isOpen: function() { + return this._isOpen; + }, + + // the force parameter allows us to move modal dialogs to their correct + // position on open + moveToTop: function( force, event ) { + var options = this.options, + saveScroll; + + if ( ( options.modal && !force ) || + ( !options.stack && !options.modal ) ) { + return this._trigger( "focus", event ); + } + + if ( options.zIndex > $.ui.dialog.maxZ ) { + $.ui.dialog.maxZ = options.zIndex; + } + if ( this.overlay ) { + $.ui.dialog.maxZ += 1; + $.ui.dialog.overlay.maxZ = $.ui.dialog.maxZ; + this.overlay.$el.css( "z-index", $.ui.dialog.overlay.maxZ ); + } + + // Save and then restore scroll + // Opera 9.5+ resets when parent z-index is changed. + // http://bugs.jqueryui.com/ticket/3193 + saveScroll = { + scrollTop: this.element.scrollTop(), + scrollLeft: this.element.scrollLeft() + }; + $.ui.dialog.maxZ += 1; + this.uiDialog.css( "z-index", $.ui.dialog.maxZ ); + this.element.attr( saveScroll ); + this._trigger( "focus", event ); + + return this; + }, + + open: function() { + if ( this._isOpen ) { + return; + } + + var hasFocus, + options = this.options, + uiDialog = this.uiDialog; + + this._size(); + this._position( options.position ); + uiDialog.show( options.show ); + this.overlay = options.modal ? new $.ui.dialog.overlay( this ) : null; + this.moveToTop( true ); + + // 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 + hasFocus = this.element.find( ":tabbable" ); + if ( !hasFocus.length ) { + hasFocus = this.uiDialogButtonPane.find( ":tabbable" ); + if ( !hasFocus.length ) { + hasFocus = uiDialog; + } + } + hasFocus.eq( 0 ).focus(); + + this._isOpen = true; + this._trigger( "open" ); + + return this; + }, + + _createButtons: function( buttons ) { + var that = this, + hasButtons = false; + + // if we already have a button pane, remove it + this.uiDialogButtonPane.remove(); + this.uiButtonSet.empty(); + + if ( typeof buttons === "object" && buttons !== null ) { + $.each( buttons, function() { + return !(hasButtons = true); + }); + } + if ( hasButtons ) { + $.each( buttons, function( name, props ) { + var button, click; + props = $.isFunction( props ) ? + { click: props, text: name } : + props; + // Default to a non-submitting button + props = $.extend( { type: "button" }, props ); + // Change the context for the click callback to be the main element + click = props.click; + props.click = function() { + click.apply( that.element[0], arguments ); + }; + button = $( "", props ) + .appendTo( that.uiButtonSet ); + if ( $.fn.button ) { + button.button(); + } + }); + this.uiDialog.addClass( "ui-dialog-buttons" ); + this.uiDialogButtonPane.appendTo( this.uiDialog ); + } else { + this.uiDialog.removeClass( "ui-dialog-buttons" ); + } + }, + + _makeDraggable: function() { + var that = this, + options = this.options; + + function filteredUi( ui ) { + return { + position: ui.position, + offset: ui.offset + }; + } + + this.uiDialog.draggable({ + cancel: ".ui-dialog-content, .ui-dialog-titlebar-close", + handle: ".ui-dialog-titlebar", + containment: "document", + start: function( event, ui ) { + $( this ) + .addClass( "ui-dialog-dragging" ); + that._trigger( "dragStart", event, filteredUi( ui ) ); + }, + drag: function( event, ui ) { + that._trigger( "drag", event, filteredUi( ui ) ); + }, + stop: function( event, ui ) { + options.position = [ + ui.position.left - that.document.scrollLeft(), + ui.position.top - that.document.scrollTop() + ]; + $( this ) + .removeClass( "ui-dialog-dragging" ); + that._trigger( "dragStop", event, filteredUi( ui ) ); + $.ui.dialog.overlay.resize(); + } + }); + }, + + _makeResizable: function( handles ) { + handles = (handles === undefined ? this.options.resizable : handles); + var that = this, + options = this.options, + // .ui-resizable has position: relative defined in the stylesheet + // but dialogs have to use absolute or fixed positioning + position = this.uiDialog.css( "position" ), + resizeHandles = typeof handles === 'string' ? + handles : + "n,e,s,w,se,sw,ne,nw"; + + function filteredUi( ui ) { + return { + originalPosition: ui.originalPosition, + originalSize: ui.originalSize, + position: ui.position, + size: ui.size + }; + } + + this.uiDialog.resizable({ + cancel: ".ui-dialog-content", + containment: "document", + alsoResize: this.element, + maxWidth: options.maxWidth, + maxHeight: options.maxHeight, + minWidth: options.minWidth, + minHeight: this._minHeight(), + handles: resizeHandles, + start: function( event, ui ) { + $( this ).addClass( "ui-dialog-resizing" ); + that._trigger( "resizeStart", event, filteredUi( ui ) ); + }, + resize: function( event, ui ) { + that._trigger( "resize", event, filteredUi( ui ) ); + }, + stop: function( event, ui ) { + $( this ).removeClass( "ui-dialog-resizing" ); + options.height = $( this ).height(); + options.width = $( this ).width(); + that._trigger( "resizeStop", event, filteredUi( ui ) ); + $.ui.dialog.overlay.resize(); + } + }) + .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" ) { + return options.minHeight; + } else { + return Math.min( options.minHeight, options.height ); + } + }, + + _position: function( position ) { + var myAt = [], + offset = [ 0, 0 ], + isVisible; + + 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(' '); + + 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; + } + }); + + position = { + my: myAt[0] + (offset[0] < 0 ? offset[0] : "+" + offset[0]) + " " + + myAt[1] + (offset[1] < 0 ? offset[1] : "+" + offset[1]), + at: myAt.join( " " ) + }; + } + + 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 ) { + this.uiDialog.show(); + } + this.uiDialog.position( position ); + if ( !isVisible ) { + this.uiDialog.hide(); + } + }, + + _setOptions: function( options ) { + var that = this, + resizableOptions = {}, + resize = false; + + $.each( options, function( key, value ) { + that._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 isDraggable, isResizable, + uiDialog = this.uiDialog; + + switch ( key ) { + case "buttons": + this._createButtons( value ); + break; + case "closeText": + // ensure that we always pass a string + this.uiDialogTitlebarCloseText.text( "" + value ); + break; + case "dialogClass": + uiDialog + .removeClass( this.options.dialogClass ) + .addClass( uiDialogClasses + value ); + break; + case "disabled": + if ( value ) { + uiDialog.addClass( "ui-dialog-disabled" ); + } else { + uiDialog.removeClass( "ui-dialog-disabled" ); + } + break; + case "draggable": + isDraggable = uiDialog.is( ":data(draggable)" ); + if ( isDraggable && !value ) { + uiDialog.draggable( "destroy" ); + } + + if ( !isDraggable && value ) { + this._makeDraggable(); + } + break; + case "position": + this._position( value ); + break; + case "resizable": + // currently resizable, becoming non-resizable + 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 ); + } + + // currently non-resizable, becoming resizable + if ( !isResizable && value !== false ) { + this._makeResizable( value ); + } + break; + case "title": + // convert whatever was passed in o a string, for html() to not throw up + $( ".ui-dialog-title", this.uiDialogTitlebar ) + .html( "" + ( value || " " ) ); + break; + } + + this._super( key, value ); + }, + + _size: function() { + /* If the user has resized the dialog, the .ui-dialog and .ui-dialog-content + * divs will both have width and height set, so we need to reset them + */ + var nonContentHeight, minContentHeight, autoHeight, + options = this.options, + isVisible = this.uiDialog.is( ":visible" ); + + // reset content sizing + 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", + width: options.width + }) + .outerHeight(); + 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(); + 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 ) ); + } + + if (this.uiDialog.is( ":data(resizable)" ) ) { + this.uiDialog.resizable( "option", "minHeight", this._minHeight() ); + } + } +}); + +$.extend($.ui.dialog, { + uuid: 0, + maxZ: 0, + + getTitleId: function($el) { + var id = $el.attr( "id" ); + if ( !id ) { + this.uuid += 1; + id = this.uuid; + } + return "ui-dialog-title-" + id; + }, + + overlay: function( dialog ) { + this.$el = $.ui.dialog.overlay.create( dialog ); + } +}); + +$.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 ) { + // 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 ) { + // stop events if the z-index of the target is < the z-index of the overlay + // 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 ); + + // handle window resize + $( window ).bind( "resize.dialog-overlay", $.ui.dialog.overlay.resize ); + } + + var $el = ( this.oldInstances.pop() || $( "
          " ).addClass( "ui-widget-overlay" ) ); + + // allow closing by pressing the escape key + $( document ).bind( "keydown.dialog-overlay", function( event ) { + var instances = $.ui.dialog.overlay.instances; + // only react to the event if we're the top overlay + if ( instances.length !== 0 && instances[ instances.length - 1 ] === $el && + dialog.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode && + event.keyCode === $.ui.keyCode.ESCAPE ) { + + dialog.close( event ); + event.preventDefault(); + } + }); + + $el.appendTo( document.body ).css({ + width: this.width(), + height: this.height() + }); + + if ( $.fn.bgiframe ) { + $el.bgiframe(); + } + + this.instances.push( $el ); + return $el; + }, + + destroy: function( $el ) { + var indexOf = $.inArray( $el, this.instances ), + maxZ = 0; + + if ( indexOf !== -1 ) { + this.oldInstances.push( this.instances.splice( indexOf, 1 )[ 0 ] ); + } + + if ( this.instances.length === 0 ) { + $( [ document, window ] ).unbind( ".dialog-overlay" ); + } + + $el.height( 0 ).width( 0 ).remove(); + + // adjust the maxZ to allow other modal dialogs to continue to work (see #4309) + $.each( this.instances, function() { + maxZ = Math.max( maxZ, this.css( "z-index" ) ); + }); + this.maxZ = maxZ; + }, + + height: function() { + var scrollHeight, + offsetHeight; + // handle IE + if ( $.ui.ie ) { + scrollHeight = Math.max( + document.documentElement.scrollHeight, + document.body.scrollHeight + ); + offsetHeight = Math.max( + document.documentElement.offsetHeight, + document.body.offsetHeight + ); + + if ( scrollHeight < offsetHeight ) { + return $( window ).height() + "px"; + } else { + return scrollHeight + "px"; + } + // handle "good" browsers + } else { + return $( document ).height() + "px"; + } + }, + + width: function() { + var scrollWidth, + offsetWidth; + // handle IE + if ( $.ui.ie ) { + scrollWidth = Math.max( + document.documentElement.scrollWidth, + document.body.scrollWidth + ); + offsetWidth = Math.max( + document.documentElement.offsetWidth, + document.body.offsetWidth + ); + + if ( scrollWidth < offsetWidth ) { + return $( window ).width() + "px"; + } else { + return scrollWidth + "px"; + } + // handle "good" browsers + } else { + return $( document ).width() + "px"; + } + }, + + resize: function() { + /* If the dialog is draggable and the user drags it past the + * right edge of the window, the document becomes wider so we + * need to stretch the overlay. If the user then drags the + * dialog back to the left, the document will become narrower, + * so we need to shrink the overlay to the appropriate size. + * 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 ); + }); + + $overlays.css({ + width: 0, + height: 0 + }).css({ + width: $.ui.dialog.overlay.width(), + height: $.ui.dialog.overlay.height() + }); + } +}); + +$.extend( $.ui.dialog.overlay.prototype, { + destroy: function() { + $.ui.dialog.overlay.destroy( this.$el ); + } +}); + +}( jQuery ) ); diff --git a/resources/lib/jquery.ui/jquery.ui.draggable.js b/resources/lib/jquery.ui/jquery.ui.draggable.js new file mode 100644 index 00000000..37680224 --- /dev/null +++ b/resources/lib/jquery.ui/jquery.ui.draggable.js @@ -0,0 +1,836 @@ +/*! + * jQuery UI Draggable 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/draggable/ + * + * Depends: + * jquery.ui.core.js + * jquery.ui.mouse.js + * jquery.ui.widget.js + */ +(function( $, undefined ) { + +$.widget("ui.draggable", $.ui.mouse, { + version: "1.9.2", + widgetEventPrefix: "drag", + options: { + addClasses: true, + appendTo: "parent", + axis: false, + connectToSortable: false, + containment: false, + cursor: "auto", + cursorAt: false, + grid: false, + handle: false, + helper: "original", + iframeFix: false, + opacity: false, + refreshPositions: false, + revert: false, + revertDuration: 500, + scope: "default", + scroll: true, + scrollSensitivity: 20, + scrollSpeed: 20, + snap: false, + snapMode: "both", + snapTolerance: 20, + stack: false, + zIndex: false + }, + _create: function() { + + if (this.options.helper == 'original' && !(/^(?:r|a|f)/).test(this.element.css("position"))) + this.element[0].style.position = 'relative'; + + (this.options.addClasses && this.element.addClass("ui-draggable")); + (this.options.disabled && this.element.addClass("ui-draggable-disabled")); + + this._mouseInit(); + + }, + + _destroy: function() { + this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" ); + this._mouseDestroy(); + }, + + _mouseCapture: function(event) { + + var o = this.options; + + // among others, prevent a drag on a resizable-handle + if (this.helper || o.disabled || $(event.target).is('.ui-resizable-handle')) + return false; + + //Quit if we're not on a valid handle + this.handle = this._getHandle(event); + if (!this.handle) + return false; + + $(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() { + $('
          ') + .css({ + width: this.offsetWidth+"px", height: this.offsetHeight+"px", + position: "absolute", opacity: "0.001", zIndex: 1000 + }) + .css($(this).offset()) + .appendTo("body"); + }); + + return true; + + }, + + _mouseStart: function(event) { + + var o = this.options; + + //Create and append the visible helper + this.helper = this._createHelper(event); + + this.helper.addClass("ui-draggable-dragging"); + + //Cache the helper size + this._cacheHelperProportions(); + + //If ddmanager is used for droppables, set the global draggable + if($.ui.ddmanager) + $.ui.ddmanager.current = this; + + /* + * - Position generation - + * This block generates everything position related - it's the core of draggables. + */ + + //Cache the margins of the original element + this._cacheMargins(); + + //Store the helper's css position + this.cssPosition = this.helper.css("position"); + this.scrollParent = this.helper.scrollParent(); + + //The element's absolute position on the page minus margins + this.offset = this.positionAbs = this.element.offset(); + this.offset = { + top: this.offset.top - this.margins.top, + left: this.offset.left - this.margins.left + }; + + $.extend(this.offset, { + click: { //Where the click happened, relative to the element + left: event.pageX - this.offset.left, + top: event.pageY - this.offset.top + }, + parent: this._getParentOffset(), + relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper + }); + + //Generate the original position + this.originalPosition = this.position = this._generatePosition(event); + this.originalPageX = event.pageX; + this.originalPageY = event.pageY; + + //Adjust the mouse offset relative to the helper if 'cursorAt' is supplied + (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt)); + + //Set a containment if given in the options + if(o.containment) + this._setContainment(); + + //Trigger event + callbacks + if(this._trigger("start", event) === false) { + this._clear(); + return false; + } + + //Recache the helper size + this._cacheHelperProportions(); + + //Prepare the droppable offsets + if ($.ui.ddmanager && !o.dropBehaviour) + $.ui.ddmanager.prepareOffsets(this, event); + + + this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position + + //If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003) + if ( $.ui.ddmanager ) $.ui.ddmanager.dragStart(this, event); + + return true; + }, + + _mouseDrag: function(event, noPropagation) { + + //Compute the helpers position + this.position = this._generatePosition(event); + this.positionAbs = this._convertPositionTo("absolute"); + + //Call plugins and callbacks and use the resulting position if something is returned + if (!noPropagation) { + var ui = this._uiHash(); + if(this._trigger('drag', event, ui) === false) { + this._mouseUp({}); + return false; + } + this.position = ui.position; + } + + if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px'; + if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px'; + if($.ui.ddmanager) $.ui.ddmanager.drag(this, event); + + return false; + }, + + _mouseStop: function(event) { + + //If we are using droppables, inform the manager about the drop + var dropped = false; + if ($.ui.ddmanager && !this.options.dropBehaviour) + dropped = $.ui.ddmanager.drop(this, event); + + //if a drop comes from outside (a sortable) + if(this.dropped) { + dropped = this.dropped; + this.dropped = false; + } + + //if the original element is no longer in the DOM don't bother to continue (see #8269) + var element = this.element[0], elementInDom = false; + while ( element && (element = element.parentNode) ) { + if (element == document ) { + elementInDom = true; + } + } + if ( !elementInDom && this.options.helper === "original" ) + return false; + + if((this.options.revert == "invalid" && !dropped) || (this.options.revert == "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) { + var that = this; + $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() { + if(that._trigger("stop", event) !== false) { + that._clear(); + } + }); + } else { + if(this._trigger("stop", event) !== false) { + this._clear(); + } + } + + return false; + }, + + _mouseUp: function(event) { + //Remove frame helpers + $("div.ui-draggable-iframeFix").each(function() { + this.parentNode.removeChild(this); + }); + + //If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003) + if( $.ui.ddmanager ) $.ui.ddmanager.dragStop(this, event); + + return $.ui.mouse.prototype._mouseUp.call(this, event); + }, + + cancel: function() { + + if(this.helper.is(".ui-draggable-dragging")) { + this._mouseUp({}); + } else { + this._clear(); + } + + return this; + + }, + + _getHandle: function(event) { + + var handle = !this.options.handle || !$(this.options.handle, this.element).length ? true : false; + $(this.options.handle, this.element) + .find("*") + .andSelf() + .each(function() { + if(this == event.target) handle = true; + }); + + return handle; + + }, + + _createHelper: function(event) { + + var o = this.options; + var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper == 'clone' ? this.element.clone().removeAttr('id') : this.element); + + if(!helper.parents('body').length) + helper.appendTo((o.appendTo == 'parent' ? this.element[0].parentNode : o.appendTo)); + + if(helper[0] != this.element[0] && !(/(fixed|absolute)/).test(helper.css("position"))) + helper.css("position", "absolute"); + + return helper; + + }, + + _adjustOffsetFromHelper: function(obj) { + if (typeof obj == 'string') { + obj = obj.split(' '); + } + if ($.isArray(obj)) { + obj = {left: +obj[0], top: +obj[1] || 0}; + } + if ('left' in obj) { + this.offset.click.left = obj.left + this.margins.left; + } + if ('right' in obj) { + this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; + } + if ('top' in obj) { + this.offset.click.top = obj.top + this.margins.top; + } + if ('bottom' in obj) { + this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; + } + }, + + _getParentOffset: function() { + + //Get the offsetParent and cache its position + this.offsetParent = this.helper.offsetParent(); + var po = this.offsetParent.offset(); + + // This is a special case where we need to modify a offset calculated on start, since the following happened: + // 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 && $.contains(this.scrollParent[0], this.offsetParent[0])) { + po.left += this.scrollParent.scrollLeft(); + po.top += this.scrollParent.scrollTop(); + } + + if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information + || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.ui.ie)) //Ugly IE fix + po = { top: 0, left: 0 }; + + return { + top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0), + left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0) + }; + + }, + + _getRelativeOffset: function() { + + if(this.cssPosition == "relative") { + var p = this.element.position(); + return { + top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(), + left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft() + }; + } else { + return { top: 0, left: 0 }; + } + + }, + + _cacheMargins: function() { + this.margins = { + left: (parseInt(this.element.css("marginLeft"),10) || 0), + top: (parseInt(this.element.css("marginTop"),10) || 0), + right: (parseInt(this.element.css("marginRight"),10) || 0), + bottom: (parseInt(this.element.css("marginBottom"),10) || 0) + }; + }, + + _cacheHelperProportions: function() { + this.helperProportions = { + width: this.helper.outerWidth(), + height: this.helper.outerHeight() + }; + }, + + _setContainment: function() { + + var o = this.options; + if(o.containment == 'parent') o.containment = this.helper[0].parentNode; + if(o.containment == 'document' || o.containment == 'window') this.containment = [ + 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) { + var c = $(o.containment); + var ce = c[0]; if(!ce) return; + var co = c.offset(); + var over = ($(ce).css("overflow") != 'hidden'); + + this.containment = [ + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0), + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0), + (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 - this.margins.right, + (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 - this.margins.bottom + ]; + this.relative_container = c; + + } else if(o.containment.constructor == Array) { + this.containment = o.containment; + } + + }, + + _convertPositionTo: function(d, pos) { + + if(!pos) pos = this.position; + var mod = d == "absolute" ? 1 : -1; + 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: ( + pos.top // The absolute mouse position + + this.offset.relative.top * mod // Only for relative positioned nodes: Relative offset from element to offset parent + + this.offset.parent.top * mod // The offsetParent's offset without borders (offset + border) + - ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod) + ), + left: ( + pos.left // The absolute mouse position + + this.offset.relative.left * mod // Only for relative positioned nodes: Relative offset from element to offset parent + + this.offset.parent.left * mod // The offsetParent's offset without borders (offset + border) + - ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod) + ) + }; + + }, + + _generatePosition: function(event) { + + 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; + + /* + * - Position constraining - + * Constrain the position to a mix of grid, containment. + */ + + if(this.originalPosition) { //If we are not dragging yet, we won't check for options + var containment; + if(this.containment) { + if (this.relative_container){ + var co = this.relative_container.offset(); + containment = [ this.containment[0] + co.left, + this.containment[1] + co.top, + this.containment[2] + co.left, + this.containment[3] + co.top ]; + } + else { + containment = this.containment; + } + + if(event.pageX - this.offset.click.left < containment[0]) pageX = containment[0] + this.offset.click.left; + if(event.pageY - this.offset.click.top < containment[1]) pageY = containment[1] + this.offset.click.top; + if(event.pageX - this.offset.click.left > containment[2]) pageX = containment[2] + this.offset.click.left; + if(event.pageY - this.offset.click.top > containment[3]) pageY = containment[3] + this.offset.click.top; + } + + if(o.grid) { + //Check for grid elements set to 0 to prevent divide by 0 error causing invalid argument errors in IE (see ticket #6950) + var top = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY; + pageY = containment ? (!(top - this.offset.click.top < containment[1] || top - this.offset.click.top > containment[3]) ? top : (!(top - this.offset.click.top < containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top; + + var left = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX; + pageX = containment ? (!(left - this.offset.click.left < containment[0] || left - this.offset.click.left > containment[2]) ? left : (!(left - this.offset.click.left < containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left; + } + + } + + return { + top: ( + pageY // The absolute mouse position + - this.offset.click.top // Click offset (relative to the element) + - this.offset.relative.top // Only for relative positioned nodes: Relative offset from element to offset parent + - this.offset.parent.top // The offsetParent's offset without borders (offset + border) + + ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) )) + ), + left: ( + pageX // The absolute mouse position + - this.offset.click.left // Click offset (relative to the element) + - this.offset.relative.left // Only for relative positioned nodes: Relative offset from element to offset parent + - this.offset.parent.left // The offsetParent's offset without borders (offset + border) + + ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() )) + ) + }; + + }, + + _clear: function() { + this.helper.removeClass("ui-draggable-dragging"); + if(this.helper[0] != this.element[0] && !this.cancelHelperRemoval) this.helper.remove(); + //if($.ui.ddmanager) $.ui.ddmanager.current = null; + this.helper = null; + this.cancelHelperRemoval = false; + }, + + // From now on bulk stuff - mainly helpers + + _trigger: function(type, event, ui) { + ui = ui || this._uiHash(); + $.ui.plugin.call(this, type, [event, ui]); + if(type == "drag") this.positionAbs = this._convertPositionTo("absolute"); //The absolute position has to be recalculated after plugins + return $.Widget.prototype._trigger.call(this, type, event, ui); + }, + + plugins: {}, + + _uiHash: function(event) { + return { + helper: this.helper, + position: this.position, + originalPosition: this.originalPosition, + offset: this.positionAbs + }; + } + +}); + +$.ui.plugin.add("draggable", "connectToSortable", { + start: function(event, ui) { + + var inst = $(this).data("draggable"), o = inst.options, + uiSortable = $.extend({}, ui, { item: inst.element }); + inst.sortables = []; + $(o.connectToSortable).each(function() { + var sortable = $.data(this, 'sortable'); + if (sortable && !sortable.options.disabled) { + inst.sortables.push({ + instance: sortable, + shouldRevert: sortable.options.revert + }); + sortable.refreshPositions(); // Call the sortable's refreshPositions at drag start to refresh the containerCache since the sortable container cache is used in drag and needs to be up to date (this will ensure it's initialised as well as being kept in step with any changes that might have happened on the page). + sortable._trigger("activate", event, uiSortable); + } + }); + + }, + stop: function(event, ui) { + + //If we are still over the sortable, we fake the stop event of the sortable, but also remove helper + var inst = $(this).data("draggable"), + uiSortable = $.extend({}, ui, { item: inst.element }); + + $.each(inst.sortables, function() { + if(this.instance.isOver) { + + this.instance.isOver = 0; + + inst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance + this.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work) + + //The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: 'valid/invalid' + if(this.shouldRevert) this.instance.options.revert = true; + + //Trigger the stop of the sortable + this.instance._mouseStop(event); + + this.instance.options.helper = this.instance.options._helper; + + //If the helper has been the original item, restore properties in the sortable + if(inst.options.helper == 'original') + this.instance.currentItem.css({ top: 'auto', left: 'auto' }); + + } else { + this.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance + this.instance._trigger("deactivate", event, uiSortable); + } + + }); + + }, + drag: function(event, ui) { + + var inst = $(this).data("draggable"), that = this; + + var checkPos = function(o) { + var dyClick = this.offset.click.top, dxClick = this.offset.click.left; + var helperTop = this.positionAbs.top, helperLeft = this.positionAbs.left; + var itemHeight = o.height, itemWidth = o.width; + var itemTop = o.top, itemLeft = o.left; + + return $.ui.isOver(helperTop + dyClick, helperLeft + dxClick, itemTop, itemLeft, itemHeight, itemWidth); + }; + + $.each(inst.sortables, function(i) { + + var innermostIntersecting = false; + var thisSortable = this; + //Copy over some variables to allow calling the sortable's native _intersectsWith + this.instance.positionAbs = inst.positionAbs; + this.instance.helperProportions = inst.helperProportions; + this.instance.offset.click = inst.offset.click; + + if(this.instance._intersectsWith(this.instance.containerCache)) { + innermostIntersecting = true; + $.each(inst.sortables, function () { + this.instance.positionAbs = inst.positionAbs; + this.instance.helperProportions = inst.helperProportions; + this.instance.offset.click = inst.offset.click; + if (this != thisSortable + && this.instance._intersectsWith(this.instance.containerCache) + && $.ui.contains(thisSortable.instance.element[0], this.instance.element[0])) + innermostIntersecting = false; + return innermostIntersecting; + }); + } + + + if(innermostIntersecting) { + //If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once + if(!this.instance.isOver) { + + this.instance.isOver = 1; + //Now we fake the start of dragging for the sortable instance, + //by cloning the list group item, appending it to the sortable and using it as inst.currentItem + //We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one) + this.instance.currentItem = $(that).clone().removeAttr('id').appendTo(this.instance.element).data("sortable-item", true); + this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it + this.instance.options.helper = function() { return ui.helper[0]; }; + + event.target = this.instance.currentItem[0]; + this.instance._mouseCapture(event, true); + this.instance._mouseStart(event, true, true); + + //Because the browser event is way off the new appended portlet, we modify a couple of variables to reflect the changes + this.instance.offset.click.top = inst.offset.click.top; + this.instance.offset.click.left = inst.offset.click.left; + this.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left; + this.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top; + + inst._trigger("toSortable", event); + inst.dropped = this.instance.element; //draggable revert needs that + //hack so receive/update callbacks work (mostly) + inst.currentItem = inst.element; + this.instance.fromOutside = inst; + + } + + //Provided we did all the previous steps, we can fire the drag event of the sortable on every draggable drag, when it intersects with the sortable + if(this.instance.currentItem) this.instance._mouseDrag(event); + + } else { + + //If it doesn't intersect with the sortable, and it intersected before, + //we fake the drag stop of the sortable, but make sure it doesn't remove the helper by using cancelHelperRemoval + if(this.instance.isOver) { + + this.instance.isOver = 0; + this.instance.cancelHelperRemoval = true; + + //Prevent reverting on this forced stop + this.instance.options.revert = false; + + // The out event needs to be triggered independently + this.instance._trigger('out', event, this.instance._uiHash(this.instance)); + + this.instance._mouseStop(event, true); + this.instance.options.helper = this.instance.options._helper; + + //Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size + this.instance.currentItem.remove(); + if(this.instance.placeholder) this.instance.placeholder.remove(); + + inst._trigger("fromSortable", event); + inst.dropped = false; //draggable revert needs that + } + + }; + + }); + + } +}); + +$.ui.plugin.add("draggable", "cursor", { + start: function(event, ui) { + var t = $('body'), o = $(this).data('draggable').options; + if (t.css("cursor")) o._cursor = t.css("cursor"); + t.css("cursor", o.cursor); + }, + stop: function(event, ui) { + var o = $(this).data('draggable').options; + if (o._cursor) $('body').css("cursor", o._cursor); + } +}); + +$.ui.plugin.add("draggable", "opacity", { + start: function(event, ui) { + var t = $(ui.helper), o = $(this).data('draggable').options; + if(t.css("opacity")) o._opacity = t.css("opacity"); + t.css('opacity', o.opacity); + }, + stop: function(event, ui) { + var o = $(this).data('draggable').options; + if(o._opacity) $(ui.helper).css('opacity', o._opacity); + } +}); + +$.ui.plugin.add("draggable", "scroll", { + start: function(event, ui) { + var i = $(this).data("draggable"); + if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') i.overflowOffset = i.scrollParent.offset(); + }, + drag: function(event, ui) { + + var i = $(this).data("draggable"), o = i.options, scrolled = false; + + if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') { + + if(!o.axis || o.axis != 'x') { + if((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) + i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed; + else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity) + i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed; + } + + if(!o.axis || o.axis != 'y') { + if((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) + i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed; + else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity) + i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed; + } + + } else { + + if(!o.axis || o.axis != 'x') { + if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) + scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed); + else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) + scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed); + } + + if(!o.axis || o.axis != 'y') { + if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) + scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed); + else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) + scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed); + } + + } + + if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) + $.ui.ddmanager.prepareOffsets(i, event); + + } +}); + +$.ui.plugin.add("draggable", "snap", { + start: function(event, ui) { + + var i = $(this).data("draggable"), o = i.options; + i.snapElements = []; + + $(o.snap.constructor != String ? ( o.snap.items || ':data(draggable)' ) : o.snap).each(function() { + var $t = $(this); var $o = $t.offset(); + if(this != i.element[0]) i.snapElements.push({ + item: this, + width: $t.outerWidth(), height: $t.outerHeight(), + top: $o.top, left: $o.left + }); + }); + + }, + drag: function(event, ui) { + + var inst = $(this).data("draggable"), o = inst.options; + var d = o.snapTolerance; + + var x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width, + y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height; + + for (var i = inst.snapElements.length - 1; i >= 0; i--){ + + var l = inst.snapElements[i].left, r = l + inst.snapElements[i].width, + t = inst.snapElements[i].top, b = t + inst.snapElements[i].height; + + //Yes, I know, this is insane ;) + if(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || (l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d < y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) { + if(inst.snapElements[i].snapping) (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item }))); + inst.snapElements[i].snapping = false; + continue; + } + + if(o.snapMode != 'inner') { + var ts = Math.abs(t - y2) <= d; + var bs = Math.abs(b - y1) <= d; + var ls = Math.abs(l - x2) <= d; + var rs = Math.abs(r - x1) <= d; + if(ts) ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top - inst.margins.top; + if(bs) ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top - inst.margins.top; + if(ls) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left - inst.margins.left; + if(rs) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left - inst.margins.left; + } + + var first = (ts || bs || ls || rs); + + if(o.snapMode != 'outer') { + var ts = Math.abs(t - y1) <= d; + var bs = Math.abs(b - y2) <= d; + var ls = Math.abs(l - x1) <= d; + var rs = Math.abs(r - x2) <= d; + if(ts) ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top - inst.margins.top; + if(bs) ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top; + if(ls) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left - inst.margins.left; + if(rs) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left - inst.margins.left; + } + + if(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first)) + (inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item }))); + inst.snapElements[i].snapping = (ts || bs || ls || rs || first); + + }; + + } +}); + +$.ui.plugin.add("draggable", "stack", { + start: function(event, ui) { + + var o = $(this).data("draggable").options; + + var group = $.makeArray($(o.stack)).sort(function(a,b) { + return (parseInt($(a).css("zIndex"),10) || 0) - (parseInt($(b).css("zIndex"),10) || 0); + }); + if (!group.length) { return; } + + var min = parseInt(group[0].style.zIndex) || 0; + $(group).each(function(i) { + this.style.zIndex = min + i; + }); + + this[0].style.zIndex = min + group.length; + + } +}); + +$.ui.plugin.add("draggable", "zIndex", { + start: function(event, ui) { + var t = $(ui.helper), o = $(this).data("draggable").options; + if(t.css("zIndex")) o._zIndex = t.css("zIndex"); + t.css('zIndex', o.zIndex); + }, + stop: function(event, ui) { + var o = $(this).data("draggable").options; + if(o._zIndex) $(ui.helper).css('zIndex', o._zIndex); + } +}); + +})(jQuery); diff --git a/resources/lib/jquery.ui/jquery.ui.droppable.js b/resources/lib/jquery.ui/jquery.ui.droppable.js new file mode 100644 index 00000000..1e9ea513 --- /dev/null +++ b/resources/lib/jquery.ui/jquery.ui.droppable.js @@ -0,0 +1,294 @@ +/*! + * jQuery UI Droppable 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/droppable/ + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + * jquery.ui.mouse.js + * jquery.ui.draggable.js + */ +(function( $, undefined ) { + +$.widget("ui.droppable", { + version: "1.9.2", + widgetEventPrefix: "drop", + options: { + accept: '*', + activeClass: false, + addClasses: true, + greedy: false, + hoverClass: false, + scope: 'default', + tolerance: 'intersect' + }, + _create: function() { + + var o = this.options, accept = o.accept; + this.isover = 0; this.isout = 1; + + this.accept = $.isFunction(accept) ? accept : function(d) { + return d.is(accept); + }; + + //Store the droppable's proportions + this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight }; + + // Add the reference and positions to the manager + $.ui.ddmanager.droppables[o.scope] = $.ui.ddmanager.droppables[o.scope] || []; + $.ui.ddmanager.droppables[o.scope].push(this); + + (o.addClasses && this.element.addClass("ui-droppable")); + + }, + + _destroy: function() { + var drop = $.ui.ddmanager.droppables[this.options.scope]; + for ( var i = 0; i < drop.length; i++ ) + if ( drop[i] == this ) + drop.splice(i, 1); + + this.element.removeClass("ui-droppable ui-droppable-disabled"); + }, + + _setOption: function(key, value) { + + if(key == 'accept') { + this.accept = $.isFunction(value) ? value : function(d) { + return d.is(value); + }; + } + $.Widget.prototype._setOption.apply(this, arguments); + }, + + _activate: function(event) { + var draggable = $.ui.ddmanager.current; + if(this.options.activeClass) this.element.addClass(this.options.activeClass); + (draggable && this._trigger('activate', event, this.ui(draggable))); + }, + + _deactivate: function(event) { + var draggable = $.ui.ddmanager.current; + if(this.options.activeClass) this.element.removeClass(this.options.activeClass); + (draggable && this._trigger('deactivate', event, this.ui(draggable))); + }, + + _over: function(event) { + + var draggable = $.ui.ddmanager.current; + if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element + + if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { + if(this.options.hoverClass) this.element.addClass(this.options.hoverClass); + this._trigger('over', event, this.ui(draggable)); + } + + }, + + _out: function(event) { + + var draggable = $.ui.ddmanager.current; + if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element + + if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { + if(this.options.hoverClass) this.element.removeClass(this.options.hoverClass); + this._trigger('out', event, this.ui(draggable)); + } + + }, + + _drop: function(event,custom) { + + var draggable = custom || $.ui.ddmanager.current; + if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return false; // Bail if draggable and droppable are same element + + var childrenIntersection = false; + this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function() { + var inst = $.data(this, 'droppable'); + if( + inst.options.greedy + && !inst.options.disabled + && inst.options.scope == draggable.options.scope + && inst.accept.call(inst.element[0], (draggable.currentItem || draggable.element)) + && $.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance) + ) { childrenIntersection = true; return false; } + }); + if(childrenIntersection) return false; + + if(this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { + if(this.options.activeClass) this.element.removeClass(this.options.activeClass); + if(this.options.hoverClass) this.element.removeClass(this.options.hoverClass); + this._trigger('drop', event, this.ui(draggable)); + return this.element; + } + + return false; + + }, + + ui: function(c) { + return { + draggable: (c.currentItem || c.element), + helper: c.helper, + position: c.position, + offset: c.positionAbs + }; + } + +}); + +$.ui.intersect = function(draggable, droppable, toleranceMode) { + + if (!droppable.offset) return false; + + var x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width, + y1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height; + var l = droppable.offset.left, r = l + droppable.proportions.width, + t = droppable.offset.top, b = t + droppable.proportions.height; + + switch (toleranceMode) { + case 'fit': + return (l <= x1 && x2 <= r + && t <= y1 && y2 <= b); + break; + case 'intersect': + return (l < x1 + (draggable.helperProportions.width / 2) // Right Half + && x2 - (draggable.helperProportions.width / 2) < r // Left Half + && t < y1 + (draggable.helperProportions.height / 2) // Bottom Half + && y2 - (draggable.helperProportions.height / 2) < b ); // Top Half + break; + case 'pointer': + var draggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left), + draggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top), + isOver = $.ui.isOver(draggableTop, draggableLeft, t, l, droppable.proportions.height, droppable.proportions.width); + return isOver; + break; + case 'touch': + return ( + (y1 >= t && y1 <= b) || // Top edge touching + (y2 >= t && y2 <= b) || // Bottom edge touching + (y1 < t && y2 > b) // Surrounded vertically + ) && ( + (x1 >= l && x1 <= r) || // Left edge touching + (x2 >= l && x2 <= r) || // Right edge touching + (x1 < l && x2 > r) // Surrounded horizontally + ); + break; + default: + return false; + break; + } + +}; + +/* + This manager tracks offsets of draggables and droppables +*/ +$.ui.ddmanager = { + current: null, + droppables: { 'default': [] }, + prepareOffsets: function(t, event) { + + var m = $.ui.ddmanager.droppables[t.options.scope] || []; + var type = event ? event.type : null; // workaround for #2317 + var list = (t.currentItem || t.element).find(":data(droppable)").andSelf(); + + droppablesLoop: for (var i = 0; i < m.length; i++) { + + if(m[i].options.disabled || (t && !m[i].accept.call(m[i].element[0],(t.currentItem || t.element)))) continue; //No disabled and non-accepted + for (var j=0; j < list.length; j++) { if(list[j] == m[i].element[0]) { m[i].proportions.height = 0; continue droppablesLoop; } }; //Filter out elements in the current dragged item + m[i].visible = m[i].element.css("display") != "none"; if(!m[i].visible) continue; //If the element is not visible, continue + + if(type == "mousedown") m[i]._activate.call(m[i], event); //Activate the droppable if used directly from draggables + + m[i].offset = m[i].element.offset(); + m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight }; + + } + + }, + drop: function(draggable, event) { + + var dropped = false; + $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() { + + if(!this.options) return; + if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance)) + dropped = this._drop.call(this, event) || dropped; + + if (!this.options.disabled && this.visible && this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { + this.isout = 1; this.isover = 0; + this._deactivate.call(this, event); + } + + }); + return dropped; + + }, + dragStart: function( draggable, event ) { + //Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003) + draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", function() { + if( !draggable.options.refreshPositions ) $.ui.ddmanager.prepareOffsets( draggable, event ); + }); + }, + drag: function(draggable, event) { + + //If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse. + if(draggable.options.refreshPositions) $.ui.ddmanager.prepareOffsets(draggable, event); + + //Run through all droppables and check their positions based on specific tolerance options + $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() { + + if(this.options.disabled || this.greedyChild || !this.visible) return; + var intersects = $.ui.intersect(draggable, this, this.options.tolerance); + + var c = !intersects && this.isover == 1 ? 'isout' : (intersects && this.isover == 0 ? 'isover' : null); + if(!c) return; + + var parentInstance; + if (this.options.greedy) { + // find droppable parents with same scope + var scope = this.options.scope; + var parent = this.element.parents(':data(droppable)').filter(function () { + return $.data(this, 'droppable').options.scope === scope; + }); + + if (parent.length) { + parentInstance = $.data(parent[0], 'droppable'); + parentInstance.greedyChild = (c == 'isover' ? 1 : 0); + } + } + + // we just moved into a greedy child + if (parentInstance && c == 'isover') { + parentInstance['isover'] = 0; + parentInstance['isout'] = 1; + parentInstance._out.call(parentInstance, event); + } + + this[c] = 1; this[c == 'isout' ? 'isover' : 'isout'] = 0; + this[c == "isover" ? "_over" : "_out"].call(this, event); + + // we just moved out of a greedy child + if (parentInstance && c == 'isout') { + parentInstance['isout'] = 0; + parentInstance['isover'] = 1; + parentInstance._over.call(parentInstance, event); + } + }); + + }, + dragStop: function( draggable, event ) { + draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" ); + //Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003) + if( !draggable.options.refreshPositions ) $.ui.ddmanager.prepareOffsets( draggable, event ); + } +}; + +})(jQuery); diff --git a/resources/lib/jquery.ui/jquery.ui.effect-blind.js b/resources/lib/jquery.ui/jquery.ui.effect-blind.js new file mode 100644 index 00000000..e5c7331a --- /dev/null +++ b/resources/lib/jquery.ui/jquery.ui.effect-blind.js @@ -0,0 +1,82 @@ +/*! + * jQuery UI Effects Blind 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/blind-effect/ + * + * Depends: + * jquery.ui.effect.js + */ +(function( $, undefined ) { + +var rvertical = /up|down|vertical/, + rpositivemotion = /up|left|vertical|horizontal/; + +$.effects.effect.blind = function( o, done ) { + // Create element + var el = $( this ), + props = [ "position", "top", "bottom", "left", "right", "height", "width" ], + mode = $.effects.setMode( el, o.mode || "hide" ), + direction = o.direction || "up", + vertical = rvertical.test( direction ), + ref = vertical ? "height" : "width", + ref2 = vertical ? "top" : "left", + motion = rpositivemotion.test( direction ), + animation = {}, + show = mode === "show", + wrapper, distance, margin; + + // if already wrapped, the wrapper's properties are my property. #6245 + if ( el.parent().is( ".ui-effects-wrapper" ) ) { + $.effects.save( el.parent(), props ); + } else { + $.effects.save( el, props ); + } + el.show(); + wrapper = $.effects.createWrapper( el ).css({ + overflow: "hidden" + }); + + distance = wrapper[ ref ](); + margin = parseFloat( wrapper.css( ref2 ) ) || 0; + + animation[ ref ] = show ? distance : 0; + if ( !motion ) { + el + .css( vertical ? "bottom" : "right", 0 ) + .css( vertical ? "top" : "left", "auto" ) + .css({ position: "absolute" }); + + animation[ ref2 ] = show ? margin : distance + margin; + } + + // start at 0 if we are showing + if ( show ) { + wrapper.css( ref, 0 ); + if ( ! motion ) { + wrapper.css( ref2, margin + distance ); + } + } + + // Animate + wrapper.animate( animation, { + duration: o.duration, + easing: o.easing, + queue: false, + complete: function() { + if ( mode === "hide" ) { + el.hide(); + } + $.effects.restore( el, props ); + $.effects.removeWrapper( el ); + done(); + } + }); + +}; + +})(jQuery); diff --git a/resources/lib/jquery.ui/jquery.ui.effect-bounce.js b/resources/lib/jquery.ui/jquery.ui.effect-bounce.js new file mode 100644 index 00000000..ab1977ef --- /dev/null +++ b/resources/lib/jquery.ui/jquery.ui.effect-bounce.js @@ -0,0 +1,113 @@ +/*! + * jQuery UI Effects Bounce 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/bounce-effect/ + * + * Depends: + * jquery.ui.effect.js + */ +(function( $, undefined ) { + +$.effects.effect.bounce = function( o, done ) { + var el = $( this ), + props = [ "position", "top", "bottom", "left", "right", "height", "width" ], + + // defaults: + mode = $.effects.setMode( el, o.mode || "effect" ), + hide = mode === "hide", + show = mode === "show", + direction = o.direction || "up", + distance = o.distance, + times = o.times || 5, + + // number of internal animations + anims = times * 2 + ( show || hide ? 1 : 0 ), + speed = o.duration / anims, + easing = o.easing, + + // utility: + ref = ( direction === "up" || direction === "down" ) ? "top" : "left", + motion = ( direction === "up" || direction === "left" ), + i, + upAnim, + downAnim, + + // we will need to re-assemble the queue to stack our animations in place + queue = el.queue(), + queuelen = queue.length; + + // Avoid touching opacity to prevent clearType and PNG issues in IE + if ( show || hide ) { + props.push( "opacity" ); + } + + $.effects.save( el, props ); + el.show(); + $.effects.createWrapper( el ); // Create Wrapper + + // default distance for the BIGGEST bounce is the outer Distance / 3 + if ( !distance ) { + distance = el[ ref === "top" ? "outerHeight" : "outerWidth" ]() / 3; + } + + if ( show ) { + downAnim = { opacity: 1 }; + downAnim[ ref ] = 0; + + // if we are showing, force opacity 0 and set the initial position + // then do the "first" animation + el.css( "opacity", 0 ) + .css( ref, motion ? -distance * 2 : distance * 2 ) + .animate( downAnim, speed, easing ); + } + + // start at the smallest distance if we are hiding + if ( hide ) { + distance = distance / Math.pow( 2, times - 1 ); + } + + downAnim = {}; + downAnim[ ref ] = 0; + // Bounces up/down/left/right then back to 0 -- times * 2 animations happen here + for ( i = 0; i < times; i++ ) { + upAnim = {}; + upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance; + + el.animate( upAnim, speed, easing ) + .animate( downAnim, speed, easing ); + + distance = hide ? distance * 2 : distance / 2; + } + + // Last Bounce when Hiding + if ( hide ) { + upAnim = { opacity: 0 }; + upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance; + + el.animate( upAnim, speed, easing ); + } + + el.queue(function() { + if ( hide ) { + el.hide(); + } + $.effects.restore( el, props ); + $.effects.removeWrapper( el ); + done(); + }); + + // inject all the animations we just queued to be first in line (after "inprogress") + if ( queuelen > 1) { + queue.splice.apply( queue, + [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) ); + } + el.dequeue(); + +}; + +})(jQuery); diff --git a/resources/lib/jquery.ui/jquery.ui.effect-clip.js b/resources/lib/jquery.ui/jquery.ui.effect-clip.js new file mode 100644 index 00000000..cce037ae --- /dev/null +++ b/resources/lib/jquery.ui/jquery.ui.effect-clip.js @@ -0,0 +1,67 @@ +/*! + * jQuery UI Effects Clip 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/clip-effect/ + * + * Depends: + * jquery.ui.effect.js + */ +(function( $, undefined ) { + +$.effects.effect.clip = function( o, done ) { + // Create element + var el = $( this ), + props = [ "position", "top", "bottom", "left", "right", "height", "width" ], + mode = $.effects.setMode( el, o.mode || "hide" ), + show = mode === "show", + direction = o.direction || "vertical", + vert = direction === "vertical", + size = vert ? "height" : "width", + position = vert ? "top" : "left", + animation = {}, + wrapper, animate, distance; + + // Save & Show + $.effects.save( el, props ); + el.show(); + + // Create Wrapper + wrapper = $.effects.createWrapper( el ).css({ + overflow: "hidden" + }); + animate = ( el[0].tagName === "IMG" ) ? wrapper : el; + distance = animate[ size ](); + + // Shift + if ( show ) { + animate.css( size, 0 ); + animate.css( position, distance / 2 ); + } + + // Create Animation Object: + animation[ size ] = show ? distance : 0; + animation[ position ] = show ? 0 : distance / 2; + + // Animate + animate.animate( animation, { + queue: false, + duration: o.duration, + easing: o.easing, + complete: function() { + if ( !show ) { + el.hide(); + } + $.effects.restore( el, props ); + $.effects.removeWrapper( el ); + done(); + } + }); + +}; + +})(jQuery); diff --git a/resources/lib/jquery.ui/jquery.ui.effect-drop.js b/resources/lib/jquery.ui/jquery.ui.effect-drop.js new file mode 100644 index 00000000..83c8ef4d --- /dev/null +++ b/resources/lib/jquery.ui/jquery.ui.effect-drop.js @@ -0,0 +1,65 @@ +/*! + * jQuery UI Effects Drop 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/drop-effect/ + * + * Depends: + * jquery.ui.effect.js + */ +(function( $, undefined ) { + +$.effects.effect.drop = function( o, done ) { + + var el = $( this ), + props = [ "position", "top", "bottom", "left", "right", "opacity", "height", "width" ], + mode = $.effects.setMode( el, o.mode || "hide" ), + show = mode === "show", + direction = o.direction || "left", + ref = ( direction === "up" || direction === "down" ) ? "top" : "left", + motion = ( direction === "up" || direction === "left" ) ? "pos" : "neg", + animation = { + opacity: show ? 1 : 0 + }, + distance; + + // Adjust + $.effects.save( el, props ); + el.show(); + $.effects.createWrapper( el ); + + distance = o.distance || el[ ref === "top" ? "outerHeight": "outerWidth" ]( true ) / 2; + + if ( show ) { + el + .css( "opacity", 0 ) + .css( ref, motion === "pos" ? -distance : distance ); + } + + // Animation + animation[ ref ] = ( show ? + ( motion === "pos" ? "+=" : "-=" ) : + ( motion === "pos" ? "-=" : "+=" ) ) + + distance; + + // Animate + el.animate( animation, { + queue: false, + duration: o.duration, + easing: o.easing, + complete: function() { + if ( mode === "hide" ) { + el.hide(); + } + $.effects.restore( el, props ); + $.effects.removeWrapper( el ); + done(); + } + }); +}; + +})(jQuery); diff --git a/resources/lib/jquery.ui/jquery.ui.effect-explode.js b/resources/lib/jquery.ui/jquery.ui.effect-explode.js new file mode 100644 index 00000000..98d5be5c --- /dev/null +++ b/resources/lib/jquery.ui/jquery.ui.effect-explode.js @@ -0,0 +1,97 @@ +/*! + * jQuery UI Effects Explode 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/explode-effect/ + * + * Depends: + * jquery.ui.effect.js + */ +(function( $, undefined ) { + +$.effects.effect.explode = function( o, done ) { + + var rows = o.pieces ? Math.round( Math.sqrt( o.pieces ) ) : 3, + cells = rows, + el = $( this ), + mode = $.effects.setMode( el, o.mode || "hide" ), + show = mode === "show", + + // show and then visibility:hidden the element before calculating offset + offset = el.show().css( "visibility", "hidden" ).offset(), + + // width and height of a piece + width = Math.ceil( el.outerWidth() / cells ), + height = Math.ceil( el.outerHeight() / rows ), + pieces = [], + + // loop + i, j, left, top, mx, my; + + // children animate complete: + function childComplete() { + pieces.push( this ); + if ( pieces.length === rows * cells ) { + animComplete(); + } + } + + // clone the element for each row and cell. + for( i = 0; i < rows ; i++ ) { // ===> + top = offset.top + i * height; + my = i - ( rows - 1 ) / 2 ; + + for( j = 0; j < cells ; j++ ) { // ||| + left = offset.left + j * width; + mx = j - ( cells - 1 ) / 2 ; + + // Create a clone of the now hidden main element that will be absolute positioned + // within a wrapper div off the -left and -top equal to size of our pieces + el + .clone() + .appendTo( "body" ) + .wrap( "
          " ) + .css({ + position: "absolute", + visibility: "visible", + left: -j * width, + top: -i * height + }) + + // select the wrapper - make it overflow: hidden and absolute positioned based on + // where the original was located +left and +top equal to the size of pieces + .parent() + .addClass( "ui-effects-explode" ) + .css({ + position: "absolute", + overflow: "hidden", + width: width, + height: height, + left: left + ( show ? mx * width : 0 ), + top: top + ( show ? my * height : 0 ), + opacity: show ? 0 : 1 + }).animate({ + left: left + ( show ? 0 : mx * width ), + top: top + ( show ? 0 : my * height ), + opacity: show ? 1 : 0 + }, o.duration || 500, o.easing, childComplete ); + } + } + + function animComplete() { + el.css({ + visibility: "visible" + }); + $( pieces ).remove(); + if ( !show ) { + el.hide(); + } + done(); + } +}; + +})(jQuery); diff --git a/resources/lib/jquery.ui/jquery.ui.effect-fade.js b/resources/lib/jquery.ui/jquery.ui.effect-fade.js new file mode 100644 index 00000000..c79c6f48 --- /dev/null +++ b/resources/lib/jquery.ui/jquery.ui.effect-fade.js @@ -0,0 +1,30 @@ +/*! + * jQuery UI Effects Fade 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/fade-effect/ + * + * Depends: + * jquery.ui.effect.js + */ +(function( $, undefined ) { + +$.effects.effect.fade = function( o, done ) { + var el = $( this ), + mode = $.effects.setMode( el, o.mode || "toggle" ); + + el.animate({ + opacity: mode + }, { + queue: false, + duration: o.duration, + easing: o.easing, + complete: done + }); +}; + +})( jQuery ); diff --git a/resources/lib/jquery.ui/jquery.ui.effect-fold.js b/resources/lib/jquery.ui/jquery.ui.effect-fold.js new file mode 100644 index 00000000..9452c5da --- /dev/null +++ b/resources/lib/jquery.ui/jquery.ui.effect-fold.js @@ -0,0 +1,76 @@ +/*! + * jQuery UI Effects Fold 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/fold-effect/ + * + * Depends: + * jquery.ui.effect.js + */ +(function( $, undefined ) { + +$.effects.effect.fold = function( o, done ) { + + // Create element + var el = $( this ), + props = [ "position", "top", "bottom", "left", "right", "height", "width" ], + mode = $.effects.setMode( el, o.mode || "hide" ), + show = mode === "show", + hide = mode === "hide", + size = o.size || 15, + percent = /([0-9]+)%/.exec( size ), + horizFirst = !!o.horizFirst, + widthFirst = show !== horizFirst, + ref = widthFirst ? [ "width", "height" ] : [ "height", "width" ], + duration = o.duration / 2, + wrapper, distance, + animation1 = {}, + animation2 = {}; + + $.effects.save( el, props ); + el.show(); + + // Create Wrapper + wrapper = $.effects.createWrapper( el ).css({ + overflow: "hidden" + }); + distance = widthFirst ? + [ wrapper.width(), wrapper.height() ] : + [ wrapper.height(), wrapper.width() ]; + + if ( percent ) { + size = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ]; + } + if ( show ) { + wrapper.css( horizFirst ? { + height: 0, + width: size + } : { + height: size, + width: 0 + }); + } + + // Animation + animation1[ ref[ 0 ] ] = show ? distance[ 0 ] : size; + animation2[ ref[ 1 ] ] = show ? distance[ 1 ] : 0; + + // Animate + wrapper + .animate( animation1, duration, o.easing ) + .animate( animation2, duration, o.easing, function() { + if ( hide ) { + el.hide(); + } + $.effects.restore( el, props ); + $.effects.removeWrapper( el ); + done(); + }); + +}; + +})(jQuery); diff --git a/resources/lib/jquery.ui/jquery.ui.effect-highlight.js b/resources/lib/jquery.ui/jquery.ui.effect-highlight.js new file mode 100644 index 00000000..d901f80e --- /dev/null +++ b/resources/lib/jquery.ui/jquery.ui.effect-highlight.js @@ -0,0 +1,50 @@ +/*! + * jQuery UI Effects Highlight 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/highlight-effect/ + * + * Depends: + * jquery.ui.effect.js + */ +(function( $, undefined ) { + +$.effects.effect.highlight = function( o, done ) { + var elem = $( this ), + props = [ "backgroundImage", "backgroundColor", "opacity" ], + mode = $.effects.setMode( elem, o.mode || "show" ), + animation = { + backgroundColor: elem.css( "backgroundColor" ) + }; + + if (mode === "hide") { + animation.opacity = 0; + } + + $.effects.save( elem, props ); + + elem + .show() + .css({ + backgroundImage: "none", + backgroundColor: o.color || "#ffff99" + }) + .animate( animation, { + queue: false, + duration: o.duration, + easing: o.easing, + complete: function() { + if ( mode === "hide" ) { + elem.hide(); + } + $.effects.restore( elem, props ); + done(); + } + }); +}; + +})(jQuery); diff --git a/resources/lib/jquery.ui/jquery.ui.effect-pulsate.js b/resources/lib/jquery.ui/jquery.ui.effect-pulsate.js new file mode 100644 index 00000000..20f84dd3 --- /dev/null +++ b/resources/lib/jquery.ui/jquery.ui.effect-pulsate.js @@ -0,0 +1,63 @@ +/*! + * jQuery UI Effects Pulsate 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/pulsate-effect/ + * + * Depends: + * jquery.ui.effect.js + */ +(function( $, undefined ) { + +$.effects.effect.pulsate = function( o, done ) { + var elem = $( this ), + mode = $.effects.setMode( elem, o.mode || "show" ), + show = mode === "show", + hide = mode === "hide", + showhide = ( show || mode === "hide" ), + + // showing or hiding leaves of the "last" animation + anims = ( ( o.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ), + duration = o.duration / anims, + animateTo = 0, + queue = elem.queue(), + queuelen = queue.length, + i; + + if ( show || !elem.is(":visible")) { + elem.css( "opacity", 0 ).show(); + animateTo = 1; + } + + // anims - 1 opacity "toggles" + for ( i = 1; i < anims; i++ ) { + elem.animate({ + opacity: animateTo + }, duration, o.easing ); + animateTo = 1 - animateTo; + } + + elem.animate({ + opacity: animateTo + }, duration, o.easing); + + elem.queue(function() { + if ( hide ) { + elem.hide(); + } + done(); + }); + + // We just queued up "anims" animations, we need to put them next in the queue + if ( queuelen > 1 ) { + queue.splice.apply( queue, + [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) ); + } + elem.dequeue(); +}; + +})(jQuery); diff --git a/resources/lib/jquery.ui/jquery.ui.effect-scale.js b/resources/lib/jquery.ui/jquery.ui.effect-scale.js new file mode 100644 index 00000000..9beac697 --- /dev/null +++ b/resources/lib/jquery.ui/jquery.ui.effect-scale.js @@ -0,0 +1,318 @@ +/*! + * jQuery UI Effects Scale 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/scale-effect/ + * + * Depends: + * jquery.ui.effect.js + */ +(function( $, undefined ) { + +$.effects.effect.puff = function( o, done ) { + var elem = $( this ), + mode = $.effects.setMode( elem, o.mode || "hide" ), + hide = mode === "hide", + percent = parseInt( o.percent, 10 ) || 150, + factor = percent / 100, + original = { + height: elem.height(), + width: elem.width(), + outerHeight: elem.outerHeight(), + outerWidth: elem.outerWidth() + }; + + $.extend( o, { + effect: "scale", + queue: false, + fade: true, + mode: mode, + complete: done, + percent: hide ? percent : 100, + from: hide ? + original : + { + height: original.height * factor, + width: original.width * factor, + outerHeight: original.outerHeight * factor, + outerWidth: original.outerWidth * factor + } + }); + + elem.effect( o ); +}; + +$.effects.effect.scale = function( o, done ) { + + // Create element + var el = $( this ), + options = $.extend( true, {}, o ), + mode = $.effects.setMode( el, o.mode || "effect" ), + percent = parseInt( o.percent, 10 ) || + ( parseInt( o.percent, 10 ) === 0 ? 0 : ( mode === "hide" ? 0 : 100 ) ), + direction = o.direction || "both", + origin = o.origin, + original = { + height: el.height(), + width: el.width(), + outerHeight: el.outerHeight(), + outerWidth: el.outerWidth() + }, + factor = { + y: direction !== "horizontal" ? (percent / 100) : 1, + x: direction !== "vertical" ? (percent / 100) : 1 + }; + + // We are going to pass this effect to the size effect: + options.effect = "size"; + options.queue = false; + options.complete = done; + + // Set default origin and restore for show/hide + if ( mode !== "effect" ) { + options.origin = origin || ["middle","center"]; + options.restore = true; + } + + options.from = o.from || ( mode === "show" ? { + height: 0, + width: 0, + outerHeight: 0, + outerWidth: 0 + } : original ); + options.to = { + height: original.height * factor.y, + width: original.width * factor.x, + outerHeight: original.outerHeight * factor.y, + outerWidth: original.outerWidth * factor.x + }; + + // Fade option to support puff + if ( options.fade ) { + if ( mode === "show" ) { + options.from.opacity = 0; + options.to.opacity = 1; + } + if ( mode === "hide" ) { + options.from.opacity = 1; + options.to.opacity = 0; + } + } + + // Animate + el.effect( options ); + +}; + +$.effects.effect.size = function( o, done ) { + + // Create element + var original, baseline, factor, + el = $( this ), + props0 = [ "position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity" ], + + // Always restore + props1 = [ "position", "top", "bottom", "left", "right", "overflow", "opacity" ], + + // Copy for children + props2 = [ "width", "height", "overflow" ], + cProps = [ "fontSize" ], + vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ], + hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ], + + // Set options + mode = $.effects.setMode( el, o.mode || "effect" ), + restore = o.restore || mode !== "effect", + scale = o.scale || "both", + origin = o.origin || [ "middle", "center" ], + position = el.css( "position" ), + props = restore ? props0 : props1, + zero = { + height: 0, + width: 0, + outerHeight: 0, + outerWidth: 0 + }; + + if ( mode === "show" ) { + el.show(); + } + original = { + height: el.height(), + width: el.width(), + outerHeight: el.outerHeight(), + outerWidth: el.outerWidth() + }; + + if ( o.mode === "toggle" && mode === "show" ) { + el.from = o.to || zero; + el.to = o.from || original; + } else { + el.from = o.from || ( mode === "show" ? zero : original ); + el.to = o.to || ( mode === "hide" ? zero : original ); + } + + // Set scaling factor + factor = { + from: { + y: el.from.height / original.height, + x: el.from.width / original.width + }, + to: { + y: el.to.height / original.height, + x: el.to.width / original.width + } + }; + + // Scale the css box + if ( scale === "box" || scale === "both" ) { + + // Vertical props scaling + if ( factor.from.y !== factor.to.y ) { + props = props.concat( vProps ); + el.from = $.effects.setTransition( el, vProps, factor.from.y, el.from ); + el.to = $.effects.setTransition( el, vProps, factor.to.y, el.to ); + } + + // Horizontal props scaling + if ( factor.from.x !== factor.to.x ) { + props = props.concat( hProps ); + el.from = $.effects.setTransition( el, hProps, factor.from.x, el.from ); + el.to = $.effects.setTransition( el, hProps, factor.to.x, el.to ); + } + } + + // Scale the content + if ( scale === "content" || scale === "both" ) { + + // Vertical props scaling + if ( factor.from.y !== factor.to.y ) { + props = props.concat( cProps ).concat( props2 ); + el.from = $.effects.setTransition( el, cProps, factor.from.y, el.from ); + el.to = $.effects.setTransition( el, cProps, factor.to.y, el.to ); + } + } + + $.effects.save( el, props ); + el.show(); + $.effects.createWrapper( el ); + el.css( "overflow", "hidden" ).css( el.from ); + + // Adjust + if (origin) { // Calculate baseline shifts + baseline = $.effects.getBaseline( origin, original ); + el.from.top = ( original.outerHeight - el.outerHeight() ) * baseline.y; + el.from.left = ( original.outerWidth - el.outerWidth() ) * baseline.x; + el.to.top = ( original.outerHeight - el.to.outerHeight ) * baseline.y; + el.to.left = ( original.outerWidth - el.to.outerWidth ) * baseline.x; + } + el.css( el.from ); // set top & left + + // Animate + if ( scale === "content" || scale === "both" ) { // Scale the children + + // Add margins/font-size + vProps = vProps.concat([ "marginTop", "marginBottom" ]).concat(cProps); + hProps = hProps.concat([ "marginLeft", "marginRight" ]); + props2 = props0.concat(vProps).concat(hProps); + + el.find( "*[width]" ).each( function(){ + var child = $( this ), + c_original = { + height: child.height(), + width: child.width(), + outerHeight: child.outerHeight(), + outerWidth: child.outerWidth() + }; + if (restore) { + $.effects.save(child, props2); + } + + child.from = { + height: c_original.height * factor.from.y, + width: c_original.width * factor.from.x, + outerHeight: c_original.outerHeight * factor.from.y, + outerWidth: c_original.outerWidth * factor.from.x + }; + child.to = { + height: c_original.height * factor.to.y, + width: c_original.width * factor.to.x, + outerHeight: c_original.height * factor.to.y, + outerWidth: c_original.width * factor.to.x + }; + + // Vertical props scaling + if ( factor.from.y !== factor.to.y ) { + child.from = $.effects.setTransition( child, vProps, factor.from.y, child.from ); + child.to = $.effects.setTransition( child, vProps, factor.to.y, child.to ); + } + + // Horizontal props scaling + if ( factor.from.x !== factor.to.x ) { + child.from = $.effects.setTransition( child, hProps, factor.from.x, child.from ); + child.to = $.effects.setTransition( child, hProps, factor.to.x, child.to ); + } + + // Animate children + child.css( child.from ); + child.animate( child.to, o.duration, o.easing, function() { + + // Restore children + if ( restore ) { + $.effects.restore( child, props2 ); + } + }); + }); + } + + // Animate + el.animate( el.to, { + queue: false, + duration: o.duration, + easing: o.easing, + complete: function() { + if ( el.to.opacity === 0 ) { + el.css( "opacity", el.from.opacity ); + } + if( mode === "hide" ) { + el.hide(); + } + $.effects.restore( el, props ); + if ( !restore ) { + + // we need to calculate our new positioning based on the scaling + if ( position === "static" ) { + el.css({ + position: "relative", + top: el.to.top, + left: el.to.left + }); + } else { + $.each([ "top", "left" ], function( idx, pos ) { + el.css( pos, function( _, str ) { + var val = parseInt( str, 10 ), + toRef = idx ? el.to.left : el.to.top; + + // if original was "auto", recalculate the new value from wrapper + if ( str === "auto" ) { + return toRef + "px"; + } + + return val + toRef + "px"; + }); + }); + } + } + + $.effects.removeWrapper( el ); + done(); + } + }); + +}; + +})(jQuery); diff --git a/resources/lib/jquery.ui/jquery.ui.effect-shake.js b/resources/lib/jquery.ui/jquery.ui.effect-shake.js new file mode 100644 index 00000000..216c08b6 --- /dev/null +++ b/resources/lib/jquery.ui/jquery.ui.effect-shake.js @@ -0,0 +1,74 @@ +/*! + * jQuery UI Effects Shake 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/shake-effect/ + * + * Depends: + * jquery.ui.effect.js + */ +(function( $, undefined ) { + +$.effects.effect.shake = function( o, done ) { + + var el = $( this ), + props = [ "position", "top", "bottom", "left", "right", "height", "width" ], + mode = $.effects.setMode( el, o.mode || "effect" ), + direction = o.direction || "left", + distance = o.distance || 20, + times = o.times || 3, + anims = times * 2 + 1, + speed = Math.round(o.duration/anims), + ref = (direction === "up" || direction === "down") ? "top" : "left", + positiveMotion = (direction === "up" || direction === "left"), + animation = {}, + animation1 = {}, + animation2 = {}, + i, + + // we will need to re-assemble the queue to stack our animations in place + queue = el.queue(), + queuelen = queue.length; + + $.effects.save( el, props ); + el.show(); + $.effects.createWrapper( el ); + + // Animation + animation[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance; + animation1[ ref ] = ( positiveMotion ? "+=" : "-=" ) + distance * 2; + animation2[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance * 2; + + // Animate + el.animate( animation, speed, o.easing ); + + // Shakes + for ( i = 1; i < times; i++ ) { + el.animate( animation1, speed, o.easing ).animate( animation2, speed, o.easing ); + } + el + .animate( animation1, speed, o.easing ) + .animate( animation, speed / 2, o.easing ) + .queue(function() { + if ( mode === "hide" ) { + el.hide(); + } + $.effects.restore( el, props ); + $.effects.removeWrapper( el ); + done(); + }); + + // inject all the animations we just queued to be first in line (after "inprogress") + if ( queuelen > 1) { + queue.splice.apply( queue, + [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) ); + } + el.dequeue(); + +}; + +})(jQuery); diff --git a/resources/lib/jquery.ui/jquery.ui.effect-slide.js b/resources/lib/jquery.ui/jquery.ui.effect-slide.js new file mode 100644 index 00000000..445ec48e --- /dev/null +++ b/resources/lib/jquery.ui/jquery.ui.effect-slide.js @@ -0,0 +1,64 @@ +/*! + * jQuery UI Effects Slide 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/slide-effect/ + * + * Depends: + * jquery.ui.effect.js + */ +(function( $, undefined ) { + +$.effects.effect.slide = function( o, done ) { + + // Create element + var el = $( this ), + props = [ "position", "top", "bottom", "left", "right", "width", "height" ], + mode = $.effects.setMode( el, o.mode || "show" ), + show = mode === "show", + direction = o.direction || "left", + ref = (direction === "up" || direction === "down") ? "top" : "left", + positiveMotion = (direction === "up" || direction === "left"), + distance, + animation = {}; + + // Adjust + $.effects.save( el, props ); + el.show(); + distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ); + + $.effects.createWrapper( el ).css({ + overflow: "hidden" + }); + + if ( show ) { + el.css( ref, positiveMotion ? (isNaN(distance) ? "-" + distance : -distance) : distance ); + } + + // Animation + animation[ ref ] = ( show ? + ( positiveMotion ? "+=" : "-=") : + ( positiveMotion ? "-=" : "+=")) + + distance; + + // Animate + el.animate( animation, { + queue: false, + duration: o.duration, + easing: o.easing, + complete: function() { + if ( mode === "hide" ) { + el.hide(); + } + $.effects.restore( el, props ); + $.effects.removeWrapper( el ); + done(); + } + }); +}; + +})(jQuery); diff --git a/resources/lib/jquery.ui/jquery.ui.effect-transfer.js b/resources/lib/jquery.ui/jquery.ui.effect-transfer.js new file mode 100644 index 00000000..f133c04b --- /dev/null +++ b/resources/lib/jquery.ui/jquery.ui.effect-transfer.js @@ -0,0 +1,47 @@ +/*! + * jQuery UI Effects Transfer 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/transfer-effect/ + * + * Depends: + * jquery.ui.effect.js + */ +(function( $, undefined ) { + +$.effects.effect.transfer = function( o, done ) { + var elem = $( this ), + target = $( o.to ), + targetFixed = target.css( "position" ) === "fixed", + body = $("body"), + fixTop = targetFixed ? body.scrollTop() : 0, + fixLeft = targetFixed ? body.scrollLeft() : 0, + endPosition = target.offset(), + animation = { + top: endPosition.top - fixTop , + left: endPosition.left - fixLeft , + height: target.innerHeight(), + width: target.innerWidth() + }, + startPosition = elem.offset(), + transfer = $( '
          ' ) + .appendTo( document.body ) + .addClass( o.className ) + .css({ + top: startPosition.top - fixTop , + left: startPosition.left - fixLeft , + height: elem.innerHeight(), + width: elem.innerWidth(), + position: targetFixed ? "fixed" : "absolute" + }) + .animate( animation, o.duration, o.easing, function() { + transfer.remove(); + done(); + }); +}; + +})(jQuery); diff --git a/resources/lib/jquery.ui/jquery.ui.effect.js b/resources/lib/jquery.ui/jquery.ui.effect.js new file mode 100644 index 00000000..c8e5818b --- /dev/null +++ b/resources/lib/jquery.ui/jquery.ui.effect.js @@ -0,0 +1,1276 @@ +/*! + * jQuery UI Effects 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/category/effects-core/ + */ +;(jQuery.effects || (function($, undefined) { + +var backCompat = $.uiBackCompat !== false, + // prefix used for storing data on .data() + dataSpace = "ui-effects-"; + +$.effects = { + effect: {} +}; + +/*! + * jQuery Color Animations v2.0.0 + * http://jquery.com/ + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * Date: Mon Aug 13 13:41:02 2012 -0500 + */ +(function( jQuery, undefined ) { + + var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor".split(" "), + + // plusequals test for += 100 -= 100 + rplusequals = /^([\-+])=\s*(\d+\.?\d*)/, + // a set of RE's that can match strings and generate color tuples. + stringParsers = [{ + re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/, + parse: function( execResult ) { + return [ + execResult[ 1 ], + execResult[ 2 ], + execResult[ 3 ], + execResult[ 4 ] + ]; + } + }, { + re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/, + parse: function( execResult ) { + return [ + execResult[ 1 ] * 2.55, + execResult[ 2 ] * 2.55, + execResult[ 3 ] * 2.55, + execResult[ 4 ] + ]; + } + }, { + // this regex ignores A-F because it's compared against an already lowercased string + re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, + parse: function( execResult ) { + return [ + parseInt( execResult[ 1 ], 16 ), + parseInt( execResult[ 2 ], 16 ), + parseInt( execResult[ 3 ], 16 ) + ]; + } + }, { + // this regex ignores A-F because it's compared against an already lowercased string + re: /#([a-f0-9])([a-f0-9])([a-f0-9])/, + parse: function( execResult ) { + return [ + parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ), + parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ), + parseInt( execResult[ 3 ] + execResult[ 3 ], 16 ) + ]; + } + }, { + re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/, + space: "hsla", + parse: function( execResult ) { + return [ + execResult[ 1 ], + execResult[ 2 ] / 100, + execResult[ 3 ] / 100, + execResult[ 4 ] + ]; + } + }], + + // jQuery.Color( ) + color = jQuery.Color = function( color, green, blue, alpha ) { + return new jQuery.Color.fn.parse( color, green, blue, alpha ); + }, + spaces = { + rgba: { + props: { + red: { + idx: 0, + type: "byte" + }, + green: { + idx: 1, + type: "byte" + }, + blue: { + idx: 2, + type: "byte" + } + } + }, + + hsla: { + props: { + hue: { + idx: 0, + type: "degrees" + }, + saturation: { + idx: 1, + type: "percent" + }, + lightness: { + idx: 2, + type: "percent" + } + } + } + }, + propTypes = { + "byte": { + floor: true, + max: 255 + }, + "percent": { + max: 1 + }, + "degrees": { + mod: 360, + floor: true + } + }, + support = color.support = {}, + + // element for support tests + supportElem = jQuery( "

          " )[ 0 ], + + // colors = jQuery.Color.names + colors, + + // local aliases of functions called often + each = jQuery.each; + +// determine rgba support immediately +supportElem.style.cssText = "background-color:rgba(1,1,1,.5)"; +support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1; + +// define cache name and alpha properties +// for rgba and hsla spaces +each( spaces, function( spaceName, space ) { + space.cache = "_" + spaceName; + space.props.alpha = { + idx: 3, + type: "percent", + def: 1 + }; +}); + +function clamp( value, prop, allowEmpty ) { + var type = propTypes[ prop.type ] || {}; + + if ( value == null ) { + return (allowEmpty || !prop.def) ? null : prop.def; + } + + // ~~ is an short way of doing floor for positive numbers + value = type.floor ? ~~value : parseFloat( value ); + + // IE will pass in empty strings as value for alpha, + // which will hit this case + if ( isNaN( value ) ) { + return prop.def; + } + + if ( type.mod ) { + // we add mod before modding to make sure that negatives values + // get converted properly: -10 -> 350 + return (value + type.mod) % type.mod; + } + + // for now all property types without mod have min and max + return 0 > value ? 0 : type.max < value ? type.max : value; +} + +function stringParse( string ) { + var inst = color(), + rgba = inst._rgba = []; + + string = string.toLowerCase(); + + each( stringParsers, function( i, parser ) { + var parsed, + match = parser.re.exec( string ), + values = match && parser.parse( match ), + spaceName = parser.space || "rgba"; + + if ( values ) { + parsed = inst[ spaceName ]( values ); + + // if this was an rgba parse the assignment might happen twice + // oh well.... + inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ]; + rgba = inst._rgba = parsed._rgba; + + // exit each( stringParsers ) here because we matched + return false; + } + }); + + // Found a stringParser that handled it + if ( rgba.length ) { + + // if this came from a parsed string, force "transparent" when alpha is 0 + // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0) + if ( rgba.join() === "0,0,0,0" ) { + jQuery.extend( rgba, colors.transparent ); + } + return inst; + } + + // named colors + return colors[ string ]; +} + +color.fn = jQuery.extend( color.prototype, { + parse: function( red, green, blue, alpha ) { + if ( red === undefined ) { + this._rgba = [ null, null, null, null ]; + return this; + } + if ( red.jquery || red.nodeType ) { + red = jQuery( red ).css( green ); + green = undefined; + } + + var inst = this, + type = jQuery.type( red ), + rgba = this._rgba = []; + + // more than 1 argument specified - assume ( red, green, blue, alpha ) + if ( green !== undefined ) { + red = [ red, green, blue, alpha ]; + type = "array"; + } + + if ( type === "string" ) { + return this.parse( stringParse( red ) || colors._default ); + } + + if ( type === "array" ) { + each( spaces.rgba.props, function( key, prop ) { + rgba[ prop.idx ] = clamp( red[ prop.idx ], prop ); + }); + return this; + } + + if ( type === "object" ) { + if ( red instanceof color ) { + each( spaces, function( spaceName, space ) { + if ( red[ space.cache ] ) { + inst[ space.cache ] = red[ space.cache ].slice(); + } + }); + } else { + each( spaces, function( spaceName, space ) { + var cache = space.cache; + each( space.props, function( key, prop ) { + + // if the cache doesn't exist, and we know how to convert + if ( !inst[ cache ] && space.to ) { + + // if the value was null, we don't need to copy it + // if the key was alpha, we don't need to copy it either + if ( key === "alpha" || red[ key ] == null ) { + return; + } + inst[ cache ] = space.to( inst._rgba ); + } + + // this is the only case where we allow nulls for ALL properties. + // call clamp with alwaysAllowEmpty + inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true ); + }); + + // everything defined but alpha? + if ( inst[ cache ] && $.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) { + // use the default of 1 + inst[ cache ][ 3 ] = 1; + if ( space.from ) { + inst._rgba = space.from( inst[ cache ] ); + } + } + }); + } + return this; + } + }, + is: function( compare ) { + var is = color( compare ), + same = true, + inst = this; + + each( spaces, function( _, space ) { + var localCache, + isCache = is[ space.cache ]; + if (isCache) { + localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || []; + each( space.props, function( _, prop ) { + if ( isCache[ prop.idx ] != null ) { + same = ( isCache[ prop.idx ] === localCache[ prop.idx ] ); + return same; + } + }); + } + return same; + }); + return same; + }, + _space: function() { + var used = [], + inst = this; + each( spaces, function( spaceName, space ) { + if ( inst[ space.cache ] ) { + used.push( spaceName ); + } + }); + return used.pop(); + }, + transition: function( other, distance ) { + var end = color( other ), + spaceName = end._space(), + space = spaces[ spaceName ], + startColor = this.alpha() === 0 ? color( "transparent" ) : this, + start = startColor[ space.cache ] || space.to( startColor._rgba ), + result = start.slice(); + + end = end[ space.cache ]; + each( space.props, function( key, prop ) { + var index = prop.idx, + startValue = start[ index ], + endValue = end[ index ], + type = propTypes[ prop.type ] || {}; + + // if null, don't override start value + if ( endValue === null ) { + return; + } + // if null - use end + if ( startValue === null ) { + result[ index ] = endValue; + } else { + if ( type.mod ) { + if ( endValue - startValue > type.mod / 2 ) { + startValue += type.mod; + } else if ( startValue - endValue > type.mod / 2 ) { + startValue -= type.mod; + } + } + result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop ); + } + }); + return this[ spaceName ]( result ); + }, + blend: function( opaque ) { + // if we are already opaque - return ourself + if ( this._rgba[ 3 ] === 1 ) { + return this; + } + + var rgb = this._rgba.slice(), + a = rgb.pop(), + blend = color( opaque )._rgba; + + return color( jQuery.map( rgb, function( v, i ) { + return ( 1 - a ) * blend[ i ] + a * v; + })); + }, + toRgbaString: function() { + var prefix = "rgba(", + rgba = jQuery.map( this._rgba, function( v, i ) { + return v == null ? ( i > 2 ? 1 : 0 ) : v; + }); + + if ( rgba[ 3 ] === 1 ) { + rgba.pop(); + prefix = "rgb("; + } + + return prefix + rgba.join() + ")"; + }, + toHslaString: function() { + var prefix = "hsla(", + hsla = jQuery.map( this.hsla(), function( v, i ) { + if ( v == null ) { + v = i > 2 ? 1 : 0; + } + + // catch 1 and 2 + if ( i && i < 3 ) { + v = Math.round( v * 100 ) + "%"; + } + return v; + }); + + if ( hsla[ 3 ] === 1 ) { + hsla.pop(); + prefix = "hsl("; + } + return prefix + hsla.join() + ")"; + }, + toHexString: function( includeAlpha ) { + var rgba = this._rgba.slice(), + alpha = rgba.pop(); + + if ( includeAlpha ) { + rgba.push( ~~( alpha * 255 ) ); + } + + return "#" + jQuery.map( rgba, function( v ) { + + // default to 0 when nulls exist + v = ( v || 0 ).toString( 16 ); + return v.length === 1 ? "0" + v : v; + }).join(""); + }, + toString: function() { + return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString(); + } +}); +color.fn.parse.prototype = color.fn; + +// hsla conversions adapted from: +// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021 + +function hue2rgb( p, q, h ) { + h = ( h + 1 ) % 1; + if ( h * 6 < 1 ) { + return p + (q - p) * h * 6; + } + if ( h * 2 < 1) { + return q; + } + if ( h * 3 < 2 ) { + return p + (q - p) * ((2/3) - h) * 6; + } + return p; +} + +spaces.hsla.to = function ( rgba ) { + if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) { + return [ null, null, null, rgba[ 3 ] ]; + } + var r = rgba[ 0 ] / 255, + g = rgba[ 1 ] / 255, + b = rgba[ 2 ] / 255, + a = rgba[ 3 ], + max = Math.max( r, g, b ), + min = Math.min( r, g, b ), + diff = max - min, + add = max + min, + l = add * 0.5, + h, s; + + if ( min === max ) { + h = 0; + } else if ( r === max ) { + h = ( 60 * ( g - b ) / diff ) + 360; + } else if ( g === max ) { + h = ( 60 * ( b - r ) / diff ) + 120; + } else { + h = ( 60 * ( r - g ) / diff ) + 240; + } + + if ( l === 0 || l === 1 ) { + s = l; + } else if ( l <= 0.5 ) { + s = diff / add; + } else { + s = diff / ( 2 - add ); + } + return [ Math.round(h) % 360, s, l, a == null ? 1 : a ]; +}; + +spaces.hsla.from = function ( hsla ) { + if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) { + return [ null, null, null, hsla[ 3 ] ]; + } + var h = hsla[ 0 ] / 360, + s = hsla[ 1 ], + l = hsla[ 2 ], + a = hsla[ 3 ], + q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s, + p = 2 * l - q; + + return [ + Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ), + Math.round( hue2rgb( p, q, h ) * 255 ), + Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ), + a + ]; +}; + + +each( spaces, function( spaceName, space ) { + var props = space.props, + cache = space.cache, + to = space.to, + from = space.from; + + // makes rgba() and hsla() + color.fn[ spaceName ] = function( value ) { + + // generate a cache for this space if it doesn't exist + if ( to && !this[ cache ] ) { + this[ cache ] = to( this._rgba ); + } + if ( value === undefined ) { + return this[ cache ].slice(); + } + + var ret, + type = jQuery.type( value ), + arr = ( type === "array" || type === "object" ) ? value : arguments, + local = this[ cache ].slice(); + + each( props, function( key, prop ) { + var val = arr[ type === "object" ? key : prop.idx ]; + if ( val == null ) { + val = local[ prop.idx ]; + } + local[ prop.idx ] = clamp( val, prop ); + }); + + if ( from ) { + ret = color( from( local ) ); + ret[ cache ] = local; + return ret; + } else { + return color( local ); + } + }; + + // makes red() green() blue() alpha() hue() saturation() lightness() + each( props, function( key, prop ) { + // alpha is included in more than one space + if ( color.fn[ key ] ) { + return; + } + color.fn[ key ] = function( value ) { + var vtype = jQuery.type( value ), + fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ), + local = this[ fn ](), + cur = local[ prop.idx ], + match; + + if ( vtype === "undefined" ) { + return cur; + } + + if ( vtype === "function" ) { + value = value.call( this, cur ); + vtype = jQuery.type( value ); + } + if ( value == null && prop.empty ) { + return this; + } + if ( vtype === "string" ) { + match = rplusequals.exec( value ); + if ( match ) { + value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 ); + } + } + local[ prop.idx ] = value; + return this[ fn ]( local ); + }; + }); +}); + +// add .fx.step functions +each( stepHooks, function( i, hook ) { + jQuery.cssHooks[ hook ] = { + set: function( elem, value ) { + var parsed, curElem, + backgroundColor = ""; + + if ( jQuery.type( value ) !== "string" || ( parsed = stringParse( value ) ) ) { + value = color( parsed || value ); + if ( !support.rgba && value._rgba[ 3 ] !== 1 ) { + curElem = hook === "backgroundColor" ? elem.parentNode : elem; + while ( + (backgroundColor === "" || backgroundColor === "transparent") && + curElem && curElem.style + ) { + try { + backgroundColor = jQuery.css( curElem, "backgroundColor" ); + curElem = curElem.parentNode; + } catch ( e ) { + } + } + + value = value.blend( backgroundColor && backgroundColor !== "transparent" ? + backgroundColor : + "_default" ); + } + + value = value.toRgbaString(); + } + try { + elem.style[ hook ] = value; + } catch( error ) { + // wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit' + } + } + }; + jQuery.fx.step[ hook ] = function( fx ) { + if ( !fx.colorInit ) { + fx.start = color( fx.elem, hook ); + fx.end = color( fx.end ); + fx.colorInit = true; + } + jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) ); + }; +}); + +jQuery.cssHooks.borderColor = { + expand: function( value ) { + var expanded = {}; + + each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) { + expanded[ "border" + part + "Color" ] = value; + }); + return expanded; + } +}; + +// Basic color names only. +// Usage of any of the other color names requires adding yourself or including +// jquery.color.svg-names.js. +colors = jQuery.Color.names = { + // 4.1. Basic color keywords + aqua: "#00ffff", + black: "#000000", + blue: "#0000ff", + fuchsia: "#ff00ff", + gray: "#808080", + green: "#008000", + lime: "#00ff00", + maroon: "#800000", + navy: "#000080", + olive: "#808000", + purple: "#800080", + red: "#ff0000", + silver: "#c0c0c0", + teal: "#008080", + white: "#ffffff", + yellow: "#ffff00", + + // 4.2.3. "transparent" color keyword + transparent: [ null, null, null, 0 ], + + _default: "#ffffff" +}; + +})( jQuery ); + + + +/******************************************************************************/ +/****************************** CLASS ANIMATIONS ******************************/ +/******************************************************************************/ +(function() { + +var classAnimationActions = [ "add", "remove", "toggle" ], + shorthandStyles = { + border: 1, + borderBottom: 1, + borderColor: 1, + borderLeft: 1, + borderRight: 1, + borderTop: 1, + borderWidth: 1, + margin: 1, + padding: 1 + }; + +$.each([ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], function( _, prop ) { + $.fx.step[ prop ] = function( fx ) { + if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) { + jQuery.style( fx.elem, prop, fx.end ); + fx.setAttr = true; + } + }; +}); + +function getElementStyles() { + var style = this.ownerDocument.defaultView ? + this.ownerDocument.defaultView.getComputedStyle( this, null ) : + this.currentStyle, + newStyle = {}, + key, + len; + + // webkit enumerates style porperties + if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) { + len = style.length; + while ( len-- ) { + key = style[ len ]; + if ( typeof style[ key ] === "string" ) { + newStyle[ $.camelCase( key ) ] = style[ key ]; + } + } + } else { + for ( key in style ) { + if ( typeof style[ key ] === "string" ) { + newStyle[ key ] = style[ key ]; + } + } + } + + return newStyle; +} + + +function styleDifference( oldStyle, newStyle ) { + var diff = {}, + name, value; + + for ( name in newStyle ) { + value = newStyle[ name ]; + if ( oldStyle[ name ] !== value ) { + if ( !shorthandStyles[ name ] ) { + if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) { + diff[ name ] = value; + } + } + } + } + + return diff; +} + +$.effects.animateClass = function( value, duration, easing, callback ) { + var o = $.speed( duration, easing, callback ); + + return this.queue( function() { + var animated = $( this ), + baseClass = animated.attr( "class" ) || "", + applyClassChange, + allAnimations = o.children ? animated.find( "*" ).andSelf() : animated; + + // map the animated objects to store the original styles. + allAnimations = allAnimations.map(function() { + var el = $( this ); + return { + el: el, + start: getElementStyles.call( this ) + }; + }); + + // apply class change + applyClassChange = function() { + $.each( classAnimationActions, function(i, action) { + if ( value[ action ] ) { + animated[ action + "Class" ]( value[ action ] ); + } + }); + }; + applyClassChange(); + + // map all animated objects again - calculate new styles and diff + allAnimations = allAnimations.map(function() { + this.end = getElementStyles.call( this.el[ 0 ] ); + this.diff = styleDifference( this.start, this.end ); + return this; + }); + + // apply original class + animated.attr( "class", baseClass ); + + // map all animated objects again - this time collecting a promise + allAnimations = allAnimations.map(function() { + var styleInfo = this, + dfd = $.Deferred(), + opts = jQuery.extend({}, o, { + queue: false, + complete: function() { + dfd.resolve( styleInfo ); + } + }); + + this.el.animate( this.diff, opts ); + return dfd.promise(); + }); + + // once all animations have completed: + $.when.apply( $, allAnimations.get() ).done(function() { + + // set the final class + applyClassChange(); + + // for each animated element, + // clear all css properties that were animated + $.each( arguments, function() { + var el = this.el; + $.each( this.diff, function(key) { + el.css( key, '' ); + }); + }); + + // this is guarnteed to be there if you use jQuery.speed() + // it also handles dequeuing the next anim... + o.complete.call( animated[ 0 ] ); + }); + }); +}; + +$.fn.extend({ + _addClass: $.fn.addClass, + addClass: function( classNames, speed, easing, callback ) { + return speed ? + $.effects.animateClass.call( this, + { add: classNames }, speed, easing, callback ) : + this._addClass( classNames ); + }, + + _removeClass: $.fn.removeClass, + removeClass: function( classNames, speed, easing, callback ) { + return speed ? + $.effects.animateClass.call( this, + { remove: classNames }, speed, easing, callback ) : + this._removeClass( classNames ); + }, + + _toggleClass: $.fn.toggleClass, + toggleClass: function( classNames, force, speed, easing, callback ) { + if ( typeof force === "boolean" || force === undefined ) { + if ( !speed ) { + // without speed parameter + return this._toggleClass( classNames, force ); + } else { + return $.effects.animateClass.call( this, + (force ? { add: classNames } : { remove: classNames }), + speed, easing, callback ); + } + } else { + // without force parameter + return $.effects.animateClass.call( this, + { toggle: classNames }, force, speed, easing ); + } + }, + + switchClass: function( remove, add, speed, easing, callback) { + return $.effects.animateClass.call( this, { + add: add, + remove: remove + }, speed, easing, callback ); + } +}); + +})(); + +/******************************************************************************/ +/*********************************** EFFECTS **********************************/ +/******************************************************************************/ + +(function() { + +$.extend( $.effects, { + version: "1.9.2", + + // Saves a set of properties in a data storage + save: function( element, set ) { + for( var i=0; i < set.length; i++ ) { + if ( set[ i ] !== null ) { + element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] ); + } + } + }, + + // Restores a set of previously saved properties from a data storage + restore: function( element, set ) { + var val, i; + for( i=0; i < set.length; i++ ) { + if ( set[ i ] !== null ) { + val = element.data( dataSpace + set[ i ] ); + // support: jQuery 1.6.2 + // http://bugs.jquery.com/ticket/9917 + // jQuery 1.6.2 incorrectly returns undefined for any falsy value. + // We can't differentiate between "" and 0 here, so we just assume + // empty string since it's likely to be a more common value... + if ( val === undefined ) { + val = ""; + } + element.css( set[ i ], val ); + } + } + }, + + setMode: function( el, mode ) { + if (mode === "toggle") { + mode = el.is( ":hidden" ) ? "show" : "hide"; + } + return mode; + }, + + // Translates a [top,left] array into a baseline value + // this should be a little more flexible in the future to handle a string & hash + getBaseline: function( origin, original ) { + var y, x; + switch ( origin[ 0 ] ) { + case "top": y = 0; break; + case "middle": y = 0.5; break; + case "bottom": y = 1; break; + default: y = origin[ 0 ] / original.height; + } + switch ( origin[ 1 ] ) { + case "left": x = 0; break; + case "center": x = 0.5; break; + case "right": x = 1; break; + default: x = origin[ 1 ] / original.width; + } + return { + x: x, + y: y + }; + }, + + // Wraps the element around a wrapper that copies position properties + createWrapper: function( element ) { + + // if the element is already wrapped, return it + if ( element.parent().is( ".ui-effects-wrapper" )) { + return element.parent(); + } + + // wrap the element + var props = { + width: element.outerWidth(true), + height: element.outerHeight(true), + "float": element.css( "float" ) + }, + wrapper = $( "

          " ) + .addClass( "ui-effects-wrapper" ) + .css({ + fontSize: "100%", + background: "transparent", + border: "none", + margin: 0, + padding: 0 + }), + // Store the size in case width/height are defined in % - Fixes #5245 + size = { + width: element.width(), + height: element.height() + }, + active = document.activeElement; + + // support: Firefox + // Firefox incorrectly exposes anonymous content + // https://bugzilla.mozilla.org/show_bug.cgi?id=561664 + try { + active.id; + } catch( e ) { + active = document.body; + } + + element.wrap( wrapper ); + + // Fixes #7595 - Elements lose focus when wrapped. + if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { + $( active ).focus(); + } + + wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually lose the reference to the wrapped element + + // transfer positioning properties to the wrapper + if ( element.css( "position" ) === "static" ) { + wrapper.css({ position: "relative" }); + element.css({ position: "relative" }); + } else { + $.extend( props, { + position: element.css( "position" ), + zIndex: element.css( "z-index" ) + }); + $.each([ "top", "left", "bottom", "right" ], function(i, pos) { + props[ pos ] = element.css( pos ); + if ( isNaN( parseInt( props[ pos ], 10 ) ) ) { + props[ pos ] = "auto"; + } + }); + element.css({ + position: "relative", + top: 0, + left: 0, + right: "auto", + bottom: "auto" + }); + } + element.css(size); + + return wrapper.css( props ).show(); + }, + + removeWrapper: function( element ) { + var active = document.activeElement; + + if ( element.parent().is( ".ui-effects-wrapper" ) ) { + element.parent().replaceWith( element ); + + // Fixes #7595 - Elements lose focus when wrapped. + if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { + $( active ).focus(); + } + } + + + return element; + }, + + setTransition: function( element, list, factor, value ) { + value = value || {}; + $.each( list, function( i, x ) { + var unit = element.cssUnit( x ); + if ( unit[ 0 ] > 0 ) { + value[ x ] = unit[ 0 ] * factor + unit[ 1 ]; + } + }); + return value; + } +}); + +// return an effect options object for the given parameters: +function _normalizeArguments( effect, options, speed, callback ) { + + // allow passing all options as the first parameter + if ( $.isPlainObject( effect ) ) { + options = effect; + effect = effect.effect; + } + + // convert to an object + effect = { effect: effect }; + + // catch (effect, null, ...) + if ( options == null ) { + options = {}; + } + + // catch (effect, callback) + if ( $.isFunction( options ) ) { + callback = options; + speed = null; + options = {}; + } + + // catch (effect, speed, ?) + if ( typeof options === "number" || $.fx.speeds[ options ] ) { + callback = speed; + speed = options; + options = {}; + } + + // catch (effect, options, callback) + if ( $.isFunction( speed ) ) { + callback = speed; + speed = null; + } + + // add options to effect + if ( options ) { + $.extend( effect, options ); + } + + speed = speed || options.duration; + effect.duration = $.fx.off ? 0 : + typeof speed === "number" ? speed : + speed in $.fx.speeds ? $.fx.speeds[ speed ] : + $.fx.speeds._default; + + effect.complete = callback || options.complete; + + return effect; +} + +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.effect[ speed ] ) { + // TODO: remove in 2.0 (#7115) + if ( backCompat && $.effects[ speed ] ) { + return false; + } + return true; + } + + return false; +} + +$.fn.extend({ + effect: function( /* effect, options, speed, callback */ ) { + var args = _normalizeArguments.apply( this, arguments ), + mode = args.mode, + queue = args.queue, + effectMethod = $.effects.effect[ args.effect ], + + // DEPRECATED: remove in 2.0 (#7115) + oldEffectMethod = !effectMethod && backCompat && $.effects[ args.effect ]; + + if ( $.fx.off || !( effectMethod || oldEffectMethod ) ) { + // delegate to the original method (e.g., .show()) if possible + if ( mode ) { + return this[ mode ]( args.duration, args.complete ); + } else { + return this.each( function() { + if ( args.complete ) { + args.complete.call( this ); + } + }); + } + } + + function run( next ) { + var elem = $( this ), + complete = args.complete, + mode = args.mode; + + function done() { + if ( $.isFunction( complete ) ) { + complete.call( elem[0] ); + } + if ( $.isFunction( next ) ) { + next(); + } + } + + // if the element is hiddden and mode is hide, + // or element is visible and mode is show + if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) { + done(); + } else { + effectMethod.call( elem[0], args, done ); + } + } + + // TODO: remove this check in 2.0, effectMethod will always be true + if ( effectMethod ) { + return queue === false ? this.each( run ) : this.queue( queue || "fx", run ); + } else { + // DEPRECATED: remove in 2.0 (#7115) + return oldEffectMethod.call(this, { + options: args, + duration: args.duration, + callback: args.complete, + mode: args.mode + }); + } + }, + + _show: $.fn.show, + show: function( speed ) { + if ( standardSpeed( speed ) ) { + return this._show.apply( this, arguments ); + } else { + var args = _normalizeArguments.apply( this, arguments ); + args.mode = "show"; + return this.effect.call( this, args ); + } + }, + + _hide: $.fn.hide, + hide: function( speed ) { + if ( standardSpeed( speed ) ) { + return this._hide.apply( this, arguments ); + } else { + var args = _normalizeArguments.apply( this, arguments ); + args.mode = "hide"; + return this.effect.call( this, args ); + } + }, + + // jQuery core overloads toggle and creates _toggle + __toggle: $.fn.toggle, + toggle: function( speed ) { + if ( standardSpeed( speed ) || typeof speed === "boolean" || $.isFunction( speed ) ) { + return this.__toggle.apply( this, arguments ); + } else { + var args = _normalizeArguments.apply( this, arguments ); + args.mode = "toggle"; + return this.effect.call( this, args ); + } + }, + + // helper functions + cssUnit: function(key) { + var style = this.css( key ), + val = []; + + $.each( [ "em", "px", "%", "pt" ], function( i, unit ) { + if ( style.indexOf( unit ) > 0 ) { + val = [ parseFloat( style ), unit ]; + } + }); + return val; + } +}); + +})(); + +/******************************************************************************/ +/*********************************** EASING ***********************************/ +/******************************************************************************/ + +(function() { + +// based on easing equations from Robert Penner (http://www.robertpenner.com/easing) + +var baseEasings = {}; + +$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) { + baseEasings[ name ] = function( p ) { + return Math.pow( p, i + 2 ); + }; +}); + +$.extend( baseEasings, { + Sine: function ( p ) { + return 1 - Math.cos( p * Math.PI / 2 ); + }, + Circ: function ( p ) { + return 1 - Math.sqrt( 1 - p * p ); + }, + Elastic: function( p ) { + return p === 0 || p === 1 ? p : + -Math.pow( 2, 8 * (p - 1) ) * Math.sin( ( (p - 1) * 80 - 7.5 ) * Math.PI / 15 ); + }, + Back: function( p ) { + return p * p * ( 3 * p - 2 ); + }, + Bounce: function ( p ) { + var pow2, + bounce = 4; + + while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {} + return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 ); + } +}); + +$.each( baseEasings, function( name, easeIn ) { + $.easing[ "easeIn" + name ] = easeIn; + $.easing[ "easeOut" + name ] = function( p ) { + return 1 - easeIn( 1 - p ); + }; + $.easing[ "easeInOut" + name ] = function( p ) { + return p < 0.5 ? + easeIn( p * 2 ) / 2 : + 1 - easeIn( p * -2 + 2 ) / 2; + }; +}); + +})(); + +})(jQuery)); diff --git a/resources/lib/jquery.ui/jquery.ui.menu.js b/resources/lib/jquery.ui/jquery.ui.menu.js new file mode 100644 index 00000000..6342f2d3 --- /dev/null +++ b/resources/lib/jquery.ui/jquery.ui.menu.js @@ -0,0 +1,610 @@ +/*! + * jQuery UI Menu 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/menu/ + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + * jquery.ui.position.js + */ +(function( $, undefined ) { + +var mouseHandled = false; + +$.widget( "ui.menu", { + version: "1.9.2", + defaultElement: "
            ", + delay: 300, + options: { + icons: { + submenu: "ui-icon-carat-1-e" + }, + menus: "ul", + position: { + my: "left top", + at: "right top" + }, + role: "menu", + + // callbacks + blur: null, + focus: null, + select: null + }, + + _create: function() { + this.activeMenu = this.element; + this.element + .uniqueId() + .addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" ) + .toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length ) + .attr({ + role: this.options.role, + tabIndex: 0 + }) + // need to catch all clicks on disabled menu + // not possible through _on + .bind( "click" + this.eventNamespace, $.proxy(function( event ) { + if ( this.options.disabled ) { + event.preventDefault(); + } + }, this )); + + if ( this.options.disabled ) { + this.element + .addClass( "ui-state-disabled" ) + .attr( "aria-disabled", "true" ); + } + + this._on({ + // Prevent focus from sticking to links inside menu after clicking + // them (focus should always stay on UL during navigation). + "mousedown .ui-menu-item > a": function( event ) { + event.preventDefault(); + }, + "click .ui-state-disabled > a": function( event ) { + event.preventDefault(); + }, + "click .ui-menu-item:has(a)": function( event ) { + var target = $( event.target ).closest( ".ui-menu-item" ); + if ( !mouseHandled && target.not( ".ui-state-disabled" ).length ) { + mouseHandled = true; + + this.select( event ); + // Open submenu on click + if ( target.has( ".ui-menu" ).length ) { + this.expand( event ); + } else if ( !this.element.is( ":focus" ) ) { + // Redirect focus to the menu + this.element.trigger( "focus", [ true ] ); + + // If the active item is on the top level, let it stay active. + // Otherwise, blur the active item since it is no longer visible. + if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) { + clearTimeout( this.timer ); + } + } + } + }, + "mouseenter .ui-menu-item": function( event ) { + var target = $( event.currentTarget ); + // Remove ui-state-active class from siblings of the newly focused menu item + // to avoid a jump caused by adjacent elements both having a class with a border + target.siblings().children( ".ui-state-active" ).removeClass( "ui-state-active" ); + this.focus( event, target ); + }, + mouseleave: "collapseAll", + "mouseleave .ui-menu": "collapseAll", + focus: function( event, keepActiveItem ) { + // If there's already an active item, keep it active + // If not, activate the first item + var item = this.active || this.element.children( ".ui-menu-item" ).eq( 0 ); + + if ( !keepActiveItem ) { + this.focus( event, item ); + } + }, + blur: function( event ) { + this._delay(function() { + if ( !$.contains( this.element[0], this.document[0].activeElement ) ) { + this.collapseAll( event ); + } + }); + }, + keydown: "_keydown" + }); + + this.refresh(); + + // Clicks outside of a menu collapse any open menus + this._on( this.document, { + click: function( event ) { + if ( !$( event.target ).closest( ".ui-menu" ).length ) { + this.collapseAll( event ); + } + + // Reset the mouseHandled flag + mouseHandled = false; + } + }); + }, + + _destroy: function() { + // Destroy (sub)menus + this.element + .removeAttr( "aria-activedescendant" ) + .find( ".ui-menu" ).andSelf() + .removeClass( "ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons" ) + .removeAttr( "role" ) + .removeAttr( "tabIndex" ) + .removeAttr( "aria-labelledby" ) + .removeAttr( "aria-expanded" ) + .removeAttr( "aria-hidden" ) + .removeAttr( "aria-disabled" ) + .removeUniqueId() + .show(); + + // Destroy menu items + this.element.find( ".ui-menu-item" ) + .removeClass( "ui-menu-item" ) + .removeAttr( "role" ) + .removeAttr( "aria-disabled" ) + .children( "a" ) + .removeUniqueId() + .removeClass( "ui-corner-all ui-state-hover" ) + .removeAttr( "tabIndex" ) + .removeAttr( "role" ) + .removeAttr( "aria-haspopup" ) + .children().each( function() { + var elem = $( this ); + if ( elem.data( "ui-menu-submenu-carat" ) ) { + elem.remove(); + } + }); + + // Destroy menu dividers + this.element.find( ".ui-menu-divider" ).removeClass( "ui-menu-divider ui-widget-content" ); + }, + + _keydown: function( event ) { + var match, prev, character, skip, regex, + preventDefault = true; + + function escape( value ) { + return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ); + } + + switch ( event.keyCode ) { + case $.ui.keyCode.PAGE_UP: + this.previousPage( event ); + break; + case $.ui.keyCode.PAGE_DOWN: + this.nextPage( event ); + break; + case $.ui.keyCode.HOME: + this._move( "first", "first", event ); + break; + case $.ui.keyCode.END: + this._move( "last", "last", event ); + break; + case $.ui.keyCode.UP: + this.previous( event ); + break; + case $.ui.keyCode.DOWN: + this.next( event ); + break; + case $.ui.keyCode.LEFT: + this.collapse( event ); + break; + case $.ui.keyCode.RIGHT: + if ( this.active && !this.active.is( ".ui-state-disabled" ) ) { + this.expand( event ); + } + break; + case $.ui.keyCode.ENTER: + case $.ui.keyCode.SPACE: + this._activate( event ); + break; + case $.ui.keyCode.ESCAPE: + this.collapse( event ); + break; + default: + preventDefault = false; + prev = this.previousFilter || ""; + character = String.fromCharCode( event.keyCode ); + skip = false; + + clearTimeout( this.filterTimer ); + + if ( character === prev ) { + skip = true; + } else { + character = prev + character; + } + + regex = new RegExp( "^" + escape( character ), "i" ); + match = this.activeMenu.children( ".ui-menu-item" ).filter(function() { + return regex.test( $( this ).children( "a" ).text() ); + }); + match = skip && match.index( this.active.next() ) !== -1 ? + this.active.nextAll( ".ui-menu-item" ) : + match; + + // If no matches on the current filter, reset to the last character pressed + // to move down the menu to the first item that starts with that character + if ( !match.length ) { + character = String.fromCharCode( event.keyCode ); + regex = new RegExp( "^" + escape( character ), "i" ); + match = this.activeMenu.children( ".ui-menu-item" ).filter(function() { + return regex.test( $( this ).children( "a" ).text() ); + }); + } + + if ( match.length ) { + this.focus( event, match ); + if ( match.length > 1 ) { + this.previousFilter = character; + this.filterTimer = this._delay(function() { + delete this.previousFilter; + }, 1000 ); + } else { + delete this.previousFilter; + } + } else { + delete this.previousFilter; + } + } + + if ( preventDefault ) { + event.preventDefault(); + } + }, + + _activate: function( event ) { + if ( !this.active.is( ".ui-state-disabled" ) ) { + if ( this.active.children( "a[aria-haspopup='true']" ).length ) { + this.expand( event ); + } else { + this.select( event ); + } + } + }, + + refresh: function() { + var menus, + icon = this.options.icons.submenu, + submenus = this.element.find( this.options.menus ); + + // Initialize nested menus + submenus.filter( ":not(.ui-menu)" ) + .addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" ) + .hide() + .attr({ + role: this.options.role, + "aria-hidden": "true", + "aria-expanded": "false" + }) + .each(function() { + var menu = $( this ), + item = menu.prev( "a" ), + submenuCarat = $( "" ) + .addClass( "ui-menu-icon ui-icon " + icon ) + .data( "ui-menu-submenu-carat", true ); + + item + .attr( "aria-haspopup", "true" ) + .prepend( submenuCarat ); + menu.attr( "aria-labelledby", item.attr( "id" ) ); + }); + + menus = submenus.add( this.element ); + + // Don't refresh list items that are already adapted + menus.children( ":not(.ui-menu-item):has(a)" ) + .addClass( "ui-menu-item" ) + .attr( "role", "presentation" ) + .children( "a" ) + .uniqueId() + .addClass( "ui-corner-all" ) + .attr({ + tabIndex: -1, + role: this._itemRole() + }); + + // Initialize unlinked menu-items containing spaces and/or dashes only as dividers + menus.children( ":not(.ui-menu-item)" ).each(function() { + var item = $( this ); + // hyphen, em dash, en dash + if ( !/[^\-—–\s]/.test( item.text() ) ) { + item.addClass( "ui-widget-content ui-menu-divider" ); + } + }); + + // Add aria-disabled attribute to any disabled menu item + menus.children( ".ui-state-disabled" ).attr( "aria-disabled", "true" ); + + // If the active item has been removed, blur the menu + if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) { + this.blur(); + } + }, + + _itemRole: function() { + return { + menu: "menuitem", + listbox: "option" + }[ this.options.role ]; + }, + + focus: function( event, item ) { + var nested, focused; + this.blur( event, event && event.type === "focus" ); + + this._scrollIntoView( item ); + + this.active = item.first(); + focused = this.active.children( "a" ).addClass( "ui-state-focus" ); + // Only update aria-activedescendant if there's a role + // otherwise we assume focus is managed elsewhere + if ( this.options.role ) { + this.element.attr( "aria-activedescendant", focused.attr( "id" ) ); + } + + // Highlight active parent menu item, if any + this.active + .parent() + .closest( ".ui-menu-item" ) + .children( "a:first" ) + .addClass( "ui-state-active" ); + + if ( event && event.type === "keydown" ) { + this._close(); + } else { + this.timer = this._delay(function() { + this._close(); + }, this.delay ); + } + + nested = item.children( ".ui-menu" ); + if ( nested.length && ( /^mouse/.test( event.type ) ) ) { + this._startOpening(nested); + } + this.activeMenu = item.parent(); + + this._trigger( "focus", event, { item: item } ); + }, + + _scrollIntoView: function( item ) { + var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight; + if ( this._hasScroll() ) { + borderTop = parseFloat( $.css( this.activeMenu[0], "borderTopWidth" ) ) || 0; + paddingTop = parseFloat( $.css( this.activeMenu[0], "paddingTop" ) ) || 0; + offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop; + scroll = this.activeMenu.scrollTop(); + elementHeight = this.activeMenu.height(); + itemHeight = item.height(); + + if ( offset < 0 ) { + this.activeMenu.scrollTop( scroll + offset ); + } else if ( offset + itemHeight > elementHeight ) { + this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight ); + } + } + }, + + blur: function( event, fromFocus ) { + if ( !fromFocus ) { + clearTimeout( this.timer ); + } + + if ( !this.active ) { + return; + } + + this.active.children( "a" ).removeClass( "ui-state-focus" ); + this.active = null; + + this._trigger( "blur", event, { item: this.active } ); + }, + + _startOpening: function( submenu ) { + clearTimeout( this.timer ); + + // Don't open if already open fixes a Firefox bug that caused a .5 pixel + // shift in the submenu position when mousing over the carat icon + if ( submenu.attr( "aria-hidden" ) !== "true" ) { + return; + } + + this.timer = this._delay(function() { + this._close(); + this._open( submenu ); + }, this.delay ); + }, + + _open: function( submenu ) { + var position = $.extend({ + of: this.active + }, this.options.position ); + + clearTimeout( this.timer ); + this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) ) + .hide() + .attr( "aria-hidden", "true" ); + + submenu + .show() + .removeAttr( "aria-hidden" ) + .attr( "aria-expanded", "true" ) + .position( position ); + }, + + collapseAll: function( event, all ) { + clearTimeout( this.timer ); + this.timer = this._delay(function() { + // If we were passed an event, look for the submenu that contains the event + var currentMenu = all ? this.element : + $( event && event.target ).closest( this.element.find( ".ui-menu" ) ); + + // If we found no valid submenu ancestor, use the main menu to close all sub menus anyway + if ( !currentMenu.length ) { + currentMenu = this.element; + } + + this._close( currentMenu ); + + this.blur( event ); + this.activeMenu = currentMenu; + }, this.delay ); + }, + + // With no arguments, closes the currently active menu - if nothing is active + // it closes all menus. If passed an argument, it will search for menus BELOW + _close: function( startMenu ) { + if ( !startMenu ) { + startMenu = this.active ? this.active.parent() : this.element; + } + + startMenu + .find( ".ui-menu" ) + .hide() + .attr( "aria-hidden", "true" ) + .attr( "aria-expanded", "false" ) + .end() + .find( "a.ui-state-active" ) + .removeClass( "ui-state-active" ); + }, + + collapse: function( event ) { + var newItem = this.active && + this.active.parent().closest( ".ui-menu-item", this.element ); + if ( newItem && newItem.length ) { + this._close(); + this.focus( event, newItem ); + } + }, + + expand: function( event ) { + var newItem = this.active && + this.active + .children( ".ui-menu " ) + .children( ".ui-menu-item" ) + .first(); + + if ( newItem && newItem.length ) { + this._open( newItem.parent() ); + + // Delay so Firefox will not hide activedescendant change in expanding submenu from AT + this._delay(function() { + this.focus( event, newItem ); + }); + } + }, + + next: function( event ) { + this._move( "next", "first", event ); + }, + + previous: function( event ) { + this._move( "prev", "last", event ); + }, + + isFirstItem: function() { + return this.active && !this.active.prevAll( ".ui-menu-item" ).length; + }, + + isLastItem: function() { + return this.active && !this.active.nextAll( ".ui-menu-item" ).length; + }, + + _move: function( direction, filter, event ) { + var next; + if ( this.active ) { + if ( direction === "first" || direction === "last" ) { + next = this.active + [ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" ) + .eq( -1 ); + } else { + next = this.active + [ direction + "All" ]( ".ui-menu-item" ) + .eq( 0 ); + } + } + if ( !next || !next.length || !this.active ) { + next = this.activeMenu.children( ".ui-menu-item" )[ filter ](); + } + + this.focus( event, next ); + }, + + nextPage: function( event ) { + var item, base, height; + + if ( !this.active ) { + this.next( event ); + return; + } + if ( this.isLastItem() ) { + return; + } + if ( this._hasScroll() ) { + base = this.active.offset().top; + height = this.element.height(); + this.active.nextAll( ".ui-menu-item" ).each(function() { + item = $( this ); + return item.offset().top - base - height < 0; + }); + + this.focus( event, item ); + } else { + this.focus( event, this.activeMenu.children( ".ui-menu-item" ) + [ !this.active ? "first" : "last" ]() ); + } + }, + + previousPage: function( event ) { + var item, base, height; + if ( !this.active ) { + this.next( event ); + return; + } + if ( this.isFirstItem() ) { + return; + } + if ( this._hasScroll() ) { + base = this.active.offset().top; + height = this.element.height(); + this.active.prevAll( ".ui-menu-item" ).each(function() { + item = $( this ); + return item.offset().top - base + height > 0; + }); + + this.focus( event, item ); + } else { + this.focus( event, this.activeMenu.children( ".ui-menu-item" ).first() ); + } + }, + + _hasScroll: function() { + return this.element.outerHeight() < this.element.prop( "scrollHeight" ); + }, + + select: function( event ) { + // TODO: It should never be possible to not have an active item at this + // point, but the tests don't trigger mouseenter before click. + this.active = this.active || $( event.target ).closest( ".ui-menu-item" ); + var ui = { item: this.active }; + if ( !this.active.has( ".ui-menu" ).length ) { + this.collapseAll( event, true ); + } + this._trigger( "select", event, ui ); + } +}); + +}( jQuery )); diff --git a/resources/lib/jquery.ui/jquery.ui.mouse.js b/resources/lib/jquery.ui/jquery.ui.mouse.js new file mode 100644 index 00000000..250365fe --- /dev/null +++ b/resources/lib/jquery.ui/jquery.ui.mouse.js @@ -0,0 +1,169 @@ +/*! + * jQuery UI Mouse 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/mouse/ + * + * Depends: + * jquery.ui.widget.js + */ +(function( $, undefined ) { + +var mouseHandled = false; +$( document ).mouseup( function( e ) { + mouseHandled = false; +}); + +$.widget("ui.mouse", { + version: "1.9.2", + options: { + cancel: 'input,textarea,button,select,option', + distance: 1, + delay: 0 + }, + _mouseInit: function() { + var that = this; + + this.element + .bind('mousedown.'+this.widgetName, function(event) { + return that._mouseDown(event); + }) + .bind('click.'+this.widgetName, function(event) { + if (true === $.data(event.target, that.widgetName + '.preventClickEvent')) { + $.removeData(event.target, that.widgetName + '.preventClickEvent'); + event.stopImmediatePropagation(); + return false; + } + }); + + this.started = false; + }, + + // TODO: make sure destroying one instance of mouse doesn't mess with + // other instances of mouse + _mouseDestroy: function() { + this.element.unbind('.'+this.widgetName); + if ( this._mouseMoveDelegate ) { + $(document) + .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate) + .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate); + } + }, + + _mouseDown: function(event) { + // don't let more than one widget handle mouseStart + if( mouseHandled ) { return; } + + // we may have missed mouseup (out of window) + (this._mouseStarted && this._mouseUp(event)); + + this._mouseDownEvent = event; + + var that = this, + btnIsLeft = (event.which === 1), + // event.target.nodeName works around a bug in IE 8 with + // disabled inputs (#7620) + elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false); + if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) { + return true; + } + + this.mouseDelayMet = !this.options.delay; + if (!this.mouseDelayMet) { + this._mouseDelayTimer = setTimeout(function() { + that.mouseDelayMet = true; + }, this.options.delay); + } + + if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { + this._mouseStarted = (this._mouseStart(event) !== false); + if (!this._mouseStarted) { + event.preventDefault(); + return true; + } + } + + // Click event may never have fired (Gecko & Opera) + if (true === $.data(event.target, this.widgetName + '.preventClickEvent')) { + $.removeData(event.target, this.widgetName + '.preventClickEvent'); + } + + // these delegates are required to keep context + this._mouseMoveDelegate = function(event) { + return that._mouseMove(event); + }; + this._mouseUpDelegate = function(event) { + return that._mouseUp(event); + }; + $(document) + .bind('mousemove.'+this.widgetName, this._mouseMoveDelegate) + .bind('mouseup.'+this.widgetName, this._mouseUpDelegate); + + event.preventDefault(); + + mouseHandled = true; + return true; + }, + + _mouseMove: function(event) { + // IE mouseup check - mouseup happened when mouse was out of window + if ($.ui.ie && !(document.documentMode >= 9) && !event.button) { + return this._mouseUp(event); + } + + if (this._mouseStarted) { + this._mouseDrag(event); + return event.preventDefault(); + } + + if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { + this._mouseStarted = + (this._mouseStart(this._mouseDownEvent, event) !== false); + (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event)); + } + + return !this._mouseStarted; + }, + + _mouseUp: function(event) { + $(document) + .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate) + .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate); + + if (this._mouseStarted) { + this._mouseStarted = false; + + if (event.target === this._mouseDownEvent.target) { + $.data(event.target, this.widgetName + '.preventClickEvent', true); + } + + this._mouseStop(event); + } + + return false; + }, + + _mouseDistanceMet: function(event) { + return (Math.max( + Math.abs(this._mouseDownEvent.pageX - event.pageX), + Math.abs(this._mouseDownEvent.pageY - event.pageY) + ) >= this.options.distance + ); + }, + + _mouseDelayMet: function(event) { + return this.mouseDelayMet; + }, + + // These are placeholder methods, to be overriden by extending plugin + _mouseStart: function(event) {}, + _mouseDrag: function(event) {}, + _mouseStop: function(event) {}, + _mouseCapture: function(event) { return true; } +}); + +})(jQuery); diff --git a/resources/lib/jquery.ui/jquery.ui.position.js b/resources/lib/jquery.ui/jquery.ui.position.js new file mode 100644 index 00000000..be99013e --- /dev/null +++ b/resources/lib/jquery.ui/jquery.ui.position.js @@ -0,0 +1,517 @@ +/*! + * jQuery UI Position 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/position/ + */ +(function( $, undefined ) { + +$.ui = $.ui || {}; + +var cachedScrollbarWidth, + max = Math.max, + abs = Math.abs, + round = Math.round, + rhorizontal = /left|center|right/, + rvertical = /top|center|bottom/, + roffset = /[\+\-]\d+%?/, + rposition = /^\w+/, + rpercent = /%$/, + _position = $.fn.position; + +function getOffsets( offsets, width, height ) { + return [ + parseInt( offsets[ 0 ], 10 ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ), + parseInt( offsets[ 1 ], 10 ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 ) + ]; +} +function parseCss( element, property ) { + return parseInt( $.css( element, property ), 10 ) || 0; +} + +$.position = { + scrollbarWidth: function() { + if ( cachedScrollbarWidth !== undefined ) { + return cachedScrollbarWidth; + } + var w1, w2, + div = $( "
            " ), + innerDiv = div.children()[0]; + + $( "body" ).append( div ); + w1 = innerDiv.offsetWidth; + div.css( "overflow", "scroll" ); + + w2 = innerDiv.offsetWidth; + + if ( w1 === w2 ) { + w2 = div[0].clientWidth; + } + + div.remove(); + + return (cachedScrollbarWidth = w1 - w2); + }, + getScrollInfo: function( within ) { + var overflowX = within.isWindow ? "" : within.element.css( "overflow-x" ), + overflowY = within.isWindow ? "" : within.element.css( "overflow-y" ), + hasOverflowX = overflowX === "scroll" || + ( overflowX === "auto" && within.width < within.element[0].scrollWidth ), + hasOverflowY = overflowY === "scroll" || + ( overflowY === "auto" && within.height < within.element[0].scrollHeight ); + return { + width: hasOverflowX ? $.position.scrollbarWidth() : 0, + height: hasOverflowY ? $.position.scrollbarWidth() : 0 + }; + }, + getWithinInfo: function( element ) { + var withinElement = $( element || window ), + isWindow = $.isWindow( withinElement[0] ); + return { + element: withinElement, + isWindow: isWindow, + offset: withinElement.offset() || { left: 0, top: 0 }, + scrollLeft: withinElement.scrollLeft(), + scrollTop: withinElement.scrollTop(), + width: isWindow ? withinElement.width() : withinElement.outerWidth(), + height: isWindow ? withinElement.height() : withinElement.outerHeight() + }; + } +}; + +$.fn.position = function( options ) { + if ( !options || !options.of ) { + return _position.apply( this, arguments ); + } + + // make a copy, we don't want to modify arguments + options = $.extend( {}, options ); + + var atOffset, targetWidth, targetHeight, targetOffset, basePosition, + target = $( options.of ), + within = $.position.getWithinInfo( options.within ), + scrollInfo = $.position.getScrollInfo( within ), + targetElem = target[0], + collision = ( options.collision || "flip" ).split( " " ), + offsets = {}; + + if ( targetElem.nodeType === 9 ) { + targetWidth = target.width(); + targetHeight = target.height(); + targetOffset = { top: 0, left: 0 }; + } else if ( $.isWindow( targetElem ) ) { + targetWidth = target.width(); + targetHeight = target.height(); + targetOffset = { top: target.scrollTop(), left: target.scrollLeft() }; + } else if ( targetElem.preventDefault ) { + // force left top to allow flipping + options.at = "left top"; + targetWidth = targetHeight = 0; + targetOffset = { top: targetElem.pageY, left: targetElem.pageX }; + } else { + targetWidth = target.outerWidth(); + targetHeight = target.outerHeight(); + targetOffset = target.offset(); + } + // clone to reuse original targetOffset later + basePosition = $.extend( {}, targetOffset ); + + // force my and at to have valid horizontal and vertical positions + // if a value is missing or invalid, it will be converted to center + $.each( [ "my", "at" ], function() { + var pos = ( options[ this ] || "" ).split( " " ), + horizontalOffset, + verticalOffset; + + if ( pos.length === 1) { + pos = rhorizontal.test( pos[ 0 ] ) ? + pos.concat( [ "center" ] ) : + rvertical.test( pos[ 0 ] ) ? + [ "center" ].concat( pos ) : + [ "center", "center" ]; + } + pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center"; + pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center"; + + // calculate offsets + horizontalOffset = roffset.exec( pos[ 0 ] ); + verticalOffset = roffset.exec( pos[ 1 ] ); + offsets[ this ] = [ + horizontalOffset ? horizontalOffset[ 0 ] : 0, + verticalOffset ? verticalOffset[ 0 ] : 0 + ]; + + // reduce to just the positions without the offsets + options[ this ] = [ + rposition.exec( pos[ 0 ] )[ 0 ], + rposition.exec( pos[ 1 ] )[ 0 ] + ]; + }); + + // normalize collision option + if ( collision.length === 1 ) { + collision[ 1 ] = collision[ 0 ]; + } + + if ( options.at[ 0 ] === "right" ) { + basePosition.left += targetWidth; + } else if ( options.at[ 0 ] === "center" ) { + basePosition.left += targetWidth / 2; + } + + if ( options.at[ 1 ] === "bottom" ) { + basePosition.top += targetHeight; + } else if ( options.at[ 1 ] === "center" ) { + basePosition.top += targetHeight / 2; + } + + atOffset = getOffsets( offsets.at, targetWidth, targetHeight ); + basePosition.left += atOffset[ 0 ]; + basePosition.top += atOffset[ 1 ]; + + return this.each(function() { + var collisionPosition, using, + elem = $( this ), + elemWidth = elem.outerWidth(), + elemHeight = elem.outerHeight(), + marginLeft = parseCss( this, "marginLeft" ), + marginTop = parseCss( this, "marginTop" ), + collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width, + collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height, + position = $.extend( {}, basePosition ), + myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() ); + + if ( options.my[ 0 ] === "right" ) { + position.left -= elemWidth; + } else if ( options.my[ 0 ] === "center" ) { + position.left -= elemWidth / 2; + } + + if ( options.my[ 1 ] === "bottom" ) { + position.top -= elemHeight; + } else if ( options.my[ 1 ] === "center" ) { + position.top -= elemHeight / 2; + } + + position.left += myOffset[ 0 ]; + position.top += myOffset[ 1 ]; + + // if the browser doesn't support fractions, then round for consistent results + if ( !$.support.offsetFractions ) { + position.left = round( position.left ); + position.top = round( position.top ); + } + + collisionPosition = { + marginLeft: marginLeft, + marginTop: marginTop + }; + + $.each( [ "left", "top" ], function( i, dir ) { + if ( $.ui.position[ collision[ i ] ] ) { + $.ui.position[ collision[ i ] ][ dir ]( position, { + targetWidth: targetWidth, + targetHeight: targetHeight, + elemWidth: elemWidth, + elemHeight: elemHeight, + collisionPosition: collisionPosition, + collisionWidth: collisionWidth, + collisionHeight: collisionHeight, + offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ], + my: options.my, + at: options.at, + within: within, + elem : elem + }); + } + }); + + if ( $.fn.bgiframe ) { + elem.bgiframe(); + } + + if ( options.using ) { + // adds feedback as second argument to using callback, if present + using = function( props ) { + var left = targetOffset.left - position.left, + right = left + targetWidth - elemWidth, + top = targetOffset.top - position.top, + bottom = top + targetHeight - elemHeight, + feedback = { + target: { + element: target, + left: targetOffset.left, + top: targetOffset.top, + width: targetWidth, + height: targetHeight + }, + element: { + element: elem, + left: position.left, + top: position.top, + width: elemWidth, + height: elemHeight + }, + horizontal: right < 0 ? "left" : left > 0 ? "right" : "center", + vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle" + }; + if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) { + feedback.horizontal = "center"; + } + if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) { + feedback.vertical = "middle"; + } + if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) { + feedback.important = "horizontal"; + } else { + feedback.important = "vertical"; + } + options.using.call( this, props, feedback ); + }; + } + + elem.offset( $.extend( position, { using: using } ) ); + }); +}; + +$.ui.position = { + fit: { + left: function( position, data ) { + var within = data.within, + withinOffset = within.isWindow ? within.scrollLeft : within.offset.left, + outerWidth = within.width, + collisionPosLeft = position.left - data.collisionPosition.marginLeft, + overLeft = withinOffset - collisionPosLeft, + overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset, + newOverRight; + + // element is wider than within + if ( data.collisionWidth > outerWidth ) { + // element is initially over the left side of within + if ( overLeft > 0 && overRight <= 0 ) { + newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset; + position.left += overLeft - newOverRight; + // element is initially over right side of within + } else if ( overRight > 0 && overLeft <= 0 ) { + position.left = withinOffset; + // element is initially over both left and right sides of within + } else { + if ( overLeft > overRight ) { + position.left = withinOffset + outerWidth - data.collisionWidth; + } else { + position.left = withinOffset; + } + } + // too far left -> align with left edge + } else if ( overLeft > 0 ) { + position.left += overLeft; + // too far right -> align with right edge + } else if ( overRight > 0 ) { + position.left -= overRight; + // adjust based on position and margin + } else { + position.left = max( position.left - collisionPosLeft, position.left ); + } + }, + top: function( position, data ) { + var within = data.within, + withinOffset = within.isWindow ? within.scrollTop : within.offset.top, + outerHeight = data.within.height, + collisionPosTop = position.top - data.collisionPosition.marginTop, + overTop = withinOffset - collisionPosTop, + overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset, + newOverBottom; + + // element is taller than within + if ( data.collisionHeight > outerHeight ) { + // element is initially over the top of within + if ( overTop > 0 && overBottom <= 0 ) { + newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset; + position.top += overTop - newOverBottom; + // element is initially over bottom of within + } else if ( overBottom > 0 && overTop <= 0 ) { + position.top = withinOffset; + // element is initially over both top and bottom of within + } else { + if ( overTop > overBottom ) { + position.top = withinOffset + outerHeight - data.collisionHeight; + } else { + position.top = withinOffset; + } + } + // too far up -> align with top + } else if ( overTop > 0 ) { + position.top += overTop; + // too far down -> align with bottom edge + } else if ( overBottom > 0 ) { + position.top -= overBottom; + // adjust based on position and margin + } else { + position.top = max( position.top - collisionPosTop, position.top ); + } + } + }, + flip: { + left: function( position, data ) { + var within = data.within, + withinOffset = within.offset.left + within.scrollLeft, + outerWidth = within.width, + offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left, + collisionPosLeft = position.left - data.collisionPosition.marginLeft, + overLeft = collisionPosLeft - offsetLeft, + overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft, + myOffset = data.my[ 0 ] === "left" ? + -data.elemWidth : + data.my[ 0 ] === "right" ? + data.elemWidth : + 0, + atOffset = data.at[ 0 ] === "left" ? + data.targetWidth : + data.at[ 0 ] === "right" ? + -data.targetWidth : + 0, + offset = -2 * data.offset[ 0 ], + newOverRight, + newOverLeft; + + if ( overLeft < 0 ) { + newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset; + if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) { + position.left += myOffset + atOffset + offset; + } + } + else if ( overRight > 0 ) { + newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft; + if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) { + position.left += myOffset + atOffset + offset; + } + } + }, + top: function( position, data ) { + var within = data.within, + withinOffset = within.offset.top + within.scrollTop, + outerHeight = within.height, + offsetTop = within.isWindow ? within.scrollTop : within.offset.top, + collisionPosTop = position.top - data.collisionPosition.marginTop, + overTop = collisionPosTop - offsetTop, + overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop, + top = data.my[ 1 ] === "top", + myOffset = top ? + -data.elemHeight : + data.my[ 1 ] === "bottom" ? + data.elemHeight : + 0, + atOffset = data.at[ 1 ] === "top" ? + data.targetHeight : + data.at[ 1 ] === "bottom" ? + -data.targetHeight : + 0, + offset = -2 * data.offset[ 1 ], + newOverTop, + newOverBottom; + if ( overTop < 0 ) { + newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset; + if ( ( position.top + myOffset + atOffset + offset) > overTop && ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) ) { + position.top += myOffset + atOffset + offset; + } + } + else if ( overBottom > 0 ) { + newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop; + if ( ( position.top + myOffset + atOffset + offset) > overBottom && ( newOverTop > 0 || abs( newOverTop ) < overBottom ) ) { + position.top += myOffset + atOffset + offset; + } + } + } + }, + flipfit: { + left: function() { + $.ui.position.flip.left.apply( this, arguments ); + $.ui.position.fit.left.apply( this, arguments ); + }, + top: function() { + $.ui.position.flip.top.apply( this, arguments ); + $.ui.position.fit.top.apply( this, arguments ); + } + } +}; + +// fraction support test +(function () { + var testElement, testElementParent, testElementStyle, offsetLeft, i, + body = document.getElementsByTagName( "body" )[ 0 ], + div = document.createElement( "div" ); + + //Create a "fake body" for testing based on method used in jQuery.support + testElement = document.createElement( body ? "div" : "body" ); + testElementStyle = { + visibility: "hidden", + width: 0, + height: 0, + border: 0, + margin: 0, + background: "none" + }; + if ( body ) { + $.extend( testElementStyle, { + position: "absolute", + left: "-1000px", + top: "-1000px" + }); + } + for ( i in testElementStyle ) { + testElement.style[ i ] = testElementStyle[ i ]; + } + testElement.appendChild( div ); + testElementParent = body || document.documentElement; + testElementParent.insertBefore( testElement, testElementParent.firstChild ); + + div.style.cssText = "position: absolute; left: 10.7432222px;"; + + offsetLeft = $( div ).offset().left; + $.support.offsetFractions = offsetLeft > 10 && offsetLeft < 11; + + testElement.innerHTML = ""; + testElementParent.removeChild( testElement ); +})(); + +// DEPRECATED +if ( $.uiBackCompat !== false ) { + // offset option + (function( $ ) { + var _position = $.fn.position; + $.fn.position = function( options ) { + if ( !options || !options.offset ) { + return _position.call( this, options ); + } + var offset = options.offset.split( " " ), + at = options.at.split( " " ); + if ( offset.length === 1 ) { + offset[ 1 ] = offset[ 0 ]; + } + if ( /^\d/.test( offset[ 0 ] ) ) { + offset[ 0 ] = "+" + offset[ 0 ]; + } + if ( /^\d/.test( offset[ 1 ] ) ) { + offset[ 1 ] = "+" + offset[ 1 ]; + } + if ( at.length === 1 ) { + if ( /left|center|right/.test( at[ 0 ] ) ) { + at[ 1 ] = "center"; + } else { + at[ 1 ] = at[ 0 ]; + at[ 0 ] = "center"; + } + } + return _position.call( this, $.extend( options, { + at: at[ 0 ] + offset[ 0 ] + " " + at[ 1 ] + offset[ 1 ], + offset: undefined + } ) ); + }; + }( jQuery ) ); +} + +}( jQuery ) ); diff --git a/resources/lib/jquery.ui/jquery.ui.progressbar.js b/resources/lib/jquery.ui/jquery.ui.progressbar.js new file mode 100644 index 00000000..4aa19d83 --- /dev/null +++ b/resources/lib/jquery.ui/jquery.ui.progressbar.js @@ -0,0 +1,105 @@ +/*! + * jQuery UI Progressbar 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/progressbar/ + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + */ +(function( $, undefined ) { + +$.widget( "ui.progressbar", { + version: "1.9.2", + options: { + 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.min, + "aria-valuemax": this.options.max, + "aria-valuenow": this._value() + }); + + this.valueDiv = $( "
            " ) + .appendTo( this.element ); + + this.oldValue = this._value(); + this._refreshValue(); + }, + + _destroy: function() { + this.element + .removeClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" ) + .removeAttr( "role" ) + .removeAttr( "aria-valuemin" ) + .removeAttr( "aria-valuemax" ) + .removeAttr( "aria-valuenow" ); + + this.valueDiv.remove(); + }, + + value: function( newValue ) { + if ( newValue === undefined ) { + return this._value(); + } + + this._setOption( "value", newValue ); + return this; + }, + + _setOption: function( key, value ) { + if ( key === "value" ) { + this.options.value = value; + this._refreshValue(); + if ( this._value() === this.options.max ) { + this._trigger( "complete" ); + } + } + + this._super( key, value ); + }, + + _value: function() { + var val = this.options.value; + // normalize invalid value + if ( typeof val !== "number" ) { + val = 0; + } + return Math.min( this.options.max, Math.max( this.min, val ) ); + }, + + _percentage: function() { + return 100 * this._value() / this.options.max; + }, + + _refreshValue: function() { + var value = this.value(), + percentage = this._percentage(); + + if ( this.oldValue !== value ) { + this.oldValue = value; + this._trigger( "change" ); + } + + this.valueDiv + .toggle( value > this.min ) + .toggleClass( "ui-corner-right", value === this.options.max ) + .width( percentage.toFixed(0) + "%" ); + this.element.attr( "aria-valuenow", value ); + } +}); + +})( jQuery ); diff --git a/resources/lib/jquery.ui/jquery.ui.resizable.js b/resources/lib/jquery.ui/jquery.ui.resizable.js new file mode 100644 index 00000000..bb277e23 --- /dev/null +++ b/resources/lib/jquery.ui/jquery.ui.resizable.js @@ -0,0 +1,801 @@ +/*! + * jQuery UI Resizable 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/resizable/ + * + * Depends: + * jquery.ui.core.js + * jquery.ui.mouse.js + * jquery.ui.widget.js + */ +(function( $, undefined ) { + +$.widget("ui.resizable", $.ui.mouse, { + version: "1.9.2", + widgetEventPrefix: "resize", + options: { + alsoResize: false, + animate: false, + animateDuration: "slow", + animateEasing: "swing", + aspectRatio: false, + autoHide: false, + containment: false, + ghost: false, + grid: false, + handles: "e,s,se", + helper: false, + maxHeight: null, + maxWidth: null, + minHeight: 10, + minWidth: 10, + zIndex: 1000 + }, + _create: function() { + + var that = this, o = this.options; + this.element.addClass("ui-resizable"); + + $.extend(this, { + _aspectRatio: !!(o.aspectRatio), + aspectRatio: o.aspectRatio, + originalElement: this.element, + _proportionallyResizeElements: [], + _helper: o.helper || o.ghost || o.animate ? o.helper || 'ui-resizable-helper' : null + }); + + //Wrap the element if it cannot hold child nodes + if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) { + + //Create a wrapper element and set the wrapper to the new current internal element + this.element.wrap( + $('
            ').css({ + position: this.element.css('position'), + width: this.element.outerWidth(), + height: this.element.outerHeight(), + top: this.element.css('top'), + left: this.element.css('left') + }) + ); + + //Overwrite the original this.element + this.element = this.element.parent().data( + "resizable", this.element.data('resizable') + ); + + this.elementIsWrapper = true; + + //Move margins to the wrapper + this.element.css({ marginLeft: this.originalElement.css("marginLeft"), marginTop: this.originalElement.css("marginTop"), marginRight: this.originalElement.css("marginRight"), marginBottom: this.originalElement.css("marginBottom") }); + this.originalElement.css({ marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0}); + + //Prevent Safari textarea resize + this.originalResizeStyle = this.originalElement.css('resize'); + this.originalElement.css('resize', 'none'); + + //Push the actual element to our proportionallyResize internal array + this._proportionallyResizeElements.push(this.originalElement.css({ position: 'static', zoom: 1, display: 'block' })); + + // avoid IE jump (hard set the margin) + this.originalElement.css({ margin: this.originalElement.css('margin') }); + + // fix handlers offset + this._proportionallyResize(); + + } + + this.handles = o.handles || (!$('.ui-resizable-handle', this.element).length ? "e,s,se" : { n: '.ui-resizable-n', e: '.ui-resizable-e', s: '.ui-resizable-s', w: '.ui-resizable-w', se: '.ui-resizable-se', sw: '.ui-resizable-sw', ne: '.ui-resizable-ne', nw: '.ui-resizable-nw' }); + if(this.handles.constructor == String) { + + if(this.handles == 'all') this.handles = 'n,e,s,w,se,sw,ne,nw'; + var n = this.handles.split(","); this.handles = {}; + + for(var i = 0; i < n.length; i++) { + + var handle = $.trim(n[i]), hname = 'ui-resizable-'+handle; + var axis = $('
            '); + + // Apply zIndex to all handles - see #7960 + axis.css({ zIndex: o.zIndex }); + + //TODO : What's going on here? + if ('se' == handle) { + axis.addClass('ui-icon ui-icon-gripsmall-diagonal-se'); + }; + + //Insert into internal handles object and append to element + this.handles[handle] = '.ui-resizable-'+handle; + this.element.append(axis); + } + + } + + this._renderAxis = function(target) { + + target = target || this.element; + + for(var i in this.handles) { + + if(this.handles[i].constructor == String) + this.handles[i] = $(this.handles[i], this.element).show(); + + //Apply pad to wrapper element, needed to fix axis position (textarea, inputs, scrolls) + if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) { + + var axis = $(this.handles[i], this.element), padWrapper = 0; + + //Checking the correct pad and border + padWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth(); + + //The padding type i have to apply... + var padPos = [ 'padding', + /ne|nw|n/.test(i) ? 'Top' : + /se|sw|s/.test(i) ? 'Bottom' : + /^e$/.test(i) ? 'Right' : 'Left' ].join(""); + + target.css(padPos, padWrapper); + + this._proportionallyResize(); + + } + + //TODO: What's that good for? There's not anything to be executed left + if(!$(this.handles[i]).length) + continue; + + } + }; + + //TODO: make renderAxis a prototype function + this._renderAxis(this.element); + + this._handles = $('.ui-resizable-handle', this.element) + .disableSelection(); + + //Matching axis name + this._handles.mouseover(function() { + if (!that.resizing) { + if (this.className) + var axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i); + //Axis, default = se + that.axis = axis && axis[1] ? axis[1] : 'se'; + } + }); + + //If we want to auto hide the elements + if (o.autoHide) { + this._handles.hide(); + $(this.element) + .addClass("ui-resizable-autohide") + .mouseenter(function() { + if (o.disabled) return; + $(this).removeClass("ui-resizable-autohide"); + that._handles.show(); + }) + .mouseleave(function(){ + if (o.disabled) return; + if (!that.resizing) { + $(this).addClass("ui-resizable-autohide"); + that._handles.hide(); + } + }); + } + + //Initialize the mouse interaction + this._mouseInit(); + + }, + + _destroy: function() { + + this._mouseDestroy(); + + var _destroy = function(exp) { + $(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing") + .removeData("resizable").removeData("ui-resizable").unbind(".resizable").find('.ui-resizable-handle').remove(); + }; + + //TODO: Unwrap at same DOM position + if (this.elementIsWrapper) { + _destroy(this.element); + var wrapper = this.element; + this.originalElement.css({ + position: wrapper.css('position'), + width: wrapper.outerWidth(), + height: wrapper.outerHeight(), + top: wrapper.css('top'), + left: wrapper.css('left') + }).insertAfter( wrapper ); + wrapper.remove(); + } + + this.originalElement.css('resize', this.originalResizeStyle); + _destroy(this.originalElement); + + return this; + }, + + _mouseCapture: function(event) { + var handle = false; + for (var i in this.handles) { + if ($(this.handles[i])[0] == event.target) { + handle = true; + } + } + + return !this.options.disabled && handle; + }, + + _mouseStart: function(event) { + + var o = this.options, iniPos = this.element.position(), el = this.element; + + this.resizing = true; + this.documentScroll = { top: $(document).scrollTop(), left: $(document).scrollLeft() }; + + // bugfix for http://dev.jquery.com/ticket/1749 + if (el.is('.ui-draggable') || (/absolute/).test(el.css('position'))) { + el.css({ position: 'absolute', top: iniPos.top, left: iniPos.left }); + } + + this._renderProxy(); + + var curleft = num(this.helper.css('left')), curtop = num(this.helper.css('top')); + + if (o.containment) { + curleft += $(o.containment).scrollLeft() || 0; + curtop += $(o.containment).scrollTop() || 0; + } + + //Store needed variables + this.offset = this.helper.offset(); + this.position = { left: curleft, top: curtop }; + this.size = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() }; + this.originalSize = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() }; + this.originalPosition = { left: curleft, top: curtop }; + this.sizeDiff = { width: el.outerWidth() - el.width(), height: el.outerHeight() - el.height() }; + this.originalMousePosition = { left: event.pageX, top: event.pageY }; + + //Aspect Ratio + this.aspectRatio = (typeof o.aspectRatio == 'number') ? o.aspectRatio : ((this.originalSize.width / this.originalSize.height) || 1); + + var cursor = $('.ui-resizable-' + this.axis).css('cursor'); + $('body').css('cursor', cursor == 'auto' ? this.axis + '-resize' : cursor); + + el.addClass("ui-resizable-resizing"); + this._propagate("start", event); + return true; + }, + + _mouseDrag: function(event) { + + //Increase performance, avoid regex + var el = this.helper, o = this.options, props = {}, + that = this, smp = this.originalMousePosition, a = this.axis; + + var dx = (event.pageX-smp.left)||0, dy = (event.pageY-smp.top)||0; + var trigger = this._change[a]; + if (!trigger) return false; + + // Calculate the attrs that will be change + var data = trigger.apply(this, [event, dx, dy]); + + // Put this in the mouseDrag handler since the user can start pressing shift while resizing + this._updateVirtualBoundaries(event.shiftKey); + if (this._aspectRatio || event.shiftKey) + data = this._updateRatio(data, event); + + data = this._respectSize(data, event); + + // plugins callbacks need to be called first + this._propagate("resize", event); + + el.css({ + top: this.position.top + "px", left: this.position.left + "px", + width: this.size.width + "px", height: this.size.height + "px" + }); + + if (!this._helper && this._proportionallyResizeElements.length) + this._proportionallyResize(); + + this._updateCache(data); + + // calling the user callback at the end + this._trigger('resize', event, this.ui()); + + return false; + }, + + _mouseStop: function(event) { + + this.resizing = false; + var o = this.options, that = this; + + if(this._helper) { + var pr = this._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName), + soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : that.sizeDiff.height, + soffsetw = ista ? 0 : that.sizeDiff.width; + + var s = { width: (that.helper.width() - soffsetw), height: (that.helper.height() - soffseth) }, + left = (parseInt(that.element.css('left'), 10) + (that.position.left - that.originalPosition.left)) || null, + top = (parseInt(that.element.css('top'), 10) + (that.position.top - that.originalPosition.top)) || null; + + if (!o.animate) + this.element.css($.extend(s, { top: top, left: left })); + + that.helper.height(that.size.height); + that.helper.width(that.size.width); + + if (this._helper && !o.animate) this._proportionallyResize(); + } + + $('body').css('cursor', 'auto'); + + this.element.removeClass("ui-resizable-resizing"); + + this._propagate("stop", event); + + if (this._helper) this.helper.remove(); + return false; + + }, + + _updateVirtualBoundaries: function(forceAspectRatio) { + var o = this.options, pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b; + + b = { + minWidth: isNumber(o.minWidth) ? o.minWidth : 0, + maxWidth: isNumber(o.maxWidth) ? o.maxWidth : Infinity, + minHeight: isNumber(o.minHeight) ? o.minHeight : 0, + maxHeight: isNumber(o.maxHeight) ? o.maxHeight : Infinity + }; + + if(this._aspectRatio || forceAspectRatio) { + // We want to create an enclosing box whose aspect ration is the requested one + // First, compute the "projected" size for each dimension based on the aspect ratio and other dimension + pMinWidth = b.minHeight * this.aspectRatio; + pMinHeight = b.minWidth / this.aspectRatio; + pMaxWidth = b.maxHeight * this.aspectRatio; + pMaxHeight = b.maxWidth / this.aspectRatio; + + if(pMinWidth > b.minWidth) b.minWidth = pMinWidth; + if(pMinHeight > b.minHeight) b.minHeight = pMinHeight; + if(pMaxWidth < b.maxWidth) b.maxWidth = pMaxWidth; + if(pMaxHeight < b.maxHeight) b.maxHeight = pMaxHeight; + } + this._vBoundaries = b; + }, + + _updateCache: function(data) { + var o = this.options; + this.offset = this.helper.offset(); + if (isNumber(data.left)) this.position.left = data.left; + if (isNumber(data.top)) this.position.top = data.top; + if (isNumber(data.height)) this.size.height = data.height; + if (isNumber(data.width)) this.size.width = data.width; + }, + + _updateRatio: function(data, event) { + + var o = this.options, cpos = this.position, csize = this.size, a = this.axis; + + if (isNumber(data.height)) data.width = (data.height * this.aspectRatio); + else if (isNumber(data.width)) data.height = (data.width / this.aspectRatio); + + if (a == 'sw') { + data.left = cpos.left + (csize.width - data.width); + data.top = null; + } + if (a == 'nw') { + data.top = cpos.top + (csize.height - data.height); + data.left = cpos.left + (csize.width - data.width); + } + + return data; + }, + + _respectSize: function(data, event) { + + var el = this.helper, o = this._vBoundaries, pRatio = this._aspectRatio || event.shiftKey, a = this.axis, + ismaxw = isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width), ismaxh = isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height), + isminw = isNumber(data.width) && o.minWidth && (o.minWidth > data.width), isminh = isNumber(data.height) && o.minHeight && (o.minHeight > data.height); + + if (isminw) data.width = o.minWidth; + if (isminh) data.height = o.minHeight; + if (ismaxw) data.width = o.maxWidth; + if (ismaxh) data.height = o.maxHeight; + + var dw = this.originalPosition.left + this.originalSize.width, dh = this.position.top + this.size.height; + var cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a); + + if (isminw && cw) data.left = dw - o.minWidth; + if (ismaxw && cw) data.left = dw - o.maxWidth; + if (isminh && ch) data.top = dh - o.minHeight; + if (ismaxh && ch) data.top = dh - o.maxHeight; + + // fixing jump error on top/left - bug #2330 + var isNotwh = !data.width && !data.height; + if (isNotwh && !data.left && data.top) data.top = null; + else if (isNotwh && !data.top && data.left) data.left = null; + + return data; + }, + + _proportionallyResize: function() { + + var o = this.options; + if (!this._proportionallyResizeElements.length) return; + var element = this.helper || this.element; + + for (var i=0; i < this._proportionallyResizeElements.length; i++) { + + var prel = this._proportionallyResizeElements[i]; + + if (!this.borderDif) { + var b = [prel.css('borderTopWidth'), prel.css('borderRightWidth'), prel.css('borderBottomWidth'), prel.css('borderLeftWidth')], + p = [prel.css('paddingTop'), prel.css('paddingRight'), prel.css('paddingBottom'), prel.css('paddingLeft')]; + + this.borderDif = $.map(b, function(v, i) { + var border = parseInt(v,10)||0, padding = parseInt(p[i],10)||0; + return border + padding; + }); + } + + prel.css({ + height: (element.height() - this.borderDif[0] - this.borderDif[2]) || 0, + width: (element.width() - this.borderDif[1] - this.borderDif[3]) || 0 + }); + + }; + + }, + + _renderProxy: function() { + + var el = this.element, o = this.options; + this.elementOffset = el.offset(); + + if(this._helper) { + + this.helper = this.helper || $('
            '); + + // fix ie6 offset TODO: This seems broken + var ie6offset = ($.ui.ie6 ? 1 : 0), + pxyoffset = ( $.ui.ie6 ? 2 : -1 ); + + this.helper.addClass(this._helper).css({ + width: this.element.outerWidth() + pxyoffset, + height: this.element.outerHeight() + pxyoffset, + position: 'absolute', + left: this.elementOffset.left - ie6offset +'px', + top: this.elementOffset.top - ie6offset +'px', + zIndex: ++o.zIndex //TODO: Don't modify option + }); + + this.helper + .appendTo("body") + .disableSelection(); + + } else { + this.helper = this.element; + } + + }, + + _change: { + e: function(event, dx, dy) { + return { width: this.originalSize.width + dx }; + }, + w: function(event, dx, dy) { + var o = this.options, cs = this.originalSize, sp = this.originalPosition; + return { left: sp.left + dx, width: cs.width - dx }; + }, + n: function(event, dx, dy) { + var o = this.options, cs = this.originalSize, sp = this.originalPosition; + return { top: sp.top + dy, height: cs.height - dy }; + }, + s: function(event, dx, dy) { + return { height: this.originalSize.height + dy }; + }, + se: function(event, dx, dy) { + return $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [event, dx, dy])); + }, + sw: function(event, dx, dy) { + return $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [event, dx, dy])); + }, + ne: function(event, dx, dy) { + return $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [event, dx, dy])); + }, + nw: function(event, dx, dy) { + return $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [event, dx, dy])); + } + }, + + _propagate: function(n, event) { + $.ui.plugin.call(this, n, [event, this.ui()]); + (n != "resize" && this._trigger(n, event, this.ui())); + }, + + plugins: {}, + + ui: function() { + return { + originalElement: this.originalElement, + element: this.element, + helper: this.helper, + position: this.position, + size: this.size, + originalSize: this.originalSize, + originalPosition: this.originalPosition + }; + } + +}); + +/* + * Resizable Extensions + */ + +$.ui.plugin.add("resizable", "alsoResize", { + + start: function (event, ui) { + var that = $(this).data("resizable"), o = that.options; + + var _store = function (exp) { + $(exp).each(function() { + 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) + }); + }); + }; + + 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) { _store(exp); }); } + }else{ + _store(o.alsoResize); + } + }, + + resize: function (event, ui) { + var that = $(this).data("resizable"), o = that.options, os = that.originalSize, op = that.originalPosition; + + var delta = { + height: (that.size.height - os.height) || 0, width: (that.size.width - os.width) || 0, + top: (that.position.top - op.top) || 0, left: (that.position.left - op.left) || 0 + }, + + _alsoResize = function (exp, c) { + $(exp).each(function() { + 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, function (i, prop) { + var sum = (start[prop]||0) + (delta[prop]||0); + if (sum && sum >= 0) + style[prop] = sum || null; + }); + + el.css(style); + }); + }; + + if (typeof(o.alsoResize) == 'object' && !o.alsoResize.nodeType) { + $.each(o.alsoResize, function (exp, c) { _alsoResize(exp, c); }); + }else{ + _alsoResize(o.alsoResize); + } + }, + + stop: function (event, ui) { + $(this).removeData("resizable-alsoresize"); + } +}); + +$.ui.plugin.add("resizable", "animate", { + + stop: function(event, ui) { + var that = $(this).data("resizable"), o = that.options; + + var pr = that._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName), + soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : that.sizeDiff.height, + soffsetw = ista ? 0 : that.sizeDiff.width; + + var style = { width: (that.size.width - soffsetw), height: (that.size.height - soffseth) }, + left = (parseInt(that.element.css('left'), 10) + (that.position.left - that.originalPosition.left)) || null, + top = (parseInt(that.element.css('top'), 10) + (that.position.top - that.originalPosition.top)) || null; + + that.element.animate( + $.extend(style, top && left ? { top: top, left: left } : {}), { + duration: o.animateDuration, + easing: o.animateEasing, + step: function() { + + var data = { + width: parseInt(that.element.css('width'), 10), + height: parseInt(that.element.css('height'), 10), + top: parseInt(that.element.css('top'), 10), + left: parseInt(that.element.css('left'), 10) + }; + + if (pr && pr.length) $(pr[0]).css({ width: data.width, height: data.height }); + + // propagating resize, and updating values for each animation step + that._updateCache(data); + that._propagate("resize", event); + + } + } + ); + } + +}); + +$.ui.plugin.add("resizable", "containment", { + + start: function(event, ui) { + var that = $(this).data("resizable"), o = that.options, el = that.element; + var oc = o.containment, ce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc; + if (!ce) return; + + that.containerElement = $(ce); + + if (/document/.test(oc) || oc == document) { + that.containerOffset = { left: 0, top: 0 }; + that.containerPosition = { left: 0, top: 0 }; + + that.parentData = { + element: $(document), left: 0, top: 0, + width: $(document).width(), height: $(document).height() || document.body.parentNode.scrollHeight + }; + } + + // i'm a node, so compute top, left, right, bottom + else { + var element = $(ce), p = []; + $([ "Top", "Right", "Left", "Bottom" ]).each(function(i, name) { p[i] = num(element.css("padding" + name)); }); + + that.containerOffset = element.offset(); + that.containerPosition = element.position(); + that.containerSize = { height: (element.innerHeight() - p[3]), width: (element.innerWidth() - p[1]) }; + + var co = that.containerOffset, ch = that.containerSize.height, cw = that.containerSize.width, + width = ($.ui.hasScroll(ce, "left") ? ce.scrollWidth : cw ), height = ($.ui.hasScroll(ce) ? ce.scrollHeight : ch); + + that.parentData = { + element: ce, left: co.left, top: co.top, width: width, height: height + }; + } + }, + + resize: function(event, ui) { + var that = $(this).data("resizable"), o = that.options, + ps = that.containerSize, co = that.containerOffset, cs = that.size, cp = that.position, + pRatio = that._aspectRatio || event.shiftKey, cop = { top:0, left:0 }, ce = that.containerElement; + + if (ce[0] != document && (/static/).test(ce.css('position'))) cop = co; + + if (cp.left < (that._helper ? co.left : 0)) { + that.size.width = that.size.width + (that._helper ? (that.position.left - co.left) : (that.position.left - cop.left)); + if (pRatio) that.size.height = that.size.width / that.aspectRatio; + that.position.left = o.helper ? co.left : 0; + } + + if (cp.top < (that._helper ? co.top : 0)) { + that.size.height = that.size.height + (that._helper ? (that.position.top - co.top) : that.position.top); + if (pRatio) that.size.width = that.size.height * that.aspectRatio; + that.position.top = that._helper ? co.top : 0; + } + + that.offset.left = that.parentData.left+that.position.left; + that.offset.top = that.parentData.top+that.position.top; + + var woset = Math.abs( (that._helper ? that.offset.left - cop.left : (that.offset.left - cop.left)) + that.sizeDiff.width ), + hoset = Math.abs( (that._helper ? that.offset.top - cop.top : (that.offset.top - co.top)) + that.sizeDiff.height ); + + var isParent = that.containerElement.get(0) == that.element.parent().get(0), + isOffsetRelative = /relative|absolute/.test(that.containerElement.css('position')); + + if(isParent && isOffsetRelative) woset -= that.parentData.left; + + if (woset + that.size.width >= that.parentData.width) { + that.size.width = that.parentData.width - woset; + if (pRatio) that.size.height = that.size.width / that.aspectRatio; + } + + if (hoset + that.size.height >= that.parentData.height) { + that.size.height = that.parentData.height - hoset; + if (pRatio) that.size.width = that.size.height * that.aspectRatio; + } + }, + + stop: function(event, ui){ + var that = $(this).data("resizable"), o = that.options, cp = that.position, + co = that.containerOffset, cop = that.containerPosition, ce = that.containerElement; + + var helper = $(that.helper), ho = helper.offset(), w = helper.outerWidth() - that.sizeDiff.width, h = helper.outerHeight() - that.sizeDiff.height; + + if (that._helper && !o.animate && (/relative/).test(ce.css('position'))) + $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h }); + + if (that._helper && !o.animate && (/static/).test(ce.css('position'))) + $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h }); + + } +}); + +$.ui.plugin.add("resizable", "ghost", { + + start: function(event, ui) { + + var that = $(this).data("resizable"), o = that.options, cs = that.size; + + that.ghost = that.originalElement.clone(); + that.ghost + .css({ opacity: .25, display: 'block', position: 'relative', height: cs.height, width: cs.width, margin: 0, left: 0, top: 0 }) + .addClass('ui-resizable-ghost') + .addClass(typeof o.ghost == 'string' ? o.ghost : ''); + + that.ghost.appendTo(that.helper); + + }, + + resize: function(event, ui){ + var that = $(this).data("resizable"), o = that.options; + if (that.ghost) that.ghost.css({ position: 'relative', height: that.size.height, width: that.size.width }); + }, + + stop: function(event, ui){ + var that = $(this).data("resizable"), o = that.options; + if (that.ghost && that.helper) that.helper.get(0).removeChild(that.ghost.get(0)); + } + +}); + +$.ui.plugin.add("resizable", "grid", { + + resize: function(event, ui) { + var that = $(this).data("resizable"), o = that.options, cs = that.size, os = that.originalSize, op = that.originalPosition, a = that.axis, ratio = o._aspectRatio || event.shiftKey; + o.grid = typeof o.grid == "number" ? [o.grid, o.grid] : o.grid; + var ox = Math.round((cs.width - os.width) / (o.grid[0]||1)) * (o.grid[0]||1), oy = Math.round((cs.height - os.height) / (o.grid[1]||1)) * (o.grid[1]||1); + + if (/^(se|s|e)$/.test(a)) { + that.size.width = os.width + ox; + that.size.height = os.height + oy; + } + else if (/^(ne)$/.test(a)) { + that.size.width = os.width + ox; + that.size.height = os.height + oy; + that.position.top = op.top - oy; + } + else if (/^(sw)$/.test(a)) { + that.size.width = os.width + ox; + that.size.height = os.height + oy; + that.position.left = op.left - ox; + } + else { + that.size.width = os.width + ox; + that.size.height = os.height + oy; + that.position.top = op.top - oy; + that.position.left = op.left - ox; + } + } + +}); + +var num = function(v) { + return parseInt(v, 10) || 0; +}; + +var isNumber = function(value) { + return !isNaN(parseInt(value, 10)); +}; + +})(jQuery); diff --git a/resources/lib/jquery.ui/jquery.ui.selectable.js b/resources/lib/jquery.ui/jquery.ui.selectable.js new file mode 100644 index 00000000..3f27b732 --- /dev/null +++ b/resources/lib/jquery.ui/jquery.ui.selectable.js @@ -0,0 +1,261 @@ +/*! + * jQuery UI Selectable 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/selectable/ + * + * Depends: + * jquery.ui.core.js + * jquery.ui.mouse.js + * jquery.ui.widget.js + */ +(function( $, undefined ) { + +$.widget("ui.selectable", $.ui.mouse, { + version: "1.9.2", + options: { + appendTo: 'body', + autoRefresh: true, + distance: 0, + filter: '*', + tolerance: 'touch' + }, + _create: function() { + var that = this; + + this.element.addClass("ui-selectable"); + + this.dragged = false; + + // cache selectee children based on filter + var selectees; + this.refresh = function() { + selectees = $(that.options.filter, that.element[0]); + selectees.addClass("ui-selectee"); + selectees.each(function() { + var $this = $(this); + var pos = $this.offset(); + $.data(this, "selectable-item", { + element: this, + $element: $this, + left: pos.left, + top: pos.top, + right: pos.left + $this.outerWidth(), + bottom: pos.top + $this.outerHeight(), + startselected: false, + selected: $this.hasClass('ui-selected'), + selecting: $this.hasClass('ui-selecting'), + unselecting: $this.hasClass('ui-unselecting') + }); + }); + }; + this.refresh(); + + this.selectees = selectees.addClass("ui-selectee"); + + this._mouseInit(); + + this.helper = $("
            "); + }, + + _destroy: function() { + this.selectees + .removeClass("ui-selectee") + .removeData("selectable-item"); + this.element + .removeClass("ui-selectable ui-selectable-disabled"); + this._mouseDestroy(); + }, + + _mouseStart: function(event) { + var that = this; + + this.opos = [event.pageX, event.pageY]; + + if (this.options.disabled) + return; + + var options = this.options; + + this.selectees = $(options.filter, this.element[0]); + + this._trigger("start", event); + + $(options.appendTo).append(this.helper); + // position helper (lasso) + this.helper.css({ + "left": event.clientX, + "top": event.clientY, + "width": 0, + "height": 0 + }); + + if (options.autoRefresh) { + this.refresh(); + } + + this.selectees.filter('.ui-selected').each(function() { + var selectee = $.data(this, "selectable-item"); + selectee.startselected = true; + if (!event.metaKey && !event.ctrlKey) { + selectee.$element.removeClass('ui-selected'); + selectee.selected = false; + selectee.$element.addClass('ui-unselecting'); + selectee.unselecting = true; + // selectable UNSELECTING callback + that._trigger("unselecting", event, { + unselecting: selectee.element + }); + } + }); + + $(event.target).parents().andSelf().each(function() { + var selectee = $.data(this, "selectable-item"); + if (selectee) { + var doSelect = (!event.metaKey && !event.ctrlKey) || !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) { + that._trigger("selecting", event, { + selecting: selectee.element + }); + } else { + that._trigger("unselecting", event, { + unselecting: selectee.element + }); + } + return false; + } + }); + + }, + + _mouseDrag: function(event) { + var that = this; + this.dragged = true; + + if (this.options.disabled) + return; + + var options = this.options; + + var x1 = this.opos[0], y1 = this.opos[1], x2 = event.pageX, y2 = event.pageY; + if (x1 > x2) { var tmp = x2; x2 = x1; x1 = tmp; } + if (y1 > y2) { var tmp = y2; y2 = y1; y1 = tmp; } + this.helper.css({left: x1, top: y1, width: x2-x1, height: y2-y1}); + + this.selectees.each(function() { + var selectee = $.data(this, "selectable-item"); + //prevent helper from being selected if appendTo: selectable + if (!selectee || selectee.element == that.element[0]) + return; + var hit = false; + if (options.tolerance == 'touch') { + hit = ( !(selectee.left > x2 || selectee.right < x1 || selectee.top > y2 || selectee.bottom < y1) ); + } else if (options.tolerance == 'fit') { + hit = (selectee.left > x1 && selectee.right < x2 && selectee.top > y1 && selectee.bottom < y2); + } + + if (hit) { + // SELECT + if (selectee.selected) { + selectee.$element.removeClass('ui-selected'); + selectee.selected = false; + } + if (selectee.unselecting) { + selectee.$element.removeClass('ui-unselecting'); + selectee.unselecting = false; + } + if (!selectee.selecting) { + selectee.$element.addClass('ui-selecting'); + selectee.selecting = true; + // selectable SELECTING callback + that._trigger("selecting", event, { + selecting: selectee.element + }); + } + } else { + // UNSELECT + if (selectee.selecting) { + if ((event.metaKey || event.ctrlKey) && selectee.startselected) { + selectee.$element.removeClass('ui-selecting'); + selectee.selecting = false; + selectee.$element.addClass('ui-selected'); + selectee.selected = true; + } else { + selectee.$element.removeClass('ui-selecting'); + selectee.selecting = false; + if (selectee.startselected) { + selectee.$element.addClass('ui-unselecting'); + selectee.unselecting = true; + } + // selectable UNSELECTING callback + that._trigger("unselecting", event, { + unselecting: selectee.element + }); + } + } + if (selectee.selected) { + if (!event.metaKey && !event.ctrlKey && !selectee.startselected) { + selectee.$element.removeClass('ui-selected'); + selectee.selected = false; + + selectee.$element.addClass('ui-unselecting'); + selectee.unselecting = true; + // selectable UNSELECTING callback + that._trigger("unselecting", event, { + unselecting: selectee.element + }); + } + } + } + }); + + return false; + }, + + _mouseStop: function(event) { + var that = this; + + this.dragged = false; + + var options = this.options; + + $('.ui-unselecting', this.element[0]).each(function() { + var selectee = $.data(this, "selectable-item"); + selectee.$element.removeClass('ui-unselecting'); + selectee.unselecting = false; + selectee.startselected = false; + that._trigger("unselected", event, { + unselected: selectee.element + }); + }); + $('.ui-selecting', this.element[0]).each(function() { + var selectee = $.data(this, "selectable-item"); + selectee.$element.removeClass('ui-selecting').addClass('ui-selected'); + selectee.selecting = false; + selectee.selected = true; + selectee.startselected = true; + that._trigger("selected", event, { + selected: selectee.element + }); + }); + this._trigger("stop", event); + + this.helper.remove(); + + return false; + } + +}); + +})(jQuery); diff --git a/resources/lib/jquery.ui/jquery.ui.slider.js b/resources/lib/jquery.ui/jquery.ui.slider.js new file mode 100644 index 00000000..c3daa7a4 --- /dev/null +++ b/resources/lib/jquery.ui/jquery.ui.slider.js @@ -0,0 +1,644 @@ +/*! + * jQuery UI Slider 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/slider/ + * + * Depends: + * jquery.ui.core.js + * jquery.ui.mouse.js + * jquery.ui.widget.js + */ +(function( $, undefined ) { + +// number of pages in a slider +// (how many times can you page up/down to go through the whole range) +var numPages = 5; + +$.widget( "ui.slider", $.ui.mouse, { + version: "1.9.2", + widgetEventPrefix: "slide", + + options: { + animate: false, + distance: 0, + max: 100, + min: 0, + orientation: "horizontal", + range: false, + step: 1, + value: 0, + values: null + }, + + _create: function() { + var i, handleCount, + o = this.options, + existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ), + handle = "", + handles = []; + + this._keySliding = false; + this._mouseSliding = false; + this._animateOff = true; + this._handleIndex = null; + this._detectOrientation(); + this._mouseInit(); + + this.element + .addClass( "ui-slider" + + " ui-slider-" + this.orientation + + " ui-widget" + + " ui-widget-content" + + " ui-corner-all" + + ( o.disabled ? " ui-slider-disabled ui-disabled" : "" ) ); + + this.range = $([]); + + if ( o.range ) { + if ( o.range === true ) { + if ( !o.values ) { + o.values = [ this._valueMin(), this._valueMin() ]; + } + if ( o.values.length && o.values.length !== 2 ) { + o.values = [ o.values[0], o.values[0] ]; + } + } + + this.range = $( "
            " ) + .appendTo( this.element ) + .addClass( "ui-slider-range" + + // note: this isn't the most fittingly semantic framework class for this element, + // but worked best visually with a variety of themes + " ui-widget-header" + + ( ( o.range === "min" || o.range === "max" ) ? " ui-slider-range-" + o.range : "" ) ); + } + + handleCount = ( o.values && o.values.length ) || 1; + + for ( i = existingHandles.length; i < handleCount; i++ ) { + handles.push( handle ); + } + + this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( this.element ) ); + + this.handle = this.handles.eq( 0 ); + + this.handles.add( this.range ).filter( "a" ) + .click(function( event ) { + event.preventDefault(); + }) + .mouseenter(function() { + if ( !o.disabled ) { + $( this ).addClass( "ui-state-hover" ); + } + }) + .mouseleave(function() { + $( this ).removeClass( "ui-state-hover" ); + }) + .focus(function() { + if ( !o.disabled ) { + $( ".ui-slider .ui-state-focus" ).removeClass( "ui-state-focus" ); + $( this ).addClass( "ui-state-focus" ); + } else { + $( this ).blur(); + } + }) + .blur(function() { + $( this ).removeClass( "ui-state-focus" ); + }); + + this.handles.each(function( i ) { + $( this ).data( "ui-slider-handle-index", i ); + }); + + this._on( this.handles, { + keydown: function( event ) { + var allowed, curVal, newVal, step, + index = $( event.target ).data( "ui-slider-handle-index" ); + + switch ( event.keyCode ) { + case $.ui.keyCode.HOME: + case $.ui.keyCode.END: + case $.ui.keyCode.PAGE_UP: + case $.ui.keyCode.PAGE_DOWN: + case $.ui.keyCode.UP: + case $.ui.keyCode.RIGHT: + case $.ui.keyCode.DOWN: + case $.ui.keyCode.LEFT: + event.preventDefault(); + if ( !this._keySliding ) { + this._keySliding = true; + $( event.target ).addClass( "ui-state-active" ); + allowed = this._start( event, index ); + if ( allowed === false ) { + return; + } + } + break; + } + + step = this.options.step; + if ( this.options.values && this.options.values.length ) { + curVal = newVal = this.values( index ); + } else { + curVal = newVal = this.value(); + } + + switch ( event.keyCode ) { + case $.ui.keyCode.HOME: + newVal = this._valueMin(); + break; + case $.ui.keyCode.END: + newVal = this._valueMax(); + break; + case $.ui.keyCode.PAGE_UP: + newVal = this._trimAlignValue( curVal + ( (this._valueMax() - this._valueMin()) / numPages ) ); + break; + case $.ui.keyCode.PAGE_DOWN: + newVal = this._trimAlignValue( curVal - ( (this._valueMax() - this._valueMin()) / numPages ) ); + break; + case $.ui.keyCode.UP: + case $.ui.keyCode.RIGHT: + if ( curVal === this._valueMax() ) { + return; + } + newVal = this._trimAlignValue( curVal + step ); + break; + case $.ui.keyCode.DOWN: + case $.ui.keyCode.LEFT: + if ( curVal === this._valueMin() ) { + return; + } + newVal = this._trimAlignValue( curVal - step ); + break; + } + + this._slide( event, index, newVal ); + }, + keyup: function( event ) { + var index = $( event.target ).data( "ui-slider-handle-index" ); + + if ( this._keySliding ) { + this._keySliding = false; + this._stop( event, index ); + this._change( event, index ); + $( event.target ).removeClass( "ui-state-active" ); + } + } + }); + + this._refreshValue(); + + this._animateOff = false; + }, + + _destroy: function() { + this.handles.remove(); + this.range.remove(); + + this.element + .removeClass( "ui-slider" + + " ui-slider-horizontal" + + " ui-slider-vertical" + + " ui-slider-disabled" + + " ui-widget" + + " ui-widget-content" + + " ui-corner-all" ); + + this._mouseDestroy(); + }, + + _mouseCapture: function( event ) { + var position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle, + that = this, + o = this.options; + + if ( o.disabled ) { + return false; + } + + this.elementSize = { + width: this.element.outerWidth(), + height: this.element.outerHeight() + }; + this.elementOffset = this.element.offset(); + + position = { x: event.pageX, y: event.pageY }; + normValue = this._normValueFromMouse( position ); + distance = this._valueMax() - this._valueMin() + 1; + this.handles.each(function( i ) { + var thisDistance = Math.abs( normValue - that.values(i) ); + if ( distance > thisDistance ) { + distance = thisDistance; + closestHandle = $( this ); + index = i; + } + }); + + // workaround for bug #3736 (if both handles of a range are at 0, + // the first is always used as the one with least distance, + // and moving it is obviously prevented by preventing negative ranges) + if( o.range === true && this.values(1) === o.min ) { + index += 1; + closestHandle = $( this.handles[index] ); + } + + allowed = this._start( event, index ); + if ( allowed === false ) { + return false; + } + this._mouseSliding = true; + + this._handleIndex = index; + + closestHandle + .addClass( "ui-state-active" ) + .focus(); + + offset = closestHandle.offset(); + mouseOverHandle = !$( event.target ).parents().andSelf().is( ".ui-slider-handle" ); + this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : { + left: event.pageX - offset.left - ( closestHandle.width() / 2 ), + top: event.pageY - offset.top - + ( closestHandle.height() / 2 ) - + ( parseInt( closestHandle.css("borderTopWidth"), 10 ) || 0 ) - + ( parseInt( closestHandle.css("borderBottomWidth"), 10 ) || 0) + + ( parseInt( closestHandle.css("marginTop"), 10 ) || 0) + }; + + if ( !this.handles.hasClass( "ui-state-hover" ) ) { + this._slide( event, index, normValue ); + } + this._animateOff = true; + return true; + }, + + _mouseStart: function() { + return true; + }, + + _mouseDrag: function( event ) { + var position = { x: event.pageX, y: event.pageY }, + normValue = this._normValueFromMouse( position ); + + this._slide( event, this._handleIndex, normValue ); + + return false; + }, + + _mouseStop: function( event ) { + this.handles.removeClass( "ui-state-active" ); + this._mouseSliding = false; + + this._stop( event, this._handleIndex ); + this._change( event, this._handleIndex ); + + this._handleIndex = null; + this._clickOffset = null; + this._animateOff = false; + + return false; + }, + + _detectOrientation: function() { + this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal"; + }, + + _normValueFromMouse: function( position ) { + var pixelTotal, + pixelMouse, + percentMouse, + valueTotal, + valueMouse; + + if ( this.orientation === "horizontal" ) { + pixelTotal = this.elementSize.width; + pixelMouse = position.x - this.elementOffset.left - ( this._clickOffset ? this._clickOffset.left : 0 ); + } else { + pixelTotal = this.elementSize.height; + pixelMouse = position.y - this.elementOffset.top - ( this._clickOffset ? this._clickOffset.top : 0 ); + } + + percentMouse = ( pixelMouse / pixelTotal ); + if ( percentMouse > 1 ) { + percentMouse = 1; + } + if ( percentMouse < 0 ) { + percentMouse = 0; + } + if ( this.orientation === "vertical" ) { + percentMouse = 1 - percentMouse; + } + + valueTotal = this._valueMax() - this._valueMin(); + valueMouse = this._valueMin() + percentMouse * valueTotal; + + return this._trimAlignValue( valueMouse ); + }, + + _start: function( event, index ) { + var uiHash = { + handle: this.handles[ index ], + value: this.value() + }; + if ( this.options.values && this.options.values.length ) { + uiHash.value = this.values( index ); + uiHash.values = this.values(); + } + return this._trigger( "start", event, uiHash ); + }, + + _slide: function( event, index, newVal ) { + var otherVal, + newValues, + allowed; + + if ( this.options.values && this.options.values.length ) { + otherVal = this.values( index ? 0 : 1 ); + + if ( ( this.options.values.length === 2 && this.options.range === true ) && + ( ( index === 0 && newVal > otherVal) || ( index === 1 && newVal < otherVal ) ) + ) { + newVal = otherVal; + } + + if ( newVal !== this.values( index ) ) { + newValues = this.values(); + newValues[ index ] = newVal; + // A slide can be canceled by returning false from the slide callback + allowed = this._trigger( "slide", event, { + handle: this.handles[ index ], + value: newVal, + values: newValues + } ); + otherVal = this.values( index ? 0 : 1 ); + if ( allowed !== false ) { + this.values( index, newVal, true ); + } + } + } else { + if ( newVal !== this.value() ) { + // A slide can be canceled by returning false from the slide callback + allowed = this._trigger( "slide", event, { + handle: this.handles[ index ], + value: newVal + } ); + if ( allowed !== false ) { + this.value( newVal ); + } + } + } + }, + + _stop: function( event, index ) { + var uiHash = { + handle: this.handles[ index ], + value: this.value() + }; + if ( this.options.values && this.options.values.length ) { + uiHash.value = this.values( index ); + uiHash.values = this.values(); + } + + this._trigger( "stop", event, uiHash ); + }, + + _change: function( event, index ) { + if ( !this._keySliding && !this._mouseSliding ) { + var uiHash = { + handle: this.handles[ index ], + value: this.value() + }; + if ( this.options.values && this.options.values.length ) { + uiHash.value = this.values( index ); + uiHash.values = this.values(); + } + + this._trigger( "change", event, uiHash ); + } + }, + + value: function( newValue ) { + if ( arguments.length ) { + this.options.value = this._trimAlignValue( newValue ); + this._refreshValue(); + this._change( null, 0 ); + return; + } + + return this._value(); + }, + + values: function( index, newValue ) { + var vals, + newValues, + i; + + if ( arguments.length > 1 ) { + this.options.values[ index ] = this._trimAlignValue( newValue ); + this._refreshValue(); + this._change( null, index ); + return; + } + + if ( arguments.length ) { + if ( $.isArray( arguments[ 0 ] ) ) { + vals = this.options.values; + newValues = arguments[ 0 ]; + for ( i = 0; i < vals.length; i += 1 ) { + vals[ i ] = this._trimAlignValue( newValues[ i ] ); + this._change( null, i ); + } + this._refreshValue(); + } else { + if ( this.options.values && this.options.values.length ) { + return this._values( index ); + } else { + return this.value(); + } + } + } else { + return this._values(); + } + }, + + _setOption: function( key, value ) { + var i, + valsLength = 0; + + if ( $.isArray( this.options.values ) ) { + valsLength = this.options.values.length; + } + + $.Widget.prototype._setOption.apply( this, arguments ); + + switch ( key ) { + case "disabled": + if ( value ) { + this.handles.filter( ".ui-state-focus" ).blur(); + this.handles.removeClass( "ui-state-hover" ); + this.handles.prop( "disabled", true ); + this.element.addClass( "ui-disabled" ); + } else { + this.handles.prop( "disabled", false ); + this.element.removeClass( "ui-disabled" ); + } + break; + case "orientation": + this._detectOrientation(); + this.element + .removeClass( "ui-slider-horizontal ui-slider-vertical" ) + .addClass( "ui-slider-" + this.orientation ); + this._refreshValue(); + break; + case "value": + this._animateOff = true; + this._refreshValue(); + this._change( null, 0 ); + this._animateOff = false; + break; + case "values": + this._animateOff = true; + this._refreshValue(); + for ( i = 0; i < valsLength; i += 1 ) { + this._change( null, i ); + } + this._animateOff = false; + break; + case "min": + case "max": + this._animateOff = true; + this._refreshValue(); + this._animateOff = false; + break; + } + }, + + //internal value getter + // _value() returns value trimmed by min and max, aligned by step + _value: function() { + var val = this.options.value; + val = this._trimAlignValue( val ); + + return val; + }, + + //internal values getter + // _values() returns array of values trimmed by min and max, aligned by step + // _values( index ) returns single value trimmed by min and max, aligned by step + _values: function( index ) { + var val, + vals, + i; + + if ( arguments.length ) { + val = this.options.values[ index ]; + val = this._trimAlignValue( val ); + + return val; + } else { + // .slice() creates a copy of the array + // this copy gets trimmed by min and max and then returned + vals = this.options.values.slice(); + for ( i = 0; i < vals.length; i+= 1) { + vals[ i ] = this._trimAlignValue( vals[ i ] ); + } + + return vals; + } + }, + + // returns the step-aligned value that val is closest to, between (inclusive) min and max + _trimAlignValue: function( val ) { + if ( val <= this._valueMin() ) { + return this._valueMin(); + } + if ( val >= this._valueMax() ) { + return this._valueMax(); + } + var step = ( this.options.step > 0 ) ? this.options.step : 1, + valModStep = (val - this._valueMin()) % step, + alignValue = val - valModStep; + + if ( Math.abs(valModStep) * 2 >= step ) { + alignValue += ( valModStep > 0 ) ? step : ( -step ); + } + + // Since JavaScript has problems with large floats, round + // the final value to 5 digits after the decimal point (see #4124) + return parseFloat( alignValue.toFixed(5) ); + }, + + _valueMin: function() { + return this.options.min; + }, + + _valueMax: function() { + return this.options.max; + }, + + _refreshValue: function() { + var lastValPercent, valPercent, value, valueMin, valueMax, + oRange = this.options.range, + o = this.options, + that = this, + animate = ( !this._animateOff ) ? o.animate : false, + _set = {}; + + if ( this.options.values && this.options.values.length ) { + this.handles.each(function( i ) { + valPercent = ( that.values(i) - that._valueMin() ) / ( that._valueMax() - that._valueMin() ) * 100; + _set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%"; + $( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate ); + if ( that.options.range === true ) { + if ( that.orientation === "horizontal" ) { + if ( i === 0 ) { + that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { left: valPercent + "%" }, o.animate ); + } + if ( i === 1 ) { + that.range[ animate ? "animate" : "css" ]( { width: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } ); + } + } else { + if ( i === 0 ) { + that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { bottom: ( valPercent ) + "%" }, o.animate ); + } + if ( i === 1 ) { + that.range[ animate ? "animate" : "css" ]( { height: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } ); + } + } + } + lastValPercent = valPercent; + }); + } else { + value = this.value(); + valueMin = this._valueMin(); + valueMax = this._valueMax(); + valPercent = ( valueMax !== valueMin ) ? + ( value - valueMin ) / ( valueMax - valueMin ) * 100 : + 0; + _set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%"; + this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate ); + + if ( oRange === "min" && this.orientation === "horizontal" ) { + this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { width: valPercent + "%" }, o.animate ); + } + if ( oRange === "max" && this.orientation === "horizontal" ) { + this.range[ animate ? "animate" : "css" ]( { width: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } ); + } + if ( oRange === "min" && this.orientation === "vertical" ) { + this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { height: valPercent + "%" }, o.animate ); + } + if ( oRange === "max" && this.orientation === "vertical" ) { + this.range[ animate ? "animate" : "css" ]( { height: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } ); + } + } + } + +}); + +}(jQuery)); diff --git a/resources/lib/jquery.ui/jquery.ui.sortable.js b/resources/lib/jquery.ui/jquery.ui.sortable.js new file mode 100644 index 00000000..bd960df3 --- /dev/null +++ b/resources/lib/jquery.ui/jquery.ui.sortable.js @@ -0,0 +1,1096 @@ +/*! + * jQuery UI Sortable 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/sortable/ + * + * Depends: + * jquery.ui.core.js + * jquery.ui.mouse.js + * jquery.ui.widget.js + */ +(function( $, undefined ) { + +$.widget("ui.sortable", $.ui.mouse, { + version: "1.9.2", + widgetEventPrefix: "sort", + ready: false, + options: { + appendTo: "parent", + axis: false, + connectWith: false, + containment: false, + cursor: 'auto', + cursorAt: false, + dropOnEmpty: true, + forcePlaceholderSize: false, + forceHelperSize: false, + grid: false, + handle: false, + helper: "original", + items: '> *', + opacity: false, + placeholder: false, + revert: false, + scroll: true, + scrollSensitivity: 20, + scrollSpeed: 20, + scope: "default", + tolerance: "intersect", + zIndex: 1000 + }, + _create: function() { + + var o = this.options; + this.containerCache = {}; + this.element.addClass("ui-sortable"); + + //Get the items + this.refresh(); + + //Let's determine if the items are being displayed horizontally + this.floating = this.items.length ? o.axis === 'x' || (/left|right/).test(this.items[0].item.css('float')) || (/inline|table-cell/).test(this.items[0].item.css('display')) : false; + + //Let's determine the parent's offset + this.offset = this.element.offset(); + + //Initialize mouse events for interaction + this._mouseInit(); + + //We're ready to go + this.ready = true + + }, + + _destroy: function() { + this.element + .removeClass("ui-sortable ui-sortable-disabled"); + this._mouseDestroy(); + + for ( var i = this.items.length - 1; i >= 0; i-- ) + this.items[i].item.removeData(this.widgetName + "-item"); + + return this; + }, + + _setOption: function(key, value){ + if ( key === "disabled" ) { + this.options[ key ] = value; + + 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(this, arguments); + } + }, + + _mouseCapture: function(event, overrideHandle) { + var that = this; + + if (this.reverting) { + return false; + } + + if(this.options.disabled || this.options.type == 'static') return false; + + //We have to refresh the items data once first + this._refreshItems(event); + + //Find out if the clicked node (or one of its parents) is a actual item in this.items + var currentItem = null, nodes = $(event.target).parents().each(function() { + if($.data(this, that.widgetName + '-item') == that) { + currentItem = $(this); + return false; + } + }); + if($.data(event.target, that.widgetName + '-item') == that) currentItem = $(event.target); + + if(!currentItem) return false; + if(this.options.handle && !overrideHandle) { + var validHandle = false; + + $(this.options.handle, currentItem).find("*").andSelf().each(function() { if(this == event.target) validHandle = true; }); + if(!validHandle) return false; + } + + this.currentItem = currentItem; + this._removeCurrentsFromItems(); + return true; + + }, + + _mouseStart: function(event, overrideHandle, noActivation) { + + var o = this.options; + this.currentContainer = this; + + //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture + this.refreshPositions(); + + //Create and append the visible helper + this.helper = this._createHelper(event); + + //Cache the helper size + this._cacheHelperProportions(); + + /* + * - Position generation - + * This block generates everything position related - it's the core of draggables. + */ + + //Cache the margins of the original element + this._cacheMargins(); + + //Get the next scrolling parent + this.scrollParent = this.helper.scrollParent(); + + //The element's absolute position on the page minus margins + this.offset = this.currentItem.offset(); + this.offset = { + top: this.offset.top - this.margins.top, + left: this.offset.left - this.margins.left + }; + + $.extend(this.offset, { + click: { //Where the click happened, relative to the element + left: event.pageX - this.offset.left, + top: event.pageY - this.offset.top + }, + parent: this._getParentOffset(), + relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper + }); + + // Only after we got the offset, we can change the helper's position to absolute + // TODO: Still need to figure out a way to make relative sorting possible + this.helper.css("position", "absolute"); + this.cssPosition = this.helper.css("position"); + + //Generate the original position + this.originalPosition = this._generatePosition(event); + this.originalPageX = event.pageX; + this.originalPageY = event.pageY; + + //Adjust the mouse offset relative to the helper if 'cursorAt' is supplied + (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt)); + + //Cache the former DOM position + this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] }; + + //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 + if(this.helper[0] != this.currentItem[0]) { + this.currentItem.hide(); + } + + //Create the placeholder + this._createPlaceholder(); + + //Set a containment if given in the options + if(o.containment) + this._setContainment(); + + if(o.cursor) { // cursor option + if ($('body').css("cursor")) this._storedCursor = $('body').css("cursor"); + $('body').css("cursor", o.cursor); + } + + if(o.opacity) { // opacity option + if (this.helper.css("opacity")) this._storedOpacity = this.helper.css("opacity"); + this.helper.css("opacity", o.opacity); + } + + if(o.zIndex) { // zIndex option + if (this.helper.css("zIndex")) this._storedZIndex = this.helper.css("zIndex"); + this.helper.css("zIndex", o.zIndex); + } + + //Prepare scrolling + if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML') + this.overflowOffset = this.scrollParent.offset(); + + //Call callbacks + this._trigger("start", event, this._uiHash()); + + //Recache the helper size + if(!this._preserveHelperProportions) + this._cacheHelperProportions(); + + + //Post 'activate' events to possible containers + if(!noActivation) { + for (var i = this.containers.length - 1; i >= 0; i--) { this.containers[i]._trigger("activate", event, this._uiHash(this)); } + } + + //Prepare possible droppables + if($.ui.ddmanager) + $.ui.ddmanager.current = this; + + if ($.ui.ddmanager && !o.dropBehaviour) + $.ui.ddmanager.prepareOffsets(this, event); + + this.dragging = true; + + this.helper.addClass("ui-sortable-helper"); + this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position + return true; + + }, + + _mouseDrag: function(event) { + + //Compute the helpers position + this.position = this._generatePosition(event); + this.positionAbs = this._convertPositionTo("absolute"); + + if (!this.lastPositionAbs) { + this.lastPositionAbs = this.positionAbs; + } + + //Do scrolling + if(this.options.scroll) { + var o = this.options, scrolled = false; + if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML') { + + if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) + this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed; + else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity) + this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed; + + if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) + this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed; + else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity) + this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed; + + } else { + + if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) + scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed); + else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) + scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed); + + if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) + scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed); + else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) + scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed); + + } + + if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) + $.ui.ddmanager.prepareOffsets(this, event); + } + + //Regenerate the absolute position used for position checks + this.positionAbs = this._convertPositionTo("absolute"); + + //Set the helper position + if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px'; + if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px'; + + //Rearrange + for (var i = this.items.length - 1; i >= 0; i--) { + + //Cache variables and intersection, continue if no intersection + var item = this.items[i], itemElement = item.item[0], intersection = this._intersectsWithPointer(item); + if (!intersection) continue; + + // Only put the placeholder inside the current Container, skip all + // items form other containers. This works because when moving + // an item from one container to another the + // currentContainer is switched before the placeholder is moved. + // + // Without this moving items in "sub-sortables" can cause the placeholder to jitter + // beetween the outer and inner container. + if (item.instance !== this.currentContainer) continue; + + 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 + && !$.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 + ) { + + this.direction = intersection == 1 ? "down" : "up"; + + if (this.options.tolerance == "pointer" || this._intersectsWithSides(item)) { + this._rearrange(event, item); + } else { + break; + } + + this._trigger("change", event, this._uiHash()); + break; + } + } + + //Post events to containers + this._contactContainers(event); + + //Interconnect with droppables + if($.ui.ddmanager) $.ui.ddmanager.drag(this, event); + + //Call callbacks + this._trigger('sort', event, this._uiHash()); + + this.lastPositionAbs = this.positionAbs; + return false; + + }, + + _mouseStop: function(event, noPropagation) { + + if(!event) return; + + //If we are using droppables, inform the manager about the drop + if ($.ui.ddmanager && !this.options.dropBehaviour) + $.ui.ddmanager.drop(this, event); + + if(this.options.revert) { + var that = this; + var cur = this.placeholder.offset(); + + this.reverting = true; + + $(this.helper).animate({ + left: cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft), + top: cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop) + }, parseInt(this.options.revert, 10) || 500, function() { + that._clear(event); + }); + } else { + this._clear(event, noPropagation); + } + + return false; + + }, + + cancel: function() { + + if(this.dragging) { + + this._mouseUp({ target: null }); + + if(this.options.helper == "original") + this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); + else + this.currentItem.show(); + + //Post deactivating events to containers + for (var i = this.containers.length - 1; i >= 0; i--){ + this.containers[i]._trigger("deactivate", null, this._uiHash(this)); + if(this.containers[i].containerCache.over) { + this.containers[i]._trigger("out", null, this._uiHash(this)); + this.containers[i].containerCache.over = 0; + } + } + + } + + if (this.placeholder) { + //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node! + if(this.placeholder[0].parentNode) this.placeholder[0].parentNode.removeChild(this.placeholder[0]); + if(this.options.helper != "original" && this.helper && this.helper[0].parentNode) this.helper.remove(); + + $.extend(this, { + helper: null, + dragging: false, + reverting: false, + _noFinalSort: null + }); + + if(this.domPosition.prev) { + $(this.domPosition.prev).after(this.currentItem); + } else { + $(this.domPosition.parent).prepend(this.currentItem); + } + } + + return this; + + }, + + serialize: function(o) { + + var items = this._getItemsAsjQuery(o && o.connected); + var str = []; o = o || {}; + + $(items).each(function() { + var res = ($(o.item || this).attr(o.attribute || 'id') || '').match(o.expression || (/(.+)[-=_](.+)/)); + 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('&'); + + }, + + toArray: function(o) { + + var items = this._getItemsAsjQuery(o && o.connected); + var ret = []; o = o || {}; + + items.each(function() { ret.push($(o.item || this).attr(o.attribute || 'id') || ''); }); + return ret; + + }, + + /* Be careful with the following core functions */ + _intersectsWith: function(item) { + + var x1 = this.positionAbs.left, + x2 = x1 + this.helperProportions.width, + y1 = this.positionAbs.top, + y2 = y1 + this.helperProportions.height; + + var l = item.left, + r = l + item.width, + t = item.top, + b = t + item.height; + + var dyClick = this.offset.click.top, + dxClick = this.offset.click.left; + + var isOverElement = (y1 + dyClick) > t && (y1 + dyClick) < b && (x1 + dxClick) > l && (x1 + dxClick) < r; + + if( this.options.tolerance == "pointer" + || this.options.forcePointerForContainers + || (this.options.tolerance != "pointer" && this.helperProportions[this.floating ? 'width' : 'height'] > item[this.floating ? 'width' : 'height']) + ) { + return isOverElement; + } else { + + return (l < x1 + (this.helperProportions.width / 2) // Right Half + && x2 - (this.helperProportions.width / 2) < r // Left Half + && t < y1 + (this.helperProportions.height / 2) // Bottom Half + && y2 - (this.helperProportions.height / 2) < b ); // Top Half + + } + }, + + _intersectsWithPointer: function(item) { + + var isOverElementHeight = (this.options.axis === 'x') || $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height), + isOverElementWidth = (this.options.axis === 'y') || $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width), + isOverElement = isOverElementHeight && isOverElementWidth, + verticalDirection = this._getDragVerticalDirection(), + horizontalDirection = this._getDragHorizontalDirection(); + + if (!isOverElement) + return false; + + return this.floating ? + ( ((horizontalDirection && horizontalDirection == "right") || verticalDirection == "down") ? 2 : 1 ) + : ( verticalDirection && (verticalDirection == "down" ? 2 : 1) ); + + }, + + _intersectsWithSides: function(item) { + + var isOverBottomHalf = $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height), + isOverRightHalf = $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width), + verticalDirection = this._getDragVerticalDirection(), + horizontalDirection = this._getDragHorizontalDirection(); + + if (this.floating && horizontalDirection) { + return ((horizontalDirection == "right" && isOverRightHalf) || (horizontalDirection == "left" && !isOverRightHalf)); + } else { + return verticalDirection && ((verticalDirection == "down" && isOverBottomHalf) || (verticalDirection == "up" && !isOverBottomHalf)); + } + + }, + + _getDragVerticalDirection: function() { + var delta = this.positionAbs.top - this.lastPositionAbs.top; + return delta != 0 && (delta > 0 ? "down" : "up"); + }, + + _getDragHorizontalDirection: function() { + var delta = this.positionAbs.left - this.lastPositionAbs.left; + return delta != 0 && (delta > 0 ? "right" : "left"); + }, + + refresh: function(event) { + this._refreshItems(event); + this.refreshPositions(); + return this; + }, + + _connectWith: function() { + var options = this.options; + return options.connectWith.constructor == String + ? [options.connectWith] + : options.connectWith; + }, + + _getItemsAsjQuery: function(connected) { + + var items = []; + var queries = []; + var connectWith = this._connectWith(); + + if(connectWith && connected) { + for (var i = connectWith.length - 1; i >= 0; i--){ + var cur = $(connectWith[i]); + for (var j = cur.length - 1; j >= 0; j--){ + var inst = $.data(cur[j], this.widgetName); + if(inst && inst != this && !inst.options.disabled) { + 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]); + } + }; + }; + } + + 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]); + + for (var i = queries.length - 1; i >= 0; i--){ + queries[i][0].each(function() { + items.push(this); + }); + }; + + return $(items); + + }, + + _removeCurrentsFromItems: function() { + + var list = this.currentItem.find(":data(" + this.widgetName + "-item)"); + + this.items = $.grep(this.items, function (item) { + for (var j=0; j < list.length; j++) { + if(list[j] == item.item[0]) + return false; + }; + return true; + }); + + }, + + _refreshItems: function(event) { + + this.items = []; + this.containers = [this]; + var items = this.items; + var queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]]; + var connectWith = this._connectWith(); + + if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down + for (var i = connectWith.length - 1; i >= 0; i--){ + var cur = $(connectWith[i]); + for (var j = cur.length - 1; j >= 0; j--){ + var inst = $.data(cur[j], this.widgetName); + if(inst && inst != this && !inst.options.disabled) { + queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]); + this.containers.push(inst); + } + }; + }; + } + + for (var i = queries.length - 1; i >= 0; i--) { + var targetData = queries[i][1]; + var _queries = queries[i][0]; + + for (var j=0, queriesLength = _queries.length; j < queriesLength; j++) { + var item = $(_queries[j]); + + item.data(this.widgetName + '-item', targetData); // Data for target checking (mouse manager) + + items.push({ + item: item, + instance: targetData, + width: 0, height: 0, + left: 0, top: 0 + }); + }; + }; + + }, + + refreshPositions: function(fast) { + + //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change + if(this.offsetParent && this.helper) { + this.offset.parent = this._getParentOffset(); + } + + for (var i = this.items.length - 1; i >= 0; i--){ + var item = this.items[i]; + + //We ignore calculating positions of all connected containers when we're not over them + if(item.instance != this.currentContainer && this.currentContainer && item.item[0] != this.currentItem[0]) + continue; + + var t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item; + + if (!fast) { + item.width = t.outerWidth(); + item.height = t.outerHeight(); + } + + var p = t.offset(); + item.left = p.left; + item.top = p.top; + }; + + if(this.options.custom && this.options.custom.refreshContainers) { + this.options.custom.refreshContainers.call(this); + } else { + for (var i = this.containers.length - 1; i >= 0; i--){ + var p = this.containers[i].element.offset(); + this.containers[i].containerCache.left = p.left; + this.containers[i].containerCache.top = p.top; + this.containers[i].containerCache.width = this.containers[i].element.outerWidth(); + this.containers[i].containerCache.height = this.containers[i].element.outerHeight(); + }; + } + + return this; + }, + + _createPlaceholder: function(that) { + that = that || this; + var o = that.options; + + if(!o.placeholder || o.placeholder.constructor == String) { + var className = o.placeholder; + o.placeholder = { + element: function() { + + var el = $(document.createElement(that.currentItem[0].nodeName)) + .addClass(className || that.currentItem[0].className+" ui-sortable-placeholder") + .removeClass("ui-sortable-helper")[0]; + + if(!className) + el.style.visibility = "hidden"; + + return el; + }, + update: function(container, p) { + + // 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that + // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified + if(className && !o.forcePlaceholderSize) return; + + //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 + if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css('paddingTop')||0, 10) - parseInt(that.currentItem.css('paddingBottom')||0, 10)); }; + if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css('paddingLeft')||0, 10) - parseInt(that.currentItem.css('paddingRight')||0, 10)); }; + } + }; + } + + //Create the placeholder + that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem)); + + //Append it after the actual current item + that.currentItem.after(that.placeholder); + + //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317) + o.placeholder.update(that, that.placeholder); + + }, + + _contactContainers: function(event) { + + // get innermost container that intersects with item + var innermostContainer = null, innermostIndex = null; + + + for (var i = this.containers.length - 1; i >= 0; i--){ + + // never consider a container that's located within the item itself + 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 && $.contains(this.containers[i].element[0], innermostContainer.element[0])) + continue; + + innermostContainer = this.containers[i]; + innermostIndex = i; + + } else { + // container doesn't intersect. trigger "out" event if necessary + if(this.containers[i].containerCache.over) { + this.containers[i]._trigger("out", event, this._uiHash(this)); + this.containers[i].containerCache.over = 0; + } + } + + } + + // if no intersecting containers found, return + if(!innermostContainer) return; + + // move the item into the container if it's not there already + if(this.containers.length === 1) { + this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); + this.containers[innermostIndex].containerCache.over = 1; + } else { + + //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 posProperty = this.containers[innermostIndex].floating ? 'left' : 'top'; + var sizeProperty = this.containers[innermostIndex].floating ? 'width' : 'height'; + var base = this.positionAbs[posProperty] + this.offset.click[posProperty]; + for (var j = this.items.length - 1; j >= 0; j--) { + if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) continue; + if(this.items[j].item[0] == this.currentItem[0]) continue; + var cur = this.items[j].item.offset()[posProperty]; + var nearBottom = false; + if(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] - base)){ + nearBottom = true; + cur += this.items[j][sizeProperty]; + } + + if(Math.abs(cur - base) < dist) { + dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j]; + this.direction = nearBottom ? "up": "down"; + } + } + + if(!itemWithLeastDistance && !this.options.dropOnEmpty) //Check if dropOnEmpty is enabled + return; + + this.currentContainer = this.containers[innermostIndex]; + itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true); + this._trigger("change", event, this._uiHash()); + this.containers[innermostIndex]._trigger("change", event, this._uiHash(this)); + + //Update the placeholder + this.options.placeholder.update(this.currentContainer, this.placeholder); + + this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); + this.containers[innermostIndex].containerCache.over = 1; + } + + + }, + + _createHelper: function(event) { + + var o = this.options; + var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper == 'clone' ? this.currentItem.clone() : this.currentItem); + + if(!helper.parents('body').length) //Add the helper to the DOM if that didn't happen already + $(o.appendTo != 'parent' ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]); + + if(helper[0] == this.currentItem[0]) + 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") }; + + if(helper[0].style.width == '' || o.forceHelperSize) helper.width(this.currentItem.width()); + if(helper[0].style.height == '' || o.forceHelperSize) helper.height(this.currentItem.height()); + + return helper; + + }, + + _adjustOffsetFromHelper: function(obj) { + if (typeof obj == 'string') { + obj = obj.split(' '); + } + if ($.isArray(obj)) { + obj = {left: +obj[0], top: +obj[1] || 0}; + } + if ('left' in obj) { + this.offset.click.left = obj.left + this.margins.left; + } + if ('right' in obj) { + this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; + } + if ('top' in obj) { + this.offset.click.top = obj.top + this.margins.top; + } + if ('bottom' in obj) { + this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; + } + }, + + _getParentOffset: function() { + + + //Get the offsetParent and cache its position + this.offsetParent = this.helper.offsetParent(); + var po = this.offsetParent.offset(); + + // This is a special case where we need to modify a offset calculated on start, since the following happened: + // 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 && $.contains(this.scrollParent[0], this.offsetParent[0])) { + po.left += this.scrollParent.scrollLeft(); + po.top += this.scrollParent.scrollTop(); + } + + if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information + || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.ui.ie)) //Ugly IE fix + po = { top: 0, left: 0 }; + + return { + top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0), + left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0) + }; + + }, + + _getRelativeOffset: function() { + + if(this.cssPosition == "relative") { + var p = this.currentItem.position(); + return { + top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(), + left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft() + }; + } else { + return { top: 0, left: 0 }; + } + + }, + + _cacheMargins: function() { + this.margins = { + left: (parseInt(this.currentItem.css("marginLeft"),10) || 0), + top: (parseInt(this.currentItem.css("marginTop"),10) || 0) + }; + }, + + _cacheHelperProportions: function() { + this.helperProportions = { + width: this.helper.outerWidth(), + height: this.helper.outerHeight() + }; + }, + + _setContainment: function() { + + 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 + ]; + + if(!(/^(document|window|parent)$/).test(o.containment)) { + var ce = $(o.containment)[0]; + var co = $(o.containment).offset(); + var over = ($(ce).css("overflow") != 'hidden'); + + this.containment = [ + co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left, + co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top, + 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, + 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 + ]; + } + + }, + + _convertPositionTo: function(d, pos) { + + if(!pos) pos = this.position; + var mod = d == "absolute" ? 1 : -1; + 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: ( + pos.top // The absolute mouse position + + this.offset.relative.top * mod // Only for relative positioned nodes: Relative offset from element to offset parent + + this.offset.parent.top * mod // The offsetParent's offset without borders (offset + border) + - ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod) + ), + left: ( + pos.left // The absolute mouse position + + this.offset.relative.left * mod // Only for relative positioned nodes: Relative offset from element to offset parent + + this.offset.parent.left * mod // The offsetParent's offset without borders (offset + border) + - ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod) + ) + }; + + }, + + _generatePosition: function(event) { + + 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 + // 2. and the scroll parent is the document or similar to the offset parent + // we have to refresh the relative offset during the scroll so there are no jumps + if(this.cssPosition == 'relative' && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0])) { + this.offset.relative = this._getRelativeOffset(); + } + + var pageX = event.pageX; + var pageY = event.pageY; + + /* + * - Position constraining - + * Constrain the position to a mix of grid, containment. + */ + + if(this.originalPosition) { //If we are not dragging yet, we won't check for options + + if(this.containment) { + if(event.pageX - this.offset.click.left < this.containment[0]) pageX = this.containment[0] + this.offset.click.left; + if(event.pageY - this.offset.click.top < this.containment[1]) pageY = this.containment[1] + this.offset.click.top; + if(event.pageX - this.offset.click.left > this.containment[2]) pageX = this.containment[2] + this.offset.click.left; + if(event.pageY - this.offset.click.top > this.containment[3]) pageY = this.containment[3] + this.offset.click.top; + } + + if(o.grid) { + var top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1]; + 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; + + var left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0]; + 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; + } + + } + + return { + top: ( + pageY // The absolute mouse position + - this.offset.click.top // Click offset (relative to the element) + - this.offset.relative.top // Only for relative positioned nodes: Relative offset from element to offset parent + - this.offset.parent.top // The offsetParent's offset without borders (offset + border) + + ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) )) + ), + left: ( + pageX // The absolute mouse position + - this.offset.click.left // Click offset (relative to the element) + - this.offset.relative.left // Only for relative positioned nodes: Relative offset from element to offset parent + - this.offset.parent.left // The offsetParent's offset without borders (offset + border) + + ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() )) + ) + }; + + }, + + _rearrange: function(event, i, a, hardRefresh) { + + 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)); + + //Various things done here to improve the performance: + // 1. we create a setTimeout, that calls refreshPositions + // 2. on the instance, we have a counter variable, that get's higher after every append + // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same + // 4. this lets only the last addition to the timeout stack through + this.counter = this.counter ? ++this.counter : 1; + var counter = this.counter; + + this._delay(function() { + if(counter == this.counter) this.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove + }); + + }, + + _clear: function(event, noPropagation) { + + this.reverting = false; + // We delay all events that have to be triggered to after the point where the placeholder has been removed and + // everything else normalized again + var delayedTriggers = []; + + // We first have to update the dom position of the actual currentItem + // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088) + if(!this._noFinalSort && this.currentItem.parent().length) this.placeholder.before(this.currentItem); + this._noFinalSort = null; + + if(this.helper[0] == this.currentItem[0]) { + for(var i in this._storedCSS) { + if(this._storedCSS[i] == 'auto' || this._storedCSS[i] == 'static') this._storedCSS[i] = ''; + } + this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); + } else { + this.currentItem.show(); + } + + 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 + + // Check if the items Container has Changed and trigger appropriate + // events. + if (this !== this.currentContainer) { + if(!noPropagation) { + delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); }); + delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.currentContainer)); + delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.currentContainer)); + } + } + + + //Post events to containers + for (var i = this.containers.length - 1; i >= 0; i--){ + if(!noPropagation) delayedTriggers.push((function(c) { return function(event) { c._trigger("deactivate", event, this._uiHash(this)); }; }).call(this, this.containers[i])); + if(this.containers[i].containerCache.over) { + delayedTriggers.push((function(c) { return function(event) { c._trigger("out", event, this._uiHash(this)); }; }).call(this, this.containers[i])); + this.containers[i].containerCache.over = 0; + } + } + + //Do what was originally in plugins + if(this._storedCursor) $('body').css("cursor", this._storedCursor); //Reset cursor + if(this._storedOpacity) this.helper.css("opacity", this._storedOpacity); //Reset opacity + if(this._storedZIndex) this.helper.css("zIndex", this._storedZIndex == 'auto' ? '' : this._storedZIndex); //Reset z-index + + this.dragging = false; + if(this.cancelHelperRemoval) { + if(!noPropagation) { + this._trigger("beforeStop", event, this._uiHash()); + for (var i=0; i < delayedTriggers.length; i++) { delayedTriggers[i].call(this, event); }; //Trigger all delayed events + this._trigger("stop", event, this._uiHash()); + } + + this.fromOutside = false; + return false; + } + + if(!noPropagation) this._trigger("beforeStop", event, this._uiHash()); + + //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node! + this.placeholder[0].parentNode.removeChild(this.placeholder[0]); + + if(this.helper[0] != this.currentItem[0]) this.helper.remove(); this.helper = null; + + if(!noPropagation) { + for (var i=0; i < delayedTriggers.length; i++) { delayedTriggers[i].call(this, event); }; //Trigger all delayed events + this._trigger("stop", event, this._uiHash()); + } + + this.fromOutside = false; + return true; + + }, + + _trigger: function() { + if ($.Widget.prototype._trigger.apply(this, arguments) === false) { + this.cancel(); + } + }, + + _uiHash: function(_inst) { + var inst = _inst || this; + return { + helper: inst.helper, + placeholder: inst.placeholder || $([]), + position: inst.position, + originalPosition: inst.originalPosition, + offset: inst.positionAbs, + item: inst.currentItem, + sender: _inst ? _inst.element : null + }; + } + +}); + +})(jQuery); diff --git a/resources/lib/jquery.ui/jquery.ui.spinner.js b/resources/lib/jquery.ui/jquery.ui.spinner.js new file mode 100644 index 00000000..98dc9dfe --- /dev/null +++ b/resources/lib/jquery.ui/jquery.ui.spinner.js @@ -0,0 +1,478 @@ +/*! + * jQuery UI Spinner 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/spinner/ + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + * jquery.ui.button.js + */ +(function( $ ) { + +function modifier( fn ) { + return function() { + var previous = this.element.val(); + fn.apply( this, arguments ); + this._refresh(); + if ( previous !== this.element.val() ) { + this._trigger( "change" ); + } + }; +} + +$.widget( "ui.spinner", { + version: "1.9.2", + defaultElement: "", + widgetEventPrefix: "spin", + options: { + culture: null, + icons: { + down: "ui-icon-triangle-1-s", + up: "ui-icon-triangle-1-n" + }, + incremental: true, + max: null, + min: null, + numberFormat: null, + page: 10, + step: 1, + + change: null, + spin: null, + start: null, + stop: null + }, + + _create: function() { + // handle string values that need to be parsed + this._setOption( "max", this.options.max ); + this._setOption( "min", this.options.min ); + this._setOption( "step", this.options.step ); + + // format the value, but don't constrain + this._value( this.element.val(), true ); + + this._draw(); + this._on( this._events ); + this._refresh(); + + // turning off autocomplete prevents the browser from remembering the + // value when navigating through history, so we re-enable autocomplete + // if the page is unloaded before the widget is destroyed. #7790 + this._on( this.window, { + beforeunload: function() { + this.element.removeAttr( "autocomplete" ); + } + }); + }, + + _getCreateOptions: function() { + var options = {}, + element = this.element; + + $.each( [ "min", "max", "step" ], function( i, option ) { + var value = element.attr( option ); + if ( value !== undefined && value.length ) { + options[ option ] = value; + } + }); + + return options; + }, + + _events: { + keydown: function( event ) { + if ( this._start( event ) && this._keydown( event ) ) { + event.preventDefault(); + } + }, + keyup: "_stop", + focus: function() { + this.previous = this.element.val(); + }, + blur: function( event ) { + if ( this.cancelBlur ) { + delete this.cancelBlur; + return; + } + + this._refresh(); + if ( this.previous !== this.element.val() ) { + this._trigger( "change", event ); + } + }, + mousewheel: function( event, delta ) { + if ( !delta ) { + return; + } + if ( !this.spinning && !this._start( event ) ) { + return false; + } + + this._spin( (delta > 0 ? 1 : -1) * this.options.step, event ); + clearTimeout( this.mousewheelTimer ); + this.mousewheelTimer = this._delay(function() { + if ( this.spinning ) { + this._stop( event ); + } + }, 100 ); + event.preventDefault(); + }, + "mousedown .ui-spinner-button": function( event ) { + var previous; + + // We never want the buttons to have focus; whenever the user is + // interacting with the spinner, the focus should be on the input. + // If the input is focused then this.previous is properly set from + // when the input first received focus. If the input is not focused + // then we need to set this.previous based on the value before spinning. + previous = this.element[0] === this.document[0].activeElement ? + this.previous : this.element.val(); + function checkFocus() { + var isActive = this.element[0] === this.document[0].activeElement; + if ( !isActive ) { + this.element.focus(); + this.previous = previous; + // support: IE + // IE sets focus asynchronously, so we need to check if focus + // moved off of the input because the user clicked on the button. + this._delay(function() { + this.previous = previous; + }); + } + } + + // ensure focus is on (or stays on) the text field + event.preventDefault(); + checkFocus.call( this ); + + // support: IE + // IE doesn't prevent moving focus even with event.preventDefault() + // so we set a flag to know when we should ignore the blur event + // and check (again) if focus moved off of the input. + this.cancelBlur = true; + this._delay(function() { + delete this.cancelBlur; + checkFocus.call( this ); + }); + + if ( this._start( event ) === false ) { + return; + } + + this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event ); + }, + "mouseup .ui-spinner-button": "_stop", + "mouseenter .ui-spinner-button": function( event ) { + // button will add ui-state-active if mouse was down while mouseleave and kept down + if ( !$( event.currentTarget ).hasClass( "ui-state-active" ) ) { + return; + } + + if ( this._start( event ) === false ) { + return false; + } + this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event ); + }, + // TODO: do we really want to consider this a stop? + // shouldn't we just stop the repeater and wait until mouseup before + // we trigger the stop event? + "mouseleave .ui-spinner-button": "_stop" + }, + + _draw: function() { + var uiSpinner = this.uiSpinner = this.element + .addClass( "ui-spinner-input" ) + .attr( "autocomplete", "off" ) + .wrap( this._uiSpinnerHtml() ) + .parent() + // add buttons + .append( this._buttonHtml() ); + + this.element.attr( "role", "spinbutton" ); + + // button bindings + this.buttons = uiSpinner.find( ".ui-spinner-button" ) + .attr( "tabIndex", -1 ) + .button() + .removeClass( "ui-corner-all" ); + + // IE 6 doesn't understand height: 50% for the buttons + // unless the wrapper has an explicit height + if ( this.buttons.height() > Math.ceil( uiSpinner.height() * 0.5 ) && + uiSpinner.height() > 0 ) { + uiSpinner.height( uiSpinner.height() ); + } + + // disable spinner if element was already disabled + if ( this.options.disabled ) { + this.disable(); + } + }, + + _keydown: function( event ) { + var options = this.options, + keyCode = $.ui.keyCode; + + switch ( event.keyCode ) { + case keyCode.UP: + this._repeat( null, 1, event ); + return true; + case keyCode.DOWN: + this._repeat( null, -1, event ); + return true; + case keyCode.PAGE_UP: + this._repeat( null, options.page, event ); + return true; + case keyCode.PAGE_DOWN: + this._repeat( null, -options.page, event ); + return true; + } + + return false; + }, + + _uiSpinnerHtml: function() { + return ""; + }, + + _buttonHtml: function() { + return "" + + "" + + "" + + "" + + "" + + "" + + ""; + }, + + _start: function( event ) { + if ( !this.spinning && this._trigger( "start", event ) === false ) { + return false; + } + + if ( !this.counter ) { + this.counter = 1; + } + this.spinning = true; + return true; + }, + + _repeat: function( i, steps, event ) { + i = i || 500; + + clearTimeout( this.timer ); + this.timer = this._delay(function() { + this._repeat( 40, steps, event ); + }, i ); + + this._spin( steps * this.options.step, event ); + }, + + _spin: function( step, event ) { + var value = this.value() || 0; + + if ( !this.counter ) { + this.counter = 1; + } + + value = this._adjustValue( value + step * this._increment( this.counter ) ); + + if ( !this.spinning || this._trigger( "spin", event, { value: value } ) !== false) { + this._value( value ); + this.counter++; + } + }, + + _increment: function( i ) { + var incremental = this.options.incremental; + + if ( incremental ) { + return $.isFunction( incremental ) ? + incremental( i ) : + Math.floor( i*i*i/50000 - i*i/500 + 17*i/200 + 1 ); + } + + return 1; + }, + + _precision: function() { + var precision = this._precisionOf( this.options.step ); + if ( this.options.min !== null ) { + precision = Math.max( precision, this._precisionOf( this.options.min ) ); + } + return precision; + }, + + _precisionOf: function( num ) { + var str = num.toString(), + decimal = str.indexOf( "." ); + return decimal === -1 ? 0 : str.length - decimal - 1; + }, + + _adjustValue: function( value ) { + var base, aboveMin, + options = this.options; + + // make sure we're at a valid step + // - find out where we are relative to the base (min or 0) + base = options.min !== null ? options.min : 0; + aboveMin = value - base; + // - round to the nearest step + aboveMin = Math.round(aboveMin / options.step) * options.step; + // - rounding is based on 0, so adjust back to our base + value = base + aboveMin; + + // fix precision from bad JS floating point math + value = parseFloat( value.toFixed( this._precision() ) ); + + // clamp the value + if ( options.max !== null && value > options.max) { + return options.max; + } + if ( options.min !== null && value < options.min ) { + return options.min; + } + + return value; + }, + + _stop: function( event ) { + if ( !this.spinning ) { + return; + } + + clearTimeout( this.timer ); + clearTimeout( this.mousewheelTimer ); + this.counter = 0; + this.spinning = false; + this._trigger( "stop", event ); + }, + + _setOption: function( key, value ) { + if ( key === "culture" || key === "numberFormat" ) { + var prevValue = this._parse( this.element.val() ); + this.options[ key ] = value; + this.element.val( this._format( prevValue ) ); + return; + } + + if ( key === "max" || key === "min" || key === "step" ) { + if ( typeof value === "string" ) { + value = this._parse( value ); + } + } + + this._super( key, value ); + + if ( key === "disabled" ) { + if ( value ) { + this.element.prop( "disabled", true ); + this.buttons.button( "disable" ); + } else { + this.element.prop( "disabled", false ); + this.buttons.button( "enable" ); + } + } + }, + + _setOptions: modifier(function( options ) { + this._super( options ); + this._value( this.element.val() ); + }), + + _parse: function( val ) { + if ( typeof val === "string" && val !== "" ) { + val = window.Globalize && this.options.numberFormat ? + Globalize.parseFloat( val, 10, this.options.culture ) : +val; + } + return val === "" || isNaN( val ) ? null : val; + }, + + _format: function( value ) { + if ( value === "" ) { + return ""; + } + return window.Globalize && this.options.numberFormat ? + Globalize.format( value, this.options.numberFormat, this.options.culture ) : + value; + }, + + _refresh: function() { + this.element.attr({ + "aria-valuemin": this.options.min, + "aria-valuemax": this.options.max, + // TODO: what should we do with values that can't be parsed? + "aria-valuenow": this._parse( this.element.val() ) + }); + }, + + // update the value without triggering change + _value: function( value, allowAny ) { + var parsed; + if ( value !== "" ) { + parsed = this._parse( value ); + if ( parsed !== null ) { + if ( !allowAny ) { + parsed = this._adjustValue( parsed ); + } + value = this._format( parsed ); + } + } + this.element.val( value ); + this._refresh(); + }, + + _destroy: function() { + this.element + .removeClass( "ui-spinner-input" ) + .prop( "disabled", false ) + .removeAttr( "autocomplete" ) + .removeAttr( "role" ) + .removeAttr( "aria-valuemin" ) + .removeAttr( "aria-valuemax" ) + .removeAttr( "aria-valuenow" ); + this.uiSpinner.replaceWith( this.element ); + }, + + stepUp: modifier(function( steps ) { + this._stepUp( steps ); + }), + _stepUp: function( steps ) { + this._spin( (steps || 1) * this.options.step ); + }, + + stepDown: modifier(function( steps ) { + this._stepDown( steps ); + }), + _stepDown: function( steps ) { + this._spin( (steps || 1) * -this.options.step ); + }, + + pageUp: modifier(function( pages ) { + this._stepUp( (pages || 1) * this.options.page ); + }), + + pageDown: modifier(function( pages ) { + this._stepDown( (pages || 1) * this.options.page ); + }), + + value: function( newVal ) { + if ( !arguments.length ) { + return this._parse( this.element.val() ); + } + modifier( this._value ).call( this, newVal ); + }, + + widget: function() { + return this.uiSpinner; + } +}); + +}( jQuery ) ); diff --git a/resources/lib/jquery.ui/jquery.ui.tabs.js b/resources/lib/jquery.ui/jquery.ui.tabs.js new file mode 100644 index 00000000..6ea164eb --- /dev/null +++ b/resources/lib/jquery.ui/jquery.ui.tabs.js @@ -0,0 +1,1366 @@ +/*! + * jQuery UI Tabs 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/tabs/ + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + */ +(function( $, undefined ) { + +var tabId = 0, + rhash = /#.*$/; + +function getNextTabId() { + return ++tabId; +} + +function isLocal( anchor ) { + return anchor.hash.length > 1 && + anchor.href.replace( rhash, "" ) === + location.href.replace( rhash, "" ) + // support: Safari 5.1 + // Safari 5.1 doesn't encode spaces in window.location + // but it does encode spaces from anchors (#8777) + .replace( /\s/g, "%20" ); +} + +$.widget( "ui.tabs", { + version: "1.9.2", + delay: 300, + options: { + active: null, + collapsible: false, + event: "click", + heightStyle: "content", + hide: null, + show: null, + + // callbacks + activate: null, + beforeActivate: null, + beforeLoad: null, + load: null + }, + + _create: function() { + var that = this, + options = this.options, + active = options.active, + locationHash = location.hash.substring( 1 ); + + this.running = false; + + this.element + .addClass( "ui-tabs ui-widget ui-widget-content ui-corner-all" ) + .toggleClass( "ui-tabs-collapsible", options.collapsible ) + // Prevent users from focusing disabled tabs via click + .delegate( ".ui-tabs-nav > li", "mousedown" + this.eventNamespace, function( event ) { + if ( $( this ).is( ".ui-state-disabled" ) ) { + event.preventDefault(); + } + }) + // support: IE <9 + // Preventing the default action in mousedown doesn't prevent IE + // from focusing the element, so if the anchor gets focused, blur. + // We don't have to worry about focusing the previously focused + // element since clicking on a non-focusable element should focus + // the body anyway. + .delegate( ".ui-tabs-anchor", "focus" + this.eventNamespace, function() { + if ( $( this ).closest( "li" ).is( ".ui-state-disabled" ) ) { + this.blur(); + } + }); + + this._processTabs(); + + if ( active === null ) { + // check the fragment identifier in the URL + if ( locationHash ) { + this.tabs.each(function( i, tab ) { + if ( $( tab ).attr( "aria-controls" ) === locationHash ) { + active = i; + return false; + } + }); + } + + // check for a tab marked active via a class + if ( active === null ) { + active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) ); + } + + // no active tab, set to false + if ( active === null || active === -1 ) { + active = this.tabs.length ? 0 : false; + } + } + + // handle numbers: negative, out of range + if ( active !== false ) { + active = this.tabs.index( this.tabs.eq( active ) ); + if ( active === -1 ) { + active = options.collapsible ? false : 0; + } + } + options.active = active; + + // don't allow collapsible: false and active: false + if ( !options.collapsible && options.active === false && this.anchors.length ) { + options.active = 0; + } + + // Take disabling tabs via class attribute from HTML + // into account and update option properly. + if ( $.isArray( options.disabled ) ) { + options.disabled = $.unique( options.disabled.concat( + $.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) { + return that.tabs.index( li ); + }) + ) ).sort(); + } + + // check for length avoids error when initializing empty list + if ( this.options.active !== false && this.anchors.length ) { + this.active = this._findActive( this.options.active ); + } else { + this.active = $(); + } + + this._refresh(); + + if ( this.active.length ) { + this.load( options.active ); + } + }, + + _getCreateEventData: function() { + return { + tab: this.active, + panel: !this.active.length ? $() : this._getPanelForTab( this.active ) + }; + }, + + _tabKeydown: function( event ) { + var focusedTab = $( this.document[0].activeElement ).closest( "li" ), + selectedIndex = this.tabs.index( focusedTab ), + goingForward = true; + + if ( this._handlePageNav( event ) ) { + return; + } + + switch ( event.keyCode ) { + case $.ui.keyCode.RIGHT: + case $.ui.keyCode.DOWN: + selectedIndex++; + break; + case $.ui.keyCode.UP: + case $.ui.keyCode.LEFT: + goingForward = false; + selectedIndex--; + break; + case $.ui.keyCode.END: + selectedIndex = this.anchors.length - 1; + break; + case $.ui.keyCode.HOME: + selectedIndex = 0; + break; + case $.ui.keyCode.SPACE: + // Activate only, no collapsing + event.preventDefault(); + clearTimeout( this.activating ); + this._activate( selectedIndex ); + return; + case $.ui.keyCode.ENTER: + // Toggle (cancel delayed activation, allow collapsing) + event.preventDefault(); + clearTimeout( this.activating ); + // Determine if we should collapse or activate + this._activate( selectedIndex === this.options.active ? false : selectedIndex ); + return; + default: + return; + } + + // Focus the appropriate tab, based on which key was pressed + event.preventDefault(); + clearTimeout( this.activating ); + selectedIndex = this._focusNextTab( selectedIndex, goingForward ); + + // Navigating with control key will prevent automatic activation + if ( !event.ctrlKey ) { + // Update aria-selected immediately so that AT think the tab is already selected. + // Otherwise AT may confuse the user by stating that they need to activate the tab, + // but the tab will already be activated by the time the announcement finishes. + focusedTab.attr( "aria-selected", "false" ); + this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" ); + + this.activating = this._delay(function() { + this.option( "active", selectedIndex ); + }, this.delay ); + } + }, + + _panelKeydown: function( event ) { + if ( this._handlePageNav( event ) ) { + return; + } + + // Ctrl+up moves focus to the current tab + if ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) { + event.preventDefault(); + this.active.focus(); + } + }, + + // Alt+page up/down moves focus to the previous/next tab (and activates) + _handlePageNav: function( event ) { + if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) { + this._activate( this._focusNextTab( this.options.active - 1, false ) ); + return true; + } + if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) { + this._activate( this._focusNextTab( this.options.active + 1, true ) ); + return true; + } + }, + + _findNextTab: function( index, goingForward ) { + var lastTabIndex = this.tabs.length - 1; + + function constrain() { + if ( index > lastTabIndex ) { + index = 0; + } + if ( index < 0 ) { + index = lastTabIndex; + } + return index; + } + + while ( $.inArray( constrain(), this.options.disabled ) !== -1 ) { + index = goingForward ? index + 1 : index - 1; + } + + return index; + }, + + _focusNextTab: function( index, goingForward ) { + index = this._findNextTab( index, goingForward ); + this.tabs.eq( index ).focus(); + return index; + }, + + _setOption: function( key, value ) { + if ( key === "active" ) { + // _activate() will handle invalid values and update this.options + this._activate( value ); + return; + } + + if ( key === "disabled" ) { + // don't use the widget factory's disabled handling + this._setupDisabled( value ); + return; + } + + this._super( key, value); + + if ( key === "collapsible" ) { + this.element.toggleClass( "ui-tabs-collapsible", value ); + // Setting collapsible: false while collapsed; open first panel + if ( !value && this.options.active === false ) { + this._activate( 0 ); + } + } + + if ( key === "event" ) { + this._setupEvents( value ); + } + + if ( key === "heightStyle" ) { + this._setupHeightStyle( value ); + } + }, + + _tabId: function( tab ) { + return tab.attr( "aria-controls" ) || "ui-tabs-" + getNextTabId(); + }, + + _sanitizeSelector: function( hash ) { + return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : ""; + }, + + refresh: function() { + var options = this.options, + lis = this.tablist.children( ":has(a[href])" ); + + // get disabled tabs from class attribute from HTML + // this will get converted to a boolean if needed in _refresh() + options.disabled = $.map( lis.filter( ".ui-state-disabled" ), function( tab ) { + return lis.index( tab ); + }); + + this._processTabs(); + + // was collapsed or no tabs + if ( options.active === false || !this.anchors.length ) { + options.active = false; + this.active = $(); + // was active, but active tab is gone + } else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) { + // all remaining tabs are disabled + if ( this.tabs.length === options.disabled.length ) { + options.active = false; + this.active = $(); + // activate previous tab + } else { + this._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) ); + } + // was active, active tab still exists + } else { + // make sure active index is correct + options.active = this.tabs.index( this.active ); + } + + this._refresh(); + }, + + _refresh: function() { + this._setupDisabled( this.options.disabled ); + this._setupEvents( this.options.event ); + this._setupHeightStyle( this.options.heightStyle ); + + this.tabs.not( this.active ).attr({ + "aria-selected": "false", + tabIndex: -1 + }); + this.panels.not( this._getPanelForTab( this.active ) ) + .hide() + .attr({ + "aria-expanded": "false", + "aria-hidden": "true" + }); + + // Make sure one tab is in the tab order + if ( !this.active.length ) { + this.tabs.eq( 0 ).attr( "tabIndex", 0 ); + } else { + this.active + .addClass( "ui-tabs-active ui-state-active" ) + .attr({ + "aria-selected": "true", + tabIndex: 0 + }); + this._getPanelForTab( this.active ) + .show() + .attr({ + "aria-expanded": "true", + "aria-hidden": "false" + }); + } + }, + + _processTabs: function() { + var that = this; + + this.tablist = this._getList() + .addClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" ) + .attr( "role", "tablist" ); + + this.tabs = this.tablist.find( "> li:has(a[href])" ) + .addClass( "ui-state-default ui-corner-top" ) + .attr({ + role: "tab", + tabIndex: -1 + }); + + this.anchors = this.tabs.map(function() { + return $( "a", this )[ 0 ]; + }) + .addClass( "ui-tabs-anchor" ) + .attr({ + role: "presentation", + tabIndex: -1 + }); + + this.panels = $(); + + this.anchors.each(function( i, anchor ) { + var selector, panel, panelId, + anchorId = $( anchor ).uniqueId().attr( "id" ), + tab = $( anchor ).closest( "li" ), + originalAriaControls = tab.attr( "aria-controls" ); + + // inline tab + if ( isLocal( anchor ) ) { + selector = anchor.hash; + panel = that.element.find( that._sanitizeSelector( selector ) ); + // remote tab + } else { + panelId = that._tabId( tab ); + selector = "#" + panelId; + panel = that.element.find( selector ); + if ( !panel.length ) { + panel = that._createPanel( panelId ); + panel.insertAfter( that.panels[ i - 1 ] || that.tablist ); + } + panel.attr( "aria-live", "polite" ); + } + + if ( panel.length) { + that.panels = that.panels.add( panel ); + } + if ( originalAriaControls ) { + tab.data( "ui-tabs-aria-controls", originalAriaControls ); + } + tab.attr({ + "aria-controls": selector.substring( 1 ), + "aria-labelledby": anchorId + }); + panel.attr( "aria-labelledby", anchorId ); + }); + + this.panels + .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ) + .attr( "role", "tabpanel" ); + }, + + // allow overriding how to find the list for rare usage scenarios (#7715) + _getList: function() { + return this.element.find( "ol,ul" ).eq( 0 ); + }, + + _createPanel: function( id ) { + return $( "
            " ) + .attr( "id", id ) + .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ) + .data( "ui-tabs-destroy", true ); + }, + + _setupDisabled: function( disabled ) { + if ( $.isArray( disabled ) ) { + if ( !disabled.length ) { + disabled = false; + } else if ( disabled.length === this.anchors.length ) { + disabled = true; + } + } + + // disable tabs + for ( var i = 0, li; ( li = this.tabs[ i ] ); i++ ) { + if ( disabled === true || $.inArray( i, disabled ) !== -1 ) { + $( li ) + .addClass( "ui-state-disabled" ) + .attr( "aria-disabled", "true" ); + } else { + $( li ) + .removeClass( "ui-state-disabled" ) + .removeAttr( "aria-disabled" ); + } + } + + this.options.disabled = disabled; + }, + + _setupEvents: function( event ) { + var events = { + click: function( event ) { + event.preventDefault(); + } + }; + if ( event ) { + $.each( event.split(" "), function( index, eventName ) { + events[ eventName ] = "_eventHandler"; + }); + } + + this._off( this.anchors.add( this.tabs ).add( this.panels ) ); + this._on( this.anchors, events ); + this._on( this.tabs, { keydown: "_tabKeydown" } ); + this._on( this.panels, { keydown: "_panelKeydown" } ); + + this._focusable( this.tabs ); + this._hoverable( this.tabs ); + }, + + _setupHeightStyle: function( heightStyle ) { + var maxHeight, overflow, + parent = this.element.parent(); + + if ( heightStyle === "fill" ) { + // IE 6 treats height like minHeight, so we need to turn off overflow + // in order to get a reliable height + // we use the minHeight support test because we assume that only + // browsers that don't support minHeight will treat height as minHeight + if ( !$.support.minHeight ) { + overflow = parent.css( "overflow" ); + parent.css( "overflow", "hidden"); + } + maxHeight = parent.height(); + this.element.siblings( ":visible" ).each(function() { + var elem = $( this ), + position = elem.css( "position" ); + + if ( position === "absolute" || position === "fixed" ) { + return; + } + maxHeight -= elem.outerHeight( true ); + }); + if ( overflow ) { + parent.css( "overflow", overflow ); + } + + this.element.children().not( this.panels ).each(function() { + maxHeight -= $( this ).outerHeight( true ); + }); + + this.panels.each(function() { + $( this ).height( Math.max( 0, maxHeight - + $( this ).innerHeight() + $( this ).height() ) ); + }) + .css( "overflow", "auto" ); + } else if ( heightStyle === "auto" ) { + maxHeight = 0; + this.panels.each(function() { + maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() ); + }).height( maxHeight ); + } + }, + + _eventHandler: function( event ) { + var options = this.options, + active = this.active, + anchor = $( event.currentTarget ), + tab = anchor.closest( "li" ), + clickedIsActive = tab[ 0 ] === active[ 0 ], + collapsing = clickedIsActive && options.collapsible, + toShow = collapsing ? $() : this._getPanelForTab( tab ), + toHide = !active.length ? $() : this._getPanelForTab( active ), + eventData = { + oldTab: active, + oldPanel: toHide, + newTab: collapsing ? $() : tab, + newPanel: toShow + }; + + event.preventDefault(); + + if ( tab.hasClass( "ui-state-disabled" ) || + // tab is already loading + tab.hasClass( "ui-tabs-loading" ) || + // can't switch durning an animation + this.running || + // click on active header, but not collapsible + ( clickedIsActive && !options.collapsible ) || + // allow canceling activation + ( this._trigger( "beforeActivate", event, eventData ) === false ) ) { + return; + } + + options.active = collapsing ? false : this.tabs.index( tab ); + + this.active = clickedIsActive ? $() : tab; + if ( this.xhr ) { + this.xhr.abort(); + } + + if ( !toHide.length && !toShow.length ) { + $.error( "jQuery UI Tabs: Mismatching fragment identifier." ); + } + + if ( toShow.length ) { + this.load( this.tabs.index( tab ), event ); + } + this._toggle( event, eventData ); + }, + + // handles show/hide for selecting tabs + _toggle: function( event, eventData ) { + var that = this, + toShow = eventData.newPanel, + toHide = eventData.oldPanel; + + this.running = true; + + function complete() { + that.running = false; + that._trigger( "activate", event, eventData ); + } + + function show() { + eventData.newTab.closest( "li" ).addClass( "ui-tabs-active ui-state-active" ); + + if ( toShow.length && that.options.show ) { + that._show( toShow, that.options.show, complete ); + } else { + toShow.show(); + complete(); + } + } + + // start out by hiding, then showing, then completing + if ( toHide.length && this.options.hide ) { + this._hide( toHide, this.options.hide, function() { + eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" ); + show(); + }); + } else { + eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" ); + toHide.hide(); + show(); + } + + toHide.attr({ + "aria-expanded": "false", + "aria-hidden": "true" + }); + eventData.oldTab.attr( "aria-selected", "false" ); + // If we're switching tabs, remove the old tab from the tab order. + // If we're opening from collapsed state, remove the previous tab from the tab order. + // If we're collapsing, then keep the collapsing tab in the tab order. + if ( toShow.length && toHide.length ) { + eventData.oldTab.attr( "tabIndex", -1 ); + } else if ( toShow.length ) { + this.tabs.filter(function() { + return $( this ).attr( "tabIndex" ) === 0; + }) + .attr( "tabIndex", -1 ); + } + + toShow.attr({ + "aria-expanded": "true", + "aria-hidden": "false" + }); + eventData.newTab.attr({ + "aria-selected": "true", + tabIndex: 0 + }); + }, + + _activate: function( index ) { + var anchor, + active = this._findActive( index ); + + // trying to activate the already active panel + if ( active[ 0 ] === this.active[ 0 ] ) { + return; + } + + // trying to collapse, simulate a click on the current active header + if ( !active.length ) { + active = this.active; + } + + anchor = active.find( ".ui-tabs-anchor" )[ 0 ]; + this._eventHandler({ + target: anchor, + currentTarget: anchor, + preventDefault: $.noop + }); + }, + + _findActive: function( index ) { + return index === false ? $() : this.tabs.eq( index ); + }, + + _getIndex: function( index ) { + // meta-function to give users option to provide a href string instead of a numerical index. + if ( typeof index === "string" ) { + index = this.anchors.index( this.anchors.filter( "[href$='" + index + "']" ) ); + } + + return index; + }, + + _destroy: function() { + if ( this.xhr ) { + this.xhr.abort(); + } + + this.element.removeClass( "ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible" ); + + this.tablist + .removeClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" ) + .removeAttr( "role" ); + + this.anchors + .removeClass( "ui-tabs-anchor" ) + .removeAttr( "role" ) + .removeAttr( "tabIndex" ) + .removeData( "href.tabs" ) + .removeData( "load.tabs" ) + .removeUniqueId(); + + this.tabs.add( this.panels ).each(function() { + if ( $.data( this, "ui-tabs-destroy" ) ) { + $( this ).remove(); + } else { + $( this ) + .removeClass( "ui-state-default ui-state-active ui-state-disabled " + + "ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel" ) + .removeAttr( "tabIndex" ) + .removeAttr( "aria-live" ) + .removeAttr( "aria-busy" ) + .removeAttr( "aria-selected" ) + .removeAttr( "aria-labelledby" ) + .removeAttr( "aria-hidden" ) + .removeAttr( "aria-expanded" ) + .removeAttr( "role" ); + } + }); + + this.tabs.each(function() { + var li = $( this ), + prev = li.data( "ui-tabs-aria-controls" ); + if ( prev ) { + li.attr( "aria-controls", prev ); + } else { + li.removeAttr( "aria-controls" ); + } + }); + + this.panels.show(); + + if ( this.options.heightStyle !== "content" ) { + this.panels.css( "height", "" ); + } + }, + + enable: function( index ) { + var disabled = this.options.disabled; + if ( disabled === false ) { + return; + } + + if ( index === undefined ) { + disabled = false; + } else { + index = this._getIndex( index ); + if ( $.isArray( disabled ) ) { + disabled = $.map( disabled, function( num ) { + return num !== index ? num : null; + }); + } else { + disabled = $.map( this.tabs, function( li, num ) { + return num !== index ? num : null; + }); + } + } + this._setupDisabled( disabled ); + }, + + disable: function( index ) { + var disabled = this.options.disabled; + if ( disabled === true ) { + return; + } + + if ( index === undefined ) { + disabled = true; + } else { + index = this._getIndex( index ); + if ( $.inArray( index, disabled ) !== -1 ) { + return; + } + if ( $.isArray( disabled ) ) { + disabled = $.merge( [ index ], disabled ).sort(); + } else { + disabled = [ index ]; + } + } + this._setupDisabled( disabled ); + }, + + load: function( index, event ) { + index = this._getIndex( index ); + var that = this, + tab = this.tabs.eq( index ), + anchor = tab.find( ".ui-tabs-anchor" ), + panel = this._getPanelForTab( tab ), + eventData = { + tab: tab, + panel: panel + }; + + // not remote + if ( isLocal( anchor[ 0 ] ) ) { + return; + } + + this.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) ); + + // support: jQuery <1.8 + // jQuery <1.8 returns false if the request is canceled in beforeSend, + // but as of 1.8, $.ajax() always returns a jqXHR object. + if ( this.xhr && this.xhr.statusText !== "canceled" ) { + tab.addClass( "ui-tabs-loading" ); + panel.attr( "aria-busy", "true" ); + + this.xhr + .success(function( response ) { + // support: jQuery <1.8 + // http://bugs.jquery.com/ticket/11778 + setTimeout(function() { + panel.html( response ); + that._trigger( "load", event, eventData ); + }, 1 ); + }) + .complete(function( jqXHR, status ) { + // support: jQuery <1.8 + // http://bugs.jquery.com/ticket/11778 + setTimeout(function() { + if ( status === "abort" ) { + that.panels.stop( false, true ); + } + + tab.removeClass( "ui-tabs-loading" ); + panel.removeAttr( "aria-busy" ); + + if ( jqXHR === that.xhr ) { + delete that.xhr; + } + }, 1 ); + }); + } + }, + + // TODO: Remove this function in 1.10 when ajaxOptions is removed + _ajaxSettings: function( anchor, event, eventData ) { + var that = this; + return { + url: anchor.attr( "href" ), + beforeSend: function( jqXHR, settings ) { + return that._trigger( "beforeLoad", event, + $.extend( { jqXHR : jqXHR, ajaxSettings: settings }, eventData ) ); + } + }; + }, + + _getPanelForTab: function( tab ) { + var id = $( tab ).attr( "aria-controls" ); + return this.element.find( this._sanitizeSelector( "#" + id ) ); + } +}); + +// DEPRECATED +if ( $.uiBackCompat !== false ) { + + // helper method for a lot of the back compat extensions + $.ui.tabs.prototype._ui = function( tab, panel ) { + return { + tab: tab, + panel: panel, + index: this.anchors.index( tab ) + }; + }; + + // url method + $.widget( "ui.tabs", $.ui.tabs, { + url: function( index, url ) { + this.anchors.eq( index ).attr( "href", url ); + } + }); + + // TODO: Remove _ajaxSettings() method when removing this extension + // ajaxOptions and cache options + $.widget( "ui.tabs", $.ui.tabs, { + options: { + ajaxOptions: null, + cache: false + }, + + _create: function() { + this._super(); + + var that = this; + + this._on({ tabsbeforeload: function( event, ui ) { + // tab is already cached + if ( $.data( ui.tab[ 0 ], "cache.tabs" ) ) { + event.preventDefault(); + return; + } + + ui.jqXHR.success(function() { + if ( that.options.cache ) { + $.data( ui.tab[ 0 ], "cache.tabs", true ); + } + }); + }}); + }, + + _ajaxSettings: function( anchor, event, ui ) { + var ajaxOptions = this.options.ajaxOptions; + return $.extend( {}, ajaxOptions, { + error: function( xhr, status ) { + 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) + ajaxOptions.error( + xhr, status, ui.tab.closest( "li" ).index(), ui.tab[ 0 ] ); + } + catch ( error ) {} + } + }, this._superApply( arguments ) ); + }, + + _setOption: function( key, value ) { + // reset cache if switching from cached to not cached + if ( key === "cache" && value === false ) { + this.anchors.removeData( "cache.tabs" ); + } + this._super( key, value ); + }, + + _destroy: function() { + this.anchors.removeData( "cache.tabs" ); + this._super(); + }, + + url: function( index ){ + this.anchors.eq( index ).removeData( "cache.tabs" ); + this._superApply( arguments ); + } + }); + + // abort method + $.widget( "ui.tabs", $.ui.tabs, { + abort: function() { + if ( this.xhr ) { + this.xhr.abort(); + } + } + }); + + // spinner + $.widget( "ui.tabs", $.ui.tabs, { + options: { + spinner: "Loading…" + }, + _create: function() { + this._super(); + this._on({ + tabsbeforeload: function( event, ui ) { + // Don't react to nested tabs or tabs that don't use a spinner + if ( event.target !== this.element[ 0 ] || + !this.options.spinner ) { + return; + } + + var span = ui.tab.find( "span" ), + html = span.html(); + span.html( this.options.spinner ); + ui.jqXHR.complete(function() { + span.html( html ); + }); + } + }); + } + }); + + // enable/disable events + $.widget( "ui.tabs", $.ui.tabs, { + options: { + enable: null, + disable: null + }, + + enable: function( index ) { + var options = this.options, + trigger; + + if ( index && options.disabled === true || + ( $.isArray( options.disabled ) && $.inArray( index, options.disabled ) !== -1 ) ) { + trigger = true; + } + + this._superApply( arguments ); + + if ( trigger ) { + this._trigger( "enable", null, this._ui( this.anchors[ index ], this.panels[ index ] ) ); + } + }, + + disable: function( index ) { + var options = this.options, + trigger; + + if ( index && options.disabled === false || + ( $.isArray( options.disabled ) && $.inArray( index, options.disabled ) === -1 ) ) { + trigger = true; + } + + this._superApply( arguments ); + + if ( trigger ) { + this._trigger( "disable", null, this._ui( this.anchors[ index ], this.panels[ index ] ) ); + } + } + }); + + // add/remove methods and events + $.widget( "ui.tabs", $.ui.tabs, { + options: { + add: null, + remove: null, + tabTemplate: "
          • #{label}
          • " + }, + + add: function( url, label, index ) { + if ( index === undefined ) { + index = this.anchors.length; + } + + var doInsertAfter, panel, + options = this.options, + li = $( options.tabTemplate + .replace( /#\{href\}/g, url ) + .replace( /#\{label\}/g, label ) ), + id = !url.indexOf( "#" ) ? + url.replace( "#", "" ) : + this._tabId( li ); + + li.addClass( "ui-state-default ui-corner-top" ).data( "ui-tabs-destroy", true ); + li.attr( "aria-controls", id ); + + doInsertAfter = index >= this.tabs.length; + + // try to find an existing element before creating a new one + panel = this.element.find( "#" + id ); + if ( !panel.length ) { + panel = this._createPanel( id ); + if ( doInsertAfter ) { + if ( index > 0 ) { + panel.insertAfter( this.panels.eq( -1 ) ); + } else { + panel.appendTo( this.element ); + } + } else { + panel.insertBefore( this.panels[ index ] ); + } + } + panel.addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ).hide(); + + if ( doInsertAfter ) { + li.appendTo( this.tablist ); + } else { + li.insertBefore( this.tabs[ index ] ); + } + + options.disabled = $.map( options.disabled, function( n ) { + return n >= index ? ++n : n; + }); + + this.refresh(); + if ( this.tabs.length === 1 && options.active === false ) { + this.option( "active", 0 ); + } + + this._trigger( "add", null, this._ui( this.anchors[ index ], this.panels[ index ] ) ); + return this; + }, + + remove: function( index ) { + index = this._getIndex( index ); + var options = this.options, + tab = this.tabs.eq( index ).remove(), + panel = this._getPanelForTab( tab ).remove(); + + // If selected tab was removed focus tab to the right or + // in case the last tab was removed the tab to the left. + // We check for more than 2 tabs, because if there are only 2, + // then when we remove this tab, there will only be one tab left + // so we don't need to detect which tab to activate. + if ( tab.hasClass( "ui-tabs-active" ) && this.anchors.length > 2 ) { + this._activate( index + ( index + 1 < this.anchors.length ? 1 : -1 ) ); + } + + options.disabled = $.map( + $.grep( options.disabled, function( n ) { + return n !== index; + }), + function( n ) { + return n >= index ? --n : n; + }); + + this.refresh(); + + this._trigger( "remove", null, this._ui( tab.find( "a" )[ 0 ], panel[ 0 ] ) ); + return this; + } + }); + + // length method + $.widget( "ui.tabs", $.ui.tabs, { + length: function() { + return this.anchors.length; + } + }); + + // panel ids (idPrefix option + title attribute) + $.widget( "ui.tabs", $.ui.tabs, { + options: { + idPrefix: "ui-tabs-" + }, + + _tabId: function( tab ) { + var a = tab.is( "li" ) ? tab.find( "a[href]" ) : tab; + a = a[0]; + return $( a ).closest( "li" ).attr( "aria-controls" ) || + a.title && a.title.replace( /\s/g, "_" ).replace( /[^\w\u00c0-\uFFFF\-]/g, "" ) || + this.options.idPrefix + getNextTabId(); + } + }); + + // _createPanel method + $.widget( "ui.tabs", $.ui.tabs, { + options: { + panelTemplate: "
            " + }, + + _createPanel: function( id ) { + return $( this.options.panelTemplate ) + .attr( "id", id ) + .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ) + .data( "ui-tabs-destroy", true ); + } + }); + + // selected option + $.widget( "ui.tabs", $.ui.tabs, { + _create: function() { + var options = this.options; + if ( options.active === null && options.selected !== undefined ) { + options.active = options.selected === -1 ? false : options.selected; + } + this._super(); + options.selected = options.active; + if ( options.selected === false ) { + options.selected = -1; + } + }, + + _setOption: function( key, value ) { + if ( key !== "selected" ) { + return this._super( key, value ); + } + + var options = this.options; + this._super( "active", value === -1 ? false : value ); + options.selected = options.active; + if ( options.selected === false ) { + options.selected = -1; + } + }, + + _eventHandler: function() { + this._superApply( arguments ); + this.options.selected = this.options.active; + if ( this.options.selected === false ) { + this.options.selected = -1; + } + } + }); + + // show and select event + $.widget( "ui.tabs", $.ui.tabs, { + options: { + show: null, + select: null + }, + _create: function() { + this._super(); + if ( this.options.active !== false ) { + this._trigger( "show", null, this._ui( + this.active.find( ".ui-tabs-anchor" )[ 0 ], + this._getPanelForTab( this.active )[ 0 ] ) ); + } + }, + _trigger: function( type, event, data ) { + var tab, panel, + ret = this._superApply( arguments ); + + if ( !ret ) { + return false; + } + + if ( type === "beforeActivate" ) { + tab = data.newTab.length ? data.newTab : data.oldTab; + panel = data.newPanel.length ? data.newPanel : data.oldPanel; + ret = this._super( "select", event, { + tab: tab.find( ".ui-tabs-anchor" )[ 0], + panel: panel[ 0 ], + index: tab.closest( "li" ).index() + }); + } else if ( type === "activate" && data.newTab.length ) { + ret = this._super( "show", event, { + tab: data.newTab.find( ".ui-tabs-anchor" )[ 0 ], + panel: data.newPanel[ 0 ], + index: data.newTab.closest( "li" ).index() + }); + } + return ret; + } + }); + + // select method + $.widget( "ui.tabs", $.ui.tabs, { + 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.anchors.eq( index ).trigger( this.options.event + this.eventNamespace ); + } + }); + + // cookie option + (function() { + + var listId = 0; + + $.widget( "ui.tabs", $.ui.tabs, { + options: { + cookie: null // e.g. { expires: 7, path: '/', domain: 'jquery.com', secure: true } + }, + _create: function() { + var options = this.options, + active; + if ( options.active == null && options.cookie ) { + active = parseInt( this._cookie(), 10 ); + if ( active === -1 ) { + active = false; + } + options.active = active; + } + this._super(); + }, + _cookie: function( active ) { + var cookie = [ this.cookie || + ( this.cookie = this.options.cookie.name || "ui-tabs-" + (++listId) ) ]; + if ( arguments.length ) { + cookie.push( active === false ? -1 : active ); + cookie.push( this.options.cookie ); + } + return $.cookie.apply( null, cookie ); + }, + _refresh: function() { + this._super(); + if ( this.options.cookie ) { + this._cookie( this.options.active, this.options.cookie ); + } + }, + _eventHandler: function() { + this._superApply( arguments ); + if ( this.options.cookie ) { + this._cookie( this.options.active, this.options.cookie ); + } + }, + _destroy: function() { + this._super(); + if ( this.options.cookie ) { + this._cookie( null, this.options.cookie ); + } + } + }); + + })(); + + // load event + $.widget( "ui.tabs", $.ui.tabs, { + _trigger: function( type, event, data ) { + var _data = $.extend( {}, data ); + if ( type === "load" ) { + _data.panel = _data.panel[ 0 ]; + _data.tab = _data.tab.find( ".ui-tabs-anchor" )[ 0 ]; + } + return this._super( type, event, _data ); + } + }); + + // fx option + // The new animation options (show, hide) conflict with the old show callback. + // The old fx option wins over show/hide anyway (always favor back-compat). + // If a user wants to use the new animation API, they must give up the old API. + $.widget( "ui.tabs", $.ui.tabs, { + options: { + fx: null // e.g. { height: "toggle", opacity: "toggle", duration: 200 } + }, + + _getFx: function() { + var hide, show, + fx = this.options.fx; + + if ( fx ) { + if ( $.isArray( fx ) ) { + hide = fx[ 0 ]; + show = fx[ 1 ]; + } else { + hide = show = fx; + } + } + + return fx ? { show: show, hide: hide } : null; + }, + + _toggle: function( event, eventData ) { + var that = this, + toShow = eventData.newPanel, + toHide = eventData.oldPanel, + fx = this._getFx(); + + if ( !fx ) { + return this._super( event, eventData ); + } + + that.running = true; + + function complete() { + that.running = false; + that._trigger( "activate", event, eventData ); + } + + function show() { + eventData.newTab.closest( "li" ).addClass( "ui-tabs-active ui-state-active" ); + + if ( toShow.length && fx.show ) { + toShow + .animate( fx.show, fx.show.duration, function() { + complete(); + }); + } else { + toShow.show(); + complete(); + } + } + + // start out by hiding, then showing, then completing + if ( toHide.length && fx.hide ) { + toHide.animate( fx.hide, fx.hide.duration, function() { + eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" ); + show(); + }); + } else { + eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" ); + toHide.hide(); + show(); + } + } + }); +} + +})( jQuery ); diff --git a/resources/lib/jquery.ui/jquery.ui.tooltip.js b/resources/lib/jquery.ui/jquery.ui.tooltip.js new file mode 100644 index 00000000..2b50b443 --- /dev/null +++ b/resources/lib/jquery.ui/jquery.ui.tooltip.js @@ -0,0 +1,398 @@ +/*! + * jQuery UI Tooltip 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/tooltip/ + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + * jquery.ui.position.js + */ +(function( $ ) { + +var increments = 0; + +function addDescribedBy( elem, id ) { + var describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ ); + describedby.push( id ); + elem + .data( "ui-tooltip-id", id ) + .attr( "aria-describedby", $.trim( describedby.join( " " ) ) ); +} + +function removeDescribedBy( elem ) { + var id = elem.data( "ui-tooltip-id" ), + describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ ), + index = $.inArray( id, describedby ); + if ( index !== -1 ) { + describedby.splice( index, 1 ); + } + + elem.removeData( "ui-tooltip-id" ); + describedby = $.trim( describedby.join( " " ) ); + if ( describedby ) { + elem.attr( "aria-describedby", describedby ); + } else { + elem.removeAttr( "aria-describedby" ); + } +} + +$.widget( "ui.tooltip", { + version: "1.9.2", + options: { + content: function() { + return $( this ).attr( "title" ); + }, + hide: true, + // Disabled elements have inconsistent behavior across browsers (#8661) + items: "[title]:not([disabled])", + position: { + my: "left top+15", + at: "left bottom", + collision: "flipfit flip" + }, + show: true, + tooltipClass: null, + track: false, + + // callbacks + close: null, + open: null + }, + + _create: function() { + this._on({ + mouseover: "open", + focusin: "open" + }); + + // IDs of generated tooltips, needed for destroy + this.tooltips = {}; + // IDs of parent tooltips where we removed the title attribute + this.parents = {}; + + if ( this.options.disabled ) { + this._disable(); + } + }, + + _setOption: function( key, value ) { + var that = this; + + if ( key === "disabled" ) { + this[ value ? "_disable" : "_enable" ](); + this.options[ key ] = value; + // disable element style changes + return; + } + + this._super( key, value ); + + if ( key === "content" ) { + $.each( this.tooltips, function( id, element ) { + that._updateContent( element ); + }); + } + }, + + _disable: function() { + var that = this; + + // close open tooltips + $.each( this.tooltips, function( id, element ) { + var event = $.Event( "blur" ); + event.target = event.currentTarget = element[0]; + that.close( event, true ); + }); + + // remove title attributes to prevent native tooltips + this.element.find( this.options.items ).andSelf().each(function() { + var element = $( this ); + if ( element.is( "[title]" ) ) { + element + .data( "ui-tooltip-title", element.attr( "title" ) ) + .attr( "title", "" ); + } + }); + }, + + _enable: function() { + // restore title attributes + this.element.find( this.options.items ).andSelf().each(function() { + var element = $( this ); + if ( element.data( "ui-tooltip-title" ) ) { + element.attr( "title", element.data( "ui-tooltip-title" ) ); + } + }); + }, + + open: function( event ) { + var that = this, + target = $( event ? event.target : this.element ) + // we need closest here due to mouseover bubbling, + // but always pointing at the same event target + .closest( this.options.items ); + + // No element to show a tooltip for or the tooltip is already open + if ( !target.length || target.data( "ui-tooltip-id" ) ) { + return; + } + + if ( target.attr( "title" ) ) { + target.data( "ui-tooltip-title", target.attr( "title" ) ); + } + + target.data( "ui-tooltip-open", true ); + + // kill parent tooltips, custom or native, for hover + if ( event && event.type === "mouseover" ) { + target.parents().each(function() { + var parent = $( this ), + blurEvent; + if ( parent.data( "ui-tooltip-open" ) ) { + blurEvent = $.Event( "blur" ); + blurEvent.target = blurEvent.currentTarget = this; + that.close( blurEvent, true ); + } + if ( parent.attr( "title" ) ) { + parent.uniqueId(); + that.parents[ this.id ] = { + element: this, + title: parent.attr( "title" ) + }; + parent.attr( "title", "" ); + } + }); + } + + this._updateContent( target, event ); + }, + + _updateContent: function( target, event ) { + var content, + contentOption = this.options.content, + that = this, + eventType = event ? event.type : null; + + if ( typeof contentOption === "string" ) { + return this._open( event, target, contentOption ); + } + + content = contentOption.call( target[0], function( response ) { + // ignore async response if tooltip was closed already + if ( !target.data( "ui-tooltip-open" ) ) { + return; + } + // IE may instantly serve a cached response for ajax requests + // delay this call to _open so the other call to _open runs first + that._delay(function() { + // jQuery creates a special event for focusin when it doesn't + // exist natively. To improve performance, the native event + // object is reused and the type is changed. Therefore, we can't + // rely on the type being correct after the event finished + // bubbling, so we set it back to the previous value. (#8740) + if ( event ) { + event.type = eventType; + } + this._open( event, target, response ); + }); + }); + if ( content ) { + this._open( event, target, content ); + } + }, + + _open: function( event, target, content ) { + var tooltip, events, delayedShow, + positionOption = $.extend( {}, this.options.position ); + + if ( !content ) { + return; + } + + // Content can be updated multiple times. If the tooltip already + // exists, then just update the content and bail. + tooltip = this._find( target ); + if ( tooltip.length ) { + tooltip.find( ".ui-tooltip-content" ).html( content ); + return; + } + + // if we have a title, clear it to prevent the native tooltip + // we have to check first to avoid defining a title if none exists + // (we don't want to cause an element to start matching [title]) + // + // We use removeAttr only for key events, to allow IE to export the correct + // accessible attributes. For mouse events, set to empty string to avoid + // native tooltip showing up (happens only when removing inside mouseover). + if ( target.is( "[title]" ) ) { + if ( event && event.type === "mouseover" ) { + target.attr( "title", "" ); + } else { + target.removeAttr( "title" ); + } + } + + tooltip = this._tooltip( target ); + addDescribedBy( target, tooltip.attr( "id" ) ); + tooltip.find( ".ui-tooltip-content" ).html( content ); + + function position( event ) { + positionOption.of = event; + if ( tooltip.is( ":hidden" ) ) { + return; + } + tooltip.position( positionOption ); + } + if ( this.options.track && event && /^mouse/.test( event.type ) ) { + this._on( this.document, { + mousemove: position + }); + // trigger once to override element-relative positioning + position( event ); + } else { + tooltip.position( $.extend({ + of: target + }, this.options.position ) ); + } + + tooltip.hide(); + + this._show( tooltip, this.options.show ); + // Handle tracking tooltips that are shown with a delay (#8644). As soon + // as the tooltip is visible, position the tooltip using the most recent + // event. + if ( this.options.show && this.options.show.delay ) { + delayedShow = setInterval(function() { + if ( tooltip.is( ":visible" ) ) { + position( positionOption.of ); + clearInterval( delayedShow ); + } + }, $.fx.interval ); + } + + this._trigger( "open", event, { tooltip: tooltip } ); + + events = { + keyup: function( event ) { + if ( event.keyCode === $.ui.keyCode.ESCAPE ) { + var fakeEvent = $.Event(event); + fakeEvent.currentTarget = target[0]; + this.close( fakeEvent, true ); + } + }, + remove: function() { + this._removeTooltip( tooltip ); + } + }; + if ( !event || event.type === "mouseover" ) { + events.mouseleave = "close"; + } + if ( !event || event.type === "focusin" ) { + events.focusout = "close"; + } + this._on( true, target, events ); + }, + + close: function( event ) { + var that = this, + target = $( event ? event.currentTarget : this.element ), + tooltip = this._find( target ); + + // disabling closes the tooltip, so we need to track when we're closing + // to avoid an infinite loop in case the tooltip becomes disabled on close + if ( this.closing ) { + return; + } + + // only set title if we had one before (see comment in _open()) + if ( target.data( "ui-tooltip-title" ) ) { + target.attr( "title", target.data( "ui-tooltip-title" ) ); + } + + removeDescribedBy( target ); + + tooltip.stop( true ); + this._hide( tooltip, this.options.hide, function() { + that._removeTooltip( $( this ) ); + }); + + target.removeData( "ui-tooltip-open" ); + this._off( target, "mouseleave focusout keyup" ); + // Remove 'remove' binding only on delegated targets + if ( target[0] !== this.element[0] ) { + this._off( target, "remove" ); + } + this._off( this.document, "mousemove" ); + + if ( event && event.type === "mouseleave" ) { + $.each( this.parents, function( id, parent ) { + $( parent.element ).attr( "title", parent.title ); + delete that.parents[ id ]; + }); + } + + this.closing = true; + this._trigger( "close", event, { tooltip: tooltip } ); + this.closing = false; + }, + + _tooltip: function( element ) { + var id = "ui-tooltip-" + increments++, + tooltip = $( "
            " ) + .attr({ + id: id, + role: "tooltip" + }) + .addClass( "ui-tooltip ui-widget ui-corner-all ui-widget-content " + + ( this.options.tooltipClass || "" ) ); + $( "
            " ) + .addClass( "ui-tooltip-content" ) + .appendTo( tooltip ); + tooltip.appendTo( this.document[0].body ); + if ( $.fn.bgiframe ) { + tooltip.bgiframe(); + } + this.tooltips[ id ] = element; + return tooltip; + }, + + _find: function( target ) { + var id = target.data( "ui-tooltip-id" ); + return id ? $( "#" + id ) : $(); + }, + + _removeTooltip: function( tooltip ) { + tooltip.remove(); + delete this.tooltips[ tooltip.attr( "id" ) ]; + }, + + _destroy: function() { + var that = this; + + // close open tooltips + $.each( this.tooltips, function( id, element ) { + // Delegate to close method to handle common cleanup + var event = $.Event( "blur" ); + event.target = event.currentTarget = element[0]; + that.close( event, true ); + + // Remove immediately; destroying an open tooltip doesn't use the + // hide animation + $( "#" + id ).remove(); + + // Restore the title + if ( element.data( "ui-tooltip-title" ) ) { + element.attr( "title", element.data( "ui-tooltip-title" ) ); + element.removeData( "ui-tooltip-title" ); + } + }); + } +}); + +}( jQuery ) ); diff --git a/resources/lib/jquery.ui/jquery.ui.widget.js b/resources/lib/jquery.ui/jquery.ui.widget.js new file mode 100644 index 00000000..067476d9 --- /dev/null +++ b/resources/lib/jquery.ui/jquery.ui.widget.js @@ -0,0 +1,528 @@ +/*! + * jQuery UI Widget 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/jQuery.widget/ + */ +(function( $, undefined ) { + +var uuid = 0, + slice = Array.prototype.slice, + _cleanData = $.cleanData; +$.cleanData = function( elems ) { + for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { + try { + $( elem ).triggerHandler( "remove" ); + // http://bugs.jquery.com/ticket/8235 + } catch( e ) {} + } + _cleanData( elems ); +}; + +$.widget = function( name, base, prototype ) { + var fullName, existingConstructor, constructor, basePrototype, + namespace = name.split( "." )[ 0 ]; + + name = name.split( "." )[ 1 ]; + fullName = namespace + "-" + name; + + if ( !prototype ) { + prototype = base; + base = $.Widget; + } + + // create selector for plugin + $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { + return !!$.data( elem, fullName ); + }; + + $[ namespace ] = $[ namespace ] || {}; + existingConstructor = $[ namespace ][ name ]; + constructor = $[ namespace ][ name ] = function( options, element ) { + // allow instantiation without "new" keyword + if ( !this._createWidget ) { + return new constructor( options, element ); + } + + // allow instantiation without initializing for simple inheritance + // must use "new" keyword (the code above always passes args) + if ( arguments.length ) { + this._createWidget( options, element ); + } + }; + // extend with the existing constructor to carry over any static properties + $.extend( constructor, existingConstructor, { + version: prototype.version, + // copy the object used to create the prototype in case we need to + // redefine the widget later + _proto: $.extend( {}, prototype ), + // track widgets that inherit from this widget in case this widget is + // redefined after a widget inherits from it + _childConstructors: [] + }); + + basePrototype = new base(); + // we need to make the options hash a property directly on the new instance + // otherwise we'll modify the options hash on the prototype that we're + // inheriting from + basePrototype.options = $.widget.extend( {}, basePrototype.options ); + $.each( prototype, function( prop, value ) { + if ( $.isFunction( value ) ) { + prototype[ prop ] = (function() { + var _super = function() { + return base.prototype[ prop ].apply( this, arguments ); + }, + _superApply = function( args ) { + return base.prototype[ prop ].apply( this, args ); + }; + return function() { + var __super = this._super, + __superApply = this._superApply, + returnValue; + + this._super = _super; + this._superApply = _superApply; + + returnValue = value.apply( this, arguments ); + + this._super = __super; + this._superApply = __superApply; + + return returnValue; + }; + })(); + } + }); + constructor.prototype = $.widget.extend( basePrototype, { + // TODO: remove support for widgetEventPrefix + // always use the name + a colon as the prefix, e.g., draggable:start + // don't prefix for widgets that aren't DOM-based + widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name + }, prototype, { + constructor: constructor, + namespace: namespace, + widgetName: name, + // TODO remove widgetBaseClass, see #8155 + widgetBaseClass: fullName, + widgetFullName: fullName + }); + + // If this widget is being redefined then we need to find all widgets that + // are inheriting from it and redefine all of them so that they inherit from + // the new version of this widget. We're essentially trying to replace one + // level in the prototype chain. + if ( existingConstructor ) { + $.each( existingConstructor._childConstructors, function( i, child ) { + var childPrototype = child.prototype; + + // redefine the child widget using the same prototype that was + // originally used, but inherit from the new version of the base + $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto ); + }); + // remove the list of existing child constructors from the old constructor + // so the old child constructors can be garbage collected + delete existingConstructor._childConstructors; + } else { + base._childConstructors.push( constructor ); + } + + $.widget.bridge( name, constructor ); +}; + +$.widget.extend = function( target ) { + var input = slice.call( arguments, 1 ), + inputIndex = 0, + inputLength = input.length, + key, + value; + for ( ; inputIndex < inputLength; inputIndex++ ) { + for ( key in input[ inputIndex ] ) { + value = input[ inputIndex ][ key ]; + if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { + // Clone objects + if ( $.isPlainObject( value ) ) { + target[ key ] = $.isPlainObject( target[ key ] ) ? + $.widget.extend( {}, target[ key ], value ) : + // Don't extend strings, arrays, etc. with objects + $.widget.extend( {}, value ); + // Copy everything else by reference + } else { + target[ key ] = value; + } + } + } + } + return target; +}; + +$.widget.bridge = function( name, object ) { + var fullName = object.prototype.widgetFullName || name; + $.fn[ name ] = function( options ) { + var isMethodCall = typeof options === "string", + args = slice.call( arguments, 1 ), + returnValue = this; + + // allow multiple hashes to be passed on init + options = !isMethodCall && args.length ? + $.widget.extend.apply( null, [ options ].concat(args) ) : + options; + + if ( isMethodCall ) { + this.each(function() { + var methodValue, + instance = $.data( this, fullName ); + if ( !instance ) { + return $.error( "cannot call methods on " + name + " prior to initialization; " + + "attempted to call method '" + options + "'" ); + } + if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) { + return $.error( "no such method '" + options + "' for " + name + " widget instance" ); + } + methodValue = instance[ options ].apply( instance, args ); + if ( methodValue !== instance && methodValue !== undefined ) { + returnValue = methodValue && methodValue.jquery ? + returnValue.pushStack( methodValue.get() ) : + methodValue; + return false; + } + }); + } else { + this.each(function() { + var instance = $.data( this, fullName ); + if ( instance ) { + instance.option( options || {} )._init(); + } else { + $.data( this, fullName, new object( options, this ) ); + } + }); + } + + return returnValue; + }; +}; + +$.Widget = function( /* options, element */ ) {}; +$.Widget._childConstructors = []; + +$.Widget.prototype = { + widgetName: "widget", + widgetEventPrefix: "", + defaultElement: "
            ", + options: { + disabled: false, + + // callbacks + create: null + }, + _createWidget: function( options, element ) { + element = $( element || this.defaultElement || this )[ 0 ]; + this.element = $( element ); + this.uuid = uuid++; + this.eventNamespace = "." + this.widgetName + this.uuid; + this.options = $.widget.extend( {}, + this.options, + this._getCreateOptions(), + options ); + + this.bindings = $(); + this.hoverable = $(); + this.focusable = $(); + + if ( element !== this ) { + // 1.9 BC for #7810 + // TODO remove dual storage + $.data( element, this.widgetName, this ); + $.data( element, this.widgetFullName, this ); + this._on( true, this.element, { + remove: function( event ) { + if ( event.target === element ) { + this.destroy(); + } + } + }); + this.document = $( element.style ? + // element within the document + element.ownerDocument : + // element is window or document + element.document || element ); + this.window = $( this.document[0].defaultView || this.document[0].parentWindow ); + } + + this._create(); + this._trigger( "create", null, this._getCreateEventData() ); + this._init(); + }, + _getCreateOptions: $.noop, + _getCreateEventData: $.noop, + _create: $.noop, + _init: $.noop, + + destroy: function() { + this._destroy(); + // we can probably remove the unbind calls in 2.0 + // all event bindings should go through this._on() + this.element + .unbind( this.eventNamespace ) + // 1.9 BC for #7810 + // TODO remove dual storage + .removeData( this.widgetName ) + .removeData( this.widgetFullName ) + // support: jquery <1.6.3 + // http://bugs.jquery.com/ticket/9413 + .removeData( $.camelCase( this.widgetFullName ) ); + this.widget() + .unbind( this.eventNamespace ) + .removeAttr( "aria-disabled" ) + .removeClass( + this.widgetFullName + "-disabled " + + "ui-state-disabled" ); + + // clean up events and states + this.bindings.unbind( this.eventNamespace ); + this.hoverable.removeClass( "ui-state-hover" ); + this.focusable.removeClass( "ui-state-focus" ); + }, + _destroy: $.noop, + + widget: function() { + return this.element; + }, + + option: function( key, value ) { + var options = key, + parts, + curOption, + i; + + if ( arguments.length === 0 ) { + // don't return a reference to the internal hash + return $.widget.extend( {}, this.options ); + } + + if ( typeof key === "string" ) { + // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } + options = {}; + parts = key.split( "." ); + key = parts.shift(); + if ( parts.length ) { + curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); + for ( i = 0; i < parts.length - 1; i++ ) { + curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; + curOption = curOption[ parts[ i ] ]; + } + key = parts.pop(); + if ( value === undefined ) { + return curOption[ key ] === undefined ? null : curOption[ key ]; + } + curOption[ key ] = value; + } else { + if ( value === undefined ) { + return this.options[ key ] === undefined ? null : this.options[ key ]; + } + options[ key ] = value; + } + } + + this._setOptions( options ); + + return this; + }, + _setOptions: function( options ) { + var key; + + for ( key in options ) { + this._setOption( key, options[ key ] ); + } + + return this; + }, + _setOption: function( key, value ) { + this.options[ key ] = value; + + if ( key === "disabled" ) { + this.widget() + .toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value ) + .attr( "aria-disabled", value ); + this.hoverable.removeClass( "ui-state-hover" ); + this.focusable.removeClass( "ui-state-focus" ); + } + + return this; + }, + + enable: function() { + return this._setOption( "disabled", false ); + }, + disable: function() { + return this._setOption( "disabled", true ); + }, + + _on: function( suppressDisabledCheck, element, handlers ) { + var delegateElement, + instance = this; + + // no suppressDisabledCheck flag, shuffle arguments + if ( typeof suppressDisabledCheck !== "boolean" ) { + handlers = element; + element = suppressDisabledCheck; + suppressDisabledCheck = false; + } + + // no element argument, shuffle and use this.element + if ( !handlers ) { + handlers = element; + element = this.element; + delegateElement = this.widget(); + } else { + // accept selectors, DOM elements + element = delegateElement = $( element ); + this.bindings = this.bindings.add( element ); + } + + $.each( handlers, function( event, handler ) { + function handlerProxy() { + // allow widgets to customize the disabled handling + // - disabled as an array instead of boolean + // - disabled class as method for disabling individual parts + if ( !suppressDisabledCheck && + ( instance.options.disabled === true || + $( this ).hasClass( "ui-state-disabled" ) ) ) { + return; + } + return ( typeof handler === "string" ? instance[ handler ] : handler ) + .apply( instance, arguments ); + } + + // copy the guid so direct unbinding works + if ( typeof handler !== "string" ) { + handlerProxy.guid = handler.guid = + handler.guid || handlerProxy.guid || $.guid++; + } + + var match = event.match( /^(\w+)\s*(.*)$/ ), + eventName = match[1] + instance.eventNamespace, + selector = match[2]; + if ( selector ) { + delegateElement.delegate( selector, eventName, handlerProxy ); + } else { + element.bind( eventName, handlerProxy ); + } + }); + }, + + _off: function( element, eventName ) { + eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace; + element.unbind( eventName ).undelegate( eventName ); + }, + + _delay: function( handler, delay ) { + function handlerProxy() { + return ( typeof handler === "string" ? instance[ handler ] : handler ) + .apply( instance, arguments ); + } + var instance = this; + return setTimeout( handlerProxy, delay || 0 ); + }, + + _hoverable: function( element ) { + this.hoverable = this.hoverable.add( element ); + this._on( element, { + mouseenter: function( event ) { + $( event.currentTarget ).addClass( "ui-state-hover" ); + }, + mouseleave: function( event ) { + $( event.currentTarget ).removeClass( "ui-state-hover" ); + } + }); + }, + + _focusable: function( element ) { + this.focusable = this.focusable.add( element ); + this._on( element, { + focusin: function( event ) { + $( event.currentTarget ).addClass( "ui-state-focus" ); + }, + focusout: function( event ) { + $( event.currentTarget ).removeClass( "ui-state-focus" ); + } + }); + }, + + _trigger: function( type, event, data ) { + var prop, orig, + callback = this.options[ type ]; + + data = data || {}; + event = $.Event( event ); + event.type = ( type === this.widgetEventPrefix ? + type : + this.widgetEventPrefix + type ).toLowerCase(); + // the original event may come from any element + // so we need to reset the target on the new event + event.target = this.element[ 0 ]; + + // copy original event properties over to the new event + orig = event.originalEvent; + if ( orig ) { + for ( prop in orig ) { + if ( !( prop in event ) ) { + event[ prop ] = orig[ prop ]; + } + } + } + + this.element.trigger( event, data ); + return !( $.isFunction( callback ) && + callback.apply( this.element[0], [ event ].concat( data ) ) === false || + event.isDefaultPrevented() ); + } +}; + +$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { + $.Widget.prototype[ "_" + method ] = function( element, options, callback ) { + if ( typeof options === "string" ) { + options = { effect: options }; + } + var hasOptions, + effectName = !options ? + method : + options === true || typeof options === "number" ? + defaultEffect : + options.effect || defaultEffect; + options = options || {}; + if ( typeof options === "number" ) { + options = { duration: options }; + } + hasOptions = !$.isEmptyObject( options ); + options.complete = callback; + if ( options.delay ) { + element.delay( options.delay ); + } + if ( hasOptions && $.effects && ( $.effects.effect[ effectName ] || $.uiBackCompat !== false && $.effects[ effectName ] ) ) { + element[ method ]( options ); + } else if ( effectName !== method && element[ effectName ] ) { + element[ effectName ]( options.duration, options.easing, callback ); + } else { + element.queue(function( next ) { + $( this )[ method ](); + if ( callback ) { + callback.call( element[ 0 ] ); + } + next(); + }); + } + }; +}); + +// DEPRECATED +if ( $.uiBackCompat !== false ) { + $.Widget.prototype._getCreateOptions = function() { + return $.metadata && $.metadata.get( this.element[0] )[ this.widgetName ]; + }; +} + +})( jQuery ); diff --git a/resources/lib/jquery.ui/themes/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png b/resources/lib/jquery.ui/themes/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png new file mode 100644 index 00000000..67b1fdde Binary files /dev/null and b/resources/lib/jquery.ui/themes/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png differ diff --git a/resources/lib/jquery.ui/themes/smoothness/images/ui-bg_flat_75_ffffff_40x100.png b/resources/lib/jquery.ui/themes/smoothness/images/ui-bg_flat_75_ffffff_40x100.png new file mode 100644 index 00000000..efa0b15a Binary files /dev/null and b/resources/lib/jquery.ui/themes/smoothness/images/ui-bg_flat_75_ffffff_40x100.png differ diff --git a/resources/lib/jquery.ui/themes/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png b/resources/lib/jquery.ui/themes/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png new file mode 100644 index 00000000..6467bba1 Binary files /dev/null and b/resources/lib/jquery.ui/themes/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png differ diff --git a/resources/lib/jquery.ui/themes/smoothness/images/ui-bg_glass_65_ffffff_1x400.png b/resources/lib/jquery.ui/themes/smoothness/images/ui-bg_glass_65_ffffff_1x400.png new file mode 100644 index 00000000..ca988a38 Binary files /dev/null and b/resources/lib/jquery.ui/themes/smoothness/images/ui-bg_glass_65_ffffff_1x400.png differ diff --git a/resources/lib/jquery.ui/themes/smoothness/images/ui-bg_glass_75_dadada_1x400.png b/resources/lib/jquery.ui/themes/smoothness/images/ui-bg_glass_75_dadada_1x400.png new file mode 100644 index 00000000..6e208033 Binary files /dev/null and b/resources/lib/jquery.ui/themes/smoothness/images/ui-bg_glass_75_dadada_1x400.png differ diff --git a/resources/lib/jquery.ui/themes/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png b/resources/lib/jquery.ui/themes/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png new file mode 100644 index 00000000..9a11b43e Binary files /dev/null and b/resources/lib/jquery.ui/themes/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png differ diff --git a/resources/lib/jquery.ui/themes/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png b/resources/lib/jquery.ui/themes/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png new file mode 100644 index 00000000..01048f8c Binary files /dev/null and b/resources/lib/jquery.ui/themes/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png differ diff --git a/resources/lib/jquery.ui/themes/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/resources/lib/jquery.ui/themes/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png new file mode 100644 index 00000000..35976e81 Binary files /dev/null and b/resources/lib/jquery.ui/themes/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png differ diff --git a/resources/lib/jquery.ui/themes/smoothness/images/ui-icons_222222_256x240.png b/resources/lib/jquery.ui/themes/smoothness/images/ui-icons_222222_256x240.png new file mode 100644 index 00000000..c1cb1170 Binary files /dev/null and b/resources/lib/jquery.ui/themes/smoothness/images/ui-icons_222222_256x240.png differ diff --git a/resources/lib/jquery.ui/themes/smoothness/images/ui-icons_2e83ff_256x240.png b/resources/lib/jquery.ui/themes/smoothness/images/ui-icons_2e83ff_256x240.png new file mode 100644 index 00000000..84b601bf Binary files /dev/null and b/resources/lib/jquery.ui/themes/smoothness/images/ui-icons_2e83ff_256x240.png differ diff --git a/resources/lib/jquery.ui/themes/smoothness/images/ui-icons_454545_256x240.png b/resources/lib/jquery.ui/themes/smoothness/images/ui-icons_454545_256x240.png new file mode 100644 index 00000000..b6db1acd Binary files /dev/null and b/resources/lib/jquery.ui/themes/smoothness/images/ui-icons_454545_256x240.png differ diff --git a/resources/lib/jquery.ui/themes/smoothness/images/ui-icons_888888_256x240.png b/resources/lib/jquery.ui/themes/smoothness/images/ui-icons_888888_256x240.png new file mode 100644 index 00000000..feea0e20 Binary files /dev/null and b/resources/lib/jquery.ui/themes/smoothness/images/ui-icons_888888_256x240.png differ diff --git a/resources/lib/jquery.ui/themes/smoothness/images/ui-icons_cd0a0a_256x240.png b/resources/lib/jquery.ui/themes/smoothness/images/ui-icons_cd0a0a_256x240.png new file mode 100644 index 00000000..ed5b6b09 Binary files /dev/null and b/resources/lib/jquery.ui/themes/smoothness/images/ui-icons_cd0a0a_256x240.png differ diff --git a/resources/lib/jquery.ui/themes/smoothness/jquery.ui.accordion.css b/resources/lib/jquery.ui/themes/smoothness/jquery.ui.accordion.css new file mode 100644 index 00000000..d429fd20 --- /dev/null +++ b/resources/lib/jquery.ui/themes/smoothness/jquery.ui.accordion.css @@ -0,0 +1,16 @@ +/*! + * jQuery UI Accordion 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Accordion#theming + */ +.ui-accordion .ui-accordion-header { display: block; cursor: pointer; position: relative; margin-top: 2px; padding: .5em .5em .5em .7em; zoom: 1; } +.ui-accordion .ui-accordion-icons { padding-left: 2.2em; } +.ui-accordion .ui-accordion-noicons { padding-left: .7em; } +.ui-accordion .ui-accordion-icons .ui-accordion-icons { padding-left: 2.2em; } +.ui-accordion .ui-accordion-header .ui-accordion-header-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } +.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; overflow: auto; zoom: 1; } diff --git a/resources/lib/jquery.ui/themes/smoothness/jquery.ui.autocomplete.css b/resources/lib/jquery.ui/themes/smoothness/jquery.ui.autocomplete.css new file mode 100644 index 00000000..4ef3497a --- /dev/null +++ b/resources/lib/jquery.ui/themes/smoothness/jquery.ui.autocomplete.css @@ -0,0 +1,19 @@ +/*! + * jQuery UI Autocomplete 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Autocomplete#theming + */ +.ui-autocomplete { + position: absolute; + top: 0; + left: 0; + cursor: default; +} + +/* workarounds */ +* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ diff --git a/resources/lib/jquery.ui/themes/smoothness/jquery.ui.button.css b/resources/lib/jquery.ui/themes/smoothness/jquery.ui.button.css new file mode 100644 index 00000000..44a7d9bb --- /dev/null +++ b/resources/lib/jquery.ui/themes/smoothness/jquery.ui.button.css @@ -0,0 +1,40 @@ +/*! + * jQuery UI Button 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Button#theming + */ +.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ +.ui-button, .ui-button:link, .ui-button:visited, .ui-button:hover, .ui-button:active { text-decoration: none; } +.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 */ +.ui-button-icons-only { width: 3.4em; } +button.ui-button-icons-only { width: 3.7em; } + +/*button text element */ +.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-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-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-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*/ +.ui-buttonset { margin-right: 7px; } +.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } + +/* workarounds */ +button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ diff --git a/resources/lib/jquery.ui/themes/smoothness/jquery.ui.core.css b/resources/lib/jquery.ui/themes/smoothness/jquery.ui.core.css new file mode 100644 index 00000000..2e088ca1 --- /dev/null +++ b/resources/lib/jquery.ui/themes/smoothness/jquery.ui.core.css @@ -0,0 +1,39 @@ +/*! + * jQuery UI CSS Framework 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { display: none; } +.ui-helper-hidden-accessible { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 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:before, .ui-helper-clearfix:after { content: ""; display: table; } +.ui-helper-clearfix:after { clear: both; } +.ui-helper-clearfix { zoom: 1; } +.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { cursor: default !important; } + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } diff --git a/resources/lib/jquery.ui/themes/smoothness/jquery.ui.datepicker.css b/resources/lib/jquery.ui/themes/smoothness/jquery.ui.datepicker.css new file mode 100644 index 00000000..f56bb75f --- /dev/null +++ b/resources/lib/jquery.ui/themes/smoothness/jquery.ui.datepicker.css @@ -0,0 +1,67 @@ +/*! + * jQuery UI Datepicker 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * 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; } +.ui-datepicker .ui-datepicker-prev { left:2px; } +.ui-datepicker .ui-datepicker-next { right:2px; } +.ui-datepicker .ui-datepicker-prev-hover { left:1px; } +.ui-datepicker .ui-datepicker-next-hover { right:1px; } +.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } +.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } +.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } +.ui-datepicker select.ui-datepicker-month-year {width: 100%;} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { width: 49%;} +.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } +.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } +.ui-datepicker td { border: 0; padding: 1px; } +.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } +.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } +.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { width:auto; } +.ui-datepicker-multi .ui-datepicker-group { float:left; } +.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } +.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } +.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } +.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } +.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; } + +/* RTL support */ +.ui-datepicker-rtl { direction: rtl; } +.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } +.ui-datepicker-rtl .ui-datepicker-group { float:right; } +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } + +/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ +.ui-datepicker-cover { + position: absolute; /*must have*/ + z-index: -1; /*must have*/ + filter: mask(); /*must have*/ + top: -4px; /*must have*/ + left: -4px; /*must have*/ + width: 200px; /*must have*/ + height: 200px; /*must have*/ +} \ No newline at end of file diff --git a/resources/lib/jquery.ui/themes/smoothness/jquery.ui.dialog.css b/resources/lib/jquery.ui/themes/smoothness/jquery.ui.dialog.css new file mode 100644 index 00000000..1313a5e0 --- /dev/null +++ b/resources/lib/jquery.ui/themes/smoothness/jquery.ui.dialog.css @@ -0,0 +1,22 @@ +/*! + * jQuery UI Dialog 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Dialog#theming + */ +.ui-dialog { position: absolute; top: 0; left: 0; padding: .2em; width: 300px; overflow: hidden; } +.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } +.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 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 { 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 .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/resources/lib/jquery.ui/themes/smoothness/jquery.ui.menu.css b/resources/lib/jquery.ui/themes/smoothness/jquery.ui.menu.css new file mode 100644 index 00000000..83fd84e4 --- /dev/null +++ b/resources/lib/jquery.ui/themes/smoothness/jquery.ui.menu.css @@ -0,0 +1,30 @@ +/*! + * jQuery UI Menu 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Menu#theming + */ +.ui-menu { list-style:none; padding: 2px; margin: 0; display:block; outline: none; } +.ui-menu .ui-menu { margin-top: -3px; position: absolute; } +.ui-menu .ui-menu-item { margin: 0; padding: 0; zoom: 1; width: 100%; } +.ui-menu .ui-menu-divider { margin: 5px -2px 5px -2px; height: 0; font-size: 0; line-height: 0; border-width: 1px 0 0 0; } +.ui-menu .ui-menu-item a { text-decoration: none; display: block; padding: 2px .4em; line-height: 1.5; zoom: 1; font-weight: normal; } +.ui-menu .ui-menu-item a.ui-state-focus, +.ui-menu .ui-menu-item a.ui-state-active { font-weight: normal; margin: -1px; } + +.ui-menu .ui-state-disabled { font-weight: normal; margin: .4em 0 .2em; line-height: 1.5; } +.ui-menu .ui-state-disabled a { cursor: default; } + +/* icon support */ +.ui-menu-icons { position: relative; } +.ui-menu-icons .ui-menu-item a { position: relative; padding-left: 2em; } + +/* left-aligned */ +.ui-menu .ui-icon { position: absolute; top: .2em; left: .2em; } + +/* right-aligned */ +.ui-menu .ui-menu-icon { position: static; float: right; } diff --git a/resources/lib/jquery.ui/themes/smoothness/jquery.ui.progressbar.css b/resources/lib/jquery.ui/themes/smoothness/jquery.ui.progressbar.css new file mode 100644 index 00000000..bd7e4033 --- /dev/null +++ b/resources/lib/jquery.ui/themes/smoothness/jquery.ui.progressbar.css @@ -0,0 +1,12 @@ +/*! + * jQuery UI Progressbar 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Progressbar#theming + */ +.ui-progressbar { height:2em; text-align: left; overflow: hidden; } +.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } \ No newline at end of file diff --git a/resources/lib/jquery.ui/themes/smoothness/jquery.ui.resizable.css b/resources/lib/jquery.ui/themes/smoothness/jquery.ui.resizable.css new file mode 100644 index 00000000..2f87843c --- /dev/null +++ b/resources/lib/jquery.ui/themes/smoothness/jquery.ui.resizable.css @@ -0,0 +1,21 @@ +/*! + * jQuery UI Resizable 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Resizable#theming + */ +.ui-resizable { position: relative;} +.ui-resizable-handle { position: absolute;font-size: 0.1px; display: block; } +.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } +.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } +.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } +.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } +.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } +.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } +.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } +.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } +.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;} \ No newline at end of file diff --git a/resources/lib/jquery.ui/themes/smoothness/jquery.ui.selectable.css b/resources/lib/jquery.ui/themes/smoothness/jquery.ui.selectable.css new file mode 100644 index 00000000..5854c41f --- /dev/null +++ b/resources/lib/jquery.ui/themes/smoothness/jquery.ui.selectable.css @@ -0,0 +1,11 @@ +/*! + * jQuery UI Selectable 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * 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/resources/lib/jquery.ui/themes/smoothness/jquery.ui.slider.css b/resources/lib/jquery.ui/themes/smoothness/jquery.ui.slider.css new file mode 100644 index 00000000..e5794789 --- /dev/null +++ b/resources/lib/jquery.ui/themes/smoothness/jquery.ui.slider.css @@ -0,0 +1,25 @@ +/*! + * jQuery UI Slider 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * 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; } + +.ui-slider-horizontal { height: .8em; } +.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } +.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } +.ui-slider-horizontal .ui-slider-range-min { left: 0; } +.ui-slider-horizontal .ui-slider-range-max { right: 0; } + +.ui-slider-vertical { width: .8em; height: 100px; } +.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } +.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } +.ui-slider-vertical .ui-slider-range-min { bottom: 0; } +.ui-slider-vertical .ui-slider-range-max { top: 0; } \ No newline at end of file diff --git a/resources/lib/jquery.ui/themes/smoothness/jquery.ui.spinner.css b/resources/lib/jquery.ui/themes/smoothness/jquery.ui.spinner.css new file mode 100644 index 00000000..e89b7206 --- /dev/null +++ b/resources/lib/jquery.ui/themes/smoothness/jquery.ui.spinner.css @@ -0,0 +1,23 @@ +/*! + * jQuery UI Spinner 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Spinner#theming + */ +.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; text-align: center; 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 */ +.ui-spinner .ui-icon-triangle-1-s { + /* need to fix icons sprite */ + background-position:-65px -16px; +} diff --git a/resources/lib/jquery.ui/themes/smoothness/jquery.ui.tabs.css b/resources/lib/jquery.ui/themes/smoothness/jquery.ui.tabs.css new file mode 100644 index 00000000..11a000ff --- /dev/null +++ b/resources/lib/jquery.ui/themes/smoothness/jquery.ui.tabs.css @@ -0,0 +1,18 @@ +/*! + * jQuery UI Tabs 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * 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: 0; margin: 1px .2em 0 0; border-bottom: 0; padding: 0; white-space: nowrap; } +.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } +.ui-tabs .ui-tabs-nav li.ui-tabs-active { margin-bottom: -1px; padding-bottom: 1px; } +.ui-tabs .ui-tabs-nav li.ui-tabs-active a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-tabs-loading a { cursor: text; } +.ui-tabs .ui-tabs-nav li a, .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ +.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } diff --git a/resources/lib/jquery.ui/themes/smoothness/jquery.ui.theme.css b/resources/lib/jquery.ui/themes/smoothness/jquery.ui.theme.css new file mode 100644 index 00000000..d170081b --- /dev/null +++ b/resources/lib/jquery.ui/themes/smoothness/jquery.ui.theme.css @@ -0,0 +1,248 @@ +/*! + * jQuery UI CSS Framework 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + * + * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px + */ + + +/* Component containers +----------------------------------*/ +.ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; } +.ui-widget .ui-widget { font-size: 1em; } +.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; } +.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url("images/ui-bg_flat_75_ffffff_40x100.png") 50% 50% repeat-x; color: #222222; } +.ui-widget-content a { color: #222222; } +.ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url("images/ui-bg_highlight-soft_75_cccccc_1x100.png") 50% 50% repeat-x; color: #222222; font-weight: bold; } +.ui-widget-header a { color: #222222; } + +/* Interaction states +----------------------------------*/ +.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url("images/ui-bg_glass_75_e6e6e6_1x400.png") 50% 50% repeat-x; font-weight: normal; color: #555555; } +.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url("images/ui-bg_glass_75_dadada_1x400.png") 50% 50% repeat-x; font-weight: normal; color: #212121; } +.ui-state-hover a, .ui-state-hover a:hover, .ui-state-hover a:link, .ui-state-hover a:visited { color: #212121; text-decoration: none; } +.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x; font-weight: normal; color: #212121; } +.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; } + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url("images/ui-bg_glass_55_fbf9ee_1x400.png") 50% 50% repeat-x; color: #363636; } +.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } +.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url("images/ui-bg_glass_95_fef1ec_1x400.png") 50% 50% repeat-x; color: #cd0a0a; } +.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; } +.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; } +.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } +.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } +.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } +.ui-state-disabled .ui-icon { filter:Alpha(Opacity=35); } /* For IE8 - See #6059 */ + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { width: 16px; height: 16px; background-image: url("images/ui-icons_222222_256x240.png"); } +.ui-widget-content .ui-icon {background-image: url("images/ui-icons_222222_256x240.png"); } +.ui-widget-header .ui-icon {background-image: url("images/ui-icons_222222_256x240.png"); } +.ui-state-default .ui-icon { background-image: url("images/ui-icons_888888_256x240.png"); } +.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url("images/ui-icons_454545_256x240.png"); } +.ui-state-active .ui-icon {background-image: url("images/ui-icons_454545_256x240.png"); } +.ui-state-highlight .ui-icon {background-image: url("images/ui-icons_2e83ff_256x240.png"); } +.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url("images/ui-icons_cd0a0a_256x240.png"); } + +/* positioning */ +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-on { background-position: -96px -144px; } +.ui-icon-radio-off { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; } +.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; } +.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } +.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } + +/* Overlays */ +.ui-widget-overlay { background: #aaaaaa url("images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x; opacity: .3;filter:Alpha(Opacity=30); } +.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url("images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x; opacity: .3;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; } \ No newline at end of file diff --git a/resources/lib/jquery.ui/themes/smoothness/jquery.ui.tooltip.css b/resources/lib/jquery.ui/themes/smoothness/jquery.ui.tooltip.css new file mode 100644 index 00000000..88b0d02e --- /dev/null +++ b/resources/lib/jquery.ui/themes/smoothness/jquery.ui.tooltip.css @@ -0,0 +1,21 @@ +/*! + * jQuery UI Tooltip 1.9.2 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ +.ui-tooltip { + padding: 8px; + position: absolute; + z-index: 9999; + max-width: 300px; + -webkit-box-shadow: 0 0 5px #aaa; + box-shadow: 0 0 5px #aaa; +} +/* Fades and background-images don't work well together in IE6, drop the image */ +* html .ui-tooltip { + background-image: none; +} +body .ui-tooltip { border-width: 2px; } diff --git a/resources/lib/jquery/jquery.appear.js b/resources/lib/jquery/jquery.appear.js new file mode 100644 index 00000000..4f77886c --- /dev/null +++ b/resources/lib/jquery/jquery.appear.js @@ -0,0 +1,138 @@ +/* + * jQuery.appear + * http://code.google.com/p/jquery-appear/ + * + * Copyright (c) 2009 Michael Hixson + * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php) +*/ +(function($) { + + $.fn.appear = function(fn, options) { + + var settings = $.extend({ + + //arbitrary data to pass to fn + data: undefined, + + //call fn only on the first appear? + one: true + + }, options); + + return this.each(function() { + + var t = $(this); + + //whether the element is currently visible + t.appeared = false; + + if (!fn) { + + //trigger the custom event + t.trigger('appear', settings.data); + return; + } + + var w = $(window); + + //fires the appear event when appropriate + var check = function() { + + //is the element hidden? + if (!t.is(':visible')) { + + //it became hidden + t.appeared = false; + return; + } + + //is the element inside the visible window? + var a = w.scrollLeft(); + var b = w.scrollTop(); + var o = t.offset(); + var x = o.left; + var y = o.top; + + if (y + t.height() >= b && + y <= b + w.height() && + x + t.width() >= a && + x <= a + w.width()) { + + //trigger the custom event + if (!t.appeared) t.trigger('appear', settings.data); + + } else { + + //it scrolled out of view + t.appeared = false; + } + }; + + //create a modified fn with some additional logic + var modifiedFn = function() { + + //mark the element as visible + t.appeared = true; + + //is this supposed to happen only once? + if (settings.one) { + + //remove the check + w.unbind('scroll', check); + var i = $.inArray(check, $.fn.appear.checks); + if (i >= 0) $.fn.appear.checks.splice(i, 1); + } + + //trigger the original fn + fn.apply(this, arguments); + }; + + //bind the modified fn to the element + if (settings.one) t.one('appear', settings.data, modifiedFn); + else t.bind('appear', settings.data, modifiedFn); + + //check whenever the window scrolls + w.scroll(check); + + //check whenever the dom changes + $.fn.appear.checks.push(check); + + //check now + (check)(); + }); + }; + + //keep a queue of appearance checks + $.extend($.fn.appear, { + + checks: [], + timeout: null, + + //process the queue + checkAll: function() { + var length = $.fn.appear.checks.length; + if (length > 0) while (length--) ($.fn.appear.checks[length])(); + }, + + //check the queue asynchronously + run: function() { + if ($.fn.appear.timeout) clearTimeout($.fn.appear.timeout); + $.fn.appear.timeout = setTimeout($.fn.appear.checkAll, 20); + } + }); + + //run checks when these methods are called + $.each(['append', 'prepend', 'after', 'before', 'attr', + 'removeAttr', 'addClass', 'removeClass', 'toggleClass', + 'remove', 'css', 'show', 'hide'], function(i, n) { + var old = $.fn[n]; + if (old) { + $.fn[n] = function() { + var r = old.apply(this, arguments); + $.fn.appear.run(); + return r; + } + } + }); + +})(jQuery); \ No newline at end of file diff --git a/resources/lib/jquery/jquery.async.js b/resources/lib/jquery/jquery.async.js new file mode 100644 index 00000000..2161f6b9 --- /dev/null +++ b/resources/lib/jquery/jquery.async.js @@ -0,0 +1,69 @@ +/* + * jQuery Asynchronous Plugin 1.0 + * + * Copyright (c) 2008 Vincent Robert (genezys.net) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + */ +(function($){ + +// opts.delay : (default 10) delay between async call in ms +// opts.bulk : (default 500) delay during which the loop can continue synchronously without yielding the CPU +// opts.test : (default true) function to test in the while test part +// opts.loop : (default empty) function to call in the while loop part +// opts.end : (default empty) function to call at the end of the while loop +$.whileAsync = function(opts) { + var delay = Math.abs(opts.delay) || 10, + bulk = isNaN(opts.bulk) ? 500 : Math.abs(opts.bulk), + test = opts.test || function(){ return true; }, + loop = opts.loop || function(){}, + end = opts.end || function(){}; + + (function(){ + + var t = false, + begin = new Date(); + + while( t = test() ) { + loop(); + if( bulk === 0 || (new Date() - begin) > bulk ) { + break; + } + } + if( t ) { + setTimeout(arguments.callee, delay); + } + else { + end(); + } + + })(); +}; + +// opts.delay : (default 10) delay between async call in ms +// opts.bulk : (default 500) delay during which the loop can continue synchronously without yielding the CPU +// opts.loop : (default empty) function to call in the each loop part, signature: function(index, value) this = value +// opts.end : (default empty) function to call at the end of the each loop +$.eachAsync = function(array, opts) { + var i = 0, + l = array.length, + loop = opts.loop || function(){}; + + $.whileAsync( + $.extend(opts, { + test: function() { return i < l; }, + loop: function() { + var val = array[i]; + return loop.call(val, i++, val); + } + }) + ); +}; + +$.fn.eachAsync = function(opts) { + $.eachAsync(this, opts); + return this; +} + +})(jQuery); \ No newline at end of file diff --git a/resources/lib/jquery/jquery.ba-throttle-debounce.js b/resources/lib/jquery/jquery.ba-throttle-debounce.js new file mode 100644 index 00000000..fa30bdff --- /dev/null +++ b/resources/lib/jquery/jquery.ba-throttle-debounce.js @@ -0,0 +1,252 @@ +/*! + * jQuery throttle / debounce - v1.1 - 3/7/2010 + * http://benalman.com/projects/jquery-throttle-debounce-plugin/ + * + * Copyright (c) 2010 "Cowboy" Ben Alman + * Dual licensed under the MIT and GPL licenses. + * http://benalman.com/about/license/ + */ + +// Script: jQuery throttle / debounce: Sometimes, less is more! +// +// *Version: 1.1, Last updated: 3/7/2010* +// +// Project Home - http://benalman.com/projects/jquery-throttle-debounce-plugin/ +// GitHub - http://github.com/cowboy/jquery-throttle-debounce/ +// Source - http://github.com/cowboy/jquery-throttle-debounce/raw/master/jquery.ba-throttle-debounce.js +// (Minified) - http://github.com/cowboy/jquery-throttle-debounce/raw/master/jquery.ba-throttle-debounce.min.js (0.7kb) +// +// About: License +// +// Copyright (c) 2010 "Cowboy" Ben Alman, +// Dual licensed under the MIT and GPL licenses. +// http://benalman.com/about/license/ +// +// About: Examples +// +// These working examples, complete with fully commented code, illustrate a few +// ways in which this plugin can be used. +// +// Throttle - http://benalman.com/code/projects/jquery-throttle-debounce/examples/throttle/ +// Debounce - http://benalman.com/code/projects/jquery-throttle-debounce/examples/debounce/ +// +// About: Support and Testing +// +// Information about what version or versions of jQuery this plugin has been +// tested with, what browsers it has been tested in, and where the unit tests +// reside (so you can test it yourself). +// +// jQuery Versions - none, 1.3.2, 1.4.2 +// Browsers Tested - Internet Explorer 6-8, Firefox 2-3.6, Safari 3-4, Chrome 4-5, Opera 9.6-10.1. +// Unit Tests - http://benalman.com/code/projects/jquery-throttle-debounce/unit/ +// +// About: Release History +// +// 1.1 - (3/7/2010) Fixed a bug in where trailing callbacks +// executed later than they should. Reworked a fair amount of internal +// logic as well. +// 1.0 - (3/6/2010) Initial release as a stand-alone project. Migrated over +// from jquery-misc repo v0.4 to jquery-throttle repo v1.0, added the +// no_trailing throttle parameter and debounce functionality. +// +// Topic: Note for non-jQuery users +// +// jQuery isn't actually required for this plugin, because nothing internal +// uses any jQuery methods or properties. jQuery is just used as a namespace +// under which these methods can exist. +// +// Since jQuery isn't actually required for this plugin, if jQuery doesn't exist +// when this plugin is loaded, the method described below will be created in +// the `Cowboy` namespace. Usage will be exactly the same, but instead of +// $.method() or jQuery.method(), you'll need to use Cowboy.method(). + +(function(window,undefined){ + '$:nomunge'; // Used by YUI compressor. + + // Since jQuery really isn't required for this plugin, use `jQuery` as the + // namespace only if it already exists, otherwise use the `Cowboy` namespace, + // creating it if necessary. + var $ = window.jQuery || window.Cowboy || ( window.Cowboy = {} ), + + // Internal method reference. + jq_throttle; + + // Method: jQuery.throttle + // + // Throttle execution of a function. Especially useful for rate limiting + // execution of handlers on events like resize and scroll. If you want to + // rate-limit execution of a function to a single time, see the + // method. + // + // In this visualization, | is a throttled-function call and X is the actual + // callback execution: + // + // > Throttled with `no_trailing` specified as false or unspecified: + // > ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| + // > X X X X X X X X X X X X + // > + // > Throttled with `no_trailing` specified as true: + // > ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| + // > X X X X X X X X X X + // + // Usage: + // + // > var throttled = jQuery.throttle( delay, [ no_trailing, ] callback ); + // > + // > jQuery('selector').bind( 'someevent', throttled ); + // > jQuery('selector').unbind( 'someevent', throttled ); + // + // This also works in jQuery 1.4+: + // + // > jQuery('selector').bind( 'someevent', jQuery.throttle( delay, [ no_trailing, ] callback ) ); + // > jQuery('selector').unbind( 'someevent', callback ); + // + // Arguments: + // + // delay - (Number) A zero-or-greater delay in milliseconds. For event + // callbacks, values around 100 or 250 (or even higher) are most useful. + // no_trailing - (Boolean) Optional, defaults to false. If no_trailing is + // true, callback will only execute every `delay` milliseconds while the + // throttled-function is being called. If no_trailing is false or + // unspecified, callback will be executed one final time after the last + // throttled-function call. (After the throttled-function has not been + // called for `delay` milliseconds, the internal counter is reset) + // callback - (Function) A function to be executed after delay milliseconds. + // The `this` context and all arguments are passed through, as-is, to + // `callback` when the throttled-function is executed. + // + // Returns: + // + // (Function) A new, throttled, function. + + $.throttle = jq_throttle = function( delay, no_trailing, callback, debounce_mode ) { + // After wrapper has stopped being called, this timeout ensures that + // `callback` is executed at the proper times in `throttle` and `end` + // debounce modes. + var timeout_id, + + // Keep track of the last time `callback` was executed. + last_exec = 0; + + // `no_trailing` defaults to falsy. + if ( typeof no_trailing !== 'boolean' ) { + debounce_mode = callback; + callback = no_trailing; + no_trailing = undefined; + } + + // The `wrapper` function encapsulates all of the throttling / debouncing + // functionality and when executed will limit the rate at which `callback` + // is executed. + function wrapper() { + var that = this, + elapsed = +new Date() - last_exec, + args = arguments; + + // Execute `callback` and update the `last_exec` timestamp. + function exec() { + last_exec = +new Date(); + callback.apply( that, args ); + }; + + // If `debounce_mode` is true (at_begin) this is used to clear the flag + // to allow future `callback` executions. + function clear() { + timeout_id = undefined; + }; + + if ( debounce_mode && !timeout_id ) { + // Since `wrapper` is being called for the first time and + // `debounce_mode` is true (at_begin), execute `callback`. + exec(); + } + + // Clear any existing timeout. + timeout_id && clearTimeout( timeout_id ); + + if ( debounce_mode === undefined && elapsed > delay ) { + // In throttle mode, if `delay` time has been exceeded, execute + // `callback`. + exec(); + + } else if ( no_trailing !== true ) { + // In trailing throttle mode, since `delay` time has not been + // exceeded, schedule `callback` to execute `delay` ms after most + // recent execution. + // + // If `debounce_mode` is true (at_begin), schedule `clear` to execute + // after `delay` ms. + // + // If `debounce_mode` is false (at end), schedule `callback` to + // execute after `delay` ms. + timeout_id = setTimeout( debounce_mode ? clear : exec, debounce_mode === undefined ? delay - elapsed : delay ); + } + }; + + // Set the guid of `wrapper` function to the same of original callback, so + // it can be removed in jQuery 1.4+ .unbind or .die by using the original + // callback as a reference. + if ( $.guid ) { + wrapper.guid = callback.guid = callback.guid || $.guid++; + } + + // Return the wrapper function. + return wrapper; + }; + + // Method: jQuery.debounce + // + // Debounce execution of a function. Debouncing, unlike throttling, + // guarantees that a function is only executed a single time, either at the + // very beginning of a series of calls, or at the very end. If you want to + // simply rate-limit execution of a function, see the + // method. + // + // In this visualization, | is a debounced-function call and X is the actual + // callback execution: + // + // > Debounced with `at_begin` specified as false or unspecified: + // > ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| + // > X X + // > + // > Debounced with `at_begin` specified as true: + // > ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| + // > X X + // + // Usage: + // + // > var debounced = jQuery.debounce( delay, [ at_begin, ] callback ); + // > + // > jQuery('selector').bind( 'someevent', debounced ); + // > jQuery('selector').unbind( 'someevent', debounced ); + // + // This also works in jQuery 1.4+: + // + // > jQuery('selector').bind( 'someevent', jQuery.debounce( delay, [ at_begin, ] callback ) ); + // > jQuery('selector').unbind( 'someevent', callback ); + // + // Arguments: + // + // delay - (Number) A zero-or-greater delay in milliseconds. For event + // callbacks, values around 100 or 250 (or even higher) are most useful. + // at_begin - (Boolean) Optional, defaults to false. If at_begin is false or + // unspecified, callback will only be executed `delay` milliseconds after + // the last debounced-function call. If at_begin is true, callback will be + // executed only at the first debounced-function call. (After the + // throttled-function has not been called for `delay` milliseconds, the + // internal counter is reset) + // callback - (Function) A function to be executed after delay milliseconds. + // The `this` context and all arguments are passed through, as-is, to + // `callback` when the debounced-function is executed. + // + // Returns: + // + // (Function) A new, debounced, function. + + $.debounce = function( delay, at_begin, callback ) { + return callback === undefined + ? jq_throttle( delay, at_begin, false ) + : jq_throttle( delay, callback, at_begin !== false ); + }; + +})(this); diff --git a/resources/lib/jquery/jquery.cookie.js b/resources/lib/jquery/jquery.cookie.js new file mode 100644 index 00000000..3fb201c6 --- /dev/null +++ b/resources/lib/jquery/jquery.cookie.js @@ -0,0 +1,90 @@ +/*! + * jQuery Cookie Plugin v1.3.1 + * https://github.com/carhartl/jquery-cookie + * + * Copyright 2013 Klaus Hartl + * Released under the MIT license + */ +(function ($, document, undefined) { + + var pluses = /\+/g; + + function raw(s) { + return s; + } + + function decoded(s) { + return unRfc2068(decodeURIComponent(s.replace(pluses, ' '))); + } + + function unRfc2068(value) { + if (value.indexOf('"') === 0) { + // This is a quoted cookie as according to RFC2068, unescape + value = value.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\'); + } + return value; + } + + function fromJSON(value) { + return config.json ? JSON.parse(value) : value; + } + + var config = $.cookie = function (key, value, options) { + + // write + if (value !== undefined) { + options = $.extend({}, config.defaults, options); + + if (value === null) { + options.expires = -1; + } + + if (typeof options.expires === 'number') { + var days = options.expires, t = options.expires = new Date(); + t.setDate(t.getDate() + days); + } + + value = config.json ? JSON.stringify(value) : String(value); + + return (document.cookie = [ + encodeURIComponent(key), '=', config.raw ? value : encodeURIComponent(value), + options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE + options.path ? '; path=' + options.path : '', + options.domain ? '; domain=' + options.domain : '', + options.secure ? '; secure' : '' + ].join('')); + } + + // read + var decode = config.raw ? raw : decoded; + var cookies = document.cookie.split('; '); + var result = key ? null : {}; + for (var i = 0, l = cookies.length; i < l; i++) { + var parts = cookies[i].split('='); + var name = decode(parts.shift()); + var cookie = decode(parts.join('=')); + + if (key && key === name) { + result = fromJSON(cookie); + break; + } + + if (!key) { + result[name] = fromJSON(cookie); + } + } + + return result; + }; + + config.defaults = {}; + + $.removeCookie = function (key, options) { + if ($.cookie(key) !== null) { + $.cookie(key, null, options); + return true; + } + return false; + }; + +})(jQuery, document); diff --git a/resources/lib/jquery/jquery.form.js b/resources/lib/jquery/jquery.form.js new file mode 100644 index 00000000..13e9a55c --- /dev/null +++ b/resources/lib/jquery/jquery.form.js @@ -0,0 +1,1089 @@ +/*! + * jQuery Form Plugin + * version: 3.14 (30-JUL-2012) + * @requires jQuery v1.3.2 or later + * + * Examples and documentation at: http://malsup.com/jquery/form/ + * Project repository: https://github.com/malsup/form + * Dual licensed under the MIT and GPL licenses: + * http://malsup.github.com/mit-license.txt + * http://malsup.github.com/gpl-license-v2.txt + */ +/*global ActiveXObject alert */ +;(function($) { +"use strict"; + +/* + Usage Note: + ----------- + Do not use both ajaxSubmit and ajaxForm on the same form. These + functions are mutually exclusive. Use ajaxSubmit if you want + to bind your own submit handler to the form. For example, + + $(document).ready(function() { + $('#myForm').on('submit', function(e) { + e.preventDefault(); // <-- important + $(this).ajaxSubmit({ + target: '#output' + }); + }); + }); + + Use ajaxForm when you want the plugin to manage all the event binding + for you. For example, + + $(document).ready(function() { + $('#myForm').ajaxForm({ + target: '#output' + }); + }); + + You can also use ajaxForm with delegation (requires jQuery v1.7+), so the + form does not have to exist when you invoke ajaxForm: + + $('#myForm').ajaxForm({ + delegation: true, + target: '#output' + }); + + When using ajaxForm, the ajaxSubmit function will be invoked for you + at the appropriate time. +*/ + +/** + * Feature detection + */ +var feature = {}; +feature.fileapi = $("").get(0).files !== undefined; +feature.formdata = window.FormData !== undefined; + +/** + * ajaxSubmit() provides a mechanism for immediately submitting + * an HTML form using AJAX. + */ +$.fn.ajaxSubmit = function(options) { + /*jshint scripturl:true */ + + // fast fail if nothing selected (http://dev.jquery.com/ticket/2752) + if (!this.length) { + log('ajaxSubmit: skipping submit process - no element selected'); + return this; + } + + var method, action, url, $form = this; + + if (typeof options == 'function') { + options = { success: options }; + } + + method = this.attr('method'); + action = this.attr('action'); + url = (typeof action === 'string') ? $.trim(action) : ''; + url = url || window.location.href || ''; + if (url) { + // clean url (don't include hash vaue) + url = (url.match(/^([^#]+)/)||[])[1]; + } + + options = $.extend(true, { + url: url, + success: $.ajaxSettings.success, + type: method || 'GET', + iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank' + }, options); + + // hook for manipulating the form data before it is extracted; + // convenient for use with rich editors like tinyMCE or FCKEditor + var veto = {}; + this.trigger('form-pre-serialize', [this, options, veto]); + if (veto.veto) { + log('ajaxSubmit: submit vetoed via form-pre-serialize trigger'); + return this; + } + + // provide opportunity to alter form data before it is serialized + if (options.beforeSerialize && options.beforeSerialize(this, options) === false) { + log('ajaxSubmit: submit aborted via beforeSerialize callback'); + return this; + } + + var traditional = options.traditional; + if ( traditional === undefined ) { + traditional = $.ajaxSettings.traditional; + } + + var elements = []; + var qx, a = this.formToArray(options.semantic, elements); + if (options.data) { + options.extraData = options.data; + qx = $.param(options.data, traditional); + } + + // give pre-submit callback an opportunity to abort the submit + if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) { + log('ajaxSubmit: submit aborted via beforeSubmit callback'); + return this; + } + + // fire vetoable 'validate' event + this.trigger('form-submit-validate', [a, this, options, veto]); + if (veto.veto) { + log('ajaxSubmit: submit vetoed via form-submit-validate trigger'); + return this; + } + + var q = $.param(a, traditional); + if (qx) { + q = ( q ? (q + '&' + qx) : qx ); + } + if (options.type.toUpperCase() == 'GET') { + options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q; + options.data = null; // data is null for 'get' + } + else { + options.data = q; // data is the query string for 'post' + } + + var callbacks = []; + if (options.resetForm) { + callbacks.push(function() { $form.resetForm(); }); + } + if (options.clearForm) { + callbacks.push(function() { $form.clearForm(options.includeHidden); }); + } + + // perform a load on the target only if dataType is not provided + if (!options.dataType && options.target) { + var oldSuccess = options.success || function(){}; + callbacks.push(function(data) { + var fn = options.replaceTarget ? 'replaceWith' : 'html'; + $(options.target)[fn](data).each(oldSuccess, arguments); + }); + } + else if (options.success) { + callbacks.push(options.success); + } + + options.success = function(data, status, xhr) { // jQuery 1.4+ passes xhr as 3rd arg + var context = options.context || this ; // jQuery 1.4+ supports scope context + for (var i=0, max=callbacks.length; i < max; i++) { + callbacks[i].apply(context, [data, status, xhr || $form, $form]); + } + }; + + // are there files to upload? + var fileInputs = $('input:file:enabled[value]', this); // [value] (issue #113) + var hasFileInputs = fileInputs.length > 0; + var mp = 'multipart/form-data'; + var multipart = ($form.attr('enctype') == mp || $form.attr('encoding') == mp); + + var fileAPI = feature.fileapi && feature.formdata; + log("fileAPI :" + fileAPI); + var shouldUseFrame = (hasFileInputs || multipart) && !fileAPI; + + // options.iframe allows user to force iframe mode + // 06-NOV-09: now defaulting to iframe mode if file input is detected + if (options.iframe !== false && (options.iframe || shouldUseFrame)) { + // hack to fix Safari hang (thanks to Tim Molendijk for this) + // see: http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d + if (options.closeKeepAlive) { + $.get(options.closeKeepAlive, function() { + fileUploadIframe(a); + }); + } + else { + fileUploadIframe(a); + } + } + else if ((hasFileInputs || multipart) && fileAPI) { + fileUploadXhr(a); + } + else { + $.ajax(options); + } + + // clear element array + for (var k=0; k < elements.length; k++) + elements[k] = null; + + // fire 'notify' event + this.trigger('form-submit-notify', [this, options]); + return this; + + // XMLHttpRequest Level 2 file uploads (big hat tip to francois2metz) + function fileUploadXhr(a) { + var formdata = new FormData(); + + for (var i=0; i < a.length; i++) { + formdata.append(a[i].name, a[i].value); + } + + if (options.extraData) { + for (var p in options.extraData) + if (options.extraData.hasOwnProperty(p)) + formdata.append(p, options.extraData[p]); + } + + options.data = null; + + var s = $.extend(true, {}, $.ajaxSettings, options, { + contentType: false, + processData: false, + cache: false, + type: 'POST' + }); + + if (options.uploadProgress) { + // workaround because jqXHR does not expose upload property + s.xhr = function() { + var xhr = jQuery.ajaxSettings.xhr(); + if (xhr.upload) { + xhr.upload.onprogress = function(event) { + var percent = 0; + var position = event.loaded || event.position; /*event.position is deprecated*/ + var total = event.total; + if (event.lengthComputable) { + percent = Math.ceil(position / total * 100); + } + options.uploadProgress(event, position, total, percent); + }; + } + return xhr; + }; + } + + s.data = null; + var beforeSend = s.beforeSend; + s.beforeSend = function(xhr, o) { + o.data = formdata; + if(beforeSend) + beforeSend.call(this, xhr, o); + }; + $.ajax(s); + } + + // private function for handling file uploads (hat tip to YAHOO!) + function fileUploadIframe(a) { + var form = $form[0], el, i, s, g, id, $io, io, xhr, sub, n, timedOut, timeoutHandle; + var useProp = !!$.fn.prop; + + if ($(':input[name=submit],:input[id=submit]', form).length) { + // if there is an input with a name or id of 'submit' then we won't be + // able to invoke the submit fn on the form (at least not x-browser) + alert('Error: Form elements must not have name or id of "submit".'); + return; + } + + if (a) { + // ensure that every serialized input is still enabled + for (i=0; i < elements.length; i++) { + el = $(elements[i]); + if ( useProp ) + el.prop('disabled', false); + else + el.removeAttr('disabled'); + } + } + + s = $.extend(true, {}, $.ajaxSettings, options); + s.context = s.context || s; + id = 'jqFormIO' + (new Date().getTime()); + if (s.iframeTarget) { + $io = $(s.iframeTarget); + n = $io.attr('name'); + if (!n) + $io.attr('name', id); + else + id = n; + } + else { + $io = $('